/*
	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
*/

if(typeof dojo=="undefined"){
var dj_global=this;
var dj_currentContext=this;
function dj_undef(_1,_2){
return (typeof (_2||dj_currentContext)[_1]=="undefined");
}
if(dj_undef("djConfig",this)){
var djConfig={};
}
if(dj_undef("dojo",this)){
var dojo={};
}
dojo.global=function(){
return dj_currentContext;
};
dojo.locale=djConfig.locale;
dojo.version={major:0,minor:0,patch:0,flag:"dev",revision:Number("$Rev: 7480 $".match(/[0-9]+/)[0]),toString:function(){
with(dojo.version){
return major+"."+minor+"."+patch+flag+" ("+revision+")";
}
}};
dojo.evalProp=function(_3,_4,_5){
if((!_4)||(!_3)){
return undefined;
}
if(!dj_undef(_3,_4)){
return _4[_3];
}
return (_5?(_4[_3]={}):undefined);
};
dojo.parseObjPath=function(_6,_7,_8){
var _9=(_7||dojo.global());
var _a=_6.split(".");
var _b=_a.pop();
for(var i=0,l=_a.length;i<l&&_9;i++){
_9=dojo.evalProp(_a[i],_9,_8);
}
return {obj:_9,prop:_b};
};
dojo.evalObjPath=function(_e,_f){
if(typeof _e!="string"){
return dojo.global();
}
if(_e.indexOf(".")==-1){
return dojo.evalProp(_e,dojo.global(),_f);
}
var ref=dojo.parseObjPath(_e,dojo.global(),_f);
if(ref){
return dojo.evalProp(ref.prop,ref.obj,_f);
}
return null;
};
dojo.errorToString=function(_11){
if(!dj_undef("message",_11)){
return _11.message;
}else{
if(!dj_undef("description",_11)){
return _11.description;
}else{
return _11;
}
}
};
dojo.raise=function(_12,_13){
if(_13){
_12=_12+": "+dojo.errorToString(_13);
}else{
_12=dojo.errorToString(_12);
}
try{
if(djConfig.isDebug){
dojo.hostenv.println("FATAL exception raised: "+_12);
}
}
catch(e){
}
throw _13||Error(_12);
};
dojo.debug=function(){
};
dojo.debugShallow=function(obj){
};
dojo.profile={start:function(){
},end:function(){
},stop:function(){
},dump:function(){
}};
function dj_eval(_15){
return dj_global.eval?dj_global.eval(_15):eval(_15);
}
dojo.unimplemented=function(_16,_17){
var _18="'"+_16+"' not implemented";
if(_17!=null){
_18+=" "+_17;
}
dojo.raise(_18);
};
dojo.deprecated=function(_19,_1a,_1b){
var _1c="DEPRECATED: "+_19;
if(_1a){
_1c+=" "+_1a;
}
if(_1b){
_1c+=" -- will be removed in version: "+_1b;
}
dojo.debug(_1c);
};
dojo.render=(function(){
function vscaffold(_1d,_1e){
var tmp={capable:false,support:{builtin:false,plugin:false},prefixes:_1d};
for(var i=0;i<_1e.length;i++){
tmp[_1e[i]]=false;
}
return tmp;
}
return {name:"",ver:dojo.version,os:{win:false,linux:false,osx:false},html:vscaffold(["html"],["ie","opera","khtml","safari","moz"]),svg:vscaffold(["svg"],["corel","adobe","batik"]),vml:vscaffold(["vml"],["ie"]),swf:vscaffold(["Swf","Flash","Mm"],["mm"]),swt:vscaffold(["Swt"],["ibm"])};
})();
dojo.hostenv=(function(){
var _21={isDebug:false,allowQueryConfig:false,baseScriptUri:"",baseRelativePath:"",libraryScriptUri:"",iePreventClobber:false,ieClobberMinimal:true,preventBackButtonFix:true,delayMozLoadingFix:false,searchIds:[],parseWidgets:true};
if(typeof djConfig=="undefined"){
djConfig=_21;
}else{
for(var _22 in _21){
if(typeof djConfig[_22]=="undefined"){
djConfig[_22]=_21[_22];
}
}
}
return {name_:"(unset)",version_:"(unset)",getName:function(){
return this.name_;
},getVersion:function(){
return this.version_;
},getText:function(uri){
dojo.unimplemented("getText","uri="+uri);
}};
})();
dojo.hostenv.getBaseScriptUri=function(){
if(djConfig.baseScriptUri.length){
return djConfig.baseScriptUri;
}
var uri=new String(djConfig.libraryScriptUri||djConfig.baseRelativePath);
if(!uri){
dojo.raise("Nothing returned by getLibraryScriptUri(): "+uri);
}
var _25=uri.lastIndexOf("/");
djConfig.baseScriptUri=djConfig.baseRelativePath;
return djConfig.baseScriptUri;
};
(function(){
var _26={pkgFileName:"__package__",loading_modules_:{},loaded_modules_:{},addedToLoadingCount:[],removedFromLoadingCount:[],inFlightCount:0,modulePrefixes_:{dojo:{name:"dojo",value:"src"}},setModulePrefix:function(_27,_28){
this.modulePrefixes_[_27]={name:_27,value:_28};
},moduleHasPrefix:function(_29){
var mp=this.modulePrefixes_;
return Boolean(mp[_29]&&mp[_29].value);
},getModulePrefix:function(_2b){
if(this.moduleHasPrefix(_2b)){
return this.modulePrefixes_[_2b].value;
}
return _2b;
},getTextStack:[],loadUriStack:[],loadedUris:[],post_load_:false,modulesLoadedListeners:[],unloadListeners:[],loadNotifying:false};
for(var _2c in _26){
dojo.hostenv[_2c]=_26[_2c];
}
})();
dojo.hostenv.loadPath=function(_2d,_2e,cb){
var uri;
if(_2d.charAt(0)=="/"||_2d.match(/^\w+:/)){
uri=_2d;
}else{
uri=this.getBaseScriptUri()+_2d;
}
if(djConfig.cacheBust&&dojo.render.html.capable){
uri+="?"+String(djConfig.cacheBust).replace(/\W+/g,"");
}
try{
return !_2e?this.loadUri(uri,cb):this.loadUriAndCheck(uri,_2e,cb);
}
catch(e){
dojo.debug(e);
return false;
}
};
dojo.hostenv.loadUri=function(uri,cb){
if(this.loadedUris[uri]){
return true;
}
var _33=this.getText(uri,null,true);
if(!_33){
return false;
}
this.loadedUris[uri]=true;
if(cb){
_33="("+_33+")";
}
var _34=dj_eval(_33);
if(cb){
cb(_34);
}
return true;
};
dojo.hostenv.loadUriAndCheck=function(uri,_36,cb){
var ok=true;
try{
ok=this.loadUri(uri,cb);
}
catch(e){
dojo.debug("failed loading ",uri," with error: ",e);
}
return Boolean(ok&&this.findModule(_36,false));
};
dojo.loaded=function(){
};
dojo.unloaded=function(){
};
dojo.hostenv.loaded=function(){
this.loadNotifying=true;
this.post_load_=true;
var mll=this.modulesLoadedListeners;
for(var x=0;x<mll.length;x++){
mll[x]();
}
this.modulesLoadedListeners=[];
this.loadNotifying=false;
dojo.loaded();
};
dojo.hostenv.unloaded=function(){
var mll=this.unloadListeners;
while(mll.length){
(mll.pop())();
}
dojo.unloaded();
};
dojo.addOnLoad=function(obj,_3d){
var dh=dojo.hostenv;
if(arguments.length==1){
dh.modulesLoadedListeners.push(obj);
}else{
if(arguments.length>1){
dh.modulesLoadedListeners.push(function(){
obj[_3d]();
});
}
}
if(dh.post_load_&&dh.inFlightCount==0&&!dh.loadNotifying){
dh.callLoaded();
}
};
dojo.addOnUnload=function(obj,_40){
var dh=dojo.hostenv;
if(arguments.length==1){
dh.unloadListeners.push(obj);
}else{
if(arguments.length>1){
dh.unloadListeners.push(function(){
obj[_40]();
});
}
}
};
dojo.hostenv.modulesLoaded=function(){
if(this.post_load_){
return;
}
if(this.loadUriStack.length==0&&this.getTextStack.length==0){
if(this.inFlightCount>0){
dojo.debug("files still in flight!");
return;
}
dojo.hostenv.callLoaded();
}
};
dojo.hostenv.callLoaded=function(){
if(typeof setTimeout=="object"){
setTimeout("dojo.hostenv.loaded();",0);
}else{
dojo.hostenv.loaded();
}
};
dojo.hostenv.getModuleSymbols=function(_42){
var _43=_42.split(".");
for(var i=_43.length;i>0;i--){
var _45=_43.slice(0,i).join(".");
if((i==1)&&!this.moduleHasPrefix(_45)){
_43[0]="../"+_43[0];
}else{
var _46=this.getModulePrefix(_45);
if(_46!=_45){
_43.splice(0,i,_46);
break;
}
}
}
return _43;
};
dojo.hostenv._global_omit_module_check=false;
dojo.hostenv.loadModule=function(_47,_48,_49){
if(!_47){
return;
}
_49=this._global_omit_module_check||_49;
var _4a=this.findModule(_47,false);
if(_4a){
return _4a;
}
if(dj_undef(_47,this.loading_modules_)){
this.addedToLoadingCount.push(_47);
}
this.loading_modules_[_47]=1;
var _4b=_47.replace(/\./g,"/")+".js";
var _4c=_47.split(".");
var _4d=this.getModuleSymbols(_47);
var _4e=((_4d[0].charAt(0)!="/")&&!_4d[0].match(/^\w+:/));
var _4f=_4d[_4d.length-1];
var ok;
if(_4f=="*"){
_47=_4c.slice(0,-1).join(".");
while(_4d.length){
_4d.pop();
_4d.push(this.pkgFileName);
_4b=_4d.join("/")+".js";
if(_4e&&_4b.charAt(0)=="/"){
_4b=_4b.slice(1);
}
ok=this.loadPath(_4b,!_49?_47:null);
if(ok){
break;
}
_4d.pop();
}
}else{
_4b=_4d.join("/")+".js";
_47=_4c.join(".");
var _51=!_49?_47:null;
ok=this.loadPath(_4b,_51);
if(!ok&&!_48){
_4d.pop();
while(_4d.length){
_4b=_4d.join("/")+".js";
ok=this.loadPath(_4b,_51);
if(ok){
break;
}
_4d.pop();
_4b=_4d.join("/")+"/"+this.pkgFileName+".js";
if(_4e&&_4b.charAt(0)=="/"){
_4b=_4b.slice(1);
}
ok=this.loadPath(_4b,_51);
if(ok){
break;
}
}
}
if(!ok&&!_49){
dojo.raise("Could not load '"+_47+"'; last tried '"+_4b+"'");
}
}
if(!_49&&!this["isXDomain"]){
_4a=this.findModule(_47,false);
if(!_4a){
dojo.raise("symbol '"+_47+"' is not defined after loading '"+_4b+"'");
}
}
return _4a;
};
dojo.hostenv.startPackage=function(_52){
var _53=String(_52);
var _54=_53;
var _55=_52.split(/\./);
if(_55[_55.length-1]=="*"){
_55.pop();
_54=_55.join(".");
}
var _56=dojo.evalObjPath(_54,true);
this.loaded_modules_[_53]=_56;
this.loaded_modules_[_54]=_56;
return _56;
};
dojo.hostenv.findModule=function(_57,_58){
var lmn=String(_57);
if(this.loaded_modules_[lmn]){
return this.loaded_modules_[lmn];
}
if(_58){
dojo.raise("no loaded module named '"+_57+"'");
}
return null;
};
dojo.kwCompoundRequire=function(_5a){
var _5b=_5a["common"]||[];
var _5c=_5a[dojo.hostenv.name_]?_5b.concat(_5a[dojo.hostenv.name_]||[]):_5b.concat(_5a["default"]||[]);
for(var x=0;x<_5c.length;x++){
var _5e=_5c[x];
if(_5e.constructor==Array){
dojo.hostenv.loadModule.apply(dojo.hostenv,_5e);
}else{
dojo.hostenv.loadModule(_5e);
}
}
};
dojo.require=function(_5f){
dojo.hostenv.loadModule.apply(dojo.hostenv,arguments);
};
dojo.requireIf=function(_60,_61){
var _62=arguments[0];
if((_62===true)||(_62=="common")||(_62&&dojo.render[_62].capable)){
var _63=[];
for(var i=1;i<arguments.length;i++){
_63.push(arguments[i]);
}
dojo.require.apply(dojo,_63);
}
};
dojo.requireAfterIf=dojo.requireIf;
dojo.provide=function(_65){
return dojo.hostenv.startPackage.apply(dojo.hostenv,arguments);
};
dojo.registerModulePath=function(_66,_67){
return dojo.hostenv.setModulePrefix(_66,_67);
};
if(djConfig["modulePaths"]){
for(var param in djConfig["modulePaths"]){
dojo.registerModulePath(param,djConfig["modulePaths"][param]);
}
}
dojo.setModulePrefix=function(_68,_69){
dojo.deprecated("dojo.setModulePrefix(\""+_68+"\", \""+_69+"\")","replaced by dojo.registerModulePath","0.5");
return dojo.registerModulePath(_68,_69);
};
dojo.exists=function(obj,_6b){
var p=_6b.split(".");
for(var i=0;i<p.length;i++){
if(!obj[p[i]]){
return false;
}
obj=obj[p[i]];
}
return true;
};
dojo.hostenv.normalizeLocale=function(_6e){
var _6f=_6e?_6e.toLowerCase():dojo.locale;
if(_6f=="root"){
_6f="ROOT";
}
return _6f;
};
dojo.hostenv.searchLocalePath=function(_70,_71,_72){
_70=dojo.hostenv.normalizeLocale(_70);
var _73=_70.split("-");
var _74=[];
for(var i=_73.length;i>0;i--){
_74.push(_73.slice(0,i).join("-"));
}
_74.push(false);
if(_71){
_74.reverse();
}
for(var j=_74.length-1;j>=0;j--){
var loc=_74[j]||"ROOT";
var _78=_72(loc);
if(_78){
break;
}
}
};
dojo.hostenv.localesGenerated=["ROOT","es-es","es","it-it","pt-br","de","fr-fr","zh-cn","pt","en-us","zh","fr","zh-tw","it","en-gb","xx","de-de","ko-kr","ja-jp","ko","en","ja"];
dojo.hostenv.registerNlsPrefix=function(){
dojo.registerModulePath("nls","nls");
};
dojo.hostenv.preloadLocalizations=function(){
if(dojo.hostenv.localesGenerated){
dojo.hostenv.registerNlsPrefix();
function preload(_79){
_79=dojo.hostenv.normalizeLocale(_79);
dojo.hostenv.searchLocalePath(_79,true,function(loc){
for(var i=0;i<dojo.hostenv.localesGenerated.length;i++){
if(dojo.hostenv.localesGenerated[i]==loc){
dojo["require"]("nls.dojo_"+loc);
return true;
}
}
return false;
});
}
preload();
var _7c=djConfig.extraLocale||[];
for(var i=0;i<_7c.length;i++){
preload(_7c[i]);
}
}
dojo.hostenv.preloadLocalizations=function(){
};
};
dojo.requireLocalization=function(_7e,_7f,_80,_81){
dojo.hostenv.preloadLocalizations();
var _82=dojo.hostenv.normalizeLocale(_80);
var _83=[_7e,"nls",_7f].join(".");
var _84="";
if(_81){
var _85=_81.split(",");
for(var i=0;i<_85.length;i++){
if(_82.indexOf(_85[i])==0){
if(_85[i].length>_84.length){
_84=_85[i];
}
}
}
if(!_84){
_84="ROOT";
}
}
var _87=_81?_84:_82;
var _88=dojo.hostenv.findModule(_83);
var _89=null;
if(_88){
if(djConfig.localizationComplete&&_88._built){
return;
}
var _8a=_87.replace("-","_");
var _8b=_83+"."+_8a;
_89=dojo.hostenv.findModule(_8b);
}
if(!_89){
_88=dojo.hostenv.startPackage(_83);
var _8c=dojo.hostenv.getModuleSymbols(_7e);
var _8d=_8c.concat("nls").join("/");
var _8e;
dojo.hostenv.searchLocalePath(_87,_81,function(loc){
var _90=loc.replace("-","_");
var _91=_83+"."+_90;
var _92=false;
if(!dojo.hostenv.findModule(_91)){
dojo.hostenv.startPackage(_91);
var _93=[_8d];
if(loc!="ROOT"){
_93.push(loc);
}
_93.push(_7f);
var _94=_93.join("/")+".js";
_92=dojo.hostenv.loadPath(_94,null,function(_95){
var _96=function(){
};
_96.prototype=_8e;
_88[_90]=new _96();
for(var j in _95){
_88[_90][j]=_95[j];
}
});
}else{
_92=true;
}
if(_92&&_88[_90]){
_8e=_88[_90];
}else{
_88[_90]=_8e;
}
if(_81){
return true;
}
});
}
if(_81&&_82!=_84){
_88[_82.replace("-","_")]=_88[_84.replace("-","_")];
}
};
(function(){
var _98=djConfig.extraLocale;
if(_98){
if(!_98 instanceof Array){
_98=[_98];
}
var req=dojo.requireLocalization;
dojo.requireLocalization=function(m,b,_9c,_9d){
req(m,b,_9c,_9d);
if(_9c){
return;
}
for(var i=0;i<_98.length;i++){
req(m,b,_98[i],_9d);
}
};
}
})();
}
if(typeof window!="undefined"){
(function(){
if(djConfig.allowQueryConfig){
var _9f=document.location.toString();
var _a0=_9f.split("?",2);
if(_a0.length>1){
var _a1=_a0[1];
var _a2=_a1.split("&");
for(var x in _a2){
var sp=_a2[x].split("=");
if((sp[0].length>9)&&(sp[0].substr(0,9)=="djConfig.")){
var opt=sp[0].substr(9);
try{
djConfig[opt]=eval(sp[1]);
}
catch(e){
djConfig[opt]=sp[1];
}
}
}
}
}
if(((djConfig["baseScriptUri"]=="")||(djConfig["baseRelativePath"]==""))&&(document&&document.getElementsByTagName)){
var _a6=document.getElementsByTagName("script");
var _a7=/(__package__|dojo|bootstrap1)\.js([\?\.]|$)/i;
for(var i=0;i<_a6.length;i++){
var src=_a6[i].getAttribute("src");
if(!src){
continue;
}
var m=src.match(_a7);
if(m){
var _ab=src.substring(0,m.index);
if(src.indexOf("bootstrap1")>-1){
_ab+="../";
}
if(!this["djConfig"]){
djConfig={};
}
if(djConfig["baseScriptUri"]==""){
djConfig["baseScriptUri"]=_ab;
}
if(djConfig["baseRelativePath"]==""){
djConfig["baseRelativePath"]=_ab;
}
break;
}
}
}
var dr=dojo.render;
var drh=dojo.render.html;
var drs=dojo.render.svg;
var dua=(drh.UA=navigator.userAgent);
var dav=(drh.AV=navigator.appVersion);
var t=true;
var f=false;
drh.capable=t;
drh.support.builtin=t;
dr.ver=parseFloat(drh.AV);
dr.os.mac=dav.indexOf("Macintosh")>=0;
dr.os.win=dav.indexOf("Windows")>=0;
dr.os.linux=dav.indexOf("X11")>=0;
drh.opera=dua.indexOf("Opera")>=0;
drh.khtml=(dav.indexOf("Konqueror")>=0)||(dav.indexOf("Safari")>=0);
drh.safari=dav.indexOf("Safari")>=0;
var _b3=dua.indexOf("Gecko");
drh.mozilla=drh.moz=(_b3>=0)&&(!drh.khtml);
if(drh.mozilla){
drh.geckoVersion=dua.substring(_b3+6,_b3+14);
}
drh.ie=(document.all)&&(!drh.opera);
drh.ie50=drh.ie&&dav.indexOf("MSIE 5.0")>=0;
drh.ie55=drh.ie&&dav.indexOf("MSIE 5.5")>=0;
drh.ie60=drh.ie&&dav.indexOf("MSIE 6.0")>=0;
drh.ie70=drh.ie&&dav.indexOf("MSIE 7.0")>=0;
var cm=document["compatMode"];
drh.quirks=(cm=="BackCompat")||(cm=="QuirksMode")||drh.ie55||drh.ie50;
dojo.locale=dojo.locale||(drh.ie?navigator.userLanguage:navigator.language).toLowerCase();
dr.vml.capable=drh.ie;
drs.capable=f;
drs.support.plugin=f;
drs.support.builtin=f;
var _b5=window["document"];
var tdi=_b5["implementation"];
if((tdi)&&(tdi["hasFeature"])&&(tdi.hasFeature("org.w3c.dom.svg","1.0"))){
drs.capable=t;
drs.support.builtin=t;
drs.support.plugin=f;
}
if(drh.safari){
var tmp=dua.split("AppleWebKit/")[1];
var ver=parseFloat(tmp.split(" ")[0]);
if(ver>=420){
drs.capable=t;
drs.support.builtin=t;
drs.support.plugin=f;
}
}else{
}
})();
dojo.hostenv.startPackage("dojo.hostenv");
dojo.render.name=dojo.hostenv.name_="browser";
dojo.hostenv.searchIds=[];
dojo.hostenv._XMLHTTP_PROGIDS=["Msxml2.XMLHTTP","Microsoft.XMLHTTP","Msxml2.XMLHTTP.4.0"];
dojo.hostenv.getXmlhttpObject=function(){
var _b9=null;
var _ba=null;
try{
_b9=new XMLHttpRequest();
}
catch(e){
}
if(!_b9){
for(var i=0;i<3;++i){
var _bc=dojo.hostenv._XMLHTTP_PROGIDS[i];
try{
_b9=new ActiveXObject(_bc);
}
catch(e){
_ba=e;
}
if(_b9){
dojo.hostenv._XMLHTTP_PROGIDS=[_bc];
break;
}
}
}
if(!_b9){
return dojo.raise("XMLHTTP not available",_ba);
}
return _b9;
};
dojo.hostenv._blockAsync=false;
dojo.hostenv.getText=function(uri,_be,_bf){
if(!_be){
this._blockAsync=true;
}
var _c0=this.getXmlhttpObject();
function isDocumentOk(_c1){
var _c2=_c1["status"];
return Boolean((!_c2)||((200<=_c2)&&(300>_c2))||(_c2==304));
}
if(_be){
var _c3=this,_c4=null,gbl=dojo.global();
var xhr=dojo.evalObjPath("dojo.io.XMLHTTPTransport");
_c0.onreadystatechange=function(){
if(_c4){
gbl.clearTimeout(_c4);
_c4=null;
}
if(_c3._blockAsync||(xhr&&xhr._blockAsync)){
_c4=gbl.setTimeout(function(){
_c0.onreadystatechange.apply(this);
},10);
}else{
if(4==_c0.readyState){
if(isDocumentOk(_c0)){
_be(_c0.responseText);
}
}
}
};
}
_c0.open("GET",uri,_be?true:false);
try{
_c0.send(null);
if(_be){
return null;
}
if(!isDocumentOk(_c0)){
var err=Error("Unable to load "+uri+" status:"+_c0.status);
err.status=_c0.status;
err.responseText=_c0.responseText;
throw err;
}
}
catch(e){
this._blockAsync=false;
if((_bf)&&(!_be)){
return null;
}else{
throw e;
}
}
this._blockAsync=false;
return _c0.responseText;
};
dojo.hostenv.defaultDebugContainerId="dojoDebug";
dojo.hostenv._println_buffer=[];
dojo.hostenv._println_safe=false;
dojo.hostenv.println=function(_c8){
if(!dojo.hostenv._println_safe){
dojo.hostenv._println_buffer.push(_c8);
}else{
try{
var _c9=document.getElementById(djConfig.debugContainerId?djConfig.debugContainerId:dojo.hostenv.defaultDebugContainerId);
if(!_c9){
_c9=dojo.body();
}
var div=document.createElement("div");
div.appendChild(document.createTextNode(_c8));
_c9.appendChild(div);
}
catch(e){
try{
document.write("<div>"+_c8+"</div>");
}
catch(e2){
window.status=_c8;
}
}
}
};
dojo.addOnLoad(function(){
dojo.hostenv._println_safe=true;
while(dojo.hostenv._println_buffer.length>0){
dojo.hostenv.println(dojo.hostenv._println_buffer.shift());
}
});
function dj_addNodeEvtHdlr(_cb,_cc,fp){
var _ce=_cb["on"+_cc]||function(){
};
_cb["on"+_cc]=function(){
fp.apply(_cb,arguments);
_ce.apply(_cb,arguments);
};
return true;
}
function dj_load_init(e){
var _d0=(e&&e.type)?e.type.toLowerCase():"load";
if(arguments.callee.initialized||(_d0!="domcontentloaded"&&_d0!="load")){
return;
}
arguments.callee.initialized=true;
if(typeof (_timer)!="undefined"){
clearInterval(_timer);
delete _timer;
}
var _d1=function(){
if(dojo.render.html.ie){
dojo.hostenv.makeWidgets();
}
};
if(dojo.hostenv.inFlightCount==0){
_d1();
dojo.hostenv.modulesLoaded();
}else{
dojo.hostenv.modulesLoadedListeners.unshift(_d1);
}
}
if(document.addEventListener){
if(dojo.render.html.opera||(dojo.render.html.moz&&(djConfig["enableMozDomContentLoaded"]===true))){
document.addEventListener("DOMContentLoaded",dj_load_init,null);
}
window.addEventListener("load",dj_load_init,null);
}
if(dojo.render.html.ie&&dojo.render.os.win){
document.attachEvent("onreadystatechange",function(e){
if(document.readyState=="complete"){
dj_load_init();
}
});
}
if(/(WebKit|khtml)/i.test(navigator.userAgent)){
var _timer=setInterval(function(){
if(/loaded|complete/.test(document.readyState)){
dj_load_init();
}
},10);
}
if(dojo.render.html.ie){
dj_addNodeEvtHdlr(window,"beforeunload",function(){
dojo.hostenv._unloading=true;
window.setTimeout(function(){
dojo.hostenv._unloading=false;
},0);
});
}
dj_addNodeEvtHdlr(window,"unload",function(){
dojo.hostenv.unloaded();
if((!dojo.render.html.ie)||(dojo.render.html.ie&&dojo.hostenv._unloading)){
dojo.hostenv.unloaded();
}
});
dojo.hostenv.makeWidgets=function(){
var _d3=[];
if(djConfig.searchIds&&djConfig.searchIds.length>0){
_d3=_d3.concat(djConfig.searchIds);
}
if(dojo.hostenv.searchIds&&dojo.hostenv.searchIds.length>0){
_d3=_d3.concat(dojo.hostenv.searchIds);
}
if((djConfig.parseWidgets)||(_d3.length>0)){
if(dojo.evalObjPath("dojo.widget.Parse")){
var _d4=new dojo.xml.Parse();
if(_d3.length>0){
for(var x=0;x<_d3.length;x++){
var _d6=document.getElementById(_d3[x]);
if(!_d6){
continue;
}
var _d7=_d4.parseElement(_d6,null,true);
dojo.widget.getParser().createComponents(_d7);
}
}else{
if(djConfig.parseWidgets){
var _d7=_d4.parseElement(dojo.body(),null,true);
dojo.widget.getParser().createComponents(_d7);
}
}
}
}
};
dojo.addOnLoad(function(){
if(!dojo.render.html.ie){
dojo.hostenv.makeWidgets();
}
});
try{
if(dojo.render.html.ie){
document.namespaces.add("v","urn:schemas-microsoft-com:vml");
document.createStyleSheet().addRule("v\\:*","behavior:url(#default#VML)");
}
}
catch(e){
}
dojo.hostenv.writeIncludes=function(){
};
if(!dj_undef("document",this)){
dj_currentDocument=this.document;
}
dojo.doc=function(){
return dj_currentDocument;
};
dojo.body=function(){
return dojo.doc().body||dojo.doc().getElementsByTagName("body")[0];
};
dojo.byId=function(id,doc){
if((id)&&((typeof id=="string")||(id instanceof String))){
if(!doc){
doc=dj_currentDocument;
}
var ele=doc.getElementById(id);
if(ele&&(ele.id!=id)&&doc.all){
ele=null;
eles=doc.all[id];
if(eles){
if(eles.length){
for(var i=0;i<eles.length;i++){
if(eles[i].id==id){
ele=eles[i];
break;
}
}
}else{
ele=eles;
}
}
}
return ele;
}
return id;
};
dojo.setContext=function(_dc,_dd){
dj_currentContext=_dc;
dj_currentDocument=_dd;
};
dojo._fireCallback=function(_de,_df,_e0){
if((_df)&&((typeof _de=="string")||(_de instanceof String))){
_de=_df[_de];
}
return (_df?_de.apply(_df,_e0||[]):_de());
};
dojo.withGlobal=function(_e1,_e2,_e3,_e4){
var _e5;
var _e6=dj_currentContext;
var _e7=dj_currentDocument;
try{
dojo.setContext(_e1,_e1.document);
_e5=dojo._fireCallback(_e2,_e3,_e4);
}
finally{
dojo.setContext(_e6,_e7);
}
return _e5;
};
dojo.withDoc=function(_e8,_e9,_ea,_eb){
var _ec;
var _ed=dj_currentDocument;
try{
dj_currentDocument=_e8;
_ec=dojo._fireCallback(_e9,_ea,_eb);
}
finally{
dj_currentDocument=_ed;
}
return _ec;
};
}
dojo.requireIf((djConfig["isDebug"]||djConfig["debugAtAllCosts"]),"dojo.debug");
dojo.requireIf(djConfig["debugAtAllCosts"]&&!window.widget&&!djConfig["useXDomain"],"dojo.browser_debug");
dojo.requireIf(djConfig["debugAtAllCosts"]&&!window.widget&&djConfig["useXDomain"],"dojo.browser_debug_xd");
dojo.provide("dojo.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 _ef=dojo.doc();
do{
var id="dj_unique_"+(++arguments.callee._idIncrement);
}while(_ef.getElementById(id));
return id;
};
dojo.dom.getUniqueId._idIncrement=0;
dojo.dom.firstElement=dojo.dom.getFirstChildElement=function(_f1,_f2){
var _f3=_f1.firstChild;
while(_f3&&_f3.nodeType!=dojo.dom.ELEMENT_NODE){
_f3=_f3.nextSibling;
}
if(_f2&&_f3&&_f3.tagName&&_f3.tagName.toLowerCase()!=_f2.toLowerCase()){
_f3=dojo.dom.nextElement(_f3,_f2);
}
return _f3;
};
dojo.dom.lastElement=dojo.dom.getLastChildElement=function(_f4,_f5){
var _f6=_f4.lastChild;
while(_f6&&_f6.nodeType!=dojo.dom.ELEMENT_NODE){
_f6=_f6.previousSibling;
}
if(_f5&&_f6&&_f6.tagName&&_f6.tagName.toLowerCase()!=_f5.toLowerCase()){
_f6=dojo.dom.prevElement(_f6,_f5);
}
return _f6;
};
dojo.dom.nextElement=dojo.dom.getNextSiblingElement=function(_f7,_f8){
if(!_f7){
return null;
}
do{
_f7=_f7.nextSibling;
}while(_f7&&_f7.nodeType!=dojo.dom.ELEMENT_NODE);
if(_f7&&_f8&&_f8.toLowerCase()!=_f7.tagName.toLowerCase()){
return dojo.dom.nextElement(_f7,_f8);
}
return _f7;
};
dojo.dom.prevElement=dojo.dom.getPreviousSiblingElement=function(_f9,_fa){
if(!_f9){
return null;
}
if(_fa){
_fa=_fa.toLowerCase();
}
do{
_f9=_f9.previousSibling;
}while(_f9&&_f9.nodeType!=dojo.dom.ELEMENT_NODE);
if(_f9&&_fa&&_fa.toLowerCase()!=_f9.tagName.toLowerCase()){
return dojo.dom.prevElement(_f9,_fa);
}
return _f9;
};
dojo.dom.moveChildren=function(_fb,_fc,_fd){
var _fe=0;
if(_fd){
while(_fb.hasChildNodes()&&_fb.firstChild.nodeType==dojo.dom.TEXT_NODE){
_fb.removeChild(_fb.firstChild);
}
while(_fb.hasChildNodes()&&_fb.lastChild.nodeType==dojo.dom.TEXT_NODE){
_fb.removeChild(_fb.lastChild);
}
}
while(_fb.hasChildNodes()){
_fc.appendChild(_fb.firstChild);
_fe++;
}
return _fe;
};
dojo.dom.copyChildren=function(_ff,_100,trim){
var _102=_ff.cloneNode(true);
return this.moveChildren(_102,_100,trim);
};
dojo.dom.replaceChildren=function(node,_104){
var _105=[];
if(dojo.render.html.ie){
for(var i=0;i<node.childNodes.length;i++){
_105.push(node.childNodes[i]);
}
}
dojo.dom.removeChildren(node);
node.appendChild(_104);
for(var i=0;i<_105.length;i++){
dojo.dom.destroyNode(_105[i]);
}
};
dojo.dom.removeChildren=function(node){
var _108=node.childNodes.length;
while(node.hasChildNodes()){
dojo.dom.removeNode(node.firstChild);
}
return _108;
};
dojo.dom.replaceNode=function(node,_10a){
return node.parentNode.replaceChild(_10a,node);
};
dojo.dom.destroyNode=function(node){
if(node.parentNode){
node=dojo.dom.removeNode(node);
}
if(node.nodeType!=3){
if(dojo.evalObjPath("dojo.event.browser.clean",false)){
dojo.event.browser.clean(node);
}
if(dojo.render.html.ie){
node.outerHTML="";
}
}
};
dojo.dom.removeNode=function(node){
if(node&&node.parentNode){
return node.parentNode.removeChild(node);
}
};
dojo.dom.getAncestors=function(node,_10e,_10f){
var _110=[];
var _111=(_10e&&(_10e instanceof Function||typeof _10e=="function"));
while(node){
if(!_111||_10e(node)){
_110.push(node);
}
if(_10f&&_110.length>0){
return _110[0];
}
node=node.parentNode;
}
if(_10f){
return null;
}
return _110;
};
dojo.dom.getAncestorsByTag=function(node,tag,_114){
tag=tag.toLowerCase();
return dojo.dom.getAncestors(node,function(el){
return ((el.tagName)&&(el.tagName.toLowerCase()==tag));
},_114);
};
dojo.dom.getFirstAncestorByTag=function(node,tag){
return dojo.dom.getAncestorsByTag(node,tag,true);
};
dojo.dom.isDescendantOf=function(node,_119,_11a){
if(_11a&&node){
node=node.parentNode;
}
while(node){
if(node==_119){
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 _11d=dojo.doc();
if(!dj_undef("ActiveXObject")){
var _11e=["MSXML2","Microsoft","MSXML","MSXML3"];
for(var i=0;i<_11e.length;i++){
try{
doc=new ActiveXObject(_11e[i]+".XMLDOM");
}
catch(e){
}
if(doc){
break;
}
}
}else{
if((_11d.implementation)&&(_11d.implementation.createDocument)){
doc=_11d.implementation.createDocument("","",null);
}
}
return doc;
};
dojo.dom.createDocumentFromText=function(str,_121){
if(!_121){
_121="text/xml";
}
if(!dj_undef("DOMParser")){
var _122=new DOMParser();
return _122.parseFromString(str,_121);
}else{
if(!dj_undef("ActiveXObject")){
var _123=dojo.dom.createDocument();
if(_123){
_123.async=false;
_123.loadXML(str);
return _123;
}else{
dojo.debug("toXml didn't work?");
}
}else{
var _124=dojo.doc();
if(_124.createElement){
var tmp=_124.createElement("xml");
tmp.innerHTML=str;
if(_124.implementation&&_124.implementation.createDocument){
var _126=_124.implementation.createDocument("foo","",null);
for(var i=0;i<tmp.childNodes.length;i++){
_126.importNode(tmp.childNodes.item(i),true);
}
return _126;
}
return ((tmp.document)&&(tmp.document.firstChild?tmp.document.firstChild:tmp));
}
}
}
return null;
};
dojo.dom.prependChild=function(node,_129){
if(_129.firstChild){
_129.insertBefore(node,_129.firstChild);
}else{
_129.appendChild(node);
}
return true;
};
dojo.dom.insertBefore=function(node,ref,_12c){
if((_12c!=true)&&(node===ref||node.nextSibling===ref)){
return false;
}
var _12d=ref.parentNode;
_12d.insertBefore(node,ref);
return true;
};
dojo.dom.insertAfter=function(node,ref,_130){
var pn=ref.parentNode;
if(ref==pn.lastChild){
if((_130!=true)&&(node===ref)){
return false;
}
pn.appendChild(node);
}else{
return this.insertBefore(node,ref.nextSibling,_130);
}
return true;
};
dojo.dom.insertAtPosition=function(node,ref,_134){
if((!node)||(!ref)||(!_134)){
return false;
}
switch(_134.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,_136,_137){
var _138=_136.childNodes;
if(!_138.length||_138.length==_137){
_136.appendChild(node);
return true;
}
if(_137==0){
return dojo.dom.prependChild(node,_136);
}
return dojo.dom.insertAfter(node,_138[_137-1]);
};
dojo.dom.textContent=function(node,text){
if(arguments.length>1){
var _13b=dojo.doc();
dojo.dom.replaceChildren(node,_13b.createTextNode(text));
return text;
}else{
if(node.textContent!=undefined){
return node.textContent;
}
var _13c="";
if(node==null){
return _13c;
}
for(var i=0;i<node.childNodes.length;i++){
switch(node.childNodes[i].nodeType){
case 1:
case 5:
_13c+=dojo.dom.textContent(node.childNodes[i]);
break;
case 3:
case 2:
case 4:
_13c+=node.childNodes[i].nodeValue;
break;
default:
break;
}
}
return _13c;
}
};
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,_142,_143,_144){
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(_142,_143,_144);
}else{
var _145=elem.ownerDocument;
var _146=_145.createNode(2,_143,_142);
_146.nodeValue=_144;
elem.setAttributeNode(_146);
}
};
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 _14a=getTagName(node);
if(!_14a){
return "";
}
if((dojo.widget)&&(dojo.widget.tags[_14a])){
return _14a;
}
var p=_14a.indexOf(":");
if(p>=0){
return _14a;
}
if(_14a.substr(0,5)=="dojo:"){
return _14a;
}
if(dojo.render.html.capable&&dojo.render.html.ie&&node.scopeName!="HTML"){
return node.scopeName.toLowerCase()+":"+_14a;
}
if(_14a.substr(0,4)=="dojo"){
return "dojo:"+_14a.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 _14d=node.className||node.getAttribute("class");
if((_14d)&&(_14d.indexOf)&&(_14d.indexOf("dojo-")!=-1)){
var _14e=_14d.split(" ");
for(var x=0,c=_14e.length;x<c;x++){
if(_14e[x].slice(0,5)=="dojo-"){
return "dojo:"+_14e[x].substr(5).toLowerCase();
}
}
}
}
return "";
}
this.parseElement=function(node,_152,_153,_154){
var _155=getTagName(node);
if(isIE&&_155.indexOf("/")==0){
return null;
}
try{
var attr=node.getAttribute("parseWidgets");
if(attr&&attr.toLowerCase()=="false"){
return {};
}
}
catch(e){
}
var _157=true;
if(_153){
var _158=getDojoTagName(node);
_155=_158||_155;
_157=Boolean(_158);
}
var _159={};
_159[_155]=[];
var pos=_155.indexOf(":");
if(pos>0){
var ns=_155.substring(0,pos);
_159["ns"]=ns;
if((dojo.ns)&&(!dojo.ns.allow(ns))){
_157=false;
}
}
if(_157){
var _15c=this.parseAttributes(node);
for(var attr in _15c){
if((!_159[_155][attr])||(typeof _159[_155][attr]!="array")){
_159[_155][attr]=[];
}
_159[_155][attr].push(_15c[attr]);
}
_159[_155].nodeRef=node;
_159.tagName=_155;
_159.index=_154||0;
}
var _15d=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(!_159[ctn]){
_159[ctn]=[];
}
_159[ctn].push(this.parseElement(tcn,true,_153,_15d));
if((tcn.childNodes.length==1)&&(tcn.childNodes.item(0).nodeType==dojo.dom.TEXT_NODE)){
_159[ctn][_159[ctn].length-1].value=tcn.childNodes.item(0).nodeValue;
}
_15d++;
break;
case dojo.dom.TEXT_NODE:
if(node.childNodes.length==1){
_159[_155].push({value:node.childNodes.item(0).nodeValue});
}
break;
default:
break;
}
}
return _159;
};
this.parseAttributes=function(node){
var _162={};
var atts=node.attributes;
var _164,i=0;
while((_164=atts[i++])){
if(isIE){
if(!_164){
continue;
}
if((typeof _164=="object")&&(typeof _164.nodeValue=="undefined")||(_164.nodeValue==null)||(_164.nodeValue=="")){
continue;
}
}
var nn=_164.nodeName.split(":");
nn=(nn.length==2)?nn[1]:_164.nodeName;
_162[nn]={value:_164.nodeValue};
}
return _162;
};
};
dojo.provide("dojo.lang.common");
dojo.lang.inherits=function(_167,_168){
if(!dojo.lang.isFunction(_168)){
dojo.raise("dojo.inherits: superclass argument ["+_168+"] must be a function (subclass: ["+_167+"']");
}
_167.prototype=new _168();
_167.prototype.constructor=_167;
_167.superclass=_168.prototype;
_167["super"]=_168.prototype;
};
dojo.lang._mixin=function(obj,_16a){
var tobj={};
for(var x in _16a){
if((typeof tobj[x]=="undefined")||(tobj[x]!=_16a[x])){
obj[x]=_16a[x];
}
}
if(dojo.render.html.ie&&(typeof (_16a["toString"])=="function")&&(_16a["toString"]!=obj["toString"])&&(_16a["toString"]!=tobj["toString"])){
obj.toString=_16a.toString;
}
return obj;
};
dojo.lang.mixin=function(obj,_16e){
for(var i=1,l=arguments.length;i<l;i++){
dojo.lang._mixin(obj,arguments[i]);
}
return obj;
};
dojo.lang.extend=function(_171,_172){
for(var i=1,l=arguments.length;i<l;i++){
dojo.lang._mixin(_171.prototype,arguments[i]);
}
return _171;
};
dojo.inherits=dojo.lang.inherits;
dojo.mixin=dojo.lang.mixin;
dojo.extend=dojo.lang.extend;
dojo.lang.find=function(_175,_176,_177,_178){
if(!dojo.lang.isArrayLike(_175)&&dojo.lang.isArrayLike(_176)){
dojo.deprecated("dojo.lang.find(value, array)","use dojo.lang.find(array, value) instead","0.5");
var temp=_175;
_175=_176;
_176=temp;
}
var _17a=dojo.lang.isString(_175);
if(_17a){
_175=_175.split("");
}
if(_178){
var step=-1;
var i=_175.length-1;
var end=-1;
}else{
var step=1;
var i=0;
var end=_175.length;
}
if(_177){
while(i!=end){
if(_175[i]===_176){
return i;
}
i+=step;
}
}else{
while(i!=end){
if(_175[i]==_176){
return i;
}
i+=step;
}
}
return -1;
};
dojo.lang.indexOf=dojo.lang.find;
dojo.lang.findLast=function(_17e,_17f,_180){
return dojo.lang.find(_17e,_17f,_180,true);
};
dojo.lang.lastIndexOf=dojo.lang.findLast;
dojo.lang.inArray=function(_181,_182){
return dojo.lang.find(_181,_182)>-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.func");
dojo.lang.hitch=function(_18d,_18e){
var fcn=(dojo.lang.isString(_18e)?_18d[_18e]:_18e)||function(){
};
return function(){
return fcn.apply(_18d,arguments);
};
};
dojo.lang.anonCtr=0;
dojo.lang.anon={};
dojo.lang.nameAnonFunc=function(_190,_191,_192){
var nso=(_191||dojo.lang.anon);
if((_192)||((dj_global["djConfig"])&&(djConfig["slowAnonFuncLookups"]==true))){
for(var x in nso){
try{
if(nso[x]===_190){
return x;
}
}
catch(e){
}
}
}
var ret="__"+dojo.lang.anonCtr++;
while(typeof nso[ret]!="undefined"){
ret="__"+dojo.lang.anonCtr++;
}
nso[ret]=_190;
return ret;
};
dojo.lang.forward=function(_196){
return function(){
return this[_196].apply(this,arguments);
};
};
dojo.lang.curry=function(_197,func){
var _199=[];
_197=_197||dj_global;
if(dojo.lang.isString(func)){
func=_197[func];
}
for(var x=2;x<arguments.length;x++){
_199.push(arguments[x]);
}
var _19b=(func["__preJoinArity"]||func.length)-_199.length;
function gather(_19c,_19d,_19e){
var _19f=_19e;
var _1a0=_19d.slice(0);
for(var x=0;x<_19c.length;x++){
_1a0.push(_19c[x]);
}
_19e=_19e-_19c.length;
if(_19e<=0){
var res=func.apply(_197,_1a0);
_19e=_19f;
return res;
}else{
return function(){
return gather(arguments,_1a0,_19e);
};
}
}
return gather([],_199,_19b);
};
dojo.lang.curryArguments=function(_1a3,func,args,_1a6){
var _1a7=[];
var x=_1a6||0;
for(x=_1a6;x<args.length;x++){
_1a7.push(args[x]);
}
return dojo.lang.curry.apply(dojo.lang,[_1a3,func].concat(_1a7));
};
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,_1ad,_1ae){
if(!farr.length){
if(typeof _1ae=="function"){
_1ae();
}
return;
}
if((typeof _1ad=="undefined")&&(typeof cb=="number")){
_1ad=cb;
cb=function(){
};
}else{
if(!cb){
cb=function(){
};
if(!_1ad){
_1ad=0;
}
}
}
setTimeout(function(){
(farr.shift())();
cb();
dojo.lang.delayThese(farr,cb,_1ad,_1ae);
},_1ad);
};
dojo.provide("dojo.lang.array");
dojo.lang.mixin(dojo.lang,{has:function(obj,name){
try{
return typeof obj[name]!="undefined";
}
catch(e){
return false;
}
},isEmpty:function(obj){
if(dojo.lang.isObject(obj)){
var tmp={};
var _1b3=0;
for(var x in obj){
if(obj[x]&&(!tmp[x])){
_1b3++;
break;
}
}
return _1b3==0;
}else{
if(dojo.lang.isArrayLike(obj)||dojo.lang.isString(obj)){
return obj.length==0;
}
}
},map:function(arr,obj,_1b7){
var _1b8=dojo.lang.isString(arr);
if(_1b8){
arr=arr.split("");
}
if(dojo.lang.isFunction(obj)&&(!_1b7)){
_1b7=obj;
obj=dj_global;
}else{
if(dojo.lang.isFunction(obj)&&_1b7){
var _1b9=obj;
obj=_1b7;
_1b7=_1b9;
}
}
if(Array.map){
var _1ba=Array.map(arr,_1b7,obj);
}else{
var _1ba=[];
for(var i=0;i<arr.length;++i){
_1ba.push(_1b7.call(obj,arr[i]));
}
}
if(_1b8){
return _1ba.join("");
}else{
return _1ba;
}
},reduce:function(arr,_1bd,obj,_1bf){
var _1c0=_1bd;
if(arguments.length==2){
_1bf=_1bd;
_1c0=arr[0];
arr=arr.slice(1);
}else{
if(arguments.length==3){
if(dojo.lang.isFunction(obj)){
_1bf=obj;
obj=null;
}
}else{
if(dojo.lang.isFunction(obj)){
var tmp=_1bf;
_1bf=obj;
obj=tmp;
}
}
}
var ob=obj||dj_global;
dojo.lang.map(arr,function(val){
_1c0=_1bf.call(ob,_1c0,val);
});
return _1c0;
},forEach:function(_1c4,_1c5,_1c6){
if(dojo.lang.isString(_1c4)){
_1c4=_1c4.split("");
}
if(Array.forEach){
Array.forEach(_1c4,_1c5,_1c6);
}else{
if(!_1c6){
_1c6=dj_global;
}
for(var i=0,l=_1c4.length;i<l;i++){
_1c5.call(_1c6,_1c4[i],i,_1c4);
}
}
},_everyOrSome:function(_1c9,arr,_1cb,_1cc){
if(dojo.lang.isString(arr)){
arr=arr.split("");
}
if(Array.every){
return Array[_1c9?"every":"some"](arr,_1cb,_1cc);
}else{
if(!_1cc){
_1cc=dj_global;
}
for(var i=0,l=arr.length;i<l;i++){
var _1cf=_1cb.call(_1cc,arr[i],i,arr);
if(_1c9&&!_1cf){
return false;
}else{
if((!_1c9)&&(_1cf)){
return true;
}
}
}
return Boolean(_1c9);
}
},every:function(arr,_1d1,_1d2){
return this._everyOrSome(true,arr,_1d1,_1d2);
},some:function(arr,_1d4,_1d5){
return this._everyOrSome(false,arr,_1d4,_1d5);
},filter:function(arr,_1d7,_1d8){
var _1d9=dojo.lang.isString(arr);
if(_1d9){
arr=arr.split("");
}
var _1da;
if(Array.filter){
_1da=Array.filter(arr,_1d7,_1d8);
}else{
if(!_1d8){
if(arguments.length>=3){
dojo.raise("thisObject doesn't exist!");
}
_1d8=dj_global;
}
_1da=[];
for(var i=0;i<arr.length;i++){
if(_1d7.call(_1d8,arr[i],i,arr)){
_1da.push(arr[i]);
}
}
}
if(_1d9){
return _1da.join("");
}else{
return _1da;
}
},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(_1df,_1e0){
var _1e1=[];
for(var i=_1e0||0;i<_1df.length;i++){
_1e1.push(_1df[i]);
}
return _1e1;
}});
dojo.provide("dojo.lang.extras");
dojo.lang.setTimeout=function(func,_1e4){
var _1e5=window,_1e6=2;
if(!dojo.lang.isFunction(func)){
_1e5=func;
func=_1e4;
_1e4=arguments[2];
_1e6++;
}
if(dojo.lang.isString(func)){
func=_1e5[func];
}
var args=[];
for(var i=_1e6;i<arguments.length;i++){
args.push(arguments[i]);
}
return dojo.global().setTimeout(function(){
func.apply(_1e5,args);
},_1e4);
};
dojo.lang.clearTimeout=function(_1e9){
dojo.global().clearTimeout(_1e9);
};
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(_1f2,_1f3,_1f4){
with(dojo.parseObjPath(_1f2,_1f3,_1f4)){
return dojo.evalProp(prop,obj,_1f4);
}
};
dojo.lang.setObjPathValue=function(_1f5,_1f6,_1f7,_1f8){
dojo.deprecated("dojo.lang.setObjPathValue","use dojo.parseObjPath and the '=' operator","0.6");
if(arguments.length<4){
_1f8=true;
}
with(dojo.parseObjPath(_1f5,_1f7,_1f8)){
if(obj&&(_1f8||(prop in obj))){
obj[prop]=_1f6;
}
}
};
dojo.provide("dojo.lang.declare");
dojo.lang.declare=function(_1f9,_1fa,init,_1fc){
if((dojo.lang.isFunction(_1fc))||((!_1fc)&&(!dojo.lang.isFunction(init)))){
var temp=_1fc;
_1fc=init;
init=temp;
}
var _1fe=[];
if(dojo.lang.isArray(_1fa)){
_1fe=_1fa;
_1fa=_1fe.shift();
}
if(!init){
init=dojo.evalObjPath(_1f9,false);
if((init)&&(!dojo.lang.isFunction(init))){
init=null;
}
}
var ctor=dojo.lang.declare._makeConstructor();
var scp=(_1fa?_1fa.prototype:null);
if(scp){
scp.prototyping=true;
ctor.prototype=new _1fa();
scp.prototyping=false;
}
ctor.superclass=scp;
ctor.mixins=_1fe;
for(var i=0,l=_1fe.length;i<l;i++){
dojo.lang.extend(ctor,_1fe[i].prototype);
}
ctor.prototype.initializer=null;
ctor.prototype.declaredClass=_1f9;
if(dojo.lang.isArray(_1fc)){
dojo.lang.extend.apply(dojo.lang,[ctor].concat(_1fc));
}else{
dojo.lang.extend(ctor,(_1fc)||{});
}
dojo.lang.extend(ctor,dojo.lang.declare._common);
ctor.prototype.constructor=ctor;
ctor.prototype.initializer=(ctor.prototype.initializer)||(init)||(function(){
});
var _203=dojo.parseObjPath(_1f9,null,true);
_203.obj[_203.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(_209,_20a,args){
var _20c,_20d=this.___proto;
this.___proto=_209;
try{
_20c=_209[_20a].apply(this,(args||[]));
}
catch(e){
throw e;
}
finally{
this.___proto=_20d;
}
return _20c;
},_inherited:function(prop,args){
var p=this._getPropContext();
do{
if((!p.constructor)||(!p.constructor.superclass)){
return;
}
p=p.constructor.superclass;
}while(!(prop in p));
return (dojo.lang.isFunction(p[prop])?this._contextMethod(p,prop,args):p[prop]);
},inherited:function(prop,args){
dojo.deprecated("'inherited' method is dangerous, do not up-call! 'inherited' is slated for removal in 0.5; name your super class (or use superclass property) instead.","0.5");
this._inherited(prop,args);
}};
dojo.declare=dojo.lang.declare;
dojo.provide("dojo.ns");
dojo.ns={namespaces:{},failed:{},loading:{},loaded:{},register:function(name,_214,_215,_216){
if(!_216||!this.namespaces[name]){
this.namespaces[name]=new dojo.ns.Ns(name,_214,_215);
}
},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,_21d,_21e){
this.name=name;
this.module=_21d;
this.resolver=_21e;
this._loaded=[];
this._failed=[];
};
dojo.ns.Ns.prototype.resolve=function(name,_220,_221){
if(!this.resolver||djConfig["skipAutoRequire"]){
return false;
}
var _222=this.resolver(name,_220);
if((_222)&&(!this._loaded[_222])&&(!this._failed[_222])){
var req=dojo.require;
req(_222,false,true);
if(dojo.hostenv.findModule(_222,false)){
this._loaded[_222]=true;
}else{
if(!_221){
dojo.raise("dojo.ns.Ns.resolve: module '"+_222+"' not found after loading via namespace '"+this.name+"'");
}
this._failed[_222]=true;
}
}
return Boolean(this._loaded[_222]);
};
dojo.registerNamespace=function(name,_225,_226){
dojo.ns.register.apply(dojo.ns,arguments);
};
dojo.registerNamespaceResolver=function(name,_228){
var n=dojo.ns.namespaces[name];
if(n){
n.resolver=_228;
}
};
dojo.registerNamespaceManifest=function(_22a,path,name,_22d,_22e){
dojo.registerModulePath(name,path);
dojo.registerNamespace(name,_22d,_22e);
};
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,_230){
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 _233=dl.nameAnonFunc(args[2],ao.adviceObj,_230);
ao.adviceFunc=_233;
}else{
if((dl.isFunction(args[0]))&&(dl.isObject(args[1]))&&(dl.isString(args[2]))){
ao.adviceType="after";
ao.srcObj=dj_global;
var _233=dl.nameAnonFunc(args[0],ao.srcObj,_230);
ao.srcFunc=_233;
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 _233=dl.nameAnonFunc(args[1],dj_global,_230);
ao.srcFunc=_233;
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 _233=dl.nameAnonFunc(args[3],dj_global,_230);
ao.adviceObj=dj_global;
ao.adviceFunc=_233;
}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 _233=dl.nameAnonFunc(ao.aroundFunc,ao.aroundObj,_230);
ao.aroundFunc=_233;
}
if(dl.isFunction(ao.srcFunc)){
ao.srcFunc=dl.getNameInObj(ao.srcObj,ao.srcFunc);
}
if(dl.isFunction(ao.adviceFunc)){
ao.adviceFunc=dl.getNameInObj(ao.adviceObj,ao.adviceFunc);
}
if((ao.aroundObj)&&(dl.isFunction(ao.aroundFunc))){
ao.aroundFunc=dl.getNameInObj(ao.aroundObj,ao.aroundFunc);
}
if(!ao.srcObj){
dojo.raise("bad srcObj for srcFunc: "+ao.srcFunc);
}
if(!ao.adviceObj){
dojo.raise("bad adviceObj for adviceFunc: "+ao.adviceFunc);
}
if(!ao.adviceFunc){
dojo.debug("bad adviceFunc for srcFunc: "+ao.srcFunc);
dojo.debugShallow(ao);
}
return ao;
}
this.connect=function(){
if(arguments.length==1){
var ao=arguments[0];
}else{
var ao=interpolateArgs(arguments,true);
}
if(dojo.lang.isArray(ao.srcObj)&&ao.srcObj!=""){
var _235={};
for(var x in ao){
_235[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);
}
_235.srcObj=src;
mjps.push(dojo.event.connect.call(dojo.event,_235));
});
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 _23d;
if((arguments.length==1)&&(typeof a1=="object")){
_23d=a1;
}else{
_23d={srcObj:a1,srcFunc:a2};
}
_23d.adviceFunc=function(){
var _23e=[];
for(var x=0;x<arguments.length;x++){
_23e.push(arguments[x]);
}
dojo.debug("("+_23d.srcObj+")."+_23d.srcFunc,":",_23e.join(", "));
};
this.kwConnect(_23d);
};
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(_246,_247){
var fn=(_247)?"disconnect":"connect";
if(typeof _246["srcFunc"]=="function"){
_246.srcObj=_246["srcObj"]||dj_global;
var _249=dojo.lang.nameAnonFunc(_246.srcFunc,_246.srcObj,true);
_246.srcFunc=_249;
}
if(typeof _246["adviceFunc"]=="function"){
_246.adviceObj=_246["adviceObj"]||dj_global;
var _249=dojo.lang.nameAnonFunc(_246.adviceFunc,_246.adviceObj,true);
_246.adviceFunc=_249;
}
_246.srcObj=_246["srcObj"]||dj_global;
_246.adviceObj=_246["adviceObj"]||_246["targetObj"]||dj_global;
_246.adviceFunc=_246["adviceFunc"]||_246["targetFunc"];
return dojo.event[fn](_246);
};
this.kwConnect=function(_24a){
return this._kwConnectImpl(_24a,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(_24d){
return this._kwConnectImpl(_24d,true);
};
};
dojo.event.MethodInvocation=function(_24e,obj,args){
this.jp_=_24e;
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,_256){
this.object=obj||dj_global;
this.methodname=_256;
this.methodfunc=this.object[_256];
this.squelch=false;
};
dojo.event.MethodJoinPoint.getForMethod=function(obj,_258){
if(!obj){
obj=dj_global;
}
var ofn=obj[_258];
if(!ofn){
ofn=obj[_258]=function(){
};
if(!obj[_258]){
dojo.raise("Cannot set do-nothing method on that object "+_258);
}
}else{
if((typeof ofn!="function")&&(!dojo.lang.isFunction(ofn))&&(!dojo.lang.isAlien(ofn))){
return null;
}
}
var _25a=_258+"$joinpoint";
var _25b=_258+"$joinpoint$method";
var _25c=obj[_25a];
if(!_25c){
var _25d=false;
if(dojo.event["browser"]){
if((obj["attachEvent"])||(obj["nodeType"])||(obj["addEventListener"])){
_25d=true;
dojo.event.browser.addClobberNodeAttrs(obj,[_25a,_25b,_258]);
}
}
var _25e=ofn.length;
obj[_25b]=ofn;
_25c=obj[_25a]=new dojo.event.MethodJoinPoint(obj,_25b);
if(!_25d){
obj[_258]=function(){
return _25c.run.apply(_25c,arguments);
};
}else{
obj[_258]=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 _25c.run.apply(_25c,args);
};
}
obj[_258].__preJoinArity=_25e;
}
return _25c;
};
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 _264=[];
for(var x=0;x<args.length;x++){
_264[x]=args[x];
}
var _266=function(marr){
if(!marr){
dojo.debug("Null argument to unrollAdvice()");
return;
}
var _268=marr[0]||dj_global;
var _269=marr[1];
if(!_268[_269]){
dojo.raise("function \""+_269+"\" does not exist on \""+_268+"\"");
}
var _26a=marr[2]||dj_global;
var _26b=marr[3];
var msg=marr[6];
var _26d=marr[7];
if(_26d>-1){
if(_26d==0){
return;
}
marr[7]--;
}
var _26e;
var to={args:[],jp_:this,object:obj,proceed:function(){
return _268[_269].apply(_268,to.args);
}};
to.args=_264;
var _270=parseInt(marr[4]);
var _271=((!isNaN(_270))&&(marr[4]!==null)&&(typeof marr[4]!="undefined"));
if(marr[5]){
var rate=parseInt(marr[5]);
var cur=new Date();
var _274=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;
_266(mcpy);
},tod);
}
return;
}else{
marr.last=cur;
}
}
if(_26b){
_26a[_26b].call(_26a,to);
}else{
if((_271)&&((dojo.render.html)||(dojo.render.svg))){
dj_global["setTimeout"](function(){
if(msg){
_268[_269].call(_268,to);
}else{
_268[_269].apply(_268,args);
}
},_270);
}else{
if(msg){
_268[_269].call(_268,to);
}else{
_268[_269].apply(_268,args);
}
}
}
};
var _277=function(){
if(this.squelch){
try{
return _266.apply(this,arguments);
}
catch(e){
dojo.debug(e);
}
}else{
return _266.apply(this,arguments);
}
};
if((this["before"])&&(this.before.length>0)){
dojo.lang.forEach(this.before.concat(new Array()),_277);
}
var _278;
try{
if((this["around"])&&(this.around.length>0)){
var mi=new dojo.event.MethodInvocation(this,obj,args);
_278=mi.proceed();
}else{
if(this.methodfunc){
_278=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()),_277);
}
return (this.methodfunc)?_278: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(_27d,_27e,_27f,_280,_281,_282,once,_284,rate,_286,_287){
var arr=this.getArr(_281);
if(!arr){
dojo.raise("bad this: "+this);
}
var ao=[_27d,_27e,_27f,_280,_284,rate,_286,_287];
if(once){
if(this.hasAdvice(_27d,_27e,_281,arr)>=0){
return;
}
}
if(_282=="first"){
arr.unshift(ao);
}else{
arr.push(ao);
}
},hasAdvice:function(_28a,_28b,_28c,arr){
if(!arr){
arr=this.getArr(_28c);
}
var ind=-1;
for(var x=0;x<arr.length;x++){
var aao=(typeof _28b=="object")?(new String(_28b)).toString():_28b;
var a1o=(typeof arr[x][1]=="object")?(new String(arr[x][1])).toString():arr[x][1];
if((arr[x][0]==_28a)&&(a1o==aao)){
ind=x;
}
}
return ind;
},removeAdvice:function(_292,_293,_294,once){
var arr=this.getArr(_294);
var ind=this.hasAdvice(_292,_293,_294,arr);
if(ind==-1){
return false;
}
while(ind!=-1){
arr.splice(ind,1);
if(once){
break;
}
ind=this.hasAdvice(_292,_293,_294,arr);
}
return true;
}});
dojo.provide("dojo.event.topic");
dojo.event.topic=new function(){
this.topics={};
this.getTopic=function(_298){
if(!this.topics[_298]){
this.topics[_298]=new this.TopicImpl(_298);
}
return this.topics[_298];
};
this.registerPublisher=function(_299,obj,_29b){
var _299=this.getTopic(_299);
_299.registerPublisher(obj,_29b);
};
this.subscribe=function(_29c,obj,_29e){
var _29c=this.getTopic(_29c);
_29c.subscribe(obj,_29e);
};
this.unsubscribe=function(_29f,obj,_2a1){
var _29f=this.getTopic(_29f);
_29f.unsubscribe(obj,_2a1);
};
this.destroy=function(_2a2){
this.getTopic(_2a2).destroy();
delete this.topics[_2a2];
};
this.publishApply=function(_2a3,args){
var _2a3=this.getTopic(_2a3);
_2a3.sendMessage.apply(_2a3,args);
};
this.publish=function(_2a5,_2a6){
var _2a5=this.getTopic(_2a5);
var args=[];
for(var x=1;x<arguments.length;x++){
args.push(arguments[x]);
}
_2a5.sendMessage.apply(_2a5,args);
};
};
dojo.event.topic.TopicImpl=function(_2a9){
this.topicName=_2a9;
this.subscribe=function(_2aa,_2ab){
var tf=_2ab||_2aa;
var to=(!_2ab)?dj_global:_2aa;
return dojo.event.kwConnect({srcObj:this,srcFunc:"sendMessage",adviceObj:to,adviceFunc:tf});
};
this.unsubscribe=function(_2ae,_2af){
var tf=(!_2af)?_2ae:_2af;
var to=(!_2af)?null:_2ae;
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(_2b2){
this._getJoinPoint().squelch=_2b2;
};
this.destroy=function(){
this._getJoinPoint().disconnect();
};
this.registerPublisher=function(_2b3,_2b4){
dojo.event.connect(_2b3,_2b4,this,"sendMessage");
};
this.sendMessage=function(_2b5){
};
};
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(_2b8){
var na;
var tna;
if(_2b8){
tna=_2b8.all||_2b8.getElementsByTagName("*");
na=[_2b8];
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 _2bc={};
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 _2c1=0;
this.normalizedEventName=function(_2c2){
switch(_2c2){
case "CheckboxStateChange":
case "DOMAttrModified":
case "DOMMenuItemActive":
case "DOMMenuItemInactive":
case "DOMMouseScroll":
case "DOMNodeInserted":
case "DOMNodeRemoved":
case "RadioStateChange":
return _2c2;
break;
default:
var lcn=_2c2.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,_2c7){
if(!dojo.render.html.ie){
return;
}
this.addClobberNode(node);
for(var x=0;x<_2c7.length;x++){
node.__clobberAttrs__.push(_2c7[x]);
}
};
this.removeListener=function(node,_2ca,fp,_2cc){
if(!_2cc){
var _2cc=false;
}
_2ca=dojo.event.browser.normalizedEventName(_2ca);
if(_2ca=="key"){
if(dojo.render.html.ie){
this.removeListener(node,"onkeydown",fp,_2cc);
}
_2ca="keypress";
}
if(node.removeEventListener){
node.removeEventListener(_2ca,fp,_2cc);
}
};
this.addListener=function(node,_2ce,fp,_2d0,_2d1){
if(!node){
return;
}
if(!_2d0){
var _2d0=false;
}
_2ce=dojo.event.browser.normalizedEventName(_2ce);
if(_2ce=="key"){
if(dojo.render.html.ie){
this.addListener(node,"onkeydown",fp,_2d0,_2d1);
}
_2ce="keypress";
}
if(!_2d1){
var _2d2=function(evt){
if(!evt){
evt=window.event;
}
var ret=fp(dojo.event.browser.fixEvent(evt,this));
if(_2d0){
dojo.event.browser.stopEvent(evt);
}
return ret;
};
}else{
_2d2=fp;
}
if(node.addEventListener){
node.addEventListener(_2ce,_2d2,_2d0);
return _2d2;
}else{
_2ce="on"+_2ce;
if(typeof node[_2ce]=="function"){
var _2d5=node[_2ce];
node[_2ce]=function(e){
_2d5(e);
return _2d2(e);
};
}else{
node[_2ce]=_2d2;
}
if(dojo.render.html.ie){
this.addClobberNodeAttrs(node,[_2ce]);
}
return _2d2;
}
};
this.isEvent=function(obj){
return (typeof obj!="undefined")&&(obj)&&(typeof Event!="undefined")&&(obj.eventPhase);
};
this.currentEvent=null;
this.callListener=function(_2d8,_2d9){
if(typeof _2d8!="function"){
dojo.raise("listener not a function: "+_2d8);
}
dojo.event.browser.currentEvent.currentTarget=_2d9;
return _2d8.call(_2d9,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,_2dc){
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 _2de=evt.keyCode;
if(_2de>=65&&_2de<=90&&evt.shiftKey==false){
_2de+=32;
}
if(_2de>=1&&_2de<=26&&evt.ctrlKey){
_2de+=96;
}
evt.key=String.fromCharCode(_2de);
}
}
}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 _2de=evt.which;
if((evt.ctrlKey||evt.altKey||evt.metaKey)&&(evt.which>=65&&evt.which<=90&&evt.shiftKey==false)){
_2de+=32;
}
evt.key=String.fromCharCode(_2de);
}
}
}
}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=(_2dc?_2dc: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 _2e0=((dojo.render.html.ie55)||(doc["compatMode"]=="BackCompat"))?doc.body:doc.documentElement;
if(!evt.pageX){
evt.pageX=evt.clientX+(_2e0.scrollLeft||0);
}
if(!evt.pageY){
evt.pageY=evt.clientY+(_2e0.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 _2e2={};
var _2e3=[];
this.getUniqueId=function(_2e4){
var _2e5;
do{
_2e5=_2e4+"_"+(_2e2[_2e4]!=undefined?++_2e2[_2e4]:_2e2[_2e4]=0);
}while(this.getWidgetById(_2e5));
return _2e5;
};
this.add=function(_2e6){
this.widgets.push(_2e6);
if(!_2e6.extraArgs["id"]){
_2e6.extraArgs["id"]=_2e6.extraArgs["ID"];
}
if(_2e6.widgetId==""){
if(_2e6["id"]){
_2e6.widgetId=_2e6["id"];
}else{
if(_2e6.extraArgs["id"]){
_2e6.widgetId=_2e6.extraArgs["id"];
}else{
_2e6.widgetId=this.getUniqueId(_2e6.ns+"_"+_2e6.widgetType);
}
}
}
if(this.widgetIds[_2e6.widgetId]){
dojo.debug("widget ID collision on ID: "+_2e6.widgetId);
}
this.widgetIds[_2e6.widgetId]=_2e6;
};
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(_2e8){
if(dojo.lang.isNumber(_2e8)){
var tw=this.widgets[_2e8].widgetId;
delete this.topWidgets[tw];
delete this.widgetIds[tw];
this.widgets.splice(_2e8,1);
}else{
this.removeById(_2e8);
}
};
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 _2ef=(type.indexOf(":")<0?function(x){
return x.widgetType.toLowerCase();
}:function(x){
return x.getNamespacedType();
});
var ret=[];
dojo.lang.forEach(this.widgets,function(x){
if(_2ef(x)==lt){
ret.push(x);
}
});
return ret;
};
this.getWidgetsByFilter=function(_2f4,_2f5){
var ret=[];
dojo.lang.every(this.widgets,function(x){
if(_2f4(x)){
ret.push(x);
if(_2f5){
return false;
}
}
return true;
});
return (_2f5?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 _2fb={};
var _2fc=["dojo.widget"];
for(var i=0;i<_2fc.length;i++){
_2fc[_2fc[i]]=true;
}
this.registerWidgetPackage=function(_2fe){
if(!_2fc[_2fe]){
_2fc[_2fe]=true;
_2fc.push(_2fe);
}
};
this.getWidgetPackageList=function(){
return dojo.lang.map(_2fc,function(elt){
return (elt!==true?elt:undefined);
});
};
this.getImplementation=function(_300,_301,_302,ns){
var impl=this.getImplementationName(_300,ns);
if(impl){
var ret=_301?new impl(_301):new impl();
return ret;
}
};
function buildPrefixCache(){
for(var _306 in dojo.render){
if(dojo.render[_306]["capable"]===true){
var _307=dojo.render[_306].prefixes;
for(var i=0;i<_307.length;i++){
_2e3.push(_307[i].toLowerCase());
}
}
}
}
var _309=function(_30a,_30b){
if(!_30b){
return null;
}
for(var i=0,l=_2e3.length,_30e;i<=l;i++){
_30e=(i<l?_30b[_2e3[i]]:_30b);
if(!_30e){
continue;
}
for(var name in _30e){
if(name.toLowerCase()==_30a){
return _30e[name];
}
}
}
return null;
};
var _310=function(_311,_312){
var _313=dojo.evalObjPath(_312,false);
return (_313?_309(_311,_313):null);
};
this.getImplementationName=function(_314,ns){
var _316=_314.toLowerCase();
ns=ns||"dojo";
var imps=_2fb[ns]||(_2fb[ns]={});
var impl=imps[_316];
if(impl){
return impl;
}
if(!_2e3.length){
buildPrefixCache();
}
var _319=dojo.ns.get(ns);
if(!_319){
dojo.ns.register(ns,ns+".widget");
_319=dojo.ns.get(ns);
}
if(_319){
_319.resolve(_314);
}
impl=_310(_316,_319.module);
if(impl){
return (imps[_316]=impl);
}
_319=dojo.ns.require(ns);
if((_319)&&(_319.resolver)){
_319.resolve(_314);
impl=_310(_316,_319.module);
if(impl){
return (imps[_316]=impl);
}
}
dojo.deprecated("dojo.widget.Manager.getImplementationName","Could not locate widget implementation for \""+_314+"\" in \""+_319.module+"\" registered to namespace \""+_319.name+"\". "+"Developers must specify correct namespaces for all non-Dojo widgets","0.5");
for(var i=0;i<_2fc.length;i++){
impl=_310(_316,_2fc[i]);
if(impl){
return (imps[_316]=impl);
}
}
throw new Error("Could not locate widget implementation for \""+_314+"\" in \""+_319.module+"\" registered to namespace \""+_319.name+"\"");
};
this.resizing=false;
this.onWindowResized=function(){
if(this.resizing){
return;
}
try{
this.resizing=true;
for(var id in this.topWidgets){
var _31c=this.topWidgets[id];
if(_31c.checkSize){
_31c.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(_321,_322){
dw[(_322||_321)]=h(_321);
};
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 _324=dwm.getAllWidgets.apply(dwm,arguments);
if(arguments.length>0){
return _324[n];
}
return _324;
};
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(_326,uri){
var loc=dojo.hostenv.getModuleSymbols(_326).join("/");
if(!loc){
return null;
}
if(loc.lastIndexOf("/")!=loc.length-1){
loc+="/";
}
var _329=loc.indexOf(":");
var _32a=loc.indexOf("/");
if(loc.charAt(0)!="/"&&(_329==-1||_329>_32a)){
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 _32d=new dojo.uri.Uri(arguments[i].toString());
var _32e=new dojo.uri.Uri(uri.toString());
if((_32d.path=="")&&(_32d.scheme==null)&&(_32d.authority==null)&&(_32d.query==null)){
if(_32d.fragment!=null){
_32e.fragment=_32d.fragment;
}
_32d=_32e;
}else{
if(_32d.scheme==null){
_32d.scheme=_32e.scheme;
if(_32d.authority==null){
_32d.authority=_32e.authority;
if(_32d.path.charAt(0)!="/"){
var path=_32e.path.substring(0,_32e.path.lastIndexOf("/")+1)+_32d.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;
}
}
}
}
_32d.path=segs.join("/");
}
}
}
}
uri="";
if(_32d.scheme!=null){
uri+=_32d.scheme+":";
}
if(_32d.authority!=null){
uri+="//"+_32d.authority;
}
uri+=_32d.path;
if(_32d.query!=null){
uri+="?"+_32d.query;
}
if(_32d.fragment!=null){
uri+="#"+_32d.fragment;
}
}
this.uri=uri.toString();
var _332="^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?$";
var r=this.uri.match(new RegExp(_332));
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){
_332="^((([^:]+:)?([^@]+))@)?([^:]*)(:([0-9]+))?$";
r=this.authority.match(new RegExp(_332));
this.user=r[3]||null;
this.password=r[4]||null;
this.host=r[5];
this.port=r[7]||null;
}
this.toString=function(){
return this.uri;
};
};
};
dojo.kwCompoundRequire({common:[["dojo.uri.Uri",false,false]]});
dojo.provide("dojo.uri.*");
dojo.provide("dojo.html.common");
dojo.lang.mixin(dojo.html,dojo.dom);
dojo.html.body=function(){
dojo.deprecated("dojo.html.body() moved to dojo.body()","0.5");
return dojo.body();
};
dojo.html.getEventTarget=function(evt){
if(!evt){
evt=dojo.global().event||{};
}
var t=(evt.srcElement?evt.srcElement:(evt.target?evt.target:null));
while((t)&&(t.nodeType!=1)){
t=t.parentNode;
}
return t;
};
dojo.html.getViewport=function(){
var _336=dojo.global();
var _337=dojo.doc();
var w=0;
var h=0;
if(dojo.render.html.mozilla){
w=_337.documentElement.clientWidth;
h=_336.innerHeight;
}else{
if(!dojo.render.html.opera&&_336.innerWidth){
w=_336.innerWidth;
h=_336.innerHeight;
}else{
if(!dojo.render.html.opera&&dojo.exists(_337,"documentElement.clientWidth")){
var w2=_337.documentElement.clientWidth;
if(!w||w2&&w2<w){
w=w2;
}
h=_337.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 _33b=dojo.global();
var _33c=dojo.doc();
var top=_33b.pageYOffset||_33c.documentElement.scrollTop||dojo.body().scrollTop||0;
var left=_33b.pageXOffset||_33c.documentElement.scrollLeft||dojo.body().scrollLeft||0;
return {top:top,left:left,offset:{x:left,y:top}};
};
dojo.html.getParentByType=function(node,type){
var _341=dojo.doc();
var _342=dojo.byId(node);
type=type.toLowerCase();
while((_342)&&(_342.nodeName.toLowerCase()!=type)){
if(_342==(_341["body"]||_341["documentElement"])){
return null;
}
_342=_342.parentNode;
}
return _342;
};
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 _34a={x:0,y:0};
if(e.pageX||e.pageY){
_34a.x=e.pageX;
_34a.y=e.pageY;
}else{
var de=dojo.doc().documentElement;
var db=dojo.body();
_34a.x=e.clientX+((de||db)["scrollLeft"])-((de||db)["clientLeft"]);
_34a.y=e.clientY+((de||db)["scrollTop"])-((de||db)["clientTop"]);
}
return _34a;
};
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 _34f=dojo.doc().createElement("script");
_34f.src="javascript:'dojo.html.createExternalElement=function(doc, tag){ return doc.createElement(tag); }'";
dojo.doc().getElementsByTagName("head")[0].appendChild(_34f);
})();
}
}else{
dojo.html.createExternalElement=function(doc,tag){
return doc.createElement(tag);
};
}
dojo.html._callDeprecated=function(_352,_353,args,_355,_356){
dojo.deprecated("dojo.html."+_352,"replaced by dojo.html."+_353+"("+(_355?"node, {"+_355+": "+_355+"}":"")+")"+(_356?"."+_356:""),"0.5");
var _357=[];
if(_355){
var _358={};
_358[_355]=args[1];
_357.push(args[0]);
_357.push(_358);
}else{
_357=args;
}
var ret=dojo.html[_353].apply(dojo.html,args);
if(_356){
return ret[_356];
}else{
return ret;
}
};
dojo.html.getViewportWidth=function(){
return dojo.html._callDeprecated("getViewportWidth","getViewport",arguments,null,"width");
};
dojo.html.getViewportHeight=function(){
return dojo.html._callDeprecated("getViewportHeight","getViewport",arguments,null,"height");
};
dojo.html.getViewportSize=function(){
return dojo.html._callDeprecated("getViewportSize","getViewport",arguments);
};
dojo.html.getScrollTop=function(){
return dojo.html._callDeprecated("getScrollTop","getScroll",arguments,null,"top");
};
dojo.html.getScrollLeft=function(){
return dojo.html._callDeprecated("getScrollLeft","getScroll",arguments,null,"left");
};
dojo.html.getScrollOffset=function(){
return dojo.html._callDeprecated("getScrollOffset","getScroll",arguments,null,"offset");
};
dojo.provide("dojo.a11y");
dojo.a11y={imgPath:dojo.uri.moduleUri("dojo.widget","templates/images"),doAccessibleCheck:true,accessible:null,checkAccessible:function(){
if(this.accessible===null){
this.accessible=false;
if(this.doAccessibleCheck==true){
this.accessible=this.testAccessible();
}
}
return this.accessible;
},testAccessible:function(){
this.accessible=false;
if(dojo.render.html.ie||dojo.render.html.mozilla){
var div=document.createElement("div");
div.style.backgroundImage="url(\""+this.imgPath+"/tab_close.gif\")";
dojo.body().appendChild(div);
var _35b=null;
if(window.getComputedStyle){
var _35c=getComputedStyle(div,"");
_35b=_35c.getPropertyValue("background-image");
}else{
_35b=div.currentStyle.backgroundImage;
}
var _35d=false;
if(_35b!=null&&(_35b=="none"||_35b=="url(invalid-url:)")){
this.accessible=true;
}
dojo.body().removeChild(div);
}
return this.accessible;
},setCheckAccessible:function(_35e){
this.doAccessibleCheck=_35e;
},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 _360=this.children[i];
if(_360.onResized){
_360.onResized();
}
}
},create:function(args,_362,_363,ns){
if(ns){
this.ns=ns;
}
this.satisfyPropertySets(args,_362,_363);
this.mixInProperties(args,_362,_363);
this.postMixInProperties(args,_362,_363);
dojo.widget.manager.add(this);
this.buildRendering(args,_362,_363);
this.initialize(args,_362,_363);
this.postInitialize(args,_362,_363);
this.postCreate(args,_362,_363);
return this;
},destroy:function(_365){
if(this.parent){
this.parent.removeChild(this);
}
this.destroyChildren();
this.uninitialize();
this.destroyRendering(_365);
dojo.widget.manager.removeById(this.widgetId);
},destroyChildren:function(){
var _366;
var i=0;
while(this.children.length>i){
_366=this.children[i];
if(_366 instanceof dojo.widget.Widget){
this.removeChild(_366);
_366.destroy();
continue;
}
i++;
}
},getChildrenOfType:function(type,_369){
var ret=[];
var _36b=dojo.lang.isFunction(type);
if(!_36b){
type=type.toLowerCase();
}
for(var x=0;x<this.children.length;x++){
if(_36b){
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(_369){
ret=ret.concat(this.children[x].getChildrenOfType(type,_369));
}
}
return ret;
},getDescendants:function(){
var _36d=[];
var _36e=[this];
var elem;
while((elem=_36e.pop())){
_36d.push(elem);
if(elem.children){
dojo.lang.forEach(elem.children,function(elem){
_36e.push(elem);
});
}
}
return _36d;
},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 _375;
var _376=dojo.widget.lcArgsCache[this.widgetType];
if(_376==null){
_376={};
for(var y in this){
_376[((new String(y)).toLowerCase())]=y;
}
dojo.widget.lcArgsCache[this.widgetType]=_376;
}
var _378={};
for(var x in args){
if(!this[x]){
var y=_376[(new String(x)).toLowerCase()];
if(y){
args[y]=args[x];
x=y;
}
}
if(_378[x]){
continue;
}
_378[x]=true;
if((typeof this[x])!=(typeof _375)){
if(typeof args[x]!="string"){
this[x]=args[x];
}else{
if(dojo.lang.isString(this[x])){
this[x]=args[x];
}else{
if(dojo.lang.isNumber(this[x])){
this[x]=new Number(args[x]);
}else{
if(dojo.lang.isBoolean(this[x])){
this[x]=(args[x].toLowerCase()=="false")?false:true;
}else{
if(dojo.lang.isFunction(this[x])){
if(args[x].search(/[^\w\.]+/i)==-1){
this[x]=dojo.evalObjPath(args[x],false);
}else{
var tn=dojo.lang.nameAnonFunc(new Function(args[x]),this);
dojo.event.kwConnect({srcObj:this,srcFunc:x,adviceObj:this,adviceFunc:tn});
}
}else{
if(dojo.lang.isArray(this[x])){
this[x]=args[x].split(";");
}else{
if(this[x] instanceof Date){
this[x]=new Date(Number(args[x]));
}else{
if(typeof this[x]=="object"){
if(this[x] instanceof dojo.uri.Uri){
this[x]=dojo.uri.dojoUri(args[x]);
}else{
var _37a=args[x].split(";");
for(var y=0;y<_37a.length;y++){
var si=_37a[y].indexOf(":");
if((si!=-1)&&(_37a[y].length>si)){
this[x][_37a[y].substr(0,si).replace(/^\s+|\s+$/g,"")]=_37a[y].substr(si+1);
}
}
}
}else{
this[x]=args[x];
}
}
}
}
}
}
}
}
}else{
this.extraArgs[x.toLowerCase()]=args[x];
}
}
},postMixInProperties:function(args,frag,_37e){
},initialize:function(args,frag,_381){
return false;
},postInitialize:function(args,frag,_384){
return false;
},postCreate:function(args,frag,_387){
return false;
},uninitialize:function(){
return false;
},buildRendering:function(args,frag,_38a){
dojo.unimplemented("dojo.widget.Widget.buildRendering, on "+this.toString()+", ");
return false;
},destroyRendering:function(){
dojo.unimplemented("dojo.widget.Widget.destroyRendering");
return false;
},addedTo:function(_38b){
},addChild:function(_38c){
dojo.unimplemented("dojo.widget.Widget.addChild");
return false;
},removeChild:function(_38d){
for(var x=0;x<this.children.length;x++){
if(this.children[x]===_38d){
this.children.splice(x,1);
_38d.parent=null;
break;
}
}
return _38d;
},getPreviousSibling:function(){
var idx=this.getParentIndex();
if(idx<=0){
return null;
}
return this.parent.children[idx-1];
},getSiblings:function(){
return this.parent.children;
},getParentIndex:function(){
return dojo.lang.indexOf(this.parent.children,this,true);
},getNextSibling:function(){
var idx=this.getParentIndex();
if(idx==this.parent.children.length-1){
return null;
}
if(idx<0){
return null;
}
return this.parent.children[idx+1];
}});
dojo.widget.lcArgsCache={};
dojo.widget.tags={};
dojo.widget.tags.addParseTreeHandler=function(type){
dojo.deprecated("addParseTreeHandler",". ParseTreeHandlers are now reserved for components. Any unfiltered DojoML tag without a ParseTreeHandler is assumed to be a widget","0.5");
};
dojo.widget.tags["dojo:propertyset"]=function(_392,_393,_394){
var _395=_393.parseProperties(_392["dojo:propertyset"]);
};
dojo.widget.tags["dojo:connect"]=function(_396,_397,_398){
var _399=_397.parseProperties(_396["dojo:connect"]);
};
dojo.widget.buildWidgetFromParseTree=function(type,frag,_39c,_39d,_39e,_39f){
dojo.a11y.setAccessibleMode();
var _3a0=type.split(":");
_3a0=(_3a0.length==2)?_3a0[1]:type;
var _3a1=_39f||_39c.parseProperties(frag[frag["ns"]+":"+_3a0]);
var _3a2=dojo.widget.manager.getImplementation(_3a0,null,null,frag["ns"]);
if(!_3a2){
throw new Error("cannot find \""+type+"\" widget");
}else{
if(!_3a2.create){
throw new Error("\""+type+"\" widget object has no \"create\" method and does not appear to implement *Widget");
}
}
_3a1["dojoinsertionindex"]=_39e;
var ret=_3a2.create(_3a1,frag,_39d,frag["ns"]);
return ret;
};
dojo.widget.defineWidget=function(_3a4,_3a5,_3a6,init,_3a8){
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(_3ab,_3ac,_3ad,init,_3af){
var _3b0=_3ab.split(".");
var type=_3b0.pop();
var regx="\\.("+(_3ac?_3ac+"|":"")+dojo.widget.defineWidget.renderers+")\\.";
var r=_3ab.search(new RegExp(regx));
_3b0=(r<0?_3b0.join("."):_3ab.substr(0,r));
dojo.widget.manager.registerWidgetPackage(_3b0);
var pos=_3b0.indexOf(".");
var _3b5=(pos>-1)?_3b0.substring(0,pos):_3b0;
_3af=(_3af)||{};
_3af.widgetType=type;
if((!init)&&(_3af["classConstructor"])){
init=_3af.classConstructor;
delete _3af.classConstructor;
}
dojo.declare(_3ab,_3ad,init,_3af);
};
dojo.provide("dojo.widget.Parse");
dojo.widget.Parse=function(_3b6){
this.propertySetsList=[];
this.fragment=_3b6;
this.createComponents=function(frag,_3b8){
var _3b9=[];
var _3ba=false;
try{
if(frag&&frag.tagName&&(frag!=frag.nodeRef)){
var _3bb=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(_3bb[ltn]){
_3ba=true;
ret=_3bb[ltn](frag,this,_3b8,frag.index);
_3b9.push(ret);
}else{
if(ltn.indexOf(":")==-1){
ltn="dojo:"+ltn;
}
ret=dojo.widget.buildWidgetFromParseTree(ltn,frag,this,_3b8,frag.index);
if(ret){
_3ba=true;
_3b9.push(ret);
}
}
}
}
}
catch(e){
dojo.debug("dojo.widget.Parse: error:",e);
}
if(!_3ba){
_3b9=_3b9.concat(this.createSubComponents(frag,_3b8));
}
return _3b9;
};
this.createSubComponents=function(_3c0,_3c1){
var frag,_3c3=[];
for(var item in _3c0){
frag=_3c0[item];
if(frag&&typeof frag=="object"&&(frag!=_3c0.nodeRef)&&(frag!=_3c0.tagName)&&(!dojo.dom.isNode(frag))){
_3c3=_3c3.concat(this.createComponents(frag,_3c1));
}
}
return _3c3;
};
this.parsePropertySets=function(_3c5){
return [];
};
this.parseProperties=function(_3c6){
var _3c7={};
for(var item in _3c6){
if((_3c6[item]==_3c6.tagName)||(_3c6[item]==_3c6.nodeRef)){
}else{
var frag=_3c6[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 _3ca=this;
this.getDataProvider(_3ca,frag[0].value);
_3c7.dataProvider=this.dataProvider;
}
_3c7[item]=frag[0].value;
var _3cb=this.parseProperties(frag);
for(var _3cc in _3cb){
_3c7[_3cc]=_3cb[_3cc];
}
}
catch(e){
dojo.debug(e);
}
}
}
switch(item.toLowerCase()){
case "checked":
case "disabled":
if(typeof _3c7[item]!="boolean"){
_3c7[item]=true;
}
break;
}
}
}
return _3c7;
};
this.getDataProvider=function(_3cd,_3ce){
dojo.io.bind({url:_3ce,load:function(type,_3d0){
if(type=="load"){
_3cd.dataProvider=_3d0;
}
},mimetype:"text/javascript",sync:true});
};
this.getPropertySetById=function(_3d1){
for(var x=0;x<this.propertySetsList.length;x++){
if(_3d1==this.propertySetsList[x]["id"][0].value){
return this.propertySetsList[x];
}
}
return "";
};
this.getPropertySetsByType=function(_3d3){
var _3d4=[];
for(var x=0;x<this.propertySetsList.length;x++){
var cpl=this.propertySetsList[x];
var cpcc=cpl.componentClass||cpl.componentType||null;
var _3d8=this.propertySetsList[x]["id"][0].value;
if(cpcc&&(_3d8==cpcc[0].value)){
_3d4.push(cpl);
}
}
return _3d4;
};
this.getPropertySets=function(_3d9){
var ppl="dojo:propertyproviderlist";
var _3db=[];
var _3dc=_3d9.tagName;
if(_3d9[ppl]){
var _3dd=_3d9[ppl].value.split(" ");
for(var _3de in _3dd){
if((_3de.indexOf("..")==-1)&&(_3de.indexOf("://")==-1)){
var _3df=this.getPropertySetById(_3de);
if(_3df!=""){
_3db.push(_3df);
}
}else{
}
}
}
return this.getPropertySetsByType(_3dc).concat(_3db);
};
this.createComponentFromScript=function(_3e0,_3e1,_3e2,ns){
_3e2.fastMixIn=true;
var ltn=(ns||"dojo")+":"+_3e1.toLowerCase();
if(dojo.widget.tags[ltn]){
return [dojo.widget.tags[ltn](_3e2,this,null,null,_3e2)];
}
return [dojo.widget.buildWidgetFromParseTree(ltn,_3e2,this,null,null,_3e2)];
};
};
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,_3e7,_3e8,_3e9){
var _3ea=false;
var _3eb=(typeof name=="string");
if(_3eb){
var pos=name.indexOf(":");
var ns=(pos>-1)?name.substring(0,pos):"dojo";
if(pos>-1){
name=name.substring(pos+1);
}
var _3ee=name.toLowerCase();
var _3ef=ns+":"+_3ee;
_3ea=(dojo.byId(name)&&!dojo.widget.tags[_3ef]);
}
if((arguments.length==1)&&(_3ea||!_3eb)){
var xp=new dojo.xml.Parse();
var tn=_3ea?dojo.byId(name):name;
return dojo.widget.getParser().createComponents(xp.parseElement(tn,null,true))[0];
}
function fromScript(_3f2,name,_3f4,ns){
_3f4[_3ef]={dojotype:[{value:_3ee}],nodeRef:_3f2,fastMixIn:true};
_3f4.ns=ns;
return dojo.widget.getParser().createComponentFromScript(_3f2,name,_3f4,ns);
}
_3e7=_3e7||{};
var _3f6=false;
var tn=null;
var h=dojo.render.html.capable;
if(h){
tn=document.createElement("span");
}
if(!_3e8){
_3f6=true;
_3e8=tn;
if(h){
dojo.body().appendChild(_3e8);
}
}else{
if(_3e9){
dojo.dom.insertAtPosition(tn,_3e8,_3e9);
}else{
tn=_3e8;
}
}
var _3f8=fromScript(tn,name.toLowerCase(),_3e7,ns);
if((!_3f8)||(!_3f8[0])||(typeof _3f8[0].widgetType=="undefined")){
throw new Error("createWidget: Creation of \""+name+"\" widget failed.");
}
try{
if(_3f6&&_3f8[0].domNode.parentNode){
_3f8[0].domNode.parentNode.removeChild(_3f8[0].domNode);
}
}
catch(e){
dojo.debug(e);
}
return _3f8[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,_3fe){
return (new RegExp("(^|\\s+)"+_3fe+"(\\s+|$)")).test(dojo.html.getClass(node));
};
dojo.html.prependClass=function(node,_400){
_400+=" "+dojo.html.getClass(node);
return dojo.html.setClass(node,_400);
};
dojo.html.addClass=function(node,_402){
if(dojo.html.hasClass(node,_402)){
return false;
}
_402=(dojo.html.getClass(node)+" "+_402).replace(/^\s+|\s+$/g,"");
return dojo.html.setClass(node,_402);
};
dojo.html.setClass=function(node,_404){
node=dojo.byId(node);
var cs=new String(_404);
try{
if(typeof node.className=="string"){
node.className=cs;
}else{
if(node.setAttribute){
node.setAttribute("class",_404);
node.className=cs;
}else{
return false;
}
}
}
catch(e){
dojo.debug("dojo.html.setClass() failed",e);
}
return true;
};
dojo.html.removeClass=function(node,_407,_408){
try{
if(!_408){
var _409=dojo.html.getClass(node).replace(new RegExp("(^|\\s+)"+_407+"(\\s+|$)"),"$1$2");
}else{
var _409=dojo.html.getClass(node).replace(_407,"");
}
dojo.html.setClass(node,_409);
}
catch(e){
dojo.debug("dojo.html.removeClass() failed",e);
}
return true;
};
dojo.html.replaceClass=function(node,_40b,_40c){
dojo.html.removeClass(node,_40c);
dojo.html.addClass(node,_40b);
};
dojo.html.classMatchType={ContainsAll:0,ContainsAny:1,IsOnly:2};
dojo.html.getElementsByClass=function(_40d,_40e,_40f,_410,_411){
_411=false;
var _412=dojo.doc();
_40e=dojo.byId(_40e)||_412;
var _413=_40d.split(/\s+/g);
var _414=[];
if(_410!=1&&_410!=2){
_410=0;
}
var _415=new RegExp("(\\s|^)(("+_413.join(")|(")+"))(\\s|$)");
var _416=_413.join(" ").length;
var _417=[];
if(!_411&&_412.evaluate){
var _418=".//"+(_40f||"*")+"[contains(";
if(_410!=dojo.html.classMatchType.ContainsAny){
_418+="concat(' ',@class,' '), ' "+_413.join(" ') and contains(concat(' ',@class,' '), ' ")+" ')";
if(_410==2){
_418+=" and string-length(@class)="+_416+"]";
}else{
_418+="]";
}
}else{
_418+="concat(' ',@class,' '), ' "+_413.join(" ') or contains(concat(' ',@class,' '), ' ")+" ')]";
}
var _419=_412.evaluate(_418,_40e,null,XPathResult.ANY_TYPE,null);
var _41a=_419.iterateNext();
while(_41a){
try{
_417.push(_41a);
_41a=_419.iterateNext();
}
catch(e){
break;
}
}
return _417;
}else{
if(!_40f){
_40f="*";
}
_417=_40e.getElementsByTagName(_40f);
var node,i=0;
outer:
while(node=_417[i++]){
var _41d=dojo.html.getClasses(node);
if(_41d.length==0){
continue outer;
}
var _41e=0;
for(var j=0;j<_41d.length;j++){
if(_415.test(_41d[j])){
if(_410==dojo.html.classMatchType.ContainsAny){
_414.push(node);
continue outer;
}else{
_41e++;
}
}else{
if(_410==dojo.html.classMatchType.IsOnly){
continue outer;
}
}
}
if(_41e==_413.length){
if((_410==dojo.html.classMatchType.IsOnly)&&(_41e==_41d.length)){
_414.push(node);
}else{
if(_410==dojo.html.classMatchType.ContainsAll){
_414.push(node);
}
}
}
}
return _414;
}
};
dojo.html.getElementsByClassName=dojo.html.getElementsByClass;
dojo.html.toCamelCase=function(_420){
var arr=_420.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(_424){
return _424.replace(/([A-Z])/g,"-$1").toLowerCase();
};
if(dojo.render.html.ie){
dojo.html.getComputedStyle=function(node,_426,_427){
node=dojo.byId(node);
if(!node||!node.style){
return _427;
}
return node.currentStyle[dojo.html.toCamelCase(_426)];
};
dojo.html.getComputedStyles=function(node){
return node.currentStyle;
};
}else{
dojo.html.getComputedStyle=function(node,_42a,_42b){
node=dojo.byId(node);
if(!node||!node.style){
return _42b;
}
var s=document.defaultView.getComputedStyle(node,null);
return (s&&s[dojo.html.toCamelCase(_42a)])||"";
};
dojo.html.getComputedStyles=function(node){
return document.defaultView.getComputedStyle(node,null);
};
}
dojo.html.getStyleProperty=function(node,_42f){
node=dojo.byId(node);
return (node&&node.style?node.style[dojo.html.toCamelCase(_42f)]:undefined);
};
dojo.html.getStyle=function(node,_431){
var _432=dojo.html.getStyleProperty(node,_431);
return (_432?_432:dojo.html.getComputedStyle(node,_431));
};
dojo.html.setStyle=function(node,_434,_435){
node=dojo.byId(node);
if(node&&node.style){
var _436=dojo.html.toCamelCase(_434);
node.style[_436]=_435;
}
};
dojo.html.setStyleText=function(_437,text){
try{
_437.style.cssText=text;
}
catch(e){
_437.setAttribute("style",text);
}
};
dojo.html.copyStyle=function(_439,_43a){
if(!_43a.style.cssText){
_439.setAttribute("style",_43a.getAttribute("style"));
}else{
_439.style.cssText=_43a.style.cssText;
}
dojo.html.addClass(_439,dojo.html.getClass(_43a));
};
dojo.html.getUnitValue=function(node,_43c,_43d){
var s=dojo.html.getComputedStyle(node,_43c);
if((!s)||((s=="auto")&&(_43d))){
return {value:0,units:"px"};
}
var _43f=s.match(/(\-?[\d.]+)([a-z%]*)/i);
if(!_43f){
return dojo.html.getUnitValue.bad;
}
return {value:Number(_43f[1]),units:_43f[2].toLowerCase()};
};
dojo.html.getUnitValue.bad={value:NaN,units:""};
if(dojo.render.html.ie){
dojo.html.toPixelValue=function(_440,_441){
if(!_441){
return 0;
}
if(_441.slice(-2)=="px"){
return parseFloat(_441);
}
var _442=0;
with(_440){
var _443=style.left;
var _444=runtimeStyle.left;
runtimeStyle.left=currentStyle.left;
try{
style.left=_441||0;
_442=style.pixelLeft;
style.left=_443;
runtimeStyle.left=_444;
}
catch(e){
}
}
return _442;
};
}else{
dojo.html.toPixelValue=function(_445,_446){
return (_446.slice(-2)=="px"?parseFloat(_446):0);
};
}
dojo.html.getPixelValue=function(node,_448,_449){
return dojo.html.toPixelValue(node,dojo.html.getComputedStyle(node,_448));
};
dojo.html.setPositivePixelValue=function(node,_44b,_44c){
if(isNaN(_44c)){
return false;
}
node.style[_44b]=Math.max(0,_44c)+"px";
return true;
};
dojo.html.styleSheet=null;
dojo.html.insertCssRule=function(_44d,_44e,_44f){
if(!dojo.html.styleSheet){
if(document.createStyleSheet){
dojo.html.styleSheet=document.createStyleSheet();
}else{
if(document.styleSheets[0]){
dojo.html.styleSheet=document.styleSheets[0];
}else{
return null;
}
}
}
if(arguments.length<3){
if(dojo.html.styleSheet.cssRules){
_44f=dojo.html.styleSheet.cssRules.length;
}else{
if(dojo.html.styleSheet.rules){
_44f=dojo.html.styleSheet.rules.length;
}else{
return null;
}
}
}
if(dojo.html.styleSheet.insertRule){
var rule=_44d+" { "+_44e+" }";
return dojo.html.styleSheet.insertRule(rule,_44f);
}else{
if(dojo.html.styleSheet.addRule){
return dojo.html.styleSheet.addRule(_44d,_44e,_44f);
}else{
return null;
}
}
};
dojo.html.removeCssRule=function(_451){
if(!dojo.html.styleSheet){
dojo.debug("no stylesheet defined for removing rules");
return false;
}
if(dojo.render.html.ie){
if(!_451){
_451=dojo.html.styleSheet.rules.length;
dojo.html.styleSheet.removeRule(_451);
}
}else{
if(document.styleSheets[0]){
if(!_451){
_451=dojo.html.styleSheet.cssRules.length;
}
dojo.html.styleSheet.deleteRule(_451);
}
}
return true;
};
dojo.html._insertedCssFiles=[];
dojo.html.insertCssFile=function(URI,doc,_454,_455){
if(!URI){
return;
}
if(!doc){
doc=document;
}
var _456=dojo.hostenv.getText(URI,false,_455);
if(_456===null){
return;
}
_456=dojo.html.fixPathsInCssText(_456,URI);
if(_454){
var idx=-1,node,ent=dojo.html._insertedCssFiles;
for(var i=0;i<ent.length;i++){
if((ent[i].doc==doc)&&(ent[i].cssText==_456)){
idx=i;
node=ent[i].nodeRef;
break;
}
}
if(node){
var _45b=doc.getElementsByTagName("style");
for(var i=0;i<_45b.length;i++){
if(_45b[i]==node){
return;
}
}
dojo.html._insertedCssFiles.shift(idx,1);
}
}
var _45c=dojo.html.insertCssText(_456,doc);
dojo.html._insertedCssFiles.push({"doc":doc,"cssText":_456,"nodeRef":_45c});
if(_45c&&djConfig.isDebug){
_45c.setAttribute("dbgHref",URI);
}
return _45c;
};
dojo.html.insertCssText=function(_45d,doc,URI){
if(!_45d){
return;
}
if(!doc){
doc=document;
}
if(URI){
_45d=dojo.html.fixPathsInCssText(_45d,URI);
}
var _460=doc.createElement("style");
_460.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(_460);
}
if(_460.styleSheet){
var _462=function(){
try{
_460.styleSheet.cssText=_45d;
}
catch(e){
dojo.debug(e);
}
};
if(_460.styleSheet.disabled){
setTimeout(_462,10);
}else{
_462();
}
}else{
var _463=doc.createTextNode(_45d);
_460.appendChild(_463);
}
return _460;
};
dojo.html.fixPathsInCssText=function(_464,URI){
if(!_464||!URI){
return;
}
var _466,str="",url="",_469="[\\t\\s\\w\\(\\)\\/\\.\\\\'\"-:#=&?~]+";
var _46a=new RegExp("url\\(\\s*("+_469+")\\s*\\)");
var _46b=/(file|https?|ftps?):\/\//;
regexTrim=new RegExp("^[\\s]*(['\"]?)("+_469+")\\1[\\s]*?$");
if(dojo.render.html.ie55||dojo.render.html.ie60){
var _46c=new RegExp("AlphaImageLoader\\((.*)src=['\"]("+_469+")['\"]");
while(_466=_46c.exec(_464)){
url=_466[2].replace(regexTrim,"$2");
if(!_46b.exec(url)){
url=(new dojo.uri.Uri(URI,url).toString());
}
str+=_464.substring(0,_466.index)+"AlphaImageLoader("+_466[1]+"src='"+url+"'";
_464=_464.substr(_466.index+_466[0].length);
}
_464=str+_464;
str="";
}
while(_466=_46a.exec(_464)){
url=_466[1].replace(regexTrim,"$2");
if(!_46b.exec(url)){
url=(new dojo.uri.Uri(URI,url).toString());
}
str+=_464.substring(0,_466.index)+"url("+url+")";
_464=_464.substr(_466.index+_466[0].length);
}
return str+_464;
};
dojo.html.setActiveStyleSheet=function(_46d){
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")==_46d){
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 _479={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 _479){
if(_479[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,_47c,_47d,_47e){
var _47f=_47c||obj.templatePath;
var _480=dojo.widget._templateCache;
if(!_47f&&!obj["widgetType"]){
do{
var _481="__dummyTemplate__"+dojo.widget._templateCache.dummyCount++;
}while(_480[_481]);
obj.widgetType=_481;
}
var wt=_47f?_47f.toString():obj.widgetType;
var ts=_480[wt];
if(!ts){
_480[wt]={"string":null,"node":null};
if(_47e){
ts={};
}else{
ts=_480[wt];
}
}
if((!obj.templateString)&&(!_47e)){
obj.templateString=_47d||ts["string"];
}
if(obj.templateString){
obj.templateString=this._sanitizeTemplateString(obj.templateString);
}
if((!obj.templateNode)&&(!_47e)){
obj.templateNode=ts["node"];
}
if((!obj.templateNode)&&(!obj.templateString)&&(_47f)){
var _484=this._sanitizeTemplateString(dojo.hostenv.getText(_47f));
obj.templateString=_484;
if(!_47e){
_480[wt]["string"]=_484;
}
}
if((!ts["string"])&&(!_47e)){
ts.string=obj.templateString;
}
};
dojo.widget._sanitizeTemplateString=function(_485){
if(_485){
_485=_485.replace(/^\s*<\?xml(\s)+version=[\'\"](\d)*.(\d)*[\'\"](\s)*\?>/im,"");
var _486=_485.match(/<body[^>]*>\s*([\s\S]+)\s*<\/body>/im);
if(_486){
_485=_486[1];
}
}else{
_485="";
}
return _485;
};
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,_48a){
if(dojo.render.html.ie){
node.setAttribute(this[ns].alias+":"+attr,this[ns].prefix+_48a);
}else{
node.setAttributeNS(this[ns]["namespace"],attr,this[ns].prefix+_48a);
}
},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 _491=true;
if(dojo.render.html.ie){
_491=node.removeAttribute(this[ns].alias+":"+attr);
}else{
node.removeAttributeNS(this[ns]["namespace"],attr);
}
return _491;
}};
dojo.widget.attachTemplateNodes=function(_492,_493,_494){
var _495=dojo.dom.ELEMENT_NODE;
function trim(str){
return str.replace(/^\s+|\s+$/g,"");
}
if(!_492){
_492=_493.domNode;
}
if(_492.nodeType!=_495){
return;
}
var _497=_492.all||_492.getElementsByTagName("*");
var _498=_493;
for(var x=-1;x<_497.length;x++){
var _49a=(x==-1)?_492:_497[x];
var _49b=[];
if(!_493.widgetsInTemplate||!_49a.getAttribute("dojoType")){
for(var y=0;y<this.attachProperties.length;y++){
var _49d=_49a.getAttribute(this.attachProperties[y]);
if(_49d){
_49b=_49d.split(";");
for(var z=0;z<_49b.length;z++){
if(dojo.lang.isArray(_493[_49b[z]])){
_493[_49b[z]].push(_49a);
}else{
_493[_49b[z]]=_49a;
}
}
break;
}
}
var _49f=_49a.getAttribute(this.eventAttachProperty);
if(_49f){
var evts=_49f.split(";");
for(var y=0;y<evts.length;y++){
if((!evts[y])||(!evts[y].length)){
continue;
}
var _4a1=null;
var tevt=trim(evts[y]);
if(evts[y].indexOf(":")>=0){
var _4a3=tevt.split(":");
tevt=trim(_4a3[0]);
_4a1=trim(_4a3[1]);
}
if(!_4a1){
_4a1=tevt;
}
var tf=function(){
var ntf=new String(_4a1);
return function(evt){
if(_498[ntf]){
_498[ntf](dojo.event.browser.fixEvent(evt,this));
}
};
}();
dojo.event.browser.addListener(_49a,tevt,tf,false,true);
}
}
for(var y=0;y<_494.length;y++){
var _4a7=_49a.getAttribute(_494[y]);
if((_4a7)&&(_4a7.length)){
var _4a1=null;
var _4a8=_494[y].substr(4);
_4a1=trim(_4a7);
var _4a9=[_4a1];
if(_4a1.indexOf(";")>=0){
_4a9=dojo.lang.map(_4a1.split(";"),trim);
}
for(var z=0;z<_4a9.length;z++){
if(!_4a9[z].length){
continue;
}
var tf=function(){
var ntf=new String(_4a9[z]);
return function(evt){
if(_498[ntf]){
_498[ntf](dojo.event.browser.fixEvent(evt,this));
}
};
}();
dojo.event.browser.addListener(_49a,_4a8,tf,false,true);
}
}
}
}
var _4ac=_49a.getAttribute(this.templateProperty);
if(_4ac){
_493[_4ac]=_49a;
}
dojo.lang.forEach(dojo.widget.waiNames,function(name){
var wai=dojo.widget.wai[name];
var val=_49a.getAttribute(wai.name);
if(val){
if(val.indexOf("-")==-1){
dojo.widget.wai.setAttr(_49a,wai.name,"role",val);
}else{
var _4b0=val.split("-");
dojo.widget.wai.setAttr(_49a,wai.name,_4b0[0],_4b0[1]);
}
}
},this);
var _4b1=_49a.getAttribute(this.onBuildProperty);
if(_4b1){
eval("var node = baseNode; var widget = targetObj; "+_4b1);
}
}
};
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(_4b9,_4ba,pos,ref,_4bd){
if(!this.isContainer){
dojo.debug("dojo.widget.DomWidget.addChild() attempted on non-container widget");
return null;
}else{
if(_4bd==undefined){
_4bd=this.children.length;
}
this.addWidgetAsDirectChild(_4b9,_4ba,pos,ref,_4bd);
this.registerChild(_4b9,_4bd);
}
return _4b9;
},addWidgetAsDirectChild:function(_4be,_4bf,pos,ref,_4c2){
if((!this.containerNode)&&(!_4bf)){
this.containerNode=this.domNode;
}
var cn=(_4bf)?_4bf:this.containerNode;
if(!pos){
pos="after";
}
if(!ref){
if(!cn){
cn=dojo.body();
}
ref=cn.lastChild;
}
if(!_4c2){
_4c2=0;
}
_4be.domNode.setAttribute("dojoinsertionindex",_4c2);
if(!ref){
cn.appendChild(_4be.domNode);
}else{
if(pos=="insertAtIndex"){
dojo.dom.insertAtIndex(_4be.domNode,ref.parentNode,_4c2);
}else{
if((pos=="after")&&(ref===cn.lastChild)){
cn.appendChild(_4be.domNode);
}else{
dojo.dom.insertAtPosition(_4be.domNode,cn,pos);
}
}
}
},registerChild:function(_4c4,_4c5){
_4c4.dojoInsertionIndex=_4c5;
var idx=-1;
for(var i=0;i<this.children.length;i++){
if(this.children[i].dojoInsertionIndex<=_4c5){
idx=i;
}
}
this.children.splice(idx+1,0,_4c4);
_4c4.parent=this;
_4c4.addedTo(this,idx+1);
delete dojo.widget.manager.topWidgets[_4c4.widgetId];
},removeChild:function(_4c8){
dojo.dom.removeNode(_4c8.domNode);
return dojo.widget.DomWidget.superclass.removeChild.call(this,_4c8);
},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,_4cc){
var _4cd=this.getFragNodeRef(frag);
if(_4cc&&(_4cc.snarfChildDomOutput||!_4cd)){
_4cc.addWidgetAsDirectChild(this,"","insertAtIndex","",args["dojoinsertionindex"],_4cd);
}else{
if(_4cd){
if(this.domNode&&(this.domNode!==_4cd)){
this._sourceNodeRef=dojo.dom.replaceNode(_4cd,this.domNode);
}
}
}
if(_4cc){
_4cc.registerChild(this,args.dojoinsertionindex);
}else{
dojo.widget.manager.topWidgets[this.widgetId]=this;
}
if(this.widgetsInTemplate){
var _4ce=new dojo.xml.Parse();
var _4cf;
var _4d0=this.domNode.getElementsByTagName("*");
for(var i=0;i<_4d0.length;i++){
if(_4d0[i].getAttribute("dojoAttachPoint")=="subContainerWidget"){
_4cf=_4d0[i];
}
if(_4d0[i].getAttribute("dojoType")){
_4d0[i].setAttribute("isSubWidget",true);
}
}
if(this.isContainer&&!this.containerNode){
if(_4cf){
var src=this.getFragNodeRef(frag);
if(src){
dojo.dom.moveChildren(src,_4cf);
frag["dojoDontFollow"]=true;
}
}else{
dojo.debug("No subContainerWidget node can be found in template file for widget "+this);
}
}
var _4d3=_4ce.parseElement(this.domNode,null,true);
dojo.widget.getParser().createSubComponents(_4d3,this);
var _4d4=[];
var _4d5=[this];
var w;
while((w=_4d5.pop())){
for(var i=0;i<w.children.length;i++){
var _4d7=w.children[i];
if(_4d7._processedSubWidgets||!_4d7.extraArgs["issubwidget"]){
continue;
}
_4d4.push(_4d7);
if(_4d7.isContainer){
_4d5.push(_4d7);
}
}
}
for(var i=0;i<_4d4.length;i++){
var _4d8=_4d4[i];
if(_4d8._processedSubWidgets){
dojo.debug("This should not happen: widget._processedSubWidgets is already true!");
return;
}
_4d8._processedSubWidgets=true;
if(_4d8.extraArgs["dojoattachevent"]){
var evts=_4d8.extraArgs["dojoattachevent"].split(";");
for(var j=0;j<evts.length;j++){
var _4db=null;
var tevt=dojo.string.trim(evts[j]);
if(tevt.indexOf(":")>=0){
var _4dd=tevt.split(":");
tevt=dojo.string.trim(_4dd[0]);
_4db=dojo.string.trim(_4dd[1]);
}
if(!_4db){
_4db=tevt;
}
if(dojo.lang.isFunction(_4d8[tevt])){
dojo.event.kwConnect({srcObj:_4d8,srcFunc:tevt,targetObj:this,targetFunc:_4db});
}else{
alert(tevt+" is not a function in widget "+_4d8);
}
}
}
if(_4d8.extraArgs["dojoattachpoint"]){
this[_4d8.extraArgs["dojoattachpoint"]]=_4d8;
}
}
}
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 _4e1=args["templateCssPath"]||this.templateCssPath;
if(_4e1&&!dojo.widget._cssFiles[_4e1.toString()]){
if((!this.templateCssString)&&(_4e1)){
this.templateCssString=dojo.hostenv.getText(_4e1);
this.templateCssPath=null;
}
dojo.widget._cssFiles[_4e1.toString()]=true;
}
if((this["templateCssString"])&&(!dojo.widget._cssStrings[this.templateCssString])){
dojo.html.insertCssText(this.templateCssString,null,_4e1);
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 _4e4=false;
if(args["templatepath"]){
args["templatePath"]=args["templatepath"];
}
dojo.widget.fillFromTemplateCache(this,args["templatePath"],null,_4e4);
var ts=dojo.widget._templateCache[this.templatePath?this.templatePath.toString():this.widgetType];
if((ts)&&(!_4e4)){
if(!this.templateString.length){
this.templateString=ts["string"];
}
if(!this.templateNode){
this.templateNode=ts["node"];
}
}
var _4e6=false;
var node=null;
var tstr=this.templateString;
if((!this.templateNode)&&(this.templateString)){
_4e6=this.templateString.match(/\$\{([^\}]+)\}/g);
if(_4e6){
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<_4e6.length;i++){
var key=_4e6[i];
key=key.substring(2,key.length-1);
var kval=(key.substring(0,5)=="this.")?dojo.lang.getObjPathValue(key.substring(5),this):hash[key];
var _4ed;
if((kval)||(dojo.lang.isString(kval))){
_4ed=new String((dojo.lang.isFunction(kval))?kval.call(this,key,this.templateString):kval);
while(_4ed.indexOf("\"")>-1){
_4ed=_4ed.replace("\"","&quot;");
}
tstr=tstr.replace(_4e6[i],_4ed);
}
}
}else{
this.templateNode=this.createNodesFromText(this.templateString,true)[0];
if(!_4e4){
ts.node=this.templateNode;
}
}
}
if((!this.templateNode)&&(!_4e6)){
dojo.debug("DomWidget.buildFromTemplate: could not create template");
return false;
}else{
if(!_4e6){
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(_4ef,_4f0){
if(!_4ef){
_4ef=this.domNode;
}
if(!_4f0){
_4f0=this;
}
return dojo.widget.attachTemplateNodes(_4ef,_4f0,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,_4f2,_4f3){
node=dojo.byId(node);
_4f3(node,!_4f2(node));
return _4f2(node);
};
dojo.html.show=function(node){
node=dojo.byId(node);
if(dojo.html.getStyleProperty(node,"display")=="none"){
dojo.html.setStyle(node,"display",(node.dojoDisplayCache||""));
node.dojoDisplayCache=undefined;
}
};
dojo.html.hide=function(node){
node=dojo.byId(node);
if(typeof node["dojoDisplayCache"]=="undefined"){
var d=dojo.html.getStyleProperty(node,"display");
if(d!="none"){
node.dojoDisplayCache=d;
}
}
dojo.html.setStyle(node,"display","none");
};
dojo.html.setShowing=function(node,_4f8){
dojo.html[(_4f8?"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,_4fe){
dojo.html.setStyle(node,"display",((_4fe instanceof String||typeof _4fe=="string")?_4fe:(_4fe?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,_502){
dojo.html.setStyle(node,"visibility",((_502 instanceof String||typeof _502=="string")?_502:(_502?"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,_506,_507){
node=dojo.byId(node);
var h=dojo.render.html;
if(!_507){
if(_506>=1){
if(h.ie){
dojo.html.clearOpacity(node);
return;
}else{
_506=0.999999;
}
}else{
if(_506<0){
_506=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="+_506*100+")";
}
}
node.style.filter="Alpha(Opacity="+_506*100+")";
}else{
if(h.moz){
node.style.opacity=_506;
node.style.MozOpacity=_506;
}else{
if(h.safari){
node.style.opacity=_506;
node.style.KhtmlOpacity=_506;
}else{
node.style.opacity=_506;
}
}
}
};
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){
try{
var opac=(node.filters&&node.filters.alpha&&typeof node.filters.alpha.opacity=="number"?node.filters.alpha.opacity:100)/100;
}
catch(e){
var opac=0;
}
}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 _513=0;
while(node){
if(dojo.html.getComputedStyle(node,"position")=="fixed"){
return 0;
}
var val=node[prop];
if(val){
_513+=val-0;
if(node==dojo.body()){
break;
}
}
node=node.parentNode;
}
return _513;
};
dojo.html.setStyleAttributes=function(node,_516){
node=dojo.byId(node);
var _517=_516.replace(/(;)?\s*$/,"").split(";");
for(var i=0;i<_517.length;i++){
var _519=_517[i].split(":");
var name=_519[0].replace(/\s*$/,"").replace(/^\s*/,"").toLowerCase();
var _51b=_519[1].replace(/\s*$/,"").replace(/^\s*/,"");
switch(name){
case "opacity":
dojo.html.setOpacity(node,_51b);
break;
case "content-height":
dojo.html.setContentBox(node,{height:_51b});
break;
case "content-width":
dojo.html.setContentBox(node,{width:_51b});
break;
case "outer-height":
dojo.html.setMarginBox(node,{height:_51b});
break;
case "outer-width":
dojo.html.setMarginBox(node,{width:_51b});
break;
default:
node.style[dojo.html.toCamelCase(name)]=_51b;
}
}
};
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,_51d,_51e){
node=dojo.byId(node,node.ownerDocument);
var ret={x:0,y:0};
var bs=dojo.html.boxSizing;
if(!_51e){
_51e=bs.CONTENT_BOX;
}
var _521=2;
var _522;
switch(_51e){
case bs.MARGIN_BOX:
_522=3;
break;
case bs.BORDER_BOX:
_522=2;
break;
case bs.PADDING_BOX:
default:
_522=1;
break;
case bs.CONTENT_BOX:
_522=0;
break;
}
var h=dojo.render.html;
var db=document["body"]||document["documentElement"];
if(h.ie){
with(node.getBoundingClientRect()){
ret.x=left-2;
ret.y=top-2;
}
}else{
if(document.getBoxObjectFor){
_521=1;
try{
var bo=document.getBoxObjectFor(node);
ret.x=bo.x-dojo.html.sumAncestorProperties(node,"scrollLeft");
ret.y=bo.y-dojo.html.sumAncestorProperties(node,"scrollTop");
}
catch(e){
}
}else{
if(node["offsetParent"]){
var _526;
if((h.safari)&&(node.style.getPropertyValue("position")=="absolute")&&(node.parentNode==db)){
_526=db;
}else{
_526=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 _528=node;
do{
var n=_528["offsetLeft"];
if(!h.opera||n>0){
ret.x+=isNaN(n)?0:n;
}
var m=_528["offsetTop"];
ret.y+=isNaN(m)?0:m;
_528=_528.offsetParent;
}while((_528!=_526)&&(_528!=null));
}else{
if(node["x"]&&node["y"]){
ret.x+=isNaN(node.x)?0:node.x;
ret.y+=isNaN(node.y)?0:node.y;
}
}
}
}
if(_51d){
var _52b=dojo.html.getScroll();
ret.y+=_52b.top;
ret.x+=_52b.left;
}
var _52c=[dojo.html.getPaddingExtent,dojo.html.getBorderExtent,dojo.html.getMarginExtent];
if(_521>_522){
for(var i=_522;i<_521;++i){
ret.y+=_52c[i](node,"top");
ret.x+=_52c[i](node,"left");
}
}else{
if(_521<_522){
for(var i=_522;i>_521;--i){
ret.y-=_52c[i-1](node,"top");
ret.x-=_52c[i-1](node,"left");
}
}
}
ret.top=ret.y;
ret.left=ret.x;
return ret;
};
dojo.html.isPositionAbsolute=function(node){
return (dojo.html.getComputedStyle(node,"position")=="absolute");
};
dojo.html._sumPixelValues=function(node,_530,_531){
var _532=0;
for(var x=0;x<_530.length;x++){
_532+=dojo.html.getPixelValue(node,_530[x],_531);
}
return _532;
};
dojo.html.getMargin=function(node){
return {width:dojo.html._sumPixelValues(node,["margin-left","margin-right"],(dojo.html.getComputedStyle(node,"position")=="absolute")),height:dojo.html._sumPixelValues(node,["margin-top","margin-bottom"],(dojo.html.getComputedStyle(node,"position")=="absolute"))};
};
dojo.html.getBorder=function(node){
return {width:dojo.html.getBorderExtent(node,"left")+dojo.html.getBorderExtent(node,"right"),height:dojo.html.getBorderExtent(node,"top")+dojo.html.getBorderExtent(node,"bottom")};
};
dojo.html.getBorderExtent=function(node,side){
return (dojo.html.getStyle(node,"border-"+side+"-style")=="none"?0:dojo.html.getPixelValue(node,"border-"+side+"-width"));
};
dojo.html.getMarginExtent=function(node,side){
return dojo.html._sumPixelValues(node,["margin-"+side],dojo.html.isPositionAbsolute(node));
};
dojo.html.getPaddingExtent=function(node,side){
return dojo.html._sumPixelValues(node,["padding-"+side],true);
};
dojo.html.getPadding=function(node){
return {width:dojo.html._sumPixelValues(node,["padding-left","padding-right"],true),height:dojo.html._sumPixelValues(node,["padding-top","padding-bottom"],true)};
};
dojo.html.getPadBorder=function(node){
var pad=dojo.html.getPadding(node);
var _53f=dojo.html.getBorder(node);
return {width:pad.width+_53f.width,height:pad.height+_53f.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 _544;
if(!h.ie){
_544=dojo.html.getStyle(node,"-moz-box-sizing");
if(!_544){
_544=dojo.html.getStyle(node,"box-sizing");
}
}
return (_544?_544: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 _549=dojo.html.getBorder(node);
return {width:box.width-_549.width,height:box.height-_549.height};
};
dojo.html.getContentBox=function(node){
node=dojo.byId(node);
var _54b=dojo.html.getPadBorder(node);
return {width:node.offsetWidth-_54b.width,height:node.offsetHeight-_54b.height};
};
dojo.html.setContentBox=function(node,args){
node=dojo.byId(node);
var _54e=0;
var _54f=0;
var isbb=dojo.html.isBorderBox(node);
var _551=(isbb?dojo.html.getPadBorder(node):{width:0,height:0});
var ret={};
if(typeof args.width!="undefined"){
_54e=args.width+_551.width;
ret.width=dojo.html.setPositivePixelValue(node,"width",_54e);
}
if(typeof args.height!="undefined"){
_54f=args.height+_551.height;
ret.height=dojo.html.setPositivePixelValue(node,"height",_54f);
}
return ret;
};
dojo.html.getMarginBox=function(node){
var _554=dojo.html.getBorderBox(node);
var _555=dojo.html.getMargin(node);
return {width:_554.width+_555.width,height:_554.height+_555.height};
};
dojo.html.setMarginBox=function(node,args){
node=dojo.byId(node);
var _558=0;
var _559=0;
var isbb=dojo.html.isBorderBox(node);
var _55b=(!isbb?dojo.html.getPadBorder(node):{width:0,height:0});
var _55c=dojo.html.getMargin(node);
var ret={};
if(typeof args.width!="undefined"){
_558=args.width-_55b.width;
_558-=_55c.width;
ret.width=dojo.html.setPositivePixelValue(node,"width",_558);
}
if(typeof args.height!="undefined"){
_559=args.height-_55b.height;
_559-=_55c.height;
ret.height=dojo.html.setPositivePixelValue(node,"height",_559);
}
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(_561,_562,_563){
if(_561 instanceof Array||typeof _561=="array"){
dojo.deprecated("dojo.html.toCoordinateArray","use dojo.html.toCoordinateObject({left: , top: , width: , height: }) instead","0.5");
while(_561.length<4){
_561.push(0);
}
while(_561.length>4){
_561.pop();
}
var ret={left:_561[0],top:_561[1],width:_561[2],height:_561[3]};
}else{
if(!_561.nodeType&&!(_561 instanceof String||typeof _561=="string")&&("width" in _561||"height" in _561||"left" in _561||"x" in _561||"top" in _561||"y" in _561)){
var ret={left:_561.left||_561.x||0,top:_561.top||_561.y||0,width:_561.width||0,height:_561.height||0};
}else{
var node=dojo.byId(_561);
var pos=dojo.html.abs(node,_562,_563);
var _567=dojo.html.getMarginBox(node);
var ret={left:pos.left,top:pos.top,width:_567.width,height:_567.height};
}
}
ret.x=ret.left;
ret.y=ret.top;
return ret;
};
dojo.html.setMarginBoxWidth=dojo.html.setOuterWidth=function(node,_569){
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,_56c){
return dojo.html._callDeprecated("getTotalOffset","getAbsolutePosition",arguments,null,type);
};
dojo.html.getAbsoluteX=function(node,_56e){
return dojo.html._callDeprecated("getAbsoluteX","getAbsolutePosition",arguments,null,"x");
};
dojo.html.getAbsoluteY=function(node,_570){
return dojo.html._callDeprecated("getAbsoluteY","getAbsolutePosition",arguments,null,"y");
};
dojo.html.totalOffsetLeft=function(node,_572){
return dojo.html._callDeprecated("totalOffsetLeft","getAbsolutePosition",arguments,null,"left");
};
dojo.html.totalOffsetTop=function(node,_574){
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,_57e){
return dojo.html._callDeprecated("setContentBoxWidth","setContentBox",arguments,"width");
};
dojo.html.setContentBoxHeight=dojo.html.setContentHeight=function(node,_580){
return dojo.html._callDeprecated("setContentBoxHeight","setContentBox",arguments,"height");
};
dojo.provide("dojo.html.util");
dojo.html.getElementWindow=function(_581){
return dojo.html.getDocumentWindow(_581.ownerDocument);
};
dojo.html.getDocumentWindow=function(doc){
if(dojo.render.html.safari&&!doc._parentWindow){
var fix=function(win){
win.document._parentWindow=win;
for(var i=0;i<win.frames.length;i++){
fix(win.frames[i]);
}
};
fix(window.top);
}
if(dojo.render.html.ie&&window!==document.parentWindow&&!doc._parentWindow){
doc.parentWindow.execScript("document._parentWindow = window;","Javascript");
var win=doc._parentWindow;
doc._parentWindow=null;
return win;
}
return doc._parentWindow||doc.parentWindow||doc.defaultView;
};
dojo.html.gravity=function(node,e){
node=dojo.byId(node);
var _589=dojo.html.getCursorPosition(e);
with(dojo.html){
var _58a=getAbsolutePosition(node,true);
var bb=getBorderBox(node);
var _58c=_58a.x+(bb.width/2);
var _58d=_58a.y+(bb.height/2);
}
with(dojo.html.gravity){
return ((_589.x<_58c?WEST:EAST)|(_589.y<_58d?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(_58e,e){
_58e=dojo.byId(_58e);
var _590=dojo.html.getCursorPosition(e);
var bb=dojo.html.getBorderBox(_58e);
var _592=dojo.html.getAbsolutePosition(_58e,true,dojo.html.boxSizing.BORDER_BOX);
var top=_592.y;
var _594=top+bb.height;
var left=_592.x;
var _596=left+bb.width;
return (_590.x>=left&&_590.x<=_596&&_590.y>=top&&_590.y<=_594);
};
dojo.html.renderedTextContent=function(node){
node=dojo.byId(node);
var _598="";
if(node==null){
return _598;
}
for(var i=0;i<node.childNodes.length;i++){
switch(node.childNodes[i].nodeType){
case 1:
case 5:
var _59a="unknown";
try{
_59a=dojo.html.getStyle(node.childNodes[i],"display");
}
catch(E){
}
switch(_59a){
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":
_598+="\n";
_598+=dojo.html.renderedTextContent(node.childNodes[i]);
_598+="\n";
break;
case "none":
break;
default:
if(node.childNodes[i].tagName&&node.childNodes[i].tagName.toLowerCase()=="br"){
_598+="\n";
}else{
_598+=dojo.html.renderedTextContent(node.childNodes[i]);
}
break;
}
break;
case 3:
case 2:
case 4:
var text=node.childNodes[i].nodeValue;
var _59c="unknown";
try{
_59c=dojo.html.getStyle(node,"text-transform");
}
catch(E){
}
switch(_59c){
case "capitalize":
var _59d=text.split(" ");
for(var i=0;i<_59d.length;i++){
_59d[i]=_59d[i].charAt(0).toUpperCase()+_59d[i].substring(1);
}
text=_59d.join(" ");
break;
case "uppercase":
text=text.toUpperCase();
break;
case "lowercase":
text=text.toLowerCase();
break;
default:
break;
}
switch(_59c){
case "nowrap":
break;
case "pre-wrap":
break;
case "pre-line":
break;
case "pre":
break;
default:
text=text.replace(/\s+/," ");
if(/\s$/.test(_598)){
text.replace(/^\s/,"");
}
break;
}
_598+=text;
break;
default:
break;
}
}
return _598;
};
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 _5a1="none";
if((/^<t[dh][\s\r\n>]/i).test(txt.replace(/^\s+/))){
txt="<table><tbody><tr>"+txt+"</tr></tbody></table>";
_5a1="cell";
}else{
if((/^<tr[\s\r\n>]/i).test(txt.replace(/^\s+/))){
txt="<table><tbody>"+txt+"</tbody></table>";
_5a1="row";
}else{
if((/^<(thead|tbody|tfoot)[\s\r\n>]/i).test(txt.replace(/^\s+/))){
txt="<table>"+txt+"</table>";
_5a1="section";
}
}
}
tn.innerHTML=txt;
if(tn["normalize"]){
tn.normalize();
}
var _5a2=null;
switch(_5a1){
case "cell":
_5a2=tn.getElementsByTagName("tr")[0];
break;
case "row":
_5a2=tn.getElementsByTagName("tbody")[0];
break;
case "section":
_5a2=tn.getElementsByTagName("table")[0];
break;
default:
_5a2=tn;
break;
}
var _5a3=[];
for(var x=0;x<_5a2.childNodes.length;x++){
_5a3.push(_5a2.childNodes[x].cloneNode(true));
}
tn.style.display="none";
dojo.html.destroyNode(tn);
return _5a3;
};
dojo.html.placeOnScreen=function(node,_5a6,_5a7,_5a8,_5a9,_5aa,_5ab){
if(_5a6 instanceof Array||typeof _5a6=="array"){
_5ab=_5aa;
_5aa=_5a9;
_5a9=_5a8;
_5a8=_5a7;
_5a7=_5a6[1];
_5a6=_5a6[0];
}
if(_5aa instanceof String||typeof _5aa=="string"){
_5aa=_5aa.split(",");
}
if(!isNaN(_5a8)){
_5a8=[Number(_5a8),Number(_5a8)];
}else{
if(!(_5a8 instanceof Array||typeof _5a8=="array")){
_5a8=[0,0];
}
}
var _5ac=dojo.html.getScroll().offset;
var view=dojo.html.getViewport();
node=dojo.byId(node);
var _5ae=node.style.display;
node.style.display="";
var bb=dojo.html.getBorderBox(node);
var w=bb.width;
var h=bb.height;
node.style.display=_5ae;
if(!(_5aa instanceof Array||typeof _5aa=="array")){
_5aa=["TL"];
}
var _5b2,_5b3,_5b4=Infinity,_5b5;
for(var _5b6=0;_5b6<_5aa.length;++_5b6){
var _5b7=_5aa[_5b6];
var _5b8=true;
var tryX=_5a6-(_5b7.charAt(1)=="L"?0:w)+_5a8[0]*(_5b7.charAt(1)=="L"?1:-1);
var tryY=_5a7-(_5b7.charAt(0)=="T"?0:h)+_5a8[1]*(_5b7.charAt(0)=="T"?1:-1);
if(_5a9){
tryX-=_5ac.x;
tryY-=_5ac.y;
}
if(tryX<0){
tryX=0;
_5b8=false;
}
if(tryY<0){
tryY=0;
_5b8=false;
}
var x=tryX+w;
if(x>view.width){
x=view.width-w;
_5b8=false;
}else{
x=tryX;
}
x=Math.max(_5a8[0],x)+_5ac.x;
var y=tryY+h;
if(y>view.height){
y=view.height-h;
_5b8=false;
}else{
y=tryY;
}
y=Math.max(_5a8[1],y)+_5ac.y;
if(_5b8){
_5b2=x;
_5b3=y;
_5b4=0;
_5b5=_5b7;
break;
}else{
var dist=Math.pow(x-tryX-_5ac.x,2)+Math.pow(y-tryY-_5ac.y,2);
if(_5b4>dist){
_5b4=dist;
_5b2=x;
_5b3=y;
_5b5=_5b7;
}
}
}
if(!_5ab){
node.style.left=_5b2+"px";
node.style.top=_5b3+"px";
}
return {left:_5b2,top:_5b3,x:_5b2,y:_5b3,dist:_5b4,corner:_5b5};
};
dojo.html.placeOnScreenPoint=function(node,_5bf,_5c0,_5c1,_5c2){
dojo.deprecated("dojo.html.placeOnScreenPoint","use dojo.html.placeOnScreen() instead","0.5");
return dojo.html.placeOnScreen(node,_5bf,_5c0,_5c1,_5c2,["TL","TR","BL","BR"]);
};
dojo.html.placeOnScreenAroundElement=function(node,_5c4,_5c5,_5c6,_5c7,_5c8){
var best,_5ca=Infinity;
_5c4=dojo.byId(_5c4);
var _5cb=_5c4.style.display;
_5c4.style.display="";
var mb=dojo.html.getElementBox(_5c4,_5c6);
var _5cd=mb.width;
var _5ce=mb.height;
var _5cf=dojo.html.getAbsolutePosition(_5c4,true,_5c6);
_5c4.style.display=_5cb;
for(var _5d0 in _5c7){
var pos,_5d2,_5d3;
var _5d4=_5c7[_5d0];
_5d2=_5cf.x+(_5d0.charAt(1)=="L"?0:_5cd);
_5d3=_5cf.y+(_5d0.charAt(0)=="T"?0:_5ce);
pos=dojo.html.placeOnScreen(node,_5d2,_5d3,_5c5,true,_5d4,true);
if(pos.dist==0){
best=pos;
break;
}else{
if(_5ca>pos.dist){
_5ca=pos.dist;
best=pos;
}
}
}
if(!_5c8){
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 _5d6=node.parentNode;
var _5d7=_5d6.scrollTop+dojo.html.getBorderBox(_5d6).height;
var _5d8=node.offsetTop+dojo.html.getMarginBox(node).height;
if(_5d7<_5d8){
_5d6.scrollTop+=(_5d8-_5d7);
}else{
if(_5d6.scrollTop>node.offsetTop){
_5d6.scrollTop-=(_5d6.scrollTop-node.offsetTop);
}
}
}
}
};
dojo.provide("dojo.gfx.color");
dojo.gfx.color.Color=function(r,g,b,a){
if(dojo.lang.isArray(r)){
this.r=r[0];
this.g=r[1];
this.b=r[2];
this.a=r[3]||1;
}else{
if(dojo.lang.isString(r)){
var rgb=dojo.gfx.color.extractRGB(r);
this.r=rgb[0];
this.g=rgb[1];
this.b=rgb[2];
this.a=g||1;
}else{
if(r instanceof dojo.gfx.color.Color){
this.r=r.r;
this.b=r.b;
this.g=r.g;
this.a=r.a;
}else{
this.r=r;
this.g=g;
this.b=b;
this.a=a;
}
}
}
};
dojo.gfx.color.Color.fromArray=function(arr){
return new dojo.gfx.color.Color(arr[0],arr[1],arr[2],arr[3]);
};
dojo.extend(dojo.gfx.color.Color,{toRgb:function(_5df){
if(_5df){
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(_5e0,_5e1){
var rgb=null;
if(dojo.lang.isArray(_5e0)){
rgb=_5e0;
}else{
if(_5e0 instanceof dojo.gfx.color.Color){
rgb=_5e0.toRgb();
}else{
rgb=new dojo.gfx.color.Color(_5e0).toRgb();
}
}
return dojo.gfx.color.blend(this.toRgb(),rgb,_5e1);
}});
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,_5e5){
if(typeof a=="string"){
return dojo.gfx.color.blendHex(a,b,_5e5);
}
if(!_5e5){
_5e5=0;
}
_5e5=Math.min(Math.max(-1,_5e5),1);
_5e5=((_5e5+1)/2);
var c=[];
for(var x=0;x<3;x++){
c[x]=parseInt(b[x]+((a[x]-b[x])*_5e5));
}
return c;
};
dojo.gfx.color.blendHex=function(a,b,_5ea){
return dojo.gfx.color.rgb2hex(dojo.gfx.color.blend(dojo.gfx.color.hex2rgb(a),dojo.gfx.color.hex2rgb(b),_5ea));
};
dojo.gfx.color.extractRGB=function(_5eb){
var hex="0123456789abcdef";
_5eb=_5eb.toLowerCase();
if(_5eb.indexOf("rgb")==0){
var _5ed=_5eb.match(/rgba*\((\d+), *(\d+), *(\d+)/i);
var ret=_5ed.splice(1,3);
return ret;
}else{
var _5ef=dojo.gfx.color.hex2rgb(_5eb);
if(_5ef){
return _5ef;
}else{
return dojo.gfx.color.named[_5eb]||[255,255,255];
}
}
};
dojo.gfx.color.hex2rgb=function(hex){
var _5f1="0123456789ABCDEF";
var rgb=new Array(3);
if(hex.indexOf("#")==0){
hex=hex.substring(1);
}
hex=hex.toUpperCase();
if(hex.replace(new RegExp("["+_5f1+"]","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]=_5f1.indexOf(rgb[i].charAt(0))*16+_5f1.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(_5fa,end){
this.start=_5fa;
this.end=end;
if(dojo.lang.isArray(_5fa)){
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-_5fa;
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,_60a,_60b){
if(!_60b){
_60b=_60a;
_60a=this;
}
_60b=dojo.lang.hitch(_60a,_60b);
var _60c=this[evt]||function(){
};
this[evt]=function(){
var ret=_60c.apply(this,arguments);
_60b.apply(this,arguments);
return ret;
};
return this;
},fire:function(evt,args){
if(this[evt]){
this[evt].apply(this,(args||[]));
}
return this;
},repeat:function(_610){
this.repeatCount=_610;
return this;
},_active:false,_paused:false});
dojo.lfx.Animation=function(_611,_612,_613,_614,_615,rate){
dojo.lfx.IAnimation.call(this);
if(dojo.lang.isNumber(_611)||(!_611&&_612.getValue)){
rate=_615;
_615=_614;
_614=_613;
_613=_612;
_612=_611;
_611=null;
}else{
if(_611.getValue||dojo.lang.isArray(_611)){
rate=_614;
_615=_613;
_614=_612;
_613=_611;
_612=null;
_611=null;
}
}
if(dojo.lang.isArray(_613)){
this.curve=new dojo.lfx.Line(_613[0],_613[1]);
}else{
this.curve=_613;
}
if(_612!=null&&_612>0){
this.duration=_612;
}
if(_615){
this.repeatCount=_615;
}
if(rate){
this.rate=rate;
}
if(_611){
dojo.lang.forEach(["handler","beforeBegin","onBegin","onEnd","onPlay","onStop","onAnimate"],function(item){
if(_611[item]){
this.connect(item,_611[item]);
}
},this);
}
if(_614&&dojo.lang.isFunction(_614)){
this.easing=_614;
}
};
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(_618,_619){
if(_619){
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(_618>0){
setTimeout(dojo.lang.hitch(this,function(){
this.play(null,_619);
}),_618);
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 _61b=this.curve.getValue(step);
if(this._percent==0){
if(!this._startRepeatCount){
this._startRepeatCount=this.repeatCount;
}
this.fire("handler",["begin",_61b]);
this.fire("onBegin",[_61b]);
}
this.fire("handler",["play",_61b]);
this.fire("onPlay",[_61b]);
this._cycle();
return this;
},pause:function(){
clearTimeout(this._timer);
if(!this._active){
return this;
}
this._paused=true;
var _61c=this.curve.getValue(this._percent/100);
this.fire("handler",["pause",_61c]);
this.fire("onPause",[_61c]);
return this;
},gotoPercent:function(pct,_61e){
clearTimeout(this._timer);
this._active=true;
this._paused=true;
this._percent=pct;
if(_61e){
this.play();
}
return this;
},stop:function(_61f){
clearTimeout(this._timer);
var step=this._percent/100;
if(_61f){
step=1;
}
var _621=this.curve.getValue(step);
this.fire("handler",["stop",_621]);
this.fire("onStop",[_621]);
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 _624=this.curve.getValue(step);
this.fire("handler",["animate",_624]);
this.fire("onAnimate",[_624]);
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(_625){
dojo.lfx.IAnimation.call(this);
this._anims=[];
this._animsEnded=0;
var _626=arguments;
if(_626.length==1&&(dojo.lang.isArray(_626[0])||dojo.lang.isArrayLike(_626[0]))){
_626=_626[0];
}
dojo.lang.forEach(_626,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(_628,_629){
if(!this._anims.length){
return this;
}
this.fire("beforeBegin");
if(_628>0){
setTimeout(dojo.lang.hitch(this,function(){
this.play(null,_629);
}),_628);
return this;
}
if(_629||this._anims[0].percent==0){
this.fire("onBegin");
}
this.fire("onPlay");
this._animsCall("play",null,_629);
return this;
},pause:function(){
this.fire("onPause");
this._animsCall("pause");
return this;
},stop:function(_62a){
this.fire("onStop");
this._animsCall("stop",_62a);
return this;
},_onAnimsEnded:function(){
this._animsEnded++;
if(this._animsEnded>=this._anims.length){
this.fire("onEnd");
}
return this;
},_animsCall:function(_62b){
var args=[];
if(arguments.length>1){
for(var i=1;i<arguments.length;i++){
args.push(arguments[i]);
}
}
var _62e=this;
dojo.lang.forEach(this._anims,function(anim){
anim[_62b](args);
},_62e);
return this;
}});
dojo.lfx.Chain=function(_630){
dojo.lfx.IAnimation.call(this);
this._anims=[];
this._currAnim=-1;
var _631=arguments;
if(_631.length==1&&(dojo.lang.isArray(_631[0])||dojo.lang.isArrayLike(_631[0]))){
_631=_631[0];
}
var _632=this;
dojo.lang.forEach(_631,function(anim,i,_635){
this._anims.push(anim);
if(i<_635.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(_636,_637){
if(!this._anims.length){
return this;
}
if(_637||!this._anims[this._currAnim]){
this._currAnim=0;
}
var _638=this._anims[this._currAnim];
this.fire("beforeBegin");
if(_636>0){
setTimeout(dojo.lang.hitch(this,function(){
this.play(null,_637);
}),_636);
return this;
}
if(_638){
if(this._currAnim==0){
this.fire("handler",["begin",this._currAnim]);
this.fire("onBegin",[this._currAnim]);
}
this.fire("onPlay",[this._currAnim]);
_638.play(null,_637);
}
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 _639=this._anims[this._currAnim];
if(_639){
if(!_639._active||_639._paused){
this.play();
}else{
this.pause();
}
}
return this;
},stop:function(){
var _63a=this._anims[this._currAnim];
if(_63a){
_63a.stop();
this.fire("onStop",[this._currAnim]);
}
return _63a;
},_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(_63b){
var _63c=arguments;
if(dojo.lang.isArray(arguments[0])){
_63c=arguments[0];
}
if(_63c.length==1){
return _63c[0];
}
return new dojo.lfx.Combine(_63c);
};
dojo.lfx.chain=function(_63d){
var _63e=arguments;
if(dojo.lang.isArray(arguments[0])){
_63e=arguments[0];
}
if(_63e.length==1){
return _63e[0];
}
return new dojo.lfx.Chain(_63e);
};
dojo.provide("dojo.html.color");
dojo.html.getBackgroundColor=function(node){
node=dojo.byId(node);
var _640;
do{
_640=dojo.html.getStyle(node,"background-color");
if(_640.toLowerCase()=="rgba(0, 0, 0, 0)"){
_640="transparent";
}
if(node==document.getElementsByTagName("body")[0]){
node=null;
break;
}
node=node.parentNode;
}while(node&&dojo.lang.inArray(["transparent",""],_640));
if(_640=="transparent"){
_640=[255,255,255,0];
}else{
_640=dojo.gfx.color.extractRGB(_640);
}
return _640;
};
dojo.provide("dojo.lfx.html");
dojo.lfx.html._byId=function(_641){
if(!_641){
return [];
}
if(dojo.lang.isArrayLike(_641)){
if(!_641.alreadyChecked){
var n=[];
dojo.lang.forEach(_641,function(node){
n.push(dojo.byId(node));
});
n.alreadyChecked=true;
return n;
}else{
return _641;
}
}else{
var n=[];
n.push(dojo.byId(_641));
n.alreadyChecked=true;
return n;
}
};
dojo.lfx.html.propertyAnimation=function(_644,_645,_646,_647,_648){
_644=dojo.lfx.html._byId(_644);
var _649={"propertyMap":_645,"nodes":_644,"duration":_646,"easing":_647||dojo.lfx.easeDefault};
var _64a=function(args){
if(args.nodes.length==1){
var pm=args.propertyMap;
if(!dojo.lang.isArray(args.propertyMap)){
var parr=[];
for(var _64e in pm){
pm[_64e].property=_64e;
parr.push(pm[_64e]);
}
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 _650=function(_651){
var _652=[];
dojo.lang.forEach(_651,function(c){
_652.push(Math.round(c));
});
return _652;
};
var _654=function(n,_656){
n=dojo.byId(n);
if(!n||!n.style){
return;
}
for(var s in _656){
try{
if(s=="opacity"){
dojo.html.setOpacity(n,_656[s]);
}else{
n.style[s]=_656[s];
}
}
catch(e){
dojo.debug(e);
}
}
};
var _658=function(_659){
this._properties=_659;
this.diffs=new Array(_659.length);
dojo.lang.forEach(_659,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 _660=null;
if(dojo.lang.isArray(prop.start)){
}else{
if(prop.start instanceof dojo.gfx.color.Color){
_660=(prop.units||"rgb")+"(";
for(var j=0;j<prop.startRgb.length;j++){
_660+=Math.round(((prop.endRgb[j]-prop.startRgb[j])*n)+prop.startRgb[j])+(j<prop.startRgb.length-1?",":"");
}
_660+=")";
}else{
_660=((this.diffs[i])*n)+prop.start+(prop.property!="opacity"?prop.units||"px":"");
}
}
ret[dojo.html.toCamelCase(prop.property)]=_660;
},this);
return ret;
};
};
var anim=new dojo.lfx.Animation({beforeBegin:function(){
_64a(_649);
anim.curve=new _658(_649.propertyMap);
},onAnimate:function(_663){
dojo.lang.forEach(_649.nodes,function(node){
_654(node,_663);
});
}},_649.duration,null,_649.easing);
if(_648){
for(var x in _648){
if(dojo.lang.isFunction(_648[x])){
anim.connect(x,anim,_648[x]);
}
}
}
return anim;
};
dojo.lfx.html._makeFadeable=function(_666){
var _667=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(_666)){
dojo.lang.forEach(_666,_667);
}else{
_667(_666);
}
};
dojo.lfx.html.fade=function(_669,_66a,_66b,_66c,_66d){
_669=dojo.lfx.html._byId(_669);
var _66e={property:"opacity"};
if(!dj_undef("start",_66a)){
_66e.start=_66a.start;
}else{
_66e.start=function(){
return dojo.html.getOpacity(_669[0]);
};
}
if(!dj_undef("end",_66a)){
_66e.end=_66a.end;
}else{
dojo.raise("dojo.lfx.html.fade needs an end value");
}
var anim=dojo.lfx.propertyAnimation(_669,[_66e],_66b,_66c);
anim.connect("beforeBegin",function(){
dojo.lfx.html._makeFadeable(_669);
});
if(_66d){
anim.connect("onEnd",function(){
_66d(_669,anim);
});
}
return anim;
};
dojo.lfx.html.fadeIn=function(_670,_671,_672,_673){
return dojo.lfx.html.fade(_670,{end:1},_671,_672,_673);
};
dojo.lfx.html.fadeOut=function(_674,_675,_676,_677){
return dojo.lfx.html.fade(_674,{end:0},_675,_676,_677);
};
dojo.lfx.html.fadeShow=function(_678,_679,_67a,_67b){
_678=dojo.lfx.html._byId(_678);
dojo.lang.forEach(_678,function(node){
dojo.html.setOpacity(node,0);
});
var anim=dojo.lfx.html.fadeIn(_678,_679,_67a,_67b);
anim.connect("beforeBegin",function(){
if(dojo.lang.isArrayLike(_678)){
dojo.lang.forEach(_678,dojo.html.show);
}else{
dojo.html.show(_678);
}
});
return anim;
};
dojo.lfx.html.fadeHide=function(_67e,_67f,_680,_681){
var anim=dojo.lfx.html.fadeOut(_67e,_67f,_680,function(){
if(dojo.lang.isArrayLike(_67e)){
dojo.lang.forEach(_67e,dojo.html.hide);
}else{
dojo.html.hide(_67e);
}
if(_681){
_681(_67e,anim);
}
});
return anim;
};
dojo.lfx.html.wipeIn=function(_683,_684,_685,_686){
_683=dojo.lfx.html._byId(_683);
var _687=[];
dojo.lang.forEach(_683,function(node){
var _689={};
var _68a,_68b,_68c;
with(node.style){
_68a=top;
_68b=left;
_68c=position;
top="-9999px";
left="-9999px";
position="absolute";
display="";
}
var _68d=dojo.html.getBorderBox(node).height;
with(node.style){
top=_68a;
left=_68b;
position=_68c;
display="none";
}
var anim=dojo.lfx.propertyAnimation(node,{"height":{start:1,end:function(){
return _68d;
}}},_684,_685);
anim.connect("beforeBegin",function(){
_689.overflow=node.style.overflow;
_689.height=node.style.height;
with(node.style){
overflow="hidden";
height="1px";
}
dojo.html.show(node);
});
anim.connect("onEnd",function(){
with(node.style){
overflow=_689.overflow;
height=_689.height;
}
if(_686){
_686(node,anim);
}
});
_687.push(anim);
});
return dojo.lfx.combine(_687);
};
dojo.lfx.html.wipeOut=function(_68f,_690,_691,_692){
_68f=dojo.lfx.html._byId(_68f);
var _693=[];
dojo.lang.forEach(_68f,function(node){
var _695={};
var anim=dojo.lfx.propertyAnimation(node,{"height":{start:function(){
return dojo.html.getContentBox(node).height;
},end:1}},_690,_691,{"beforeBegin":function(){
_695.overflow=node.style.overflow;
_695.height=node.style.height;
with(node.style){
overflow="hidden";
}
dojo.html.show(node);
},"onEnd":function(){
dojo.html.hide(node);
with(node.style){
overflow=_695.overflow;
height=_695.height;
}
if(_692){
_692(node,anim);
}
}});
_693.push(anim);
});
return dojo.lfx.combine(_693);
};
dojo.lfx.html.slideTo=function(_697,_698,_699,_69a,_69b){
_697=dojo.lfx.html._byId(_697);
var _69c=[];
var _69d=dojo.html.getComputedStyle;
if(dojo.lang.isArray(_698)){
dojo.deprecated("dojo.lfx.html.slideTo(node, array)","use dojo.lfx.html.slideTo(node, {top: value, left: value});","0.5");
_698={top:_698[0],left:_698[1]};
}
dojo.lang.forEach(_697,function(node){
var top=null;
var left=null;
var init=(function(){
var _6a2=node;
return function(){
var pos=_69d(_6a2,"position");
top=(pos=="absolute"?node.offsetTop:parseInt(_69d(node,"top"))||0);
left=(pos=="absolute"?node.offsetLeft:parseInt(_69d(node,"left"))||0);
if(!dojo.lang.inArray(["absolute","relative"],pos)){
var ret=dojo.html.abs(_6a2,true);
dojo.html.setStyleAttributes(_6a2,"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:(_698.top||0)},"left":{start:left,end:(_698.left||0)}},_699,_69a,{"beforeBegin":init});
if(_69b){
anim.connect("onEnd",function(){
_69b(_697,anim);
});
}
_69c.push(anim);
});
return dojo.lfx.combine(_69c);
};
dojo.lfx.html.slideBy=function(_6a6,_6a7,_6a8,_6a9,_6aa){
_6a6=dojo.lfx.html._byId(_6a6);
var _6ab=[];
var _6ac=dojo.html.getComputedStyle;
if(dojo.lang.isArray(_6a7)){
dojo.deprecated("dojo.lfx.html.slideBy(node, array)","use dojo.lfx.html.slideBy(node, {top: value, left: value});","0.5");
_6a7={top:_6a7[0],left:_6a7[1]};
}
dojo.lang.forEach(_6a6,function(node){
var top=null;
var left=null;
var init=(function(){
var _6b1=node;
return function(){
var pos=_6ac(_6b1,"position");
top=(pos=="absolute"?node.offsetTop:parseInt(_6ac(node,"top"))||0);
left=(pos=="absolute"?node.offsetLeft:parseInt(_6ac(node,"left"))||0);
if(!dojo.lang.inArray(["absolute","relative"],pos)){
var ret=dojo.html.abs(_6b1,true);
dojo.html.setStyleAttributes(_6b1,"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+(_6a7.top||0)},"left":{start:left,end:left+(_6a7.left||0)}},_6a8,_6a9).connect("beforeBegin",init);
if(_6aa){
anim.connect("onEnd",function(){
_6aa(_6a6,anim);
});
}
_6ab.push(anim);
});
return dojo.lfx.combine(_6ab);
};
dojo.lfx.html.explode=function(_6b5,_6b6,_6b7,_6b8,_6b9){
var h=dojo.html;
_6b5=dojo.byId(_6b5);
_6b6=dojo.byId(_6b6);
var _6bb=h.toCoordinateObject(_6b5,true);
var _6bc=document.createElement("div");
h.copyStyle(_6bc,_6b6);
if(_6b6.explodeClassName){
_6bc.className=_6b6.explodeClassName;
}
with(_6bc.style){
position="absolute";
display="none";
var _6bd=h.getStyle(_6b5,"background-color");
backgroundColor=_6bd?_6bd.toLowerCase():"transparent";
backgroundColor=(backgroundColor=="transparent")?"rgb(221, 221, 221)":backgroundColor;
}
dojo.body().appendChild(_6bc);
with(_6b6.style){
visibility="hidden";
display="block";
}
var _6be=h.toCoordinateObject(_6b6,true);
with(_6b6.style){
display="none";
visibility="visible";
}
var _6bf={opacity:{start:0.5,end:1}};
dojo.lang.forEach(["height","width","top","left"],function(type){
_6bf[type]={start:_6bb[type],end:_6be[type]};
});
var anim=new dojo.lfx.propertyAnimation(_6bc,_6bf,_6b7,_6b8,{"beforeBegin":function(){
h.setDisplay(_6bc,"block");
},"onEnd":function(){
h.setDisplay(_6b6,"block");
_6bc.parentNode.removeChild(_6bc);
}});
if(_6b9){
anim.connect("onEnd",function(){
_6b9(_6b6,anim);
});
}
return anim;
};
dojo.lfx.html.implode=function(_6c2,end,_6c4,_6c5,_6c6){
var h=dojo.html;
_6c2=dojo.byId(_6c2);
end=dojo.byId(end);
var _6c8=dojo.html.toCoordinateObject(_6c2,true);
var _6c9=dojo.html.toCoordinateObject(end,true);
var _6ca=document.createElement("div");
dojo.html.copyStyle(_6ca,_6c2);
if(_6c2.explodeClassName){
_6ca.className=_6c2.explodeClassName;
}
dojo.html.setOpacity(_6ca,0.3);
with(_6ca.style){
position="absolute";
display="none";
backgroundColor=h.getStyle(_6c2,"background-color").toLowerCase();
}
dojo.body().appendChild(_6ca);
var _6cb={opacity:{start:1,end:0.5}};
dojo.lang.forEach(["height","width","top","left"],function(type){
_6cb[type]={start:_6c8[type],end:_6c9[type]};
});
var anim=new dojo.lfx.propertyAnimation(_6ca,_6cb,_6c4,_6c5,{"beforeBegin":function(){
dojo.html.hide(_6c2);
dojo.html.show(_6ca);
},"onEnd":function(){
_6ca.parentNode.removeChild(_6ca);
}});
if(_6c6){
anim.connect("onEnd",function(){
_6c6(_6c2,anim);
});
}
return anim;
};
dojo.lfx.html.highlight=function(_6ce,_6cf,_6d0,_6d1,_6d2){
_6ce=dojo.lfx.html._byId(_6ce);
var _6d3=[];
dojo.lang.forEach(_6ce,function(node){
var _6d5=dojo.html.getBackgroundColor(node);
var bg=dojo.html.getStyle(node,"background-color").toLowerCase();
var _6d7=dojo.html.getStyle(node,"background-image");
var _6d8=(bg=="transparent"||bg=="rgba(0, 0, 0, 0)");
while(_6d5.length>3){
_6d5.pop();
}
var rgb=new dojo.gfx.color.Color(_6cf);
var _6da=new dojo.gfx.color.Color(_6d5);
var anim=dojo.lfx.propertyAnimation(node,{"background-color":{start:rgb,end:_6da}},_6d0,_6d1,{"beforeBegin":function(){
if(_6d7){
node.style.backgroundImage="none";
}
node.style.backgroundColor="rgb("+rgb.toRgb().join(",")+")";
},"onEnd":function(){
if(_6d7){
node.style.backgroundImage=_6d7;
}
if(_6d8){
node.style.backgroundColor="transparent";
}
if(_6d2){
_6d2(node,anim);
}
}});
_6d3.push(anim);
});
return dojo.lfx.combine(_6d3);
};
dojo.lfx.html.unhighlight=function(_6dc,_6dd,_6de,_6df,_6e0){
_6dc=dojo.lfx.html._byId(_6dc);
var _6e1=[];
dojo.lang.forEach(_6dc,function(node){
var _6e3=new dojo.gfx.color.Color(dojo.html.getBackgroundColor(node));
var rgb=new dojo.gfx.color.Color(_6dd);
var _6e5=dojo.html.getStyle(node,"background-image");
var anim=dojo.lfx.propertyAnimation(node,{"background-color":{start:_6e3,end:rgb}},_6de,_6df,{"beforeBegin":function(){
if(_6e5){
node.style.backgroundImage="none";
}
node.style.backgroundColor="rgb("+_6e3.toRgb().join(",")+")";
},"onEnd":function(){
if(_6e0){
_6e0(node,anim);
}
}});
_6e1.push(anim);
});
return dojo.lfx.combine(_6e1);
};
dojo.lang.mixin(dojo.lfx,dojo.lfx.html);
dojo.kwCompoundRequire({browser:["dojo.lfx.html"],dashboard:["dojo.lfx.html"]});
dojo.provide("dojo.lfx.*");
dojo.provide("dojo.lfx.toggle");
dojo.lfx.toggle.plain={show:function(node,_6e8,_6e9,_6ea){
dojo.html.show(node);
if(dojo.lang.isFunction(_6ea)){
_6ea();
}
},hide:function(node,_6ec,_6ed,_6ee){
dojo.html.hide(node);
if(dojo.lang.isFunction(_6ee)){
_6ee();
}
}};
dojo.lfx.toggle.fade={show:function(node,_6f0,_6f1,_6f2){
dojo.lfx.fadeShow(node,_6f0,_6f1,_6f2).play();
},hide:function(node,_6f4,_6f5,_6f6){
dojo.lfx.fadeHide(node,_6f4,_6f5,_6f6).play();
}};
dojo.lfx.toggle.wipe={show:function(node,_6f8,_6f9,_6fa){
dojo.lfx.wipeIn(node,_6f8,_6f9,_6fa).play();
},hide:function(node,_6fc,_6fd,_6fe){
dojo.lfx.wipeOut(node,_6fc,_6fd,_6fe).play();
}};
dojo.lfx.toggle.explode={show:function(node,_700,_701,_702,_703){
dojo.lfx.explode(_703||{x:0,y:0,width:0,height:0},node,_700,_701,_702).play();
},hide:function(node,_705,_706,_707,_708){
dojo.lfx.implode(node,_708||{x:0,y:0,width:0,height:0},_705,_706,_707).play();
}};
dojo.provide("dojo.widget.HtmlWidget");
dojo.declare("dojo.widget.HtmlWidget",dojo.widget.DomWidget,{templateCssPath:null,templatePath:null,lang:"",toggle:"plain",toggleDuration:150,explodeSrc:null,initialize:function(args,frag){
},postMixInProperties:function(args,frag){
if(this.lang===""){
this.lang=null;
}
this.toggleObj=dojo.lfx.toggle[this.toggle.toLowerCase()]||dojo.lfx.toggle.plain;
},createNodesFromText:function(txt,wrap){
return dojo.html.createNodesFromText(txt,wrap);
},destroyRendering:function(_70f){
try{
if(this.bgIframe){
this.bgIframe.remove();
delete this.bgIframe;
}
if(!_70f&&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 _713=w||wh.width;
var _714=h||wh.height;
if(this.width==_713&&this.height==_714){
return false;
}
this.width=_713;
this.height=_714;
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(_717){
if(_717.checkSize){
_717.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.date.common");
dojo.date.setDayOfYear=function(_718,_719){
_718.setMonth(0);
_718.setDate(_719);
return _718;
};
dojo.date.getDayOfYear=function(_71a){
var _71b=_71a.getFullYear();
var _71c=new Date(_71b-1,11,31);
return Math.floor((_71a.getTime()-_71c.getTime())/86400000);
};
dojo.date.setWeekOfYear=function(_71d,week,_71f){
if(arguments.length==1){
_71f=0;
}
dojo.unimplemented("dojo.date.setWeekOfYear");
};
dojo.date.getWeekOfYear=function(_720,_721){
if(arguments.length==1){
_721=0;
}
var _722=new Date(_720.getFullYear(),0,1);
var day=_722.getDay();
_722.setDate(_722.getDate()-day+_721-(day>_721?7:0));
return Math.floor((_720.getTime()-_722.getTime())/604800000);
};
dojo.date.setIsoWeekOfYear=function(_724,week,_726){
if(arguments.length==1){
_726=1;
}
dojo.unimplemented("dojo.date.setIsoWeekOfYear");
};
dojo.date.getIsoWeekOfYear=function(_727,_728){
if(arguments.length==1){
_728=1;
}
dojo.unimplemented("dojo.date.getIsoWeekOfYear");
};
dojo.date.shortTimezones=["IDLW","BET","HST","MART","AKST","PST","MST","CST","EST","AST","NFT","BST","FST","AT","GMT","CET","EET","MSK","IRT","GST","AFT","AGTT","IST","NPT","ALMT","MMT","JT","AWST","JST","ACST","AEST","LHST","VUT","NFT","NZT","CHAST","PHOT","LINT"];
dojo.date.timezoneOffsets=[-720,-660,-600,-570,-540,-480,-420,-360,-300,-240,-210,-180,-120,-60,0,60,120,180,210,240,270,300,330,345,360,390,420,480,540,570,600,630,660,690,720,765,780,840];
dojo.date.getDaysInMonth=function(_729){
var _72a=_729.getMonth();
var days=[31,28,31,30,31,30,31,31,30,31,30,31];
if(_72a==1&&dojo.date.isLeapYear(_729)){
return 29;
}else{
return days[_72a];
}
};
dojo.date.isLeapYear=function(_72c){
var year=_72c.getFullYear();
return (year%400==0)?true:(year%100==0)?false:(year%4==0)?true:false;
};
dojo.date.getTimezoneName=function(_72e){
var str=_72e.toString();
var tz="";
var _731;
var pos=str.indexOf("(");
if(pos>-1){
pos++;
tz=str.substring(pos,str.indexOf(")"));
}else{
var pat=/([A-Z\/]+) \d{4}$/;
if((_731=str.match(pat))){
tz=_731[1];
}else{
str=_72e.toLocaleString();
pat=/ ([A-Z\/]+)$/;
if((_731=str.match(pat))){
tz=_731[1];
}
}
}
return tz=="AM"||tz=="PM"?"":tz;
};
dojo.date.getOrdinal=function(_734){
var date=_734.getDate();
if(date%100!=11&&date%10==1){
return "st";
}else{
if(date%100!=12&&date%10==2){
return "nd";
}else{
if(date%100!=13&&date%10==3){
return "rd";
}else{
return "th";
}
}
}
};
dojo.date.compareTypes={DATE:1,TIME:2};
dojo.date.compare=function(_736,_737,_738){
var dA=_736;
var dB=_737||new Date();
var now=new Date();
with(dojo.date.compareTypes){
var opt=_738||(DATE|TIME);
var d1=new Date((opt&DATE)?dA.getFullYear():now.getFullYear(),(opt&DATE)?dA.getMonth():now.getMonth(),(opt&DATE)?dA.getDate():now.getDate(),(opt&TIME)?dA.getHours():0,(opt&TIME)?dA.getMinutes():0,(opt&TIME)?dA.getSeconds():0);
var d2=new Date((opt&DATE)?dB.getFullYear():now.getFullYear(),(opt&DATE)?dB.getMonth():now.getMonth(),(opt&DATE)?dB.getDate():now.getDate(),(opt&TIME)?dB.getHours():0,(opt&TIME)?dB.getMinutes():0,(opt&TIME)?dB.getSeconds():0);
}
if(d1.valueOf()>d2.valueOf()){
return 1;
}
if(d1.valueOf()<d2.valueOf()){
return -1;
}
return 0;
};
dojo.date.dateParts={YEAR:0,MONTH:1,DAY:2,HOUR:3,MINUTE:4,SECOND:5,MILLISECOND:6,QUARTER:7,WEEK:8,WEEKDAY:9};
dojo.date.add=function(dt,_740,incr){
if(typeof dt=="number"){
dt=new Date(dt);
}
function fixOvershoot(){
if(sum.getDate()<dt.getDate()){
sum.setDate(0);
}
}
var sum=new Date(dt);
with(dojo.date.dateParts){
switch(_740){
case YEAR:
sum.setFullYear(dt.getFullYear()+incr);
fixOvershoot();
break;
case QUARTER:
incr*=3;
case MONTH:
sum.setMonth(dt.getMonth()+incr);
fixOvershoot();
break;
case WEEK:
incr*=7;
case DAY:
sum.setDate(dt.getDate()+incr);
break;
case WEEKDAY:
var dat=dt.getDate();
var _744=0;
var days=0;
var strt=0;
var trgt=0;
var adj=0;
var mod=incr%5;
if(mod==0){
days=(incr>0)?5:-5;
_744=(incr>0)?((incr-5)/5):((incr+5)/5);
}else{
days=mod;
_744=parseInt(incr/5);
}
strt=dt.getDay();
if(strt==6&&incr>0){
adj=1;
}else{
if(strt==0&&incr<0){
adj=-1;
}
}
trgt=(strt+days);
if(trgt==0||trgt==6){
adj=(incr>0)?2:-2;
}
sum.setDate(dat+(7*_744)+days+adj);
break;
case HOUR:
sum.setHours(sum.getHours()+incr);
break;
case MINUTE:
sum.setMinutes(sum.getMinutes()+incr);
break;
case SECOND:
sum.setSeconds(sum.getSeconds()+incr);
break;
case MILLISECOND:
sum.setMilliseconds(sum.getMilliseconds()+incr);
break;
default:
break;
}
}
return sum;
};
dojo.date.diff=function(dtA,dtB,_74c){
if(typeof dtA=="number"){
dtA=new Date(dtA);
}
if(typeof dtB=="number"){
dtB=new Date(dtB);
}
var _74d=dtB.getFullYear()-dtA.getFullYear();
var _74e=(dtB.getMonth()-dtA.getMonth())+(_74d*12);
var _74f=dtB.getTime()-dtA.getTime();
var _750=_74f/1000;
var _751=_750/60;
var _752=_751/60;
var _753=_752/24;
var _754=_753/7;
var _755=0;
with(dojo.date.dateParts){
switch(_74c){
case YEAR:
_755=_74d;
break;
case QUARTER:
var mA=dtA.getMonth();
var mB=dtB.getMonth();
var qA=Math.floor(mA/3)+1;
var qB=Math.floor(mB/3)+1;
qB+=(_74d*4);
_755=qB-qA;
break;
case MONTH:
_755=_74e;
break;
case WEEK:
_755=parseInt(_754);
break;
case DAY:
_755=_753;
break;
case WEEKDAY:
var days=Math.round(_753);
var _75b=parseInt(days/7);
var mod=days%7;
if(mod==0){
days=_75b*5;
}else{
var adj=0;
var aDay=dtA.getDay();
var bDay=dtB.getDay();
_75b=parseInt(days/7);
mod=days%7;
var _760=new Date(dtA);
_760.setDate(_760.getDate()+(_75b*7));
var _761=_760.getDay();
if(_753>0){
switch(true){
case aDay==6:
adj=-1;
break;
case aDay==0:
adj=0;
break;
case bDay==6:
adj=-1;
break;
case bDay==0:
adj=-2;
break;
case (_761+mod)>5:
adj=-2;
break;
default:
break;
}
}else{
if(_753<0){
switch(true){
case aDay==6:
adj=0;
break;
case aDay==0:
adj=1;
break;
case bDay==6:
adj=2;
break;
case bDay==0:
adj=1;
break;
case (_761+mod)<0:
adj=2;
break;
default:
break;
}
}
}
days+=adj;
days-=(_75b*2);
}
_755=days;
break;
case HOUR:
_755=_752;
break;
case MINUTE:
_755=_751;
break;
case SECOND:
_755=_750;
break;
case MILLISECOND:
_755=_74f;
break;
default:
break;
}
}
return Math.round(_755);
};
dojo.provide("dojo.date.supplemental");
dojo.date.getFirstDayOfWeek=function(_762){
var _763={mv:5,ae:6,af:6,bh:6,dj:6,dz:6,eg:6,er:6,et:6,iq:6,ir:6,jo:6,ke:6,kw:6,lb:6,ly:6,ma:6,om:6,qa:6,sa:6,sd:6,so:6,tn:6,ye:6,as:0,au:0,az:0,bw:0,ca:0,cn:0,fo:0,ge:0,gl:0,gu:0,hk:0,ie:0,il:0,is:0,jm:0,jp:0,kg:0,kr:0,la:0,mh:0,mo:0,mp:0,mt:0,nz:0,ph:0,pk:0,sg:0,th:0,tt:0,tw:0,um:0,us:0,uz:0,vi:0,za:0,zw:0,et:0,mw:0,ng:0,tj:0,gb:0,sy:4};
_762=dojo.hostenv.normalizeLocale(_762);
var _764=_762.split("-")[1];
var dow=_763[_764];
return (typeof dow=="undefined")?1:dow;
};
dojo.date.getWeekend=function(_766){
var _767={eg:5,il:5,sy:5,"in":0,ae:4,bh:4,dz:4,iq:4,jo:4,kw:4,lb:4,ly:4,ma:4,om:4,qa:4,sa:4,sd:4,tn:4,ye:4};
var _768={ae:5,bh:5,dz:5,iq:5,jo:5,kw:5,lb:5,ly:5,ma:5,om:5,qa:5,sa:5,sd:5,tn:5,ye:5,af:5,ir:5,eg:6,il:6,sy:6};
_766=dojo.hostenv.normalizeLocale(_766);
var _769=_766.split("-")[1];
var _76a=_767[_769];
var end=_768[_769];
if(typeof _76a=="undefined"){
_76a=6;
}
if(typeof end=="undefined"){
end=0;
}
return {start:_76a,end:end};
};
dojo.date.isWeekend=function(_76c,_76d){
var _76e=dojo.date.getWeekend(_76d);
var day=(_76c||new Date()).getDay();
if(_76e.end<_76e.start){
_76e.end+=7;
if(day<_76e.start){
day+=7;
}
}
return day>=_76e.start&&day<=_76e.end;
};
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,_776,_777){
var out="";
for(var i=0;i<_776;i++){
out+=str;
if(_777&&i<_776-1){
out+=_777;
}
}
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.i18n.common");
dojo.i18n.getLocalization=function(_785,_786,_787){
dojo.hostenv.preloadLocalizations();
_787=dojo.hostenv.normalizeLocale(_787);
var _788=_787.split("-");
var _789=[_785,"nls",_786].join(".");
var _78a=dojo.hostenv.findModule(_789,true);
var _78b;
for(var i=_788.length;i>0;i--){
var loc=_788.slice(0,i).join("_");
if(_78a[loc]){
_78b=_78a[loc];
break;
}
}
if(!_78b){
_78b=_78a.ROOT;
}
if(_78b){
var _78e=function(){
};
_78e.prototype=_78b;
return new _78e();
}
dojo.raise("Bundle not found: "+_786+" in "+_785+" , locale="+_787);
};
dojo.i18n.isLTR=function(_78f){
var lang=dojo.hostenv.normalizeLocale(_78f).split("-")[0];
var RTL={ar:true,fa:true,he:true,ur:true,yi:true};
return !RTL[lang];
};
dojo.provide("dojo.date.format");
(function(){
dojo.date.format=function(_792,_793){
if(typeof _793=="string"){
dojo.deprecated("dojo.date.format","To format dates with POSIX-style strings, please use dojo.date.strftime instead","0.5");
return dojo.date.strftime(_792,_793);
}
function formatPattern(_794,_795){
return _795.replace(/([a-z])\1*/ig,function(_796){
var s;
var c=_796.charAt(0);
var l=_796.length;
var pad;
var _79b=["abbr","wide","narrow"];
switch(c){
case "G":
if(l>3){
dojo.unimplemented("Era format not implemented");
}
s=info.eras[_794.getFullYear()<0?1:0];
break;
case "y":
s=_794.getFullYear();
switch(l){
case 1:
break;
case 2:
s=String(s).substr(-2);
break;
default:
pad=true;
}
break;
case "Q":
case "q":
s=Math.ceil((_794.getMonth()+1)/3);
switch(l){
case 1:
case 2:
pad=true;
break;
case 3:
case 4:
dojo.unimplemented("Quarter format not implemented");
}
break;
case "M":
case "L":
var m=_794.getMonth();
var _79e;
switch(l){
case 1:
case 2:
s=m+1;
pad=true;
break;
case 3:
case 4:
case 5:
_79e=_79b[l-3];
break;
}
if(_79e){
var type=(c=="L")?"standalone":"format";
var prop=["months",type,_79e].join("-");
s=info[prop][m];
}
break;
case "w":
var _7a1=0;
s=dojo.date.getWeekOfYear(_794,_7a1);
pad=true;
break;
case "d":
s=_794.getDate();
pad=true;
break;
case "D":
s=dojo.date.getDayOfYear(_794);
pad=true;
break;
case "E":
case "e":
case "c":
var d=_794.getDay();
var _79e;
switch(l){
case 1:
case 2:
if(c=="e"){
var _7a3=dojo.date.getFirstDayOfWeek(_793.locale);
d=(d-_7a3+7)%7;
}
if(c!="c"){
s=d+1;
pad=true;
break;
}
case 3:
case 4:
case 5:
_79e=_79b[l-3];
break;
}
if(_79e){
var type=(c=="c")?"standalone":"format";
var prop=["days",type,_79e].join("-");
s=info[prop][d];
}
break;
case "a":
var _7a4=(_794.getHours()<12)?"am":"pm";
s=info[_7a4];
break;
case "h":
case "H":
case "K":
case "k":
var h=_794.getHours();
switch(c){
case "h":
s=(h%12)||12;
break;
case "H":
s=h;
break;
case "K":
s=(h%12);
break;
case "k":
s=h||24;
break;
}
pad=true;
break;
case "m":
s=_794.getMinutes();
pad=true;
break;
case "s":
s=_794.getSeconds();
pad=true;
break;
case "S":
s=Math.round(_794.getMilliseconds()*Math.pow(10,l-3));
break;
case "v":
case "z":
s=dojo.date.getTimezoneName(_794);
if(s){
break;
}
l=4;
case "Z":
var _7a6=_794.getTimezoneOffset();
var tz=[(_7a6<=0?"+":"-"),dojo.string.pad(Math.floor(Math.abs(_7a6)/60),2),dojo.string.pad(Math.abs(_7a6)%60,2)];
if(l==4){
tz.splice(0,0,"GMT");
tz.splice(3,0,":");
}
s=tz.join("");
break;
case "Y":
case "u":
case "W":
case "F":
case "g":
case "A":
dojo.debug(_796+" modifier not yet implemented");
s="?";
break;
default:
dojo.raise("dojo.date.format: invalid pattern char: "+_795);
}
if(pad){
s=dojo.string.pad(s,l);
}
return s;
});
}
_793=_793||{};
var _7a8=dojo.hostenv.normalizeLocale(_793.locale);
var _7a9=_793.formatLength||"full";
var info=dojo.date._getGregorianBundle(_7a8);
var str=[];
var _7ab=dojo.lang.curry(this,formatPattern,_792);
if(_793.selector!="timeOnly"){
var _7ac=_793.datePattern||info["dateFormat-"+_7a9];
if(_7ac){
str.push(_processPattern(_7ac,_7ab));
}
}
if(_793.selector!="dateOnly"){
var _7ad=_793.timePattern||info["timeFormat-"+_7a9];
if(_7ad){
str.push(_processPattern(_7ad,_7ab));
}
}
var _7ae=str.join(" ");
return _7ae;
};
dojo.date.parse=function(_7af,_7b0){
_7b0=_7b0||{};
var _7b1=dojo.hostenv.normalizeLocale(_7b0.locale);
var info=dojo.date._getGregorianBundle(_7b1);
var _7b3=_7b0.formatLength||"full";
if(!_7b0.selector){
_7b0.selector="dateOnly";
}
var _7b4=_7b0.datePattern||info["dateFormat-"+_7b3];
var _7b5=_7b0.timePattern||info["timeFormat-"+_7b3];
var _7b6;
if(_7b0.selector=="dateOnly"){
_7b6=_7b4;
}else{
if(_7b0.selector=="timeOnly"){
_7b6=_7b5;
}else{
if(_7b0.selector=="dateTime"){
_7b6=_7b4+" "+_7b5;
}else{
var msg="dojo.date.parse: Unknown selector param passed: '"+_7b0.selector+"'.";
msg+=" Defaulting to date pattern.";
dojo.debug(msg);
_7b6=_7b4;
}
}
}
var _7b8=[];
var _7b9=_processPattern(_7b6,dojo.lang.curry(this,_buildDateTimeRE,_7b8,info,_7b0));
var _7ba=new RegExp("^"+_7b9+"$");
var _7bb=_7ba.exec(_7af);
if(!_7bb){
return null;
}
var _7bc=["abbr","wide","narrow"];
var _7bd=new Date(1972,0);
var _7be={};
for(var i=1;i<_7bb.length;i++){
var grp=_7b8[i-1];
var l=grp.length;
var v=_7bb[i];
switch(grp.charAt(0)){
case "y":
if(l!=2){
_7bd.setFullYear(v);
_7be.year=v;
}else{
if(v<100){
v=Number(v);
var year=""+new Date().getFullYear();
var _7c4=year.substring(0,2)*100;
var _7c5=Number(year.substring(2,4));
var _7c6=Math.min(_7c5+20,99);
var num=(v<_7c6)?_7c4+v:_7c4-100+v;
_7bd.setFullYear(num);
_7be.year=num;
}else{
if(_7b0.strict){
return null;
}
_7bd.setFullYear(v);
_7be.year=v;
}
}
break;
case "M":
if(l>2){
if(!_7b0.strict){
v=v.replace(/\./g,"");
v=v.toLowerCase();
}
var _7c8=info["months-format-"+_7bc[l-3]].concat();
for(var j=0;j<_7c8.length;j++){
if(!_7b0.strict){
_7c8[j]=_7c8[j].toLowerCase();
}
if(v==_7c8[j]){
_7bd.setMonth(j);
_7be.month=j;
break;
}
}
if(j==_7c8.length){
dojo.debug("dojo.date.parse: Could not parse month name: '"+v+"'.");
return null;
}
}else{
_7bd.setMonth(v-1);
_7be.month=v-1;
}
break;
case "E":
case "e":
if(!_7b0.strict){
v=v.toLowerCase();
}
var days=info["days-format-"+_7bc[l-3]].concat();
for(var j=0;j<days.length;j++){
if(!_7b0.strict){
days[j]=days[j].toLowerCase();
}
if(v==days[j]){
break;
}
}
if(j==days.length){
dojo.debug("dojo.date.parse: Could not parse weekday name: '"+v+"'.");
return null;
}
break;
case "d":
_7bd.setDate(v);
_7be.date=v;
break;
case "a":
var am=_7b0.am||info.am;
var pm=_7b0.pm||info.pm;
if(!_7b0.strict){
v=v.replace(/\./g,"").toLowerCase();
am=am.replace(/\./g,"").toLowerCase();
pm=pm.replace(/\./g,"").toLowerCase();
}
if(_7b0.strict&&v!=am&&v!=pm){
dojo.debug("dojo.date.parse: Could not parse am/pm part.");
return null;
}
var _7cd=_7bd.getHours();
if(v==pm&&_7cd<12){
_7bd.setHours(_7cd+12);
}else{
if(v==am&&_7cd==12){
_7bd.setHours(0);
}
}
break;
case "K":
if(v==24){
v=0;
}
case "h":
case "H":
case "k":
if(v>23){
dojo.debug("dojo.date.parse: Illegal hours value");
return null;
}
_7bd.setHours(v);
break;
case "m":
_7bd.setMinutes(v);
break;
case "s":
_7bd.setSeconds(v);
break;
case "S":
_7bd.setMilliseconds(v);
break;
default:
dojo.unimplemented("dojo.date.parse: unsupported pattern char="+grp.charAt(0));
}
}
if(_7be.year&&_7bd.getFullYear()!=_7be.year){
dojo.debug("Parsed year: '"+_7bd.getFullYear()+"' did not match input year: '"+_7be.year+"'.");
return null;
}
if(_7be.month&&_7bd.getMonth()!=_7be.month){
dojo.debug("Parsed month: '"+_7bd.getMonth()+"' did not match input month: '"+_7be.month+"'.");
return null;
}
if(_7be.date&&_7bd.getDate()!=_7be.date){
dojo.debug("Parsed day of month: '"+_7bd.getDate()+"' did not match input day of month: '"+_7be.date+"'.");
return null;
}
return _7bd;
};
function _processPattern(_7ce,_7cf,_7d0,_7d1){
var _7d2=function(x){
return x;
};
_7cf=_7cf||_7d2;
_7d0=_7d0||_7d2;
_7d1=_7d1||_7d2;
var _7d4=_7ce.match(/(''|[^'])+/g);
var _7d5=false;
for(var i=0;i<_7d4.length;i++){
if(!_7d4[i]){
_7d4[i]="";
}else{
_7d4[i]=(_7d5?_7d0:_7cf)(_7d4[i]);
_7d5=!_7d5;
}
}
return _7d1(_7d4.join(""));
}
function _buildDateTimeRE(_7d7,info,_7d9,_7da){
return _7da.replace(/([a-z])\1*/ig,function(_7db){
var s;
var c=_7db.charAt(0);
var l=_7db.length;
switch(c){
case "y":
s="\\d"+((l==2)?"{2,4}":"+");
break;
case "M":
s=(l>2)?"\\S+":"\\d{1,2}";
break;
case "d":
s="\\d{1,2}";
break;
case "E":
s="\\S+";
break;
case "h":
case "H":
case "K":
case "k":
s="\\d{1,2}";
break;
case "m":
case "s":
s="[0-5]\\d";
break;
case "S":
s="\\d{1,3}";
break;
case "a":
var am=_7d9.am||info.am||"AM";
var pm=_7d9.pm||info.pm||"PM";
if(_7d9.strict){
s=am+"|"+pm;
}else{
s=am;
s+=(am!=am.toLowerCase())?"|"+am.toLowerCase():"";
s+="|";
s+=(pm!=pm.toLowerCase())?pm+"|"+pm.toLowerCase():pm;
}
break;
default:
dojo.unimplemented("parse of date format, pattern="+_7da);
}
if(_7d7){
_7d7.push(_7db);
}
return "\\s*("+s+")\\s*";
});
}
})();
dojo.date.strftime=function(_7e1,_7e2,_7e3){
var _7e4=null;
function _(s,n){
return dojo.string.pad(s,n||2,_7e4||"0");
}
var info=dojo.date._getGregorianBundle(_7e3);
function $(_7e8){
switch(_7e8){
case "a":
return dojo.date.getDayShortName(_7e1,_7e3);
case "A":
return dojo.date.getDayName(_7e1,_7e3);
case "b":
case "h":
return dojo.date.getMonthShortName(_7e1,_7e3);
case "B":
return dojo.date.getMonthName(_7e1,_7e3);
case "c":
return dojo.date.format(_7e1,{locale:_7e3});
case "C":
return _(Math.floor(_7e1.getFullYear()/100));
case "d":
return _(_7e1.getDate());
case "D":
return $("m")+"/"+$("d")+"/"+$("y");
case "e":
if(_7e4==null){
_7e4=" ";
}
return _(_7e1.getDate());
case "f":
if(_7e4==null){
_7e4=" ";
}
return _(_7e1.getMonth()+1);
case "g":
break;
case "G":
dojo.unimplemented("unimplemented modifier 'G'");
break;
case "F":
return $("Y")+"-"+$("m")+"-"+$("d");
case "H":
return _(_7e1.getHours());
case "I":
return _(_7e1.getHours()%12||12);
case "j":
return _(dojo.date.getDayOfYear(_7e1),3);
case "k":
if(_7e4==null){
_7e4=" ";
}
return _(_7e1.getHours());
case "l":
if(_7e4==null){
_7e4=" ";
}
return _(_7e1.getHours()%12||12);
case "m":
return _(_7e1.getMonth()+1);
case "M":
return _(_7e1.getMinutes());
case "n":
return "\n";
case "p":
return info[_7e1.getHours()<12?"am":"pm"];
case "r":
return $("I")+":"+$("M")+":"+$("S")+" "+$("p");
case "R":
return $("H")+":"+$("M");
case "S":
return _(_7e1.getSeconds());
case "t":
return "\t";
case "T":
return $("H")+":"+$("M")+":"+$("S");
case "u":
return String(_7e1.getDay()||7);
case "U":
return _(dojo.date.getWeekOfYear(_7e1));
case "V":
return _(dojo.date.getIsoWeekOfYear(_7e1));
case "W":
return _(dojo.date.getWeekOfYear(_7e1,1));
case "w":
return String(_7e1.getDay());
case "x":
return dojo.date.format(_7e1,{selector:"dateOnly",locale:_7e3});
case "X":
return dojo.date.format(_7e1,{selector:"timeOnly",locale:_7e3});
case "y":
return _(_7e1.getFullYear()%100);
case "Y":
return String(_7e1.getFullYear());
case "z":
var _7e9=_7e1.getTimezoneOffset();
return (_7e9>0?"-":"+")+_(Math.floor(Math.abs(_7e9)/60))+":"+_(Math.abs(_7e9)%60);
case "Z":
return dojo.date.getTimezoneName(_7e1);
case "%":
return "%";
}
}
var _7ea="";
var i=0;
var _7ec=0;
var _7ed=null;
while((_7ec=_7e2.indexOf("%",i))!=-1){
_7ea+=_7e2.substring(i,_7ec++);
switch(_7e2.charAt(_7ec++)){
case "_":
_7e4=" ";
break;
case "-":
_7e4="";
break;
case "0":
_7e4="0";
break;
case "^":
_7ed="upper";
break;
case "*":
_7ed="lower";
break;
case "#":
_7ed="swap";
break;
default:
_7e4=null;
_7ec--;
break;
}
var _7ee=$(_7e2.charAt(_7ec++));
switch(_7ed){
case "upper":
_7ee=_7ee.toUpperCase();
break;
case "lower":
_7ee=_7ee.toLowerCase();
break;
case "swap":
var _7ef=_7ee.toLowerCase();
var _7f0="";
var j=0;
var ch="";
while(j<_7ee.length){
ch=_7ee.charAt(j);
_7f0+=(ch==_7ef.charAt(j))?ch.toUpperCase():ch.toLowerCase();
j++;
}
_7ee=_7f0;
break;
default:
break;
}
_7ed=null;
_7ea+=_7ee;
i=_7ec;
}
_7ea+=_7e2.substring(i);
return _7ea;
};
(function(){
var _7f3=[];
dojo.date.addCustomFormats=function(_7f4,_7f5){
_7f3.push({pkg:_7f4,name:_7f5});
};
dojo.date._getGregorianBundle=function(_7f6){
var _7f7={};
dojo.lang.forEach(_7f3,function(desc){
var _7f9=dojo.i18n.getLocalization(desc.pkg,desc.name,_7f6);
_7f7=dojo.lang.mixin(_7f7,_7f9);
},this);
return _7f7;
};
})();
dojo.date.addCustomFormats("dojo.i18n.calendar","gregorian");
dojo.date.addCustomFormats("dojo.i18n.calendar","gregorianExtras");
dojo.date.getNames=function(item,type,use,_7fd){
var _7fe;
var _7ff=dojo.date._getGregorianBundle(_7fd);
var _800=[item,use,type];
if(use=="standAlone"){
_7fe=_7ff[_800.join("-")];
}
_800[1]="format";
return (_7fe||_7ff[_800.join("-")]).concat();
};
dojo.date.getDayName=function(_801,_802){
return dojo.date.getNames("days","wide","format",_802)[_801.getDay()];
};
dojo.date.getDayShortName=function(_803,_804){
return dojo.date.getNames("days","abbr","format",_804)[_803.getDay()];
};
dojo.date.getMonthName=function(_805,_806){
return dojo.date.getNames("months","wide","format",_806)[_805.getMonth()];
};
dojo.date.getMonthShortName=function(_807,_808){
return dojo.date.getNames("months","abbr","format",_808)[_807.getMonth()];
};
dojo.date.toRelativeString=function(_809){
var now=new Date();
var diff=(now-_809)/1000;
var end=" ago";
var _80d=false;
if(diff<0){
_80d=true;
end=" from now";
diff=-diff;
}
if(diff<60){
diff=Math.round(diff);
return diff+" second"+(diff==1?"":"s")+end;
}
if(diff<60*60){
diff=Math.round(diff/60);
return diff+" minute"+(diff==1?"":"s")+end;
}
if(diff<60*60*24){
diff=Math.round(diff/3600);
return diff+" hour"+(diff==1?"":"s")+end;
}
if(diff<60*60*24*7){
diff=Math.round(diff/(3600*24));
if(diff==1){
return _80d?"Tomorrow":"Yesterday";
}else{
return diff+" days"+end;
}
}
return dojo.date.format(_809);
};
dojo.date.toSql=function(_80e,_80f){
return dojo.date.strftime(_80e,"%F"+!_80f?" %T":"");
};
dojo.date.fromSql=function(_810){
var _811=_810.split(/[\- :]/g);
while(_811.length<6){
_811.push(0);
}
return new Date(_811[0],(parseInt(_811[1],10)-1),_811[2],_811[3],_811[4],_811[5]);
};
dojo.provide("dojo.style");
dojo.kwCompoundRequire({browser:["dojo.html.style"]});
dojo.deprecated("dojo.style","replaced by dojo.html.style","0.5");
dojo.lang.mixin(dojo.style,dojo.html);
dojo.provide("dojo.math");
dojo.math.degToRad=function(x){
return (x*Math.PI)/180;
};
dojo.math.radToDeg=function(x){
return (x*180)/Math.PI;
};
dojo.math.factorial=function(n){
if(n<1){
return 0;
}
var _815=1;
for(var i=1;i<=n;i++){
_815*=i;
}
return _815;
};
dojo.math.permutations=function(n,k){
if(n==0||k==0){
return 1;
}
return (dojo.math.factorial(n)/dojo.math.factorial(n-k));
};
dojo.math.combinations=function(n,r){
if(n==0||r==0){
return 1;
}
return (dojo.math.factorial(n)/(dojo.math.factorial(n-r)*dojo.math.factorial(r)));
};
dojo.math.bernstein=function(t,n,i){
return (dojo.math.combinations(n,i)*Math.pow(t,i)*Math.pow(1-t,n-i));
};
dojo.math.gaussianRandom=function(){
var k=2;
do{
var i=2*Math.random()-1;
var j=2*Math.random()-1;
k=i*i+j*j;
}while(k>=1);
k=Math.sqrt((-2*Math.log(k))/k);
return i*k;
};
dojo.math.mean=function(){
var _821=dojo.lang.isArray(arguments[0])?arguments[0]:arguments;
var mean=0;
for(var i=0;i<_821.length;i++){
mean+=_821[i];
}
return mean/_821.length;
};
dojo.math.round=function(_824,_825){
if(!_825){
var _826=1;
}else{
var _826=Math.pow(10,_825);
}
return Math.round(_824*_826)/_826;
};
dojo.math.sd=dojo.math.standardDeviation=function(){
var _827=dojo.lang.isArray(arguments[0])?arguments[0]:arguments;
return Math.sqrt(dojo.math.variance(_827));
};
dojo.math.variance=function(){
var _828=dojo.lang.isArray(arguments[0])?arguments[0]:arguments;
var mean=0,_82a=0;
for(var i=0;i<_828.length;i++){
mean+=_828[i];
_82a+=Math.pow(_828[i],2);
}
return (_82a/_828.length)-Math.pow(mean/_828.length,2);
};
dojo.math.range=function(a,b,step){
if(arguments.length<2){
b=a;
a=0;
}
if(arguments.length<3){
step=1;
}
var _82f=[];
if(step>0){
for(var i=a;i<b;i+=step){
_82f.push(i);
}
}else{
if(step<0){
for(var i=a;i>b;i+=step){
_82f.push(i);
}
}else{
throw new Error("dojo.math.range: step must be non-zero");
}
}
return _82f;
};
dojo.provide("dojo.math.curves");
dojo.math.curves={Line:function(_831,end){
this.start=_831;
this.end=end;
this.dimensions=_831.length;
for(var i=0;i<_831.length;i++){
_831[i]=Number(_831[i]);
}
for(var i=0;i<end.length;i++){
end[i]=Number(end[i]);
}
this.getValue=function(n){
var _835=new Array(this.dimensions);
for(var i=0;i<this.dimensions;i++){
_835[i]=((this.end[i]-this.start[i])*n)+this.start[i];
}
return _835;
};
return this;
},Bezier:function(pnts){
this.getValue=function(step){
if(step>=1){
return this.p[this.p.length-1];
}
if(step<=0){
return this.p[0];
}
var _839=new Array(this.p[0].length);
for(var k=0;j<this.p[0].length;k++){
_839[k]=0;
}
for(var j=0;j<this.p[0].length;j++){
var C=0;
var D=0;
for(var i=0;i<this.p.length;i++){
C+=this.p[i][j]*this.p[this.p.length-1][0]*dojo.math.bernstein(step,this.p.length,i);
}
for(var l=0;l<this.p.length;l++){
D+=this.p[this.p.length-1][0]*dojo.math.bernstein(step,this.p.length,l);
}
_839[j]=C/D;
}
return _839;
};
this.p=pnts;
return this;
},CatmullRom:function(pnts,c){
this.getValue=function(step){
var _843=step*(this.p.length-1);
var node=Math.floor(_843);
var _845=_843-node;
var i0=node-1;
if(i0<0){
i0=0;
}
var i=node;
var i1=node+1;
if(i1>=this.p.length){
i1=this.p.length-1;
}
var i2=node+2;
if(i2>=this.p.length){
i2=this.p.length-1;
}
var u=_845;
var u2=_845*_845;
var u3=_845*_845*_845;
var _84d=new Array(this.p[0].length);
for(var k=0;k<this.p[0].length;k++){
var x1=(-this.c*this.p[i0][k])+((2-this.c)*this.p[i][k])+((this.c-2)*this.p[i1][k])+(this.c*this.p[i2][k]);
var x2=(2*this.c*this.p[i0][k])+((this.c-3)*this.p[i][k])+((3-2*this.c)*this.p[i1][k])+(-this.c*this.p[i2][k]);
var x3=(-this.c*this.p[i0][k])+(this.c*this.p[i1][k]);
var x4=this.p[i][k];
_84d[k]=x1*u3+x2*u2+x3*u+x4;
}
return _84d;
};
if(!c){
this.c=0.7;
}else{
this.c=c;
}
this.p=pnts;
return this;
},Arc:function(_853,end,ccw){
var _856=dojo.math.points.midpoint(_853,end);
var _857=dojo.math.points.translate(dojo.math.points.invert(_856),_853);
var rad=Math.sqrt(Math.pow(_857[0],2)+Math.pow(_857[1],2));
var _859=dojo.math.radToDeg(Math.atan(_857[1]/_857[0]));
if(_857[0]<0){
_859-=90;
}else{
_859+=90;
}
dojo.math.curves.CenteredArc.call(this,_856,rad,_859,_859+(ccw?-180:180));
},CenteredArc:function(_85a,_85b,_85c,end){
this.center=_85a;
this.radius=_85b;
this.start=_85c||0;
this.end=end;
this.getValue=function(n){
var _85f=new Array(2);
var _860=dojo.math.degToRad(this.start+((this.end-this.start)*n));
_85f[0]=this.center[0]+this.radius*Math.sin(_860);
_85f[1]=this.center[1]-this.radius*Math.cos(_860);
return _85f;
};
return this;
},Circle:function(_861,_862){
dojo.math.curves.CenteredArc.call(this,_861,_862,0,360);
return this;
},Path:function(){
var _863=[];
var _864=[];
var _865=[];
var _866=0;
this.add=function(_867,_868){
if(_868<0){
dojo.raise("dojo.math.curves.Path.add: weight cannot be less than 0");
}
_863.push(_867);
_864.push(_868);
_866+=_868;
computeRanges();
};
this.remove=function(_869){
for(var i=0;i<_863.length;i++){
if(_863[i]==_869){
_863.splice(i,1);
_866-=_864.splice(i,1)[0];
break;
}
}
computeRanges();
};
this.removeAll=function(){
_863=[];
_864=[];
_866=0;
};
this.getValue=function(n){
var _86c=false,_86d=0;
for(var i=0;i<_865.length;i++){
var r=_865[i];
if(n>=r[0]&&n<r[1]){
var subN=(n-r[0])/r[2];
_86d=_863[i].getValue(subN);
_86c=true;
break;
}
}
if(!_86c){
_86d=_863[_863.length-1].getValue(1);
}
for(var j=0;j<i;j++){
_86d=dojo.math.points.translate(_86d,_863[j].getValue(1));
}
return _86d;
};
function computeRanges(){
var _872=0;
for(var i=0;i<_864.length;i++){
var end=_872+_864[i]/_866;
var len=end-_872;
_865[i]=[_872,end,len];
_872=end;
}
}
return this;
}};
dojo.provide("dojo.animation.AnimationEvent");
dojo.deprecated("dojo.animation.AnimationEvent is slated for removal in 0.5; use dojo.lfx.* instead.","0.5");
dojo.animation.AnimationEvent=function(_876,type,_878,_879,_87a,_87b,_87c,_87d,fps){
this.type=type;
this.animation=_876;
this.coords=_878;
this.x=_878[0];
this.y=_878[1];
this.z=_878[2];
this.startTime=_879;
this.currentTime=_87a;
this.endTime=_87b;
this.duration=_87c;
this.percent=_87d;
this.fps=fps;
};
dojo.extend(dojo.animation.AnimationEvent,{coordsAsInts:function(){
var _87f=new Array(this.coords.length);
for(var i=0;i<this.coords.length;i++){
_87f[i]=Math.round(this.coords[i]);
}
return _87f;
}});
dojo.provide("dojo.animation.Animation");
dojo.deprecated("dojo.animation.Animation is slated for removal in 0.5; use dojo.lfx.* instead.","0.5");
dojo.animation.Animation=function(_881,_882,_883,_884,rate){
if(dojo.lang.isArray(_881)){
_881=new dojo.math.curves.Line(_881[0],_881[1]);
}
this.curve=_881;
this.duration=_882;
this.repeatCount=_884||0;
this.rate=rate||25;
if(_883){
if(dojo.lang.isFunction(_883.getValue)){
this.accel=_883;
}else{
var i=0.35*_883+0.5;
this.accel=new dojo.math.curves.CatmullRom([[0],[i],[1]],0.45);
}
}
};
dojo.lang.extend(dojo.animation.Animation,{curve:null,duration:0,repeatCount:0,accel:null,onBegin:null,onAnimate:null,onEnd:null,onPlay:null,onPause:null,onStop:null,handler:null,_animSequence:null,_startTime:null,_endTime:null,_lastFrame:null,_timer:null,_percent:0,_active:false,_paused:false,_startRepeatCount:0,play:function(_887){
if(_887){
clearTimeout(this._timer);
this._active=false;
this._paused=false;
this._percent=0;
}else{
if(this._active&&!this._paused){
return;
}
}
this._startTime=new Date().valueOf();
if(this._paused){
this._startTime-=(this.duration*this._percent/100);
}
this._endTime=this._startTime+this.duration;
this._lastFrame=this._startTime;
var e=new dojo.animation.AnimationEvent(this,null,this.curve.getValue(this._percent),this._startTime,this._startTime,this._endTime,this.duration,this._percent,0);
this._active=true;
this._paused=false;
if(this._percent==0){
if(!this._startRepeatCount){
this._startRepeatCount=this.repeatCount;
}
e.type="begin";
if(typeof this.handler=="function"){
this.handler(e);
}
if(typeof this.onBegin=="function"){
this.onBegin(e);
}
}
e.type="play";
if(typeof this.handler=="function"){
this.handler(e);
}
if(typeof this.onPlay=="function"){
this.onPlay(e);
}
if(this._animSequence){
this._animSequence._setCurrent(this);
}
this._cycle();
},pause:function(){
clearTimeout(this._timer);
if(!this._active){
return;
}
this._paused=true;
var e=new dojo.animation.AnimationEvent(this,"pause",this.curve.getValue(this._percent),this._startTime,new Date().valueOf(),this._endTime,this.duration,this._percent,0);
if(typeof this.handler=="function"){
this.handler(e);
}
if(typeof this.onPause=="function"){
this.onPause(e);
}
},playPause:function(){
if(!this._active||this._paused){
this.play();
}else{
this.pause();
}
},gotoPercent:function(pct,_88b){
clearTimeout(this._timer);
this._active=true;
this._paused=true;
this._percent=pct;
if(_88b){
this.play();
}
},stop:function(_88c){
clearTimeout(this._timer);
var step=this._percent/100;
if(_88c){
step=1;
}
var e=new dojo.animation.AnimationEvent(this,"stop",this.curve.getValue(step),this._startTime,new Date().valueOf(),this._endTime,this.duration,this._percent);
if(typeof this.handler=="function"){
this.handler(e);
}
if(typeof this.onStop=="function"){
this.onStop(e);
}
this._active=false;
this._paused=false;
},status:function(){
if(this._active){
return this._paused?"paused":"playing";
}else{
return "stopped";
}
},_cycle:function(){
clearTimeout(this._timer);
if(this._active){
var curr=new Date().valueOf();
var step=(curr-this._startTime)/(this._endTime-this._startTime);
var fps=1000/(curr-this._lastFrame);
this._lastFrame=curr;
if(step>=1){
step=1;
this._percent=100;
}else{
this._percent=step*100;
}
if(this.accel&&this.accel.getValue){
step=this.accel.getValue(step);
}
var e=new dojo.animation.AnimationEvent(this,"animate",this.curve.getValue(step),this._startTime,curr,this._endTime,this.duration,this._percent,Math.round(fps));
if(typeof this.handler=="function"){
this.handler(e);
}
if(typeof this.onAnimate=="function"){
this.onAnimate(e);
}
if(step<1){
this._timer=setTimeout(dojo.lang.hitch(this,"_cycle"),this.rate);
}else{
e.type="end";
this._active=false;
if(typeof this.handler=="function"){
this.handler(e);
}
if(typeof this.onEnd=="function"){
this.onEnd(e);
}
if(this.repeatCount>0){
this.repeatCount--;
this.play(true);
}else{
if(this.repeatCount==-1){
this.play(true);
}else{
if(this._startRepeatCount){
this.repeatCount=this._startRepeatCount;
this._startRepeatCount=0;
}
if(this._animSequence){
this._animSequence._playNext();
}
}
}
}
}
}});
dojo.provide("dojo.animation");
dojo.deprecated("dojo.animation is slated for removal in 0.5; use dojo.lfx instead.","0.5");
dojo.provide("dojo.graphics.color");
dojo.deprecated("dojo.graphics.color.Color is now dojo.gfx.color.Color.","0.5");
dojo.graphics.color.Color=dojo.gfx.color.Color;
dojo.graphics.color.named=dojo.gfx.color.named;
dojo.graphics.color.blend=function(a,b,_895){
dojo.deprecated("dojo.graphics.color.blend is now dojo.gfx.color.blend","0.5");
return dojo.gfx.color.blend(a,b,_895);
};
dojo.graphics.color.blendHex=function(a,b,_898){
dojo.deprecated("dojo.graphics.color.blendHex is now dojo.gfx.color.blendHex","0.5");
return dojo.gfx.color.rgb2hex(dojo.gfx.color.blend(dojo.gfx.color.hex2rgb(a),dojo.gfx.color.hex2rgb(b),_898));
};
dojo.graphics.color.extractRGB=function(_899){
dojo.deprecated("dojo.graphics.color.extractRGB is now dojo.gfx.color.extractRGB","0.5");
return dojo.gfx.color.extractRGB(_899);
};
dojo.graphics.color.hex2rgb=function(hex){
dojo.deprecated("dojo.graphics.color.hex2rgb is now dojo.gfx.color.hex2rgb","0.5");
return dojo.gfx.color.hex2rgb(hex);
};
dojo.graphics.color.rgb2hex=function(r,g,b){
dojo.deprecated("dojo.graphics.color.rgb2hex is now dojo.gfx.color.rgb2hex","0.5");
return dojo.gfx.color.rgb2hex;
};
dojo.provide("dojo.fx.html");
dojo.deprecated("dojo.fx.html","use dojo.lfx.html instead","0.4");
dojo.fx.duration=300;
dojo.fx.html._makeFadeable=function(node){
if(dojo.render.html.ie){
if((node.style.zoom.length==0)&&(dojo.style.getStyle(node,"zoom")=="normal")){
node.style.zoom="1";
}
if((node.style.width.length==0)&&(dojo.style.getStyle(node,"width")=="auto")){
node.style.width="auto";
}
}
};
dojo.fx.html.fadeOut=function(node,_8a0,_8a1,_8a2){
return dojo.fx.html.fade(node,_8a0,dojo.style.getOpacity(node),0,_8a1,_8a2);
};
dojo.fx.html.fadeIn=function(node,_8a4,_8a5,_8a6){
return dojo.fx.html.fade(node,_8a4,dojo.style.getOpacity(node),1,_8a5,_8a6);
};
dojo.fx.html.fadeHide=function(node,_8a8,_8a9,_8aa){
node=dojo.byId(node);
if(!_8a8){
_8a8=150;
}
return dojo.fx.html.fadeOut(node,_8a8,function(node){
node.style.display="none";
if(typeof _8a9=="function"){
_8a9(node);
}
});
};
dojo.fx.html.fadeShow=function(node,_8ad,_8ae,_8af){
node=dojo.byId(node);
if(!_8ad){
_8ad=150;
}
node.style.display="block";
return dojo.fx.html.fade(node,_8ad,0,1,_8ae,_8af);
};
dojo.fx.html.fade=function(node,_8b1,_8b2,_8b3,_8b4,_8b5){
node=dojo.byId(node);
dojo.fx.html._makeFadeable(node);
var anim=new dojo.animation.Animation(new dojo.math.curves.Line([_8b2],[_8b3]),_8b1||dojo.fx.duration,0);
dojo.event.connect(anim,"onAnimate",function(e){
dojo.style.setOpacity(node,e.x);
});
if(_8b4){
dojo.event.connect(anim,"onEnd",function(e){
_8b4(node,anim);
});
}
if(!_8b5){
anim.play(true);
}
return anim;
};
dojo.fx.html.slideTo=function(node,_8ba,_8bb,_8bc,_8bd){
if(!dojo.lang.isNumber(_8ba)){
var tmp=_8ba;
_8ba=_8bb;
_8bb=tmp;
}
node=dojo.byId(node);
var top=node.offsetTop;
var left=node.offsetLeft;
var pos=dojo.style.getComputedStyle(node,"position");
if(pos=="relative"||pos=="static"){
top=parseInt(dojo.style.getComputedStyle(node,"top"))||0;
left=parseInt(dojo.style.getComputedStyle(node,"left"))||0;
}
return dojo.fx.html.slide(node,_8ba,[left,top],_8bb,_8bc,_8bd);
};
dojo.fx.html.slideBy=function(node,_8c3,_8c4,_8c5,_8c6){
if(!dojo.lang.isNumber(_8c3)){
var tmp=_8c3;
_8c3=_8c4;
_8c4=tmp;
}
node=dojo.byId(node);
var top=node.offsetTop;
var left=node.offsetLeft;
var pos=dojo.style.getComputedStyle(node,"position");
if(pos=="relative"||pos=="static"){
top=parseInt(dojo.style.getComputedStyle(node,"top"))||0;
left=parseInt(dojo.style.getComputedStyle(node,"left"))||0;
}
return dojo.fx.html.slideTo(node,_8c3,[left+_8c4[0],top+_8c4[1]],_8c5,_8c6);
};
dojo.fx.html.slide=function(node,_8cc,_8cd,_8ce,_8cf,_8d0){
if(!dojo.lang.isNumber(_8cc)){
var tmp=_8cc;
_8cc=_8ce;
_8ce=_8cd;
_8cd=tmp;
}
node=dojo.byId(node);
if(dojo.style.getComputedStyle(node,"position")=="static"){
node.style.position="relative";
}
var anim=new dojo.animation.Animation(new dojo.math.curves.Line(_8cd,_8ce),_8cc||dojo.fx.duration,0);
dojo.event.connect(anim,"onAnimate",function(e){
with(node.style){
left=e.x+"px";
top=e.y+"px";
}
});
if(_8cf){
dojo.event.connect(anim,"onEnd",function(e){
_8cf(node,anim);
});
}
if(!_8d0){
anim.play(true);
}
return anim;
};
dojo.fx.html.colorFadeIn=function(node,_8d6,_8d7,_8d8,_8d9,_8da){
if(!dojo.lang.isNumber(_8d6)){
var tmp=_8d6;
_8d6=_8d7;
_8d7=tmp;
}
node=dojo.byId(node);
var _8dc=dojo.style.getBackgroundColor(node);
var bg=dojo.style.getStyle(node,"background-color").toLowerCase();
var _8de=bg=="transparent"||bg=="rgba(0, 0, 0, 0)";
while(_8dc.length>3){
_8dc.pop();
}
var rgb=new dojo.graphics.color.Color(_8d7).toRgb();
var anim=dojo.fx.html.colorFade(node,_8d6||dojo.fx.duration,_8d7,_8dc,_8d9,true);
dojo.event.connect(anim,"onEnd",function(e){
if(_8de){
node.style.backgroundColor="transparent";
}
});
if(_8d8>0){
node.style.backgroundColor="rgb("+rgb.join(",")+")";
if(!_8da){
setTimeout(function(){
anim.play(true);
},_8d8);
}
}else{
if(!_8da){
anim.play(true);
}
}
return anim;
};
dojo.fx.html.highlight=dojo.fx.html.colorFadeIn;
dojo.fx.html.colorFadeFrom=dojo.fx.html.colorFadeIn;
dojo.fx.html.colorFadeOut=function(node,_8e3,_8e4,_8e5,_8e6,_8e7){
if(!dojo.lang.isNumber(_8e3)){
var tmp=_8e3;
_8e3=_8e4;
_8e4=tmp;
}
node=dojo.byId(node);
var _8e9=new dojo.graphics.color.Color(dojo.style.getBackgroundColor(node)).toRgb();
var rgb=new dojo.graphics.color.Color(_8e4).toRgb();
var anim=dojo.fx.html.colorFade(node,_8e3||dojo.fx.duration,_8e9,rgb,_8e6,_8e5>0||_8e7);
if(_8e5>0){
node.style.backgroundColor="rgb("+_8e9.join(",")+")";
if(!_8e7){
setTimeout(function(){
anim.play(true);
},_8e5);
}
}
return anim;
};
dojo.fx.html.unhighlight=dojo.fx.html.colorFadeOut;
dojo.fx.html.colorFadeTo=dojo.fx.html.colorFadeOut;
dojo.fx.html.colorFade=function(node,_8ed,_8ee,_8ef,_8f0,_8f1){
if(!dojo.lang.isNumber(_8ed)){
var tmp=_8ed;
_8ed=_8ef;
_8ef=_8ee;
_8ee=tmp;
}
node=dojo.byId(node);
var _8f3=new dojo.graphics.color.Color(_8ee).toRgb();
var _8f4=new dojo.graphics.color.Color(_8ef).toRgb();
var anim=new dojo.animation.Animation(new dojo.math.curves.Line(_8f3,_8f4),_8ed||dojo.fx.duration,0);
dojo.event.connect(anim,"onAnimate",function(e){
node.style.backgroundColor="rgb("+e.coordsAsInts().join(",")+")";
});
if(_8f0){
dojo.event.connect(anim,"onEnd",function(e){
_8f0(node,anim);
});
}
if(!_8f1){
anim.play(true);
}
return anim;
};
dojo.fx.html.wipeIn=function(node,_8f9,_8fa,_8fb){
node=dojo.byId(node);
var _8fc=dojo.style.getStyle(node,"overflow");
if(_8fc=="visible"){
node.style.overflow="hidden";
}
node.style.height=0;
dojo.style.show(node);
var anim=dojo.fx.html.wipe(node,_8f9,0,node.scrollHeight,null,true);
dojo.event.connect(anim,"onEnd",function(){
node.style.overflow=_8fc;
node.style.visibility="";
node.style.height="auto";
if(_8fa){
_8fa(node,anim);
}
});
if(!_8fb){
anim.play();
}
return anim;
};
dojo.fx.html.wipeOut=function(node,_8ff,_900,_901){
node=dojo.byId(node);
var _902=dojo.style.getStyle(node,"overflow");
if(_902=="visible"){
node.style.overflow="hidden";
}
var anim=dojo.fx.html.wipe(node,_8ff,node.offsetHeight,0,null,true);
dojo.event.connect(anim,"onEnd",function(){
dojo.style.hide(node);
node.style.visibility="hidden";
node.style.overflow=_902;
if(_900){
_900(node,anim);
}
});
if(!_901){
anim.play();
}
return anim;
};
dojo.fx.html.wipe=function(node,_905,_906,_907,_908,_909){
node=dojo.byId(node);
var anim=new dojo.animation.Animation([[_906],[_907]],_905||dojo.fx.duration,0);
dojo.event.connect(anim,"onAnimate",function(e){
node.style.height=e.x+"px";
});
dojo.event.connect(anim,"onEnd",function(){
if(_908){
_908(node,anim);
}
});
if(!_909){
anim.play();
}
return anim;
};
dojo.fx.html.wiper=function(node,_90d){
this.node=dojo.byId(node);
if(_90d){
dojo.event.connect(dojo.byId(_90d),"onclick",this,"toggle");
}
};
dojo.lang.extend(dojo.fx.html.wiper,{duration:dojo.fx.duration,_anim:null,toggle:function(){
if(!this._anim){
var type="wipe"+(dojo.style.isVisible(this.node)?"Out":"In");
this._anim=dojo.fx[type](this.node,this.duration,dojo.lang.hitch(this,"_callback"));
}
},_callback:function(){
this._anim=null;
}});
dojo.fx.html.explode=function(_90f,_910,_911,_912,_913){
var _914=dojo.style.toCoordinateArray(_90f);
var _915=document.createElement("div");
with(_915.style){
position="absolute";
border="1px solid black";
display="none";
}
document.body.appendChild(_915);
_910=dojo.byId(_910);
with(_910.style){
visibility="hidden";
display="block";
}
var _916=dojo.style.toCoordinateArray(_910);
with(_910.style){
display="none";
visibility="visible";
}
var anim=new dojo.animation.Animation(new dojo.math.curves.Line(_914,_916),_911||dojo.fx.duration,0);
dojo.event.connect(anim,"onBegin",function(e){
_915.style.display="block";
});
dojo.event.connect(anim,"onAnimate",function(e){
with(_915.style){
left=e.x+"px";
top=e.y+"px";
width=e.coords[2]+"px";
height=e.coords[3]+"px";
}
});
dojo.event.connect(anim,"onEnd",function(){
_910.style.display="block";
_915.parentNode.removeChild(_915);
if(_912){
_912(_910,anim);
}
});
if(!_913){
anim.play();
}
return anim;
};
dojo.fx.html.implode=function(_91a,end,_91c,_91d,_91e){
var _91f=dojo.style.toCoordinateArray(_91a);
var _920=dojo.style.toCoordinateArray(end);
_91a=dojo.byId(_91a);
var _921=document.createElement("div");
with(_921.style){
position="absolute";
border="1px solid black";
display="none";
}
document.body.appendChild(_921);
var anim=new dojo.animation.Animation(new dojo.math.curves.Line(_91f,_920),_91c||dojo.fx.duration,0);
dojo.event.connect(anim,"onBegin",function(e){
_91a.style.display="none";
_921.style.display="block";
});
dojo.event.connect(anim,"onAnimate",function(e){
with(_921.style){
left=e.x+"px";
top=e.y+"px";
width=e.coords[2]+"px";
height=e.coords[3]+"px";
}
});
dojo.event.connect(anim,"onEnd",function(){
_921.parentNode.removeChild(_921);
if(_91d){
_91d(_91a,anim);
}
});
if(!_91e){
anim.play();
}
return anim;
};
dojo.fx.html.Exploder=function(_925,_926){
_925=dojo.byId(_925);
_926=dojo.byId(_926);
var _927=this;
this.waitToHide=500;
this.timeToShow=100;
this.waitToShow=200;
this.timeToHide=70;
this.autoShow=false;
this.autoHide=false;
var _928=null;
var _929=null;
var _92a=null;
var _92b=null;
var _92c=null;
var _92d=null;
this.showing=false;
this.onBeforeExplode=null;
this.onAfterExplode=null;
this.onBeforeImplode=null;
this.onAfterImplode=null;
this.onExploding=null;
this.onImploding=null;
this.timeShow=function(){
clearTimeout(_92a);
_92a=setTimeout(_927.show,_927.waitToShow);
};
this.show=function(){
clearTimeout(_92a);
clearTimeout(_92b);
if((_929&&_929.status()=="playing")||(_928&&_928.status()=="playing")||_927.showing){
return;
}
if(typeof _927.onBeforeExplode=="function"){
_927.onBeforeExplode(_925,_926);
}
_928=dojo.fx.html.explode(_925,_926,_927.timeToShow,function(e){
_927.showing=true;
if(typeof _927.onAfterExplode=="function"){
_927.onAfterExplode(_925,_926);
}
});
if(typeof _927.onExploding=="function"){
dojo.event.connect(_928,"onAnimate",this,"onExploding");
}
};
this.timeHide=function(){
clearTimeout(_92a);
clearTimeout(_92b);
if(_927.showing){
_92b=setTimeout(_927.hide,_927.waitToHide);
}
};
this.hide=function(){
clearTimeout(_92a);
clearTimeout(_92b);
if(_928&&_928.status()=="playing"){
return;
}
_927.showing=false;
if(typeof _927.onBeforeImplode=="function"){
_927.onBeforeImplode(_925,_926);
}
_929=dojo.fx.html.implode(_926,_925,_927.timeToHide,function(e){
if(typeof _927.onAfterImplode=="function"){
_927.onAfterImplode(_925,_926);
}
});
if(typeof _927.onImploding=="function"){
dojo.event.connect(_929,"onAnimate",this,"onImploding");
}
};
dojo.event.connect(_925,"onclick",function(e){
if(_927.showing){
_927.hide();
}else{
_927.show();
}
});
dojo.event.connect(_925,"onmouseover",function(e){
if(_927.autoShow){
_927.timeShow();
}
});
dojo.event.connect(_925,"onmouseout",function(e){
if(_927.autoHide){
_927.timeHide();
}
});
dojo.event.connect(_926,"onmouseover",function(e){
clearTimeout(_92b);
});
dojo.event.connect(_926,"onmouseout",function(e){
if(_927.autoHide){
_927.timeHide();
}
});
dojo.event.connect(document.documentElement||document.body,"onclick",function(e){
function isDesc(node,_937){
while(node){
if(node==_937){
return true;
}
node=node.parentNode;
}
return false;
}
if(_927.autoHide&&_927.showing&&!isDesc(e.target,_926)&&!isDesc(e.target,_925)){
_927.hide();
}
});
return this;
};
dojo.fx.html.toggle={};
dojo.fx.html.toggle.plain={show:function(node,_939,_93a,_93b){
dojo.style.show(node);
if(dojo.lang.isFunction(_93b)){
_93b();
}
},hide:function(node,_93d,_93e,_93f){
dojo.style.hide(node);
if(dojo.lang.isFunction(_93f)){
_93f();
}
}};
dojo.fx.html.toggle.fade={show:function(node,_941,_942,_943){
dojo.fx.html.fadeShow(node,_941,_943);
},hide:function(node,_945,_946,_947){
dojo.fx.html.fadeHide(node,_945,_947);
}};
dojo.fx.html.toggle.wipe={show:function(node,_949,_94a,_94b){
dojo.fx.html.wipeIn(node,_949,_94b);
},hide:function(node,_94d,_94e,_94f){
dojo.fx.html.wipeOut(node,_94d,_94f);
}};
dojo.fx.html.toggle.explode={show:function(node,_951,_952,_953){
dojo.fx.html.explode(_952||[0,0,0,0],node,_951,_953);
},hide:function(node,_955,_956,_957){
dojo.fx.html.implode(node,_956||[0,0,0,0],_955,_957);
}};
dojo.lang.mixin(dojo.fx,dojo.fx.html);
dojo.provide("dojo.string");
dojo.provide("dojo.io.common");
dojo.io.transports=[];
dojo.io.hdlrFuncNames=["load","error","timeout"];
dojo.io.Request=function(url,_959,_95a,_95b){
if((arguments.length==1)&&(arguments[0].constructor==Object)){
this.fromKwArgs(arguments[0]);
}else{
this.url=url;
if(_959){
this.mimetype=_959;
}
if(_95a){
this.transport=_95a;
}
if(arguments.length>=4){
this.changeUrl=_95b;
}
}
};
dojo.lang.extend(dojo.io.Request,{url:"",mimetype:"text/plain",method:"GET",content:undefined,transport:undefined,changeUrl:undefined,formNode:undefined,sync:false,bindSuccess:false,useCache:false,preventCache:false,load:function(type,data,_95e,_95f){
},error:function(type,_961,_962,_963){
},timeout:function(type,_965,_966,_967){
},handle:function(type,data,_96a,_96b){
},timeoutSeconds:0,abort:function(){
},fromKwArgs:function(_96c){
if(_96c["url"]){
_96c.url=_96c.url.toString();
}
if(_96c["formNode"]){
_96c.formNode=dojo.byId(_96c.formNode);
}
if(!_96c["method"]&&_96c["formNode"]&&_96c["formNode"].method){
_96c.method=_96c["formNode"].method;
}
if(!_96c["handle"]&&_96c["handler"]){
_96c.handle=_96c.handler;
}
if(!_96c["load"]&&_96c["loaded"]){
_96c.load=_96c.loaded;
}
if(!_96c["changeUrl"]&&_96c["changeURL"]){
_96c.changeUrl=_96c.changeURL;
}
_96c.encoding=dojo.lang.firstValued(_96c["encoding"],djConfig["bindEncoding"],"");
_96c.sendTransport=dojo.lang.firstValued(_96c["sendTransport"],djConfig["ioSendTransport"],false);
var _96d=dojo.lang.isFunction;
for(var x=0;x<dojo.io.hdlrFuncNames.length;x++){
var fn=dojo.io.hdlrFuncNames[x];
if(_96c[fn]&&_96d(_96c[fn])){
continue;
}
if(_96c["handle"]&&_96d(_96c["handle"])){
_96c[fn]=_96c.handle;
}
}
dojo.lang.mixin(this,_96c);
}});
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(_974){
if(!(_974 instanceof dojo.io.Request)){
try{
_974=new dojo.io.Request(_974);
}
catch(e){
dojo.debug(e);
}
}
var _975="";
if(_974["transport"]){
_975=_974["transport"];
if(!this[_975]){
dojo.io.sendBindError(_974,"No dojo.io.bind() transport with name '"+_974["transport"]+"'.");
return _974;
}
if(!this[_975].canHandle(_974)){
dojo.io.sendBindError(_974,"dojo.io.bind() transport with name '"+_974["transport"]+"' cannot handle this type of request.");
return _974;
}
}else{
for(var x=0;x<dojo.io.transports.length;x++){
var tmp=dojo.io.transports[x];
if((this[tmp])&&(this[tmp].canHandle(_974))){
_975=tmp;
break;
}
}
if(_975==""){
dojo.io.sendBindError(_974,"None of the loaded transports for dojo.io.bind()"+" can handle the request.");
return _974;
}
}
this[_975].bind(_974);
_974.bindSuccess=true;
return _974;
};
dojo.io.sendBindError=function(_978,_979){
if((typeof _978.error=="function"||typeof _978.handle=="function")&&(typeof setTimeout=="function"||typeof setTimeout=="object")){
var _97a=new dojo.io.Error(_979);
setTimeout(function(){
_978[(typeof _978.error=="function")?"error":"handle"]("error",_97a,null,_978);
},50);
}else{
dojo.raise(_979);
}
};
dojo.io.queueBind=function(_97b){
if(!(_97b instanceof dojo.io.Request)){
try{
_97b=new dojo.io.Request(_97b);
}
catch(e){
dojo.debug(e);
}
}
var _97c=_97b.load;
_97b.load=function(){
dojo.io._queueBindInFlight=false;
var ret=_97c.apply(this,arguments);
dojo.io._dispatchNextQueueBind();
return ret;
};
var _97e=_97b.error;
_97b.error=function(){
dojo.io._queueBindInFlight=false;
var ret=_97e.apply(this,arguments);
dojo.io._dispatchNextQueueBind();
return ret;
};
dojo.io._bindQueue.push(_97b);
dojo.io._dispatchNextQueueBind();
return _97b;
};
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,_981,last){
var enc=/utf/i.test(_981||"")?encodeURIComponent:dojo.string.encodeAscii;
var _984=[];
var _985=new Object();
for(var name in map){
var _987=function(elt){
var val=enc(name)+"="+enc(elt);
_984[(last==name)?"push":"unshift"](val);
};
if(!_985[name]){
var _98a=map[name];
if(dojo.lang.isArray(_98a)){
dojo.lang.forEach(_98a,_987);
}else{
_987(_98a);
}
}
}
return _984.join("&");
};
dojo.io.setIFrameSrc=function(_98b,src,_98d){
try{
var r=dojo.render.html;
if(!_98d){
if(r.safari){
_98b.location=src;
}else{
frames[_98b.name].location=src;
}
}else{
var idoc;
if(r.ie){
idoc=_98b.contentWindow.document;
}else{
if(r.safari){
idoc=_98b.document;
}else{
idoc=_98b.contentWindow;
}
}
if(!idoc){
_98b.location=src;
return;
}else{
idoc.location.replace(src);
}
}
}
catch(e){
dojo.debug(e);
dojo.debug("setIFrameSrc: "+e);
}
};
dojo.provide("dojo.string.extras");
dojo.string.substituteParams=function(_990,hash){
var map=(typeof hash=="object")?hash:dojo.lang.toArray(arguments,1);
return _990.replace(/\%\{(\w+)\}/g,function(_993,key){
if(typeof (map[key])!="undefined"&&map[key]!=null){
return map[key];
}
dojo.raise("Substitution not found: "+key);
});
};
dojo.string.capitalize=function(str){
if(!dojo.lang.isString(str)){
return "";
}
if(arguments.length==0){
str=this;
}
var _996=str.split(" ");
for(var i=0;i<_996.length;i++){
_996[i]=_996[i].charAt(0).toUpperCase()+_996[i].substring(1);
}
return _996.join(" ");
};
dojo.string.isBlank=function(str){
if(!dojo.lang.isString(str)){
return true;
}
return (dojo.string.trim(str).length==0);
};
dojo.string.encodeAscii=function(str){
if(!dojo.lang.isString(str)){
return str;
}
var ret="";
var _99b=escape(str);
var _99c,re=/%u([0-9A-F]{4})/i;
while((_99c=_99b.match(re))){
var num=Number("0x"+_99c[1]);
var _99f=escape("&#"+num+";");
ret+=_99b.substring(0,_99c.index)+_99f;
_99b=_99b.substring(_99c.index+_99c[0].length);
}
ret+=_99b.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,_9a4){
str=str.replace(/&/gm,"&amp;").replace(/</gm,"&lt;").replace(/>/gm,"&gt;").replace(/"/gm,"&quot;");
if(!_9a4){
str=str.replace(/'/gm,"&#39;");
}
return str;
};
dojo.string.escapeSql=function(str){
return str.replace(/'/gm,"''");
};
dojo.string.escapeRegExp=function(str){
return str.replace(/\\/gm,"\\\\").replace(/([\f\b\n\t\r[\^$|?*+(){}])/gm,"\\$1");
};
dojo.string.escapeJavaScript=function(str){
return str.replace(/(["'\f\b\n\t\r])/gm,"\\$1");
};
dojo.string.escapeString=function(str){
return ("\""+str.replace(/(["\\])/g,"\\$1")+"\"").replace(/[\f]/g,"\\f").replace(/[\b]/g,"\\b").replace(/[\n]/g,"\\n").replace(/[\t]/g,"\\t").replace(/[\r]/g,"\\r");
};
dojo.string.summary=function(str,len){
if(!len||str.length<=len){
return str;
}
return str.substring(0,len).replace(/\.+$/,"")+"...";
};
dojo.string.endsWith=function(str,end,_9ad){
if(_9ad){
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,_9b1,_9b2){
if(_9b2){
str=str.toLowerCase();
_9b1=_9b1.toLowerCase();
}
return str.indexOf(_9b1)==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,_9b8){
if(_9b8=="\n"){
text=text.replace(/\r\n/g,"\n");
text=text.replace(/\r/g,"\n");
}else{
if(_9b8=="\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,_9ba){
var _9bb=[];
for(var i=0,_9bd=0;i<str.length;i++){
if(str.charAt(i)=="\\"){
i++;
continue;
}
if(str.charAt(i)==_9ba){
_9bb.push(str.substring(_9bd,i));
_9bd=i+1;
}
}
_9bb.push(str.substr(_9bd));
return _9bb;
};
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 _9c2=args["back"]||args["backButton"]||args["handle"];
var tcb=function(_9c4){
if(window.location.hash!=""){
setTimeout("window.location.href = '"+hash+"';",1);
}
_9c2.apply(this,[_9c4]);
};
if(args["back"]){
args.back=tcb;
}else{
if(args["backButton"]){
args.backButton=tcb;
}else{
if(args["handle"]){
args.handle=tcb;
}
}
}
var _9c5=args["forward"]||args["forwardButton"]||args["handle"];
var tfw=function(_9c7){
if(window.location.hash!=""){
window.location.href=hash;
}
if(_9c5){
_9c5.apply(this,[_9c7]);
}
};
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,_9ca){
if(!dojo.render.html.opera){
var _9cb=this._getUrlQuery(_9ca.href);
if(_9cb==null){
if(this.historyStack.length==1){
this.handleBackButton();
}
return;
}
if(this.moveForward){
this.moveForward=false;
return;
}
if(this.historyStack.length>=2&&_9cb==this._getUrlQuery(this.historyStack[this.historyStack.length-2].url)){
this.handleBackButton();
}else{
if(this.forwardStack.length>0&&_9cb==this._getUrlQuery(this.forwardStack[this.forwardStack.length-1].url)){
this.handleForwardButton();
}
}
}
},handleBackButton:function(){
var _9cc=this.historyStack.pop();
if(!_9cc){
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(_9cc);
},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 _9d3=url.split("?");
if(_9d3.length<2){
return null;
}else{
return _9d3[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 _9d6=false;
var _9d7=node.getElementsByTagName("input");
dojo.lang.forEach(_9d7,function(_9d8){
if(_9d6){
return;
}
if(_9d8.getAttribute("type")=="file"){
_9d6=true;
}
});
return _9d6;
};
dojo.io.formHasFile=function(_9d9){
return dojo.io.checkChildrenForFile(_9d9);
};
dojo.io.updateNode=function(node,_9db){
node=dojo.byId(node);
var args=_9db;
if(dojo.lang.isString(_9db)){
args={url:_9db};
}
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(_9e2,_9e3,_9e4){
if((!_9e2)||(!_9e2.tagName)||(!_9e2.tagName.toLowerCase()=="form")){
dojo.raise("Attempted to encode a non-form element.");
}
if(!_9e4){
_9e4=dojo.io.formFilter;
}
var enc=/utf/i.test(_9e3||"")?encodeURIComponent:dojo.string.encodeAscii;
var _9e6=[];
for(var i=0;i<_9e2.elements.length;i++){
var elm=_9e2.elements[i];
if(!elm||elm.tagName.toLowerCase()=="fieldset"||!_9e4(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){
_9e6.push(name+"="+enc(elm.options[j].value));
}
}
}else{
if(dojo.lang.inArray(["radio","checkbox"],type)){
if(elm.checked){
_9e6.push(name+"="+enc(elm.value));
}
}else{
_9e6.push(name+"="+enc(elm.value));
}
}
}
var _9ec=_9e2.getElementsByTagName("input");
for(var i=0;i<_9ec.length;i++){
var _9ed=_9ec[i];
if(_9ed.type.toLowerCase()=="image"&&_9ed.form==_9e2&&_9e4(_9ed)){
var name=enc(_9ed.name);
_9e6.push(name+"="+enc(_9ed.value));
_9e6.push(name+".x=0");
_9e6.push(name+".y=0");
}
}
return _9e6.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 _9f3=form.getElementsByTagName("input");
for(var i=0;i<_9f3.length;i++){
var _9f4=_9f3[i];
if(_9f4.type.toLowerCase()=="image"&&_9f4.form==form){
this.connect(_9f4,"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 _9fb=false;
if(node.disabled||!node.name){
_9fb=false;
}else{
if(dojo.lang.inArray(["submit","button","image"],type)){
if(!this.clickedButton){
this.clickedButton=node;
}
_9fb=node==this.clickedButton;
}else{
_9fb=!dojo.lang.inArray(["file","submit","reset","button"],type);
}
}
return _9fb;
},connect:function(_9fc,_9fd,_9fe){
if(dojo.evalObjPath("dojo.event.connect")){
dojo.event.connect(_9fc,_9fd,this,_9fe);
}else{
var fcn=dojo.lang.hitch(this,_9fe);
_9fc[_9fd]=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 _a01=this;
var _a02={};
this.useCache=false;
this.preventCache=false;
function getCacheKey(url,_a04,_a05){
return url+"|"+_a04+"|"+_a05.toLowerCase();
}
function addToCache(url,_a07,_a08,http){
_a02[getCacheKey(url,_a07,_a08)]=http;
}
function getFromCache(url,_a0b,_a0c){
return _a02[getCacheKey(url,_a0b,_a0c)];
}
this.clearCache=function(){
_a02={};
};
function doLoad(_a0d,http,url,_a10,_a11){
if(((http.status>=200)&&(http.status<300))||(http.status==304)||(location.protocol=="file:"&&(http.status==0||http.status==undefined))||(location.protocol=="chrome:"&&(http.status==0||http.status==undefined))){
var ret;
if(_a0d.method.toLowerCase()=="head"){
var _a13=http.getAllResponseHeaders();
ret={};
ret.toString=function(){
return _a13;
};
var _a14=_a13.split(/[\r\n]+/g);
for(var i=0;i<_a14.length;i++){
var pair=_a14[i].match(/^([^:]+)\s*:\s*(.+)$/i);
if(pair){
ret[pair[1]]=pair[2];
}
}
}else{
if(_a0d.mimetype=="text/javascript"){
try{
ret=dj_eval(http.responseText);
}
catch(e){
dojo.debug(e);
dojo.debug(http.responseText);
ret=null;
}
}else{
if(_a0d.mimetype=="text/json"||_a0d.mimetype=="application/json"){
try{
ret=dj_eval("("+http.responseText+")");
}
catch(e){
dojo.debug(e);
dojo.debug(http.responseText);
ret=false;
}
}else{
if((_a0d.mimetype=="application/xml")||(_a0d.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(_a11){
addToCache(url,_a10,_a0d.method,http);
}
_a0d[(typeof _a0d.load=="function")?"load":"handle"]("load",ret,http,_a0d);
}else{
var _a17=new dojo.io.Error("XMLHttpTransport Error: "+http.status+" "+http.statusText);
_a0d[(typeof _a0d.error=="function")?"error":"handle"]("error",_a17,http,_a0d);
}
}
function setHeaders(http,_a19){
if(_a19["headers"]){
for(var _a1a in _a19["headers"]){
if(_a1a.toLowerCase()=="content-type"&&!_a19["contentType"]){
_a19["contentType"]=_a19["headers"][_a1a];
}else{
http.setRequestHeader(_a1a,_a19["headers"][_a1a]);
}
}
}
}
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&&!_a01._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 _a1e=new dojo.io.Error("XMLHttpTransport.watchInFlight Error: "+e);
tif.req[(typeof tif.req.error=="function")?"error":"handle"]("error",_a1e,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 _a1f=dojo.hostenv.getXmlhttpObject()?true:false;
this.canHandle=function(_a20){
return _a1f&&dojo.lang.inArray(["text/plain","text/html","application/xml","text/xml","text/javascript","text/json","application/json"],(_a20["mimetype"].toLowerCase()||""))&&!(_a20["formNode"]&&dojo.io.formHasFile(_a20["formNode"]));
};
this.multipartBoundary="45309FFF-BD65-4d50-99C9-36986896A96F";
this.bind=function(_a21){
if(!_a21["url"]){
if(!_a21["formNode"]&&(_a21["backButton"]||_a21["back"]||_a21["changeUrl"]||_a21["watchForURL"])&&(!djConfig.preventBackButtonFix)){
dojo.deprecated("Using dojo.io.XMLHTTPTransport.bind() to add to browser history without doing an IO request","Use dojo.undo.browser.addToHistory() instead.","0.4");
dojo.undo.browser.addToHistory(_a21);
return true;
}
}
var url=_a21.url;
var _a23="";
if(_a21["formNode"]){
var ta=_a21.formNode.getAttribute("action");
if((ta)&&(!_a21["url"])){
url=ta;
}
var tp=_a21.formNode.getAttribute("method");
if((tp)&&(!_a21["method"])){
_a21.method=tp;
}
_a23+=dojo.io.encodeForm(_a21.formNode,_a21.encoding,_a21["formFilter"]);
}
if(url.indexOf("#")>-1){
dojo.debug("Warning: dojo.io.bind: stripping hash values from url:",url);
url=url.split("#")[0];
}
if(_a21["file"]){
_a21.method="post";
}
if(!_a21["method"]){
_a21.method="get";
}
if(_a21.method.toLowerCase()=="get"){
_a21.multipart=false;
}else{
if(_a21["file"]){
_a21.multipart=true;
}else{
if(!_a21["multipart"]){
_a21.multipart=false;
}
}
}
if(_a21["backButton"]||_a21["back"]||_a21["changeUrl"]){
dojo.undo.browser.addToHistory(_a21);
}
var _a26=_a21["content"]||{};
if(_a21.sendTransport){
_a26["dojo.transport"]="xmlhttp";
}
do{
if(_a21.postContent){
_a23=_a21.postContent;
break;
}
if(_a26){
_a23+=dojo.io.argsFromMap(_a26,_a21.encoding);
}
if(_a21.method.toLowerCase()=="get"||!_a21.multipart){
break;
}
var t=[];
if(_a23.length){
var q=_a23.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(_a21.file){
if(dojo.lang.isArray(_a21.file)){
for(var i=0;i<_a21.file.length;++i){
var o=_a21.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=_a21.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+"--","");
_a23=t.join("\r\n");
}
}while(false);
var _a2c=_a21["sync"]?false:true;
var _a2d=_a21["preventCache"]||(this.preventCache==true&&_a21["preventCache"]!=false);
var _a2e=_a21["useCache"]==true||(this.useCache==true&&_a21["useCache"]!=false);
if(!_a2d&&_a2e){
var _a2f=getFromCache(url,_a23,_a21.method);
if(_a2f){
doLoad(_a21,_a2f,url,_a23,false);
return;
}
}
var http=dojo.hostenv.getXmlhttpObject(_a21);
var _a31=false;
if(_a2c){
var _a32=this.inFlight.push({"req":_a21,"http":http,"url":url,"query":_a23,"useCache":_a2e,"startTime":_a21.timeoutSeconds?(new Date()).getTime():0});
this.startWatchingInFlight();
}else{
_a01._blockAsync=true;
}
if(_a21.method.toLowerCase()=="post"){
if(!_a21.user){
http.open("POST",url,_a2c);
}else{
http.open("POST",url,_a2c,_a21.user,_a21.password);
}
setHeaders(http,_a21);
http.setRequestHeader("Content-Type",_a21.multipart?("multipart/form-data; boundary="+this.multipartBoundary):(_a21.contentType||"application/x-www-form-urlencoded"));
try{
http.send(_a23);
}
catch(e){
if(typeof http.abort=="function"){
http.abort();
}
doLoad(_a21,{status:404},url,_a23,_a2e);
}
}else{
var _a33=url;
if(_a23!=""){
_a33+=(_a33.indexOf("?")>-1?"&":"?")+_a23;
}
if(_a2d){
_a33+=(dojo.string.endsWithAny(_a33,"?","&")?"":(_a33.indexOf("?")>-1?"&":"?"))+"dojo.preventCache="+new Date().valueOf();
}
if(!_a21.user){
http.open(_a21.method.toUpperCase(),_a33,_a2c);
}else{
http.open(_a21.method.toUpperCase(),_a33,_a2c,_a21.user,_a21.password);
}
setHeaders(http,_a21);
try{
http.send(null);
}
catch(e){
if(typeof http.abort=="function"){
http.abort();
}
doLoad(_a21,{status:404},url,_a23,_a2e);
}
}
if(!_a2c){
doLoad(_a21,http,url,_a23,_a2e);
_a01._blockAsync=false;
}
_a21.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,_a35,days,path,_a38,_a39){
var _a3a=-1;
if((typeof days=="number")&&(days>=0)){
var d=new Date();
d.setTime(d.getTime()+(days*24*60*60*1000));
_a3a=d.toGMTString();
}
_a35=escape(_a35);
document.cookie=name+"="+_a35+";"+(_a3a!=-1?" expires="+_a3a+";":"")+(path?"path="+path:"")+(_a38?"; domain="+_a38:"")+(_a39?"; 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 _a3e=document.cookie.substring(idx+name.length+1);
var end=_a3e.indexOf(";");
if(end==-1){
end=_a3e.length;
}
_a3e=_a3e.substring(0,end);
_a3e=unescape(_a3e);
return _a3e;
};
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,_a45,_a46,_a47){
if(arguments.length==5){
_a47=_a45;
_a45=null;
_a46=null;
}
var _a48=[],_a49,_a4a="";
if(!_a47){
_a49=dojo.io.cookie.getObjectCookie(name);
}
if(days>=0){
if(!_a49){
_a49={};
}
for(var prop in obj){
if(obj[prop]==null){
delete _a49[prop];
}else{
if((typeof obj[prop]=="string")||(typeof obj[prop]=="number")){
_a49[prop]=obj[prop];
}
}
}
prop=null;
for(var prop in _a49){
_a48.push(escape(prop)+"="+escape(_a49[prop]));
}
_a4a=_a48.join("&");
}
dojo.io.cookie.setCookie(name,_a4a,days,path,_a45,_a46);
};
dojo.io.cookie.getObjectCookie=function(name){
var _a4d=null,_a4e=dojo.io.cookie.getCookie(name);
if(_a4e){
_a4d={};
var _a4f=_a4e.split("&");
for(var i=0;i<_a4f.length;i++){
var pair=_a4f[i].split("=");
var _a52=pair[1];
if(isNaN(_a52)){
_a52=unescape(pair[1]);
}
_a4d[unescape(pair[0])]=_a52;
}
}
return _a4d;
};
dojo.io.cookie.isSupported=function(){
if(typeof navigator.cookieEnabled!="boolean"){
dojo.io.cookie.setCookie("__TestingYourBrowserForCookieSupport__","CookiesAllowed",90,null);
var _a53=dojo.io.cookie.getCookie("__TestingYourBrowserForCookieSupport__");
navigator.cookieEnabled=(_a53=="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.io.IframeIO");
dojo.io.createIFrame=function(_a54,_a55,uri){
if(window[_a54]){
return window[_a54];
}
if(window.frames[_a54]){
return window.frames[_a54];
}
var r=dojo.render.html;
var _a58=null;
var turi=uri;
if(!turi){
if(djConfig["useXDomain"]&&!djConfig["dojoIframeHistoryUrl"]){
dojo.debug("dojo.io.createIFrame: When using cross-domain Dojo builds,"+" please save iframe_history.html to your domain and set djConfig.dojoIframeHistoryUrl"+" to the path on your domain to iframe_history.html");
}
turi=(djConfig["dojoIframeHistoryUrl"]||dojo.uri.moduleUri("dojo","../iframe_history.html"))+"#noInit=true";
}
var _a5a=((r.ie)&&(dojo.render.os.win))?"<iframe name=\""+_a54+"\" src=\""+turi+"\" onload=\""+_a55+"\">":"iframe";
_a58=document.createElement(_a5a);
with(_a58){
name=_a54;
setAttribute("name",_a54);
id=_a54;
}
dojo.body().appendChild(_a58);
window[_a54]=_a58;
with(_a58.style){
if(!r.safari){
position="absolute";
}
left=top="0px";
height=width="1px";
visibility="hidden";
}
if(!r.ie){
dojo.io.setIFrameSrc(_a58,turi,true);
_a58.onload=new Function(_a55);
}
return _a58;
};
dojo.io.IframeTransport=new function(){
var _a5b=this;
this.currentRequest=null;
this.requestQueue=[];
this.iframeName="dojoIoIframe";
this.fireNextRequest=function(){
try{
if((this.currentRequest)||(this.requestQueue.length==0)){
return;
}
var cr=this.currentRequest=this.requestQueue.shift();
cr._contentToClean=[];
var fn=cr["formNode"];
var _a5e=cr["content"]||{};
if(cr.sendTransport){
_a5e["dojo.transport"]="iframe";
}
if(fn){
if(_a5e){
for(var x in _a5e){
if(!fn[x]){
var tn;
if(dojo.render.html.ie){
tn=document.createElement("<input type='hidden' name='"+x+"' value='"+_a5e[x]+"'>");
fn.appendChild(tn);
}else{
tn=document.createElement("input");
fn.appendChild(tn);
tn.type="hidden";
tn.name=x;
tn.value=_a5e[x];
}
cr._contentToClean.push(x);
}else{
fn[x].value=_a5e[x];
}
}
}
if(cr["url"]){
cr._originalAction=fn.getAttribute("action");
fn.setAttribute("action",cr.url);
}
if(!fn.getAttribute("method")){
fn.setAttribute("method",(cr["method"])?cr["method"]:"post");
}
cr._originalTarget=fn.getAttribute("target");
fn.setAttribute("target",this.iframeName);
fn.target=this.iframeName;
fn.submit();
}else{
var _a61=dojo.io.argsFromMap(this.currentRequest.content);
var _a62=cr.url+(cr.url.indexOf("?")>-1?"&":"?")+_a61;
dojo.io.setIFrameSrc(this.iframe,_a62,true);
}
}
catch(e){
this.iframeOnload(e);
}
};
this.canHandle=function(_a63){
return ((dojo.lang.inArray(["text/plain","text/html","text/javascript","text/json","application/json"],_a63["mimetype"]))&&(dojo.lang.inArray(["post","get"],_a63["method"].toLowerCase()))&&(!((_a63["sync"])&&(_a63["sync"]==true))));
};
this.bind=function(_a64){
if(!this["iframe"]){
this.setUpIframe();
}
this.requestQueue.push(_a64);
this.fireNextRequest();
return;
};
this.setUpIframe=function(){
this.iframe=dojo.io.createIFrame(this.iframeName,"dojo.io.IframeTransport.iframeOnload();");
};
this.iframeOnload=function(_a65){
if(!_a5b.currentRequest){
_a5b.fireNextRequest();
return;
}
var req=_a5b.currentRequest;
if(req.formNode){
var _a67=req._contentToClean;
for(var i=0;i<_a67.length;i++){
var key=_a67[i];
if(dojo.render.html.safari){
var _a6a=req.formNode;
for(var j=0;j<_a6a.childNodes.length;j++){
var _a6c=_a6a.childNodes[j];
if(_a6c.name==key){
var _a6d=_a6c.parentNode;
_a6d.removeChild(_a6c);
break;
}
}
}else{
var _a6e=req.formNode[key];
req.formNode.removeChild(_a6e);
req.formNode[key]=null;
}
}
if(req["_originalAction"]){
req.formNode.setAttribute("action",req._originalAction);
}
if(req["_originalTarget"]){
req.formNode.setAttribute("target",req._originalTarget);
req.formNode.target=req._originalTarget;
}
}
var _a6f=function(_a70){
var doc=_a70.contentDocument||((_a70.contentWindow)&&(_a70.contentWindow.document))||((_a70.name)&&(document.frames[_a70.name])&&(document.frames[_a70.name].document))||null;
return doc;
};
var _a72;
var _a73=false;
if(_a65){
this._callError(req,"IframeTransport Request Error: "+_a65);
}else{
var ifd=_a6f(_a5b.iframe);
try{
var cmt=req.mimetype;
if((cmt=="text/javascript")||(cmt=="text/json")||(cmt=="application/json")){
var js=ifd.getElementsByTagName("textarea")[0].value;
if(cmt=="text/json"||cmt=="application/json"){
js="("+js+")";
}
_a72=dj_eval(js);
}else{
if(cmt=="text/html"){
_a72=ifd;
}else{
_a72=ifd.getElementsByTagName("textarea")[0].value;
}
}
_a73=true;
}
catch(e){
this._callError(req,"IframeTransport Error: "+e);
}
}
try{
if(_a73&&dojo.lang.isFunction(req["load"])){
req.load("load",_a72,req);
}
}
catch(e){
throw e;
}
finally{
_a5b.currentRequest=null;
_a5b.fireNextRequest();
}
};
this._callError=function(req,_a78){
var _a79=new dojo.io.Error(_a78);
if(dojo.lang.isFunction(req["error"])){
req.error("error",_a79,req);
}
};
dojo.io.transports.addTransport("IframeTransport");
};
dojo.provide("dojo.widget.ContentPane");
dojo.widget.defineWidget("dojo.widget.ContentPane",dojo.widget.HtmlWidget,function(){
this._styleNodes=[];
this._onLoadStack=[];
this._onUnloadStack=[];
this._callOnUnload=false;
this._ioBindObj;
this.scriptScope;
this.bindArgs={};
},{isContainer:true,adjustPaths:true,href:"",extractContent:true,parseContent:true,cacheContent:true,preload:false,refreshOnShow:false,handler:"",executeScripts:false,scriptSeparation:true,loadingMessage:"Loading...",isLoaded:false,postCreate:function(args,frag,_a7c){
if(this.handler!==""){
this.setHandler(this.handler);
}
if(this.isShowing()||this.preload){
this.loadContents();
}
},show:function(){
if(this.refreshOnShow){
this.refresh();
}else{
this.loadContents();
}
dojo.widget.ContentPane.superclass.show.call(this);
},refresh:function(){
this.isLoaded=false;
this.loadContents();
},loadContents:function(){
if(this.isLoaded){
return;
}
if(dojo.lang.isFunction(this.handler)){
this._runHandler();
}else{
if(this.href!=""){
this._downloadExternalContent(this.href,this.cacheContent&&!this.refreshOnShow);
}
}
},setUrl:function(url){
this.href=url;
this.isLoaded=false;
if(this.preload||this.isShowing()){
this.loadContents();
}
},abort:function(){
var bind=this._ioBindObj;
if(!bind||!bind.abort){
return;
}
bind.abort();
delete this._ioBindObj;
},_downloadExternalContent:function(url,_a80){
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();
}
}},_a80));
},_cacheSetting:function(_a86,_a87){
for(var x in this.bindArgs){
if(dojo.lang.isUndefined(_a86[x])){
_a86[x]=this.bindArgs[x];
}
}
if(dojo.lang.isUndefined(_a86.useCache)){
_a86.useCache=_a87;
}
if(dojo.lang.isUndefined(_a86.preventCache)){
_a86.preventCache=!_a87;
}
if(dojo.lang.isUndefined(_a86.mimetype)){
_a86.mimetype="text/html";
}
return _a86;
},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(_a8c){
var st=this[_a8c];
var err="";
var _a8f=this.scriptScope||window;
for(var i=0;i<st.length;i++){
try{
st[i].call(_a8f);
}
catch(e){
err+="\n"+st[i]+" failed: "+e.description;
}
}
this[_a8c]=[];
if(err.length){
var name=(_a8c=="_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(_a96,obj,func){
if(typeof func=="undefined"){
_a96.push(obj);
}else{
_a96.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,_aa0,_aa1){
if(!_aa0){
_aa0="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[_aa0](e);
if(e.returnValue){
switch(_aa1){
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 _aa4=[],_aa5=[],tmp=[];
var _aa7=[],_aa8=[],attr=[],_aaa=[];
var str="",path="",fix="",_aae="",tag="",_ab0="";
if(!url){
url="./";
}
if(s){
var _ab1=/<title[^>]*>([\s\S]*?)<\/title>/i;
while(_aa7=_ab1.exec(s)){
_aa4.push(_aa7[1]);
s=s.substring(0,_aa7.index)+s.substr(_aa7.index+_aa7[0].length);
}
if(this.adjustPaths){
var _ab2=/<[a-z][a-z0-9]*[^>]*\s(?:(?:src|href|style)=[^>])+[^>]*>/i;
var _ab3=/\s(src|href|style)=(['"]?)([\w()\[\]\/.,\\'"-:;#=&?\s@]+?)\2/i;
var _ab4=/^(?:[#]|(?:(?:https?|ftps?|file|javascript|mailto|news):))/;
while(tag=_ab2.exec(s)){
str+=s.substring(0,tag.index);
s=s.substring((tag.index+tag[0].length),s.length);
tag=tag[0];
_aae="";
while(attr=_ab3.exec(tag)){
path="";
_ab0=attr[3];
switch(attr[1].toLowerCase()){
case "src":
case "href":
if(_ab4.exec(_ab0)){
path=_ab0;
}else{
path=(new dojo.uri.Uri(url,_ab0).toString());
}
break;
case "style":
path=dojo.html.fixPathsInCssText(_ab0,url);
break;
default:
path=_ab0;
}
fix=" "+attr[1]+"="+attr[2]+path+attr[2];
_aae+=tag.substring(0,attr.index)+fix;
tag=tag.substring((attr.index+attr[0].length),tag.length);
}
str+=_aae+tag;
}
s=str+s;
}
_ab1=/(?:<(style)[^>]*>([\s\S]*?)<\/style>|<link ([^>]*rel=['"]?stylesheet['"]?[^>]*)>)/i;
while(_aa7=_ab1.exec(s)){
if(_aa7[1]&&_aa7[1].toLowerCase()=="style"){
_aaa.push(dojo.html.fixPathsInCssText(_aa7[2],url));
}else{
if(attr=_aa7[3].match(/href=(['"]?)([^'">]*)\1/i)){
_aaa.push({path:attr[2]});
}
}
s=s.substring(0,_aa7.index)+s.substr(_aa7.index+_aa7[0].length);
}
var _ab1=/<script([^>]*)>([\s\S]*?)<\/script>/i;
var _ab5=/src=(['"]?)([^"']*)\1/i;
var _ab6=/.*(\bdojo\b\.js(?:\.uncompressed\.js)?)$/;
var _ab7=/(?:var )?\bdjConfig\b(?:[\s]*=[\s]*\{[^}]+\}|\.[\w]*[\s]*=[\s]*[^;\n]*)?;?|dojo\.hostenv\.writeIncludes\(\s*\);?/g;
var _ab8=/dojo\.(?:(?:require(?:After)?(?:If)?)|(?:widget\.(?:manager\.)?registerWidgetPackage)|(?:(?:hostenv\.)?setModulePrefix|registerModulePath)|defineNamespace)\((['"]).*?\1\)\s*;?/;
while(_aa7=_ab1.exec(s)){
if(this.executeScripts&&_aa7[1]){
if(attr=_ab5.exec(_aa7[1])){
if(_ab6.exec(attr[2])){
dojo.debug("Security note! inhibit:"+attr[2]+" from  being loaded again.");
}else{
_aa5.push({path:attr[2]});
}
}
}
if(_aa7[2]){
var sc=_aa7[2].replace(_ab7,"");
if(!sc){
continue;
}
while(tmp=_ab8.exec(sc)){
_aa8.push(tmp[0]);
sc=sc.substring(0,tmp.index)+sc.substr(tmp.index+tmp[0].length);
}
if(this.executeScripts){
_aa5.push(sc);
}
}
s=s.substr(0,_aa7.index)+s.substr(_aa7.index+_aa7[0].length);
}
if(this.extractContent){
_aa7=s.match(/<body[^>]*>\s*([\s\S]+)\s*<\/body>/im);
if(_aa7){
s=_aa7[1];
}
}
if(this.executeScripts&&this.scriptSeparation){
var _ab1=/(<[a-zA-Z][a-zA-Z0-9]*\s[^>]*?\S=)((['"])[^>]*scriptScope[^>]*>)/;
var _aba=/([\s'";:\(])scriptScope(.*)/;
str="";
while(tag=_ab1.exec(s)){
tmp=((tag[3]=="'")?"\"":"'");
fix="";
str+=s.substring(0,tag.index)+tag[1];
while(attr=_aba.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":_aaa,"titles":_aa4,"requires":_aa8,"scripts":_aa5,"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 _ac0=this;
function asyncParse(){
if(_ac0.executeScripts){
_ac0._executeScripts(data.scripts);
}
if(_ac0.parseContent){
var node=_ac0.containerNode||_ac0.domNode;
var _ac2=new dojo.xml.Parse();
var frag=_ac2.parseElement(node,null,true);
dojo.widget.getParser().createSubComponents(frag,_ac0);
}
_ac0.onResized();
_ac0.onLoad();
}
if(dojo.hostenv.isXDomain&&data.requires.length){
dojo.addOnLoad(asyncParse);
}else{
asyncParse();
}
}
},setHandler:function(_ac4){
var fcn=dojo.lang.isFunction(_ac4)?_ac4:window[_ac4];
if(!dojo.lang.isFunction(fcn)){
this._handleDefaults("Unable to set handler, '"+_ac4+"' 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(_ac7){
var self=this;
var tmp="",code="";
for(var i=0;i<_ac7.length;i++){
if(_ac7[i].path){
dojo.io.bind(this._cacheSetting({"url":_ac7[i].path,"load":function(type,_acd){
dojo.lang.hitch(self,tmp=";"+_acd);
},"error":function(type,_acf){
_acf.text=type+" downloading remote script";
self._handleDefaults.call(self,_acf,"onExecError","debug");
},"mimetype":"text/plain","sync":true},this.cacheContent));
code+=tmp;
}else{
code+=_ac7[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.widget.html.ContentPane");
dojo.widget.html.ContentPane=function(){
this._onLoadStack=[];
this._onUnLoadStack=[];
dojo.widget.HtmlWidget.call(this);
};
dojo.inherits(dojo.widget.html.ContentPane,dojo.widget.HtmlWidget);
dojo.lang.extend(dojo.widget.html.ContentPane,{widgetType:"ContentPane",isContainer:true,adjustPaths:true,href:"",extractContent:true,parseContent:true,cacheContent:true,preload:false,refreshOnShow:false,handler:"",executeScripts:false,scriptScope:null,_remoteStyles:null,_callOnUnLoad:false,postCreate:function(args,frag,_ad5){
if(this.handler!=""){
this.setHandler(this.handler);
}
if(this.isShowing()||this.preload){
this.loadContents();
}
},show:function(){
if(this.refreshOnShow){
this.refresh();
}else{
this.loadContents();
}
dojo.widget.html.ContentPane.superclass.show.call(this);
},refresh:function(){
this.isLoaded=false;
this.loadContents();
},loadContents:function(){
if(this.isLoaded){
return;
}
this.isLoaded=true;
if(dojo.lang.isFunction(this.handler)){
this._runHandler();
}else{
if(this.href!=""){
this._downloadExternalContent(this.href,this.cacheContent);
}
}
},setUrl:function(url){
this.href=url;
this.isLoaded=false;
if(this.preload||this.isShowing()){
this.loadContents();
}
},_downloadExternalContent:function(url,_ad8){
this._handleDefaults("Loading...","onDownloadStart");
var self=this;
dojo.io.bind({url:url,useCache:_ad8,preventCache:!_ad8,mimetype:"text/html",handler:function(type,data,e){
if(type=="load"){
self.onDownloadEnd.call(self,url,data);
}else{
self._handleDefaults.call(self,"Error loading '"+url+"' ("+e.status+" "+e.statusText+")","onDownloadError");
self.onLoad();
}
}});
},onLoad:function(e){
this._runStack("_onLoadStack");
},onUnLoad:function(e){
this._runStack("_onUnLoadStack");
this.scriptScope=null;
},_runStack:function(_adf){
var st=this[_adf];
var err="";
for(var i=0;i<st.length;i++){
try{
st[i].call(this.scriptScope);
}
catch(e){
err+="\n"+st[i]+" failed: "+e.description;
}
}
this[_adf]=[];
if(err.length){
var name=(_adf=="_onLoadStack")?"addOnLoad":"addOnUnLoad";
this._handleDefaults(name+" failure\n "+err,"onExecError",true);
}
},addOnLoad:function(obj,func){
this._pushOnStack(this._onLoadStack,obj,func);
},addOnUnLoad:function(obj,func){
this._pushOnStack(this._onUnLoadStack,obj,func);
},_pushOnStack:function(_ae8,obj,func){
if(typeof func=="undefined"){
_ae8.push(obj);
}else{
_ae8.push(function(){
obj[func]();
});
}
},destroy:function(){
this.onUnLoad();
dojo.widget.html.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,_af2,_af3){
if(!_af2){
_af2="onContentError";
}
if(dojo.lang.isString(e)){
e={"text":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[_af2](e);
if(e.returnValue){
if(_af3){
alert(e.toString());
}else{
if(this._callOnUnLoad){
this.onUnLoad();
}
this._callOnUnLoad=false;
this._setContent(e.toString());
}
}
},splitAndFixPaths:function(s,url){
if(!url){
url="./";
}
if(!s){
return "";
}
var _af6=[];
var _af7=[];
var _af8=[];
var _af9=[];
var _afa=[];
var _afb=[];
var _afc=[];
while(_afc){
_afc=s.match(/<title[^>]*>([\s\S]*?)<\/title>/i);
if(!_afc){
break;
}
_af6.push(_afc[1]);
s=s.replace(/<title[^>]*>[\s\S]*?<\/title>/i,"");
}
var _afc=[];
while(_afc){
_afc=s.match(/<style[^>]*>([\s\S]*?)<\/style>/i);
if(!_afc){
break;
}
_af9.push(dojo.style.fixPathsInCssText(_afc[1],url));
s=s.replace(/<style[^>]*?>[\s\S]*?<\/style>/i,"");
}
var pos=0;
var pos2=0;
var stop=0;
var str="";
var _b01="";
var attr=[];
var fix="";
var _b04="";
var tag="";
var _b06="";
while(pos>-1){
pos=s.search(/<[a-z][a-z0-9]*[^>]*\s(?:(?:src|href|style)=[^>])+[^>]*>/i);
if(pos==-1){
break;
}
str+=s.substring(0,pos);
s=s.substring(pos,s.length);
tag=s.match(/^<[a-z][a-z0-9]*[^>]*>/i)[0];
s=s.substring(tag.length,s.length);
pos2=0;
_b04="";
fix="";
_b06="";
var _b07=0;
while(pos2!=-1){
_b04+=tag.substring(0,pos2)+fix;
tag=tag.substring(pos2+_b07,tag.length);
attr=tag.match(/ (src|href|style)=(['"]?)([\w()\[\]\/.,\\'"-:;#=&?\s@]+?)\2/i);
if(!attr){
break;
}
switch(attr[1].toLowerCase()){
case "src":
case "href":
if(attr[3].search(/^(?:[#]|(?:(?:https?|ftps?|file|javascript|mailto|news):))/)==-1){
_b01=(new dojo.uri.Uri(url,attr[3]).toString());
}else{
pos2=pos2+attr[3].length;
continue;
}
break;
case "style":
_b01=dojo.style.fixPathsInCssText(attr[3],url);
break;
default:
pos2=pos2+attr[3].length;
continue;
}
_b06=" "+attr[1]+"="+attr[2]+attr[3]+attr[2];
_b07=_b06.length;
fix=" "+attr[1]+"="+attr[2]+_b01+attr[2];
pos2=tag.search(new RegExp(dojo.string.escapeRegExp(_b06)));
}
str+=_b04+tag;
pos=0;
}
s=str+s;
_afc=[];
var tmp=[];
while(_afc){
_afc=s.match(/<script([^>]*)>([\s\S]*?)<\/script>/i);
if(!_afc){
break;
}
if(_afc[1]){
attr=_afc[1].match(/src=(['"]?)([^"']*)\1/i);
if(attr){
var tmp=attr[2].search(/.*(\bdojo\b(?:\.uncompressed)?\.js)$/);
if(tmp>-1){
dojo.debug("Security note! inhibit:"+attr[2]+" from  beeing loaded again.");
}else{
_afa.push(attr[2]);
}
}
}
if(_afc[2]){
var sc=_afc[2].replace(/(?:var )?\bdjConfig\b(?:[\s]*=[\s]*\{[^}]+\}|\.[\w]*[\s]*=[\s]*[^;\n]*)?;?|dojo\.hostenv\.writeIncludes\(\s*\);?/g,"");
if(!sc){
continue;
}
tmp=[];
while(tmp&&_afb.length<100){
tmp=sc.match(/dojo\.(?:(?:require(?:After)?(?:If)?)|(?:widget\.(?:manager\.)?registerWidgetPackage)|(?:(?:hostenv\.)?setModulePrefix))\((['"]).*?\1\)\s*;?/);
if(!tmp){
break;
}
_afb.push(tmp[0]);
sc=sc.replace(tmp[0],"");
}
_af7.push(sc);
}
s=s.replace(/<script[^>]*>[\s\S]*?<\/script>/i,"");
}
if(this.executeScripts){
var _b06=/(<[a-zA-Z][a-zA-Z0-9]*\s[^>]*\S=(['"])[^>]*[^\.\]])scriptScope([^>]*>)/;
var pos=0;
var str="";
_afc=[];
var cit="";
while(pos>-1){
pos=s.search(_b06);
if(pos>-1){
cit=((RegExp.$2=="'")?"\"":"'");
str+=s.substring(0,pos);
s=s.substr(pos).replace(_b06,"$1dojo.widget.byId("+cit+this.widgetId+cit+").scriptScope$3");
}
}
s=str+s;
}
_afc=[];
while(_afc){
_afc=s.match(/<link ([^>]*rel=['"]?stylesheet['"]?[^>]*)>/i);
if(!_afc){
break;
}
attr=_afc[1].match(/href=(['"]?)([^'">]*)\1/i);
if(attr){
_af8.push(attr[2]);
}
s=s.replace(new RegExp(_afc[0]),"");
}
return {"xml":s,"styles":_af9,"linkStyles":_af8,"titles":_af6,"requires":_afb,"scripts":_af7,"remoteScripts":_afa,"url":url};
},_setContent:function(xml){
this.destroyChildren();
if(this._remoteStyles){
for(var i=0;i<this._remoteStyles.length;i++){
if(this._remoteStyles[i]&&this._remoteStyles.parentNode){
this._remoteStyles[i].parentNode.removeChild(this._remoteStyles[i]);
}
}
this._remoteStyles=null;
}
var node=this.containerNode||this.domNode;
try{
if(typeof xml!="string"){
node.innerHTML="";
node.appendChild(xml);
}else{
node.innerHTML=xml;
}
}
catch(e){
e="Could'nt load content:"+e;
this._handleDefaults(e,"onContentError");
}
},setContent:function(data){
if(this._callOnUnLoad){
this.onUnLoad();
}
this._callOnUnLoad=true;
if(!data||dojo.dom.isNode(data)){
this._setContent(data);
this.onResized();
this.onLoad();
}else{
if((!data.xml)&&(this.adjustPaths)){
data=this.splitAndFixPaths(data);
}
if(this.extractContent){
var _b0f=data.xml.match(/<body[^>]*>\s*([\s\S]+)\s*<\/body>/im);
if(_b0f){
data.xml=_b0f[1];
}
}
for(var i=0;i<data.styles.length;i++){
if(i==0){
this._remoteStyles=[];
}
this._remoteStyles.push(dojo.style.insertCssText(data.styles[i]));
}
for(var i=0;i<data.linkStyles.length;i++){
if(i==0){
this._remoteStyles=[];
}
this._remoteStyles.push(dojo.style.insertCssFile(data.linkStyles[i]));
}
this._setContent(data.xml);
if(this.parseContent){
for(var i=0;i<data.requires.length;i++){
try{
eval(data.requires[i]);
}
catch(e){
this._handleDefaults(e,"onContentError",true);
}
}
}
var _b11=this;
function asyncParse(){
if(_b11.executeScripts){
_b11._executeScripts(data);
}
if(_b11.parseContent){
var node=_b11.containerNode||_b11.domNode;
var _b13=new dojo.xml.Parse();
var frag=_b13.parseElement(node,null,true);
dojo.widget.getParser().createSubComponents(frag,_b11);
}
_b11.onResized();
_b11.onLoad();
}
if(dojo.hostenv.isXDomain&&data.requires.length){
dojo.addOnLoad(asyncParse);
}else{
asyncParse();
}
}
},setHandler:function(_b15){
var fcn=dojo.lang.isFunction(_b15)?_b15:window[_b15];
if(!dojo.lang.isFunction(fcn)){
this._handleDefaults("Unable to set handler, '"+_b15+"' not a function.","onExecError",true);
return;
}
this.handler=function(){
return fcn.apply(this,arguments);
};
},_runHandler:function(){
if(dojo.lang.isFunction(this.handler)){
this.handler(this,this.domNode);
return false;
}
return true;
},_executeScripts:function(data){
var self=this;
for(var i=0;i<data.remoteScripts.length;i++){
dojo.io.bind({"url":data.remoteScripts[i],"useCash":this.cacheContent,"load":function(type,_b1b){
dojo.lang.hitch(self,data.scripts.push(_b1b));
},"error":function(type,_b1d){
self._handleDefaults.call(self,type+" downloading remote script","onExecError",true);
},"mimetype":"text/plain","sync":true});
}
var _b1e="";
for(var i=0;i<data.scripts.length;i++){
_b1e+=data.scripts[i];
}
try{
this.scriptScope=null;
this.scriptScope=new (new Function("_container_",_b1e+"; return this;"))(self);
}
catch(e){
this._handleDefaults("Error running scripts from content:\n"+e,"onExecError",true);
}
}});
dojo.widget.tags.addParseTreeHandler("dojo:ContentPane");
dojo.provide("dojo.html.selection");
dojo.html.selectionType={NONE:0,TEXT:1,CONTROL:2};
dojo.html.clearSelection=function(){
var _b1f=dojo.global();
var _b20=dojo.doc();
try{
if(_b1f["getSelection"]){
if(dojo.render.html.safari){
_b1f.getSelection().collapse();
}else{
_b1f.getSelection().removeAllRanges();
}
}else{
if(_b20.selection){
if(_b20.selection.empty){
_b20.selection.empty();
}else{
if(_b20.selection.clear){
_b20.selection.clear();
}
}
}
}
return true;
}
catch(e){
dojo.debug(e);
return false;
}
};
dojo.html.disableSelection=function(_b21){
_b21=dojo.byId(_b21)||dojo.body();
var h=dojo.render.html;
if(h.mozilla){
_b21.style.MozUserSelect="none";
}else{
if(h.safari){
_b21.style.KhtmlUserSelect="none";
}else{
if(h.ie){
_b21.unselectable="on";
}else{
return false;
}
}
}
return true;
};
dojo.html.enableSelection=function(_b23){
_b23=dojo.byId(_b23)||dojo.body();
var h=dojo.render.html;
if(h.mozilla){
_b23.style.MozUserSelect="";
}else{
if(h.safari){
_b23.style.KhtmlUserSelect="";
}else{
if(h.ie){
_b23.unselectable="off";
}else{
return false;
}
}
}
return true;
};
dojo.html.selectElement=function(_b25){
dojo.deprecated("dojo.html.selectElement","replaced by dojo.html.selection.selectElementChildren",0.5);
};
dojo.html.selectInputText=function(_b26){
var _b27=dojo.global();
var _b28=dojo.doc();
_b26=dojo.byId(_b26);
if(_b28["selection"]&&dojo.body()["createTextRange"]){
var _b29=_b26.createTextRange();
_b29.moveStart("character",0);
_b29.moveEnd("character",_b26.value.length);
_b29.select();
}else{
if(_b27["getSelection"]){
var _b2a=_b27.getSelection();
_b26.setSelectionRange(0,_b26.value.length);
}
}
_b26.focus();
};
dojo.html.isSelectionCollapsed=function(){
dojo.deprecated("dojo.html.isSelectionCollapsed","replaced by dojo.html.selection.isCollapsed",0.5);
return dojo.html.selection.isCollapsed();
};
dojo.lang.mixin(dojo.html.selection,{getType:function(){
if(dojo.doc()["selection"]){
return dojo.html.selectionType[dojo.doc().selection.type.toUpperCase()];
}else{
var _b2b=dojo.html.selectionType.TEXT;
var oSel;
try{
oSel=dojo.global().getSelection();
}
catch(e){
}
if(oSel&&oSel.rangeCount==1){
var _b2d=oSel.getRangeAt(0);
if(_b2d.startContainer==_b2d.endContainer&&(_b2d.endOffset-_b2d.startOffset)==1&&_b2d.startContainer.nodeType!=dojo.dom.TEXT_NODE){
_b2b=dojo.html.selectionType.CONTROL;
}
}
return _b2b;
}
},isCollapsed:function(){
var _b2e=dojo.global();
var _b2f=dojo.doc();
if(_b2f["selection"]){
return _b2f.selection.createRange().text=="";
}else{
if(_b2e["getSelection"]){
var _b30=_b2e.getSelection();
if(dojo.lang.isString(_b30)){
return _b30=="";
}else{
return _b30.isCollapsed||_b30.toString()=="";
}
}
}
},getSelectedElement:function(){
if(dojo.html.selection.getType()==dojo.html.selectionType.CONTROL){
if(dojo.doc()["selection"]){
var _b31=dojo.doc().selection.createRange();
if(_b31&&_b31.item){
return dojo.doc().selection.createRange().item(0);
}
}else{
var _b32=dojo.global().getSelection();
return _b32.anchorNode.childNodes[_b32.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 _b34=dojo.global().getSelection();
if(_b34){
var node=_b34.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 _b36=dojo.global().getSelection();
if(_b36){
return _b36.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 _b37=dojo.global().getSelection();
if(_b37&&_b37.rangeCount){
var frag=_b37.getRangeAt(0).cloneContents();
var div=document.createElement("div");
div.appendChild(frag);
return div.innerHTML;
}
return null;
}
},hasAncestorElement:function(_b3a){
return (dojo.html.selection.getAncestorElement.apply(this,arguments)!=null);
},getAncestorElement:function(_b3b){
var node=dojo.html.selection.getSelectedElement()||dojo.html.selection.getParentElement();
while(node){
if(dojo.html.selection.isTag(node,arguments).length>0){
return node;
}
node=node.parentNode;
}
return null;
},isTag:function(node,tags){
if(node&&node.tagName){
for(var i=0;i<tags.length;i++){
if(node.tagName.toLowerCase()==String(tags[i]).toLowerCase()){
return String(tags[i]).toLowerCase();
}
}
}
return "";
},selectElement:function(_b40){
var _b41=dojo.global();
var _b42=dojo.doc();
_b40=dojo.byId(_b40);
if(_b42.selection&&dojo.body().createTextRange){
try{
var _b43=dojo.body().createControlRange();
_b43.addElement(_b40);
_b43.select();
}
catch(e){
dojo.html.selection.selectElementChildren(_b40);
}
}else{
if(_b41["getSelection"]){
var _b44=_b41.getSelection();
if(_b44["removeAllRanges"]){
var _b43=_b42.createRange();
_b43.selectNode(_b40);
_b44.removeAllRanges();
_b44.addRange(_b43);
}
}
}
},selectElementChildren:function(_b45){
var _b46=dojo.global();
var _b47=dojo.doc();
_b45=dojo.byId(_b45);
if(_b47.selection&&dojo.body().createTextRange){
var _b48=dojo.body().createTextRange();
_b48.moveToElementText(_b45);
_b48.select();
}else{
if(_b46["getSelection"]){
var _b49=_b46.getSelection();
if(_b49["setBaseAndExtent"]){
_b49.setBaseAndExtent(_b45,0,_b45,_b45.innerText.length-1);
}else{
if(_b49["selectAllChildren"]){
_b49.selectAllChildren(_b45);
}
}
}
}
},getBookmark:function(){
var _b4a;
var _b4b=dojo.doc();
if(_b4b["selection"]){
var _b4c=_b4b.selection.createRange();
_b4a=_b4c.getBookmark();
}else{
var _b4d;
try{
_b4d=dojo.global().getSelection();
}
catch(e){
}
if(_b4d){
var _b4c=_b4d.getRangeAt(0);
_b4a=_b4c.cloneRange();
}else{
dojo.debug("No idea how to store the current selection for this browser!");
}
}
return _b4a;
},moveToBookmark:function(_b4e){
var _b4f=dojo.doc();
if(_b4f["selection"]){
var _b50=_b4f.selection.createRange();
_b50.moveToBookmark(_b4e);
_b50.select();
}else{
var _b51;
try{
_b51=dojo.global().getSelection();
}
catch(e){
}
if(_b51&&_b51["removeAllRanges"]){
_b51.removeAllRanges();
_b51.addRange(_b4e);
}else{
dojo.debug("No idea how to restore selection for this browser!");
}
}
},collapse:function(_b52){
if(dojo.global()["getSelection"]){
var _b53=dojo.global().getSelection();
if(_b53.removeAllRanges){
if(_b52){
_b53.collapseToStart();
}else{
_b53.collapseToEnd();
}
}else{
dojo.global().getSelection().collapse(_b52);
}
}else{
if(dojo.doc().selection){
var _b54=dojo.doc().selection.createRange();
_b54.collapse(_b52);
_b54.select();
}
}
},remove:function(){
if(dojo.doc().selection){
var _b55=dojo.doc().selection;
if(_b55.type.toUpperCase()!="NONE"){
_b55.clear();
}
return _b55;
}else{
var _b55=dojo.global().getSelection();
for(var i=0;i<_b55.rangeCount;i++){
_b55.getRangeAt(i).deleteContents();
}
return _b55;
}
}});
dojo.provide("dojo.html.iframe");
dojo.html.iframeContentWindow=function(_b57){
var win=dojo.html.getDocumentWindow(dojo.html.iframeContentDocument(_b57))||dojo.html.iframeContentDocument(_b57).__parent__||(_b57.name&&document.frames[_b57.name])||null;
return win;
};
dojo.html.iframeContentDocument=function(_b59){
var doc=_b59.contentDocument||((_b59.contentWindow)&&(_b59.contentWindow.document))||((_b59.name)&&(document.frames[_b59.name])&&(document.frames[_b59.name].document))||null;
return doc;
};
dojo.html.BackgroundIframe=function(node){
if(dojo.render.html.ie55||dojo.render.html.ie60){
var html="<iframe src='javascript:false'"+" style='position: absolute; left: 0px; top: 0px; width: 100%; height: 100%;"+"z-index: -1; filter:Alpha(Opacity=\"0\");' "+">";
this.iframe=dojo.doc().createElement(html);
this.iframe.tabIndex=-1;
if(node){
node.appendChild(this.iframe);
this.domNode=node;
}else{
dojo.body().appendChild(this.iframe);
this.iframe.style.display="none";
}
}
};
dojo.lang.extend(dojo.html.BackgroundIframe,{iframe:null,onResized:function(){
if(this.iframe&&this.domNode&&this.domNode.parentNode){
var _b5d=dojo.html.getMarginBox(this.domNode);
if(_b5d.width==0||_b5d.height==0){
dojo.lang.setTimeout(this,this.onResized,100);
return;
}
this.iframe.style.width=_b5d.width+"px";
this.iframe.style.height=_b5d.height+"px";
}
},size:function(node){
if(!this.iframe){
return;
}
var _b5f=dojo.html.toCoordinateObject(node,true,dojo.html.boxSizing.BORDER_BOX);
with(this.iframe.style){
width=_b5f.width+"px";
height=_b5f.height+"px";
left=_b5f.left+"px";
top=_b5f.top+"px";
}
},setZIndex:function(node){
if(!this.iframe){
return;
}
if(dojo.dom.isNode(node)){
this.iframe.style.zIndex=dojo.html.getStyle(node,"z-index")-1;
}else{
if(!isNaN(node)){
this.iframe.style.zIndex=node;
}
}
},show:function(){
if(this.iframe){
this.iframe.style.display="block";
}
},hide:function(){
if(this.iframe){
this.iframe.style.display="none";
}
},remove:function(){
if(this.iframe){
dojo.html.removeNode(this.iframe,true);
delete this.iframe;
this.iframe=null;
}
}});
dojo.provide("dojo.widget.PopupContainer");
dojo.declare("dojo.widget.PopupContainerBase",null,function(){
this.queueOnAnimationFinish=[];
},{isShowingNow:false,currentSubpopup:null,beginZIndex:1000,parentPopup:null,parent:null,popupIndex:0,aroundBox:dojo.html.boxSizing.BORDER_BOX,openedForWindow:null,processKey:function(evt){
return false;
},applyPopupBasicStyle:function(){
with(this.domNode.style){
display="none";
position="absolute";
}
},aboutToShow:function(){
},open:function(x,y,_b64,_b65,_b66,_b67){
if(this.isShowingNow){
return;
}
if(this.animationInProgress){
this.queueOnAnimationFinish.push(this.open,arguments);
return;
}
this.aboutToShow();
var _b68=false,node,_b6a;
if(typeof x=="object"){
node=x;
_b6a=_b65;
_b65=_b64;
_b64=y;
_b68=true;
}
this.parent=_b64;
dojo.body().appendChild(this.domNode);
_b65=_b65||_b64["domNode"]||[];
var _b6b=null;
this.isTopLevel=true;
while(_b64){
if(_b64!==this&&(_b64.setOpenedSubpopup!=undefined&&_b64.applyPopupBasicStyle!=undefined)){
_b6b=_b64;
this.isTopLevel=false;
_b6b.setOpenedSubpopup(this);
break;
}
_b64=_b64.parent;
}
this.parentPopup=_b6b;
this.popupIndex=_b6b?_b6b.popupIndex+1:1;
if(this.isTopLevel){
var _b6c=dojo.html.isNode(_b65)?_b65:null;
dojo.widget.PopupManager.opened(this,_b6c);
}
if(this.isTopLevel&&!dojo.withGlobal(this.openedForWindow||dojo.global(),dojo.html.selection.isCollapsed)){
this._bookmark=dojo.withGlobal(this.openedForWindow||dojo.global(),dojo.html.selection.getBookmark);
}else{
this._bookmark=null;
}
if(_b65 instanceof Array){
_b65={left:_b65[0],top:_b65[1],width:0,height:0};
}
with(this.domNode.style){
display="";
zIndex=this.beginZIndex+this.popupIndex;
}
if(_b68){
this.move(node,_b67,_b6a);
}else{
this.move(x,y,_b67,_b66);
}
this.domNode.style.display="none";
this.explodeSrc=_b65;
this.show();
this.isShowingNow=true;
},move:function(x,y,_b6f,_b70){
var _b71=(typeof x=="object");
if(_b71){
var _b72=_b6f;
var node=x;
_b6f=y;
if(!_b72){
_b72={"BL":"TL","TL":"BL"};
}
dojo.html.placeOnScreenAroundElement(this.domNode,node,_b6f,this.aroundBox,_b72);
}else{
if(!_b70){
_b70="TL,TR,BL,BR";
}
dojo.html.placeOnScreen(this.domNode,x,y,_b6f,true,_b70);
}
},close:function(_b74){
if(_b74){
this.domNode.style.display="none";
}
if(this.animationInProgress){
this.queueOnAnimationFinish.push(this.close,[]);
return;
}
this.closeSubpopup(_b74);
this.hide();
if(this.bgIframe){
this.bgIframe.hide();
this.bgIframe.size({left:0,top:0,width:0,height:0});
}
if(this.isTopLevel){
dojo.widget.PopupManager.closed(this);
}
this.isShowingNow=false;
if(this.parent){
setTimeout(dojo.lang.hitch(this,function(){
try{
if(this.parent["focus"]){
this.parent.focus();
}else{
this.parent.domNode.focus();
}
}
catch(e){
dojo.debug("No idea how to focus to parent",e);
}
}),10);
}
if(this._bookmark&&dojo.withGlobal(this.openedForWindow||dojo.global(),dojo.html.selection.isCollapsed)){
if(this.openedForWindow){
this.openedForWindow.focus();
}
try{
dojo.withGlobal(this.openedForWindow||dojo.global(),"moveToBookmark",dojo.html.selection,[this._bookmark]);
}
catch(e){
}
}
this._bookmark=null;
},closeAll:function(_b75){
if(this.parentPopup){
this.parentPopup.closeAll(_b75);
}else{
this.close(_b75);
}
},setOpenedSubpopup:function(_b76){
this.currentSubpopup=_b76;
},closeSubpopup:function(_b77){
if(this.currentSubpopup==null){
return;
}
this.currentSubpopup.close(_b77);
this.currentSubpopup=null;
},onShow:function(){
dojo.widget.PopupContainer.superclass.onShow.apply(this,arguments);
this.openedSize={w:this.domNode.style.width,h:this.domNode.style.height};
if(dojo.render.html.ie){
if(!this.bgIframe){
this.bgIframe=new dojo.html.BackgroundIframe();
this.bgIframe.setZIndex(this.domNode);
}
this.bgIframe.size(this.domNode);
this.bgIframe.show();
}
this.processQueue();
},processQueue:function(){
if(!this.queueOnAnimationFinish.length){
return;
}
var func=this.queueOnAnimationFinish.shift();
var args=this.queueOnAnimationFinish.shift();
func.apply(this,args);
},onHide:function(){
dojo.widget.HtmlWidget.prototype.onHide.call(this);
if(this.openedSize){
with(this.domNode.style){
width=this.openedSize.w;
height=this.openedSize.h;
}
}
this.processQueue();
}});
dojo.widget.defineWidget("dojo.widget.PopupContainer",[dojo.widget.HtmlWidget,dojo.widget.PopupContainerBase],{fillInTemplate:function(){
this.applyPopupBasicStyle();
dojo.widget.PopupContainer.superclass.fillInTemplate.apply(this,arguments);
}});
dojo.widget.PopupManager=new function(){
this.currentMenu=null;
this.currentButton=null;
this.currentFocusMenu=null;
this.focusNode=null;
this.registeredWindows=[];
this.registerWin=function(win){
if(!win.__PopupManagerRegistered){
dojo.event.connect(win.document,"onmousedown",this,"onClick");
dojo.event.connect(win,"onscroll",this,"onClick");
dojo.event.connect(win.document,"onkey",this,"onKey");
win.__PopupManagerRegistered=true;
this.registeredWindows.push(win);
}
};
this.registerAllWindows=function(_b7b){
if(!_b7b){
_b7b=dojo.html.getDocumentWindow(window.top&&window.top.document||window.document);
}
this.registerWin(_b7b);
for(var i=0;i<_b7b.frames.length;i++){
try{
var win=dojo.html.getDocumentWindow(_b7b.frames[i].document);
if(win){
this.registerAllWindows(win);
}
}
catch(e){
}
}
};
this.unRegisterWin=function(win){
try{
if(win.__PopupManagerRegistered){
dojo.event.disconnect(win.document,"onmousedown",this,"onClick");
dojo.event.disconnect(win,"onscroll",this,"onClick");
dojo.event.disconnect(win.document,"onkey",this,"onKey");
win.__PopupManagerRegistered=false;
}
}
catch(ex){
}
};
this.unRegisterAllWindows=function(){
for(var i=0;i<this.registeredWindows.length;++i){
this.unRegisterWin(this.registeredWindows[i]);
}
this.registeredWindows=[];
};
dojo.addOnLoad(this,"registerAllWindows");
dojo.addOnUnload(this,"unRegisterAllWindows");
this.closed=function(menu){
if(this.currentMenu==menu){
this.currentMenu=null;
this.currentButton=null;
this.currentFocusMenu=null;
}
};
this.opened=function(menu,_b82){
if(menu==this.currentMenu){
return;
}
if(this.currentMenu){
this.currentMenu.close();
}
this.currentMenu=menu;
this.currentFocusMenu=menu;
this.currentButton=_b82;
};
this.setFocusedMenu=function(menu){
this.currentFocusMenu=menu;
};
this.onKey=function(e){
if(!e.key){
return;
}
if(!this.currentMenu||!this.currentMenu.isShowingNow){
return;
}
var m=this.currentFocusMenu;
while(m){
if(m.processKey(e)){
e.preventDefault();
e.stopPropagation();
break;
}
m=m.parentPopup||m.parentMenu;
}
},this.onClick=function(e){
if(!this.currentMenu){
return;
}
var _b87=dojo.html.getScroll().offset;
var m=this.currentMenu;
while(m){
if(dojo.html.overElement(m.domNode,e)||dojo.html.isDescendantOf(e.target,m.domNode)){
return;
}
m=m.currentSubpopup;
}
if(this.currentButton&&dojo.html.overElement(this.currentButton,e)){
return;
}
this.currentMenu.closeAll(true);
};
};
dojo.provide("dojo.widget.Tooltip");
dojo.widget.defineWidget("dojo.widget.Tooltip",[dojo.widget.ContentPane,dojo.widget.PopupContainerBase],{caption:"",showDelay:500,hideDelay:100,connectId:"",templateCssPath:dojo.uri.moduleUri("dojo.widget","templates/TooltipTemplate.css"),fillInTemplate:function(args,frag){
if(this.caption!=""){
this.domNode.appendChild(document.createTextNode(this.caption));
}
this._connectNode=dojo.byId(this.connectId);
dojo.widget.Tooltip.superclass.fillInTemplate.call(this,args,frag);
this.addOnLoad(this,"_loadedContent");
dojo.html.addClass(this.domNode,"dojoTooltip");
var _b8b=this.getFragNodeRef(frag);
dojo.html.copyStyle(this.domNode,_b8b);
this.applyPopupBasicStyle();
},postCreate:function(args,frag){
dojo.event.connect(this._connectNode,"onmouseover",this,"_onMouseOver");
dojo.widget.Tooltip.superclass.postCreate.call(this,args,frag);
},_onMouseOver:function(e){
this._mouse={x:e.pageX,y:e.pageY};
if(!this._tracking){
dojo.event.connect(document.documentElement,"onmousemove",this,"_onMouseMove");
this._tracking=true;
}
this._onHover(e);
},_onMouseMove:function(e){
this._mouse={x:e.pageX,y:e.pageY};
if(dojo.html.overElement(this._connectNode,e)||dojo.html.overElement(this.domNode,e)){
this._onHover(e);
}else{
this._onUnHover(e);
}
},_onHover:function(e){
if(this._hover){
return;
}
this._hover=true;
if(this._hideTimer){
clearTimeout(this._hideTimer);
delete this._hideTimer;
}
if(!this.isShowingNow&&!this._showTimer){
this._showTimer=setTimeout(dojo.lang.hitch(this,"open"),this.showDelay);
}
},_onUnHover:function(e){
if(!this._hover){
return;
}
this._hover=false;
if(this._showTimer){
clearTimeout(this._showTimer);
delete this._showTimer;
}
if(this.isShowingNow&&!this._hideTimer){
this._hideTimer=setTimeout(dojo.lang.hitch(this,"close"),this.hideDelay);
}
if(!this.isShowingNow){
dojo.event.disconnect(document.documentElement,"onmousemove",this,"_onMouseMove");
this._tracking=false;
}
},open:function(){
if(this.isShowingNow){
return;
}
dojo.widget.PopupContainerBase.prototype.open.call(this,this._mouse.x,this._mouse.y,null,[this._mouse.x,this._mouse.y],"TL,TR,BL,BR",[10,15]);
},close:function(){
if(this.isShowingNow){
if(this._showTimer){
clearTimeout(this._showTimer);
delete this._showTimer;
}
if(this._hideTimer){
clearTimeout(this._hideTimer);
delete this._hideTimer;
}
dojo.event.disconnect(document.documentElement,"onmousemove",this,"_onMouseMove");
this._tracking=false;
dojo.widget.PopupContainerBase.prototype.close.call(this);
}
},_position:function(){
this.move(this._mouse.x,this._mouse.y,[10,15],"TL,TR,BL,BR");
},_loadedContent:function(){
if(this.isShowingNow){
this._position();
}
},checkSize:function(){
},uninitialize:function(){
this.close();
dojo.event.disconnect(this._connectNode,"onmouseover",this,"_onMouseOver");
}});
dojo.kwCompoundRequire({common:["dojo.html.common","dojo.html.style"]});
dojo.provide("dojo.html.*");
dojo.provide("dojo.html");
dojo.deprecated("dojo.html","replaced by dojo.html.*","0.5");
dojo.provide("dojo.widget.html.Tooltip");
dojo.widget.defineWidget("dojo.widget.html.Tooltip",dojo.widget.html.ContentPane,{widgetType:"Tooltip",isContainer:true,caption:"",showDelay:500,hideDelay:100,connectId:"",templatePath:dojo.uri.dojoUri("src/widget/templates/HtmlTooltipTemplate.html"),templateCssPath:dojo.uri.dojoUri("src/widget/templates/HtmlTooltipTemplate.css"),connectNode:null,state:"erased",fillInTemplate:function(args,frag){
if(this.caption!=""){
this.domNode.appendChild(document.createTextNode(this.caption));
}
this.connectNode=dojo.byId(this.connectId);
dojo.widget.html.Tooltip.superclass.fillInTemplate.call(this,args,frag);
},postCreate:function(args,frag){
document.body.appendChild(this.domNode);
dojo.event.connect(this.connectNode,"onmouseover",this,"onMouseOver");
dojo.widget.html.Tooltip.superclass.postCreate.call(this,args,frag);
},onMouseOver:function(e){
this.mouse={x:e.pageX,y:e.pageY};
if(!this.showTimer){
this.showTimer=setTimeout(dojo.lang.hitch(this,"show"),this.showDelay);
dojo.event.connect(document.documentElement,"onmousemove",this,"onMouseMove");
}
},onMouseMove:function(e){
this.mouse={x:e.pageX,y:e.pageY};
if(dojo.html.overElement(this.connectNode,e)||dojo.html.overElement(this.domNode,e)){
if(this.hideTimer){
clearTimeout(this.hideTimer);
delete this.hideTimer;
}
}else{
if(this.showTimer){
clearTimeout(this.showTimer);
delete this.showTimer;
}
if((this.state=="displaying"||this.state=="displayed")&&!this.hideTimer){
this.hideTimer=setTimeout(dojo.lang.hitch(this,"hide"),this.hideDelay);
}
}
},show:function(){
if(this.state=="erasing"){
this.displayScheduled=true;
return;
}
if(this.state=="displaying"||this.state=="displayed"){
return;
}
if(!this.bgIframe){
this.bgIframe=new dojo.html.BackgroundIframe(this.domNode);
}
this.position();
this.explodeSrc=[this.mouse.x,this.mouse.y];
this.state="displaying";
dojo.widget.html.Tooltip.superclass.show.call(this);
},onShow:function(){
dojo.widget.html.Tooltip.superclass.onShow.call(this);
this.state="displayed";
if(this.eraseScheduled){
this.hide();
this.eraseScheduled=false;
}
},hide:function(){
if(this.state=="displaying"){
this.eraseScheduled=true;
return;
}
if(this.state=="displayed"){
this.state="erasing";
if(this.showTimer){
clearTimeout(this.showTimer);
delete this.showTimer;
}
if(this.hideTimer){
clearTimeout(this.hideTimer);
delete this.hideTimer;
}
dojo.event.disconnect(document.documentElement,"onmousemove",this,"onMouseMove");
dojo.widget.html.Tooltip.superclass.hide.call(this);
}
},onHide:function(){
this.state="erased";
if(this.displayScheduled){
this.display();
this.displayScheduled=false;
}
},position:function(){
dojo.html.placeOnScreenPoint(this.domNode,this.mouse.x,this.mouse.y,[10,15],true);
this.bgIframe.onResized();
},onLoad:function(){
if(this.isShowing()){
dojo.lang.setTimeout(this,this.position,50);
dojo.widget.html.Tooltip.superclass.onLoad.apply(this,arguments);
}
},checkSize:function(){
}});
if(DWREngine==null){
var DWREngine={};
}
DWREngine._defaultPath="/configurator/dwr";
function PCalcServer(){
}
PCalcServer._path="/configurator/dwr";
PCalcServer.writeData=function(p0,p1,p2,_b9b){
DWREngine._execute(PCalcServer._path,"PCalcServer0","writeData",p0,p1,p2,_b9b);
};
PCalcServer.getBBConfigFile=function(p0,p1,p2,_b9f){
DWREngine._execute(PCalcServer._path,"PCalcServer0","getBBConfigFile",p0,p1,p2,_b9f);
};
PCalcServer.getBBConfigFile=function(p0,p1,p2,p3,_ba4){
DWREngine._execute(PCalcServer._path,"PCalcServer0","getBBConfigFile",p0,p1,p2,p3,_ba4);
};
PCalcServer.getConfigUsers=function(p0,p1,p2,p3,_ba9){
DWREngine._execute(PCalcServer._path,"PCalcServer0","getConfigUsers",p0,p1,p2,p3,_ba9);
};
PCalcServer.getConfigUsers=function(p0,p1,p2,p3,p4,_baf){
DWREngine._execute(PCalcServer._path,"PCalcServer0","getConfigUsers",p0,p1,p2,p3,p4,_baf);
};
PCalcServer.getConfigUsers=function(p0,p1,p2,p3,p4,p5,_bb6){
DWREngine._execute(PCalcServer._path,"PCalcServer0","getConfigUsers",p0,p1,p2,p3,p4,p5,_bb6);
};
PCalcServer.getData=function(p0,p1,p2,_bba){
DWREngine._execute(PCalcServer._path,"PCalcServer0","getData",p0,p1,p2,_bba);
};
PCalcServer.getData=function(p0,p1,p2,p3,_bbf){
DWREngine._execute(PCalcServer._path,"PCalcServer0","getData",p0,p1,p2,p3,_bbf);
};
PCalcServer.getPropertyValue=function(p0,p1,p2,p3,_bc4){
DWREngine._execute(PCalcServer._path,"PCalcServer0","getPropertyValue",p0,p1,p2,p3,_bc4);
};
if(DWREngine==null){
var DWREngine={};
}
DWREngine._httpSessionId="49F56B6EEA28208D4881F62991822272";
DWREngine._scriptSessionId="202F4EB540E8FB691BDCF21FE35538F5";
DWREngine.setErrorHandler=function(_bc5){
DWREngine._errorHandler=_bc5;
};
DWREngine.setWarningHandler=function(_bc6){
DWREngine._warningHandler=_bc6;
};
DWREngine.setTimeout=function(_bc7){
DWREngine._timeout=_bc7;
};
DWREngine.setPreHook=function(_bc8){
DWREngine._preHook=_bc8;
};
DWREngine.setPostHook=function(_bc9){
DWREngine._postHook=_bc9;
};
DWREngine.XMLHttpRequest=1;
DWREngine.IFrame=2;
DWREngine.ScriptTag=3;
DWREngine.setMethod=function(_bca){
if(_bca!=DWREngine.XMLHttpRequest&&_bca!=DWREngine.IFrame&&_bca!=DWREngine.ScriptTag){
DWREngine._handleError("Remoting method must be one of DWREngine.XMLHttpRequest or DWREngine.IFrame or DWREngine.ScriptTag");
return;
}
DWREngine._method=_bca;
};
DWREngine.setVerb=function(verb){
if(verb!="GET"&&verb!="POST"){
DWREngine._handleError("Remoting verb must be one of GET or POST");
return;
}
DWREngine._verb=verb;
};
DWREngine.setOrdered=function(_bcc){
DWREngine._ordered=_bcc;
};
DWREngine.setAsync=function(_bcd){
DWREngine._async=_bcd;
};
DWREngine.setPolling=function(){
DWREngine._handleError("DWREngine.setPolling() has been renamed to DWREngine.setReverseAjax()");
};
DWREngine.setReverseAjax=function(_bce){
DWREngine._reverseAjax=_bce;
if(DWREngine._reverseAjax){
DWREngine._triggerNextPoll(0);
}
};
DWREngine.setPollUsingComet=function(_bcf){
DWREngine._pollComet=_bcf;
};
DWREngine.setPollMethod=function(_bd0){
if(_bd0!=DWREngine.XMLHttpRequest&&_bd0!=DWREngine.IFrame){
DWREngine._handleError("Polling method must be one of DWREngine.XMLHttpRequest or DWREngine.IFrame");
return;
}
DWREngine._pollMethod=_bd0;
};
DWREngine.setTextHtmlHandler=function(_bd1){
DWREngine._textHtmlHandler=_bd1;
};
DWREngine.defaultMessageHandler=function(_bd2){
if(typeof _bd2=="object"&&_bd2.name=="Error"&&_bd2.description){
alert("Error: "+_bd2.description);
}else{
if(_bd2.toString().indexOf("0x80040111")==-1){
alert(_bd2);
}
}
};
DWREngine.beginBatch=function(){
if(DWREngine._batch){
DWREngine._handleError("Batch already started.");
return;
}
DWREngine._batch={map:{callCount:0},paramCount:0,ids:[],preHooks:[],postHooks:[]};
};
DWREngine.endBatch=function(_bd3){
var _bd4=DWREngine._batch;
if(_bd4==null){
DWREngine._handleError("No batch in progress.");
return;
}
if(_bd3&&_bd3.preHook){
_bd4.preHooks.unshift(_bd3.preHook);
}
if(_bd3&&_bd3.postHook){
_bd4.postHooks.push(_bd3.postHook);
}
if(DWREngine._preHook){
_bd4.preHooks.unshift(DWREngine._preHook);
}
if(DWREngine._postHook){
_bd4.postHooks.push(DWREngine._postHook);
}
if(_bd4.method==null){
_bd4.method=DWREngine._method;
}
if(_bd4.verb==null){
_bd4.verb=DWREngine._verb;
}
if(_bd4.async==null){
_bd4.async=DWREngine._async;
}
if(_bd4.timeout==null){
_bd4.timeout=DWREngine._timeout;
}
_bd4.completed=false;
DWREngine._batch=null;
if(!DWREngine._ordered){
DWREngine._sendData(_bd4);
DWREngine._batches[DWREngine._batches.length]=_bd4;
}else{
if(DWREngine._batches.length==0){
DWREngine._sendData(_bd4);
DWREngine._batches[DWREngine._batches.length]=_bd4;
}else{
DWREngine._batchQueue[DWREngine._batchQueue.length]=_bd4;
}
}
};
DWREngine._errorHandler=DWREngine.defaultMessageHandler;
DWREngine._warningHandler=DWREngine.defaultMessageHandler;
DWREngine._preHook=null;
DWREngine._postHook=null;
DWREngine._batches=[];
DWREngine._batchQueue=[];
DWREngine._handlersMap={};
DWREngine._method=DWREngine.XMLHttpRequest;
DWREngine._verb="POST";
DWREngine._ordered=false;
DWREngine._async=true;
DWREngine._batch=null;
DWREngine._timeout=0;
DWREngine._DOMDocument=["Msxml2.DOMDocument.6.0","Msxml2.DOMDocument.5.0","Msxml2.DOMDocument.4.0","Msxml2.DOMDocument.3.0","MSXML2.DOMDocument","MSXML.DOMDocument","Microsoft.XMLDOM"];
DWREngine._XMLHTTP=["Msxml2.XMLHTTP.6.0","Msxml2.XMLHTTP.5.0","Msxml2.XMLHTTP.4.0","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP","Microsoft.XMLHTTP"];
DWREngine._reverseAjax=false;
DWREngine._pollComet=true;
DWREngine._pollMethod=DWREngine.XMLHttpRequest;
DWREngine._pollFrame=null;
DWREngine._pollReq=null;
DWREngine._pollCometSize=0;
DWREngine._pollCometInterval=200;
DWREngine._textHtmlHandler=null;
DWREngine._execute=function(path,_bd6,_bd7,_bd8){
var _bd9=false;
if(DWREngine._batch==null){
DWREngine.beginBatch();
_bd9=true;
}
var args=[];
for(var i=0;i<arguments.length-3;i++){
args[i]=arguments[i+3];
}
if(DWREngine._batch.path==null){
DWREngine._batch.path=path;
}else{
if(DWREngine._batch.path!=path){
DWREngine._handleError("Can't batch requests to multiple DWR Servlets.");
return;
}
}
var _bdc;
var _bdd;
var _bde=args[0];
var _bdf=args[args.length-1];
if(typeof _bde=="function"){
_bdd={callback:args.shift()};
_bdc=args;
}else{
if(typeof _bdf=="function"){
_bdd={callback:args.pop()};
_bdc=args;
}else{
if(_bdf!=null&&typeof _bdf=="object"&&_bdf.callback!=null&&typeof _bdf.callback=="function"){
_bdd=args.pop();
_bdc=args;
}else{
if(_bde==null){
if(_bdf==null&&args.length>2){
if(DWREngine._warningHandler){
DWREngine._warningHandler("Ambiguous nulls at start and end of parameter list. Which is the callback function?");
}
}
_bdd={callback:args.shift()};
_bdc=args;
}else{
if(_bdf==null){
_bdd={callback:args.pop()};
_bdc=args;
}else{
if(DWREngine._warningHandler){
DWREngine._warningHandler("Missing callback function or metadata object.");
}
return;
}
}
}
}
}
var _be0=Math.floor(Math.random()*10001);
var id=(_be0+"_"+new Date().getTime()).toString();
var _be2="c"+DWREngine._batch.map.callCount+"-";
DWREngine._batch.ids.push(id);
if(_bdd.method!=null){
DWREngine._batch.method=_bdd.method;
delete _bdd.method;
}
if(_bdd.verb!=null){
DWREngine._batch.verb=_bdd.verb;
delete _bdd.verb;
}
if(_bdd.async!=null){
DWREngine._batch.async=_bdd.async;
delete _bdd.async;
}
if(_bdd.timeout!=null){
DWREngine._batch.timeout=_bdd.timeout;
delete _bdd.timeout;
}
if(_bdd.preHook!=null){
DWREngine._batch.preHooks.unshift(_bdd.preHook);
delete _bdd.preHook;
}
if(_bdd.postHook!=null){
DWREngine._batch.postHooks.push(_bdd.postHook);
delete _bdd.postHook;
}
if(_bdd.scriptTagBase!=null){
DWREngine._batch.scriptTagBase=_bdd.scriptTagBase;
delete _bdd.scriptTagBase;
}
if(_bdd.errorHandler==null){
_bdd.errorHandler=DWREngine._errorHandler;
}
if(_bdd.warningHandler==null){
_bdd.warningHandler=DWREngine._warningHandler;
}
DWREngine._handlersMap[id]=_bdd;
var data,prop;
for(prop in _bdd){
data=_bdd[prop];
if(typeof data!="function"){
DWREngine._batch.map[prop]=""+data;
}
}
DWREngine._batch.map.httpSessionId=DWREngine._httpSessionId;
DWREngine._batch.map.scriptSessionId=DWREngine._scriptSessionId;
DWREngine._batch.map.page=window.location.pathname;
DWREngine._batch.map[_be2+"scriptName"]=_bd6;
DWREngine._batch.map[_be2+"methodName"]=_bd7;
DWREngine._batch.map[_be2+"id"]=id;
for(i=0;i<_bdc.length;i++){
DWREngine._serializeAll(DWREngine._batch,[],_bdc[i],_be2+"param"+i);
}
DWREngine._batch.map.callCount++;
if(_bd9){
DWREngine.endBatch();
}
};
DWREngine._poll=function(_be5){
if(!DWREngine._reverseAjax){
return;
}
var _be6=Math.floor(Math.random()*10001);
var id=(_be6+"_"+new Date().getTime()).toString();
var _be8={completed:false,map:{callCount:1,"c0-scriptName":"DWRSystem","c0-methodName":"poll","c0-id":id,httpSessionId:DWREngine._httpSessionId,scriptSessionId:DWREngine._scriptSessionId,page:window.location.pathname},method:DWREngine._pollMethod,isPoll:true,verb:"POST",async:true,paramCount:0,ids:[id],path:(_be5)?_be5:DWREngine._defaultPath,preHooks:(DWREngine._preHook)?[DWREngine._preHook]:[],postHooks:(DWREngine._postHook)?[DWREngine._postHook]:[],timeout:0};
if(!window.XMLHttpRequest&&DWREngine._pollMethod==DWREngine.XMLHttpRequest){
_be8.method=DWREngine.IFrame;
}
DWREngine._handlersMap[id]={errorHandler:DWREngine._errorHandler,warningHandler:DWREngine._warningHandler,callback:DWREngine._triggerNextPoll};
DWREngine._sendData(_be8);
DWREngine._batches[DWREngine._batches.length]=_be8;
DWREngine._checkCometPoll();
};
DWREngine._triggerNextPoll=function(_be9){
setTimeout("DWREngine._poll()",_be9);
};
DWREngine._checkCometPoll=function(){
if(DWREngine._pollComet){
if(DWREngine._pollFrame){
setTimeout("DWREngine._checkCometPoll()",DWREngine._pollCometInterval);
var text=DWREngine._getTextFromCometIFrame();
DWREngine._processCometResponse(text);
}else{
if(DWREngine._pollReq){
setTimeout("DWREngine._checkCometPoll()",DWREngine._pollCometInterval);
try{
var _beb=DWREngine._pollReq.responseText;
DWREngine._processCometResponse(_beb);
}
catch(ex){
}
}
}
}
};
DWREngine._getTextFromCometIFrame=function(){
var _bec;
if(DWREngine._pollFrame.contentDocument){
_bec=DWREngine._pollFrame.contentDocument.defaultView.document;
}else{
if(DWREngine._pollFrame.contentWindow){
_bec=DWREngine._pollFrame.contentWindow.document;
}else{
return "";
}
}
var _bed=_bec.getElementsByTagName("body");
if(_bed==null||_bed.length==0){
return "";
}
if(_bed[0]==null){
return "";
}
var text=_bed[0].innerHTML.toString();
if(text.indexOf("<PRE>")==0){
text=text.substring(5,text.length-7);
}
return text;
};
DWREngine._processCometResponse=function(_bef){
if(DWREngine._pollCometSize!=_bef.length){
var _bf0=_bef.indexOf("//@DWR-START@",DWREngine._pollCometSize);
if(_bf0==-1){
DWREngine._pollCometSize=_bef.length;
}else{
var _bf1=_bef.lastIndexOf("//@DWR-END@");
if(_bf1!=-1){
var _bf2=_bef.substring(_bf0+13,_bf1);
eval(_bf2);
DWREngine._pollCometSize=_bf1+11;
}
}
}
};
DWREngine._sendData=function(_bf3){
if(_bf3.map.callCount==0){
return;
}
for(var i=0;i<_bf3.preHooks.length;i++){
_bf3.preHooks[i]();
}
_bf3.preHooks=null;
if(_bf3.timeout&&_bf3.timeout!=0){
_bf3.interval=setInterval(function(){
clearInterval(_bf3.interval);
DWREngine._abortRequest(_bf3);
},_bf3.timeout);
}
var _bf5;
if(_bf3.map.callCount==1){
_bf5=_bf3.map["c0-scriptName"]+"."+_bf3.map["c0-methodName"]+".dwr";
}else{
_bf5="Multiple."+_bf3.map.callCount+".dwr";
}
if(_bf3.method==DWREngine.XMLHttpRequest){
if(window.XMLHttpRequest){
_bf3.req=new XMLHttpRequest();
}else{
if(window.ActiveXObject&&!(navigator.userAgent.indexOf("Mac")>=0&&navigator.userAgent.indexOf("MSIE")>=0)){
_bf3.req=DWREngine._newActiveXObject(DWREngine._XMLHTTP);
}
}
}
var _bf6="";
var prop;
if(_bf3.req){
if(_bf3.async){
_bf3.req.onreadystatechange=function(){
DWREngine._stateChange(_bf3);
};
}
if(_bf3.isPoll){
DWREngine._pollReq=_bf3.req;
}
var _bf8=navigator.userAgent.indexOf("Safari/");
if(_bf8>=0){
var _bf9=navigator.userAgent.substring(_bf8+7);
var _bfa=parseInt(_bf9,10);
if(_bfa<400){
_bf3.verb=="GET";
}
}
if(_bf3.verb=="GET"){
_bf3.map.callCount=""+_bf3.map.callCount;
for(prop in _bf3.map){
var qkey=encodeURIComponent(prop);
var qval=encodeURIComponent(_bf3.map[prop]);
if(qval==""){
if(DWREngine._warningHandler){
DWREngine._warningHandler("Found empty qval for qkey="+qkey);
}
}
_bf6+=qkey+"="+qval+"&";
}
_bf6+="jsessionid="+DWREngine._httpSessionId;
try{
_bf3.req.open("GET",_bf3.path+"/plainjs/"+_bf5+"?"+_bf6,_bf3.async);
_bf3.req.send(null);
if(!_bf3.async){
DWREngine._stateChange(_bf3);
}
}
catch(ex){
DWREngine._handleMetaDataError(null,ex);
}
}else{
for(prop in _bf3.map){
if(typeof _bf3.map[prop]!="function"){
_bf6+=prop+"="+_bf3.map[prop]+"\n";
}
}
try{
_bf3.req.open("POST",_bf3.path+"/plainjs/"+_bf5,_bf3.async);
_bf3.req.setRequestHeader("Content-Type","text/plain");
_bf3.req.send(_bf6);
if(!_bf3.async){
DWREngine._stateChange(_bf3);
}
}
catch(ex){
DWREngine._handleMetaDataError(null,ex);
}
}
}else{
if(_bf3.method!=DWREngine.ScriptTag){
var _bfd="dwr-if-"+_bf3.map["c0-id"];
_bf3.div=document.createElement("div");
_bf3.div.innerHTML="<iframe src='javascript:void(0)' frameborder='0' width='0' height='0' id='"+_bfd+"' name='"+_bfd+"'></iframe>";
document.body.appendChild(_bf3.div);
_bf3.iframe=document.getElementById(_bfd);
_bf3.iframe.setAttribute("style","width:0px; height:0px; border:0px;");
var _bfe;
if(_bf3.isPoll){
DWREngine._pollFrame=_bf3.iframe;
DWREngine._pollCometSize=0;
_bfe=_bf3.path+"/plainjs/"+_bf5;
}else{
_bfe=_bf3.path+"/htmljs/"+_bf5;
}
if(_bf3.verb=="GET"){
for(prop in _bf3.map){
if(typeof _bf3.map[prop]!="function"){
_bf6+=encodeURIComponent(prop)+"="+encodeURIComponent(_bf3.map[prop])+"&";
}
}
_bf6=_bf6.substring(0,_bf6.length-1);
_bf3.iframe.setAttribute("src",_bfe+"?"+_bf6);
document.body.appendChild(_bf3.iframe);
}else{
_bf3.form=document.createElement("form");
_bf3.form.setAttribute("id","dwr-form");
_bf3.form.setAttribute("action",_bfe);
_bf3.form.setAttribute("target",_bfd);
_bf3.form.target=_bfd;
_bf3.form.setAttribute("method","post");
for(prop in _bf3.map){
var _bff=document.createElement("input");
_bff.setAttribute("type","hidden");
_bff.setAttribute("name",prop);
_bff.setAttribute("value",_bf3.map[prop]);
_bf3.form.appendChild(_bff);
}
document.body.appendChild(_bf3.form);
_bf3.form.submit();
}
}else{
if(!_bf3.scriptTagBase){
DWREngine._handleError("Please specify the scriptTagBase property within the call data.");
return;
}
for(prop in _bf3.map){
if(typeof _bf3.map[prop]!="function"){
_bf6+=encodeURIComponent(prop)+"="+encodeURIComponent(_bf3.map[prop])+"&";
}
}
_bf6=_bf6.substring(0,_bf6.length-1);
_bf3.script=document.createElement("script");
_bf3.script.id="dwr-st-"+_bf3.map["c0-id"];
_bf3.script.src=_bf3.scriptTagBase+_bf3.path+"/plainjs/"+_bf5+"?"+_bf6;
document.body.appendChild(_bf3.script);
}
}
};
DWREngine._stateChange=function(_c00){
if(!_c00.completed&&_c00.req.readyState==4){
try{
var _c01=_c00.req.responseText;
var _c02=_c00.req.status;
if(_c01==null||_c01==""){
DWREngine._handleMetaDataError(null,"No data received from server");
return;
}
var _c03=_c00.req.getResponseHeader("Content-Type");
if(DWREngine._textHtmlHandler&&_c03.match(/^text\/html/)){
DWREngine._textHtmlHandler();
return;
}
if(_c00.req==DWREngine._pollReq){
DWREngine._processCometResponse(_c01);
}else{
if(_c01.search("DWREngine._handle")==-1){
DWREngine._handleMetaDataError(null,"Invalid reply from server");
return;
}
eval(_c01);
}
DWREngine._clearUp(_c00);
}
catch(ex){
if(ex==null){
ex="Unknown error occured";
}
DWREngine._handleMetaDataError(null,ex);
}
finally{
if(DWREngine._batchQueue.length!=0){
var _c04=DWREngine._batchQueue.shift();
DWREngine._sendData(_c04);
DWREngine._batches[DWREngine._batches.length]=_c04;
}
}
}
};
DWREngine._handleResponse=function(id,_c06){
var _c07=DWREngine._handlersMap[id];
DWREngine._handlersMap[id]=null;
if(_c07){
try{
if(_c07.callback){
_c07.callback(_c06);
}
}
catch(ex){
DWREngine._handleMetaDataError(_c07,ex);
}
}
var _c08=DWREngine._batches[DWREngine._batches.length-1];
if(_c08.method==DWREngine.IFrame){
if(_c08.map["c"+(_c08.map.callCount-1)+"-id"]==id){
DWREngine._clearUp(_c08);
}
}
};
DWREngine._handleServerError=function(id,_c0a){
var _c0b=DWREngine._handlersMap[id];
DWREngine._handlersMap[id]=null;
if(_c0a.message){
DWREngine._handleMetaDataError(_c0b,_c0a.message,_c0a);
}else{
DWREngine._handleMetaDataError(_c0b,_c0a);
}
};
DWREngine._eval=function(_c0c){
return eval(_c0c);
};
DWREngine._abortRequest=function(_c0d){
if(_c0d&&_c0d.metadata!=null&&!_c0d.completed){
DWREngine._clearUp(_c0d);
if(_c0d.req){
_c0d.req.abort();
}
var _c0e;
var id;
for(var i=0;i<_c0d.ids.length;i++){
id=_c0d.ids[i];
_c0e=DWREngine._handlersMap[id];
DWREngine._handleMetaDataError(_c0e,"Timeout");
}
}
};
DWREngine._clearUp=function(_c11){
if(_c11.completed){
DWREngine._handleWarning("double complete");
return;
}
if(_c11.div){
_c11.div.parentNode.removeChild(_c11.div);
}
if(_c11.iframe){
if(_c11.iframe==DWREngine._pollFrame){
DWREngine._pollFrame=null;
}
_c11.iframe.parentNode.removeChild(_c11.iframe);
}
if(_c11.form){
_c11.form.parentNode.removeChild(_c11.form);
}
if(_c11.req){
if(_c11.req==DWREngine._pollReq){
DWREngine._pollReq=null;
}
delete _c11.req;
}
for(var i=0;i<_c11.postHooks.length;i++){
_c11.postHooks[i]();
}
_c11.postHooks=null;
for(var i=0;i<DWREngine._batches.length;i++){
if(DWREngine._batches[i]==_c11){
DWREngine._batches.splice(i,1);
break;
}
}
_c11.completed=true;
};
DWREngine._handleError=function(_c13,ex){
if(DWREngine._errorHandler){
DWREngine._errorHandler(_c13,ex);
}
};
DWREngine._handleWarning=function(_c15,ex){
if(DWREngine._warningHandler){
DWREngine._warningHandler(_c15,ex);
}
};
DWREngine._handleMetaDataError=function(_c17,_c18,ex){
if(_c17&&typeof _c17.errorHandler=="function"){
_c17.errorHandler(_c18,ex);
}else{
DWREngine._handleError(_c18,ex);
}
};
DWREngine._serializeAll=function(_c1a,_c1b,data,name){
if(data==null){
_c1a.map[name]="null:null";
return;
}
switch(typeof data){
case "boolean":
_c1a.map[name]="boolean:"+data;
break;
case "number":
_c1a.map[name]="number:"+data;
break;
case "string":
_c1a.map[name]="string:"+encodeURIComponent(data);
break;
case "object":
if(data instanceof String){
_c1a.map[name]="String:"+encodeURIComponent(data);
}else{
if(data instanceof Boolean){
_c1a.map[name]="Boolean:"+data;
}else{
if(data instanceof Number){
_c1a.map[name]="Number:"+data;
}else{
if(data instanceof Date){
_c1a.map[name]="Date:"+data.getTime();
}else{
if(data instanceof Array){
_c1a.map[name]=DWREngine._serializeArray(_c1a,_c1b,data,name);
}else{
_c1a.map[name]=DWREngine._serializeObject(_c1a,_c1b,data,name);
}
}
}
}
}
break;
case "function":
break;
default:
if(DWREngine._warningHandler){
DWREngine._warningHandler("Unexpected type: "+typeof data+", attempting default converter.");
}
_c1a.map[name]="default:"+data;
break;
}
};
DWREngine._lookup=function(_c1e,data,name){
var _c21;
for(var i=0;i<_c1e.length;i++){
if(_c1e[i].data==data){
_c21=_c1e[i];
break;
}
}
if(_c21){
return "reference:"+_c21.name;
}
_c1e.push({data:data,name:name});
return null;
};
DWREngine._serializeObject=function(_c23,_c24,data,name){
var ref=DWREngine._lookup(_c24,data,name);
if(ref){
return ref;
}
if(data.nodeName&&data.nodeType){
return DWREngine._serializeXml(_c23,_c24,data,name);
}
var _c28="Object:{";
var _c29;
for(_c29 in data){
if(_c29!="dwrSerialize"){
_c23.paramCount++;
var _c2a="c"+DWREngine._batch.map.callCount+"-e"+_c23.paramCount;
DWREngine._serializeAll(_c23,_c24,data[_c29],_c2a);
_c28+=encodeURIComponent(_c29);
_c28+=":reference:";
_c28+=_c2a;
_c28+=", ";
}
}
if(_c28.substring(_c28.length-2)==", "){
_c28=_c28.substring(0,_c28.length-2);
}
_c28+="}";
return _c28;
};
DWREngine._serializeXml=function(_c2b,_c2c,data,name){
var ref=DWREngine._lookup(_c2c,data,name);
if(ref){
return ref;
}
var _c30;
if(window.XMLSerializer){
var _c31=new XMLSerializer();
_c30=_c31.serializeToString(data);
}else{
_c30=data.toXml;
}
return "XML:"+encodeURIComponent(_c30);
};
DWREngine._serializeArray=function(_c32,_c33,data,name){
var ref=DWREngine._lookup(_c33,data,name);
if(ref){
return ref;
}
var _c37="Array:[";
for(var i=0;i<data.length;i++){
if(i!=0){
_c37+=",";
}
_c32.paramCount++;
var _c39="c"+DWREngine._batch.map.callCount+"-e"+_c32.paramCount;
DWREngine._serializeAll(_c32,_c33,data[i],_c39);
_c37+="reference:";
_c37+=_c39;
}
_c37+="]";
return _c37;
};
DWREngine._unserializeDocument=function(xml){
var dom;
if(window.DOMParser){
var _c3c=new DOMParser();
dom=_c3c.parseFromString(xml,"text/xml");
if(!dom.documentElement||dom.documentElement.tagName=="parsererror"){
var _c3d=dom.documentElement.firstChild.data;
_c3d+="\n"+dom.documentElement.firstChild.nextSibling.firstChild.data;
throw _c3d;
}
return dom;
}else{
if(window.ActiveXObject){
dom=DWREngine._newActiveXObject(DWREngine._DOMDocument);
dom.loadXML(xml);
return dom;
}else{
var div=document.createElement("div");
div.innerHTML=xml;
return div;
}
}
};
DWREngine._newActiveXObject=function(_c3f){
var _c40;
for(var i=0;i<_c3f.length;i++){
try{
_c40=new ActiveXObject(_c3f[i]);
break;
}
catch(ex){
}
}
return _c40;
};
if(typeof window.encodeURIComponent==="undefined"){
DWREngine._utf8=function(wide){
wide=""+wide;
var c;
var s;
var enc="";
var i=0;
while(i<wide.length){
c=wide.charCodeAt(i++);
if(c>=56320&&c<57344){
continue;
}
if(c>=55296&&c<56320){
if(i>=wide.length){
continue;
}
s=wide.charCodeAt(i++);
if(s<56320||c>=56832){
continue;
}
c=((c-55296)<<10)+(s-56320)+65536;
}
if(c<128){
enc+=String.fromCharCode(c);
}else{
if(c<2048){
enc+=String.fromCharCode(192+(c>>6),128+(c&63));
}else{
if(c<65536){
enc+=String.fromCharCode(224+(c>>12),128+(c>>6&63),128+(c&63));
}else{
enc+=String.fromCharCode(240+(c>>18),128+(c>>12&63),128+(c>>6&63),128+(c&63));
}
}
}
}
return enc;
};
DWREngine._hexchars="0123456789ABCDEF";
DWREngine._toHex=function(n){
return DWREngine._hexchars.charAt(n>>4)+DWREngine._hexchars.charAt(n&15);
};
DWREngine._okURIchars="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_-";
window.encodeURIComponent=function(s){
s=DWREngine._utf8(s);
var c;
var enc="";
for(var i=0;i<s.length;i++){
if(DWREngine._okURIchars.indexOf(s.charAt(i))==-1){
enc+="%"+DWREngine._toHex(s.charCodeAt(i));
}else{
enc+=s.charAt(i);
}
}
return enc;
};
}
if(typeof Array.prototype.splice==="undefined"){
Array.prototype.splice=function(ind,cnt){
if(arguments.length==0){
return ind;
}
if(typeof ind!="number"){
ind=0;
}
if(ind<0){
ind=Math.max(0,this.length+ind);
}
if(ind>this.length){
if(arguments.length>2){
ind=this.length;
}else{
return [];
}
}
if(arguments.length<2){
cnt=this.length-ind;
}
cnt=(typeof cnt=="number")?Math.max(0,cnt):0;
removeArray=this.slice(ind,ind+cnt);
endArray=this.slice(ind+cnt);
this.length=ind;
for(var i=2;i<arguments.length;i++){
this[this.length]=arguments[i];
}
for(i=0;i<endArray.length;i++){
this[this.length]=endArray[i];
}
return removeArray;
};
}
if(typeof Array.prototype.shift==="undefined"){
Array.prototype.shift=function(str){
var val=this[0];
for(var i=1;i<this.length;++i){
this[i-1]=this[i];
}
this.length--;
return val;
};
}
if(typeof Array.prototype.unshift==="undefined"){
Array.prototype.unshift=function(){
var i=unshift.arguments.length;
for(var j=this.length-1;j>=0;--j){
this[j+i]=this[j];
}
for(j=0;j<i;++j){
this[j]=unshift.arguments[j];
}
};
}
if(typeof Array.prototype.push==="undefined"){
Array.prototype.push=function(){
var sub=this.length;
for(var i=0;i<push.arguments.length;++i){
this[sub]=push.arguments[i];
sub++;
}
};
}
if(typeof Array.prototype.pop==="undefined"){
Array.prototype.pop=function(){
var _c56=this[this.length-1];
this.length--;
return _c56;
};
}
dojo.provide("dojo.widget.Textbox");
dojo.widget.defineWidget("dojo.widget.Textbox",dojo.widget.HtmlWidget,{className:"",name:"",value:"",type:"",trim:false,uppercase:false,lowercase:false,ucFirst:false,digit:false,htmlfloat:"none",templatePath:dojo.uri.moduleUri("dojo.widget","templates/Textbox.html"),textbox:null,fillInTemplate:function(){
this.textbox.value=this.value;
},filter:function(){
if(this.trim){
this.textbox.value=this.textbox.value.replace(/(^\s*|\s*$)/g,"");
}
if(this.uppercase){
this.textbox.value=this.textbox.value.toUpperCase();
}
if(this.lowercase){
this.textbox.value=this.textbox.value.toLowerCase();
}
if(this.ucFirst){
this.textbox.value=this.textbox.value.replace(/\b\w+\b/g,function(word){
return word.substring(0,1).toUpperCase()+word.substring(1).toLowerCase();
});
}
if(this.digit){
this.textbox.value=this.textbox.value.replace(/\D/g,"");
}
},onfocus:function(){
},onblur:function(){
this.filter();
},mixInProperties:function(_c58,frag){
dojo.widget.Textbox.superclass.mixInProperties.apply(this,arguments);
if(_c58["class"]){
this.className=_c58["class"];
}
}});
dojo.provide("dojo.widget.ValidationTextbox");
dojo.widget.defineWidget("dojo.widget.ValidationTextbox",dojo.widget.Textbox,function(){
this.flags={};
},{required:false,rangeClass:"range",invalidClass:"invalid",missingClass:"missing",classPrefix:"dojoValidate",size:"",maxlength:"",promptMessage:"",invalidMessage:"",missingMessage:"",rangeMessage:"",listenOnKeyPress:true,htmlfloat:"none",lastCheckedValue:null,templatePath:dojo.uri.moduleUri("dojo.widget","templates/ValidationTextbox.html"),templateCssPath:dojo.uri.moduleUri("dojo.widget","templates/Validate.css"),invalidSpan:null,missingSpan:null,rangeSpan:null,getValue:function(){
return this.textbox.value;
},setValue:function(_c5a){
this.textbox.value=_c5a;
this.update();
},isValid:function(){
return true;
},isInRange:function(){
return true;
},isEmpty:function(){
return (/^\s*$/.test(this.textbox.value));
},isMissing:function(){
return (this.required&&this.isEmpty());
},update:function(){
this.lastCheckedValue=this.textbox.value;
this.missingSpan.style.display="none";
this.invalidSpan.style.display="none";
this.rangeSpan.style.display="none";
var _c5b=this.isEmpty();
var _c5c=true;
if(this.promptMessage!=this.textbox.value){
_c5c=this.isValid();
}
var _c5d=this.isMissing();
if(_c5d){
this.missingSpan.style.display="";
}else{
if(!_c5b&&!_c5c){
this.invalidSpan.style.display="";
}else{
if(!_c5b&&!this.isInRange()){
this.rangeSpan.style.display="";
}
}
}
this.highlight();
},updateClass:function(_c5e){
var pre=this.classPrefix;
dojo.html.removeClass(this.textbox,pre+"Empty");
dojo.html.removeClass(this.textbox,pre+"Valid");
dojo.html.removeClass(this.textbox,pre+"Invalid");
dojo.html.addClass(this.textbox,pre+_c5e);
},highlight:function(){
if(this.isEmpty()){
this.updateClass("Empty");
}else{
if(this.isValid()&&this.isInRange()){
this.updateClass("Valid");
}else{
if(this.textbox.value!=this.promptMessage){
this.updateClass("Invalid");
}else{
this.updateClass("Empty");
}
}
}
},onfocus:function(evt){
if(!this.listenOnKeyPress){
this.updateClass("Empty");
}
},onblur:function(evt){
this.filter();
this.update();
},onkeyup:function(evt){
if(this.listenOnKeyPress){
this.update();
}else{
if(this.textbox.value!=this.lastCheckedValue){
this.updateClass("Empty");
}
}
},postMixInProperties:function(_c63,frag){
dojo.widget.ValidationTextbox.superclass.postMixInProperties.apply(this,arguments);
this.messages=dojo.i18n.getLocalization("dojo.widget","validate",this.lang);
dojo.lang.forEach(["invalidMessage","missingMessage","rangeMessage"],function(prop){
if(this[prop]){
this.messages[prop]=this[prop];
}
},this);
},fillInTemplate:function(){
dojo.widget.ValidationTextbox.superclass.fillInTemplate.apply(this,arguments);
this.textbox.isValid=function(){
this.isValid.call(this);
};
this.textbox.isMissing=function(){
this.isMissing.call(this);
};
this.textbox.isInRange=function(){
this.isInRange.call(this);
};
dojo.html.setClass(this.invalidSpan,this.invalidClass);
this.update();
this.filter();
if(dojo.render.html.ie){
dojo.html.addClass(this.domNode,"ie");
}
if(dojo.render.html.moz){
dojo.html.addClass(this.domNode,"moz");
}
if(dojo.render.html.opera){
dojo.html.addClass(this.domNode,"opera");
}
if(dojo.render.html.safari){
dojo.html.addClass(this.domNode,"safari");
}
}});
dojo.provide("dojo.regexp");
dojo.evalObjPath("dojo.regexp.us",true);
dojo.regexp.tld=function(_c66){
_c66=(typeof _c66=="object")?_c66:{};
if(typeof _c66.allowCC!="boolean"){
_c66.allowCC=true;
}
if(typeof _c66.allowInfra!="boolean"){
_c66.allowInfra=true;
}
if(typeof _c66.allowGeneric!="boolean"){
_c66.allowGeneric=true;
}
var _c67="arpa";
var _c68="aero|biz|com|coop|edu|gov|info|int|mil|museum|name|net|org|pro|travel|xxx|jobs|mobi|post";
var ccRE="ac|ad|ae|af|ag|ai|al|am|an|ao|aq|ar|as|at|au|aw|az|ba|bb|bd|be|bf|bg|bh|bi|bj|bm|bn|bo|br|"+"bs|bt|bv|bw|by|bz|ca|cc|cd|cf|cg|ch|ci|ck|cl|cm|cn|co|cr|cu|cv|cx|cy|cz|de|dj|dk|dm|do|dz|"+"ec|ee|eg|er|eu|es|et|fi|fj|fk|fm|fo|fr|ga|gd|ge|gf|gg|gh|gi|gl|gm|gn|gp|gq|gr|gs|gt|gu|gw|"+"gy|hk|hm|hn|hr|ht|hu|id|ie|il|im|in|io|ir|is|it|je|jm|jo|jp|ke|kg|kh|ki|km|kn|kr|kw|ky|kz|"+"la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly|ma|mc|md|mg|mh|mk|ml|mm|mn|mo|mp|mq|mr|ms|mt|mu|mv|mw|mx|"+"my|mz|na|nc|ne|nf|ng|ni|nl|no|np|nr|nu|nz|om|pa|pe|pf|pg|ph|pk|pl|pm|pn|pr|ps|pt|pw|py|qa|"+"re|ro|ru|rw|sa|sb|sc|sd|se|sg|sh|si|sk|sl|sm|sn|sr|st|su|sv|sy|sz|tc|td|tf|tg|th|tj|tk|tm|"+"tn|to|tr|tt|tv|tw|tz|ua|ug|uk|us|uy|uz|va|vc|ve|vg|vi|vn|vu|wf|ws|ye|yt|yu|za|zm|zw";
var a=[];
if(_c66.allowInfra){
a.push(_c67);
}
if(_c66.allowGeneric){
a.push(_c68);
}
if(_c66.allowCC){
a.push(ccRE);
}
var _c6b="";
if(a.length>0){
_c6b="("+a.join("|")+")";
}
return _c6b;
};
dojo.regexp.ipAddress=function(_c6c){
_c6c=(typeof _c6c=="object")?_c6c:{};
if(typeof _c6c.allowDottedDecimal!="boolean"){
_c6c.allowDottedDecimal=true;
}
if(typeof _c6c.allowDottedHex!="boolean"){
_c6c.allowDottedHex=true;
}
if(typeof _c6c.allowDottedOctal!="boolean"){
_c6c.allowDottedOctal=true;
}
if(typeof _c6c.allowDecimal!="boolean"){
_c6c.allowDecimal=true;
}
if(typeof _c6c.allowHex!="boolean"){
_c6c.allowHex=true;
}
if(typeof _c6c.allowIPv6!="boolean"){
_c6c.allowIPv6=true;
}
if(typeof _c6c.allowHybrid!="boolean"){
_c6c.allowHybrid=true;
}
var _c6d="((\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])\\.){3}(\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])";
var _c6e="(0[xX]0*[\\da-fA-F]?[\\da-fA-F]\\.){3}0[xX]0*[\\da-fA-F]?[\\da-fA-F]";
var _c6f="(0+[0-3][0-7][0-7]\\.){3}0+[0-3][0-7][0-7]";
var _c70="(0|[1-9]\\d{0,8}|[1-3]\\d{9}|4[01]\\d{8}|42[0-8]\\d{7}|429[0-3]\\d{6}|"+"4294[0-8]\\d{5}|42949[0-5]\\d{4}|429496[0-6]\\d{3}|4294967[01]\\d{2}|42949672[0-8]\\d|429496729[0-5])";
var _c71="0[xX]0*[\\da-fA-F]{1,8}";
var _c72="([\\da-fA-F]{1,4}\\:){7}[\\da-fA-F]{1,4}";
var _c73="([\\da-fA-F]{1,4}\\:){6}"+"((\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])\\.){3}(\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])";
var a=[];
if(_c6c.allowDottedDecimal){
a.push(_c6d);
}
if(_c6c.allowDottedHex){
a.push(_c6e);
}
if(_c6c.allowDottedOctal){
a.push(_c6f);
}
if(_c6c.allowDecimal){
a.push(_c70);
}
if(_c6c.allowHex){
a.push(_c71);
}
if(_c6c.allowIPv6){
a.push(_c72);
}
if(_c6c.allowHybrid){
a.push(_c73);
}
var _c75="";
if(a.length>0){
_c75="("+a.join("|")+")";
}
return _c75;
};
dojo.regexp.host=function(_c76){
_c76=(typeof _c76=="object")?_c76:{};
if(typeof _c76.allowIP!="boolean"){
_c76.allowIP=true;
}
if(typeof _c76.allowLocal!="boolean"){
_c76.allowLocal=false;
}
if(typeof _c76.allowPort!="boolean"){
_c76.allowPort=true;
}
var _c77="([0-9a-zA-Z]([-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?\\.)+"+dojo.regexp.tld(_c76);
var _c78=(_c76.allowPort)?"(\\:"+dojo.regexp.integer({signed:false})+")?":"";
var _c79=_c77;
if(_c76.allowIP){
_c79+="|"+dojo.regexp.ipAddress(_c76);
}
if(_c76.allowLocal){
_c79+="|localhost";
}
return "("+_c79+")"+_c78;
};
dojo.regexp.url=function(_c7a){
_c7a=(typeof _c7a=="object")?_c7a:{};
if(typeof _c7a.scheme=="undefined"){
_c7a.scheme=[true,false];
}
var _c7b=dojo.regexp.buildGroupRE(_c7a.scheme,function(q){
if(q){
return "(https?|ftps?)\\://";
}
return "";
});
var _c7d="(/([^?#\\s/]+/)*)?([^?#\\s/]+(\\?[^?#\\s/]*)?(#[A-Za-z][\\w.:-]*)?)?";
return _c7b+dojo.regexp.host(_c7a)+_c7d;
};
dojo.regexp.emailAddress=function(_c7e){
_c7e=(typeof _c7e=="object")?_c7e:{};
if(typeof _c7e.allowCruft!="boolean"){
_c7e.allowCruft=false;
}
_c7e.allowPort=false;
var _c7f="([\\da-z]+[-._+&'])*[\\da-z]+";
var _c80=_c7f+"@"+dojo.regexp.host(_c7e);
if(_c7e.allowCruft){
_c80="<?(mailto\\:)?"+_c80+">?";
}
return _c80;
};
dojo.regexp.emailAddressList=function(_c81){
_c81=(typeof _c81=="object")?_c81:{};
if(typeof _c81.listSeparator!="string"){
_c81.listSeparator="\\s;,";
}
var _c82=dojo.regexp.emailAddress(_c81);
var _c83="("+_c82+"\\s*["+_c81.listSeparator+"]\\s*)*"+_c82+"\\s*["+_c81.listSeparator+"]?\\s*";
return _c83;
};
dojo.regexp.integer=function(_c84){
_c84=(typeof _c84=="object")?_c84:{};
if(typeof _c84.signed=="undefined"){
_c84.signed=[true,false];
}
if(typeof _c84.separator=="undefined"){
_c84.separator="";
}else{
if(typeof _c84.groupSize=="undefined"){
_c84.groupSize=3;
}
}
var _c85=dojo.regexp.buildGroupRE(_c84.signed,function(q){
return q?"[-+]":"";
});
var _c87=dojo.regexp.buildGroupRE(_c84.separator,function(sep){
if(sep==""){
return "(0|[1-9]\\d*)";
}
var grp=_c84.groupSize,grp2=_c84.groupSize2;
if(typeof grp2!="undefined"){
var _c8b="(0|[1-9]\\d{0,"+(grp2-1)+"}(["+sep+"]\\d{"+grp2+"})*["+sep+"]\\d{"+grp+"})";
return ((grp-grp2)>0)?"("+_c8b+"|(0|[1-9]\\d{0,"+(grp-1)+"}))":_c8b;
}
return "(0|[1-9]\\d{0,"+(grp-1)+"}(["+sep+"]\\d{"+grp+"})*)";
});
return _c85+_c87;
};
dojo.regexp.realNumber=function(_c8c){
_c8c=(typeof _c8c=="object")?_c8c:{};
if(typeof _c8c.places!="number"){
_c8c.places=Infinity;
}
if(typeof _c8c.decimal!="string"){
_c8c.decimal=".";
}
if(typeof _c8c.fractional=="undefined"){
_c8c.fractional=[true,false];
}
if(typeof _c8c.exponent=="undefined"){
_c8c.exponent=[true,false];
}
if(typeof _c8c.eSigned=="undefined"){
_c8c.eSigned=[true,false];
}
var _c8d=dojo.regexp.integer(_c8c);
var _c8e=dojo.regexp.buildGroupRE(_c8c.fractional,function(q){
var re="";
if(q&&(_c8c.places>0)){
re="\\"+_c8c.decimal;
if(_c8c.places==Infinity){
re="("+re+"\\d+)?";
}else{
re=re+"\\d{"+_c8c.places+"}";
}
}
return re;
});
var _c91=dojo.regexp.buildGroupRE(_c8c.exponent,function(q){
if(q){
return "([eE]"+dojo.regexp.integer({signed:_c8c.eSigned})+")";
}
return "";
});
return _c8d+_c8e+_c91;
};
dojo.regexp.currency=function(_c93){
_c93=(typeof _c93=="object")?_c93:{};
if(typeof _c93.signed=="undefined"){
_c93.signed=[true,false];
}
if(typeof _c93.symbol=="undefined"){
_c93.symbol="$";
}
if(typeof _c93.placement!="string"){
_c93.placement="before";
}
if(typeof _c93.signPlacement!="string"){
_c93.signPlacement="before";
}
if(typeof _c93.separator=="undefined"){
_c93.separator=",";
}
if(typeof _c93.fractional=="undefined"&&typeof _c93.cents!="undefined"){
dojo.deprecated("dojo.regexp.currency: flags.cents","use flags.fractional instead","0.5");
_c93.fractional=_c93.cents;
}
if(typeof _c93.decimal!="string"){
_c93.decimal=".";
}
var _c94=dojo.regexp.buildGroupRE(_c93.signed,function(q){
if(q){
return "[-+]";
}
return "";
});
var _c96=dojo.regexp.buildGroupRE(_c93.symbol,function(_c97){
return "\\s?"+_c97.replace(/([.$?*!=:|\\\/^])/g,"\\$1")+"\\s?";
});
switch(_c93.signPlacement){
case "before":
_c96=_c94+_c96;
break;
case "after":
_c96=_c96+_c94;
break;
}
var _c98=_c93;
_c98.signed=false;
_c98.exponent=false;
var _c99=dojo.regexp.realNumber(_c98);
var _c9a;
switch(_c93.placement){
case "before":
_c9a=_c96+_c99;
break;
case "after":
_c9a=_c99+_c96;
break;
}
switch(_c93.signPlacement){
case "around":
_c9a="("+_c9a+"|"+"\\("+_c9a+"\\)"+")";
break;
case "begin":
_c9a=_c94+_c9a;
break;
case "end":
_c9a=_c9a+_c94;
break;
}
return _c9a;
};
dojo.regexp.us.state=function(_c9b){
_c9b=(typeof _c9b=="object")?_c9b:{};
if(typeof _c9b.allowTerritories!="boolean"){
_c9b.allowTerritories=true;
}
if(typeof _c9b.allowMilitary!="boolean"){
_c9b.allowMilitary=true;
}
var _c9c="AL|AK|AZ|AR|CA|CO|CT|DE|DC|FL|GA|HI|ID|IL|IN|IA|KS|KY|LA|ME|MD|MA|MI|MN|MS|MO|MT|"+"NE|NV|NH|NJ|NM|NY|NC|ND|OH|OK|OR|PA|RI|SC|SD|TN|TX|UT|VT|VA|WA|WV|WI|WY";
var _c9d="AS|FM|GU|MH|MP|PW|PR|VI";
var _c9e="AA|AE|AP";
if(_c9b.allowTerritories){
_c9c+="|"+_c9d;
}
if(_c9b.allowMilitary){
_c9c+="|"+_c9e;
}
return "("+_c9c+")";
};
dojo.regexp.time=function(_c9f){
dojo.deprecated("dojo.regexp.time","Use dojo.date.parse instead","0.5");
_c9f=(typeof _c9f=="object")?_c9f:{};
if(typeof _c9f.format=="undefined"){
_c9f.format="h:mm:ss t";
}
if(typeof _c9f.amSymbol!="string"){
_c9f.amSymbol="AM";
}
if(typeof _c9f.pmSymbol!="string"){
_c9f.pmSymbol="PM";
}
var _ca0=function(_ca1){
_ca1=_ca1.replace(/([.$?*!=:|{}\(\)\[\]\\\/^])/g,"\\$1");
var amRE=_c9f.amSymbol.replace(/([.$?*!=:|{}\(\)\[\]\\\/^])/g,"\\$1");
var pmRE=_c9f.pmSymbol.replace(/([.$?*!=:|{}\(\)\[\]\\\/^])/g,"\\$1");
_ca1=_ca1.replace("hh","(0[1-9]|1[0-2])");
_ca1=_ca1.replace("h","([1-9]|1[0-2])");
_ca1=_ca1.replace("HH","([01][0-9]|2[0-3])");
_ca1=_ca1.replace("H","([0-9]|1[0-9]|2[0-3])");
_ca1=_ca1.replace("mm","([0-5][0-9])");
_ca1=_ca1.replace("m","([1-5][0-9]|[0-9])");
_ca1=_ca1.replace("ss","([0-5][0-9])");
_ca1=_ca1.replace("s","([1-5][0-9]|[0-9])");
_ca1=_ca1.replace("t","\\s?("+amRE+"|"+pmRE+")\\s?");
return _ca1;
};
return dojo.regexp.buildGroupRE(_c9f.format,_ca0);
};
dojo.regexp.numberFormat=function(_ca4){
_ca4=(typeof _ca4=="object")?_ca4:{};
if(typeof _ca4.format=="undefined"){
_ca4.format="###-###-####";
}
var _ca5=function(_ca6){
_ca6=_ca6.replace(/([.$*!=:|{}\(\)\[\]\\\/^])/g,"\\$1");
_ca6=_ca6.replace(/\?/g,"\\d?");
_ca6=_ca6.replace(/#/g,"\\d");
return _ca6;
};
return dojo.regexp.buildGroupRE(_ca4.format,_ca5);
};
dojo.regexp.buildGroupRE=function(a,re){
if(!(a instanceof Array)){
return re(a);
}
var b=[];
for(var i=0;i<a.length;i++){
b.push(re(a[i]));
}
return "("+b.join("|")+")";
};
dojo.provide("dojo.validate.common");
dojo.validate.isText=function(_cab,_cac){
_cac=(typeof _cac=="object")?_cac:{};
if(/^\s*$/.test(_cab)){
return false;
}
if(typeof _cac.length=="number"&&_cac.length!=_cab.length){
return false;
}
if(typeof _cac.minlength=="number"&&_cac.minlength>_cab.length){
return false;
}
if(typeof _cac.maxlength=="number"&&_cac.maxlength<_cab.length){
return false;
}
return true;
};
dojo.validate.isInteger=function(_cad,_cae){
var re=new RegExp("^"+dojo.regexp.integer(_cae)+"$");
return re.test(_cad);
};
dojo.validate.isRealNumber=function(_cb0,_cb1){
var re=new RegExp("^"+dojo.regexp.realNumber(_cb1)+"$");
return re.test(_cb0);
};
dojo.validate.isCurrency=function(_cb3,_cb4){
var re=new RegExp("^"+dojo.regexp.currency(_cb4)+"$");
return re.test(_cb3);
};
dojo.validate._isInRangeCache={};
dojo.validate.isInRange=function(_cb6,_cb7){
_cb6=_cb6.replace(dojo.lang.has(_cb7,"separator")?_cb7.separator:",","","g").replace(dojo.lang.has(_cb7,"symbol")?_cb7.symbol:"$","");
if(isNaN(_cb6)){
return false;
}
_cb7=(typeof _cb7=="object")?_cb7:{};
var max=(typeof _cb7.max=="number")?_cb7.max:Infinity;
var min=(typeof _cb7.min=="number")?_cb7.min:-Infinity;
var dec=(typeof _cb7.decimal=="string")?_cb7.decimal:".";
var _cbb=dojo.validate._isInRangeCache;
var _cbc=_cb6+"max"+max+"min"+min+"dec"+dec;
if(typeof _cbb[_cbc]!="undefined"){
return _cbb[_cbc];
}
var _cbd="[^"+dec+"\\deE+-]";
_cb6=_cb6.replace(RegExp(_cbd,"g"),"");
_cb6=_cb6.replace(/^([+-]?)(\D*)/,"$1");
_cb6=_cb6.replace(/(\D*)$/,"");
_cbd="(\\d)["+dec+"](\\d)";
_cb6=_cb6.replace(RegExp(_cbd,"g"),"$1.$2");
_cb6=Number(_cb6);
if(_cb6<min||_cb6>max){
_cbb[_cbc]=false;
return false;
}
_cbb[_cbc]=true;
return true;
};
dojo.validate.isNumberFormat=function(_cbe,_cbf){
var re=new RegExp("^"+dojo.regexp.numberFormat(_cbf)+"$","i");
return re.test(_cbe);
};
dojo.validate.isValidLuhn=function(_cc1){
var sum,_cc3,_cc4;
if(typeof _cc1!="string"){
_cc1=String(_cc1);
}
_cc1=_cc1.replace(/[- ]/g,"");
_cc3=_cc1.length%2;
sum=0;
for(var i=0;i<_cc1.length;i++){
_cc4=parseInt(_cc1.charAt(i));
if(i%2==_cc3){
_cc4*=2;
}
if(_cc4>9){
_cc4-=9;
}
sum+=_cc4;
}
return !(sum%10);
};
dojo.provide("dojo.widget.IntegerTextbox");
dojo.widget.defineWidget("dojo.widget.IntegerTextbox",dojo.widget.ValidationTextbox,{mixInProperties:function(_cc6,frag){
dojo.widget.IntegerTextbox.superclass.mixInProperties.apply(this,arguments);
if((_cc6.signed=="true")||(_cc6.signed=="always")){
this.flags.signed=true;
}else{
if((_cc6.signed=="false")||(_cc6.signed=="never")){
this.flags.signed=false;
this.flags.min=0;
}else{
this.flags.signed=[true,false];
}
}
if(_cc6.separator){
this.flags.separator=_cc6.separator;
}
if(_cc6.min){
this.flags.min=parseInt(_cc6.min);
}
if(_cc6.max){
this.flags.max=parseInt(_cc6.max);
}
},isValid:function(){
return dojo.validate.isInteger(this.textbox.value,this.flags);
},isInRange:function(){
return dojo.validate.isInRange(this.textbox.value,this.flags);
}});
dojo.provide("dojo.widget.Dialog");
dojo.declare("dojo.widget.ModalDialogBase",null,{isContainer:true,focusElement:"",bgColor:"black",bgOpacity:0.4,followScroll:true,closeOnBackgroundClick:false,position_absolute_x:0,position_absolute_y:0,trapTabs:function(e){
if(e.target==this.tabStartOuter){
if(this._fromTrap){
this.tabStart.focus();
this._fromTrap=false;
}else{
this._fromTrap=true;
this.tabEnd.focus();
}
}else{
if(e.target==this.tabStart){
if(this._fromTrap){
this._fromTrap=false;
}else{
this._fromTrap=true;
this.tabEnd.focus();
}
}else{
if(e.target==this.tabEndOuter){
if(this._fromTrap){
this.tabEnd.focus();
this._fromTrap=false;
}else{
this._fromTrap=true;
this.tabStart.focus();
}
}else{
if(e.target==this.tabEnd){
if(this._fromTrap){
this._fromTrap=false;
}else{
this._fromTrap=true;
this.tabStart.focus();
}
}
}
}
}
},clearTrap:function(e){
var _cca=this;
setTimeout(function(){
_cca._fromTrap=false;
},100);
},postCreate:function(){
with(this.domNode.style){
position="absolute";
zIndex=999;
display="none";
overflow="visible";
}
var b=dojo.body();
b.appendChild(this.domNode);
this.bg=document.createElement("div");
this.bg.className="dialogUnderlay";
with(this.bg.style){
position="absolute";
left=top="0px";
zIndex=998;
display="none";
}
b.appendChild(this.bg);
this.setBackgroundColor(this.bgColor);
this.bgIframe=new dojo.html.BackgroundIframe();
if(this.bgIframe.iframe){
with(this.bgIframe.iframe.style){
position="absolute";
left=top="0px";
zIndex=90;
display="none";
}
}
if(this.closeOnBackgroundClick){
dojo.event.kwConnect({srcObj:this.bg,srcFunc:"onclick",adviceObj:this,adviceFunc:"onBackgroundClick",once:true});
}
},uninitialize:function(){
this.bgIframe.remove();
dojo.html.removeNode(this.bg,true);
},setBackgroundColor:function(_ccc){
if(arguments.length>=3){
_ccc=new dojo.gfx.color.Color(arguments[0],arguments[1],arguments[2]);
}else{
_ccc=new dojo.gfx.color.Color(_ccc);
}
this.bg.style.backgroundColor=_ccc.toString();
return this.bgColor=_ccc;
},setBackgroundOpacity:function(op){
if(arguments.length==0){
op=this.bgOpacity;
}
dojo.html.setOpacity(this.bg,op);
try{
this.bgOpacity=dojo.html.getOpacity(this.bg);
}
catch(e){
this.bgOpacity=op;
}
return this.bgOpacity;
},_sizeBackground:function(){
if(this.bgOpacity>0){
var _cce=dojo.html.getViewport();
var h=_cce.height;
var w=_cce.width;
with(this.bg.style){
width=w+"px";
height=h+"px";
}
var _cd1=dojo.html.getScroll().offset;
this.bg.style.top=_cd1.y+"px";
this.bg.style.left=_cd1.x+"px";
var _cce=dojo.html.getViewport();
if(_cce.width!=w){
this.bg.style.width=_cce.width+"px";
}
if(_cce.height!=h){
this.bg.style.height=_cce.height+"px";
}
}
this.bgIframe.size(this.bg);
},_showBackground:function(){
if(this.bgOpacity>0){
this.bg.style.display="block";
}
if(this.bgIframe.iframe){
this.bgIframe.iframe.style.display="block";
}
},placeModalDialog:function(){
var _cd2=dojo.html.getScroll().offset;
var _cd3=dojo.html.getViewport();
var mb;
if(this.isShowing()){
mb=dojo.html.getMarginBox(this.domNode);
}else{
dojo.html.setVisibility(this.domNode,false);
dojo.html.show(this.domNode);
mb=dojo.html.getMarginBox(this.domNode);
dojo.html.hide(this.domNode);
dojo.html.setVisibility(this.domNode,true);
}
with(this.domNode.style){
left=this.position_absolute_x+"px";
top=this.position_absolute_y+"px";
}
},_onKey:function(evt){
if(evt.key){
var node=evt.target;
while(node!=null){
if(node==this.domNode){
return;
}
node=node.parentNode;
}
if(evt.key!=evt.KEY_TAB){
dojo.event.browser.stopEvent(evt);
}else{
if(!dojo.render.html.opera){
try{
this.tabStart.focus();
}
catch(e){
}
}
}
}
},showModalDialog:function(){
if(this.followScroll&&!this._scrollConnected){
this._scrollConnected=true;
dojo.event.connect(window,"onscroll",this,"_onScroll");
}
dojo.event.connect(document.documentElement,"onkey",this,"_onKey");
this.placeModalDialog();
this.setBackgroundOpacity();
this._sizeBackground();
this._showBackground();
this._fromTrap=true;
setTimeout(dojo.lang.hitch(this,function(){
try{
this.tabStart.focus();
}
catch(e){
}
}),50);
},hideModalDialog:function(){
if(this.focusElement){
dojo.byId(this.focusElement).focus();
dojo.byId(this.focusElement).blur();
}
this.bg.style.display="none";
this.bg.style.width=this.bg.style.height="1px";
if(this.bgIframe.iframe){
this.bgIframe.iframe.style.display="none";
}
dojo.event.disconnect(document.documentElement,"onkey",this,"_onKey");
if(this._scrollConnected){
this._scrollConnected=false;
dojo.event.disconnect(window,"onscroll",this,"_onScroll");
}
},_onScroll:function(){
var _cd7=dojo.html.getScroll().offset;
this.bg.style.top=_cd7.y+"px";
this.bg.style.left=_cd7.x+"px";
this.placeModalDialog();
},checkSize:function(){
if(this.isShowing()){
this._sizeBackground();
this.placeModalDialog();
this.onResized();
}
},onBackgroundClick:function(){
if(this.lifetime-this.timeRemaining>=this.blockDuration){
return;
}
this.hide();
}});
dojo.widget.defineWidget("dojo.widget.Dialog",[dojo.widget.ContentPane,dojo.widget.ModalDialogBase],{templatePath:dojo.uri.moduleUri("dojo.widget","templates/Dialog.html"),blockDuration:0,lifetime:0,closeNode:"",hideOnMouseOut:false,postMixInProperties:function(){
dojo.widget.Dialog.superclass.postMixInProperties.apply(this,arguments);
if(this.closeNode){
this.setCloseControl(this.closeNode);
}
},postCreate:function(){
dojo.widget.Dialog.superclass.postCreate.apply(this,arguments);
dojo.widget.ModalDialogBase.prototype.postCreate.apply(this,arguments);
},show:function(){
if(this.lifetime){
this.timeRemaining=this.lifetime;
if(this.timerNode){
this.timerNode.innerHTML=Math.ceil(this.timeRemaining/1000);
}
if(this.blockDuration&&this.closeNode){
if(this.lifetime>this.blockDuration){
this.closeNode.style.visibility="hidden";
}else{
this.closeNode.style.display="none";
}
}
if(this.timer){
clearInterval(this.timer);
}
this.timer=setInterval(dojo.lang.hitch(this,"_onTick"),200);
}
this.showModalDialog();
if(this.hideOnMouseOut){
dojo.event.connect(this.domNode,"onmouseout",this,"onMouseOut");
}
dojo.widget.Dialog.superclass.show.call(this);
},onLoad:function(){
this.placeModalDialog();
dojo.widget.Dialog.superclass.onLoad.call(this);
},fillInTemplate:function(){
},hide:function(){
this.hideModalDialog();
dojo.widget.Dialog.superclass.hide.call(this);
if(this.timer){
clearInterval(this.timer);
}
},onMouseOut:function(e){
if(this.domNode.offsetWidth==0||this.domNode.offsetHeight==0){
return;
}
var top1=eval(this.domNode.style.top.substring(0,this.domNode.style.top.length-2));
var _cda=eval(this.domNode.style.left.substring(0,this.domNode.style.left.length-2));
var _cdb=_cda+eval(this.domNode.offsetWidth);
var _cdc=top1+eval(this.domNode.offsetHeight);
if(this.domNode.currentStyle){
top1+=2;
_cda+=2;
}else{
_cdb-=2;
_cdc-=2;
}
if(e.pageX>_cdb||e.pageY>_cdc||e.pageX<_cda||e.pageY<top1){
this.hide();
dojo.event.disconnect(this.domNode,"onmouseout",this,"onMouseOut");
}
},setTimerNode:function(node){
this.timerNode=node;
},setCloseControl:function(node){
this.closeNode=dojo.byId(node);
dojo.event.connect(this.closeNode,"onclick",this,"hide");
},setShowControl:function(node){
node=dojo.byId(node);
dojo.event.connect(node,"onclick",this,"show");
},_onTick:function(){
if(this.timer){
this.timeRemaining-=100;
if(this.lifetime-this.timeRemaining>=this.blockDuration){
if(this.closeNode){
this.closeNode.style.visibility="visible";
}
}
if(!this.timeRemaining){
clearInterval(this.timer);
this.hide();
}else{
if(this.timerNode){
this.timerNode.innerHTML=Math.ceil(this.timeRemaining/1000);
}
}
}
}});
dojo.provide("dojo.namespaces.dojo");
(function(){
var map={html:{"accordioncontainer":"dojo.widget.AccordionContainer","animatedpng":"dojo.widget.AnimatedPng","button":"dojo.widget.Button","chart":"dojo.widget.Chart","checkbox":"dojo.widget.Checkbox","clock":"dojo.widget.Clock","colorpalette":"dojo.widget.ColorPalette","combobox":"dojo.widget.ComboBox","combobutton":"dojo.widget.Button","contentpane":"dojo.widget.ContentPane","currencytextbox":"dojo.widget.CurrencyTextbox","datepicker":"dojo.widget.DatePicker","datetextbox":"dojo.widget.DateTextbox","debugconsole":"dojo.widget.DebugConsole","dialog":"dojo.widget.Dialog","dropdownbutton":"dojo.widget.Button","dropdowndatepicker":"dojo.widget.DropdownDatePicker","dropdowntimepicker":"dojo.widget.DropdownTimePicker","emaillisttextbox":"dojo.widget.InternetTextbox","emailtextbox":"dojo.widget.InternetTextbox","editor":"dojo.widget.Editor","editor2":"dojo.widget.Editor2","filteringtable":"dojo.widget.FilteringTable","fisheyelist":"dojo.widget.FisheyeList","fisheyelistitem":"dojo.widget.FisheyeList","floatingpane":"dojo.widget.FloatingPane","modalfloatingpane":"dojo.widget.FloatingPane","form":"dojo.widget.Form","googlemap":"dojo.widget.GoogleMap","inlineeditbox":"dojo.widget.InlineEditBox","integerspinner":"dojo.widget.Spinner","integertextbox":"dojo.widget.IntegerTextbox","ipaddresstextbox":"dojo.widget.InternetTextbox","layoutcontainer":"dojo.widget.LayoutContainer","linkpane":"dojo.widget.LinkPane","popupmenu2":"dojo.widget.Menu2","menuitem2":"dojo.widget.Menu2","menuseparator2":"dojo.widget.Menu2","menubar2":"dojo.widget.Menu2","menubaritem2":"dojo.widget.Menu2","pagecontainer":"dojo.widget.PageContainer","pagecontroller":"dojo.widget.PageContainer","popupcontainer":"dojo.widget.PopupContainer","progressbar":"dojo.widget.ProgressBar","radiogroup":"dojo.widget.RadioGroup","realnumbertextbox":"dojo.widget.RealNumberTextbox","regexptextbox":"dojo.widget.RegexpTextbox","repeater":"dojo.widget.Repeater","resizabletextarea":"dojo.widget.ResizableTextarea","richtext":"dojo.widget.RichText","select":"dojo.widget.Select","show":"dojo.widget.Show","showaction":"dojo.widget.ShowAction","showslide":"dojo.widget.ShowSlide","slidervertical":"dojo.widget.Slider","sliderhorizontal":"dojo.widget.Slider","slider":"dojo.widget.Slider","slideshow":"dojo.widget.SlideShow","sortabletable":"dojo.widget.SortableTable","splitcontainer":"dojo.widget.SplitContainer","tabcontainer":"dojo.widget.TabContainer","tabcontroller":"dojo.widget.TabContainer","taskbar":"dojo.widget.TaskBar","textbox":"dojo.widget.Textbox","timepicker":"dojo.widget.TimePicker","timetextbox":"dojo.widget.DateTextbox","titlepane":"dojo.widget.TitlePane","toaster":"dojo.widget.Toaster","toggler":"dojo.widget.Toggler","toolbar":"dojo.widget.Toolbar","toolbarcontainer":"dojo.widget.Toolbar","toolbaritem":"dojo.widget.Toolbar","toolbarbuttongroup":"dojo.widget.Toolbar","toolbarbutton":"dojo.widget.Toolbar","toolbardialog":"dojo.widget.Toolbar","toolbarmenu":"dojo.widget.Toolbar","toolbarseparator":"dojo.widget.Toolbar","toolbarspace":"dojo.widget.Toolbar","toolbarselect":"dojo.widget.Toolbar","toolbarcolordialog":"dojo.widget.Toolbar","tooltip":"dojo.widget.Tooltip","tree":"dojo.widget.Tree","treebasiccontroller":"dojo.widget.TreeBasicController","treecontextmenu":"dojo.widget.TreeContextMenu","treedisablewrapextension":"dojo.widget.TreeDisableWrapExtension","treedociconextension":"dojo.widget.TreeDocIconExtension","treeeditor":"dojo.widget.TreeEditor","treeemphasizeonselect":"dojo.widget.TreeEmphasizeOnSelect","treeexpandtonodeonselect":"dojo.widget.TreeExpandToNodeOnSelect","treelinkextension":"dojo.widget.TreeLinkExtension","treeloadingcontroller":"dojo.widget.TreeLoadingController","treemenuitem":"dojo.widget.TreeContextMenu","treenode":"dojo.widget.TreeNode","treerpccontroller":"dojo.widget.TreeRPCController","treeselector":"dojo.widget.TreeSelector","treetoggleonselect":"dojo.widget.TreeToggleOnSelect","treev3":"dojo.widget.TreeV3","treebasiccontrollerv3":"dojo.widget.TreeBasicControllerV3","treecontextmenuv3":"dojo.widget.TreeContextMenuV3","treedndcontrollerv3":"dojo.widget.TreeDndControllerV3","treeloadingcontrollerv3":"dojo.widget.TreeLoadingControllerV3","treemenuitemv3":"dojo.widget.TreeContextMenuV3","treerpccontrollerv3":"dojo.widget.TreeRpcControllerV3","treeselectorv3":"dojo.widget.TreeSelectorV3","urltextbox":"dojo.widget.InternetTextbox","usphonenumbertextbox":"dojo.widget.UsTextbox","ussocialsecuritynumbertextbox":"dojo.widget.UsTextbox","usstatetextbox":"dojo.widget.UsTextbox","usziptextbox":"dojo.widget.UsTextbox","validationtextbox":"dojo.widget.ValidationTextbox","treeloadingcontroller":"dojo.widget.TreeLoadingController","wizardcontainer":"dojo.widget.Wizard","wizardpane":"dojo.widget.Wizard","yahoomap":"dojo.widget.YahooMap"},svg:{"chart":"dojo.widget.svg.Chart"},vml:{"chart":"dojo.widget.vml.Chart"}};
dojo.addDojoNamespaceMapping=function(_ce1,_ce2){
map[_ce1]=_ce2;
};
function dojoNamespaceResolver(name,_ce4){
if(!_ce4){
_ce4="html";
}
if(!map[_ce4]){
return null;
}
return map[_ce4][name];
}
dojo.registerNamespaceResolver("dojo",dojoNamespaceResolver);
})();
dojo.provide("dojo.windows_js.prototype");
var Prototype={Version:"1.5.1_rc3",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[^>]*>([\x01-\uffff]*?)</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(_ce6,_ce7){
for(var _ce8 in _ce7){
_ce6[_ce8]=_ce7[_ce8];
}
return _ce6;
};
Object.extend(Object,{inspect:function(_ce9){
try{
if(_ce9===undefined){
return "undefined";
}
if(_ce9===null){
return "null";
}
return _ce9.inspect?_ce9.inspect():_ce9.toString();
}
catch(e){
if(e instanceof RangeError){
return "...";
}
throw e;
}
},toJSON:function(_cea){
var type=typeof _cea;
switch(type){
case "undefined":
case "function":
case "unknown":
return;
case "boolean":
return _cea.toString();
}
if(_cea===null){
return "null";
}
if(_cea.toJSON){
return _cea.toJSON();
}
if(_cea.ownerDocument===document){
return;
}
var _cec=[];
for(var _ced in _cea){
var _cee=Object.toJSON(_cea[_ced]);
if(_cee!==undefined){
_cec.push(_ced.toJSON()+": "+_cee);
}
}
return "{"+_cec.join(", ")+"}";
},keys:function(_cef){
var keys=[];
for(var _cf1 in _cef){
keys.push(_cf1);
}
return keys;
},values:function(_cf2){
var _cf3=[];
for(var _cf4 in _cf2){
_cf3.push(_cf2[_cf4]);
}
return _cf3;
},clone:function(_cf5){
return Object.extend({},_cf5);
}});
Function.prototype.bind=function(){
var _cf6=this,args=$A(arguments),_cf8=args.shift();
return function(){
return _cf6.apply(_cf8,args.concat($A(arguments)));
};
};
Function.prototype.bindAsEventListener=function(_cf9){
var _cfa=this,args=$A(arguments),_cf9=args.shift();
return function(_cfc){
return _cfa.apply(_cf9,[(_cfc||window.event)].concat(args).concat($A(arguments)));
};
};
Object.extend(Number.prototype,{toColorPart:function(){
return this.toPaddedString(2,16);
},succ:function(){
return this+1;
},times:function(_cfd){
$R(0,this,true).each(_cfd);
return this;
},toPaddedString:function(_cfe,_cff){
var _d00=this.toString(_cff||10);
return "0".times(_cfe-_d00.length)+_d00;
},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 _d01;
for(var i=0,_d03=arguments.length;i<_d03;i++){
var _d04=arguments[i];
try{
_d01=_d04();
break;
}
catch(e){
}
}
return _d01;
}};
var PeriodicalExecuter=Class.create();
PeriodicalExecuter.prototype={initialize:function(_d05,_d06){
this.callback=_d05;
this.frequency=_d06;
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(_d07){
return _d07==null?"":String(_d07);
},specialChar:{"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r","\\":"\\\\"}});
Object.extend(String.prototype,{gsub:function(_d08,_d09){
var _d0a="",_d0b=this,_d0c;
_d09=arguments.callee.prepareReplacement(_d09);
while(_d0b.length>0){
if(_d0c=_d0b.match(_d08)){
_d0a+=_d0b.slice(0,_d0c.index);
_d0a+=String.interpret(_d09(_d0c));
_d0b=_d0b.slice(_d0c.index+_d0c[0].length);
}else{
_d0a+=_d0b,_d0b="";
}
}
return _d0a;
},sub:function(_d0d,_d0e,_d0f){
_d0e=this.gsub.prepareReplacement(_d0e);
_d0f=_d0f===undefined?1:_d0f;
return this.gsub(_d0d,function(_d10){
if(--_d0f<0){
return _d10[0];
}
return _d0e(_d10);
});
},scan:function(_d11,_d12){
this.gsub(_d11,_d12);
return this;
},truncate:function(_d13,_d14){
_d13=_d13||30;
_d14=_d14===undefined?"...":_d14;
return this.length>_d13?this.slice(0,_d13-_d14.length)+_d14: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 _d15=new RegExp(Prototype.ScriptFragment,"img");
var _d16=new RegExp(Prototype.ScriptFragment,"im");
return (this.match(_d15)||[]).map(function(_d17){
return (_d17.match(_d16)||["",""])[1];
});
},evalScripts:function(){
return this.extractScripts().map(function(_d18){
return eval(_d18);
});
},escapeHTML:function(){
var self=arguments.callee;
self.text.data=this;
return self.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(memo,node){
return memo+node.nodeValue;
}):div.childNodes[0].nodeValue):"";
},toQueryParams:function(_d1d){
var _d1e=this.strip().match(/([^?#]*)(#.*)?$/);
if(!_d1e){
return {};
}
return _d1e[1].split(_d1d||"&").inject({},function(hash,pair){
if((pair=pair.split("="))[0]){
var key=decodeURIComponent(pair.shift());
var _d22=pair.length>1?pair.join("="):pair[0];
if(_d22!=undefined){
_d22=decodeURIComponent(_d22);
}
if(key in hash){
if(hash[key].constructor!=Array){
hash[key]=[hash[key]];
}
hash[key].push(_d22);
}else{
hash[key]=_d22;
}
}
return hash;
});
},toArray:function(){
return this.split("");
},succ:function(){
return this.slice(0,this.length-1)+String.fromCharCode(this.charCodeAt(this.length-1)+1);
},times:function(_d23){
var _d24="";
for(var i=0;i<_d23;i++){
_d24+=this;
}
return _d24;
},camelize:function(){
var _d26=this.split("-"),len=_d26.length;
if(len==1){
return _d26[0];
}
var _d28=this.charAt(0)=="-"?_d26[0].charAt(0).toUpperCase()+_d26[0].substring(1):_d26[0];
for(var i=1;i<len;i++){
_d28+=_d26[i].charAt(0).toUpperCase()+_d26[i].substring(1);
}
return _d28;
},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(_d2a){
var _d2b=this.gsub(/[\x00-\x1f\\]/,function(_d2c){
var _d2d=String.specialChar[_d2c[0]];
return _d2d?_d2d:"\\u00"+_d2c[0].charCodeAt().toPaddedString(2,16);
});
if(_d2a){
return "\""+_d2b.replace(/"/g,"\\\"")+"\"";
}
return "'"+_d2b.replace(/'/g,"\\'")+"'";
},toJSON:function(){
return this.inspect(true);
},unfilterJSON:function(_d2e){
return this.sub(_d2e||Prototype.JSONFilter,"#{1}");
},evalJSON:function(_d2f){
var json=this.unfilterJSON();
try{
if(!_d2f||(/^("(\\.|[^"\\\n\r])*?"|[,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t])+?$/.test(json))){
return eval("("+json+")");
}
}
catch(e){
}
throw new SyntaxError("Badly formed JSON string: "+this.inspect());
},include:function(_d31){
return this.indexOf(_d31)>-1;
},startsWith:function(_d32){
return this.indexOf(_d32)===0;
},endsWith:function(_d33){
var d=this.length-_d33.length;
return d>=0&&this.lastIndexOf(_d33)===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(_d35){
if(typeof _d35=="function"){
return _d35;
}
var _d36=new Template(_d35);
return function(_d37){
return _d36.evaluate(_d37);
};
};
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(_d38,_d39){
this.template=_d38.toString();
this.pattern=_d39||Template.Pattern;
},evaluate:function(_d3a){
return this.template.gsub(this.pattern,function(_d3b){
var _d3c=_d3b[1];
if(_d3c=="\\"){
return _d3b[2];
}
return _d3c+String.interpret(_d3a[_d3b[3]]);
});
}};
var $break=new Object();
var $continue=new Object();
var Enumerable={each:function(_d3d){
var _d3e=0;
try{
this._each(function(_d3f){
_d3d(_d3f,_d3e++);
});
}
catch(e){
if(e!=$break){
throw e;
}
}
return this;
},eachSlice:function(_d40,_d41){
var _d42=-_d40,_d43=[],_d44=this.toArray();
while((_d42+=_d40)<_d44.length){
_d43.push(_d44.slice(_d42,_d42+_d40));
}
return _d43.map(_d41);
},all:function(_d45){
var _d46=true;
this.each(function(_d47,_d48){
_d46=_d46&&!!(_d45||Prototype.K)(_d47,_d48);
if(!_d46){
throw $break;
}
});
return _d46;
},any:function(_d49){
var _d4a=false;
this.each(function(_d4b,_d4c){
if(_d4a=!!(_d49||Prototype.K)(_d4b,_d4c)){
throw $break;
}
});
return _d4a;
},collect:function(_d4d){
var _d4e=[];
this.each(function(_d4f,_d50){
_d4e.push((_d4d||Prototype.K)(_d4f,_d50));
});
return _d4e;
},detect:function(_d51){
var _d52;
this.each(function(_d53,_d54){
if(_d51(_d53,_d54)){
_d52=_d53;
throw $break;
}
});
return _d52;
},findAll:function(_d55){
var _d56=[];
this.each(function(_d57,_d58){
if(_d55(_d57,_d58)){
_d56.push(_d57);
}
});
return _d56;
},grep:function(_d59,_d5a){
var _d5b=[];
this.each(function(_d5c,_d5d){
var _d5e=_d5c.toString();
if(_d5e.match(_d59)){
_d5b.push((_d5a||Prototype.K)(_d5c,_d5d));
}
});
return _d5b;
},include:function(_d5f){
var _d60=false;
this.each(function(_d61){
if(_d61==_d5f){
_d60=true;
throw $break;
}
});
return _d60;
},inGroupsOf:function(_d62,_d63){
_d63=_d63===undefined?null:_d63;
return this.eachSlice(_d62,function(_d64){
while(_d64.length<_d62){
_d64.push(_d63);
}
return _d64;
});
},inject:function(memo,_d66){
this.each(function(_d67,_d68){
memo=_d66(memo,_d67,_d68);
});
return memo;
},invoke:function(_d69){
var args=$A(arguments).slice(1);
return this.map(function(_d6b){
return _d6b[_d69].apply(_d6b,args);
});
},max:function(_d6c){
var _d6d;
this.each(function(_d6e,_d6f){
_d6e=(_d6c||Prototype.K)(_d6e,_d6f);
if(_d6d==undefined||_d6e>=_d6d){
_d6d=_d6e;
}
});
return _d6d;
},min:function(_d70){
var _d71;
this.each(function(_d72,_d73){
_d72=(_d70||Prototype.K)(_d72,_d73);
if(_d71==undefined||_d72<_d71){
_d71=_d72;
}
});
return _d71;
},partition:function(_d74){
var _d75=[],_d76=[];
this.each(function(_d77,_d78){
((_d74||Prototype.K)(_d77,_d78)?_d75:_d76).push(_d77);
});
return [_d75,_d76];
},pluck:function(_d79){
var _d7a=[];
this.each(function(_d7b,_d7c){
_d7a.push(_d7b[_d79]);
});
return _d7a;
},reject:function(_d7d){
var _d7e=[];
this.each(function(_d7f,_d80){
if(!_d7d(_d7f,_d80)){
_d7e.push(_d7f);
}
});
return _d7e;
},sortBy:function(_d81){
return this.map(function(_d82,_d83){
return {value:_d82,criteria:_d81(_d82,_d83)};
}).sort(function(left,_d85){
var a=left.criteria,b=_d85.criteria;
return a<b?-1:a>b?1:0;
}).pluck("value");
},toArray:function(){
return this.map();
},zip:function(){
var _d88=Prototype.K,args=$A(arguments);
if(typeof args.last()=="function"){
_d88=args.pop();
}
var _d8a=[this].concat(args).map($A);
return this.map(function(_d8b,_d8c){
return _d88(_d8a.pluck(_d8c));
});
},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(_d8d){
if(!_d8d){
return [];
}
if(_d8d.toArray){
return _d8d.toArray();
}else{
var _d8e=[];
for(var i=0,_d90=_d8d.length;i<_d90;i++){
_d8e.push(_d8d[i]);
}
return _d8e;
}
};
if(Prototype.Browser.WebKit){
$A=Array.from=function(_d91){
if(!_d91){
return [];
}
if(!(typeof _d91=="function"&&_d91=="[object NodeList]")&&_d91.toArray){
return _d91.toArray();
}else{
var _d92=[];
for(var i=0,_d94=_d91.length;i<_d94;i++){
_d92.push(_d91[i]);
}
return _d92;
}
};
}
Object.extend(Array.prototype,Enumerable);
if(!Array.prototype._reverse){
Array.prototype._reverse=Array.prototype.reverse;
}
Object.extend(Array.prototype,{_each:function(_d95){
for(var i=0,_d97=this.length;i<_d97;i++){
_d95(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(_d98){
return _d98!=null;
});
},flatten:function(){
return this.inject([],function(_d99,_d9a){
return _d99.concat(_d9a&&_d9a.constructor==Array?_d9a.flatten():[_d9a]);
});
},without:function(){
var _d9b=$A(arguments);
return this.select(function(_d9c){
return !_d9b.include(_d9c);
});
},indexOf:function(_d9d){
for(var i=0,_d9f=this.length;i<_d9f;i++){
if(this[i]==_d9d){
return i;
}
}
return -1;
},reverse:function(_da0){
return (_da0!==false?this:this.toArray())._reverse();
},reduce:function(){
return this.length>1?this:this[0];
},uniq:function(_da1){
return this.inject([],function(_da2,_da3,_da4){
if(0==_da4||(_da1?_da2.last()!=_da3:!_da2.include(_da3))){
_da2.push(_da3);
}
return _da2;
});
},clone:function(){
return [].concat(this);
},size:function(){
return this.length;
},inspect:function(){
return "["+this.map(Object.inspect).join(", ")+"]";
},toJSON:function(){
var _da5=[];
this.each(function(_da6){
var _da7=Object.toJSON(_da6);
if(_da7!==undefined){
_da5.push(_da7);
}
});
return "["+_da5.join(", ")+"]";
}});
Array.prototype.toArray=Array.prototype.clone;
function $w(_da8){
_da8=_da8.strip();
return _da8?_da8.split(/\s+/):[];
}
if(Prototype.Browser.Opera){
Array.prototype.concat=function(){
var _da9=[];
for(var i=0,_dab=this.length;i<_dab;i++){
_da9.push(this[i]);
}
for(var i=0,_dab=arguments.length;i<_dab;i++){
if(arguments[i].constructor==Array){
for(var j=0,_dad=arguments[i].length;j<_dad;j++){
_da9.push(arguments[i][j]);
}
}else{
_da9.push(arguments[i]);
}
}
return _da9;
};
}
var Hash=function(_dae){
if(_dae instanceof Hash){
this.merge(_dae);
}else{
Object.extend(this,_dae||{});
}
};
Object.extend(Hash,{toQueryString:function(obj){
var _db0=[];
_db0.add=arguments.callee.addPair;
this.prototype._each.call(obj,function(pair){
if(!pair.key){
return;
}
var _db2=pair.value;
if(_db2&&typeof _db2=="object"){
if(_db2.constructor==Array){
_db2.each(function(_db3){
_db0.add(pair.key,_db3);
});
}
return;
}
_db0.add(pair.key,_db2);
});
return _db0.join("&");
},toJSON:function(_db4){
var _db5=[];
this.prototype._each.call(_db4,function(pair){
var _db7=Object.toJSON(pair.value);
if(_db7!==undefined){
_db5.push(pair.key.toJSON()+": "+_db7);
}
});
return "{"+_db5.join(", ")+"}";
}});
Hash.toQueryString.addPair=function(key,_db9,_dba){
key=encodeURIComponent(key);
if(_db9===undefined){
this.push(key);
}else{
this.push(key+"="+(_db9==null?"":encodeURIComponent(_db9)));
}
};
Object.extend(Hash.prototype,Enumerable);
Object.extend(Hash.prototype,{_each:function(_dbb){
for(var key in this){
var _dbd=this[key];
if(_dbd&&_dbd==Hash.prototype[key]){
continue;
}
var pair=[key,_dbd];
pair.key=key;
pair.value=_dbd;
_dbb(pair);
}
},keys:function(){
return this.pluck("key");
},values:function(){
return this.pluck("value");
},merge:function(hash){
return $H(hash).inject(this,function(_dc0,pair){
_dc0[pair.key]=pair.value;
return _dc0;
});
},remove:function(){
var _dc2;
for(var i=0,_dc4=arguments.length;i<_dc4;i++){
var _dc5=this[arguments[i]];
if(_dc5!==undefined){
if(_dc2===undefined){
_dc2=_dc5;
}else{
if(_dc2.constructor!=Array){
_dc2=[_dc2];
}
_dc2.push(_dc5);
}
}
delete this[arguments[i]];
}
return _dc2;
},toQueryString:function(){
return Hash.toQueryString(this);
},inspect:function(){
return "#<Hash:{"+this.map(function(pair){
return pair.map(Object.inspect).join(": ");
}).join(", ")+"}>";
},toJSON:function(){
return Hash.toJSON(this);
}});
function $H(_dc7){
if(_dc7 instanceof Hash){
return _dc7;
}
return new Hash(_dc7);
}
if(function(){
var i=0,Test=function(_dca){
this.key=_dca;
};
Test.prototype.key="foo";
for(var _dcb in new Test("bar")){
i++;
}
return i>1;
}()){
Hash.prototype._each=function(_dcc){
var _dcd=[];
for(var key in this){
var _dcf=this[key];
if((_dcf&&_dcf==Hash.prototype[key])||_dcd.include(key)){
continue;
}
_dcd.push(key);
var pair=[key,_dcf];
pair.key=key;
pair.value=_dcf;
_dcc(pair);
}
};
}
ObjectRange=Class.create();
Object.extend(ObjectRange.prototype,Enumerable);
Object.extend(ObjectRange.prototype,{initialize:function(_dd1,end,_dd3){
this.start=_dd1;
this.end=end;
this.exclusive=_dd3;
},_each:function(_dd4){
var _dd5=this.start;
while(this.include(_dd5)){
_dd4(_dd5);
_dd5=_dd5.succ();
}
},include:function(_dd6){
if(_dd6<this.start){
return false;
}
if(this.exclusive){
return _dd6<this.end;
}
return _dd6<=this.end;
}});
var $R=function(_dd7,end,_dd9){
return new ObjectRange(_dd7,end,_dd9);
};
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(_dda){
this.responders._each(_dda);
},register:function(_ddb){
if(!this.include(_ddb)){
this.responders.push(_ddb);
}
},unregister:function(_ddc){
this.responders=this.responders.without(_ddc);
},dispatch:function(_ddd,_dde,_ddf,json){
this.each(function(_de1){
if(typeof _de1[_ddd]=="function"){
try{
_de1[_ddd].apply(_de1,[_dde,_ddf,json]);
}
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(_de2){
this.options={method:"post",asynchronous:true,contentType:"application/x-www-form-urlencoded",encoding:"UTF-8",parameters:""};
Object.extend(this.options,_de2||{});
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,_de4){
this.transport=Ajax.getTransport();
this.setOptions(_de4);
this.request(url);
},request:function(url){
this.url=url;
this.method=this.options.method;
var _de6=Object.clone(this.options.parameters);
if(!["get","post"].include(this.method)){
_de6["_method"]=this.method;
this.method="post";
}
this.parameters=_de6;
if(_de6=Hash.toQueryString(_de6)){
if(this.method=="get"){
this.url+=(this.url.include("?")?"&":"?")+_de6;
}else{
if(/Konqueror|Safari|KHTML/.test(navigator.userAgent)){
_de6+="&_=";
}
}
}
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||_de6):null;
this.transport.send(this.body);
if(!this.options.asynchronous&&this.transport.overrideMimeType){
this.onStateChange();
}
}
catch(e){
this.dispatchException(e);
}
},onStateChange:function(){
var _de7=this.transport.readyState;
if(_de7>1&&!((_de7==4)&&this._complete)){
this.respondToReadyState(this.transport.readyState);
}
},setRequestHeaders:function(){
var _de8={"X-Requested-With":"XMLHttpRequest","X-Prototype-Version":Prototype.Version,"Accept":"text/javascript, text/html, application/xml, text/xml, */*"};
if(this.method=="post"){
_de8["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){
_de8["Connection"]="close";
}
}
if(typeof this.options.requestHeaders=="object"){
var _de9=this.options.requestHeaders;
if(typeof _de9.push=="function"){
for(var i=0,_deb=_de9.length;i<_deb;i+=2){
_de8[_de9[i]]=_de9[i+1];
}
}else{
$H(_de9).each(function(pair){
_de8[pair.key]=pair.value;
});
}
}
for(var name in _de8){
this.transport.setRequestHeader(name,_de8[name]);
}
},success:function(){
return !this.transport.status||(this.transport.status>=200&&this.transport.status<300);
},respondToReadyState:function(_dee){
var _def=Ajax.Request.Events[_dee];
var _df0=this.transport,json=this.evalJSON();
if(_def=="Complete"){
try{
this._complete=true;
(this.options["on"+this.transport.status]||this.options["on"+(this.success()?"Success":"Failure")]||Prototype.emptyFunction)(_df0,json);
}
catch(e){
this.dispatchException(e);
}
var _df2=this.getHeader("Content-type");
if(_df2&&_df2.strip().match(/^(text|application)\/(x-)?(java|ecma)script(;.*)?$/i)){
this.evalResponse();
}
}
try{
(this.options["on"+_def]||Prototype.emptyFunction)(_df0,json);
Ajax.Responders.dispatch("on"+_def,this,_df0,json);
}
catch(e){
this.dispatchException(e);
}
if(_def=="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(_df5){
(this.options.onException||Prototype.emptyFunction)(this,_df5);
Ajax.Responders.dispatch("onException",this,_df5);
}});
Ajax.Updater=Class.create();
Object.extend(Object.extend(Ajax.Updater.prototype,Ajax.Request.prototype),{initialize:function(_df6,url,_df8){
this.container={success:(_df6.success||_df6),failure:(_df6.failure||(_df6.success?null:_df6))};
this.transport=Ajax.getTransport();
this.setOptions(_df8);
var _df9=this.options.onComplete||Prototype.emptyFunction;
this.options.onComplete=(function(_dfa,_dfb){
this.updateContent();
_df9(_dfa,_dfb);
}).bind(this);
this.request(url);
},updateContent:function(){
var _dfc=this.container[this.success()?"success":"failure"];
var _dfd=this.transport.responseText;
if(!this.options.evalScripts){
_dfd=_dfd.stripScripts();
}
if(_dfc=$(_dfc)){
if(this.options.insertion){
new this.options.insertion(_dfc,_dfd);
}else{
_dfc.update(_dfd);
}
}
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(_dfe,url,_e00){
this.setOptions(_e00);
this.onComplete=this.options.onComplete;
this.frequency=(this.options.frequency||2);
this.decay=(this.options.decay||1);
this.updater={};
this.container=_dfe;
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(_e01){
if(this.options.decay){
this.decay=(_e01.responseText==this.lastText?this.decay*this.options.decay:1);
this.lastText=_e01.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 $(_e02){
if(arguments.length>1){
for(var i=0,_e04=[],_e05=arguments.length;i<_e05;i++){
_e04.push($(arguments[i]));
}
return _e04;
}
if(typeof _e02=="string"){
_e02=document.getElementById(_e02);
}
return Element.extend(_e02);
}
if(Prototype.BrowserFeatures.XPath){
document._getElementsByXPath=function(_e06,_e07){
var _e08=[];
var _e09=document.evaluate(_e06,$(_e07)||document,null,XPathResult.ORDERED_NODE_SNAPSHOT_TYPE,null);
for(var i=0,_e0b=_e09.snapshotLength;i<_e0b;i++){
_e08.push(_e09.snapshotItem(i));
}
return _e08;
};
document.getElementsByClassName=function(_e0c,_e0d){
var q=".//*[contains(concat(' ', @class, ' '), ' "+_e0c+" ')]";
return document._getElementsByXPath(q,_e0d);
};
}else{
document.getElementsByClassName=function(_e0f,_e10){
var _e11=($(_e10)||document.body).getElementsByTagName("*");
var _e12=[],_e13;
for(var i=0,_e15=_e11.length;i<_e15;i++){
_e13=_e11[i];
if(Element.hasClassName(_e13,_e0f)){
_e12.push(Element.extend(_e13));
}
}
return _e12;
};
}
if(!window.Element){
var Element={};
}
Element.extend=function(_e16){
var F=Prototype.BrowserFeatures;
if(!_e16||!_e16.tagName||_e16.nodeType==3||_e16._extended||F.SpecificElementExtensions||_e16==window){
return _e16;
}
var _e18={},_e19=_e16.tagName,_e1a=Element.extend.cache,T=Element.Methods.ByTag;
if(!F.ElementExtensions){
Object.extend(_e18,Element.Methods),Object.extend(_e18,Element.Methods.Simulated);
}
if(T[_e19]){
Object.extend(_e18,T[_e19]);
}
for(var _e1c in _e18){
var _e1d=_e18[_e1c];
if(typeof _e1d=="function"&&!(_e1c in _e16)){
_e16[_e1c]=_e1a.findOrStore(_e1d);
}
}
_e16._extended=Prototype.emptyFunction;
return _e16;
};
Element.extend.cache={findOrStore:function(_e1e){
return this[_e1e]=this[_e1e]||function(){
return _e1e.apply(null,[this].concat($A(arguments)));
};
}};
Element.Methods={visible:function(_e1f){
return $(_e1f).style.display!="none";
},toggle:function(_e20){
_e20=$(_e20);
Element[Element.visible(_e20)?"hide":"show"](_e20);
return _e20;
},hide:function(_e21){
$(_e21).style.display="none";
return _e21;
},show:function(_e22){
$(_e22).style.display="";
return _e22;
},remove:function(_e23){
_e23=$(_e23);
_e23.parentNode.removeChild(_e23);
return _e23;
},update:function(_e24,html){
html=typeof html=="undefined"?"":html.toString();
$(_e24).innerHTML=html.stripScripts();
setTimeout(function(){
html.evalScripts();
},10);
return _e24;
},replace:function(_e26,html){
_e26=$(_e26);
html=typeof html=="undefined"?"":html.toString();
if(_e26.outerHTML){
_e26.outerHTML=html.stripScripts();
}else{
var _e28=_e26.ownerDocument.createRange();
_e28.selectNodeContents(_e26);
_e26.parentNode.replaceChild(_e28.createContextualFragment(html.stripScripts()),_e26);
}
setTimeout(function(){
html.evalScripts();
},10);
return _e26;
},inspect:function(_e29){
_e29=$(_e29);
var _e2a="<"+_e29.tagName.toLowerCase();
$H({"id":"id","className":"class"}).each(function(pair){
var _e2c=pair.first(),_e2d=pair.last();
var _e2e=(_e29[_e2c]||"").toString();
if(_e2e){
_e2a+=" "+_e2d+"="+_e2e.inspect(true);
}
});
return _e2a+">";
},recursivelyCollect:function(_e2f,_e30){
_e2f=$(_e2f);
var _e31=[];
while(_e2f=_e2f[_e30]){
if(_e2f.nodeType==1){
_e31.push(Element.extend(_e2f));
}
}
return _e31;
},ancestors:function(_e32){
return $(_e32).recursivelyCollect("parentNode");
},descendants:function(_e33){
return $A($(_e33).getElementsByTagName("*")).each(Element.extend);
},firstDescendant:function(_e34){
_e34=$(_e34).firstChild;
while(_e34&&_e34.nodeType!=1){
_e34=_e34.nextSibling;
}
return $(_e34);
},immediateDescendants:function(_e35){
if(!(_e35=$(_e35).firstChild)){
return [];
}
while(_e35&&_e35.nodeType!=1){
_e35=_e35.nextSibling;
}
if(_e35){
return [_e35].concat($(_e35).nextSiblings());
}
return [];
},previousSiblings:function(_e36){
return $(_e36).recursivelyCollect("previousSibling");
},nextSiblings:function(_e37){
return $(_e37).recursivelyCollect("nextSibling");
},siblings:function(_e38){
_e38=$(_e38);
return _e38.previousSiblings().reverse().concat(_e38.nextSiblings());
},match:function(_e39,_e3a){
if(typeof _e3a=="string"){
_e3a=new Selector(_e3a);
}
return _e3a.match($(_e39));
},up:function(_e3b,_e3c,_e3d){
_e3b=$(_e3b);
if(arguments.length==1){
return $(_e3b.parentNode);
}
var _e3e=_e3b.ancestors();
return _e3c?Selector.findElement(_e3e,_e3c,_e3d):_e3e[_e3d||0];
},down:function(_e3f,_e40,_e41){
_e3f=$(_e3f);
if(arguments.length==1){
return _e3f.firstDescendant();
}
var _e42=_e3f.descendants();
return _e40?Selector.findElement(_e42,_e40,_e41):_e42[_e41||0];
},previous:function(_e43,_e44,_e45){
_e43=$(_e43);
if(arguments.length==1){
return $(Selector.handlers.previousElementSibling(_e43));
}
var _e46=_e43.previousSiblings();
return _e44?Selector.findElement(_e46,_e44,_e45):_e46[_e45||0];
},next:function(_e47,_e48,_e49){
_e47=$(_e47);
if(arguments.length==1){
return $(Selector.handlers.nextElementSibling(_e47));
}
var _e4a=_e47.nextSiblings();
return _e48?Selector.findElement(_e4a,_e48,_e49):_e4a[_e49||0];
},getElementsBySelector:function(){
var args=$A(arguments),_e4c=$(args.shift());
return Selector.findChildElements(_e4c,args);
},getElementsByClassName:function(_e4d,_e4e){
return document.getElementsByClassName(_e4e,_e4d);
},readAttribute:function(_e4f,name){
_e4f=$(_e4f);
if(Prototype.Browser.IE){
if(!_e4f.attributes){
return null;
}
var t=Element._attributeTranslations;
if(t.values[name]){
return t.values[name](_e4f,name);
}
if(t.names[name]){
name=t.names[name];
}
var _e52=_e4f.attributes[name];
return _e52?_e52.nodeValue:null;
}
return _e4f.getAttribute(name);
},getHeight:function(_e53){
return $(_e53).getDimensions().height;
},getWidth:function(_e54){
return $(_e54).getDimensions().width;
},classNames:function(_e55){
return new Element.ClassNames(_e55);
},hasClassName:function(_e56,_e57){
if(!(_e56=$(_e56))){
return;
}
var _e58=_e56.className;
if(_e58.length==0){
return false;
}
if(_e58==_e57||_e58.match(new RegExp("(^|\\s)"+_e57+"(\\s|$)"))){
return true;
}
return false;
},addClassName:function(_e59,_e5a){
if(!(_e59=$(_e59))){
return;
}
Element.classNames(_e59).add(_e5a);
return _e59;
},removeClassName:function(_e5b,_e5c){
if(!(_e5b=$(_e5b))){
return;
}
Element.classNames(_e5b).remove(_e5c);
return _e5b;
},toggleClassName:function(_e5d,_e5e){
if(!(_e5d=$(_e5d))){
return;
}
Element.classNames(_e5d)[_e5d.hasClassName(_e5e)?"remove":"add"](_e5e);
return _e5d;
},observe:function(){
Event.observe.apply(Event,arguments);
return $A(arguments).first();
},stopObserving:function(){
Event.stopObserving.apply(Event,arguments);
return $A(arguments).first();
},cleanWhitespace:function(_e5f){
_e5f=$(_e5f);
var node=_e5f.firstChild;
while(node){
var _e61=node.nextSibling;
if(node.nodeType==3&&!/\S/.test(node.nodeValue)){
_e5f.removeChild(node);
}
node=_e61;
}
return _e5f;
},empty:function(_e62){
return $(_e62).innerHTML.blank();
},descendantOf:function(_e63,_e64){
_e63=$(_e63),_e64=$(_e64);
while(_e63=_e63.parentNode){
if(_e63==_e64){
return true;
}
}
return false;
},scrollTo:function(_e65){
_e65=$(_e65);
var pos=Position.cumulativeOffset(_e65);
window.scrollTo(pos[0],pos[1]);
return _e65;
},getStyle:function(_e67,_e68){
_e67=$(_e67);
_e68=_e68=="float"?"cssFloat":_e68.camelize();
var _e69=_e67.style[_e68];
if(!_e69){
var css=document.defaultView.getComputedStyle(_e67,null);
_e69=css?css[_e68]:null;
}
if(_e68=="opacity"){
return _e69?parseFloat(_e69):1;
}
return _e69=="auto"?null:_e69;
},getOpacity:function(_e6b){
return $(_e6b).getStyle("opacity");
},setStyle:function(_e6c,_e6d,_e6e){
_e6c=$(_e6c);
var _e6f=_e6c.style;
for(var _e70 in _e6d){
if(_e70=="opacity"){
_e6c.setOpacity(_e6d[_e70]);
}else{
_e6f[(_e70=="float"||_e70=="cssFloat")?(_e6f.styleFloat===undefined?"cssFloat":"styleFloat"):(_e6e?_e70:_e70.camelize())]=_e6d[_e70];
}
}
return _e6c;
},setOpacity:function(_e71,_e72){
_e71=$(_e71);
_e71.style.opacity=(_e72==1||_e72==="")?"":(_e72<0.00001)?0:_e72;
return _e71;
},getDimensions:function(_e73){
_e73=$(_e73);
var _e74=$(_e73).getStyle("display");
if(_e74!="none"&&_e74!=null){
return {width:_e73.offsetWidth,height:_e73.offsetHeight};
}
var els=_e73.style;
var _e76=els.visibility;
var _e77=els.position;
var _e78=els.display;
els.visibility="hidden";
els.position="absolute";
els.display="block";
var _e79=_e73.clientWidth;
var _e7a=_e73.clientHeight;
els.display=_e78;
els.position=_e77;
els.visibility=_e76;
return {width:_e79,height:_e7a};
},makePositioned:function(_e7b){
_e7b=$(_e7b);
var pos=Element.getStyle(_e7b,"position");
if(pos=="static"||!pos){
_e7b._madePositioned=true;
_e7b.style.position="relative";
if(window.opera){
_e7b.style.top=0;
_e7b.style.left=0;
}
}
return _e7b;
},undoPositioned:function(_e7d){
_e7d=$(_e7d);
if(_e7d._madePositioned){
_e7d._madePositioned=undefined;
_e7d.style.position=_e7d.style.top=_e7d.style.left=_e7d.style.bottom=_e7d.style.right="";
}
return _e7d;
},makeClipping:function(_e7e){
_e7e=$(_e7e);
if(_e7e._overflow){
return _e7e;
}
_e7e._overflow=_e7e.style.overflow||"auto";
if((Element.getStyle(_e7e,"overflow")||"visible")!="hidden"){
_e7e.style.overflow="hidden";
}
return _e7e;
},undoClipping:function(_e7f){
_e7f=$(_e7f);
if(!_e7f._overflow){
return _e7f;
}
_e7f.style.overflow=_e7f._overflow=="auto"?"":_e7f._overflow;
_e7f._overflow=null;
return _e7f;
}};
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(_e80,_e81){
switch(_e81){
case "left":
case "top":
case "right":
case "bottom":
if(Element._getStyle(_e80,"position")=="static"){
return null;
}
default:
return Element._getStyle(_e80,_e81);
}
};
}else{
if(Prototype.Browser.IE){
Element.Methods.getStyle=function(_e82,_e83){
_e82=$(_e82);
_e83=(_e83=="float"||_e83=="cssFloat")?"styleFloat":_e83.camelize();
var _e84=_e82.style[_e83];
if(!_e84&&_e82.currentStyle){
_e84=_e82.currentStyle[_e83];
}
if(_e83=="opacity"){
if(_e84=(_e82.getStyle("filter")||"").match(/alpha\(opacity=(.*)\)/)){
if(_e84[1]){
return parseFloat(_e84[1])/100;
}
}
return 1;
}
if(_e84=="auto"){
if((_e83=="width"||_e83=="height")&&(_e82.getStyle("display")!="none")){
return _e82["offset"+_e83.capitalize()]+"px";
}
return null;
}
return _e84;
};
Element.Methods.setOpacity=function(_e85,_e86){
_e85=$(_e85);
var _e87=_e85.getStyle("filter"),_e88=_e85.style;
if(_e86==1||_e86===""){
_e88.filter=_e87.replace(/alpha\([^\)]*\)/gi,"");
return _e85;
}else{
if(_e86<0.00001){
_e86=0;
}
}
_e88.filter=_e87.replace(/alpha\([^\)]*\)/gi,"")+"alpha(opacity="+(_e86*100)+")";
return _e85;
};
Element.Methods.update=function(_e89,html){
_e89=$(_e89);
html=typeof html=="undefined"?"":html.toString();
var _e8b=_e89.tagName.toUpperCase();
if(["THEAD","TBODY","TR","TD"].include(_e8b)){
var div=document.createElement("div");
switch(_e8b){
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(_e89.childNodes).each(function(node){
_e89.removeChild(node);
});
depth.times(function(){
div=div.firstChild;
});
$A(div.childNodes).each(function(node){
_e89.appendChild(node);
});
}else{
_e89.innerHTML=html.stripScripts();
}
setTimeout(function(){
html.evalScripts();
},10);
return _e89;
};
}else{
if(Prototype.Browser.Gecko){
Element.Methods.setOpacity=function(_e8f,_e90){
_e8f=$(_e8f);
_e8f.style.opacity=(_e90==1)?0.999999:(_e90==="")?"":(_e90<0.00001)?0:_e90;
return _e8f;
};
}
}
}
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(_e91,_e92){
return _e91.getAttribute(_e92,2);
},_flag:function(_e93,_e94){
return $(_e93).hasAttribute(_e94)?_e94:null;
},style:function(_e95){
return _e95.style.cssText.toLowerCase();
},title:function(_e96){
var node=_e96.getAttributeNode("title");
return node.specified?node.nodeValue:null;
}}};
(function(){
Object.extend(this,{href:this._getAttr,src:this._getAttr,disabled:this._flag,checked:this._flag,readonly:this._flag,multiple:this._flag});
}).call(Element._attributeTranslations.values);
Element.Methods.Simulated={hasAttribute:function(_e98,_e99){
var t=Element._attributeTranslations,node;
_e99=t.names[_e99]||_e99;
node=$(_e98).getAttributeNode(_e99);
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(_e9c,_e9d){
if(_e9c.hasAttribute){
return _e9c.hasAttribute(_e9d);
}
return Element.Methods.Simulated.hasAttribute(_e9c,_e9d);
};
Element.addMethods=function(_e9e){
var F=Prototype.BrowserFeatures,T=Element.Methods.ByTag;
if(arguments.length==2){
var _ea1=_e9e;
_e9e=arguments[1];
}
if(!_ea1){
Object.extend(Element.Methods,_e9e||{});
}else{
if(_ea1.constructor==Array){
_ea1.each(extend);
}else{
extend(_ea1);
}
}
function extend(_ea2){
_ea2=_ea2.toUpperCase();
if(!Element.Methods.ByTag[_ea2]){
Element.Methods.ByTag[_ea2]={};
}
Object.extend(Element.Methods.ByTag[_ea2],_e9e);
}
function copy(_ea3,_ea4,_ea5){
_ea5=_ea5||false;
var _ea6=Element.extend.cache;
for(var _ea7 in _ea3){
var _ea8=_ea3[_ea7];
if(!_ea5||!(_ea7 in _ea4)){
_ea4[_ea7]=_ea6.findOrStore(_ea8);
}
}
}
function findDOMClass(_ea9){
var _eaa;
var _eab={"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(_eab[_ea9]){
_eaa="HTML"+_eab[_ea9]+"Element";
}
if(window[_eaa]){
return window[_eaa];
}
_eaa="HTML"+_ea9+"Element";
if(window[_eaa]){
return window[_eaa];
}
_eaa="HTML"+_ea9.capitalize()+"Element";
if(window[_eaa]){
return window[_eaa];
}
window[_eaa]={};
window[_eaa].prototype=document.createElement(_ea9).__proto__;
return window[_eaa];
}
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 _ead=findDOMClass(tag);
if(typeof _ead=="undefined"){
continue;
}
copy(T[tag],_ead.prototype);
}
}
Object.extend(Element,Element.Methods);
delete Element.ByTag;
};
var Toggle={display:Element.toggle};
Abstract.Insertion=function(_eae){
this.adjacency=_eae;
};
Abstract.Insertion.prototype={initialize:function(_eaf,_eb0){
this.element=$(_eaf);
this.content=_eb0.stripScripts();
if(this.adjacency&&this.element.insertAdjacentHTML){
try{
this.element.insertAdjacentHTML(this.adjacency,this.content);
}
catch(e){
var _eb1=this.element.tagName.toUpperCase();
if(["TBODY","TR"].include(_eb1)){
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(){
_eb0.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(_eb3){
_eb3.each((function(_eb4){
this.element.parentNode.insertBefore(_eb4,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(_eb5){
_eb5.reverse(false).each((function(_eb6){
this.element.insertBefore(_eb6,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(_eb7){
_eb7.each((function(_eb8){
this.element.appendChild(_eb8);
}).bind(this));
}});
Insertion.After=Class.create();
Insertion.After.prototype=Object.extend(new Abstract.Insertion("afterEnd"),{initializeRange:function(){
this.range.setStartAfter(this.element);
},insertContent:function(_eb9){
_eb9.each((function(_eba){
this.element.parentNode.insertBefore(_eba,this.element.nextSibling);
}).bind(this));
}});
Element.ClassNames=Class.create();
Element.ClassNames.prototype={initialize:function(_ebb){
this.element=$(_ebb);
},_each:function(_ebc){
this.element.className.split(/\s+/).select(function(name){
return name.length>0;
})._each(_ebc);
},set:function(_ebe){
this.element.className=_ebe;
},add:function(_ebf){
if(this.include(_ebf)){
return;
}
this.set($A(this).concat(_ebf).join(" "));
},remove:function(_ec0){
if(!this.include(_ec0)){
return;
}
this.set($A(this).without(_ec0).join(" "));
},toString:function(){
return $A(this).join(" ");
}};
Object.extend(Element.ClassNames.prototype,Enumerable);
var Selector=Class.create();
Selector.prototype={initialize:function(_ec1){
this.expression=_ec1.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(_ed1){
return this.findElements(document).include(_ed1);
},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 _edc=[];
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);
_edc.push("("+v.substring(1,v.length-1)+")");
e=e.replace(m[0],"");
break;
}
}
}
return "[not("+_edc.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(_ee6,m){
var mm,_ee9=m[6],_eea;
if(_ee9=="even"){
_ee9="2n+0";
}
if(_ee9=="odd"){
_ee9="2n+1";
}
if(mm=_ee9.match(/^(\d+)$/)){
return "["+_ee6+"= "+mm[1]+"]";
}
if(mm=_ee9.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;
_eea="[((#{fragment} - #{b}) mod #{a} = 0) and "+"((#{fragment} - #{b}) div #{a} >= 0)]";
return new Template(_eea).evaluate({fragment:_ee6,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(_ef3){
for(var i=0,node;node=_ef3[i];i++){
node._counted=true;
}
return _ef3;
},unmark:function(_ef6){
for(var i=0,node;node=_ef6[i];i++){
node._counted=undefined;
}
return _ef6;
},index:function(_ef9,_efa,_efb){
_ef9._counted=true;
if(_efa){
for(var _efc=_ef9.childNodes,i=_efc.length-1,j=1;i>=0;i--){
node=_efc[i];
if(node.nodeType==1&&(!_efb||node._counted)){
node.nodeIndex=j++;
}
}
}else{
for(var i=0,j=1,_efc=_ef9.childNodes;node=_efc[i];i++){
if(node.nodeType==1&&(!_efb||node._counted)){
node.nodeIndex=j++;
}
}
}
},unique:function(_eff){
if(_eff.length==0){
return _eff;
}
var _f00=[],n;
for(var i=0,l=_eff.length;i<l;i++){
if(!(n=_eff[i])._counted){
n._counted=true;
_f00.push(Element.extend(n));
}
}
return Selector.handlers.unmark(_f00);
},descendant:function(_f04){
var h=Selector.handlers;
for(var i=0,_f07=[],node;node=_f04[i];i++){
h.concat(_f07,node.getElementsByTagName("*"));
}
return _f07;
},child:function(_f09){
var h=Selector.handlers;
for(var i=0,_f0c=[],node;node=_f09[i];i++){
for(var j=0,_f0f=[],_f10;_f10=node.childNodes[j];j++){
if(_f10.nodeType==1&&_f10.tagName!="!"){
_f0c.push(_f10);
}
}
}
return _f0c;
},adjacent:function(_f11){
for(var i=0,_f13=[],node;node=_f11[i];i++){
var next=this.nextElementSibling(node);
if(next){
_f13.push(next);
}
}
return _f13;
},laterSibling:function(_f16){
var h=Selector.handlers;
for(var i=0,_f19=[],node;node=_f16[i];i++){
h.concat(_f19,Element.nextSiblings(node));
}
return _f19;
},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(_f1d,root,_f1f,_f20){
_f1f=_f1f.toUpperCase();
var _f21=[],h=Selector.handlers;
if(_f1d){
if(_f20){
if(_f20=="descendant"){
for(var i=0,node;node=_f1d[i];i++){
h.concat(_f21,node.getElementsByTagName(_f1f));
}
return _f21;
}else{
_f1d=this[_f20](_f1d);
}
if(_f1f=="*"){
return _f1d;
}
}
for(var i=0,node;node=_f1d[i];i++){
if(node.tagName.toUpperCase()==_f1f){
_f21.push(node);
}
}
return _f21;
}else{
return root.getElementsByTagName(_f1f);
}
},id:function(_f25,root,id,_f28){
var _f29=$(id),h=Selector.handlers;
if(!_f25&&root==document){
return _f29?[_f29]:[];
}
if(_f25){
if(_f28){
if(_f28=="child"){
for(var i=0,node;node=_f25[i];i++){
if(_f29.parentNode==node){
return [_f29];
}
}
}else{
if(_f28=="descendant"){
for(var i=0,node;node=_f25[i];i++){
if(Element.descendantOf(_f29,node)){
return [_f29];
}
}
}else{
if(_f28=="adjacent"){
for(var i=0,node;node=_f25[i];i++){
if(Selector.handlers.previousElementSibling(_f29)==node){
return [_f29];
}
}
}else{
_f25=h[_f28](_f25);
}
}
}
}
for(var i=0,node;node=_f25[i];i++){
if(node==_f29){
return [_f29];
}
}
return [];
}
return (_f29&&Element.descendantOf(_f29,root))?[_f29]:[];
},className:function(_f2d,root,_f2f,_f30){
if(_f2d&&_f30){
_f2d=this[_f30](_f2d);
}
return Selector.handlers.byClassName(_f2d,root,_f2f);
},byClassName:function(_f31,root,_f33){
if(!_f31){
_f31=Selector.handlers.descendant([root]);
}
var _f34=" "+_f33+" ";
for(var i=0,_f36=[],node,_f38;node=_f31[i];i++){
_f38=node.className;
if(_f38.length==0){
continue;
}
if(_f38==_f33||(" "+_f38+" ").include(_f34)){
_f36.push(node);
}
}
return _f36;
},attrPresence:function(_f39,root,attr){
var _f3c=[];
for(var i=0,node;node=_f39[i];i++){
if(Element.hasAttribute(node,attr)){
_f3c.push(node);
}
}
return _f3c;
},attr:function(_f3f,root,attr,_f42,_f43){
if(!_f3f){
_f3f=root.getElementsByTagName("*");
}
var _f44=Selector.operators[_f43],_f45=[];
for(var i=0,node;node=_f3f[i];i++){
var _f48=Element.readAttribute(node,attr);
if(_f48===null){
continue;
}
if(_f44(_f48,_f42)){
_f45.push(node);
}
}
return _f45;
},pseudo:function(_f49,name,_f4b,root,_f4d){
if(_f49&&_f4d){
_f49=this[_f4d](_f49);
}
if(!_f49){
_f49=root.getElementsByTagName("*");
}
return Selector.pseudos[name](_f49,_f4b,root);
}},pseudos:{"first-child":function(_f4e,_f4f,root){
for(var i=0,_f52=[],node;node=_f4e[i];i++){
if(Selector.handlers.previousElementSibling(node)){
continue;
}
_f52.push(node);
}
return _f52;
},"last-child":function(_f54,_f55,root){
for(var i=0,_f58=[],node;node=_f54[i];i++){
if(Selector.handlers.nextElementSibling(node)){
continue;
}
_f58.push(node);
}
return _f58;
},"only-child":function(_f5a,_f5b,root){
var h=Selector.handlers;
for(var i=0,_f5f=[],node;node=_f5a[i];i++){
if(!h.previousElementSibling(node)&&!h.nextElementSibling(node)){
_f5f.push(node);
}
}
return _f5f;
},"nth-child":function(_f61,_f62,root){
return Selector.pseudos.nth(_f61,_f62,root);
},"nth-last-child":function(_f64,_f65,root){
return Selector.pseudos.nth(_f64,_f65,root,true);
},"nth-of-type":function(_f67,_f68,root){
return Selector.pseudos.nth(_f67,_f68,root,false,true);
},"nth-last-of-type":function(_f6a,_f6b,root){
return Selector.pseudos.nth(_f6a,_f6b,root,true,true);
},"first-of-type":function(_f6d,_f6e,root){
return Selector.pseudos.nth(_f6d,"1",root,false,true);
},"last-of-type":function(_f70,_f71,root){
return Selector.pseudos.nth(_f70,"1",root,true,true);
},"only-of-type":function(_f73,_f74,root){
var p=Selector.pseudos;
return p["last-of-type"](p["first-of-type"](_f73,_f74,root),_f74,root);
},getIndices:function(a,b,_f79){
if(a==0){
return b>0?[b]:[];
}
return $R(1,_f79).inject([],function(memo,i){
if(0==(i-b)%a&&(i-b)/a>=0){
memo.push(i);
}
return memo;
});
},nth:function(_f7c,_f7d,root,_f7f,_f80){
if(_f7c.length==0){
return [];
}
if(_f7d=="even"){
_f7d="2n+0";
}
if(_f7d=="odd"){
_f7d="2n+1";
}
var h=Selector.handlers,_f82=[],_f83=[],m;
h.mark(_f7c);
for(var i=0,node;node=_f7c[i];i++){
if(!node.parentNode._counted){
h.index(node.parentNode,_f7f,_f80);
_f83.push(node.parentNode);
}
}
if(_f7d.match(/^\d+$/)){
_f7d=Number(_f7d);
for(var i=0,node;node=_f7c[i];i++){
if(node.nodeIndex==_f7d){
_f82.push(node);
}
}
}else{
if(m=_f7d.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 _f89=Selector.pseudos.getIndices(a,b,_f7c.length);
for(var i=0,node,l=_f89.length;node=_f7c[i];i++){
for(var j=0;j<l;j++){
if(node.nodeIndex==_f89[j]){
_f82.push(node);
}
}
}
}
}
h.unmark(_f7c);
h.unmark(_f83);
return _f82;
},"empty":function(_f8c,_f8d,root){
for(var i=0,_f90=[],node;node=_f8c[i];i++){
if(node.tagName=="!"||(node.firstChild&&!node.innerHTML.match(/^\s*$/))){
continue;
}
_f90.push(node);
}
return _f90;
},"not":function(_f92,_f93,root){
var h=Selector.handlers,_f96,m;
var _f98=new Selector(_f93).findElements(root);
h.mark(_f98);
for(var i=0,_f9a=[],node;node=_f92[i];i++){
if(!node._counted){
_f9a.push(node);
}
}
h.unmark(_f98);
return _f9a;
},"enabled":function(_f9c,_f9d,root){
for(var i=0,_fa0=[],node;node=_f9c[i];i++){
if(!node.disabled){
_fa0.push(node);
}
}
return _fa0;
},"disabled":function(_fa2,_fa3,root){
for(var i=0,_fa6=[],node;node=_fa2[i];i++){
if(node.disabled){
_fa6.push(node);
}
}
return _fa6;
},"checked":function(_fa8,_fa9,root){
for(var i=0,_fac=[],node;node=_fa8[i];i++){
if(node.checked){
_fac.push(node);
}
}
return _fac;
}},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(_fbc,_fbd){
var _fbe=new Selector(_fbd).findElements(),h=Selector.handlers;
h.mark(_fbe);
for(var i=0,_fc1=[],_fc2;_fc2=_fbc[i];i++){
if(_fc2._counted){
_fc1.push(_fc2);
}
}
h.unmark(_fbe);
return _fc1;
},findElement:function(_fc3,_fc4,_fc5){
if(typeof _fc4=="number"){
_fc5=_fc4;
_fc4=false;
}
return Selector.matchElements(_fc3,_fc4||"*")[_fc5||0];
},findChildElements:function(_fc6,_fc7){
var _fc8=_fc7.join(","),_fc7=[];
_fc8.scan(/(([\w#:.~>+()\s-]+|\*|\[.*?\])+)\s*(,|$)/,function(m){
_fc7.push(m[1].strip());
});
var _fca=[],h=Selector.handlers;
for(var i=0,l=_fc7.length,_fce;i<l;i++){
_fce=new Selector(_fc7[i].strip());
h.concat(_fca,_fce.findElements(_fc6));
}
return (l>1)?h.unique(_fca):_fca;
}});
function $$(){
return Selector.findChildElements(document,$A(arguments));
}
var Form={reset:function(form){
$(form).reset();
return form;
},serializeElements:function(_fd0,_fd1){
var data=_fd0.inject({},function(_fd3,_fd4){
if(!_fd4.disabled&&_fd4.name){
var key=_fd4.name,_fd6=$(_fd4).getValue();
if(_fd6!=null){
if(key in _fd3){
if(_fd3[key].constructor!=Array){
_fd3[key]=[_fd3[key]];
}
_fd3[key].push(_fd6);
}else{
_fd3[key]=_fd6;
}
}
}
return _fd3;
});
return _fd1?data:Hash.toQueryString(data);
}};
Form.Methods={serialize:function(form,_fd8){
return Form.serializeElements(Form.getElements(form),_fd8);
},getElements:function(form){
return $A($(form).getElementsByTagName("*")).inject([],function(_fda,_fdb){
if(Form.Element.Serializers[_fdb.tagName.toLowerCase()]){
_fda.push(Element.extend(_fdb));
}
return _fda;
});
},getInputs:function(form,_fdd,name){
form=$(form);
var _fdf=form.getElementsByTagName("input");
if(!_fdd&&!name){
return $A(_fdf).map(Element.extend);
}
for(var i=0,_fe1=[],_fe2=_fdf.length;i<_fe2;i++){
var _fe3=_fdf[i];
if((_fdd&&_fe3.type!=_fdd)||(name&&_fe3.name!=name)){
continue;
}
_fe1.push(Element.extend(_fe3));
}
return _fe1;
},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(_fe7){
return _fe7.type!="hidden"&&!_fe7.disabled&&["input","select","textarea"].include(_fe7.tagName.toLowerCase());
});
},focusFirstElement:function(form){
form=$(form);
form.findFirstElement().activate();
return form;
},request:function(form,_fea){
form=$(form),_fea=Object.clone(_fea||{});
var _feb=_fea.parameters;
_fea.parameters=form.serialize(true);
if(_feb){
if(typeof _feb=="string"){
_feb=_feb.toQueryParams();
}
Object.extend(_fea.parameters,_feb);
}
if(form.hasAttribute("method")&&!_fea.method){
_fea.method=form.method;
}
return new Ajax.Request(form.readAttribute("action"),_fea);
}};
Object.extend(Form,Form.Methods);
Form.Element={focus:function(_fec){
$(_fec).focus();
return _fec;
},select:function(_fed){
$(_fed).select();
return _fed;
}};
Form.Element.Methods={serialize:function(_fee){
_fee=$(_fee);
if(!_fee.disabled&&_fee.name){
var _fef=_fee.getValue();
if(_fef!=undefined){
var pair={};
pair[_fee.name]=_fef;
return Hash.toQueryString(pair);
}
}
return "";
},getValue:function(_ff1){
_ff1=$(_ff1);
var _ff2=_ff1.tagName.toLowerCase();
return Form.Element.Serializers[_ff2](_ff1);
},clear:function(_ff3){
$(_ff3).value="";
return _ff3;
},present:function(_ff4){
return $(_ff4).value!="";
},activate:function(_ff5){
_ff5=$(_ff5);
try{
_ff5.focus();
if(_ff5.select&&(_ff5.tagName.toLowerCase()!="input"||!["button","reset","submit"].include(_ff5.type))){
_ff5.select();
}
}
catch(e){
}
return _ff5;
},disable:function(_ff6){
_ff6=$(_ff6);
_ff6.blur();
_ff6.disabled=true;
return _ff6;
},enable:function(_ff7){
_ff7=$(_ff7);
_ff7.disabled=false;
return _ff7;
}};
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)});
var Field=Form.Element;
var $F=Form.Element.getValue;
Form.Element.Serializers={input:function(_ff8){
switch(_ff8.type.toLowerCase()){
case "checkbox":
case "radio":
return Form.Element.Serializers.inputSelector(_ff8);
default:
return Form.Element.Serializers.textarea(_ff8);
}
},inputSelector:function(_ff9){
return _ff9.checked?_ff9.value:null;
},textarea:function(_ffa){
return _ffa.value;
},select:function(_ffb){
return this[_ffb.type=="select-one"?"selectOne":"selectMany"](_ffb);
},selectOne:function(_ffc){
var _ffd=_ffc.selectedIndex;
return _ffd>=0?this.optionValue(_ffc.options[_ffd]):null;
},selectMany:function(_ffe){
var _fff,_1000=_ffe.length;
if(!_1000){
return null;
}
for(var i=0,_fff=[];i<_1000;i++){
var opt=_ffe.options[i];
if(opt.selected){
_fff.push(this.optionValue(opt));
}
}
return _fff;
},optionValue:function(opt){
return Element.extend(opt).hasAttribute("value")?opt.value:opt.text;
}};
Abstract.TimedObserver=function(){
};
Abstract.TimedObserver.prototype={initialize:function(_1004,_1005,_1006){
this.frequency=_1005;
this.element=$(_1004);
this.callback=_1006;
this.lastValue=this.getValue();
this.registerCallback();
},registerCallback:function(){
setInterval(this.onTimerEvent.bind(this),this.frequency*1000);
},onTimerEvent:function(){
var value=this.getValue();
var _1008=("string"==typeof this.lastValue&&"string"==typeof value?this.lastValue!=value:String(this.lastValue)!=String(value));
if(_1008){
this.callback(this.element,value);
this.lastValue=value;
}
}};
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(_1009,_100a){
this.element=$(_1009);
this.callback=_100a;
this.lastValue=this.getValue();
if(this.element.tagName.toLowerCase()=="form"){
this.registerFormCallbacks();
}else{
this.registerCallback(this.element);
}
},onElementEvent:function(){
var value=this.getValue();
if(this.lastValue!=value){
this.callback(this.element,value);
this.lastValue=value;
}
},registerFormCallbacks:function(){
Form.getElements(this.element).each(this.registerCallback.bind(this));
},registerCallback:function(_100c){
if(_100c.type){
switch(_100c.type.toLowerCase()){
case "checkbox":
case "radio":
Event.observe(_100c,"click",this.onElementEvent.bind(this));
break;
default:
Event.observe(_100c,"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(event){
return $(event.target||event.srcElement);
},isLeftClick:function(event){
return (((event.which)&&(event.which==1))||((event.button)&&(event.button==1)));
},pointerX:function(event){
return event.pageX||(event.clientX+(document.documentElement.scrollLeft||document.body.scrollLeft));
},pointerY:function(event){
return event.pageY||(event.clientY+(document.documentElement.scrollTop||document.body.scrollTop));
},stop:function(event){
if(event.preventDefault){
event.preventDefault();
event.stopPropagation();
}else{
event.returnValue=false;
event.cancelBubble=true;
}
},findElement:function(event,_1013){
var _1014=Event.element(event);
while(_1014.parentNode&&(!_1014.tagName||(_1014.tagName.toUpperCase()!=_1013.toUpperCase()))){
_1014=_1014.parentNode;
}
return _1014;
},observers:false,_observeAndCache:function(_1015,name,_1017,_1018){
if(!this.observers){
this.observers=[];
}
if(_1015.addEventListener){
this.observers.push([_1015,name,_1017,_1018]);
_1015.addEventListener(name,_1017,_1018);
}else{
if(_1015.attachEvent){
this.observers.push([_1015,name,_1017,_1018]);
_1015.attachEvent("on"+name,_1017);
}
}
},unloadCache:function(){
if(!Event.observers){
return;
}
for(var i=0,_101a=Event.observers.length;i<_101a;i++){
Event.stopObserving.apply(this,Event.observers[i]);
Event.observers[i][0]=null;
}
Event.observers=false;
},observe:function(_101b,name,_101d,_101e){
_101b=$(_101b);
_101e=_101e||false;
if(name=="keypress"&&(Prototype.Browser.WebKit||_101b.attachEvent)){
name="keydown";
}
Event._observeAndCache(_101b,name,_101d,_101e);
},stopObserving:function(_101f,name,_1021,_1022){
_101f=$(_101f);
_1022=_1022||false;
if(name=="keypress"&&(Prototype.Browser.WebKit||_101f.attachEvent)){
name="keydown";
}
if(_101f.removeEventListener){
_101f.removeEventListener(name,_1021,_1022);
}else{
if(_101f.detachEvent){
try{
_101f.detachEvent("on"+name,_1021);
}
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(_1023){
var _1024=0,_1025=0;
do{
_1024+=_1023.scrollTop||0;
_1025+=_1023.scrollLeft||0;
_1023=_1023.parentNode;
}while(_1023);
return [_1025,_1024];
},cumulativeOffset:function(_1026){
var _1027=0,_1028=0;
do{
_1027+=_1026.offsetTop||0;
_1028+=_1026.offsetLeft||0;
_1026=_1026.offsetParent;
}while(_1026);
return [_1028,_1027];
},positionedOffset:function(_1029){
var _102a=0,_102b=0;
do{
_102a+=_1029.offsetTop||0;
_102b+=_1029.offsetLeft||0;
_1029=_1029.offsetParent;
if(_1029){
if(_1029.tagName=="BODY"){
break;
}
var p=Element.getStyle(_1029,"position");
if(p=="relative"||p=="absolute"){
break;
}
}
}while(_1029);
return [_102b,_102a];
},offsetParent:function(_102d){
if(_102d.offsetParent){
return _102d.offsetParent;
}
if(_102d==document.body){
return _102d;
}
while((_102d=_102d.parentNode)&&_102d!=document.body){
if(Element.getStyle(_102d,"position")!="static"){
return _102d;
}
}
return document.body;
},within:function(_102e,x,y){
if(this.includeScrollOffsets){
return this.withinIncludingScrolloffsets(_102e,x,y);
}
this.xcomp=x;
this.ycomp=y;
this.offset=this.cumulativeOffset(_102e);
return (y>=this.offset[1]&&y<this.offset[1]+_102e.offsetHeight&&x>=this.offset[0]&&x<this.offset[0]+_102e.offsetWidth);
},withinIncludingScrolloffsets:function(_1031,x,y){
var _1034=this.realOffset(_1031);
this.xcomp=x+_1034[0]-this.deltaX;
this.ycomp=y+_1034[1]-this.deltaY;
this.offset=this.cumulativeOffset(_1031);
return (this.ycomp>=this.offset[1]&&this.ycomp<this.offset[1]+_1031.offsetHeight&&this.xcomp>=this.offset[0]&&this.xcomp<this.offset[0]+_1031.offsetWidth);
},overlap:function(mode,_1036){
if(!mode){
return 0;
}
if(mode=="vertical"){
return ((this.offset[1]+_1036.offsetHeight)-this.ycomp)/_1036.offsetHeight;
}
if(mode=="horizontal"){
return ((this.offset[0]+_1036.offsetWidth)-this.xcomp)/_1036.offsetWidth;
}
},page:function(_1037){
var _1038=0,_1039=0;
var _103a=_1037;
do{
_1038+=_103a.offsetTop||0;
_1039+=_103a.offsetLeft||0;
if(_103a.offsetParent==document.body){
if(Element.getStyle(_103a,"position")=="absolute"){
break;
}
}
}while(_103a=_103a.offsetParent);
_103a=_1037;
do{
if(!window.opera||_103a.tagName=="BODY"){
_1038-=_103a.scrollTop||0;
_1039-=_103a.scrollLeft||0;
}
}while(_103a=_103a.parentNode);
return [_1039,_1038];
},clone:function(_103b,_103c){
var _103d=Object.extend({setLeft:true,setTop:true,setWidth:true,setHeight:true,offsetTop:0,offsetLeft:0},arguments[2]||{});
_103b=$(_103b);
var p=Position.page(_103b);
_103c=$(_103c);
var delta=[0,0];
var _1040=null;
if(Element.getStyle(_103c,"position")=="absolute"){
_1040=Position.offsetParent(_103c);
delta=Position.page(_1040);
}
if(_1040==document.body){
delta[0]-=document.body.offsetLeft;
delta[1]-=document.body.offsetTop;
}
if(_103d.setLeft){
_103c.style.left=(p[0]-delta[0]+_103d.offsetLeft)+"px";
}
if(_103d.setTop){
_103c.style.top=(p[1]-delta[1]+_103d.offsetTop)+"px";
}
if(_103d.setWidth){
_103c.style.width=_103b.offsetWidth+"px";
}
if(_103d.setHeight){
_103c.style.height=_103b.offsetHeight+"px";
}
},absolutize:function(_1041){
_1041=$(_1041);
if(_1041.style.position=="absolute"){
return;
}
Position.prepare();
var _1042=Position.positionedOffset(_1041);
var top=_1042[1];
var left=_1042[0];
var width=_1041.clientWidth;
var _1046=_1041.clientHeight;
_1041._originalLeft=left-parseFloat(_1041.style.left||0);
_1041._originalTop=top-parseFloat(_1041.style.top||0);
_1041._originalWidth=_1041.style.width;
_1041._originalHeight=_1041.style.height;
_1041.style.position="absolute";
_1041.style.top=top+"px";
_1041.style.left=left+"px";
_1041.style.width=width+"px";
_1041.style.height=_1046+"px";
},relativize:function(_1047){
_1047=$(_1047);
if(_1047.style.position=="relative"){
return;
}
Position.prepare();
_1047.style.position="relative";
var top=parseFloat(_1047.style.top||0)-(_1047._originalTop||0);
var left=parseFloat(_1047.style.left||0)-(_1047._originalLeft||0);
_1047.style.top=top+"px";
_1047.style.left=left+"px";
_1047.style.height=_1047._originalHeight;
_1047.style.width=_1047._originalWidth;
}};
if(Prototype.Browser.WebKit){
Position.cumulativeOffset=function(_104a){
var _104b=0,_104c=0;
do{
_104b+=_104a.offsetTop||0;
_104c+=_104a.offsetLeft||0;
if(_104a.offsetParent==document.body){
if(Element.getStyle(_104a,"position")=="absolute"){
break;
}
}
_104a=_104a.offsetParent;
}while(_104a);
return [_104c,_104b];
};
}
Element.addMethods();
dojo.provide("dojo.windows_js.effects");
String.prototype.parseColor=function(){
var color="#";
if(this.slice(0,4)=="rgb("){
var cols=this.slice(4,this.length-1).split(",");
var i=0;
do{
color+=parseInt(cols[i]).toColorPart();
}while(++i<3);
}else{
if(this.slice(0,1)=="#"){
if(this.length==4){
for(var i=1;i<4;i++){
color+=(this.charAt(i)+this.charAt(i)).toLowerCase();
}
}
if(this.length==7){
color=this.toLowerCase();
}
}
}
return (color.length==7?color:(arguments[0]||this));
};
Element.collectTextNodes=function(_1050){
return $A($(_1050).childNodes).collect(function(node){
return (node.nodeType==3?node.nodeValue:(node.hasChildNodes()?Element.collectTextNodes(node):""));
}).flatten().join("");
};
Element.collectTextNodesIgnoreClass=function(_1052,_1053){
return $A($(_1052).childNodes).collect(function(node){
return (node.nodeType==3?node.nodeValue:((node.hasChildNodes()&&!Element.hasClassName(node,_1053))?Element.collectTextNodesIgnoreClass(node,_1053):""));
}).flatten().join("");
};
Element.setContentZoom=function(_1055,_1056){
_1055=$(_1055);
_1055.setStyle({fontSize:(_1056/100)+"em"});
if(Prototype.Browser.WebKit){
window.scrollBy(0,0);
}
return _1055;
};
Element.getInlineOpacity=function(_1057){
return $(_1057).style.opacity||"";
};
Element.forceRerendering=function(_1058){
try{
_1058=$(_1058);
var n=document.createTextNode(" ");
_1058.appendChild(n);
_1058.removeChild(n);
}
catch(e){
}
};
Array.prototype.call=function(){
var args=arguments;
this.each(function(f){
f.apply(this,args);
});
};
var Effect={_elementDoesNotExistError:{name:"ElementDoesNotExistError",message:"The specified DOM element does not exist, but is required for this effect to operate"},tagifyText:function(_105c){
if(typeof Builder=="undefined"){
throw ("Effect.tagifyText requires including script.aculo.us' builder.js library");
}
var _105d="position:relative";
if(Prototype.Browser.IE){
_105d+=";zoom:1";
}
_105c=$(_105c);
$A(_105c.childNodes).each(function(child){
if(child.nodeType==3){
child.nodeValue.toArray().each(function(_105f){
_105c.insertBefore(Builder.node("span",{style:_105d},_105f==" "?String.fromCharCode(160):_105f),child);
});
Element.remove(child);
}
});
},multiple:function(_1060,_1061){
var _1062;
if(((typeof _1060=="object")||(typeof _1060=="function"))&&(_1060.length)){
_1062=_1060;
}else{
_1062=$(_1060).childNodes;
}
var _1063=Object.extend({speed:0.1,delay:0},arguments[2]||{});
var _1064=_1063.delay;
$A(_1062).each(function(_1065,index){
new _1061(_1065,Object.extend(_1063,{delay:index*_1063.speed+_1064}));
});
},PAIRS:{"slide":["SlideDown","SlideUp"],"blind":["BlindDown","BlindUp"],"appear":["Appear","Fade"]},toggle:function(_1067,_1068){
_1067=$(_1067);
_1068=(_1068||"appear").toLowerCase();
var _1069=Object.extend({queue:{position:"end",scope:(_1067.id||"global"),limit:1}},arguments[2]||{});
Effect[_1067.visible()?Effect.PAIRS[_1068][1]:Effect.PAIRS[_1068][0]](_1067,_1069);
}};
var Effect2=Effect;
Effect.Transitions={linear:Prototype.K,sinoidal:function(pos){
return (-Math.cos(pos*Math.PI)/2)+0.5;
},reverse:function(pos){
return 1-pos;
},flicker:function(pos){
var pos=((-Math.cos(pos*Math.PI)/4)+0.75)+Math.random()/4;
return (pos>1?1:pos);
},wobble:function(pos){
return (-Math.cos(pos*Math.PI*(9*pos))/2)+0.5;
},pulse:function(pos,_106f){
_106f=_106f||5;
return (Math.round((pos%(1/_106f))*_106f)==0?((pos*_106f*2)-Math.floor(pos*_106f*2)):1-((pos*_106f*2)-Math.floor(pos*_106f*2)));
},none:function(pos){
return 0;
},full:function(pos){
return 1;
}};
Effect.ScopedQueue=Class.create();
Object.extend(Object.extend(Effect.ScopedQueue.prototype,Enumerable),{initialize:function(){
this.effects=[];
this.interval=null;
},_each:function(_1072){
this.effects._each(_1072);
},add:function(_1073){
var _1074=new Date().getTime();
var _1075=(typeof _1073.options.queue=="string")?_1073.options.queue:_1073.options.queue.position;
switch(_1075){
case "front":
this.effects.findAll(function(e){
return e.state=="idle";
}).each(function(e){
e.startOn+=_1073.finishOn;
e.finishOn+=_1073.finishOn;
});
break;
case "with-last":
_1074=this.effects.pluck("startOn").max()||_1074;
break;
case "end":
_1074=this.effects.pluck("finishOn").max()||_1074;
break;
}
_1073.startOn+=_1074;
_1073.finishOn+=_1074;
if(!_1073.options.queue.limit||(this.effects.length<_1073.options.queue.limit)){
this.effects.push(_1073);
}
if(!this.interval){
this.interval=setInterval(this.loop.bind(this),15);
}
},remove:function(_1078){
this.effects=this.effects.reject(function(e){
return e==_1078;
});
if(this.effects.length==0){
clearInterval(this.interval);
this.interval=null;
}
},loop:function(){
var _107a=new Date().getTime();
for(var i=0,len=this.effects.length;i<len;i++){
this.effects[i]&&this.effects[i].loop(_107a);
}
}});
Effect.Queues={instances:$H(),get:function(_107d){
if(typeof _107d!="string"){
return _107d;
}
if(!this.instances[_107d]){
this.instances[_107d]=new Effect.ScopedQueue();
}
return this.instances[_107d];
}};
Effect.Queue=Effect.Queues.get("global");
Effect.DefaultOptions={transition:Effect.Transitions.sinoidal,duration:1,fps:100,sync:false,from:0,to:1,delay:0,queue:"parallel"};
Effect.Base=function(){
};
Effect.Base.prototype={position:null,start:function(_107e){
function codeForEvent(_107f,_1080){
return ((_107f[_1080+"Internal"]?"this.options."+_1080+"Internal(this);":"")+(_107f[_1080]?"this.options."+_1080+"(this);":""));
}
if(_107e.transition===false){
_107e.transition=Effect.Transitions.linear;
}
this.options=Object.extend(Object.extend({},Effect.DefaultOptions),_107e||{});
this.currentFrame=0;
this.state="idle";
this.startOn=this.options.delay*1000;
this.finishOn=this.startOn+(this.options.duration*1000);
this.fromToDelta=this.options.to-this.options.from;
this.totalTime=this.finishOn-this.startOn;
this.totalFrames=this.options.fps*this.options.duration;
eval("this.render = function(pos){ "+"if(this.state==\"idle\"){this.state=\"running\";"+codeForEvent(_107e,"beforeSetup")+(this.setup?"this.setup();":"")+codeForEvent(_107e,"afterSetup")+"};if(this.state==\"running\"){"+"pos=this.options.transition(pos)*"+this.fromToDelta+"+"+this.options.from+";"+"this.position=pos;"+codeForEvent(_107e,"beforeUpdate")+(this.update?"this.update(pos);":"")+codeForEvent(_107e,"afterUpdate")+"}}");
this.event("beforeStart");
if(!this.options.sync){
Effect.Queues.get(typeof this.options.queue=="string"?"global":this.options.queue.scope).add(this);
}
},loop:function(_1081){
if(_1081>=this.startOn){
if(_1081>=this.finishOn){
this.render(1);
this.cancel();
this.event("beforeFinish");
if(this.finish){
this.finish();
}
this.event("afterFinish");
return;
}
var pos=(_1081-this.startOn)/this.totalTime,frame=Math.round(pos*this.totalFrames);
if(frame>this.currentFrame){
this.render(pos);
this.currentFrame=frame;
}
}
},cancel:function(){
if(!this.options.sync){
Effect.Queues.get(typeof this.options.queue=="string"?"global":this.options.queue.scope).remove(this);
}
this.state="finished";
},event:function(_1084){
if(this.options[_1084+"Internal"]){
this.options[_1084+"Internal"](this);
}
if(this.options[_1084]){
this.options[_1084](this);
}
},inspect:function(){
var data=$H();
for(property in this){
if(typeof this[property]!="function"){
data[property]=this[property];
}
}
return "#<Effect:"+data.inspect()+",options:"+$H(this.options).inspect()+">";
}};
Effect.Parallel=Class.create();
Object.extend(Object.extend(Effect.Parallel.prototype,Effect.Base.prototype),{initialize:function(_1086){
this.effects=_1086||[];
this.start(arguments[1]);
},update:function(_1087){
this.effects.invoke("render",_1087);
},finish:function(_1088){
this.effects.each(function(_1089){
_1089.render(1);
_1089.cancel();
_1089.event("beforeFinish");
if(_1089.finish){
_1089.finish(_1088);
}
_1089.event("afterFinish");
});
}});
Effect.Event=Class.create();
Object.extend(Object.extend(Effect.Event.prototype,Effect.Base.prototype),{initialize:function(){
var _108a=Object.extend({duration:0},arguments[0]||{});
this.start(_108a);
},update:Prototype.emptyFunction});
Effect.Opacity=Class.create();
Object.extend(Object.extend(Effect.Opacity.prototype,Effect.Base.prototype),{initialize:function(_108b){
this.element=$(_108b);
if(!this.element){
throw (Effect._elementDoesNotExistError);
}
if(Prototype.Browser.IE&&(!this.element.currentStyle.hasLayout)){
this.element.setStyle({zoom:1});
}
var _108c=Object.extend({from:this.element.getOpacity()||0,to:1},arguments[1]||{});
this.start(_108c);
},update:function(_108d){
this.element.setOpacity(_108d);
}});
Effect.Move=Class.create();
Object.extend(Object.extend(Effect.Move.prototype,Effect.Base.prototype),{initialize:function(_108e){
this.element=$(_108e);
if(!this.element){
throw (Effect._elementDoesNotExistError);
}
var _108f=Object.extend({x:0,y:0,mode:"relative"},arguments[1]||{});
this.start(_108f);
},setup:function(){
this.element.makePositioned();
this.originalLeft=parseFloat(this.element.getStyle("left")||"0");
this.originalTop=parseFloat(this.element.getStyle("top")||"0");
if(this.options.mode=="absolute"){
this.options.x=this.options.x-this.originalLeft;
this.options.y=this.options.y-this.originalTop;
}
},update:function(_1090){
this.element.setStyle({left:Math.round(this.options.x*_1090+this.originalLeft)+"px",top:Math.round(this.options.y*_1090+this.originalTop)+"px"});
}});
Effect.MoveBy=function(_1091,toTop,_1093){
return new Effect.Move(_1091,Object.extend({x:_1093,y:toTop},arguments[3]||{}));
};
Effect.Scale=Class.create();
Object.extend(Object.extend(Effect.Scale.prototype,Effect.Base.prototype),{initialize:function(_1094,_1095){
this.element=$(_1094);
if(!this.element){
throw (Effect._elementDoesNotExistError);
}
var _1096=Object.extend({scaleX:true,scaleY:true,scaleContent:true,scaleFromCenter:false,scaleMode:"box",scaleFrom:100,scaleTo:_1095},arguments[2]||{});
this.start(_1096);
},setup:function(){
this.restoreAfterFinish=this.options.restoreAfterFinish||false;
this.elementPositioning=this.element.getStyle("position");
this.originalStyle={};
["top","left","width","height","fontSize"].each(function(k){
this.originalStyle[k]=this.element.style[k];
}.bind(this));
this.originalTop=this.element.offsetTop;
this.originalLeft=this.element.offsetLeft;
var _1098=this.element.getStyle("font-size")||"100%";
["em","px","%","pt"].each(function(_1099){
if(_1098.indexOf(_1099)>0){
this.fontSize=parseFloat(_1098);
this.fontSizeType=_1099;
}
}.bind(this));
this.factor=(this.options.scaleTo-this.options.scaleFrom)/100;
this.dims=null;
if(this.options.scaleMode=="box"){
this.dims=[this.element.offsetHeight,this.element.offsetWidth];
}
if(/^content/.test(this.options.scaleMode)){
this.dims=[this.element.scrollHeight,this.element.scrollWidth];
}
if(!this.dims){
this.dims=[this.options.scaleMode.originalHeight,this.options.scaleMode.originalWidth];
}
},update:function(_109a){
var _109b=(this.options.scaleFrom/100)+(this.factor*_109a);
if(this.options.scaleContent&&this.fontSize){
this.element.setStyle({fontSize:this.fontSize*_109b+this.fontSizeType});
}
this.setDimensions(this.dims[0]*_109b,this.dims[1]*_109b);
},finish:function(_109c){
if(this.restoreAfterFinish){
this.element.setStyle(this.originalStyle);
}
},setDimensions:function(_109d,width){
var d={};
if(this.options.scaleX){
d.width=Math.round(width)+"px";
}
if(this.options.scaleY){
d.height=Math.round(_109d)+"px";
}
if(this.options.scaleFromCenter){
var topd=(_109d-this.dims[0])/2;
var leftd=(width-this.dims[1])/2;
if(this.elementPositioning=="absolute"){
if(this.options.scaleY){
d.top=this.originalTop-topd+"px";
}
if(this.options.scaleX){
d.left=this.originalLeft-leftd+"px";
}
}else{
if(this.options.scaleY){
d.top=-topd+"px";
}
if(this.options.scaleX){
d.left=-leftd+"px";
}
}
}
this.element.setStyle(d);
}});
Effect.Highlight=Class.create();
Object.extend(Object.extend(Effect.Highlight.prototype,Effect.Base.prototype),{initialize:function(_10a2){
this.element=$(_10a2);
if(!this.element){
throw (Effect._elementDoesNotExistError);
}
var _10a3=Object.extend({startcolor:"#ffff99"},arguments[1]||{});
this.start(_10a3);
},setup:function(){
if(this.element.getStyle("display")=="none"){
this.cancel();
return;
}
this.oldStyle={};
if(!this.options.keepBackgroundImage){
this.oldStyle.backgroundImage=this.element.getStyle("background-image");
this.element.setStyle({backgroundImage:"none"});
}
if(!this.options.endcolor){
this.options.endcolor=this.element.getStyle("background-color").parseColor("#ffffff");
}
if(!this.options.restorecolor){
this.options.restorecolor=this.element.getStyle("background-color");
}
this._base=$R(0,2).map(function(i){
return parseInt(this.options.startcolor.slice(i*2+1,i*2+3),16);
}.bind(this));
this._delta=$R(0,2).map(function(i){
return parseInt(this.options.endcolor.slice(i*2+1,i*2+3),16)-this._base[i];
}.bind(this));
},update:function(_10a6){
this.element.setStyle({backgroundColor:$R(0,2).inject("#",function(m,v,i){
return m+(Math.round(this._base[i]+(this._delta[i]*_10a6)).toColorPart());
}.bind(this))});
},finish:function(){
this.element.setStyle(Object.extend(this.oldStyle,{backgroundColor:this.options.restorecolor}));
}});
Effect.ScrollTo=Class.create();
Object.extend(Object.extend(Effect.ScrollTo.prototype,Effect.Base.prototype),{initialize:function(_10aa){
this.element=$(_10aa);
this.start(arguments[1]||{});
},setup:function(){
Position.prepare();
var _10ab=Position.cumulativeOffset(this.element);
if(this.options.offset){
_10ab[1]+=this.options.offset;
}
var max=window.innerHeight?window.height-window.innerHeight:document.body.scrollHeight-(document.documentElement.clientHeight?document.documentElement.clientHeight:document.body.clientHeight);
this.scrollStart=Position.deltaY;
this.delta=(_10ab[1]>max?max:_10ab[1])-this.scrollStart;
},update:function(_10ad){
Position.prepare();
window.scrollTo(Position.deltaX,this.scrollStart+(_10ad*this.delta));
}});
Effect.Fade=function(_10ae){
_10ae=$(_10ae);
var _10af=_10ae.getInlineOpacity();
var _10b0=Object.extend({from:_10ae.getOpacity()||1,to:0,afterFinishInternal:function(_10b1){
if(_10b1.options.to!=0){
return;
}
_10b1.element.hide().setStyle({opacity:_10af});
}},arguments[1]||{});
return new Effect.Opacity(_10ae,_10b0);
};
Effect.Appear=function(_10b2){
_10b2=$(_10b2);
var _10b3=Object.extend({from:(_10b2.getStyle("display")=="none"?0:_10b2.getOpacity()||0),to:1,afterFinishInternal:function(_10b4){
_10b4.element.forceRerendering();
},beforeSetup:function(_10b5){
_10b5.element.setOpacity(_10b5.options.from).show();
}},arguments[1]||{});
return new Effect.Opacity(_10b2,_10b3);
};
Effect.Puff=function(_10b6){
_10b6=$(_10b6);
var _10b7={opacity:_10b6.getInlineOpacity(),position:_10b6.getStyle("position"),top:_10b6.style.top,left:_10b6.style.left,width:_10b6.style.width,height:_10b6.style.height};
return new Effect.Parallel([new Effect.Scale(_10b6,200,{sync:true,scaleFromCenter:true,scaleContent:true,restoreAfterFinish:true}),new Effect.Opacity(_10b6,{sync:true,to:0})],Object.extend({duration:1,beforeSetupInternal:function(_10b8){
Position.absolutize(_10b8.effects[0].element);
},afterFinishInternal:function(_10b9){
_10b9.effects[0].element.hide().setStyle(_10b7);
}},arguments[1]||{}));
};
Effect.BlindUp=function(_10ba){
_10ba=$(_10ba);
_10ba.makeClipping();
return new Effect.Scale(_10ba,0,Object.extend({scaleContent:false,scaleX:false,restoreAfterFinish:true,afterFinishInternal:function(_10bb){
_10bb.element.hide().undoClipping();
}},arguments[1]||{}));
};
Effect.BlindDown=function(_10bc){
_10bc=$(_10bc);
var _10bd=_10bc.getDimensions();
return new Effect.Scale(_10bc,100,Object.extend({scaleContent:false,scaleX:false,scaleFrom:0,scaleMode:{originalHeight:_10bd.height,originalWidth:_10bd.width},restoreAfterFinish:true,afterSetup:function(_10be){
_10be.element.makeClipping().setStyle({height:"0px"}).show();
},afterFinishInternal:function(_10bf){
_10bf.element.undoClipping();
}},arguments[1]||{}));
};
Effect.SwitchOff=function(_10c0){
_10c0=$(_10c0);
var _10c1=_10c0.getInlineOpacity();
return new Effect.Appear(_10c0,Object.extend({duration:0.4,from:0,transition:Effect.Transitions.flicker,afterFinishInternal:function(_10c2){
new Effect.Scale(_10c2.element,1,{duration:0.3,scaleFromCenter:true,scaleX:false,scaleContent:false,restoreAfterFinish:true,beforeSetup:function(_10c3){
_10c3.element.makePositioned().makeClipping();
},afterFinishInternal:function(_10c4){
_10c4.element.hide().undoClipping().undoPositioned().setStyle({opacity:_10c1});
}});
}},arguments[1]||{}));
};
Effect.DropOut=function(_10c5){
_10c5=$(_10c5);
var _10c6={top:_10c5.getStyle("top"),left:_10c5.getStyle("left"),opacity:_10c5.getInlineOpacity()};
return new Effect.Parallel([new Effect.Move(_10c5,{x:0,y:100,sync:true}),new Effect.Opacity(_10c5,{sync:true,to:0})],Object.extend({duration:0.5,beforeSetup:function(_10c7){
_10c7.effects[0].element.makePositioned();
},afterFinishInternal:function(_10c8){
_10c8.effects[0].element.hide().undoPositioned().setStyle(_10c6);
}},arguments[1]||{}));
};
Effect.Shake=function(_10c9){
_10c9=$(_10c9);
var _10ca={top:_10c9.getStyle("top"),left:_10c9.getStyle("left")};
return new Effect.Move(_10c9,{x:20,y:0,duration:0.05,afterFinishInternal:function(_10cb){
new Effect.Move(_10cb.element,{x:-40,y:0,duration:0.1,afterFinishInternal:function(_10cc){
new Effect.Move(_10cc.element,{x:40,y:0,duration:0.1,afterFinishInternal:function(_10cd){
new Effect.Move(_10cd.element,{x:-40,y:0,duration:0.1,afterFinishInternal:function(_10ce){
new Effect.Move(_10ce.element,{x:40,y:0,duration:0.1,afterFinishInternal:function(_10cf){
new Effect.Move(_10cf.element,{x:-20,y:0,duration:0.05,afterFinishInternal:function(_10d0){
_10d0.element.undoPositioned().setStyle(_10ca);
}});
}});
}});
}});
}});
}});
};
Effect.SlideDown=function(_10d1){
_10d1=$(_10d1).cleanWhitespace();
var _10d2=_10d1.down().getStyle("bottom");
var _10d3=_10d1.getDimensions();
return new Effect.Scale(_10d1,100,Object.extend({scaleContent:false,scaleX:false,scaleFrom:window.opera?0:1,scaleMode:{originalHeight:_10d3.height,originalWidth:_10d3.width},restoreAfterFinish:true,afterSetup:function(_10d4){
_10d4.element.makePositioned();
_10d4.element.down().makePositioned();
if(window.opera){
_10d4.element.setStyle({top:""});
}
_10d4.element.makeClipping().setStyle({height:"0px"}).show();
},afterUpdateInternal:function(_10d5){
_10d5.element.down().setStyle({bottom:(_10d5.dims[0]-_10d5.element.clientHeight)+"px"});
},afterFinishInternal:function(_10d6){
_10d6.element.undoClipping().undoPositioned();
_10d6.element.down().undoPositioned().setStyle({bottom:_10d2});
}},arguments[1]||{}));
};
Effect.SlideUp=function(_10d7){
_10d7=$(_10d7).cleanWhitespace();
var _10d8=_10d7.down().getStyle("bottom");
return new Effect.Scale(_10d7,window.opera?0:1,Object.extend({scaleContent:false,scaleX:false,scaleMode:"box",scaleFrom:100,restoreAfterFinish:true,beforeStartInternal:function(_10d9){
_10d9.element.makePositioned();
_10d9.element.down().makePositioned();
if(window.opera){
_10d9.element.setStyle({top:""});
}
_10d9.element.makeClipping().show();
},afterUpdateInternal:function(_10da){
_10da.element.down().setStyle({bottom:(_10da.dims[0]-_10da.element.clientHeight)+"px"});
},afterFinishInternal:function(_10db){
_10db.element.hide().undoClipping().undoPositioned().setStyle({bottom:_10d8});
_10db.element.down().undoPositioned();
}},arguments[1]||{}));
};
Effect.Squish=function(_10dc){
return new Effect.Scale(_10dc,window.opera?1:0,{restoreAfterFinish:true,beforeSetup:function(_10dd){
_10dd.element.makeClipping();
},afterFinishInternal:function(_10de){
_10de.element.hide().undoClipping();
}});
};
Effect.Grow=function(_10df){
_10df=$(_10df);
var _10e0=Object.extend({direction:"center",moveTransition:Effect.Transitions.sinoidal,scaleTransition:Effect.Transitions.sinoidal,opacityTransition:Effect.Transitions.full},arguments[1]||{});
var _10e1={top:_10df.style.top,left:_10df.style.left,height:_10df.style.height,width:_10df.style.width,opacity:_10df.getInlineOpacity()};
var dims=_10df.getDimensions();
var _10e3,_10e4;
var moveX,moveY;
switch(_10e0.direction){
case "top-left":
_10e3=_10e4=moveX=moveY=0;
break;
case "top-right":
_10e3=dims.width;
_10e4=moveY=0;
moveX=-dims.width;
break;
case "bottom-left":
_10e3=moveX=0;
_10e4=dims.height;
moveY=-dims.height;
break;
case "bottom-right":
_10e3=dims.width;
_10e4=dims.height;
moveX=-dims.width;
moveY=-dims.height;
break;
case "center":
_10e3=dims.width/2;
_10e4=dims.height/2;
moveX=-dims.width/2;
moveY=-dims.height/2;
break;
}
return new Effect.Move(_10df,{x:_10e3,y:_10e4,duration:0.01,beforeSetup:function(_10e7){
_10e7.element.hide().makeClipping().makePositioned();
},afterFinishInternal:function(_10e8){
new Effect.Parallel([new Effect.Opacity(_10e8.element,{sync:true,to:1,from:0,transition:_10e0.opacityTransition}),new Effect.Move(_10e8.element,{x:moveX,y:moveY,sync:true,transition:_10e0.moveTransition}),new Effect.Scale(_10e8.element,100,{scaleMode:{originalHeight:dims.height,originalWidth:dims.width},sync:true,scaleFrom:window.opera?1:0,transition:_10e0.scaleTransition,restoreAfterFinish:true})],Object.extend({beforeSetup:function(_10e9){
_10e9.effects[0].element.setStyle({height:"0px"}).show();
},afterFinishInternal:function(_10ea){
_10ea.effects[0].element.undoClipping().undoPositioned().setStyle(_10e1);
}},_10e0));
}});
};
Effect.Shrink=function(_10eb){
_10eb=$(_10eb);
var _10ec=Object.extend({direction:"center",moveTransition:Effect.Transitions.sinoidal,scaleTransition:Effect.Transitions.sinoidal,opacityTransition:Effect.Transitions.none},arguments[1]||{});
var _10ed={top:_10eb.style.top,left:_10eb.style.left,height:_10eb.style.height,width:_10eb.style.width,opacity:_10eb.getInlineOpacity()};
var dims=_10eb.getDimensions();
var moveX,moveY;
switch(_10ec.direction){
case "top-left":
moveX=moveY=0;
break;
case "top-right":
moveX=dims.width;
moveY=0;
break;
case "bottom-left":
moveX=0;
moveY=dims.height;
break;
case "bottom-right":
moveX=dims.width;
moveY=dims.height;
break;
case "center":
moveX=dims.width/2;
moveY=dims.height/2;
break;
}
return new Effect.Parallel([new Effect.Opacity(_10eb,{sync:true,to:0,from:1,transition:_10ec.opacityTransition}),new Effect.Scale(_10eb,window.opera?1:0,{sync:true,transition:_10ec.scaleTransition,restoreAfterFinish:true}),new Effect.Move(_10eb,{x:moveX,y:moveY,sync:true,transition:_10ec.moveTransition})],Object.extend({beforeStartInternal:function(_10f1){
_10f1.effects[0].element.makePositioned().makeClipping();
},afterFinishInternal:function(_10f2){
_10f2.effects[0].element.hide().undoClipping().undoPositioned().setStyle(_10ed);
}},_10ec));
};
Effect.Pulsate=function(_10f3){
_10f3=$(_10f3);
var _10f4=arguments[1]||{};
var _10f5=_10f3.getInlineOpacity();
var _10f6=_10f4.transition||Effect.Transitions.sinoidal;
var _10f7=function(pos){
return _10f6(1-Effect.Transitions.pulse(pos,_10f4.pulses));
};
_10f7.bind(_10f6);
return new Effect.Opacity(_10f3,Object.extend(Object.extend({duration:2,from:0,afterFinishInternal:function(_10f9){
_10f9.element.setStyle({opacity:_10f5});
}},_10f4),{transition:_10f7}));
};
Effect.Fold=function(_10fa){
_10fa=$(_10fa);
var _10fb={top:_10fa.style.top,left:_10fa.style.left,width:_10fa.style.width,height:_10fa.style.height};
_10fa.makeClipping();
return new Effect.Scale(_10fa,5,Object.extend({scaleContent:false,scaleX:false,afterFinishInternal:function(_10fc){
new Effect.Scale(_10fa,1,{scaleContent:false,scaleY:false,afterFinishInternal:function(_10fd){
_10fd.element.hide().undoClipping().setStyle(_10fb);
}});
}},arguments[1]||{}));
};
Effect.Morph=Class.create();
Object.extend(Object.extend(Effect.Morph.prototype,Effect.Base.prototype),{initialize:function(_10fe){
this.element=$(_10fe);
if(!this.element){
throw (Effect._elementDoesNotExistError);
}
var _10ff=Object.extend({style:{}},arguments[1]||{});
if(typeof _10ff.style=="string"){
if(_10ff.style.indexOf(":")==-1){
var _1100="",_1101="."+_10ff.style;
$A(document.styleSheets).reverse().each(function(_1102){
if(_1102.cssRules){
cssRules=_1102.cssRules;
}else{
if(_1102.rules){
cssRules=_1102.rules;
}
}
$A(cssRules).reverse().each(function(rule){
if(_1101==rule.selectorText){
_1100=rule.style.cssText;
throw $break;
}
});
if(_1100){
throw $break;
}
});
this.style=_1100.parseStyle();
_10ff.afterFinishInternal=function(_1104){
_1104.element.addClassName(_1104.options.style);
_1104.transforms.each(function(_1105){
if(_1105.style!="opacity"){
_1104.element.style[_1105.style]="";
}
});
};
}else{
this.style=_10ff.style.parseStyle();
}
}else{
this.style=$H(_10ff.style);
}
this.start(_10ff);
},setup:function(){
function parseColor(color){
if(!color||["rgba(0, 0, 0, 0)","transparent"].include(color)){
color="#ffffff";
}
color=color.parseColor();
return $R(0,2).map(function(i){
return parseInt(color.slice(i*2+1,i*2+3),16);
});
}
this.transforms=this.style.map(function(pair){
var _1109=pair[0],value=pair[1],unit=null;
if(value.parseColor("#zzzzzz")!="#zzzzzz"){
value=value.parseColor();
unit="color";
}else{
if(_1109=="opacity"){
value=parseFloat(value);
if(Prototype.Browser.IE&&(!this.element.currentStyle.hasLayout)){
this.element.setStyle({zoom:1});
}
}else{
if(Element.CSS_LENGTH.test(value)){
var _110c=value.match(/^([\+\-]?[0-9\.]+)(.*)$/);
value=parseFloat(_110c[1]);
unit=(_110c.length==3)?_110c[2]:null;
}
}
}
var _110d=this.element.getStyle(_1109);
return {style:_1109.camelize(),originalValue:unit=="color"?parseColor(_110d):parseFloat(_110d||0),targetValue:unit=="color"?parseColor(value):value,unit:unit};
}.bind(this)).reject(function(_110e){
return ((_110e.originalValue==_110e.targetValue)||(_110e.unit!="color"&&(isNaN(_110e.originalValue)||isNaN(_110e.targetValue))));
});
},update:function(_110f){
var style={},_1111,i=this.transforms.length;
while(i--){
style[(_1111=this.transforms[i]).style]=_1111.unit=="color"?"#"+(Math.round(_1111.originalValue[0]+(_1111.targetValue[0]-_1111.originalValue[0])*_110f)).toColorPart()+(Math.round(_1111.originalValue[1]+(_1111.targetValue[1]-_1111.originalValue[1])*_110f)).toColorPart()+(Math.round(_1111.originalValue[2]+(_1111.targetValue[2]-_1111.originalValue[2])*_110f)).toColorPart():_1111.originalValue+Math.round(((_1111.targetValue-_1111.originalValue)*_110f)*1000)/1000+_1111.unit;
}
this.element.setStyle(style,true);
}});
Effect.Transform=Class.create();
Object.extend(Effect.Transform.prototype,{initialize:function(_1113){
this.tracks=[];
this.options=arguments[1]||{};
this.addTracks(_1113);
},addTracks:function(_1114){
_1114.each(function(track){
var data=$H(track).values().first();
this.tracks.push($H({ids:$H(track).keys().first(),effect:Effect.Morph,options:{style:data}}));
}.bind(this));
return this;
},play:function(){
return new Effect.Parallel(this.tracks.map(function(track){
var _1118=[$(track.ids)||$$(track.ids)].flatten();
return _1118.map(function(e){
return new track.effect(e,Object.extend({sync:true},track.options));
});
}).flatten(),this.options);
}});
Element.CSS_PROPERTIES=$w("backgroundColor backgroundPosition borderBottomColor borderBottomStyle "+"borderBottomWidth borderLeftColor borderLeftStyle borderLeftWidth "+"borderRightColor borderRightStyle borderRightWidth borderSpacing "+"borderTopColor borderTopStyle borderTopWidth bottom clip color "+"fontSize fontWeight height left letterSpacing lineHeight "+"marginBottom marginLeft marginRight marginTop markerOffset maxHeight "+"maxWidth minHeight minWidth opacity outlineColor outlineOffset "+"outlineWidth paddingBottom paddingLeft paddingRight paddingTop "+"right textIndent top width wordSpacing zIndex");
Element.CSS_LENGTH=/^(([\+\-]?[0-9\.]+)(em|ex|px|in|cm|mm|pt|pc|\%))|0$/;
String.prototype.parseStyle=function(){
var _111a=document.createElement("div");
_111a.innerHTML="<div style=\""+this+"\"></div>";
var style=_111a.childNodes[0].style,_111c=$H();
Element.CSS_PROPERTIES.each(function(_111d){
if(style[_111d]){
_111c[_111d]=style[_111d];
}
});
if(Prototype.Browser.IE&&this.indexOf("opacity")>-1){
_111c.opacity=this.match(/opacity:\s*((?:0|1)?(?:\.\d*)?)/)[1];
}
return _111c;
};
Element.morph=function(_111e,style){
new Effect.Morph(_111e,Object.extend({style:style},arguments[2]||{}));
return _111e;
};
["getInlineOpacity","forceRerendering","setContentZoom","collectTextNodes","collectTextNodesIgnoreClass","morph"].each(function(f){
Element.Methods[f]=Element[f];
});
Element.Methods.visualEffect=function(_1121,_1122,_1123){
s=_1122.dasherize().camelize();
effect_class=s.charAt(0).toUpperCase()+s.substring(1);
new Effect[effect_class](_1121,_1123);
return $(_1121);
};
Element.addMethods();
dojo.provide("dojo.windows_js.window");
var Window=Class.create();
Window.keepMultiModalWindow=false;
Window.hasEffectLib=(typeof Effect!="undefined");
Window.resizeEffectDuration=0.4;
Window.prototype={initialize:function(){
var id;
var _1125=0;
if(arguments.length>0){
if(typeof arguments[0]=="string"){
id=arguments[0];
_1125=1;
}else{
id=arguments[0]?arguments[0].id:null;
}
}
if(!id){
id="window_"+new Date().getTime();
}
if($(id)){
alert("Window "+id+" is already registered in the DOM! Make sure you use setDestroyOnClose() or destroyOnClose: true in the constructor");
}
this.options=Object.extend({className:"dialog",blurClassName:null,minWidth:100,minHeight:20,resizable:true,closable:true,minimizable:true,maximizable:true,draggable:true,userData:null,showEffect:(Window.hasEffectLib?Effect.Appear:Element.show),hideEffect:(Window.hasEffectLib?Effect.Fade:Element.hide),showEffectOptions:{},hideEffectOptions:{},effectOptions:null,parent:document.body,title:"&nbsp;",url:null,onload:Prototype.emptyFunction,width:200,height:300,opacity:1,recenterAuto:true,wiredDrag:false,closeCallback:null,destroyOnClose:false,gridX:1,gridY:1},arguments[_1125]||{});
if(this.options.blurClassName){
this.options.focusClassName=this.options.className;
}
if(typeof this.options.top=="undefined"&&typeof this.options.bottom=="undefined"){
this.options.top=this._round(Math.random()*500,this.options.gridY);
}
if(typeof this.options.left=="undefined"&&typeof this.options.right=="undefined"){
this.options.left=this._round(Math.random()*500,this.options.gridX);
}
if(this.options.effectOptions){
Object.extend(this.options.hideEffectOptions,this.options.effectOptions);
Object.extend(this.options.showEffectOptions,this.options.effectOptions);
if(this.options.showEffect==Element.Appear){
this.options.showEffectOptions.to=this.options.opacity;
}
}
if(Window.hasEffectLib){
if(this.options.showEffect==Effect.Appear){
this.options.showEffectOptions.to=this.options.opacity;
}
if(this.options.hideEffect==Effect.Fade){
this.options.hideEffectOptions.from=this.options.opacity;
}
}
if(this.options.hideEffect==Element.hide){
this.options.hideEffect=function(){
Element.hide(this.element);
if(this.options.destroyOnClose){
this.destroy();
}
}.bind(this);
}
if(this.options.parent!=document.body){
this.options.parent=$(this.options.parent);
}
this.element=this._createWindow(id);
this.element.win=this;
this.eventMouseDown=this._initDrag.bindAsEventListener(this);
this.eventMouseUp=this._endDrag.bindAsEventListener(this);
this.eventMouseMove=this._updateDrag.bindAsEventListener(this);
this.eventOnLoad=this._getWindowBorderSize.bindAsEventListener(this);
this.eventMouseDownContent=this.toFront.bindAsEventListener(this);
this.eventResize=this._recenter.bindAsEventListener(this);
this.topbar=$(this.element.id+"_top");
this.bottombar=$(this.element.id+"_bottom");
this.content=$(this.element.id+"_content");
Event.observe(this.topbar,"mousedown",this.eventMouseDown);
Event.observe(this.bottombar,"mousedown",this.eventMouseDown);
Event.observe(this.content,"mousedown",this.eventMouseDownContent);
Event.observe(window,"load",this.eventOnLoad);
Event.observe(window,"resize",this.eventResize);
Event.observe(window,"scroll",this.eventResize);
Event.observe(this.options.parent,"scroll",this.eventResize);
if(this.options.draggable){
var that=this;
[this.topbar,this.topbar.up().previous(),this.topbar.up().next()].each(function(_1127){
_1127.observe("mousedown",that.eventMouseDown);
_1127.addClassName("top_draggable");
});
[this.bottombar.up(),this.bottombar.up().previous(),this.bottombar.up().next()].each(function(_1128){
_1128.observe("mousedown",that.eventMouseDown);
_1128.addClassName("bottom_draggable");
});
}
if(this.options.resizable){
this.sizer=$(this.element.id+"_sizer");
Event.observe(this.sizer,"mousedown",this.eventMouseDown);
}
this.useLeft=null;
this.useTop=null;
if(typeof this.options.left!="undefined"){
this.element.setStyle({left:parseFloat(this.options.left)+"px"});
this.useLeft=true;
}else{
this.element.setStyle({right:parseFloat(this.options.right)+"px"});
this.useLeft=false;
}
if(typeof this.options.top!="undefined"){
this.element.setStyle({top:parseFloat(this.options.top)+"px"});
this.useTop=true;
}else{
this.element.setStyle({bottom:parseFloat(this.options.bottom)+"px"});
this.useTop=false;
}
this.storedLocation=null;
this.setOpacity(this.options.opacity);
if(this.options.zIndex){
this.setZIndex(this.options.zIndex);
}
if(this.options.destroyOnClose){
this.setDestroyOnClose(true);
}
this._getWindowBorderSize();
this.width=this.options.width;
this.height=this.options.height;
this.visible=false;
this.constraint=false;
this.constraintPad={top:0,left:0,bottom:0,right:0};
if(this.width&&this.height){
this.setSize(this.options.width,this.options.height);
}
this.setTitle(this.options.title);
Windows.register(this);
},destroy:function(){
this._notify("onDestroy");
Event.stopObserving(this.topbar,"mousedown",this.eventMouseDown);
Event.stopObserving(this.bottombar,"mousedown",this.eventMouseDown);
Event.stopObserving(this.content,"mousedown",this.eventMouseDownContent);
Event.stopObserving(window,"load",this.eventOnLoad);
Event.stopObserving(window,"resize",this.eventResize);
Event.stopObserving(window,"scroll",this.eventResize);
Event.stopObserving(this.content,"load",this.options.onload);
if(this._oldParent){
var _1129=this.getContent();
var _112a=null;
for(var i=0;i<_1129.childNodes.length;i++){
_112a=_1129.childNodes[i];
if(_112a.nodeType==1){
break;
}
_112a=null;
}
if(_112a){
this._oldParent.appendChild(_112a);
}
this._oldParent=null;
}
if(this.sizer){
Event.stopObserving(this.sizer,"mousedown",this.eventMouseDown);
}
if(this.options.url){
this.content.src=null;
}
if(this.iefix){
Element.remove(this.iefix);
}
Element.remove(this.element);
Windows.unregister(this);
},setCloseCallback:function(_112c){
this.options.closeCallback=_112c;
},getContent:function(){
return this.content;
},setContent:function(id,_112e,_112f){
var _1130=$(id);
if(null==_1130){
throw "Unable to find element '"+id+"' in DOM";
}
this._oldParent=_1130.parentNode;
var d=null;
var p=null;
if(_112e){
d=Element.getDimensions(_1130);
}
if(_112f){
p=Position.cumulativeOffset(_1130);
}
var _1133=this.getContent();
this.setHTMLContent("");
_1133=this.getContent();
_1133.appendChild(_1130);
_1130.show();
if(_112e){
this.setSize(d.width,d.height);
}
if(_112f){
this.setLocation(p[1]-this.heightN,p[0]-this.widthW);
}
},setHTMLContent:function(html){
if(this.options.url){
this.content.src=null;
this.options.url=null;
var _1135="<div id=\""+this.getId()+"_content\" class=\""+this.options.className+"_content\"> </div>";
$(this.getId()+"_table_content").innerHTML=_1135;
this.content=$(this.element.id+"_content");
}
this.getContent().innerHTML=html;
},setAjaxContent:function(url,_1137,_1138,_1139){
this.showFunction=_1138?"showCenter":"show";
this.showModal=_1139||false;
_1137=_1137||{};
this.setHTMLContent("");
this.onComplete=_1137.onComplete;
if(!this._onCompleteHandler){
this._onCompleteHandler=this._setAjaxContent.bind(this);
}
_1137.onComplete=this._onCompleteHandler;
new Ajax.Request(url,_1137);
_1137.onComplete=this.onComplete;
},_setAjaxContent:function(_113a){
Element.update(this.getContent(),_113a.responseText);
if(this.onComplete){
this.onComplete(_113a);
}
this.onComplete=null;
this[this.showFunction](this.showModal);
},setURL:function(url){
if(this.options.url){
this.content.src=null;
}
this.options.url=url;
var _113c="<iframe frameborder='0' name='"+this.getId()+"_content'  id='"+this.getId()+"_content' src='"+url+"' width='"+this.width+"' height='"+this.height+"'> </iframe>";
$(this.getId()+"_table_content").innerHTML=_113c;
this.content=$(this.element.id+"_content");
},getURL:function(){
return this.options.url?this.options.url:null;
},refresh:function(){
if(this.options.url){
$(this.element.getAttribute("id")+"_content").src=this.options.url;
}
},setCookie:function(name,_113e,path,_1140,_1141){
name=name||this.element.id;
this.cookie=[name,_113e,path,_1140,_1141];
var value=WindowUtilities.getCookie(name);
if(value){
var _1143=value.split(",");
var x=_1143[0].split(":");
var y=_1143[1].split(":");
var w=parseFloat(_1143[2]),h=parseFloat(_1143[3]);
var mini=_1143[4];
var maxi=_1143[5];
this.setSize(w,h);
if(mini=="true"){
this.doMinimize=true;
}else{
if(maxi=="true"){
this.doMaximize=true;
}
}
this.useLeft=x[0]=="l";
this.useTop=y[0]=="t";
this.element.setStyle(this.useLeft?{left:x[1]}:{right:x[1]});
this.element.setStyle(this.useTop?{top:y[1]}:{bottom:y[1]});
}
},getId:function(){
return this.element.id;
},setDestroyOnClose:function(){
this.options.destroyOnClose=true;
},setConstraint:function(bool,_114b){
this.constraint=bool;
this.constraintPad=Object.extend(this.constraintPad,_114b||{});
if(this.useTop&&this.useLeft){
this.setLocation(parseFloat(this.element.style.top),parseFloat(this.element.style.left));
}
},_initDrag:function(event){
if(Event.element(event)==this.sizer&&this.isMinimized()){
return;
}
if(Event.element(event)!=this.sizer&&this.isMaximized()){
return;
}
if(Prototype.Browser.IE&&this.heightN==0){
this._getWindowBorderSize();
}
this.pointer=[this._round(Event.pointerX(event),this.options.gridX),this._round(Event.pointerY(event),this.options.gridY)];
if(this.options.wiredDrag){
this.currentDrag=this._createWiredElement();
}else{
this.currentDrag=this.element;
}
if(Event.element(event)==this.sizer){
this.doResize=true;
this.widthOrg=this.width;
this.heightOrg=this.height;
this.bottomOrg=parseFloat(this.element.getStyle("bottom"));
this.rightOrg=parseFloat(this.element.getStyle("right"));
this._notify("onStartResize");
}else{
this.doResize=false;
var _114d=$(this.getId()+"_close");
if(_114d&&Position.within(_114d,this.pointer[0],this.pointer[1])){
this.currentDrag=null;
return;
}
this.toFront();
if(!this.options.draggable){
return;
}
this._notify("onStartMove");
}
Event.observe(document,"mouseup",this.eventMouseUp,false);
Event.observe(document,"mousemove",this.eventMouseMove,false);
WindowUtilities.disableScreen("__invisible__","__invisible__",this.overlayOpacity);
document.body.ondrag=function(){
return false;
};
document.body.onselectstart=function(){
return false;
};
this.currentDrag.show();
Event.stop(event);
},_round:function(val,round){
return round==1?val:val=Math.floor(val/round)*round;
},_updateDrag:function(event){
var _1151=[this._round(Event.pointerX(event),this.options.gridX),this._round(Event.pointerY(event),this.options.gridY)];
var dx=_1151[0]-this.pointer[0];
var dy=_1151[1]-this.pointer[1];
if(this.doResize){
var w=this.widthOrg+dx;
var h=this.heightOrg+dy;
dx=this.width-this.widthOrg;
dy=this.height-this.heightOrg;
if(this.useLeft){
w=this._updateWidthConstraint(w);
}else{
this.currentDrag.setStyle({right:(this.rightOrg-dx)+"px"});
}
if(this.useTop){
h=this._updateHeightConstraint(h);
}else{
this.currentDrag.setStyle({bottom:(this.bottomOrg-dy)+"px"});
}
this.setSize(w,h);
this._notify("onResize");
}else{
this.pointer=_1151;
if(this.useLeft){
var left=parseFloat(this.currentDrag.getStyle("left"))+dx;
var _1157=this._updateLeftConstraint(left);
this.pointer[0]+=_1157-left;
this.currentDrag.setStyle({left:_1157+"px"});
}else{
this.currentDrag.setStyle({right:parseFloat(this.currentDrag.getStyle("right"))-dx+"px"});
}
if(this.useTop){
var top=parseFloat(this.currentDrag.getStyle("top"))+dy;
var _1159=this._updateTopConstraint(top);
this.pointer[1]+=_1159-top;
this.currentDrag.setStyle({top:_1159+"px"});
}else{
this.currentDrag.setStyle({bottom:parseFloat(this.currentDrag.getStyle("bottom"))-dy+"px"});
}
this._notify("onMove");
}
if(this.iefix){
this._fixIEOverlapping();
}
this._removeStoreLocation();
Event.stop(event);
},_endDrag:function(event){
WindowUtilities.enableScreen("__invisible__");
if(this.doResize){
this._notify("onEndResize");
}else{
this._notify("onEndMove");
}
Event.stopObserving(document,"mouseup",this.eventMouseUp,false);
Event.stopObserving(document,"mousemove",this.eventMouseMove,false);
Event.stop(event);
this._hideWiredElement();
this._saveCookie();
document.body.ondrag=null;
document.body.onselectstart=null;
},_updateLeftConstraint:function(left){
if(this.constraint&&this.useLeft&&this.useTop){
var width=this.options.parent==document.body?WindowUtilities.getPageSize().windowWidth:this.options.parent.getDimensions().width;
if(left<this.constraintPad.left){
left=this.constraintPad.left;
}
if(left+this.width+this.widthE+this.widthW>width-this.constraintPad.right){
left=width-this.constraintPad.right-this.width-this.widthE-this.widthW;
}
}
return left;
},_updateTopConstraint:function(top){
if(this.constraint&&this.useLeft&&this.useTop){
var _115e=this.options.parent==document.body?WindowUtilities.getPageSize().windowHeight:this.options.parent.getDimensions().height;
var h=this.height+this.heightN+this.heightS;
if(top<this.constraintPad.top){
top=this.constraintPad.top;
}
if(top+h>_115e-this.constraintPad.bottom){
top=_115e-this.constraintPad.bottom-h;
}
}
return top;
},_updateWidthConstraint:function(w){
if(this.constraint&&this.useLeft&&this.useTop){
var width=this.options.parent==document.body?WindowUtilities.getPageSize().windowWidth:this.options.parent.getDimensions().width;
var left=parseFloat(this.element.getStyle("left"));
if(left+w+this.widthE+this.widthW>width-this.constraintPad.right){
w=width-this.constraintPad.right-left-this.widthE-this.widthW;
}
}
return w;
},_updateHeightConstraint:function(h){
if(this.constraint&&this.useLeft&&this.useTop){
var _1164=this.options.parent==document.body?WindowUtilities.getPageSize().windowHeight:this.options.parent.getDimensions().height;
var top=parseFloat(this.element.getStyle("top"));
if(top+h+this.heightN+this.heightS>_1164-this.constraintPad.bottom){
h=_1164-this.constraintPad.bottom-top-this.heightN-this.heightS;
}
}
return h;
},_createWindow:function(id){
var _1167=this.options.className;
var win=document.createElement("div");
win.setAttribute("id",id);
win.className="dialog";
var _1169;
if(this.options.url){
_1169="<iframe frameborder=\"0\" name=\""+id+"_content\"  id=\""+id+"_content\" src=\""+this.options.url+"\"> </iframe>";
}else{
_1169="<div id=\""+id+"_content\" class=\""+_1167+"_content\"> </div>";
}
var _116a=this.options.closable?"<div class='"+_1167+"_close' id='"+id+"_close' onclick='Windows.close(\""+id+"\", event)'> </div>":"";
var _116b=this.options.minimizable?"<div class='"+_1167+"_minimize' id='"+id+"_minimize' onclick='Windows.minimize(\""+id+"\", event)'> </div>":"";
var _116c=this.options.maximizable?"<div class='"+_1167+"_maximize' id='"+id+"_maximize' onclick='Windows.maximize(\""+id+"\", event)'> </div>":"";
var _116d=this.options.resizable?"class='"+_1167+"_sizer' id='"+id+"_sizer'":"class='"+_1167+"_se'";
var blank="../themes/default/blank.gif";
win.innerHTML=_116a+_116b+_116c+"      <table id='"+id+"_row1' class=\"top table_window\">        <tr>          <td class='"+_1167+"_nw'></td>          <td class='"+_1167+"_n'><div id='"+id+"_top' class='"+_1167+"_title title_window'>"+this.options.title+"</div></td>          <td class='"+_1167+"_ne'></td>        </tr>      </table>      <table id='"+id+"_row2' class=\"mid table_window\">        <tr>          <td class='"+_1167+"_w'></td>            <td id='"+id+"_table_content' class='"+_1167+"_content' valign='top'>"+_1169+"</td>          <td class='"+_1167+"_e'></td>        </tr>      </table>        <table id='"+id+"_row3' class=\"bot table_window\">        <tr>          <td class='"+_1167+"_sw'></td>            <td class='"+_1167+"_s'><div id='"+id+"_bottom' class='status_bar'><span style='float:left; width:1px; height:1px'></span></div></td>            <td "+_116d+"></td>        </tr>      </table>    ";
Element.hide(win);
this.options.parent.insertBefore(win,this.options.parent.firstChild);
Event.observe($(id+"_content"),"load",this.options.onload);
return win;
},changeClassName:function(_116f){
var _1170=this.options.className;
var id=this.getId();
$A(["_close","_minimize","_maximize","_sizer","_content"]).each(function(value){
this._toggleClassName($(id+value),_1170+value,_116f+value);
}.bind(this));
this._toggleClassName($(id+"_top"),_1170+"_title",_116f+"_title");
$$("#"+id+" td").each(function(td){
td.className=td.className.sub(_1170,_116f);
});
this.options.className=_116f;
},_toggleClassName:function(_1174,_1175,_1176){
if(_1174){
_1174.removeClassName(_1175);
_1174.addClassName(_1176);
}
},setLocation:function(top,left){
top=this._updateTopConstraint(top);
left=this._updateLeftConstraint(left);
var e=this.currentDrag||this.element;
e.setStyle({top:top+"px"});
e.setStyle({left:left+"px"});
this.useLeft=true;
this.useTop=true;
},getLocation:function(){
var _117a={};
if(this.useTop){
_117a=Object.extend(_117a,{top:this.element.getStyle("top")});
}else{
_117a=Object.extend(_117a,{bottom:this.element.getStyle("bottom")});
}
if(this.useLeft){
_117a=Object.extend(_117a,{left:this.element.getStyle("left")});
}else{
_117a=Object.extend(_117a,{right:this.element.getStyle("right")});
}
return _117a;
},getSize:function(){
return {width:this.width,height:this.height};
},setSize:function(width,_117c,_117d){
width=parseFloat(width);
_117c=parseFloat(_117c);
if(!this.minimized&&width<this.options.minWidth){
width=this.options.minWidth;
}
if(!this.minimized&&_117c<this.options.minHeight){
_117c=this.options.minHeight;
}
if(this.options.maxHeight&&_117c>this.options.maxHeight){
_117c=this.options.maxHeight;
}
if(this.options.maxWidth&&width>this.options.maxWidth){
width=this.options.maxWidth;
}
if(this.useTop&&this.useLeft&&Window.hasEffectLib&&Effect.ResizeWindow&&_117d){
new Effect.ResizeWindow(this,null,null,width,_117c,{duration:Window.resizeEffectDuration});
}else{
this.width=width;
this.height=_117c;
var e=this.currentDrag?this.currentDrag:this.element;
e.setStyle({width:width+this.widthW+this.widthE+"px"});
e.setStyle({height:_117c+this.heightN+this.heightS+"px"});
if(!this.currentDrag||this.currentDrag==this.element){
var _117f=$(this.element.id+"_content");
_117f.setStyle({height:_117c+"px"});
_117f.setStyle({width:width+"px"});
}
}
},updateHeight:function(){
this.setSize(this.width,this.content.scrollHeight,true);
},updateWidth:function(){
this.setSize(this.content.scrollWidth,this.height,true);
},toFront:function(){
if(this.element.style.zIndex<Windows.maxZIndex){
this.setZIndex(Windows.maxZIndex+1);
}
if(this.iefix){
this._fixIEOverlapping();
}
},getBounds:function(_1180){
if(!this.width||!this.height||!this.visible){
this.computeBounds();
}
var w=this.width;
var h=this.height;
if(!_1180){
w+=this.widthW+this.widthE;
h+=this.heightN+this.heightS;
}
var _1183=Object.extend(this.getLocation(),{width:w+"px",height:h+"px"});
return _1183;
},computeBounds:function(){
if(!this.width||!this.height){
var size=WindowUtilities._computeSize(this.content.innerHTML,this.content.id,this.width,this.height,0,this.options.className);
if(this.height){
this.width=size+5;
}else{
this.height=size+5;
}
}
this.setSize(this.width,this.height);
if(this.centered){
this._center(this.centerTop,this.centerLeft);
}
},show:function(modal){
this.visible=true;
if(modal){
if(typeof this.overlayOpacity=="undefined"){
var that=this;
setTimeout(function(){
that.show(modal);
},10);
return;
}
Windows.addModalWindow(this);
this.modal=true;
this.setZIndex(Windows.maxZIndex+1);
Windows.unsetOverflow(this);
}else{
if(!this.element.style.zIndex){
this.setZIndex(Windows.maxZIndex+1);
}
}
if(this.oldStyle){
this.getContent().setStyle({overflow:this.oldStyle});
}
this.computeBounds();
this._notify("onBeforeShow");
if(this.options.showEffect!=Element.show&&this.options.showEffectOptions){
this.options.showEffect(this.element,this.options.showEffectOptions);
}else{
this.options.showEffect(this.element);
}
this._checkIEOverlapping();
WindowUtilities.focusedWindow=this;
this._notify("onShow");
},showCenter:function(modal,top,left){
this.centered=true;
this.centerTop=top;
this.centerLeft=left;
this.show(modal);
},isVisible:function(){
return this.visible;
},_center:function(top,left){
var _118c=WindowUtilities.getWindowScroll(this.options.parent);
var _118d=WindowUtilities.getPageSize(this.options.parent);
if(typeof top=="undefined"){
top=(_118d.windowHeight-(this.height+this.heightN+this.heightS))/2;
}
top+=_118c.top;
if(typeof left=="undefined"){
left=(_118d.windowWidth-(this.width+this.widthW+this.widthE))/2;
}
left+=_118c.left;
this.setLocation(top,left);
this.toFront();
},_recenter:function(event){
if(this.centered){
var _118f=WindowUtilities.getPageSize(this.options.parent);
var _1190=WindowUtilities.getWindowScroll(this.options.parent);
if(this.pageSize&&this.pageSize.windowWidth==_118f.windowWidth&&this.pageSize.windowHeight==_118f.windowHeight&&this.windowScroll.left==_1190.left&&this.windowScroll.top==_1190.top){
return;
}
this.pageSize=_118f;
this.windowScroll=_1190;
if($("overlay_modal")){
$("overlay_modal").setStyle({height:(_118f.pageHeight+"px")});
}
if(this.options.recenterAuto){
this._center(this.centerTop,this.centerLeft);
}
}
},hide:function(){
this.visible=false;
if(this.modal){
Windows.removeModalWindow(this);
Windows.resetOverflow();
}
this.oldStyle=this.getContent().getStyle("overflow")||"auto";
this.getContent().setStyle({overflow:"hidden"});
this.options.hideEffect(this.element,this.options.hideEffectOptions);
if(this.iefix){
this.iefix.hide();
}
if(!this.doNotNotifyHide){
this._notify("onHide");
}
},close:function(){
if(this.visible){
if(this.options.closeCallback&&!this.options.closeCallback(this)){
return;
}
if(this.options.destroyOnClose){
var _1191=this.destroy.bind(this);
if(this.options.hideEffectOptions.afterFinish){
var func=this.options.hideEffectOptions.afterFinish;
this.options.hideEffectOptions.afterFinish=function(){
func();
_1191();
};
}else{
this.options.hideEffectOptions.afterFinish=function(){
_1191();
};
}
}
Windows.updateFocusedWindow();
this.doNotNotifyHide=true;
this.hide();
this.doNotNotifyHide=false;
this._notify("onClose");
}
},minimize:function(){
if(this.resizing){
return;
}
var r2=$(this.getId()+"_row2");
if(!this.minimized){
this.minimized=true;
var dh=r2.getDimensions().height;
this.r2Height=dh;
var h=this.element.getHeight()-dh;
if(this.useLeft&&this.useTop&&Window.hasEffectLib&&Effect.ResizeWindow){
new Effect.ResizeWindow(this,null,null,null,this.height-dh,{duration:Window.resizeEffectDuration});
}else{
this.height-=dh;
this.element.setStyle({height:h+"px"});
r2.hide();
}
if(!this.useTop){
var _1196=parseFloat(this.element.getStyle("bottom"));
this.element.setStyle({bottom:(_1196+dh)+"px"});
}
}else{
this.minimized=false;
var dh=this.r2Height;
this.r2Height=null;
if(this.useLeft&&this.useTop&&Window.hasEffectLib&&Effect.ResizeWindow){
new Effect.ResizeWindow(this,null,null,null,this.height+dh,{duration:Window.resizeEffectDuration});
}else{
var h=this.element.getHeight()+dh;
this.height+=dh;
this.element.setStyle({height:h+"px"});
r2.show();
}
if(!this.useTop){
var _1196=parseFloat(this.element.getStyle("bottom"));
this.element.setStyle({bottom:(_1196-dh)+"px"});
}
this.toFront();
}
this._notify("onMinimize");
this._saveCookie();
},maximize:function(){
if(this.isMinimized()||this.resizing){
return;
}
if(Prototype.Browser.IE&&this.heightN==0){
this._getWindowBorderSize();
}
if(this.storedLocation!=null){
this._restoreLocation();
if(this.iefix){
this.iefix.hide();
}
}else{
this._storeLocation();
Windows.unsetOverflow(this);
var _1197=WindowUtilities.getWindowScroll(this.options.parent);
var _1198=WindowUtilities.getPageSize(this.options.parent);
var left=_1197.left;
var top=_1197.top;
if(this.options.parent!=document.body){
_1197={top:0,left:0,bottom:0,right:0};
var dim=this.options.parent.getDimensions();
_1198.windowWidth=dim.width;
_1198.windowHeight=dim.height;
top=0;
left=0;
}
if(this.constraint){
_1198.windowWidth-=Math.max(0,this.constraintPad.left)+Math.max(0,this.constraintPad.right);
_1198.windowHeight-=Math.max(0,this.constraintPad.top)+Math.max(0,this.constraintPad.bottom);
left+=Math.max(0,this.constraintPad.left);
top+=Math.max(0,this.constraintPad.top);
}
var width=_1198.windowWidth-this.widthW-this.widthE;
var _119d=_1198.windowHeight-this.heightN-this.heightS;
if(this.useLeft&&this.useTop&&Window.hasEffectLib&&Effect.ResizeWindow){
new Effect.ResizeWindow(this,top,left,width,_119d,{duration:Window.resizeEffectDuration});
}else{
this.setSize(width,_119d);
this.element.setStyle(this.useLeft?{left:left}:{right:left});
this.element.setStyle(this.useTop?{top:top}:{bottom:top});
}
this.toFront();
if(this.iefix){
this._fixIEOverlapping();
}
}
this._notify("onMaximize");
this._saveCookie();
},isMinimized:function(){
return this.minimized;
},isMaximized:function(){
return (this.storedLocation!=null);
},setOpacity:function(_119e){
if(Element.setOpacity){
Element.setOpacity(this.element,_119e);
}
},setZIndex:function(_119f){
this.element.setStyle({zIndex:_119f});
Windows.updateZindex(_119f,this);
},setTitle:function(_11a0){
if(!_11a0||_11a0==""){
_11a0="&nbsp;";
}
Element.update(this.element.id+"_top",_11a0);
},getTitle:function(){
return $(this.element.id+"_top").innerHTML;
},setStatusBar:function(_11a1){
var _11a2=$(this.getId()+"_bottom");
if(typeof (_11a1)=="object"){
if(this.bottombar.firstChild){
this.bottombar.replaceChild(_11a1,this.bottombar.firstChild);
}else{
this.bottombar.appendChild(_11a1);
}
}else{
this.bottombar.innerHTML=_11a1;
}
},_checkIEOverlapping:function(){
if(!this.iefix&&(navigator.appVersion.indexOf("MSIE")>0)&&(navigator.userAgent.indexOf("Opera")<0)&&(this.element.getStyle("position")=="absolute")){
new Insertion.After(this.element.id,"<iframe id=\""+this.element.id+"_iefix\" "+"style=\"display:none;position:absolute;filter:progid:DXImageTransform.Microsoft.Alpha(opacity=0);\" "+"src=\"javascript:false;\" frameborder=\"0\" scrolling=\"no\"></iframe>");
this.iefix=$(this.element.id+"_iefix");
}
if(this.iefix){
setTimeout(this._fixIEOverlapping.bind(this),50);
}
},_fixIEOverlapping:function(){
Position.clone(this.element,this.iefix);
this.iefix.style.zIndex=this.element.style.zIndex-1;
this.iefix.show();
},_getWindowBorderSize:function(event){
var div=this._createHiddenDiv(this.options.className+"_n");
this.heightN=Element.getDimensions(div).height;
div.parentNode.removeChild(div);
var div=this._createHiddenDiv(this.options.className+"_s");
this.heightS=Element.getDimensions(div).height;
div.parentNode.removeChild(div);
var div=this._createHiddenDiv(this.options.className+"_e");
this.widthE=Element.getDimensions(div).width;
div.parentNode.removeChild(div);
var div=this._createHiddenDiv(this.options.className+"_w");
this.widthW=Element.getDimensions(div).width;
div.parentNode.removeChild(div);
var div=document.createElement("div");
div.className="overlay_"+this.options.className;
document.body.appendChild(div);
var that=this;
setTimeout(function(){
that.overlayOpacity=($(div).getStyle("opacity"));
div.parentNode.removeChild(div);
},10);
if(Prototype.Browser.IE){
this.heightS=$(this.getId()+"_row3").getDimensions().height;
this.heightN=$(this.getId()+"_row1").getDimensions().height;
}
if(Prototype.Browser.WebKit&&Prototype.Browser.WebKitVersion<420){
this.setSize(this.width,this.height);
}
if(this.doMaximize){
this.maximize();
}
if(this.doMinimize){
this.minimize();
}
},_createHiddenDiv:function(_11a6){
var _11a7=document.body;
var win=document.createElement("div");
win.setAttribute("id",this.element.id+"_tmp");
win.className=_11a6;
win.style.display="none";
win.innerHTML="";
_11a7.insertBefore(win,_11a7.firstChild);
return win;
},_storeLocation:function(){
if(this.storedLocation==null){
this.storedLocation={useTop:this.useTop,useLeft:this.useLeft,top:this.element.getStyle("top"),bottom:this.element.getStyle("bottom"),left:this.element.getStyle("left"),right:this.element.getStyle("right"),width:this.width,height:this.height};
}
},_restoreLocation:function(){
if(this.storedLocation!=null){
this.useLeft=this.storedLocation.useLeft;
this.useTop=this.storedLocation.useTop;
if(this.useLeft&&this.useTop&&Window.hasEffectLib&&Effect.ResizeWindow){
new Effect.ResizeWindow(this,this.storedLocation.top,this.storedLocation.left,this.storedLocation.width,this.storedLocation.height,{duration:Window.resizeEffectDuration});
}else{
this.element.setStyle(this.useLeft?{left:this.storedLocation.left}:{right:this.storedLocation.right});
this.element.setStyle(this.useTop?{top:this.storedLocation.top}:{bottom:this.storedLocation.bottom});
this.setSize(this.storedLocation.width,this.storedLocation.height);
}
Windows.resetOverflow();
this._removeStoreLocation();
}
},_removeStoreLocation:function(){
this.storedLocation=null;
},_saveCookie:function(){
if(this.cookie){
var value="";
if(this.useLeft){
value+="l:"+(this.storedLocation?this.storedLocation.left:this.element.getStyle("left"));
}else{
value+="r:"+(this.storedLocation?this.storedLocation.right:this.element.getStyle("right"));
}
if(this.useTop){
value+=",t:"+(this.storedLocation?this.storedLocation.top:this.element.getStyle("top"));
}else{
value+=",b:"+(this.storedLocation?this.storedLocation.bottom:this.element.getStyle("bottom"));
}
value+=","+(this.storedLocation?this.storedLocation.width:this.width);
value+=","+(this.storedLocation?this.storedLocation.height:this.height);
value+=","+this.isMinimized();
value+=","+this.isMaximized();
WindowUtilities.setCookie(value,this.cookie);
}
},_createWiredElement:function(){
if(!this.wiredElement){
if(Prototype.Browser.IE){
this._getWindowBorderSize();
}
var div=document.createElement("div");
div.className="wired_frame "+this.options.className+"_wired_frame";
div.style.position="absolute";
this.options.parent.insertBefore(div,this.options.parent.firstChild);
this.wiredElement=$(div);
}
if(this.useLeft){
this.wiredElement.setStyle({left:this.element.getStyle("left")});
}else{
this.wiredElement.setStyle({right:this.element.getStyle("right")});
}
if(this.useTop){
this.wiredElement.setStyle({top:this.element.getStyle("top")});
}else{
this.wiredElement.setStyle({bottom:this.element.getStyle("bottom")});
}
var dim=this.element.getDimensions();
this.wiredElement.setStyle({width:dim.width+"px",height:dim.height+"px"});
this.wiredElement.setStyle({zIndex:Windows.maxZIndex+30});
return this.wiredElement;
},_hideWiredElement:function(){
if(!this.wiredElement||!this.currentDrag){
return;
}
if(this.currentDrag==this.element){
this.currentDrag=null;
}else{
if(this.useLeft){
this.element.setStyle({left:this.currentDrag.getStyle("left")});
}else{
this.element.setStyle({right:this.currentDrag.getStyle("right")});
}
if(this.useTop){
this.element.setStyle({top:this.currentDrag.getStyle("top")});
}else{
this.element.setStyle({bottom:this.currentDrag.getStyle("bottom")});
}
this.currentDrag.hide();
this.currentDrag=null;
if(this.doResize){
this.setSize(this.width,this.height);
}
}
},_notify:function(_11ac){
if(this.options[_11ac]){
this.options[_11ac](this);
}else{
Windows.notify(_11ac,this);
}
}};
var Windows={windows:[],modalWindows:[],observers:[],focusedWindow:null,maxZIndex:0,overlayShowEffectOptions:{duration:0.5},overlayHideEffectOptions:{duration:0.5},addObserver:function(_11ad){
this.removeObserver(_11ad);
this.observers.push(_11ad);
},removeObserver:function(_11ae){
this.observers=this.observers.reject(function(o){
return o==_11ae;
});
},notify:function(_11b0,win){
this.observers.each(function(o){
if(o[_11b0]){
o[_11b0](_11b0,win);
}
});
},getWindow:function(id){
return this.windows.detect(function(d){
return d.getId()==id;
});
},getFocusedWindow:function(){
return this.focusedWindow;
},updateFocusedWindow:function(){
this.focusedWindow=this.windows.length>=2?this.windows[this.windows.length-2]:null;
},register:function(win){
this.windows.push(win);
},addModalWindow:function(win){
if(this.modalWindows.length==0){
WindowUtilities.disableScreen(win.options.className,"overlay_modal",win.overlayOpacity,win.getId(),win.options.parent);
}else{
if(Window.keepMultiModalWindow){
$("overlay_modal").style.zIndex=Windows.maxZIndex+1;
Windows.maxZIndex+=1;
WindowUtilities._hideSelect(this.modalWindows.last().getId());
}else{
this.modalWindows.last().element.hide();
}
WindowUtilities._showSelect(win.getId());
}
this.modalWindows.push(win);
},removeModalWindow:function(win){
this.modalWindows.pop();
if(this.modalWindows.length==0){
WindowUtilities.enableScreen();
}else{
if(Window.keepMultiModalWindow){
this.modalWindows.last().toFront();
WindowUtilities._showSelect(this.modalWindows.last().getId());
}else{
this.modalWindows.last().element.show();
}
}
},register:function(win){
this.windows.push(win);
},unregister:function(win){
this.windows=this.windows.reject(function(d){
return d==win;
});
},closeAll:function(){
this.windows.each(function(w){
Windows.close(w.getId());
});
},closeAllModalWindows:function(){
WindowUtilities.enableScreen();
this.modalWindows.each(function(win){
if(win){
win.close();
}
});
},minimize:function(id,event){
var win=this.getWindow(id);
if(win&&win.visible){
win.minimize();
}
Event.stop(event);
},maximize:function(id,event){
var win=this.getWindow(id);
if(win&&win.visible){
win.maximize();
}
Event.stop(event);
},close:function(id,event){
var win=this.getWindow(id);
if(win){
win.close();
}
if(event){
Event.stop(event);
}
},blur:function(id){
var win=this.getWindow(id);
if(!win){
return;
}
if(win.options.blurClassName){
win.changeClassName(win.options.blurClassName);
}
if(this.focusedWindow==win){
this.focusedWindow=null;
}
win._notify("onBlur");
},focus:function(id){
var win=this.getWindow(id);
if(!win){
return;
}
if(this.focusedWindow){
this.blur(this.focusedWindow.getId());
}
if(win.options.focusClassName){
win.changeClassName(win.options.focusClassName);
}
this.focusedWindow=win;
win._notify("onFocus");
},unsetOverflow:function(_11ca){
this.windows.each(function(d){
d.oldOverflow=d.getContent().getStyle("overflow")||"auto";
d.getContent().setStyle({overflow:"hidden"});
});
if(_11ca&&_11ca.oldOverflow){
_11ca.getContent().setStyle({overflow:_11ca.oldOverflow});
}
},resetOverflow:function(){
this.windows.each(function(d){
if(d.oldOverflow){
d.getContent().setStyle({overflow:d.oldOverflow});
}
});
},updateZindex:function(_11cd,win){
if(_11cd>this.maxZIndex){
this.maxZIndex=_11cd;
if(this.focusedWindow){
this.blur(this.focusedWindow.getId());
}
}
this.focusedWindow=win;
if(this.focusedWindow){
this.focus(this.focusedWindow.getId());
}
}};
var Dialog={dialogId:null,onCompleteFunc:null,callFunc:null,parameters:null,confirm:function(_11cf,_11d0){
if(_11cf&&typeof _11cf!="string"){
Dialog._runAjaxRequest(_11cf,_11d0,Dialog.confirm);
return;
}
_11cf=_11cf||"";
_11d0=_11d0||{};
var _11d1=_11d0.okLabel?_11d0.okLabel:"Ok";
var _11d2=_11d0.cancelLabel?_11d0.cancelLabel:"Cancel";
_11d0=Object.extend(_11d0,_11d0.windowParameters||{});
_11d0.windowParameters=_11d0.windowParameters||{};
_11d0.className=_11d0.className||"alert";
var _11d3="class ='"+(_11d0.buttonClass?_11d0.buttonClass+" ":"")+" ok_button'";
var _11d4="class ='"+(_11d0.buttonClass?_11d0.buttonClass+" ":"")+" cancel_button'";
var _11cf="      <div class='"+_11d0.className+"_message'>"+_11cf+"</div>        <div class='"+_11d0.className+"_buttons'>          <input type='button' value='"+_11d1+"' onclick='Dialog.okCallback()' "+_11d3+"/>          <input type='button' value='"+_11d2+"' onclick='Dialog.cancelCallback()' "+_11d4+"/>        </div>    ";
return this._openDialog(_11cf,_11d0);
},alert:function(_11d5,_11d6){
if(_11d5&&typeof _11d5!="string"){
Dialog._runAjaxRequest(_11d5,_11d6,Dialog.alert);
return;
}
_11d5=_11d5||"";
_11d6=_11d6||{};
var _11d7=_11d6.okLabel?_11d6.okLabel:"Ok";
_11d6=Object.extend(_11d6,_11d6.windowParameters||{});
_11d6.windowParameters=_11d6.windowParameters||{};
_11d6.className=_11d6.className||"alert";
var _11d8="class ='"+(_11d6.buttonClass?_11d6.buttonClass+" ":"")+" ok_button'";
var _11d5="      <div class='"+_11d6.className+"_message'>"+_11d5+"</div>        <div class='"+_11d6.className+"_buttons'>          <input type='button' value='"+_11d7+"' onclick='Dialog.okCallback()' "+_11d8+"/>        </div>";
return this._openDialog(_11d5,_11d6);
},info:function(_11d9,_11da){
if(_11d9&&typeof _11d9!="string"){
Dialog._runAjaxRequest(_11d9,_11da,Dialog.info);
return;
}
_11d9=_11d9||"";
_11da=_11da||{};
_11da=Object.extend(_11da,_11da.windowParameters||{});
_11da.windowParameters=_11da.windowParameters||{};
_11da.className=_11da.className||"alert";
var _11d9="<div id='modal_dialog_message' class='"+_11da.className+"_message'>"+_11d9+"</div>";
if(_11da.showProgress){
_11d9+="<div id='modal_dialog_progress' class='"+_11da.className+"_progress'>  </div>";
}
_11da.ok=null;
_11da.cancel=null;
return this._openDialog(_11d9,_11da);
},setInfoMessage:function(_11db){
$("modal_dialog_message").update(_11db);
},closeInfo:function(){
Windows.close(this.dialogId);
},_openDialog:function(_11dc,_11dd){
var _11de=_11dd.className;
if(!_11dd.height&&!_11dd.width){
_11dd.width=WindowUtilities.getPageSize(_11dd.options.parent||document.body).pageWidth/2;
}
if(_11dd.id){
this.dialogId=_11dd.id;
}else{
var t=new Date();
this.dialogId="modal_dialog_"+t.getTime();
_11dd.id=this.dialogId;
}
if(!_11dd.height||!_11dd.width){
var size=WindowUtilities._computeSize(_11dc,this.dialogId,_11dd.width,_11dd.height,5,_11de);
if(_11dd.height){
_11dd.width=size+5;
}else{
_11dd.height=size+5;
}
}
_11dd.effectOptions=_11dd.effectOptions;
_11dd.resizable=_11dd.resizable||false;
_11dd.minimizable=_11dd.minimizable||false;
_11dd.maximizable=_11dd.maximizable||false;
_11dd.draggable=_11dd.draggable||false;
_11dd.closable=_11dd.closable||false;
var win=new Window(_11dd);
win.getContent().innerHTML=_11dc;
win.showCenter(true,_11dd.top,_11dd.left);
win.setDestroyOnClose();
win.cancelCallback=_11dd.onCancel||_11dd.cancel;
win.okCallback=_11dd.onOk||_11dd.ok;
return win;
},_getAjaxContent:function(_11e2){
Dialog.callFunc(_11e2.responseText,Dialog.parameters);
},_runAjaxRequest:function(_11e3,_11e4,_11e5){
if(_11e3.options==null){
_11e3.options={};
}
Dialog.onCompleteFunc=_11e3.options.onComplete;
Dialog.parameters=_11e4;
Dialog.callFunc=_11e5;
_11e3.options.onComplete=Dialog._getAjaxContent;
new Ajax.Request(_11e3.url,_11e3.options);
},okCallback:function(){
var win=Windows.focusedWindow;
if(!win.okCallback||win.okCallback(win)){
$$("#"+win.getId()+" input").each(function(_11e7){
_11e7.onclick=null;
});
win.close();
}
},cancelCallback:function(){
var win=Windows.focusedWindow;
$$("#"+win.getId()+" input").each(function(_11e9){
_11e9.onclick=null;
});
win.close();
if(win.cancelCallback){
win.cancelCallback(win);
}
}};
if(Prototype.Browser.WebKit){
var array=navigator.userAgent.match(new RegExp(/AppleWebKit\/([\d\.\+]*)/));
Prototype.Browser.WebKitVersion=parseFloat(array[1]);
}
var WindowUtilities={getWindowScroll:function(_11ea){
var T,L,W,H;
_11ea=_11ea||document.body;
if(_11ea!=document.body){
T=_11ea.scrollTop;
L=_11ea.scrollLeft;
W=_11ea.scrollWidth;
H=_11ea.scrollHeight;
}else{
var w=window;
with(w.document){
if(w.document.documentElement&&documentElement.scrollTop){
T=documentElement.scrollTop;
L=documentElement.scrollLeft;
}else{
if(w.document.body){
T=body.scrollTop;
L=body.scrollLeft;
}
}
if(w.innerWidth){
W=w.innerWidth;
H=w.innerHeight;
}else{
if(w.document.documentElement&&documentElement.clientWidth){
W=documentElement.clientWidth;
H=documentElement.clientHeight;
}else{
W=body.offsetWidth;
H=body.offsetHeight;
}
}
}
}
return {top:T,left:L,width:W,height:H};
},getPageSize:function(_11f0){
_11f0=_11f0||document.body;
var _11f1,_11f2;
var _11f3,_11f4;
if(_11f0!=document.body){
_11f1=_11f0.getWidth();
_11f2=_11f0.getHeight();
_11f4=_11f0.scrollWidth;
_11f3=_11f0.scrollHeight;
}else{
var _11f5,_11f6;
if(window.innerHeight&&window.scrollMaxY){
_11f5=document.body.scrollWidth;
_11f6=window.innerHeight+window.scrollMaxY;
}else{
if(document.body.scrollHeight>document.body.offsetHeight){
_11f5=document.body.scrollWidth;
_11f6=document.body.scrollHeight;
}else{
_11f5=document.body.offsetWidth;
_11f6=document.body.offsetHeight;
}
}
if(self.innerHeight){
_11f1=self.innerWidth;
_11f2=self.innerHeight;
}else{
if(document.documentElement&&document.documentElement.clientHeight){
_11f1=document.documentElement.clientWidth;
_11f2=document.documentElement.clientHeight;
}else{
if(document.body){
_11f1=document.body.clientWidth;
_11f2=document.body.clientHeight;
}
}
}
if(_11f6<_11f2){
_11f3=_11f2;
}else{
_11f3=_11f6;
}
if(_11f5<_11f1){
_11f4=_11f1;
}else{
_11f4=_11f5;
}
}
return {pageWidth:_11f4,pageHeight:_11f3,windowWidth:_11f1,windowHeight:_11f2};
},disableScreen:function(_11f7,_11f8,_11f9,_11fa,_11fb){
WindowUtilities.initLightbox(_11f8,_11f7,function(){
this._disableScreen(_11f7,_11f8,_11f9,_11fa);
}.bind(this),_11fb||document.body);
},_disableScreen:function(_11fc,_11fd,_11fe,_11ff){
var _1200=$(_11fd);
var _1201=WindowUtilities.getPageSize(_1200.parentNode);
if(_11ff&&Prototype.Browser.IE){
WindowUtilities._hideSelect();
WindowUtilities._showSelect(_11ff);
}
_1200.style.height=(_1201.pageHeight+"px");
_1200.style.display="none";
if(_11fd=="overlay_modal"&&Window.hasEffectLib&&Windows.overlayShowEffectOptions){
_1200.overlayOpacity=_11fe;
new Effect.Appear(_1200,Object.extend({from:0,to:_11fe},Windows.overlayShowEffectOptions));
}else{
_1200.style.display="block";
}
},enableScreen:function(id){
id=id||"overlay_modal";
var _1203=$(id);
if(_1203){
if(id=="overlay_modal"&&Window.hasEffectLib&&Windows.overlayHideEffectOptions){
new Effect.Fade(_1203,Object.extend({from:_1203.overlayOpacity,to:0},Windows.overlayHideEffectOptions));
}else{
_1203.style.display="none";
_1203.parentNode.removeChild(_1203);
}
if(id!="__invisible__"){
WindowUtilities._showSelect();
}
}
},_hideSelect:function(id){
if(Prototype.Browser.IE){
id=id==null?"":"#"+id+" ";
$$(id+"select").each(function(_1205){
if(!WindowUtilities.isDefined(_1205.oldVisibility)){
_1205.oldVisibility=_1205.style.visibility?_1205.style.visibility:"visible";
_1205.style.visibility="hidden";
}
});
}
},_showSelect:function(id){
if(Prototype.Browser.IE){
id=id==null?"":"#"+id+" ";
$$(id+"select").each(function(_1207){
if(WindowUtilities.isDefined(_1207.oldVisibility)){
try{
_1207.style.visibility=_1207.oldVisibility;
}
catch(e){
_1207.style.visibility="visible";
}
_1207.oldVisibility=null;
}else{
if(_1207.style.visibility){
_1207.style.visibility="visible";
}
}
});
}
},isDefined:function(_1208){
return typeof (_1208)!="undefined"&&_1208!=null;
},initLightbox:function(id,_120a,_120b,_120c){
if($(id)){
Element.setStyle(id,{zIndex:Windows.maxZIndex+1});
Windows.maxZIndex++;
_120b();
}else{
var _120d=document.createElement("div");
_120d.setAttribute("id",id);
_120d.className="overlay_"+_120a;
_120d.style.display="none";
_120d.style.position="absolute";
_120d.style.top="0";
_120d.style.left="0";
_120d.style.zIndex=Windows.maxZIndex+1;
Windows.maxZIndex++;
_120d.style.width="100%";
_120c.insertBefore(_120d,_120c.firstChild);
if(Prototype.Browser.WebKit&&id=="overlay_modal"){
setTimeout(function(){
_120b();
},10);
}else{
_120b();
}
}
},setCookie:function(value,_120f){
document.cookie=_120f[0]+"="+escape(value)+((_120f[1])?"; expires="+_120f[1].toGMTString():"")+((_120f[2])?"; path="+_120f[2]:"")+((_120f[3])?"; domain="+_120f[3]:"")+((_120f[4])?"; secure":"");
},getCookie:function(name){
var dc=document.cookie;
var _1212=name+"=";
var begin=dc.indexOf("; "+_1212);
if(begin==-1){
begin=dc.indexOf(_1212);
if(begin!=0){
return null;
}
}else{
begin+=2;
}
var end=document.cookie.indexOf(";",begin);
if(end==-1){
end=dc.length;
}
return unescape(dc.substring(begin+_1212.length,end));
},_computeSize:function(_1215,id,width,_1218,_1219,_121a){
var _121b=document.body;
var _121c=document.createElement("div");
_121c.setAttribute("id",id);
_121c.className=_121a+"_content";
if(_1218){
_121c.style.height=_1218+"px";
}else{
_121c.style.width=width+"px";
}
_121c.style.position="absolute";
_121c.style.top="0";
_121c.style.left="0";
_121c.style.display="none";
_121c.innerHTML=_1215;
_121b.insertBefore(_121c,_121b.firstChild);
var size;
if(_1218){
size=$(_121c).getDimensions().width+_1219;
}else{
size=$(_121c).getDimensions().height+_1219;
}
_121b.removeChild(_121c);
return size;
}};
dojo.provide("dojo.windows_js.window_effects");
Effect.ResizeWindow=Class.create();
Object.extend(Object.extend(Effect.ResizeWindow.prototype,Effect.Base.prototype),{initialize:function(win,top,left,width,_1222){
this.window=win;
this.window.resizing=true;
var size=win.getSize();
this.initWidth=parseFloat(size.width);
this.initHeight=parseFloat(size.height);
var _1224=win.getLocation();
this.initTop=parseFloat(_1224.top);
this.initLeft=parseFloat(_1224.left);
this.width=width!=null?parseFloat(width):this.initWidth;
this.height=_1222!=null?parseFloat(_1222):this.initHeight;
this.top=top!=null?parseFloat(top):this.initTop;
this.left=left!=null?parseFloat(left):this.initLeft;
this.dx=this.left-this.initLeft;
this.dy=this.top-this.initTop;
this.dw=this.width-this.initWidth;
this.dh=this.height-this.initHeight;
this.r2=$(this.window.getId()+"_row2");
this.content=$(this.window.getId()+"_content");
this.contentOverflow=this.content.getStyle("overflow")||"auto";
this.content.setStyle({overflow:"hidden"});
if(this.window.options.wiredDrag){
this.window.currentDrag=win._createWiredElement();
this.window.currentDrag.show();
this.window.element.hide();
}
this.start(arguments[5]);
},update:function(_1225){
var width=Math.floor(this.initWidth+this.dw*_1225);
var _1227=Math.floor(this.initHeight+this.dh*_1225);
var top=Math.floor(this.initTop+this.dy*_1225);
var left=Math.floor(this.initLeft+this.dx*_1225);
if(window.ie){
if(Math.floor(_1227)==0){
this.r2.hide();
}else{
if(Math.floor(_1227)>1){
this.r2.show();
}
}
}
this.r2.setStyle({height:_1227});
this.window.setSize(width,_1227);
this.window.setLocation(top,left);
},finish:function(_122a){
if(this.window.options.wiredDrag){
this.window._hideWiredElement();
this.window.element.show();
}
this.window.setSize(this.width,this.height);
this.window.setLocation(this.top,this.left);
this.r2.setStyle({height:null});
this.content.setStyle({overflow:this.contentOverflow});
this.window.resizing=false;
}});
Effect.ModalSlideDown=function(_122b){
var _122c=WindowUtilities.getWindowScroll();
var _122d=_122b.getStyle("height");
_122b.setStyle({top:-(parseFloat(_122d)-_122c.top)+"px"});
_122b.show();
return new Effect.Move(_122b,Object.extend({x:0,y:parseFloat(_122d)},arguments[1]||{}));
};
Effect.ModalSlideUp=function(_122e){
var _122f=_122e.getStyle("height");
return new Effect.Move(_122e,Object.extend({x:0,y:-parseFloat(_122f)},arguments[1]||{}));
};
PopupEffect=Class.create();
PopupEffect.prototype={initialize:function(_1230){
this.html=$(_1230);
this.options=Object.extend({className:"popup_effect",duration:0.4},arguments[1]||{});
},show:function(_1231,_1232){
var _1233=Position.cumulativeOffset(this.html);
var size=this.html.getDimensions();
var _1235=_1231.win.getBounds();
this.window=_1231.win;
if(!this.div){
this.div=document.createElement("div");
this.div.className=this.options.className;
this.div.style.height=size.height+"px";
this.div.style.width=size.width+"px";
this.div.style.top=_1233[1]+"px";
this.div.style.left=_1233[0]+"px";
this.div.style.position="absolute";
document.body.appendChild(this.div);
}
if(this.options.fromOpacity){
this.div.setStyle({opacity:this.options.fromOpacity});
}
this.div.show();
var style="top:"+_1235.top+";left:"+_1235.left+";width:"+_1235.width+";height:"+_1235.height;
if(this.options.toOpacity){
style+=";opacity:"+this.options.toOpacity;
}
new Effect.Morph(this.div,{style:style,duration:this.options.duration,afterFinish:this._showWindow.bind(this)});
},hide:function(_1237,_1238){
var _1239=Position.cumulativeOffset(this.html);
var size=this.html.getDimensions();
this.window.visible=true;
var _123b=this.window.getBounds();
this.window.visible=false;
this.window.element.hide();
this.div.style.height=_123b.height;
this.div.style.width=_123b.width;
this.div.style.top=_123b.top;
this.div.style.left=_123b.left;
if(this.options.toOpacity){
this.div.setStyle({opacity:this.options.toOpacity});
}
this.div.show();
var style="top:"+_1239[1]+"px;left:"+_1239[0]+"px;width:"+size.width+"px;height:"+size.height+"px";
if(this.options.fromOpacity){
style+=";opacity:"+this.options.fromOpacity;
}
new Effect.Morph(this.div,{style:style,duration:this.options.duration,afterFinish:this._hideDiv.bind(this)});
},_showWindow:function(){
this.div.hide();
this.window.element.show();
},_hideDiv:function(){
this.div.hide();
}};
var BrowserDetect={init:function(){
this.browser=this.searchString(this.dataBrowser)||"An unknown browser";
this.version=this.searchVersion(navigator.userAgent)||this.searchVersion(navigator.appVersion)||"an unknown version";
this.OS=this.searchString(this.dataOS)||"an unknown OS";
},searchString:function(data){
for(var i=0;i<data.length;i++){
var _123f=data[i].string;
var _1240=data[i].prop;
this.versionSearchString=data[i].versionSearch||data[i].identity;
if(_123f){
if(_123f.indexOf(data[i].subString)!=-1){
return data[i].identity;
}
}else{
if(_1240){
return data[i].identity;
}
}
}
},searchVersion:function(_1241){
var index=_1241.indexOf(this.versionSearchString);
if(index==-1){
return;
}
return parseFloat(_1241.substring(index+this.versionSearchString.length+1));
},dataBrowser:[{string:navigator.userAgent,subString:"OmniWeb",versionSearch:"OmniWeb/",identity:"OmniWeb"},{string:navigator.vendor,subString:"Apple",identity:"Safari"},{prop:window.opera,identity:"Opera"},{string:navigator.vendor,subString:"iCab",identity:"iCab"},{string:navigator.vendor,subString:"KDE",identity:"Konqueror"},{string:navigator.userAgent,subString:"Firefox",identity:"Firefox"},{string:navigator.vendor,subString:"Camino",identity:"Camino"},{string:navigator.userAgent,subString:"Netscape",identity:"Netscape"},{string:navigator.userAgent,subString:"MSIE",identity:"IE",versionSearch:"MSIE"},{string:navigator.userAgent,subString:"Chrome",identity:"Chrome"},{string:navigator.userAgent,subString:"Gecko",identity:"Mozilla",versionSearch:"rv"},{string:navigator.userAgent,subString:"Mozilla",identity:"Netscape",versionSearch:"Mozilla"}],dataOS:[{string:navigator.platform,subString:"Win",identity:"Windows"},{string:navigator.platform,subString:"Mac",identity:"Mac"},{string:navigator.platform,subString:"Linux",identity:"Linux"}]};
BrowserDetect.init();
function getInternetExplorerVersion(){
var rv=-1;
if(navigator.appName=="Microsoft Internet Explorer"){
var ua=navigator.userAgent;
var re=new RegExp("MSIE ([0-9]{1,}[.0-9]{0,})");
if(re.exec(ua)!=null){
rv=parseFloat(RegExp.$1);
}
}
return rv;
}
xml2json={parser:function(_1246,_1247,debug){
_1246=_1246.replace(/<\?[^>]*>/g,"").replace(/<\![^>]*>/g,"");
if(!_1247.sort){
_1247=_1247.split(",");
}
var x=this.no_fast_endings(_1246);
x=this.attris_to_tags(x);
x=escape(x);
x=x.split("%3C").join("<").split("%3E").join(">").split("%3D").join(":").split("%22").join("'");
x=x.split("%0D").join("").split("%0A").join("");
for(var i=0;i<_1247.length;i++){
x=x.replace(new RegExp("<"+_1247[i]+">","g"),"*$**"+_1247[i]+"**$*");
x=x.replace(new RegExp("</"+_1247[i]+">","g"),"*$***"+_1247[i]+"**$*");
}
x="<JSONTAGWRAPPER>"+x+"</JSONTAGWRAPPER>";
this.xmlobject={};
var y=this.xml_to_object(x).jsontagwrapper;
if(debug){
y=this.show_json_structure(y,debug);
}
return y;
},xml_to_object:function(_124c){
var x=_124c.replace(/<\//g,"?");
x=x.split("<");
var y=[];
var level=0;
var _1250=[];
for(var i=1;i<x.length;i++){
var _1252=x[i].split(">")[0];
_1250.push(_1252);
level++;
y.push(level+"<"+x[i].split("?")[0]);
while(x[i].indexOf("?"+_1250[_1250.length-1]+">")>=0){
level--;
_1250.pop();
}
}
var _1253=-1;
var _1254="this.xmlobject";
for(var i=0;i<y.length;i++){
var _1255="";
var niva=y[i].split("<")[0];
var _1257=y[i].split("<")[1].split(">")[0];
_1257=_1257.toLowerCase();
var rest=y[i].split(">")[1];
if(niva<=_1253){
var _1259=_1253-niva+1;
for(var j=0;j<_1259;j++){
_1254=_1254.substring(0,_1254.lastIndexOf("."));
}
}
_1257=_1257.replace(/(%20)*/g,"");
_1254+="."+_1257;
var _125b=_1254.substring(0,_1254.lastIndexOf("."));
if(eval("typeof "+_125b)!="object"){
_1255+=_125b+"={value:"+_125b+"};\n";
}
var _125c=_1254.substring(_1254.lastIndexOf(".")+1);
var _125d=false;
for(k in eval(_125b)){
if(k==_125c){
_125d=true;
}
}
var _125e=true;
for(var s=0;s<rest.length;s+=3){
if(rest.charAt(s)!="%"){
_125e=false;
}
}
if(rest!=""&&!_125e){
if(rest/1!=rest){
rest="'"+rest.replace(/\'/g,"\\'")+"'";
rest=rest.replace(/\*\$\*\*\*/g,"</");
rest=rest.replace(/\*\$\*\*/g,"<");
rest=rest.replace(/\*\*\$\*/g,">");
}
}else{
rest="{}";
}
if(rest.charAt(0)=="'"){
rest="unescape("+rest+")";
}
if(_125d&&!eval(_1254+".sort")){
_1255+=_1254+"=["+_1254+"];\n";
}
var _1260="=";
after="";
if(_125d){
_1260=".push(";
after=")";
}
var _1261=_1255+_1254+_1260+rest+after;
eval(_1261);
if(eval(_1254+".sort")){
_1254+="["+eval(_1254+".length-1")+"]";
}
_1253=niva;
}
return this.xmlobject;
},show_json_structure:function(obj,debug,l){
var x="";
if(obj.sort){
x+="[\n";
}else{
x+="{\n";
}
for(var i in obj){
if(!obj.sort){
x+=i+":";
}
if(typeof obj[i]=="object"){
x+=this.show_json_structure(obj[i],false,1);
}else{
if(typeof obj[i]=="function"){
var v=obj[i]+"";
x+=v;
}else{
if(typeof obj[i]!="string"){
x+=obj[i]+",\n";
}else{
x+="'"+obj[i].replace(/\'/g,"'").replace(/\n/g,"").replace(/\t/g," ").replace(/\r/g,", ")+"',\n";
}
}
}
}
if(obj.sort){
x+="],\n";
}else{
x+="},\n";
}
if(!l){
x=x.substring(0,x.lastIndexOf(","));
x=x.replace(new RegExp(",\n}","g"),"\n}");
x=x.replace(new RegExp(",\n]","g"),"\n]");
var y=x.split("\n");
x="";
var lvl=0;
for(var i=0;i<y.length;i++){
if(y[i].indexOf("}")>=0||y[i].indexOf("]")>=0){
lvl--;
}
tabs="";
for(var j=0;j<lvl;j++){
tabs+="\t";
}
x+=tabs+y[i]+"\n";
if(y[i].indexOf("{")>=0||y[i].indexOf("[")>=0){
lvl++;
}
}
if(debug=="html"){
x=x.replace(/</g,"&lt;").replace(/>/g,"&gt;");
x=x.replace(/\n/g,"<BR>").replace(/\t/g,"&nbsp;&nbsp;&nbsp;&nbsp;");
}
if(debug=="compact"){
x=x.replace(/\n/g,"").replace(/\t/g,"");
}
}
return x;
},no_fast_endings:function(x){
x=x.split("/>");
for(var i=1;i<x.length;i++){
var t=x[i-1].substring(x[i-1].lastIndexOf("<")+1).split(" ")[0];
x[i]="></"+t+">"+x[i];
}
x=x.join("");
return x;
},attris_to_tags:function(x){
var d=" =\"'".split("");
x=x.split(">");
for(var i=0;i<x.length;i++){
x[i]=x[i].replace(/^\s*/,"");
x[i]=x[i].replace(/\s*$/,"");
var temp=x[i].split("<");
for(var r=0;r<4;r++){
temp[0]=temp[0].replace(new RegExp(d[r],"g"),"_jsonconvtemp"+r+"_");
}
if(temp[1]){
temp[1]=temp[1].replace(/'/g,"\"");
temp[1]=temp[1].split("\"");
for(var j=1;j<temp[1].length;j+=2){
for(var r=0;r<4;r++){
temp[1][j]=temp[1][j].replace(new RegExp(d[r],"g"),"_jsonconvtemp"+r+"_");
}
}
temp[1]=temp[1].join("\"");
}
x[i]=temp.join("<");
}
x=x.join(">");
x=x.replace(/ ([^=]*)=([^ |>]*)/g,"><$1>$2</$1");
x=x.replace(/>"/g,">").replace(/"</g,"<");
for(var r=0;r<4;r++){
x=x.replace(new RegExp("_jsonconvtemp"+r+"_","g"),d[r]);
}
return x;
}};
if(!Array.prototype.push){
Array.prototype.push=function(x){
this[this.length]=x;
return true;
};
}
if(!Array.prototype.pop){
Array.prototype.pop=function(){
var _1275=this[this.length-1];
this.length--;
return _1275;
};
}
function json2xml(o,tab){
var toXml=function(v,name,ind){
var xml="";
if(v instanceof Array){
var i=0;
for(i=0,n=v.length-1;i<n;i++){
xml+=toXml(v[i],name,ind)+"\n";
}
i=v.length-1;
if(i>0){
xml+=toXml(v[i],name,ind);
}
}else{
if(typeof (v)=="object"){
var _127e=false;
xml+=ind+"<"+name;
for(var m in v){
if(m.charAt(0)=="@"){
xml+=" "+m.substr(1)+"=\""+v[m].toString()+"\"";
}else{
_127e=true;
}
}
xml+=_127e?">\n":"/>";
if(_127e){
for(var m in v){
if(m=="#text"){
xml+=v[m];
}else{
if(m=="#cdata"){
xml+="<![CDATA["+v[m]+"]]>";
}else{
if(m.charAt(0)!="@"){
xml+=toXml(v[m],m,ind+"\t")+"\n";
}
}
}
}
xml+=(xml.charAt(xml.length-1)=="\n"?ind:"")+"</"+name+">";
}
}else{
xml+=ind+"<"+name+">"+v.toString()+"</"+name+">";
}
}
return xml;
},xml="";
for(var m in o){
xml+=toXml(o[m],m,"");
}
return tab?xml.replace(/\t/g,tab):xml.replace(/\t|\n/g,"");
}
function jsonPath(obj,expr,arg){
var P={resultType:arg&&arg.resultType||"VALUE",result:[],normalize:function(expr){
var subx=[];
return expr.replace(/[\['](\??\(.*?\))[\]']/g,function($0,$1){
return "[#"+(subx.push($1)-1)+"]";
}).replace(/'?\.'?|\['?/g,";").replace(/;;;|;;/g,";..;").replace(/;$|'?\]|'$/g,"").replace(/#([0-9]+)/g,function($0,$1){
return subx[$1];
});
},asPath:function(path){
var x=path.split(";"),p="$";
for(var i=1,n=x.length;i<n;i++){
p+=/^[0-9*]+$/.test(x[i])?("["+x[i]+"]"):("['"+x[i]+"']");
}
return p;
},store:function(p,v){
if(p){
P.result[P.result.length]=P.resultType=="PATH"?P.asPath(p):v;
}
return !!p;
},trace:function(expr,val,path){
if(expr){
var x=expr.split(";"),loc=x.shift();
x=x.join(";");
if(val&&val.hasOwnProperty(loc)){
P.trace(x,val[loc],path+";"+loc);
}else{
if(loc==="*"){
P.walk(loc,x,val,path,function(m,l,x,v,p){
P.trace(m+";"+x,v,p);
});
}else{
if(loc===".."){
P.trace(x,val,path);
P.walk(loc,x,val,path,function(m,l,x,v,p){
typeof v[m]==="object"&&P.trace("..;"+x,v[m],p+";"+m);
});
}else{
if(/,/.test(loc)){
for(var s=loc.split(/'?,'?/),i=0,n=s.length;i<n;i++){
P.trace(s[i]+";"+x,val,path);
}
}else{
if(/^\(.*?\)$/.test(loc)){
P.trace(P.eval(loc,val,path.substr(path.lastIndexOf(";")+1))+";"+x,val,path);
}else{
if(/^\?\(.*?\)$/.test(loc)){
P.walk(loc,x,val,path,function(m,l,x,v,p){
if(P.eval(l.replace(/^\?\((.*?)\)$/,"$1"),v[m],m)){
P.trace(m+";"+x,v,p);
}
});
}else{
if(/^(-?[0-9]*):(-?[0-9]*):?([0-9]*)$/.test(loc)){
P.slice(loc,x,val,path);
}
}
}
}
}
}
}
}else{
P.store(path,val);
}
},walk:function(loc,expr,val,path,f){
if(val instanceof Array){
for(var i=0,n=val.length;i<n;i++){
if(i in val){
f(i,loc,expr,val,path);
}
}
}else{
if(typeof val==="object"){
for(var m in val){
if(val.hasOwnProperty(m)){
f(m,loc,expr,val,path);
}
}
}
}
},slice:function(loc,expr,val,path){
if(val instanceof Array){
var len=val.length,start=0,end=len,step=1;
loc.replace(/^(-?[0-9]*):(-?[0-9]*):?(-?[0-9]*)$/g,function($0,$1,$2,$3){
start=parseInt($1||start);
end=parseInt($2||end);
step=parseInt($3||step);
});
start=(start<0)?Math.max(0,start+len):Math.min(len,start);
end=(end<0)?Math.max(0,end+len):Math.min(len,end);
for(var i=start;i<end;i+=step){
P.trace(i+";"+expr,val,path);
}
}
},eval:function(x,_v,_12c1){
try{
return $&&_v&&eval(x.replace(/@/g,"_v"));
}
catch(e){
throw new SyntaxError("jsonPath: "+e.message+": "+x.replace(/@/g,"_v").replace(/\^/g,"_a"));
}
}};
var $=obj;
if(expr&&obj&&(P.resultType=="VALUE"||P.resultType=="PATH")){
P.trace(P.normalize(expr).replace(/^\$;/,""),obj,"$");
return P.result.length?P.result:false;
}
}
dojo.provide("com.sap.smb.configurator");
var myJSONObject;
//var scope=null;
var myJSONObjectHeader;
var allAreasOpen=(typeof openos!="undefined")?!openos:false;
var toggleHider=true;
var savedConfig=new Array();
var index=new Array();
var areas=new Array();
var areasIx=new Array();
var areasCols=new Array();
var areasOpen=new Array();
var areasText=new Array();
var areasPdfUrl=new Array();
var areasDemoUrl=new Array();
var areasContent=new Array();
var deps=new Array();
var revDeps=new Array();
var tmpDepList=new Array();
var historyList=new Array();
var historyLfdnr=1;
var sumbbcomplexity=0;
var sumbbfixblock=0;
var flg = 0;
var flag = 0;
var numUser=-1;
var numEmpl=0;
var numUserEmpl=0;
var numUserLimProf=0;
var numUserProf=0;
var stepControl=0;
var master=null;
var funcli=null;
var isServer=false;
var browser=BrowserDetect.browser;
var detailURL=true;
var lastSavedConfigFilename="";
var configChanged=false;
var _showTimer;
var bbConfigFile="config-desc-v0027.xml";
var fadingNow=false;
var sector="";
var loadedConfigXML="";
var solMapHeight=0;
var switchNumEmpl=true;
var selection="";
var hiddenbbs="";
var mandatorybbs="";
var alerton=false;
var showmaster=false;
var text="";
var preis=0;
var hardwarePreis=0;
var servicesPreis=0;
var licensesPreis=0;
var license_base=0;
var userProzent=0;
var isShowTooltip=false;
var numUserLimProfExtra=0;
var numUserProfExtra=0;
var lastBBauf=null;
var hideCount=0;
var hider;
var dependi;
var legendi;
var disclaimer;
var tooltip;
var step1;
var tco;
var newDetailForm;
var newContactForm;
var movieForm;
var showValue;
var useIframes=true;
var sclDtc;
var sclRuebe=0;
var step3clicked=false;
var PANEWIDTH=997;
var PANEHEIGHT=600;
var USER_PROZENT=0.5;
var minEmpl=5;
var maxEmpl=500;
var minUser=5;
var maxUser=500;
var emp_perc=0.5;
var dcTime=250;
var dcDelay=100;
var dcAt=0;
var savEvent=null;
var savEvtTime=0;
var savTO=null;
var tmpid=null;
var tmplayer=null;
var emplIsFocus=false;
var limprofusrshare;
var packminp;
var packusreq;
var profusrp;
var limprofusrp;
var dbp;
var md;
var hwb;
var hws;
var hwpricingtype=null;
var hwfixsmall=null;
var hwfixmid=null;
var hwfixlarge=null;
var hwthreshold=null;
var hwthresholdmid=null;
var hwthresholdlarge=null;
var fin_intrate=null;
var fin_years_min=null;
var fin_years_max=null;
var services_min_user=null;
var radioGroups=new Array();
var solbbs=null;
var areasOrderList=null;
var emplusrp=null;
var emplusrshare=null;
var windowHeight;
var windowWidth;
var minWindowWidth=1025;
var minWindowHeight=487;
var minRuebeWidth=1008;
var minRuebeHeight=240;
var ruebeWidth=1008;
var ruebeHeight=420;
if(typeof scope=="undefined"){
scope=null;
}
var compare=function(a,b){
res=100*(a["area"]-b["area"])+(a["order"]-b["order"]);
return res;
};
function calculateWindowSize(){
if(typeof window.innerWidth=="number"){
windowWidth=window.innerWidth;
windowHeight=window.innerHeight;
}else{
if(document.documentElement&&document.documentElement.clientWidth){
windowWidth=document.documentElement.clientWidth;
windowHeight=document.documentElement.clientHeight;
}else{
windowWidth=document.body.clientWidth;
windowHeight=document.body.clientHeight;
}
}
if(windowHeight<minWindowHeight){
if(document.getElementById("footNotes")){
document.getElementById("footNotes").style.visibility="hidden";
}
}else{
if(document.getElementById("footNotes")){
document.getElementById("footNotes").style.visibility="visible";
}
}
}
function forceMinSize(){
calculateWindowSize();
needResize=false;
curWidth=windowWidth;
curHeight=windowHeight;
dg("w: "+windowWidth+" min w: "+minWindowWidth+" h: "+windowHeight+" min h:"+minWindowHeight);
if(curWidth-100<minWindowWidth){
curWidth=minWindowWidth;
needResize=true;
}
if(curHeight-100<minWindowHeight){
curHeight=minWindowHeight;
needResize=true;
}
if(needResize){
window.resizeTo(curWidth,curHeight);
}
}
function timestamp(){
var oDate=new Date();
return dojo.date.format(oDate,{datePattern:"yyyyMMdd",selector:"dateOnly"})+dojo.date.format(oDate,{timePattern:"HHmmss",selector:"timeOnly"});
}
function loadXMLHeader(sol){
PCalcServer.getConfigUsers(app,partner,scope,version,sol,langstr["lang"],function(data){
myJSONObjectHeader=eval("("+data+")");
myHandlerHeader();
});
}
function loadXML(){
document.getElementById("ruebe").innerHTML="<div style='padding-left:2px;padding-top:1px;'><img src='images/loading.gif' border='0'></div>";
writeSessionValue("loadXML",app+":"+partner);
PCalcServer.getBBConfigFile(app,partner,scope,version,function(data){
setBBConfigFile(data);
});
PCalcServer.getData(app,partner,scope,version,function(data){
myJSONObject=eval("("+data+")");
myHandler();
});
}
function loadSolution(){
document.getElementById("ruebe").innerHTML="<div style='padding-left:2px;padding-top:1px;'><img src='images/loading.gif' border='0'></div>";
writeSessionValue("loadSolution","");
createInfobaseSolution();
createBBmap();
rin();
if(preselection!=null){
partnerSchalten(preselection);
}
}
function myHandler(){
createInfoBase();
createInfobaseSolution();
createBBmap();
rin();
if(preselection!=null){
partnerSchalten(preselection);
}
}
function myHandlerHeader(){
if(myJSONObjectHeader.min_user){
minUser=eval(myJSONObjectHeader.min_user);
}
if(myJSONObjectHeader.max_user){
maxUser=eval(myJSONObjectHeader.max_user);
}
if(myJSONObjectHeader.min_emp){
minEmpl=eval(myJSONObjectHeader.min_emp);
}
if(myJSONObjectHeader.max_emp){
maxEmpl=eval(myJSONObjectHeader.max_emp);
}
if(myJSONObjectHeader.emp_perc){
emp_perc=eval(myJSONObjectHeader.emp_perc);
}
disable(["numEmpl","numUser"],false);
var elems=["two"];
fade(elems,false);
document.getElementById("numOK").innerHTML="<a class='form-button-global' href='javascript:void(0);'><span style='position:relative;top:2px;left:2px;'>" + langstr["button_ok"]+ "</span></a>";
document.getElementById("numOK").style.cursor="pointer";
document.getElementById("numEmpl").focus();
document.getElementById("assist").innerHTML=langstr["assist_step2"];
document.getElementById("downInd").innerHTML="<a style='color: black;' href='javascript:void(0);'>"+langstr["show_ind_pdf"]+"</a>";
/** modified date:2010/08/09 ---start
if(document.getElementById("downInd2")&&myJSONObjectHeader.pdfUrl2){
document.getElementById("downInd2").style.visibility="visible";
}else{
document.getElementById("downInd2").style.visibility="hidden";
}
if(document.getElementById("predownInd2")&&myJSONObjectHeader.pdfUrl2){
document.getElementById("predownInd2").style.visibility="visible";
}else{
document.getElementById("predownInd2").style.visibility="hidden";
}
if(document.getElementById("predownInd")){
document.getElementById("predownInd").style.visibility="visible";
}
*///modified date:2010/08/09 ---end
//---added date:2010/08/06 ---start
if(document.getElementById("downInd")&&myJSONObjectHeader.pdfUrl!=null&&myJSONObjectHeader.pdfUrl.indexOf("://")!=-1){
	document.getElementById("downInd").style.visibility="visible";
}else{
	document.getElementById("downInd").style.visibility="hidden";
}
if(document.getElementById("predownInd")&&myJSONObjectHeader.pdfUrl!=null&&myJSONObjectHeader.pdfUrl.indexOf("://")!=-1){
	document.getElementById("predownInd").style.visibility="visible";
}else{
	document.getElementById("predownInd").style.visibility="hidden";
}
if(document.getElementById("downInd2")&&myJSONObjectHeader.pdfUrl2!=null&&myJSONObjectHeader.pdfUrl2.indexOf("://")!=-1){
	document.getElementById("downInd2").style.visibility="visible";
}else{
	document.getElementById("downInd2").style.visibility="hidden";
}

if(document.getElementById("predownInd2")&&myJSONObjectHeader.pdfUrl2!=null&&myJSONObjectHeader.pdfUrl2.indexOf("://")!=-1){
	document.getElementById("predownInd2").style.visibility="visible";
}else{
	document.getElementById("predownInd2").style.visibility="hidden";
}
//---added date:2010/08/06 ---end
highlight("assist",2000);
if(numEmpl!=0){
checkNumEmplOrUser(true,false);
}
if(numUser!=-1){
checkNumEmplOrUser(false,false);
}
if(stepControl<1){
stepControl=1;
}
if(document.getElementById("tt5")){
document.getElementById("tt5").style.cursor="pointer";
}
}
function fixRuebeSize(){
calculateWindowSize();
ruebeWidth=Math.max(minRuebeWidth-12,windowWidth-12);
ruebeHeight=Math.max(minRuebeHeight,windowHeight-260);
if(windowHeight<minWindowHeight&&windowWidth>minWindowWidth){
if(!(browser=="IE")){
ruebeWidth-=19;
}
}
document.getElementById("ruebe").style.width=ruebeWidth+"px";
document.getElementById("ruebe").style.height=ruebeHeight+"px";
document.getElementById("smb").style.height=Math.min(5+ruebeHeight,477)+"px";
if(ruebeHeight<477){
document.getElementById("smg").style.display="none";
}else{
document.getElementById("smg").style.display="block";
document.getElementById("smg").style.height=(windowHeight-400)+"px";
}
if(document.getElementById("prepagetable")){
document.getElementById("prepagetable").style.height=ruebeHeight+"px";
}
fixStretchBarsSize();
}
function fixStretchBarsSize(){
if(browser=="IE"){
document.getElementById("sbStrecher").style.width=windowWidth>1025?(windowWidth-1025)+"px":"1px";
document.getElementById("topStrecher").style.width=windowWidth>1025?(windowWidth-15)+"px":"1011px";
}else{
if(windowHeight<minWindowHeight){
document.getElementById("sbStrecher").style.width=windowWidth>1045?(windowWidth-1045)+"px":"1px";
document.getElementById("topStrecher").style.width=windowWidth>1045?(windowWidth-35)+"px":"1011px";
}else{
document.getElementById("sbStrecher").style.width=windowWidth>1025?(windowWidth-1025)+"px":"1px";
document.getElementById("topStrecher").style.width=windowWidth>1025?(windowWidth-15)+"px":"1011px";
}
}
document.getElementById("smb").style.width=(ruebeWidth)+"px";
document.getElementById("smg").style.width=(ruebeWidth)+"px";
document.getElementById("smg").style.height=windowHeight>734?(windowHeight-734)+"px":"10px";
if(typeof areasIx!="undefined"&&areasIx!=null){
for(i=0;i<areasIx.length;i++){
if(document.getElementById("bbhline"+areasIx[i])){
if(browser=="IE"){
document.getElementById("bbhline"+areasIx[i]).style.width=(ruebeWidth-60)+"px";
}else{
document.getElementById("bbhline"+areasIx[i]).style.width=(ruebeWidth-150)+"px";
}
}
if(document.getElementById("bbhlineframe"+areasIx[i])){
if(browser=="IE"){
document.getElementById("bbhlineframe"+areasIx[i]).style.width=(ruebeWidth-60)+"px";
}else{
document.getElementById("bbhlineframe"+areasIx[i]).style.width=(ruebeWidth-150)+"px";
}
}
}
}
}
function resizeFunc(){
dg("Resize");
fixRuebeSize();
dg("Reube H: "+document.getElementById("ruebe").style.height+" W: "+document.getElementById("ruebe").style.width);
if(browser=="IE"){
}
}
function genericAddListener(_12cb,func){
if(typeof window.addEventListener!="undefined"){
window.addEventListener(_12cb,func,false);
}else{
if(typeof document.addEventListener!="undefined"){
document.addEventListener(_12cb,func,false);
}else{
if(typeof window.attachEvent!="undefined"){
window.attachEvent("on"+_12cb,func);
}
}
}
}
dojo.addOnLoad(function(){
var _12cd="";
var _12ce="";
if(partner!=null){
_12cd=partner;
}
if(scope!=null){
_12ce=scope;
}
PCalcServer.getPropertyValue(app,_12cd,_12ce,"useIframes",function(data){
if(data=="X"){
useIframes=false;
}else{
useIframes=true;
}
});
PCalcServer.getPropertyValue(app,_12cd,_12ce,"useThankYou",function(data){
if(data=="X"){
sCF="contform3";
}else{
sCF="contform2";
}
});
initDialogs();
addLanguageSelectionToDisclaimer();
resetInputs();
genericAddListener("resize",resizeFunc);
fixRuebeSize();
if(typeof loadSavedConfigFlag!="undefined"&&loadSavedConfigFlag!=null){
if(loadSavedConfigFlag=="Version Mismatch"){
alert("This configuration was generated by an older version and thus cannot be loaded.");
calculateWindowSize();
disclaimer.position_absolute_x=((windowWidth)-500)/2;
disclaimer.show();
}else{
if(loadSavedConfigFlag=="OK"){
acceptDisclaimer();
loadSavedConfig();
}
}
}else{
calculateWindowSize();
disclaimer.position_absolute_x=((windowWidth)-1000)/2;
disclaimer.show();
}
writeSessionValue("init",app+":"+partner);
writeSessionValue("referrer",document.referrer);
});
function initDialogs(){
hider=dojo.widget.byId("hider");
if(browser=="IE"){
hider.toggleDuration=100;
}
dependi=dojo.widget.byId("dependi");
tooltip=dojo.widget.byId("tooltip");
tco=dojo.widget.byId("tco");
newDetailForm=dojo.widget.byId("newDetailForm");
newContactForm=dojo.widget.byId("newContactForm");
movieForm=dojo.widget.byId("movieForm");
showValue=dojo.widget.byId("showValue");
disclaimer=dojo.widget.byId("disclaimer");
try{
document.execCommand("BackgroundImageCache",false,true);
}
catch(e){
}
}
function configure(){
stepControl=3;
var elems=["four"];
document.getElementById("order").innerHTML="<a class='form-button-global' href='javascript:void(0);'><span style='position:relative;top:6px;left:2px;'>"+langstr["step4_action"]+"</span></a>";
document.getElementById("order").style.cursor="pointer";
document.getElementById("reset").style.cursor="pointer";
document.getElementById("reset").style.visibility="visible";
fade(elems,false);
for(i=0;i<areasOpen.length;i++){
if(document.getElementById("areaarrow"+i)){
document.getElementById("areaarrow"+i).style.visibility="visible";
}
if(document.getElementById("areatext"+i)){
document.getElementById("areatext"+i).style.cursor="pointer";
}
}
if(document.getElementById("expander")){
document.getElementById("expander").style.visibility="visible";
}
if(!allAreasOpen&&(typeof openos=="undefined"||openos)){
toggleAllAreas();
}
}
function rin(){
document.getElementById("ruebe").innerHTML=text;
var elems=["three","smb","smg","preisBlock","openTCO","openTCOIcon","openASPIcon","disclaimer2","summaraypage"];
fade(elems,false);
var node=document.getElementById("openTCO");
if(node){
node.style.textDecoration="none";
node.innerHTML="<a href='javascript:void(0);'>"+langstr["fin_configure"]+"</a>";
}
if(document.getElementById("summaraypageDL")){
document.getElementById("summaraypageDL").style.cursor="pointer";
}
if(document.getElementById("refer")){
document.getElementById("refer").style.cursor="pointer";
}
document.getElementById("assist").innerHTML=langstr["assist_step3"];
if(document.getElementById("configure")){
document.getElementById("configure").innerHTML="<a class='form-button-global' href='javascript:void(0);'><span style='position:relative;top:6px;left:2px;'>Select Scenarios</span></a>";
}
if(document.getElementById("configure")){
document.getElementById("configure").style.cursor="pointer";
}
document.getElementById("tt1").style.cursor="pointer";
document.getElementById("tt2").style.cursor="pointer";
document.getElementById("tt3").style.cursor="pointer";
if(document.getElementById("tt4")){
document.getElementById("tt4").style.cursor="pointer";
}
if(document.getElementById("disclaimer2a")){
document.getElementById("disclaimer2a").style.cursor="pointer";
}
highlight("assist",2000);
step3clicked=false;
allAreasOpen=(typeof openos!="undefined")?!openos:false;
if(stepControl<4&&typeof openos!="undefined"&&!openos){
toggleAllAreas();
}
configure();
openos=true;
if(numEmpl!=0){
checkNumEmplOrUser(true,false);
checkNumEmplOrUser(false,false);
}
if(stepControl<3){
stepControl=3;
}
updatePreis();
}
function createInfobaseSolution(){
savedConfig=new Array();
index=new Array();
areas=new Array();
areasCols=new Array();
areasIx=new Array();
areasOpen=new Array();
deps=new Array();
revDeps=new Array();
tmpDepList=new Array();
historyList=new Array();
sumbbcomplexity=0;
sumbbfixblock=0;
mandatorybbs="";
areasContent=new Array();
var _12d4=0;
var pArea=99;
var area=0;
var _12d7=jsonPath(myJSONObject.pcalc.solutions,"$..solution[?(@.id=='"+sector+"')]")[0];
if(typeof savedConfigJSONObject!="undefined"){
dg("Loading selections");
selection="_";
for(i=0;i<savedConfigJSONObject.config.selection.bb.length;i++){
dg(savedConfigJSONObject.config.selection.bb[i]);
selection+=savedConfigJSONObject.config.selection.bb[i]+"_";
}
}else{
selection=flattenList(_12d7.selection);
}
hiddenbbs=flattenList(_12d7.hiddenbbs);
mandatorybbs=flattenList(_12d7.mandatorybbs);
solbbs=flattenList(_12d7.solbbs);
if(typeof _12d7.areasOrder!="undefined"){
areasOrderList=_12d7.areasOrder.split(",");
}else{
areasOrderList=null;
}
for(i=0;i<myJSONObject.pcalc.bbs.bb.length;i++){
var bb=myJSONObject.pcalc.bbs.bb[i];
if(solbbs.indexOf("_"+bb.id+"_")==-1){
continue;
}
savedConfig[bb.id]="off";
index[bb.id]=i;
area=eval(bb.area);
if(area>pArea){
areas.push(_12d4);
areasIx.push(""+pArea);
areasOpen[""+pArea]=true;
_12d4=0;
}
_12d4++;
pArea=area;
if((selection&&selection.indexOf("_"+bb.id+"_")>-1)||(mandatorybbs&&mandatorybbs.indexOf("_"+bb.id+"_")>-1)||(hiddenbbs&&hiddenbbs.indexOf("_"+bb.id+"_")>-1)){
var tmp=bb.complexity;
sumbbcomplexity+=100*eval(tmp);
if(bb.servicesfixedblock){
sumbbfixblock+=eval(bb.servicesfixedblock);
}
if(!(hiddenbbs&&hiddenbbs.indexOf("_"+bb.id+"_")>-1)){
savedConfig[bb.id]="on";
}
}
if(bb.dependencies!=null){
var _12da=new Array();
if(!bb.dependencies.dep&&bb.dependencies.length>0){
tmpDeps=bb.dependencies.split(",");
for(j=0;j<tmpDeps.length;j++){
var depbb=tmpDeps[j].replace(/^\s+|\s+$/g,"");
_12da.push(depbb);
if(revDeps[depbb]==null){
revDeps[depbb]=new Array();
}
revDeps[depbb].push(bb.id);
}
}else{
if(bb.dependencies.dep!=null&&bb.dependencies.dep.length==null){
_12da.push(bb.dependencies.dep.bbid);
if(revDeps[bb.dependencies.dep.bbid]==null){
revDeps[bb.dependencies.dep.bbid]=new Array();
}
revDeps[bb.dependencies.dep.bbid].push(bb.id);
}else{
if(bb.dependencies.dep!=null){
for(j=0;j<bb.dependencies.dep.length;j++){
_12da.push(bb.dependencies.dep[j].bbid);
if(revDeps[bb.dependencies.dep[j].bbid]==null){
revDeps[bb.dependencies.dep[j].bbid]=new Array();
}
revDeps[bb.dependencies.dep[j].bbid].push(bb.id);
}
}
}
}
deps[bb.id]=_12da;
}
}
areas.push(_12d4);
areasOpen[""+pArea]=true;
areasIx.push(""+pArea);
if(_12d7.users.min_user){
minUser=eval(_12d7.users.min_user);
}
if(_12d7.users.max_user){
maxUser=eval(_12d7.users.max_user);
}
if(_12d7.users.min_emp){
minEmpl=eval(_12d7.users.min_emp);
}
if(_12d7.users.max_emp){
maxEmpl=eval(_12d7.users.max_emp);
}
emp_perc=(_12d7.users.emp_perc)?eval(_12d7.users.emp_perc):USER_PROZENT;
if(_12d7.solpricing.services_min_user){
services_min_user=eval(_12d7.solpricing.services_min_user);
}
if(_12d7.solpricing.md){
md=eval(_12d7.solpricing.md);
}else{
if(myJSONObject&&myJSONObject.pcalc.pricing.services.md){
md=eval(myJSONObject.pcalc.pricing.services.md);
}
}
if(_12d7.solpricing.emplusrshare){
emplusrshare=eval(_12d7.solpricing.emplusrshare);
}
limprofusrshare=eval(_12d7.solpricing.limprofusrshare);
radioGroups=new Array();
if(_12d7.radiogroups&&_12d7.radiogroups.radiogroup&&_12d7.radiogroups.radiogroup.length>0){
if(typeof _12d7.radiogroups.radiogroup=="string"){
radioGroups.push(flattenList(_12d7.radiogroups.radiogroup));
}else{
for(rr=0;rr<_12d7.radiogroups.radiogroup.length;rr++){
radioGroups.push(flattenList(_12d7.radiogroups.radiogroup[rr]));
}
}
}
}
function createInfoBase(){
areasText=new Array();
areasPdfUrl=new Array();
areasDemoUrl=new Array();
if(myJSONObject.pcalc.bbs.bb.length!=null){
myJSONObject.pcalc.bbs.bb.sort(compare);
}
if(myJSONObject.pcalc.bbs.bb.length==null){
var tmpBB=myJSONObject.pcalc.bbs.bb;
myJSONObject.pcalc.bbs.bb=new Array();
myJSONObject.pcalc.bbs.bb.push(tmpBB);
}
if(myJSONObject.pcalc.solutions.solution.length==null){
var _12dd=myJSONObject.pcalc.solutions.solution;
myJSONObject.pcalc.solutions.solution=new Array();
myJSONObject.pcalc.solutions.solution.push(_12dd);
}
if(myJSONObject.pcalc.areas.area.length==null){
var area=myJSONObject.pcalc.areas.area;
var doc=getLangDoc(area.doc);
//areasText[""+area.id]=doc.content.toUpperCase();
areasText[""+area.id]=(null==doc.content?"":doc.content.toUpperCase());
var _12e0=(typeof area.pdfUrl!="undefined"&&area.pdfUrl!=null&&area.pdfUrl.doc!=null)?getLangDoc(area.pdfUrl.doc):null;
var _12e1=(typeof area.demoUrl!="undefined"&&area.demoUrl!=null&&area.demoUrl.doc!=null)?getLangDoc(area.demoUrl.doc):null;
areasPdfUrl[""+area.id]=(_12e0&&_12e0.content)?_12e0.content:null;
areasDemoUrl[""+area.id]=(_12e1&&_12e1.content)?_12e1.content:null;
}else{
for(i=0;i<myJSONObject.pcalc.areas.area.length;i++){
var area=myJSONObject.pcalc.areas.area[i];
var doc=getLangDoc(area.doc);
areasText[""+area.id]=doc.content.toUpperCase();
var _12e0=(typeof area.pdfUrl!="undefined"&&area.pdfUrl!=null&&area.pdfUrl.doc!=null)?getLangDoc(area.pdfUrl.doc):null;
var _12e1=(typeof area.demoUrl!="undefined"&&area.demoUrl!=null&&area.demoUrl.doc!=null)?getLangDoc(area.demoUrl.doc):null;
areasPdfUrl[""+area.id]=(_12e0&&_12e0.content)?_12e0.content:null;
areasDemoUrl[""+area.id]=(_12e1&&_12e1.content)?_12e1.content:null;
}
}
configChanged=false;
packminp=eval(myJSONObject.pcalc.pricing.licenses.packminp);
packusreq=eval(myJSONObject.pcalc.pricing.licenses.packusreq);
profusrp=eval(myJSONObject.pcalc.pricing.licenses.profusrp);
limprofusrp=eval(myJSONObject.pcalc.pricing.licenses.limprofusrp);
dbp=eval(myJSONObject.pcalc.pricing.licenses.dbp);
if(myJSONObject.pcalc.pricing.licenses.emplusrp){
emplusrp=eval(myJSONObject.pcalc.pricing.licenses.emplusrp);
}
md=eval(myJSONObject.pcalc.pricing.services.md);
hwb=eval(myJSONObject.pcalc.pricing.hardware.hwb);
hws=eval(myJSONObject.pcalc.pricing.hardware.hws);
if(myJSONObject.pcalc.pricing.hardware.hwpricingtype){
hwpricingtype=myJSONObject.pcalc.pricing.hardware.hwpricingtype;
}
if(myJSONObject.pcalc.pricing.hardware.hwfixsmall){
hwfixsmall=eval(myJSONObject.pcalc.pricing.hardware.hwfixsmall);
}
if(myJSONObject.pcalc.pricing.hardware.hwfixlarge){
hwfixlarge=eval(myJSONObject.pcalc.pricing.hardware.hwfixlarge);
}
if(myJSONObject.pcalc.pricing.hardware.hwthresholdmid){
hwthresholdmid=eval(myJSONObject.pcalc.pricing.hardware.hwthresholdmid);
}
if(myJSONObject.pcalc.pricing.hardware.hwthresholdlarge){
hwthresholdlarge=eval(myJSONObject.pcalc.pricing.hardware.hwthresholdlarge);
}
if(myJSONObject.pcalc.pricing.hardware.hwfixmid){
hwfixmid=eval(myJSONObject.pcalc.pricing.hardware.hwfixmid);
}
if(myJSONObject.pcalc.pricing.financing.intrate && 0 != eval(myJSONObject.pcalc.pricing.financing.intrate)){
fin_intrate=eval(myJSONObject.pcalc.pricing.financing.intrate);
}else{
fin_intrate=7.5;
}
if(myJSONObject.pcalc.pricing.financing.years_min){
fin_years_min=eval(myJSONObject.pcalc.pricing.financing.years_min);
}else{
fin_years_min=2;
}
if(myJSONObject.pcalc.pricing.financing.years_max){
fin_years_max=eval(myJSONObject.pcalc.pricing.financing.years_max);
}else{
fin_years_max=7;
}
}
function createBBmap(){
var _12e2=-1;
var bb;
var _12e4;
var _12e5=0;
text="";
var _12e6=48;
var width=148;
var _12e8=0;
var _12e9=false;
var _12ea=0;
var _12eb=0;
var lText="";
var _12ed=false;
areaTextsTmp=new Array();
areaPdfUrlTmp=new Array();
areaDemoUrlTmp=new Array();
if(areasOrderList!=null){
_12ed=true;
}else{
areasOrderList=new Array();
}
ruebeWidth=document.getElementById("ruebe").style.width;
ruebeHeight=document.getElementById("ruebe").style.height;
calculateWindowSize();
for(i=0;i<myJSONObject.pcalc.bbs.bb.length;i++){
bb=myJSONObject.pcalc.bbs.bb[i];
if(solbbs.indexOf("_"+bb.id+"_")==-1||hiddenbbs.indexOf("_"+bb.id+"_")>-1){
continue;
}
_12eb=eval(bb.area);
_12e4=cutLongText(getLangDoc(bb.doc).titletext,90);
_12e4=breakLongText(_12e4,22);
if(_12eb>_12e2){
if(_12e2>-1){
areaTextsTmp[_12e2]+=lText+"</div>";
}
hlineWidth=windowWidth>1025?(windowWidth-53):972;
if(!_12ed){
areasOrderList.push(_12eb);
}
areaTextsTmp[_12eb]="";
areaTextsTmp[_12eb]+="<div id = 'bbhlineframe"+_12eb+"' style='width: "+hlineWidth+"px; font: 11px/13px Arial, Arial, Helvetica, sans-serif; float: left; height: 34px; margin: 0px; border-width: 0px; padding: 0px; padding-top:1px; padding-left: 10px;'>"+(_12e2==-1?"<div id='expander' style='visibility: hidden; float: left; padding-left:5px; width:"+(hlineWidth-5)+"px; height:15px; background-image: url(images/spacer.gif)'><img src='images/arrow_close.png' style='cursor:pointer;' onclick='toggleAllAreas()'  >&nbsp;&nbsp;<a style='color: rgb(65, 103, 124); cursor: pointer;' href='javascript:void(0);' onclick='toggleAllAreas()'>Expand All</a></div>":"<div style='float: left;width:"+hlineWidth+"px; height:10px; background-image: url(images/spacer.gif)'></div>")+"<div id = 'bbhline"+_12eb+"' style='float: left; width:"+hlineWidth+"px; height:2px; line-height:2px; font-size:2px; background-image: url(images/bblock_hline.gif)'></div>"+"<div id='areaarrow"+_12eb+"' style='visibility: hidden; float: left;padding-left:5px;padding-top:3px;cursor:pointer;' onclick='toggleArea("+_12eb+")'><!-- a style='color: rgb(65, 103, 124); cursor: pointer;' href='javascript:void(0);' ></a --><img src='images/arrow_open.png'>&nbsp;&nbsp;</div><div id='areatext"+_12eb+"' style='float: left; height:20px;padding-top:2px;width:240px;' onclick='toggleArea("+_12eb+")'>"+areasText[""+_12eb]+"</div>"+(areasPdfUrl[""+_12eb]&&areasPdfUrl[""+_12eb]!=null?("<div style='float: left; height:20px;padding-top:2px;width:100px;'>&nbsp;</div>"+"<div style='float: left; cursor:pointer;height:20px;padding-top:2px;color:grey' onclick=oplink2('"+areasPdfUrl[""+_12eb]+"',"+_12eb+")><!-- img height='18' src='images/statement.png' --></div>"+"<div id='opsv"+_12eb+"' style='float: left; cursor:pointer;height:20px;padding-top:4px;color:grey' onclick=oplink2('"+areasPdfUrl[""+_12eb]+"',"+_12eb+",'opsv')><a style='color: rgb(65, 103, 124); cursor: pointer;' href='javascript:void(0);' >"+langstr["viab_areavalue"]+"</a></div>"):"")+(areasDemoUrl[""+_12eb]&&areasDemoUrl[""+_12eb]!=null?("<div style='float: left; height:20px;padding-top:2px;width:100px;'>&nbsp;</div>"+"<div style='float: left; cursor:pointer;height:20px;padding-top:2px;color:grey' onclick=oplink2('"+areasDemoUrl[""+_12eb]+"',"+_12eb+")><!-- img height='18' src='images/demo.png' --></div>"+"<div id='opdm"+_12eb+"'style='float: left; cursor:pointer;height:20px;padding-top:4px;color:grey' id = 'demo"+_12eb+"' onclick=oplink2('"+areasDemoUrl[""+_12eb]+"',"+_12eb+",'opdm')><a style='color: rgb(65, 103, 124); cursor: pointer;' href='javascript:void(0);' >"+langstr["viab_areademo"]+"</a></div>"):"")+"</div>"+"<div id='area"+(_12eb)+"' style='float: left; margin: 0px; border-width: 0px; padding: 0px; '>";
lText="";
}
var margl=(browser=="IE")?"margin-left: 3px;":"";
var _12f0=(mandatorybbs.indexOf("_"+bb.id+"_")==-1)?";cursor:default":"";
var _12f1=(mandatorybbs.indexOf("_"+bb.id+"_")==-1)?"onclick=preSelectBB('"+bb.id+"')":"";
if(hiddenbbs.indexOf("_"+bb.id+"_")==-1){
if(savedConfig[bb.id]=="on"){
if(mandatorybbs.indexOf("_"+bb.id+"_")>-1){
lText+="<div class='zwei' style='"+margl+";clear: none;' id='"+bb.id+"' onclick=showInfoSB('"+bb.id+"','"+_12eb+"') onMouseOut=unhlBB('"+bb.id+"',"+_12eb+") onMouseOver=hlBB('"+bb.id+"') ><div id='"+bb.id+"i' style='float: right; z-index:100; position:relative;top:-3px; right:-6px;"+_12f0+"' "+_12f1+"><img src='images/checkbox_checked3.gif'/></div>"+_12e4+"</div>";
}else{
lText+="<div class='zwei' style='"+margl+";clear: none;' id='"+bb.id+"' onclick=showInfoSB('"+bb.id+"','"+_12eb+"') onMouseOut=unhlBB('"+bb.id+"',"+_12eb+") onMouseOver=hlBB('"+bb.id+"') ><div id='"+bb.id+"i' style='float: right; z-index:100; position:relative;top:-3px; right:-6px;"+_12f0+"' "+_12f1+"><img src='images/checkbox_checked.gif'/></div>"+_12e4+"</div>";
}
}else{
lText+="<div class='zweid' style='"+margl+";clear: none;' id='"+bb.id+"' onclick=showInfoSB('"+bb.id+"','"+_12eb+"') onMouseOut=unhlBB('"+bb.id+"',"+_12eb+") onMouseOver=hlBB('"+bb.id+"') ><div id='"+bb.id+"i' style='float: right; z-index:100; position:relative;top:-3px; right:-6px;"+_12f0+"' "+_12f1+"><img src='images/checkbox_unchecked.gif'/></div>"+_12e4+"</div>";
}
}
_12e5++;
if(_12eb>_12e2){
_12e5=0;
}
_12e2=_12eb;
}
areaTextsTmp[_12eb]+=lText+"</div>";
areasText.push(lText);
for(var i=0;i<areasOrderList.length;i++){
if(areaTextsTmp[""+areasOrderList[i]]!=null){
text+=areaTextsTmp[""+areasOrderList[i]];
}
}
}


function getRoundFactoredPrice(value){
	  var roundFactor = 100;	
	  return roundFactor*Math.round(value/roundFactor);
}

function updatePreis(){
var roundfactor = 100;
if(stepControl<2){
	return false;
}
if(isNaN(numUser)){
	return false;
}
var anotherPrice=preis;


//call
url = "../v2/calculatePrice.jsp?";
url += "numUser="+numUser;
url += "&emplusrshare="+emplusrshare;
url += "&packusreq="+packusreq;
url += "&limprofusrshare="+limprofusrshare;
url += "&packminp="+packminp;
url += "&emplusrp="+emplusrp;
url += "&dbp="+dbp;
url += "&services_min_user="+services_min_user;
url += "&limprofusrp="+limprofusrp;
url += "&profusrp="+profusrp;
url += "&md="+md;
url += "&sumbbcomplexity="+sumbbcomplexity;
url += "&sumbbfixblock="+sumbbfixblock;
url += "&country="+app;
url += "&partner="+partner;
url += "&application="+scope;

if(pdays!=null){
  url += "&pdays="+pdays;
  url += "&pdaysvalue="+pdaysvalue;
}

//specialHardwarePreis
if(typeof specialHardwarePreis!="undefined"){
	url += "&specialHardwarePreis="+specialHardwarePreis;	
}else{
	url += "&hwpricingtype="+hwpricingtype;
	url += "&hwfixsmall="+hwfixsmall;
	url += "&hwfixlarge="+hwfixlarge;
	url += "&hwthreshold="+hwthreshold;
	url += "&hwthresholdlarge="+hwthresholdlarge;
	url += "&hwthresholdmid="+hwthresholdmid;
	url += "&hwfixmid="+hwfixmid;
	url += "&hwb=" + hwb;
	url += "&hws="+hws;
 
	
}
//document.write(url);
dojo.io.bind({   
    url:  url,
  mimetype: "text/html", 
  sync: true,
  load: function(load, data, evt){
    //alert(data);
	//nTemp = parseFloat(data);
	//alert("service fee from java=" + data);
	
	var numbersAll = data.split(",");
	licensesPreis       = parseFloat(numbersAll[0]);
	servicesPreis       = parseFloat(numbersAll[1]);
	hardwarePreis 	    = parseFloat(numbersAll[2]);
	preis               = parseFloat(numbersAll[3]);	
	numUserEmpl         = parseFloat(numbersAll[4]);
	numUserLimProfExtra = parseFloat(numbersAll[5]);
	numUserProfExtra    = parseFloat(numbersAll[6]);
	numUserLimProf      = parseFloat(numbersAll[7]);
	numUserProf         = parseFloat(numbersAll[8]);
	
 }
});

/*

numUserEmpl=0;
if(emplusrshare!=null){
numUserEmpl=Math.round(Math.max(0,Math.min(Math.floor(numUser*emplusrshare),numUser-packusreq)));
}
var nTemp = 0;
if(numUser-numUserEmpl>60){
  nTemp = Math.round(numUser-numUserEmpl-60);
}	
numUserLimProfExtra=0;
numUserProfExtra=0;
if(nTemp>0){
numUserLimProfExtra=Math.floor(nTemp*0.15);
numUserProfExtra=nTemp-Math.floor(nTemp*0.15);
}

numUserLimProf=Math.round(Math.max(0,Math.min(numUser-numUserEmpl-packusreq,Math.floor(limprofusrshare*(numUser-numUserEmpl-nTemp)))));
numUserProf=numUser-packusreq-numUserEmpl-nTemp-numUserLimProf;

var nTemp2=numUserLimProf+numUserProf;
var nPackminp=packminp + numUserEmpl*emplusrp + (numUserLimProf+numUserLimProfExtra)*limprofusrp + (numUserProf+numUserProfExtra)*profusrp;
licensesPreis=(nPackminp*(1+dbp/100));
licensesPreis = getRoundFactoredPrice(licensesPreis);

var nUsers=(services_min_user!=null&&!isNaN(services_min_user)&&services_min_user>numUser-numUserEmpl)?services_min_user:numUser-numUserEmpl;
var _12f7=sumbbcomplexity*Math.sqrt(nUsers)/100;
servicesPreis=_12f7*md+sumbbfixblock*md;
servicesPreis= getRoundFactoredPrice (servicesPreis);

if(window.pdays!=null && window.pdays){
var servicesPreis2=roundFactor*Math.round(pdaysvalue*md/roundFactor);
	servicesPreis=(servicesPreis>servicesPreis2)? servicesPreis:servicesPreis2;
}

if(typeof specialHardwarePreis!="undefined"){
	hardwarePreis=roundFactor*Math.ceil(eval(specialHardwarePreis)/roundFactor);
}else{
	if(hwpricingtype!=null&&hwpricingtype=="advanced"&&hwfixsmall!=null&&hwfixlarge!=null&&(hwthreshold!=null||(hwthresholdlarge!=null&&hwthresholdmid!=null))){
		if(hwthresholdlarge!=null&&hwthresholdmid!=null&&hwfixsmall!=null&&hwfixmid!=null&&hwfixlarge!=null){
			if((numUser-numUserEmpl)>=hwthresholdlarge){
				hardwarePreis=hwfixlarge;
			}else{
				if((numUser-numUserEmpl)>=hwthresholdmid){
					hardwarePreis=hwfixmid;
				}else{
					hardwarePreis=hwfixsmall;
				}
			}
			hardwarePreis=roundFactor*Math.round(hardwarePreis/roundFactor);
		}else{
			if(hwthreshold!=null){
				hardwarePreis=roundFactor*Math.round((((numUser-numUserEmpl)<hwthreshold)?hwfixsmall:hwfixlarge)/roundFactor);
			}
		}
	}else{
		hardwarePreis=roundFactor*Math.round((hwb+(numUser-numUserEmpl)*hws)/roundFactor);
	}
}
preis=licensesPreis+servicesPreis+hardwarePreis;
*/


if(typeof priceShowSubTotals=="undefined"||priceShowSubTotals==true){
if(typeof document.getElementById("licensesPreis")!="undefined"){
document.getElementById("licensesPreis").innerHTML=formatCostCurrency(licensesPreis);
document.getElementById("servicesPreis").innerHTML=formatCostCurrency(servicesPreis);
document.getElementById("hardwarePreis").innerHTML=formatCostCurrency(hardwarePreis);
}
}
document.getElementById("preis").innerHTML=formatCostCurrency(preis);
if(anotherPrice!=preis){
if(document.getElementById("tcoStartingFrom")){
	if(myJSONObject.pcalc.country_id.indexOf("BE")>-1 || myJSONObject.pcalc.country_id.indexOf("GB")>-1){
		var _12f8=(typeof asp!="undefined"&&asp==true&&typeof langstr["asp_starting_from"]!=null)?langstr["asp_starting_from"].replace(/<sum>/,formatCurrency(calcMoASP2(fin_years_max))):langstr["fin_starting_from"].replace(/<sum>/,formatCurrency(calcMoTCO(fin_years_max)));
	}else{
		var _12f8=(typeof asp!="undefined"&&asp==true&&typeof langstr["asp_starting_from"]!=null)?langstr["asp_starting_from"].replace(/<sum>/,formatCurrency(calcMoASP(fin_years_max))):langstr["fin_starting_from"].replace(/<sum>/,formatCurrency(calcMoTCO(fin_years_max)));
	}
document.getElementById("tcoStartingFrom").innerHTML=_12f8;
if(typeof asp!="undefined"&&asp==true&&document.getElementById("tt77")){
document.getElementById("tt77").style.visibility="visible";
}
}
configChanged=true;
highlight("preisBlock",2000);
}
}
var showasp;
var withuser;
PCalcServer.getPropertyValue(app,partner,scope,"asp", function(data){
	if(data=="X")
		showasp=true;
	else
		showasp=false;
});
PCalcServer.getPropertyValue(app,partner,scope,"withuser",function(data){
	if(data=="N")
		withuser=false;
	else
		withuser=true;
});
function calcMoASP(){
var dom=asp_fixblock+licensesPreis*asp_license+servicesPreis*asp_service+hardwarePreis*asp_server;
var nom;
if(showasp){
	if(withuser){
		nom = numUser*asp_amortization;
	}
	else{
		nom = asp_amortization;
	}
}
var _12fb=Math.round(dom/nom)+asp_fixcost;
var result = preProcess("" + _12fb);
return result;
}
function preProcess(value){
	  var strValue = value;
	  var subStrs = strValue.split(".");
	  
	  if(strValue.indexOf(".")>0){
	    strValue = "";
	    var i=0;
	    for(;i<subStrs.length-1;i++){
	      strValue += subStrs[i];
	    }
	    strValue = strValue + "." + subStrs[i];
	    for(var j=0;j<2-subStrs[i].length;j++){
	      strValue += "0";
	    }
	  }else{
	    strValue = "" + value +".00";
	  }
	  return strValue;
}
function calcMoASP2(){
	var dom=asp_fixblock+licensesPreis*asp_license+servicesPreis*asp_service+hardwarePreis*asp_server;
	var nom;
	if(showasp){
		if(withuser){
			nom = numUser*asp_amortization;
		}
		else{
			nom = asp_amortization;
		}
	}
	var _12f8=parseFloat(changeTwoDecimal(dom/nom))+asp_fixcost;
	var temp = _12f8.toString();
	var temp1 = temp.indexOf(".");
	if(temp1<2){
		return _12f8.toPrecision(3);
	}else if (temp1==2){
		return _12f8.toPrecision(4);
	}else{
		return _12f8.toFixed(2);
	}
}
function changeTwoDecimal(x){
	var f_x = parseFloat(x);
	var f_x = Math.round(x*100)/100;
	var s_x = f_x.toString();
	if(s_x.indexOf(".")<0){
	  s_x +=".00"; 
	}
	var pos_decimal = s_x.indexOf(".");
	if(pos_decimal<0){
		pos_decimal = s_x.length;
		s_x = ".";
	}
	while(s_x.length<=pos_decimal+2){
		s_x +="0";		
	}
	return s_x;
}

function selectBB(id){
if(mandatorybbs.indexOf("_"+id+"_")>-1){
return;
}
if(savedConfig[id]=="off"){
for(r=0;r<radioGroups.length;r++){
if(radioGroups[r].indexOf("_"+id+"_")>-1){
var _12fd=false;
tmpDepList=new Array();
rgArr=radioGroups[r].substring(1,radioGroups[r].length-1).split("_");
for(i=0;i<rgArr.length;i++){
if(savedConfig[rgArr[i]]=="on"){
_12fd=true;
tmpDepList.push(rgArr[i]);
}
}
if(_12fd){
showDependi(id,2);
return;
}
}
}
tmpDepList=new Array();
if(deps[id]!=null){
for(i=0;i<deps[id].length;i++){
if(savedConfig[deps[id][i]]=="off"){
tmpDepList.push(deps[id][i]);
}
}
}
if(tmpDepList.length>0){
showDependi(id,0);
}else{
reverse(id);
}
}else{
tmpDepList=new Array();
if(revDeps[id]!=null){
for(i=0;i<revDeps[id].length;i++){
if(savedConfig[revDeps[id][i]]=="on"){
tmpDepList.push(revDeps[id][i]);
}
}
}
if(tmpDepList.length>0){
showDependi(id,1);
}else{
reverse(id);
}
}
if(!step3clicked){
document.getElementById("assist").innerHTML=langstr["assist_step4"];
highlight("assist",2000);
}
step3clicked=true;
}
function reverseDep(id){
if(dependi!=null){
dependi.hide();
}
for(i=0;i<tmpDepList.length;i++){
reverse(tmpDepList[i]);
}
reverse(id);
}
function markBBSelected(id,_1300){
document.getElementById(id).className="zwei";
if(!_1300){
document.getElementById("hiderAction").innerHTML="<a href='javascript:void(0);' onclick=javascript:selectBB('"+id+"'); style='color: black;'>"+langstr["info_deselect"]+"</a>";
document.getElementById("hiderActionCB").innerHTML="<img src='images/checkbox_checked.gif'/>";
document.getElementById(id+"i").innerHTML="<img src='images/checkbox_checked.gif'/>";
}else{
document.getElementById(id+"i").innerHTML="<img src='images/checkbox_checked3.gif'/>";
document.getElementById("hiderActionCB").innerHTML="<img style='cursor:default' src='images/checkbox_checked3.gif'/>";
}
}
function markBBDeselected(id,_1302){
document.getElementById(id).className="zweid";
if(!_1302){
document.getElementById(id+"i").innerHTML="<img src='images/checkbox_unchecked.gif'/>";
document.getElementById("hiderAction").innerHTML="<a href='javascript:void(0);' onclick=javascript:selectBB('"+id+"'); style='color: black;'>"+langstr["info_select"]+"</a>";
document.getElementById("hiderActionCB").innerHTML="<img src='images/checkbox_unchecked.gif'/>";
}else{
document.getElementById("hiderAction").innerHTML=langstr["bb_preselected"];
document.getElementById("hiderActionCB").innerHTML="<img style='cursor:default' src='images/checkbox_unchecked.gif'/>";
}
}
function reverse(id){
if(savedConfig[id]=="on"){
savedConfig[id]="off";
sumbbcomplexity-=100*eval(myJSONObject.pcalc.bbs.bb[index[id]].complexity);
if(myJSONObject.pcalc.bbs.bb[index[id]].servicesfixedblock){
sumbbfixblock-=eval(myJSONObject.pcalc.bbs.bb[index[id]].servicesfixedblock);
}
updatePreis();
markBBDeselected(id,false);
}else{
if(savedConfig[id]=="off"){
savedConfig[id]="on";
sumbbcomplexity+=100*eval(myJSONObject.pcalc.bbs.bb[index[id]].complexity);
if(myJSONObject.pcalc.bbs.bb[index[id]].servicesfixedblock){
sumbbfixblock+=eval(myJSONObject.pcalc.bbs.bb[index[id]].servicesfixedblock);
}
updatePreis();
markBBSelected(id,false);
}
}
}
function setButton(_1304,size){
var item1=document.getElementById(_1304);
if(size=="Small"){
item1.style.backgroundImage="url('images/button_OK.gif')";
item1.style.width="42px";
}
if(size=="Large"){
item1.style.backgroundImage="url('images/button_order.gif')";
item1.style.width="127px";
}
}
function showDependi(id,fall){
document.getElementById("dependiId").value=id;
document.getElementById("dependi1").onclick=function(){
reverseDep(document.getElementById("dependiId").value);
};
document.getElementById("dependi0").onclick=function(){
dependi.hide();
};
if(fall==0){
document.getElementById("dependiPreText").innerHTML=langstr["dependi_PreTextDependsOn"];
document.getElementById("dependiPostText").innerHTML=langstr["dependi_PostTextDependsOn"];
document.getElementById("dependi0ButtonText").innerHTML=langstr["button_cancel"];
document.getElementById("dependi1ButtonText").innerHTML=langstr["button_ok"];
setButton("dependi0","Large");
setButton("dependi1","Large");
visible(["dependi0","dependi1"],true);
}else{
if(fall==1){
document.getElementById("dependiPreText").innerHTML=langstr["dependi_PreTextDependedBy"];
document.getElementById("dependiPostText").innerHTML="";
document.getElementById("dependi0ButtonText").innerHTML=langstr["button_cancel"];
document.getElementById("dependi1ButtonText").innerHTML=langstr["info_deselectAll"];
setButton("dependi0","Large");
setButton("dependi1","Large");
visible(["dependi0","dependi1"],true);
}else{
if(fall==2){
document.getElementById("dependiPreText").innerHTML=langstr["dependi_PreTextRadioGroup"];
document.getElementById("dependiPostText").innerHTML=langstr["dependi_PostTextRadioGroup"];
document.getElementById("dependi0ButtonText").innerHTML=langstr["button_ok"];
document.getElementById("dependi1ButtonText").innerHTML="";
setButton("dependi0","Large");
setButton("dependi1","Large");
visible(["dependi1"],false);
visible(["dependi0"],true);
}
}
}
var doc=getLangDoc(myJSONObject.pcalc.bbs.bb[index[id]].doc);
var temptext = getLangDoc(myJSONObject.pcalc.bbs.bb[index[id]].doc).titletext;
//temptext=breakLongText(temptext,22);
if(temptext.indexOf("- ")>-1){
	temptext=temptext.replace("- ","");
}
if(temptext.indexOf("~")>-1){
	temptext=temptext.replace("~","");
}
document.getElementById("dependiName").innerHTML=temptext;
//document.getElementById("dependiName").innerHTML=myJSONObject.pcalc.bbs.bb[index[id]].id+": "+getLangDoc(myJSONObject.pcalc.bbs.bb[index[id]].doc).titletext;
var _130a="";
for(i=0;i<tmpDepList.length;i++){
_130a+=(getLangDoc(myJSONObject.pcalc.bbs.bb[index[tmpDepList[i]]].doc).titletext+"<br>");
//_130a+=(myJSONObject.pcalc.bbs.bb[index[tmpDepList[i]]].id+": "+getLangDoc(myJSONObject.pcalc.bbs.bb[index[tmpDepList[i]]].doc).titletext+"<br>");
}
if(_130a.indexOf("- ")>-1){
	_130a=_130a.replace("- ", "");
}
if(_130a.indexOf("~")>-1){
	_130a=_130a.replace("~", "");
}
document.getElementById("dependiText").innerHTML=_130a;
calculateWindowSize();
dependi.position_absolute_x=((windowWidth)-550)/2;
dependi.position_absolute_y=320-(tmpDepList.length)*10;
document.getElementById("dependi").style.backgroundColor="white";
document.getElementById("dependi").style.color="black";
document.getElementById("dependi").style.width="520px";
var _130b=document.createElement("depTmpHelper");
document.getElementById(id).appendChild(_130b);
dependi.onHide=function(){
if(document.getElementById("depTmpHelper")){
document.getElementById(id).removeChild(_130b);
}
};
_130b.style.background="#F0F5FB";
dependi.explodeSrc=_130b;
dependi.show();
}
function showTCO(){
  if(stepControl<3){
    return;
  }
  document.getElementById("tco_invest").innerHTML=formatCostCurrency(preis);
  if(document.getElementById("tco_years").innerHTML==null||document.getElementById("tco_years").innerHTML==""){
    if(browser=="IE"){
      var zzsel=document.getElementById("tco_years");
      for(zz=fin_years_min;zz<fin_years_max;zz++){
        var _130d=document.createElement("OPTION");
        _130d.value=zz;
        _130d.text=zz;
        zzsel.add(_130d,zz-fin_years_min);
      }
      var _130d=document.createElement("OPTION");
      _130d.value=zz;
      _130d.text=zz;
      _130d.selected=true;
      zzsel.add(_130d,fin_years_max-fin_years_min);
    }else{
      var _130e="";
      for(zz=fin_years_min;zz<fin_years_max;zz++){
        _130e+="<option value="+zz+" >"+zz+"</option>";
      }
      _130e+="<option value="+fin_years_max+" selected>"+fin_years_max+"</option>";
      document.getElementById("tco_years").innerHTML=_130e;
    }
  }
  document.getElementById("tco_invest").innerHTML=formatCostCurrency(preis);
  document.getElementById("tco_mo").innerHTML= formatCurrency(calcMoTCO(eval(document.getElementById("tco_years").value)));
  calculateWindowSize();
  tco.position_absolute_x=((windowWidth)-550)/2;
  tco.position_absolute_y=200;
  document.getElementById("tco").style.width="560px";
  document.getElementById("tco").style.height="300px";
  document.getElementById("tco").style.padding="0px";
  document.getElementById("tco").style.border="0px";
  document.getElementById("tco").style.margin="0px";
  tco.explodeSrc=document.getElementById("openTCO");
  tco.show();
}

function calcMoTCO(years){
var _1310=fin_intrate/100;
var _1311=12*eval(years);
if(typeof fpu!="undefined"&&fpu==true){
return Math.round(PPMT(_1310/12,_1311,_1311,preis,0,0)/numUser);
}
return PPMT(_1310/12,_1311,_1311,preis,0,0);
}
function PPMT(intr,Per,NPer,PV,FV,Due){
float1=Per-(Due?2:1);
float2=-FV*intr/((Math.pow(1+intr,NPer)-1)*(Due?1+intr:1))+-PV/((Due?1:0)+1/intr*(1-1/Math.pow(1+intr,NPer-(Due?1:0))));
return Math.round((-FV*intr/((Math.pow(1+intr,NPer)-1)*(Due?1+intr:1))-PV/((Due?1:0)+1/intr*(1-1/Math.pow(1+intr,NPer-(Due?1:0))))+(PV*Math.pow(1+intr,float1)-(-0*Math.pow(1+intr,float1)-(1/intr)*float2*(Math.pow(1+intr,float1)-1)*(Due?1+intr:1)-(Due?float2:0)))*intr)*-1);
}
function showLive(){
live.position_absolute_x=((PANEWIDTH)-550)/2;
live.position_absolute_y=200;
document.getElementById("live").style.width="507px";
document.getElementById("live").style.height="300px";
document.getElementById("live").style.padding="0px";
document.getElementById("live").style.border="0px";
document.getElementById("live").style.margin="0px";
live.explodeSrc=document.getElementById("liveButtonTxt");
live.show();
}
function resetInputs(){
if(document.getElementById("solution").options.length==1){
var elems=["two","three","four","smb","smg","preisBlock","openTCO","openTCOIcon","disclaimer2","summaraypage"];
fade(elems,true);
document.getElementById("solution").disabled=true;
}else{
document.getElementById("solution").value="0";
disable(["numEmpl","numUser"],true);
var elems=["two","three","four","smb","smg","preisBlock","openTCO","openTCOIcon","disclaimer2","summaraypage"];
fade(elems,true);
}
document.getElementById("numEmpl").value="";
document.getElementById("numUser").value="";
}
function checkNumEmplOrUser(_1319,_131a){
var _131b=(_1319)?"numEmpl":"numUser";
var _131c=document.getElementById(_131b).value;
var _131d=(_1319)?maxEmpl:maxUser;
var _131e=(_1319)?minEmpl:minUser;
if(_131c>_131d||_131c<_131e){
_131c=(_131c>_131d)?_131d:_131e;
document.getElementById(_131b).value=_131c;
if(_131a){
_1319?numEmpl=_131c:numUser=_131c;
showDependiUserOrEmplOutRange(_1319,true);
flag=1;
return true;
}
}
_1319?numEmpl=_131c:numUser=_131c;
return false;
}
function calcUser(){
if(stepControl<1||document.getElementById("numEmpl").value==""){
return;
}
//if(isTablePricing){document.getElementById('numUser').focus();return;}
var fmmsg=false;
var _1320=document.getElementById("numEmpl").value;
if(isNaN(_1320)||_1320<=0||Math.round(_1320)!=_1320){
showDependiUserOrEmplOutRange(true,false);

if(numEmpl!=0){
document.getElementById("numEmpl").value=numEmpl;
}
return;
}
fmmsg=checkNumEmplOrUser(true,true);
numUser=Math.round(emp_perc*numEmpl);

if(!isNaN(numUser)){
if(numUser<minUser){
numUser=minUser;
}
if(numUser!=-1){
document.getElementById("numUser").value=numUser;
}
document.getElementById("numUser").focus();
checkNumEmplOrUser(false,false);
if(stepControl>2){
updatePreis();
}else{
stepControl=2;
}
if(!fmmsg){
document.getElementById("numUser").focus();
}
if(flag!=0){
document.getElementById("numUser").blur();
}
if(!fmmsg){
flag=0;
}

configChanged=true;
}
}
function closeBubbles(e){
if(isShowTooltip){
var evt=e||window.event;
if(!evt){
return;
}
if(evt.target){
targ=e.target;
}else{
if(evt.srcElement){
targ=e.srcElement;
}
}
if(targ.id&&(targ.id=="tooltipText"||targ.id=="tooltipBubImg")){
return;
}
tooltip.hide();
isShowTooltip=false;
}
}
function adjustUser(){
var _1323=document.getElementById("numUser").value;
var fmmsg=false;
if(alerton){
return;
}
if(isNaN(_1323)||_1323<0||Math.round(_1323)!=_1323){
showDependiUserOrEmplOutRange(false,false);
flg=0;
if(numUser!=0){
document.getElementById("numUser").value=numUser;
}
return;
}
if(_1323!="" && numUser!=_1323){
fmmsg=checkNumEmplOrUser(false,true);
flg=0;
}
if(stepControl>2){
updatePreis();
}
if(stepControl<3&&!fmmsg){
document.getElementById("numUser").blur();
stepControl=2;
if(flg==1){
showSolMap();	
}

}
}
function setSolution(){
var _1325=document.getElementById("solution").value;
if(_1325=="0"||_1325==""){
alert(langstr["step1_please"]);
if(sector!=""){
document.getElementById("solution").value=sector;
}
}else{
if(sector==_1325){
return;
}
sector=_1325;
fixRuebeSize();
if(stepControl<3){
loadXMLHeader(_1325);
}else{
loadXMLHeader(_1325);
loadSolution(_1325);
if(stepControl==4){
for(i=0;i<areasOpen.length;i++){
if(document.getElementById("areaarrow"+i)){
document.getElementById("areaarrow"+i).style.visibility="visible";
}
if(document.getElementById("areatext"+i)){
document.getElementById("areatext"+i).style.cursor="pointer";
}
}
if(document.getElementById("expander")){
document.getElementById("expander").style.visibility="visible";
}
}
}
}
}
function resetEmplIsFocus(){
setTimeout("eval('emplIsFocus=false')",1000);
}
function showSolMap(){
var v = document.getElementById("numEmpl").value;
if(v==""){
showDependiUserOrEmplOutRange(true,false);
document.getElementById("numEmpl").focus();
return;
}
var w = document.getElementById("numUser").value;
if(w==""){
showDependiUserOrEmplOutRange(false,true);
document.getElementById("numUser").focus();
return;
}
if(stepControl!=1&&stepControl!=2){
return;
}
if(stepControl==1){
if(numUser==-1){
if(emplIsFocus==true){
document.getElementById("numUser").focus();
return;
}else{
adjustUser();
}
return;
}
}
loadXML(sector);
}
function toggleArea(_1326){
hideInfoSB();
if(areasOpen[""+_1326]==true){
areasContent[_1326]=document.getElementById("area"+_1326).innerHTML;
document.getElementById("area"+_1326).innerHTML="";
document.getElementById("areaarrow"+_1326).innerHTML="<img src='images/arrow_close.png'>&nbsp;&nbsp;";
areasOpen[""+_1326]=false;
if(allAreasOpen){
allAreasOpen=false;
if(document.getElementById("toggleAreas")){
document.getElementById("toggleAreas").innerHTML=langstr["areas_max"];
}
if(document.getElementById("expander")){
document.getElementById("expander").innerHTML="<img src='images/arrow_close.png' style='cursor:pointer;' onclick='toggleAllAreas()'  >&nbsp;&nbsp;<a style='color: rgb(65, 103, 124); cursor: pointer;' href='javascript:void(0);' onclick='toggleAllAreas()'>Expand All</a>";
}
}
}else{
document.getElementById("area"+_1326).innerHTML=areasContent[_1326];
document.getElementById("areaarrow"+_1326).innerHTML="<img src='images/arrow_open.png'>&nbsp;&nbsp;";
areasOpen[""+_1326]=true;
allAreasOpen=true;
for(var i=0;i<areasIx.length;i++){
var _1328=areasIx[i];
if(!areasOpen[_1328] && document.getElementById("area"+_1328)){
allAreasOpen=false;
break;
}
}
if(allAreasOpen){
if(document.getElementById("toggleAreas")){
document.getElementById("toggleAreas").innerHTML=langstr["areas_min"];
}
if(document.getElementById("expander")){
document.getElementById("expander").innerHTML="<img src='images/arrow_open.png' style='cursor:pointer;' onclick='toggleAllAreas()'  >&nbsp;&nbsp;<a style='color: rgb(65, 103, 124); cursor: pointer;' href='javascript:void(0);' onclick='toggleAllAreas()'>Collapse All</a>";
}
}
}
}
function toggleAllAreas(){
if(allAreasOpen){
for(var i=0;i<areasIx.length;i++){
var _1328=areasIx[i];
if(areasOpen[_1328]==true){
if(document.getElementById("area"+_1328)){
areasContent[_1328]=document.getElementById("area"+_1328).innerHTML;
document.getElementById("area"+_1328).innerHTML="";
document.getElementById("areaarrow"+_1328).innerHTML="<img src='images/arrow_close.png'>&nbsp;&nbsp;";
}
areasOpen[_1328]=false;
}
}
allAreasOpen=false;
if(document.getElementById("toggleAreas")){
document.getElementById("toggleAreas").innerHTML=langstr["areas_max"];
}
if(document.getElementById("expander")){
document.getElementById("expander").innerHTML="<img src='images/arrow_close.png' style='cursor:pointer;' onclick='toggleAllAreas()'  >&nbsp;&nbsp;<a style='color: rgb(65, 103, 124); cursor: pointer;' href='javascript:void(0);' onclick='toggleAllAreas()'>Expand All</a>";
}
}else{
for(var i=0;i<areasIx.length;i++){
var _1328=areasIx[i];
if(!areasOpen[_1328]){
if(document.getElementById("area"+_1328)){
document.getElementById("area"+_1328).innerHTML=areasContent[_1328];
document.getElementById("areaarrow"+_1328).innerHTML="<img src='images/arrow_open.png'>&nbsp;&nbsp;";
}
areasOpen[_1328]=true;
}
}
allAreasOpen=true;
if(document.getElementById("toggleAreas")){
document.getElementById("toggleAreas").innerHTML=langstr["areas_min"];
}
if(document.getElementById("expander")){
document.getElementById("expander").innerHTML="<img src='images/arrow_open.png' style='cursor:pointer;' onclick='toggleAllAreas()'  >&nbsp;&nbsp;<a style='color: rgb(65, 103, 124); cursor: pointer;' href='javascript:void(0);' onclick='toggleAllAreas()'>Collapse All</a>";
}
}
}
function hlBB(id){
if(savedConfig[id]=="off"){
document.getElementById(id).className="zweidh";
}else{
if(savedConfig[id]=="on"){
document.getElementById(id).className="zweih";
}
}
document.getElementById(id+"i").style.opacity=1;
}
function unhlBB(id,_132b){
if(savedConfig[id]=="off"){
document.getElementById(id).className="zweid";
}else{
if(savedConfig[id]=="on"){
document.getElementById(id).className="zwei";
}
}
}
function resetSolMap(){
if(stepControl<3){
return;
}
loadSolution(sector);
configure();
}
function scrollingDetector(){
if(document.getElementById("ruebe").scrollTop!=sclRuebe){
hideInfoSB();
sclRuebe=document.getElementById("ruebe").scrollTop;
}
if(showmaster==true&&(master==null||!master.isVisible())){
document.getElementById("hiderFS").innerHTML="<a href='javascript:void(0);' onclick=javascript:preshowDetail(); >"+langstr["info_factsheet_show"]+"</a>";
showmaster=false;
}
}
function hideInfoSB(_132c){
if(master==null||!master.isVisible()){
document.getElementById("hiderFS").innerHTML="<a href='javascript:void(0);' onclick=javascript:preshowDetail();>"+langstr["info_factsheet_show"]+"</a>";
}
if(_132c){
hider.hide();
clearInterval(sclDtc);
}else{
if(document.getElementById("hider").style.visibility=="visible"){
document.getElementById("hider").style.visibility="hidden";
document.getElementById("hider").style.display="none";
clearInterval(hider.timer);
clearInterval(sclDtc);
}
}
document.getElementById("hiderId").value="";
}
function resetLastBBauf(){
lastBBauf=null;
}
function resetToggleHider(){
toggleHider=true;
}
function preSelectBB(id){
toggleHider=false;
selectBB(id);
setTimeout("resetToggleHider()",50);
if(document.getElementById("hiderId").value!=id){
hideInfoSB();
}
}
function showTooltip(fall){
if(!tooltip){
return;
}
if(stepControl<3&&fall!=5){
return;
}
document.getElementById("tooltipText").style.height="160px";
if(fall==1){
document.getElementById("tooltipText").innerHTML=langstr["licences_info"];
tooltip.position_absolute_y=19+75;
}else{
if(fall==2){
document.getElementById("tooltipText").innerHTML=langstr["services_info"];
tooltip.position_absolute_y=33+75;
}else{
if(fall==3){
document.getElementById("tooltipText").innerHTML=langstr["hardware_info"];
tooltip.position_absolute_y=47+75;
}else{
if(fall==4){
document.getElementById("tooltipText").innerHTML=langstr["lumpsum_info"];
tooltip.position_absolute_y=20+75;
}else{
if(fall==5){
document.getElementById("tooltipText").innerHTML=langstr["users_info"];
tooltip.position_absolute_y=20+75+116;
}else{
if(fall==6){
document.getElementById("tooltipText").innerHTML=langstr["show_price_info"];
tooltip.position_absolute_y=75+25;
}else{
if(fall==7){
document.getElementById("tooltipText").innerHTML=langstr["asp_info"];
tooltip.position_absolute_y=75+25;
}else{
return;
}
}
}
}
}
}
}
tooltip.position_absolute_x=20+593;
if(fall==4){
tooltip.position_absolute_x=20+440;
}else{
if(fall==5){
tooltip.position_absolute_x=document.getElementById("tt5").offsetLeft+20+600-215-54;
}else{
if(fall==6){
tooltip.position_absolute_x=document.getElementById("order3").offsetLeft+20+600;
}else{
if(fall==7){
tooltip.position_absolute_x=20+640;
}
}
}
}
isShowTooltip=true;
var isIE=(browser=="IE")?1:0;
if(isIE&&getInternetExplorerVersion()<7){
document.getElementById("tooltipBub").innerHTML="<div style='width: 329px; height: 217px; filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=images/bubble_topleft.png, sizingMethod=crop);'/>";
}else{
document.getElementById("tooltipBub").innerHTML="<img src='images/bubble_topleft.png'>";
}
tooltip.show();
}
function showInfoSB(id,_1331){
if(!hider||!toggleHider){
return;
}
document.getElementById("hiderFS").innerHTML="<a href='javascript:void(0);' onclick=javascript:preshowDetail();>"+langstr["info_factsheet_show"]+"</a>";
if(document.getElementById("hiderId").value!=""&&lastBBauf==null){
if(id==document.getElementById("hiderId").value){
hideInfoSB(true);
return;
}else{
hideInfoSB();
}
}
document.getElementById("hiderId").value=id;
lastBBauf=id;
setTimeout("resetLastBBauf()",500);
var doc=getLangDoc(myJSONObject.pcalc.bbs.bb[index[id]].doc);
document.getElementById("hiderArea").innerHTML=cutLongText(areasText[_1331],25)+":";
var titel=clearBreaksign(cutLongText(doc.titletext,90));
document.getElementById("hiderName").innerHTML="<b>"+titel+"</b>";
var _1334=doc.shorttext;
if(_1334==null||_1334 instanceof Object){
_1334="";
}
_1334=clearBreaksign(_1334);
document.getElementById("hiderText").innerHTML=cutLongText(_1334,180);
if(mandatorybbs.indexOf("_"+id+"_")>-1){
if(savedConfig[id]=="off"){
document.getElementById("hiderActionCB").innerHTML="<img style='cursor:default' src='images/checkbox_unchecked.gif'/>";
}else{
document.getElementById("hiderActionCB").innerHTML="<img style='cursor:default' src='images/checkbox_checked3.gif'/>";
}
document.getElementById("hiderAction").innerHTML=langstr["bb_preselected"];
}else{
if(savedConfig[id]=="off"){
document.getElementById("hiderAction").innerHTML="<a href='javascript:void(0);' onclick=javascript:selectBB('"+id+"'); style='color: black;'>"+langstr["info_select"]+"</a>";
document.getElementById("hiderActionCB").innerHTML="<img style='cursor:pointer' src='images/checkbox_unchecked.gif'/>";
}else{
document.getElementById("hiderAction").innerHTML="<a href='javascript:void(0);' onclick=javascript:selectBB('"+id+"'); style='color: black;'>"+langstr["info_deselect"]+"</a>";
document.getElementById("hiderActionCB").innerHTML="<img style='cursor:pointer' src='images/checkbox_checked.gif'/>";
}
}
var isIE=(browser=="IE"&&getInternetExplorerVersion()<8)?1:0;
var llv=(document.getElementById(id).offsetTop+(isIE*(document.getElementById("area"+_1331).offsetTop)-document.getElementById("ruebe").scrollTop+30)<270)?0:1;
var llh=(document.getElementById(id).offsetLeft<650)?0:1;
var bub=[["bubble_topleft.png","bubble_topright.png"],["bubble_bottomleft.png","bubble_bottomright.png"]];
if(isIE&&getInternetExplorerVersion()<7){
document.getElementById("hiderBub").innerHTML="<div style='width: 329px; height: 217px; filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=images/"+bub[llv][llh]+", sizingMethod=crop);'/>";
}else{
document.getElementById("hiderBub").innerHTML="<img src='images/"+bub[llv][llh]+"'>";
}
var bub=[["bubble_upperleft.gif","bubble_upperright.gif"],["bubble_lowerleft.gif","bubble_lowerright.gif"]];
document.getElementById("hiderBub").style.top=((llv)?-6:-12)+"px";
document.getElementById("hiderBub").style.left=((llh)?-10:-10)+"px";
hider.position_absolute_x=document.getElementById(id).offsetLeft+140-18+16+12+4-(llh*434)+(10*llv*(1-llh));
hider.position_absolute_y=220+document.getElementById(id).offsetTop+39-13-document.getElementById("ruebe").scrollTop+15+15-(llv*204)+(isIE*(document.getElementById("area"+(_1331)).offsetTop));
hider.explodeSrc=document.getElementById(id);
if(!step3clicked){
document.getElementById("assist").innerHTML=langstr["assist_step4"];
highlight("assist",2000);
}
step3clicked=true;
sclRuebe=document.getElementById("ruebe").scrollTop;
sclDtc=setInterval("scrollingDetector()",250);
if(document.getElementById("bbdemo")){
if(doc.demoUrl&&doc.demoUrl!=""&&doc.demoUrl!="http://"){
document.getElementById("bbdemo").style.visibility="visible";
}else{
document.getElementById("bbdemo").style.visibility="hidden";
}
}
if(document.getElementById("bbfactsheet")){
if(doc.pdfUrl2&&doc.pdfUrl2!=""&&doc.pdfUrl2!="http://"){
document.getElementById("bbfactsheet").style.visibility="visible";
}else{
document.getElementById("bbfactsheet").style.visibility="hidden";
}
}
hider.show();
if(master!=null&&master.isVisible()){
showDetail();
}
}
function clearBreaksign(txt){
if(txt.indexOf("~")==-1){
return txt;
}
return txt.split("~").join("");
}
function openNWindow(_133a,B,H){
if(B==null){
B=1024;
}
if(H==null){
H=730;
}
MeinFenster=window.open(_133a,"Zweitfenster"+Math.round((Math.random()*10000)),"width="+B+",height="+H+",left=100,top=100,menubar=no,status=no,scrollbars=no,resizable=no");
setTimeout("MeinFenster.focus()",300);
}
function downIndPdf(fall){
if(stepControl<1){
return;
}
var _133e="Industry_Value_Proposition_Manufacturing.pdf";
if(sector=="Services"){
_133e="Industry_Value_Proposition_Service_Provider.pdf";
}else{
if(sector=="Trade"){
_133e="Industry_Value_Proposition_Wholesale.pdf";
}
}
_133e="../../../pdfStore/docu/"+_133e;
if(langstr["industry_pdf."+sector]!=null&&langstr["industry_pdf."+sector].length>0){
_133e=langstr["industry_pdf."+sector];
}
_133e=(myJSONObjectHeader.pdfUrl)?myJSONObjectHeader.pdfUrl:_133e;
if(fall!=null&&fall==2){
_133e=(myJSONObjectHeader.pdfUrl2)?myJSONObjectHeader.pdfUrl2:_133e;
}
//added date:2010/08/18 ---start
var urls = _133e.split("/");
var lasturl = urls[urls.length-1].split(".");
if((lasturl.length==2&&lasturl[1]!="pdf"&&lasturl[1].indexOf("?")==-1)||(fall!=null && fall==2)){
//added date:2010/08/18 ---end
//if(_133e.indexOf(".pdf")==-1){
window.frames["showValueIFrame"].location.href=_133e;
var _133f=1024;
var _1340=740;
showValue.position_absolute_x=(windowWidth-_133f)*0.5;
showValue.position_absolute_y=60;
document.getElementById("showValue").style.width=_133f+"px";
document.getElementById("showValue").style.height=_1340+"px";
document.getElementById("showValue_content").style.height=(_1340-10)+"px";
document.getElementById("showValueIFrame").style.height=(_1340-30)+"px";
document.getElementById("showValueIFrame").style.width=(_133f-10)+"px";
document.getElementById("showValue_header").innerHTML="";
document.getElementById("showValue").style.padding="0px";
document.getElementById("showValue").style.border="0px";
document.getElementById("showValue").style.margin="0px";
showValue.explodeSrc=document.getElementById((fall!=null&&fall==2)?"downInd2":"downInd");
showValue.show();
if(lasturl.length==2&&lasturl[1]!="pdf"&&lasturl[0].indexOf("_BE2_")>0)
{
	setTimeout("toggleImage(window.frames['showValueIFrame'].document)",300);
}

}else{
openNWindow(_133e);
}
}
function toggleImage(target){
	if(target !=null ) {
		try{
			target.shrinkToFit();
			target.toggleImageSize();
		} catch (e){
	}
 }
	
}
function oplink(link){
if(link!=null&&link.indexOf("http")!=-1){
openNWindow(link,550,375);
}
}
function oplink2(link,_1343,pre){
if(link!=null){
window.frames["showValueIFrame"].location.href=link;
var _1345=1000;
var _1346=588;
showValue.position_absolute_x=(windowWidth-_1345)*0.5;
showValue.position_absolute_y=60;
document.getElementById("showValue").style.width=_1345+"px";
document.getElementById("showValue").style.height=(_1346+20)+"px";
document.getElementById("showValue_content").style.height=(_1346-10)+"px";
document.getElementById("showValueIFrame").style.height=(_1346-20)+"px";
document.getElementById("showValueIFrame").style.width=(_1345-10)+"px";
if(pre&&pre=="opsv"){
document.getElementById("showValue_header").innerHTML=areasText[""+_1343].replace(/ /,"&nbsp;");
}else{
document.getElementById("showValue_header").innerHTML="";
}
document.getElementById("showValue").style.padding="0px";
document.getElementById("showValue").style.border="0px";
document.getElementById("showValue").style.margin="0px";
showValue.explodeSrc=document.getElementById((pre&&!pre=="")?(pre+_1343):""+_1343);
showValue.show();
}
}
function oplink3(fall){
if(fall==null){
return;
}
var id=document.getElementById("hiderId").value;
var _1349="";
zzdoc=getLangDoc(myJSONObject.pcalc.bbs.bb[index[id]].doc);
if(zzdoc==null){
return;
}
if(fall=="Demo"&&zzdoc.demoUrl){
openNWindow(zzdoc.demoUrl);
}else{
if(fall=="Factsheet"&&zzdoc.pdfUrl2){
openNWindow(zzdoc.pdfUrl2);
}
}
}
function downIndPdf2(){
if(stepControl<1){
return;
}
var _134a="Industry_Value_Proposition_Manufacturing.pdf";
if(sector=="Services"){
_134a="Industry_Value_Proposition_Service_Provider.pdf";
}else{
if(sector=="Trade"){
_134a="Industry_Value_Proposition_Wholesale.pdf";
}
}
_134a="../../../pdfStore/docu/"+_134a;
if(langstr["industry_pdf."+sector]!=null&&langstr["industry_pdf."+sector].length>0){
_134a=langstr["industry_pdf."+sector];
}
_134a=(myJSONObjectHeader.pdfUrl)?myJSONObjectHeader.pdfUrl:_134a;
openNWindow(_134a);
}
function showDependiUserOrEmplOutRange(empl,valid){
var _134d;
if(empl){
if(valid){
_134d=langstr["dependi_TextPersonsRange"];
if(_134d.indexOf("{0}")>-1){
	_134d = _134d.replace("{0}","");
}
_134d=_134d.replace(/<minEmpl>/,minEmpl);
_134d=_134d.replace(/<maxEmpl>/,maxEmpl);
}else{
_134d=langstr["alert_empl"];
}
dependi.explodeSrc=document.getElementById("numEmpl");
}else{
if(valid){
_134d=langstr["dependi_TextUserRange"];
if(_134d.indexOf("{0}")>-1){
	_134d = _134d.replace("{0}","");
}
_134d=_134d.replace(/<minUser>/,minUser);
_134d=_134d.replace(/<maxUser>/,maxUser);
}else{
_134d=langstr["alert_user"];
}
dependi.explodeSrc=document.getElementById("numUser");
}
document.getElementById("dependiName").innerHTML="";
document.getElementById("dependiPreText").innerHTML="";
document.getElementById("dependiText").innerHTML=_134d;
document.getElementById("dependiPostText").innerHTML="";
setButton("dependi1","Small");
document.getElementById("dependi1ButtonText").innerHTML=langstr["button_ok"];
visible(["dependi0"],false);
visible(["dependi1"],true);
calculateWindowSize();
dependi.position_absolute_x=((windowWidth)-350)/2;
dependi.position_absolute_y=300;
document.getElementById("dependi").style.width="350px";
document.getElementById("numEmpl").blur();
document.getElementById("numUser").blur();
document.getElementById("dependi1").onclick=function(){
dependi.hide();
if(empl){
document.getElementById("numEmpl").focus();
}else{
document.getElementById("numUser").focus();
}
};
document.getElementById("dependi0").onclick=function(){
dependi.hide();
if(empl){
document.getElementById("numEmpl").focus();
}else{
document.getElementById("numUser").focus();
}
};
dependi.show();

}
function hideDialog(_134e){
var dia=dojo.widget.byId(_134e);
if(dia!=null&&dia!="undefined"){
dia.hide();
}
}
function preshowDetail(){
setTimeout("showDetail(true)",0);
}
function showDetailWindow(_1350){
var href = location.href;
href = href.substring(0,href.indexOf("/apps/"));
var id=document.getElementById("hiderId").value;
var doc=getLangDoc(myJSONObject.pcalc.bbs.bb[index[id]].doc);
var _1353=clearBreaksign(doc.titletext);
var _1348=windowHeight-120;
if(master==null||!master.isVisible()){
document.getElementById("hiderFS").innerHTML="<a href='javascript:preshowDetail();' >"+langstr["info_factsheet_hide"]+"</a>";
master=new Window({className:"dialog",width:800,height:_1348,top:24,left:200,zIndex:1000,opacity:1});
master.setTitle(_1353);
detailURL=true;
if(doc.doc_home&&doc.doc_home.length>0&&doc.doc_home.indexOf("http:")<0){
	if(doc.doc_home.startsWith("//")){
		doc.doc_home="http:" + doc.doc_home;
	}else{
		doc.doc_home="http://" + doc.doc_home;
	}	
}
if(doc.doc_home&&doc.doc_home.length>0&&doc.doc_home.indexOf("http://")==0){
	if(HideTable){
		master.setURL("../v2/Hidetable.jsp?href="+doc.doc_home);
	}else{
		master.setURL(doc.doc_home);
	}
detailURL=true;
}else{
master.setURL("");
master.setHTMLContent("<div style='font-size:13px; line-height: 18px;  color: black; background-color: white;width:100%; height:100%;'>No details available for this Scenario.</div>");
detailURL=false;
}
master.setDestroyOnClose();
master.show();
showmaster=true;
}else{
if(_1350){
master.close();
document.getElementById("hiderFS").innerHTML="<a href='javascript:preshowDetail();' >"+langstr["info_factsheet_show"]+"</a>";
showmaster=false;
}
master.setTitle(_1353);
if(doc.doc_home&&doc.doc_home.length>0&&doc.doc_home.indexOf("http:")<0){
	if(doc.doc_home.startsWith("//")){
		doc.doc_home="http:" + doc.doc_home;
	}else{
		doc.doc_home="http://" + doc.doc_home;
	}	
}
if(doc.doc_home&&doc.doc_home.length>0&&doc.doc_home.indexOf("http://")==0){
	if(HideTable){	
		master.setURL("../v2/Hidetable.jsp?href="+doc.doc_home);
	}else{
		master.setURL(doc.doc_home);
	}
if(!detailURL){
master.show();
}
detailURL=true;
}else{
master.setURL("");
master.setHTMLContent("<div style='font-size:13px; line-height: 18px; color: black; background-color: white;width:100%; height:100%;'>No details available for this Scenario.</div>");
if(detailURL){
master.show();
}
detailURL=false;
}
}
}
function showDetailDialog(id,doc,_1356){
	var href = location.href;
	href = href.substring(0,href.indexOf("/apps/"));
	if(master==null||!master.isVisible()){
		var id=document.getElementById("hiderId").value;
		var doc=getLangDoc(myJSONObject.pcalc.bbs.bb[index[id]].doc);
		var _1343=clearBreaksign(doc.titletext);
		var _1348=windowHeight-120;
		document.getElementById("hiderFS").innerHTML="<a href='javascript:preshowDetail();' >"+langstr["info_factsheet_hide"]+"</a>";
		master=new Window({className:"dialog",width:800,height:_1348,top:24,left:200,zIndex:1000,opacity:1});
		master.setTitle(_1343);
		detailURL=true;
		if(doc.doc_home&&doc.doc_home.length>0&&doc.doc_home.indexOf("http:")<0){
			if(doc.doc_home.startsWith("//")){
				doc.doc_home="http:" + doc.doc_home;
			}else{
				doc.doc_home="http://" + doc.doc_home;
			}	
		}
		if(doc.doc_home&&doc.doc_home.length>0&&doc.doc_home.indexOf("http://")==0){
		if(HideTable){
			master.setURL("../v2/Hidetable.jsp?href="+doc.doc_home);
			}else{
			master.setURL(doc.doc_home);
			}
		}else{
			master.setURL(href+"/apps/v2/dialogerror.html");
		}
		calculateWindowSize();
		var _1347=800;
		var _1348=windowHeight-90;

		master.setDestroyOnClose();
		master.show();
		hideInfoSB(true);
		if(1==1){
		return;
		}
		}else{
		if(toggleme==undefined||toggleme ==null){
			var toggleme = false;
		}
		if(toggleme){
		master.close();
		showmaster=false;
		}
		master.setTitle(_1356);
		if(doc.doc_home&&doc.doc_home.length>0&&doc.doc_home.indexOf("http:")<0){
			if(doc.doc_home.startsWith("//")){
				doc.doc_home="http:" + doc.doc_home;
			}else{
				doc.doc_home="http://" + doc.doc_home;
			}	
		}
		if(doc.doc_home&&doc.doc_home.length>0&&doc.doc_home.indexOf("http://")==0){
		if(HideTable){
		master.setURL("../v2/Hidetable.jsp?href="+doc.doc_home);
		}else{
		master.setURL(doc.doc_home);
		}
		if(!detailURL){
		master.show();
		}
		detailURL=true;
		}else{
			master.setURL(href+"/apps/v2/dialogerror.html");
		if(detailURL){
		master.show();
		}
		detailURL=false;
		}
		}
}
function showDetail(_1359){
var id=document.getElementById("hiderId").value;
var doc=getLangDoc(myJSONObject.pcalc.bbs.bb[index[id]].doc);
var _135c=clearBreaksign(doc.titletext);
if(useIframes){
showDetailWindow(_1359);
}else{
showDetailDialog(id,doc,_135c);
}
}
function downloadUFL(){
if(stepControl<3){
return;
}
var _135d="|";
for(i=0;i<myJSONObject.pcalc.bbs.bb.length;i++){
var bb=myJSONObject.pcalc.bbs.bb[i];
if(savedConfig[bb.id]=="on"&&(hiddenbbs.indexOf("|"+bb.id+"|")==-1)){
_135d+=bb.id+"|";
}
}
var dest="download2.jsp?configlist="+_135d+"&preis="+formatCostCurrency(preis)+"&hardwarePreis="+formatCostCurrency(hardwarePreis)+"&servicesPreis="+formatCostCurrency(servicesPreis)+"&licensesPreis="+formatCostCurrency(licensesPreis)+"&numEmpl="+numEmpl+"&numUser="+numUser+"&sector="+sector+"&lastSavedConfigFilename="+lastSavedConfigFilename+"&mailPermitted=yes";
location.href=dest;
}
function showFuncListWindow(dest){
if(funcli==null||!funcli.isVisible()){
if(typeof xkf!="undefined"&&xkf==true){
calculateWindowSize();
var _1361=7;
if(windowWidth>minWindowWidth){
_1361=7+(windowWidth-1007)/2;
}
var _1362=660;
if(windowHeight<minWindowHeight){
_1362=windowHeight-86;
}
funcli=new Window("funcli_window"+timestamp(),{className:"dialog",url:dest,title:langstr["contact_title"],showEffect:Effect.Appear,showEffectOptions:{duration:2},width:1007,height:_1362,top:42,left:_1361,zIndex:1001,opacity:1});
}else{
funcli=new Window("funcli_window"+timestamp(),{className:"dialog",url:dest,title:langstr["contact_title"],showEffect:Effect.Appear,showEffectOptions:{duration:2},width:825,height:620,top:20,left:116,zIndex:1001,opacity:1});
}
funcli.setDestroyOnClose();
funcli.show();
}else{
funcli.setURL(dest);
}
}
function showFuncListDialog(dest){
if(1==1){
if(typeof xkf!="undefined"&&xkf==true){
calculateWindowSize();
var _1364=7;
if(windowWidth>minWindowWidth){
_1364=7+(windowWidth-1007)/2;
}
var _1365=660;
if(windowHeight<minWindowHeight){
_1365=windowHeight-86;
}
}else{
}
calculateWindowSize();
var _1366=998;
var _1367=windowHeight-58;
newContactForm.position_absolute_x=(windowWidth-_1366)*0.5;
newContactForm.position_absolute_y=48;
funcli=newContactForm;
document.getElementById("newContactForm").style.width=_1366+"px";
document.getElementById("newContactForm").style.height=_1367+"px";
document.getElementById("newContactForm_content").style.height=(_1367-10)+"px";
document.getElementById("newContactIFrame").style.height=(_1367-20)+"px";
document.getElementById("newContactIFrame").style.width=(_1366-10)+"px";
document.getElementById("newContactForm").style.padding="0px";
document.getElementById("newContactForm").style.border="0px";
document.getElementById("newContactForm").style.margin="0px";
newContactForm.explodeSrc=document.getElementById("order");
window.frames["newContactIFrame"].location.href=dest;
newContactForm.show();
}else{
}
}
function showFuncList(){
var _1368="|";
for(i=0;i<myJSONObject.pcalc.bbs.bb.length;i++){
var bb=myJSONObject.pcalc.bbs.bb[i];
if(savedConfig[bb.id]=="on"&&(hiddenbbs.indexOf("|"+bb.id+"|")==-1)){
_1368+=bb.id+"|";
}
}
var prefixKey =document.getElementById("prefixKey").innerHTML;
var dest="contform.jsp?configlist="+_1368+"&preis="+formatCostCurrency(preis)+"&hardwarePreis="+formatCostCurrency(hardwarePreis)+"&servicesPreis="+formatCostCurrency(servicesPreis)+"&licensesPreis="+formatCostCurrency(licensesPreis)+"&numEmpl="+numEmpl+"&numUser="+numUser+"&sector="+sector+"&lastSavedConfigFilename="+lastSavedConfigFilename+"&mailPermitted=yes";
if(typeof xkf!="undefined"&&xkf==true){
if(typeof sCF!="undefined"&&sCF!=""){
dest="../../../apps/"+sCF+".jsp?lastSavedConfigFilename="+lastSavedConfigFilename+"&configlist="+_1368+"&preis="+formatCostCurrency(preis)+"&hardwarePreis="+formatCostCurrency(hardwarePreis)+"&servicesPreis="+formatCostCurrency(servicesPreis)+"&licensesPreis="+formatCostCurrency(licensesPreis)+"&numEmpl="+numEmpl+"&numUser="+numUser+"&sector="+sector+"&mailPermitted=yes&numUserProf="+(numUserProf+numUserProfExtra)+"&numUserLimProf="+(numUserLimProf+numUserLimProfExtra)+"&numUserEmpl="+numUserEmpl+"&numUserMinPkg="+packusreq;
}else{
dest="../../../apps/contform2.jsp?lastSavedConfigFilename="+lastSavedConfigFilename+"&configlist="+_1368+"&preis="+formatCostCurrency(preis)+"&hardwarePreis="+formatCostCurrency(hardwarePreis)+"&servicesPreis="+formatCostCurrency(servicesPreis)+"&licensesPreis="+formatCostCurrency(licensesPreis)+"&numEmpl="+numEmpl+"&numUser="+numUser+"&sector="+sector+"&mailPermitted=yes&numUserProf="+(numUserProf+numUserProfExtra)+"&numUserLimProf="+(numUserLimProf+numUserLimProfExtra)+"&numUserEmpl="+numUserEmpl+"&numUserMinPkg="+packusreq;
}
}
dest = dest + "&prefixKey="+prefixKey;
if(useIframes){
showFuncListWindow(dest);
}else{
showFuncListDialog(dest);
}
writeSessionValue("showFuncList",lastSavedConfigFilename);
}
function outputConfig(_136b){
if(stepControl<3){
return;
}
if(!configChanged&&lastSavedConfigFilename!=""){
if(_136b){
showFuncList();
}
return;
}
var _136c={"config":{"@version":"1","@locale":"DE","@name":"Manufactoring","bbconfigfile":bbConfigFile,"@credat":dojo.date.format(new Date(),{datePattern:"yyyyMMdd",selector:"dateOnly"}),"@cretim":dojo.date.format(new Date(),{timePattern:"HHmmss",selector:"timeOnly"}),"@creator":"SAP preconfiguration","@sessionid":"382374","@users":numUser,"@empls":numEmpl,"@sector":sector,"result":{"@lic":licensesPreis,"@services":servicesPreis,"@hardware":hardwarePreis,"@total":preis},"selection":{"bb":[]},"history":{"change":[]}}};
for(i=0;i<myJSONObject.pcalc.bbs.bb.length;i++){
if(savedConfig[myJSONObject.pcalc.bbs.bb[i].id]=="on"){
_136c.config.selection.bb.push(myJSONObject.pcalc.bbs.bb[i].id);
}
}
PCalcServer.writeData(app,partner,json2xml(_136c,"\t"),function(data){
setLastSavedConfigFilename(data);
if(_136b){
showFuncList();
}
});
}
var saveHandler=function(_136e,_136f){
return;
};
var setLastSavedConfigFilename=function(data){
lastSavedConfigFilename=data;
configChanged=false;
};
function setBBConfigFile(data){
bbConfigFile=data;
}
function openInfoDialog(chStr,_1373){
Dialog.info(chStr,{windowParameters:{className:"alert_lite",width:400,height:100},showProgress:false});
timeout=1;
setTimeout("Dialog.closeInfo()",_1373*1000);
}
function dg(text){
dojo.debug(text);
}
function fade(elems,on){
var myOpa=on?15:100;
var node;
var tds;
for(i=0;i<elems.length;i++){
node=document.getElementById(elems[i]);
if(node){
if(browser=="IE"){
if(on){
node.style.filter="Alpha(Opacity="+myOpa+", finishopacity="+myOpa+")";
}else{
node.style.filter=null;
}
}else{
if(browser=="Safari"||browser=="Chrome"){
node.style.opacity=myOpa/100;
}else{
node.style.MozOpacity=myOpa/100;
}
}
}
}
}
function submitenter(func,e){
var evt=e||window.event;
if(!evt){
return;
}
if(evt.keyCode==13||evt.keyCode==9){
if(func=="calcUser();"&&document.getElementById("numEmpl").value==""){
document.getElementById("numUser").focus();
}else{
if(evt.keyCode==13){
flg = 1;
}

setTimeout(func,10);
}
}
}
function disable(elems,on){
for(i=0;i<elems.length;i++){
document.getElementById(elems[i]).disabled=on;
}
}
function visible(elems,on){
var att1="";
for(i=0;i<elems.length;i++){
aat1=on?"visible":"hidden";
document.getElementById(elems[i]).style.visibility=aat1;
var disp=document.getElementById(elems[i]).style.display;
if(on&&disp=="none"){
document.getElementById(elems[i]).style.display="";
}
if(!on){
document.getElementById(elems[i]).style.display="none";
}
}
}
function formatCurrency(nStr){
if(langstr["currency_seperator"]!=null&&langstr["currency_seperator"]!=""){
nStr+="";
x=nStr.split(".");
x1=x[0];
x2=x.length>1?"."+x[1]:"";
var rgx=/(\d+)(\d{3})/;
while(rgx.test(x1)){
//x1=x1.replace(rgx,"$1"+langstr["currency_seperator"]+"$2");
x1=x1.replace(rgx,"$1"+" "+"$2");
}
return x1+x2+" "+myJSONObject.pcalc.cuky;
}else{
if(langstr["lang"]=="en"){
nStr+="";
x=nStr.split(".");
x1=x[0];
x2=x.length>1?"."+x[1]:"";
var rgx=/(\d+)(\d{3})/;
while(rgx.test(x1)){
//x1=x1.replace(rgx,"$1"+","+"$2");
x1=x1.replace(rgx,"$1"+" "+"$2");
}
return x1+x2+" "+myJSONObject.pcalc.cuky;
}else{
if(langstr["lang"]=="de"||langstr["lang"]=="fr"){
nStr+="";
x=nStr.split(".");
x1=x[0];
x2=x.length>1?","+x[1]:"";
var rgx=/(\d+)(\d{3})/;
while(rgx.test(x1)){
//x1=x1.replace(rgx,"$1"+"."+"$2");
x1=x1.replace(rgx,"$1"+" "+"$2");
}
return x1+x2+" "+myJSONObject.pcalc.cuky;
}else{
nStr+="";
x=nStr.split(".");
x1=x[0];
x2=x.length>1?"."+x[1]:"";
var rgx=/(\d+)(\d{3})/;
while(rgx.test(x1)){
//x1=x1.replace(rgx,"$1"+"'"+"$2");
x1=x1.replace(rgx,"$1"+" "+"$2");
}
return x1+x2+" "+myJSONObject.pcalc.cuky;
}
}
}
}
function formatCostCurrency(nStr){
	nStr+="";
	var rgx=/(\d+)(\d{3})/;
    while(rgx.test(nStr)) {
    	nStr = nStr.replace(rgx,'$1' + " " + '$2');
    }
    return nStr+" "+myJSONObject.pcalc.cuky;
}
function enableAllTabs(){
document.getElementById("solution").disabled=false;
document.getElementById("solution").style.visibility="visible";
}
function acceptDisclaimer(){
if(document.getElementById("solution").options.length!=1){
document.getElementById("solution").disabled=false;
}else{
setSolution();
}
document.getElementById("solution").style.visibility="visible";
disclaimer.hide();
highlight("assist",2000);
}
function closeItIE(){
if(!((window.event.clientX<0)||(window.event.clientY<0))){
return;
}
if(stepControl<2){
return;
}
outputConfig(false);
writeSessionValue("exit","closeItIE");
event.returnValue="";
}
function closeItFirefox(){
if(stepControl<2){
return;
}
outputConfig(false);
if(funcli!=null&&funcli.isVisible()){
if(funcli.getContent().contentDocument.location.toString().indexOf("contform.jsp")>0){
funcli.getContent().contentWindow.validate(true);
}
}
var mesg="";
writeSessionValue("exit","closeItFireFox");
return mesg;
}
function setSC(scobj){
scJSONObject=scobj;
}
function setLoadedConfigXML(data){
loadedConfigXML=data;
}
function getLangDoc(doc){
if(doc.lang!=null){
return doc;
}
for(ii=0;ii<doc.length;ii++){
if(doc[ii].lang==langstr["lang"]||doc[ii].lang==langstr["lang"].toUpperCase()){
return doc[ii];
}
}
return null;
}
function highlight(eln,dur){
var sCol=""+document.getElementById(eln).style.backgroundColor;
if(sCol==""||sCol=="white"||sCol=="transparent"||sCol=="transparent"||sCol=="rgb(223, 232, 239)"||sCol.indexOf("223,232,239")>0){
dojo.fx.html.colorFadeIn(document.getElementById(eln),dur,"#FFE874",100,"",false);
}
}
function hadDoubleClick(){
var d=new Date();
var now=d.getTime();
if((now-dcAt)<dcDelay){
return true;
}
return false;
}
function handleWisely(which,bbid,_1390){
switch(which){
case "click":
if(hadDoubleClick()){
return false;
}
savEvent=which;
d=new Date();
savEvtTime=d.getTime();
tmpid=bbid;
tmplayer=_1390;
savTO=setTimeout("doClick(savEvent,tmpid,tmplayer)",dcTime);
break;
case "dblclick":
doDoubleClick(which,bbid);
break;
default:
}
}
function cutLongText(txtaa,_1392){
var _1393=""+txtaa;
if(_1393.length>_1392){
_1393=_1393.substring(0,_1392);
_1393=_1393.substring(0,_1393.lastIndexOf(" "));
_1393+=" ...";
}
return _1393;
}
function breakLongText(txtaa,_1395){
if((txtaa.indexOf(" ")>_1395)||(txtaa.indexOf(" ")==-1&&txtaa.length>_1395)){
if(txtaa.indexOf("~")>-1){
txtaa=txtaa.substring(0,txtaa.indexOf("~"))+"- "+txtaa.substring(txtaa.indexOf("~")+1);
}else{
txtaa=txtaa.substring(0,_1395-6)+"- "+txtaa.substring(_1395-6);
}
}
return txtaa;
}
function doClick(which,bbid,_1398){
if(savEvtTime-dcAt<=0){
return false;
}
showInfoSB(bbid,_1398);
}
function doDoubleClick(which,bbid){
var d=new Date();
dcAt=d.getTime();
if(savTO!=null){
clearTimeout(savTO);
savTO=null;
}
selectBB(bbid);
}
function flattenList(elem){
if(!elem||typeof elem!="string"||elem.length==0){
return "";
}
var res="_";
var _139e=elem.split(",");
for(j=0;j<_139e.length;j++){
res+=(_139e[j].replace(/^\s+|\s+$/g,"")+"_");
}
return res;
}
function selectOnBB(id){
for(r=0;r<radioGroups.length;r++){
if(radioGroups[r].indexOf("_"+id+"_")>-1){
var _13a0=false;
tmpDepList=new Array();
rgArr=radioGroups[r].substring(1,radioGroups[r].length-1).split("_");
for(i=0;i<rgArr.length;i++){
if(savedConfig[rgArr[i]]=="on"){
_13a0=true;
tmpDepList.push(rgArr[i]);
}
}
if(_13a0){
return 2;
}
}
}
tmpDepList=new Array();
if(deps[id]!=null){
for(i=0;i<deps[id].length;i++){
if(savedConfig[deps[id][i]]=="off"){
tmpDepList.push(deps[id][i]);
}
}
}
if(tmpDepList.length>0){
return 0;
}else{
reverse(id);
}
return "OK";
}
function loadSavedConfig(){
sector=savedConfigJSONObject.config.sector;
document.getElementById("solution").value=sector;
PCalcServer.getConfigUsers(app,partner,scope,version,sector,langstr["lang"],function(data){
myJSONObjectHeader=eval("("+data+")");
dg("JSON header at saved config init: "+myJSONObjectHeader);
myHandlerHeader();
loadSavedXML();
});
}
function loadSavedXML(){
document.getElementById("ruebe").innerHTML="<div style='padding-left:2px;padding-top:1px;'><img src='images/loading.gif' border='0'></div>";
PCalcServer.getBBConfigFile(app,partner,scope,version,function(data){
setBBConfigFile(data);
});
PCalcServer.getData(app,partner,scope,version,function(data){
myJSONObject=eval("("+data+")");
createInfoBase();
loadSavedConfigInformation();
});
}
function loadSavedConfigInformation(){
numUser=eval(savedConfigJSONObject.config.users);
numEmpl=eval(savedConfigJSONObject.config.empls);
document.getElementById("numUser").value=numUser;
document.getElementById("numEmpl").value=numEmpl;
stepControl=4;
loadSolution(sector);
document.getElementById("numUser").blur();
historyList=new Array();
}
function writeSessionValue(_13a4,_13a5){
	var prefixKey =document.getElementById("prefixKey").innerHTML;
if(typeof disableStat!="undefined"&&disableStat==true){
return;
}
var href="../v2/statisticFunctionAjax.jsp?event="+_13a4+"&eventMessage="+_13a5+"&prefixKey="+prefixKey;
var dest=encodeURI(href);
var xhr=dojo.hostenv.getXmlhttpObject();
xhr.open("GET",dest,true);
xhr.onreadystatechange=function(){
if(xhr.readyState==4){
}
};
xhr.send(null);
}

//added date:2010/10/25 ----start
/*
function turnOnShowPrice(sw){
showPriceOnStart=true;
if(document.getElementById("order2")){
document.getElementById("order2").style.visibility="hidden";
}
if(document.getElementById("order3")){
document.getElementById("order3").style.visibility="hidden";
}
if(document.getElementById("totaltag")){
document.getElementById("totaltag").style.visibility="visible";
}
if(document.getElementById("preis")){
document.getElementById("preis").style.visibility="visible";
}
if(document.getElementById("tt4")){
document.getElementById("tt4").style.visibility="visible";
}
if(document.getElementById("openTCOIcon")){
document.getElementById("openTCOIcon").style.visibility="visible";
}
if(document.getElementById("tcoStartingFrom")){
document.getElementById("tcoStartingFrom").style.visibility="visible";
}
if(document.getElementById("openTCO")){
document.getElementById("openTCO").style.visibility="visible";
}
if(sw){
if(document.getElementById("tt1")){
document.getElementById("tt1").style.visibility="visible";
}
if(document.getElementById("tt2")){
document.getElementById("tt2").style.visibility="visible";
}
if(document.getElementById("tt3")){
document.getElementById("tt3").style.visibility="visible";
}
if(document.getElementById("licensestag")){
document.getElementById("licensestag").style.visibility="visible";
}
if(document.getElementById("licensesPreis")){
document.getElementById("licensesPreis").style.visibility="visible";
}
if(document.getElementById("servicestag")){
document.getElementById("servicestag").style.visibility="visible";
}
if(document.getElementById("servicesPreis")){
document.getElementById("servicesPreis").style.visibility="visible";
}
if(document.getElementById("servertag")){
document.getElementById("servertag").style.visibility="visible";
}
if(document.getElementById("hardwarePreis")){
document.getElementById("hardwarePreis").style.visibility="visible";
}
if(document.getElementById("licensestag")){
document.getElementById("licensestag").style.visibility="visible";
}
if(document.getElementById("servicestag")){
document.getElementById("servicestag").style.visibility="visible";
}
if(document.getElementById("servertag")){
document.getElementById("servertag").style.visibility="visible";
}
if(document.getElementById("totaltag")){
document.getElementById("totaltag").style.visibility="visible";
}
}else{
if(document.getElementById("totalcomment")){
document.getElementById("totalcomment").style.visibility="visible";
}
}
}
*/
function turnOnShowPrice(sw,showLicenses,showServices,showServer,showTotal){
	showPriceOnStart=true;
	if(document.getElementById("order2")){
		document.getElementById("order2").style.visibility="hidden";
	}
	if(document.getElementById("order3")){
		document.getElementById("order3").style.visibility="hidden";
	}
	/*if(document.getElementById("totaltag")){
		document.getElementById("totaltag").style.visibility="visible";
	}
	if(document.getElementById("preis")){
		document.getElementById("preis").style.visibility="visible";
	}
	if(document.getElementById("tt4")){
		document.getElementById("tt4").style.visibility="visible";
	}*/
	if(document.getElementById("openTCOIcon")){
		document.getElementById("openTCOIcon").style.visibility="visible";
	}
	if(document.getElementById("tcoStartingFrom")){
		document.getElementById("tcoStartingFrom").style.visibility="visible";
	}
	if(document.getElementById("openTCO")){
		document.getElementById("openTCO").style.visibility="visible";
	}
	if(sw){
		if(showLicenses){
			if(document.getElementById("tt1")){
				document.getElementById("tt1").style.visibility="visible";
			}
			if(document.getElementById("licensestag")){
				document.getElementById("licensestag").style.visibility="visible";
			}
			if(document.getElementById("licensesPreis")){
				document.getElementById("licensesPreis").style.visibility="visible";
			}
		}
		if(showServices){
			if(document.getElementById("tt2")){
				document.getElementById("tt2").style.visibility="visible";
			}
			if(document.getElementById("servicestag")){
				document.getElementById("servicestag").style.visibility="visible";
			}
			if(document.getElementById("servicesPreis")){
				document.getElementById("servicesPreis").style.visibility="visible";
			}
		}
		if(showServer){
			if(document.getElementById("tt3")){
				document.getElementById("tt3").style.visibility="visible";
			}
			if(document.getElementById("servertag")){
				document.getElementById("servertag").style.visibility="visible";
			}
			if(document.getElementById("hardwarePreis")){
				document.getElementById("hardwarePreis").style.visibility="visible";
			}
		}
		if(showTotal){
			if(document.getElementById("tt4")){
				document.getElementById("tt4").style.visibility="visible";
			}
			if(document.getElementById("totaltag")){
				document.getElementById("totaltag").style.visibility="visible";
			}
			if(document.getElementById("preis")){
				document.getElementById("preis").style.visibility="visible";
			}
		}
	}else{
		if(document.getElementById("tt4")){
			document.getElementById("tt4").style.visibility="visible";
		}
		if(document.getElementById("totaltag")){
			document.getElementById("totaltag").style.visibility="visible";
		}
		if(document.getElementById("preis")){
			document.getElementById("preis").style.visibility="visible";
		}
		if(document.getElementById("totalcomment")){
			document.getElementById("totalcomment").style.visibility="visible";
		}
	}
}
//added date:2010/10/25 ----end

function addLanguageSelectionToDisclaimer(){
var elem=document.getElementById("topStrecher");
var _13ab=null;
if(elem!=null){
for(var i=0;i<elem.childNodes.length;i++){
if(elem.childNodes[i].nodeName=="DIV"){
if(elem.childNodes[i].style.textAlign=="right"){
_13ab=elem.childNodes[i].cloneNode(true);
}
}
}
if(_13ab!=null){
var discl=document.getElementById("disclaimer");
for(var i=0;i<discl.childNodes.length;i++){
if(discl.childNodes[i].nodeName=="DIV"){
for(var j=0;j<discl.childNodes[i].attributes.length;j++){
if(discl.childNodes[i].attributes[j].nodeName=="dojoattachpoint"){
if(discl.childNodes[i].attributes[j].nodeValue=="containerNode"){
for(var k=0;k<discl.childNodes[i].childNodes.length;k++){
if(discl.childNodes[i].childNodes[k].nodeName=="DIV"){
discl.childNodes[i].childNodes[k].insertBefore(_13ab,discl.childNodes[i].childNodes[k].firstChild);
break;
}
}
}
}
}
}
}
}
}
}
function hideVideo(){
movieForm.hide();
window.frames["movieFormIFrame"].location.href="../../movie/nomovie.html";
}
function showVideo(strVideoURL){
calculateWindowSize();
var _1355=511;
var _1356=368;
movieForm.position_absolute_x=(windowWidth-_1355)*0.5;
movieForm.position_absolute_y=48;
document.getElementById("movieForm").style.width=_1355+"px";
document.getElementById("movieForm").style.height=_1356+"px";
document.getElementById("movieForm_content").style.height=(_1356-10)+"px";
document.getElementById("movieFormIFrame").style.height=(_1356-20)+"px";
document.getElementById("movieFormIFrame").style.width=(_1355)+"px";
document.getElementById("movieForm").style.padding="0px";
document.getElementById("movieForm").style.border="0px";
document.getElementById("movieForm").style.margin="0px";
document.getElementById("movieForm").style.backgroundColor="black";
newContactForm.explodeSrc=document.getElementById("online");
window.frames["movieFormIFrame"].location.href="../../movie/sapmovie.jsp?movieurl=" + encodeURI(strVideoURL);
movieForm.show();
}


