/*
        Copyright (c) 2004-2008, 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/book/dojo-book-0-9/introduction/licensing
*/


/* JavaScript in the lconn packages are (C) Copyright IBM Corp.  2008  All Rights Reserved. */
(function(){
var _1=null;
if((_1||(typeof djConfig!="undefined"&&djConfig.scopeMap))&&(typeof window!="undefined")){
var _2="",_3="",_4="",_5={},_6={};
_1=_1||djConfig.scopeMap;
for(var i=0;i<_1.length;i++){
var _8=_1[i];
_2+="var "+_8[0]+" = {}; "+_8[1]+" = "+_8[0]+";"+_8[1]+"._scopeName = '"+_8[1]+"';";
_3+=(i==0?"":",")+_8[0];
_4+=(i==0?"":",")+_8[1];
_5[_8[0]]=_8[1];
_6[_8[1]]=_8[0];
}
eval(_2+"dojo._scopeArgs = ["+_4+"];");
dojo._scopePrefixArgs=_3;
dojo._scopePrefix="(function("+_3+"){";
dojo._scopeSuffix="})("+_4+")";
dojo._scopeMap=_5;
dojo._scopeMapRev=_6;
}
(function(){
if(this["navigator"]){
if(/3[\.0-9]+.*Safari/i.test(navigator.appVersion)&&this["console"]){
this.console={_c:this.console,log:function(s){
this._c.log(s);
},info:function(s){
this._c.info(s);
},error:function(s){
this._c.error(s);
},warn:function(s){
this._c.warn(s);
}};
}
}
if(!this["console"]){
this.console={};
}
var cn=["assert","count","debug","dir","dirxml","error","group","groupEnd","info","profile","profileEnd","time","timeEnd","trace","warn","log"];
var i=0,tn;
while((tn=cn[i++])){
if(!console[tn]){
(function(){
var tcn=tn+"";
console[tcn]=("log" in console)?function(){
var a=Array.apply({},arguments);
a.unshift(tcn+":");
console["log"](a.join(" "));
}:function(){
};
})();
}
}
if(typeof dojo=="undefined"){
this.dojo={_scopeName:"dojo",_scopePrefix:"",_scopePrefixArgs:"",_scopeSuffix:"",_scopeMap:{},_scopeMapRev:{}};
}
var d=dojo;
if(typeof dijit=="undefined"){
this.dijit={_scopeName:"dijit"};
}
if(typeof dojox=="undefined"){
this.dojox={_scopeName:"dojox"};
}
if(!d._scopeArgs){
d._scopeArgs=[dojo,dijit,dojox];
}
d.global=this;
d.config={isDebug:false,debugAtAllCosts:false};
if(typeof djConfig!="undefined"){
for(var opt in djConfig){
d.config[opt]=djConfig[opt];
}
}
var _14=["Browser","Rhino","Spidermonkey","Mobile"];
var t;
while((t=_14.shift())){
d["is"+t]=false;
}
dojo.locale=d.config.locale;
var rev="$Rev: 15997 $".match(/\d+/);
dojo.version={major:1,minor:2,patch:0,flag:"connections",revision:rev?+rev[0]:999999,toString:function(){
with(d.version){
return major+"."+minor+"."+patch+flag+" ("+revision+")";
}
}};
if(typeof OpenAjax!="undefined"){
OpenAjax.hub.registerLibrary(dojo._scopeName,"http://dojotoolkit.org",d.version.toString());
}
dojo._mixin=function(obj,_18){
var _19={};
for(var x in _18){
if(_19[x]===undefined||_19[x]!=_18[x]){
obj[x]=_18[x];
}
}
if(d["isIE"]&&_18){
var p=_18.toString;
if(typeof p=="function"&&p!=obj.toString&&p!=_19.toString&&p!="\nfunction toString() {\n    [native code]\n}\n"){
obj.toString=_18.toString;
}
}
return obj;
};
dojo.mixin=function(obj,_1d){
for(var i=1,l=arguments.length;i<l;i++){
d._mixin(obj,arguments[i]);
}
return obj;
};
dojo._getProp=function(_20,_21,_22){
var obj=_22||d.global;
for(var i=0,p;obj&&(p=_20[i]);i++){
if(i==0&&this._scopeMap[p]){
p=this._scopeMap[p];
}
obj=(p in obj?obj[p]:(_21?obj[p]={}:undefined));
}
return obj;
};
dojo.setObject=function(_26,_27,_28){
var _29=_26.split("."),p=_29.pop(),obj=d._getProp(_29,true,_28);
return obj&&p?(obj[p]=_27):undefined;
};
dojo.getObject=function(_2c,_2d,_2e){
return d._getProp(_2c.split("."),_2d,_2e);
};
dojo.exists=function(_2f,obj){
return !!d.getObject(_2f,false,obj);
};
dojo["eval"]=function(_31){
return d.global.eval?d.global.eval(_31):eval(_31);
};
d.deprecated=d.experimental=function(){
};
})();
(function(){
var d=dojo;
d.mixin(d,{_loadedModules:{},_inFlightCount:0,_hasResource:{},_modulePrefixes:{dojo:{name:"dojo",value:"."},doh:{name:"doh",value:"../util/doh"},tests:{name:"tests",value:"tests"}},_moduleHasPrefix:function(_33){
var mp=this._modulePrefixes;
return !!(mp[_33]&&mp[_33].value);
},_getModulePrefix:function(_35){
var mp=this._modulePrefixes;
if(this._moduleHasPrefix(_35)){
return mp[_35].value;
}
return _35;
},_loadedUrls:[],_postLoad:false,_loaders:[],_unloaders:[],_loadNotifying:false});
dojo._loadPath=function(_37,_38,cb){
var uri=((_37.charAt(0)=="/"||_37.match(/^\w+:/))?"":this.baseUrl)+_37;
try{
return !_38?this._loadUri(uri,cb):this._loadUriAndCheck(uri,_38,cb);
}
catch(e){
console.error(e);
return false;
}
};
dojo._loadUri=function(uri,cb){
if(this._loadedUrls[uri]){
return true;
}
var _3d=this._getText(uri,true);
if(!_3d){
return false;
}
this._loadedUrls[uri]=true;
this._loadedUrls.push(uri);
if(cb){
_3d="("+_3d+")";
}else{
_3d=this._scopePrefix+_3d+this._scopeSuffix;
}
if(d.isMoz){
_3d+="\r\n//@ sourceURL="+uri;
}
var _3e=d["eval"](_3d);
if(cb){
cb(_3e);
}
return true;
};
dojo._loadUriAndCheck=function(uri,_40,cb){
var ok=false;
try{
ok=this._loadUri(uri,cb);
}
catch(e){
console.error("failed loading "+uri+" with error: "+e);
}
return !!(ok&&this._loadedModules[_40]);
};
dojo.loaded=function(){
this._loadNotifying=true;
this._postLoad=true;
var mll=d._loaders;
this._loaders=[];
for(var x=0;x<mll.length;x++){
mll[x]();
}
this._loadNotifying=false;
if(d._postLoad&&d._inFlightCount==0&&mll.length){
d._callLoaded();
}
};
dojo.unloaded=function(){
var mll=this._unloaders;
while(mll.length){
(mll.pop())();
}
};
d._onto=function(arr,obj,fn){
if(!fn){
arr.push(obj);
}else{
if(fn){
var _49=(typeof fn=="string")?obj[fn]:fn;
arr.push(function(){
_49.call(obj);
});
}
}
};
dojo.addOnLoad=function(obj,_4b){
d._onto(d._loaders,obj,_4b);
if(d._postLoad&&d._inFlightCount==0&&!d._loadNotifying){
d._callLoaded();
}
};
var dca=d.config.addOnLoad;
if(dca){
d.addOnLoad[(dca instanceof Array?"apply":"call")](d,dca);
}
dojo.addOnUnload=function(obj,_4e){
d._onto(d._unloaders,obj,_4e);
};
dojo._modulesLoaded=function(){
if(d._postLoad){
return;
}
if(d._inFlightCount>0){
console.warn("files still in flight!");
return;
}
d._callLoaded();
};
dojo._callLoaded=function(){
if(typeof setTimeout=="object"||(dojo.config.useXDomain&&d.isOpera)){
if(dojo.isAIR){
setTimeout(function(){
dojo.loaded();
},0);
}else{
setTimeout(dojo._scopeName+".loaded();",0);
}
}else{
d.loaded();
}
};
dojo._getModuleSymbols=function(_4f){
var _50=_4f.split(".");
for(var i=_50.length;i>0;i--){
var _52=_50.slice(0,i).join(".");
if((i==1)&&!this._moduleHasPrefix(_52)){
_50[0]="../"+_50[0];
}else{
var _53=this._getModulePrefix(_52);
if(_53!=_52){
_50.splice(0,i,_53);
break;
}
}
}
return _50;
};
dojo._global_omit_module_check=false;
dojo.loadInit=function(_54){
_54();
};
dojo._loadModule=dojo.require=function(_55,_56){
_56=this._global_omit_module_check||_56;
var _57=this._loadedModules[_55];
if(_57){
return _57;
}
var _58=this._getModuleSymbols(_55).join("/")+".js";
var _59=(!_56)?_55:null;
var ok=this._loadPath(_58,_59);
if(!ok&&!_56){
throw new Error("Could not load '"+_55+"'; last tried '"+_58+"'");
}
if(!_56&&!this._isXDomain){
_57=this._loadedModules[_55];
if(!_57){
throw new Error("symbol '"+_55+"' is not defined after loading '"+_58+"'");
}
}
return _57;
};
dojo.provide=function(_5b){
_5b=_5b+"";
return (d._loadedModules[_5b]=d.getObject(_5b,true));
};
dojo.platformRequire=function(_5c){
var _5d=_5c.common||[];
var _5e=_5d.concat(_5c[d._name]||_5c["default"]||[]);
for(var x=0;x<_5e.length;x++){
var _60=_5e[x];
if(_60.constructor==Array){
d._loadModule.apply(d,_60);
}else{
d._loadModule(_60);
}
}
};
dojo.requireIf=function(_61,_62){
if(_61===true){
var _63=[];
for(var i=1;i<arguments.length;i++){
_63.push(arguments[i]);
}
d.require.apply(d,_63);
}
};
dojo.requireAfterIf=d.requireIf;
dojo.registerModulePath=function(_65,_66){
d._modulePrefixes[_65]={name:_65,value:_66};
};
dojo.requireLocalization=function(_67,_68,_69,_6a){
d.require("dojo.i18n");
d.i18n._requireLocalization.apply(d.hostenv,arguments);
};
var ore=new RegExp("^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?$");
var ire=new RegExp("^((([^\\[:]+):)?([^@]+)@)?(\\[([^\\]]+)\\]|([^\\[:]*))(:([0-9]+))?$");
dojo._Url=function(){
var n=null;
var _a=arguments;
var uri=[_a[0]];
for(var i=1;i<_a.length;i++){
if(!_a[i]){
continue;
}
var _71=new d._Url(_a[i]+"");
var _72=new d._Url(uri[0]+"");
if(_71.path==""&&!_71.scheme&&!_71.authority&&!_71.query){
if(_71.fragment!=n){
_72.fragment=_71.fragment;
}
_71=_72;
}else{
if(!_71.scheme){
_71.scheme=_72.scheme;
if(!_71.authority){
_71.authority=_72.authority;
if(_71.path.charAt(0)!="/"){
var _73=_72.path.substring(0,_72.path.lastIndexOf("/")+1)+_71.path;
var _74=_73.split("/");
for(var j=0;j<_74.length;j++){
if(_74[j]=="."){
if(j==_74.length-1){
_74[j]="";
}else{
_74.splice(j,1);
j--;
}
}else{
if(j>0&&!(j==1&&_74[0]=="")&&_74[j]==".."&&_74[j-1]!=".."){
if(j==(_74.length-1)){
_74.splice(j,1);
_74[j-1]="";
}else{
_74.splice(j-1,2);
j-=2;
}
}
}
}
_71.path=_74.join("/");
}
}
}
}
uri=[];
if(_71.scheme){
uri.push(_71.scheme,":");
}
if(_71.authority){
uri.push("//",_71.authority);
}
uri.push(_71.path);
if(_71.query){
uri.push("?",_71.query);
}
if(_71.fragment){
uri.push("#",_71.fragment);
}
}
this.uri=uri.join("");
var r=this.uri.match(ore);
this.scheme=r[2]||(r[1]?"":n);
this.authority=r[4]||(r[3]?"":n);
this.path=r[5];
this.query=r[7]||(r[6]?"":n);
this.fragment=r[9]||(r[8]?"":n);
if(this.authority!=n){
r=this.authority.match(ire);
this.user=r[3]||n;
this.password=r[4]||n;
this.host=r[6]||r[7];
this.port=r[9]||n;
}
};
dojo._Url.prototype.toString=function(){
return this.uri;
};
dojo.moduleUrl=function(_77,url){
var loc=d._getModuleSymbols(_77).join("/");
if(!loc){
return null;
}
if(loc.lastIndexOf("/")!=loc.length-1){
loc+="/";
}
var _7a=loc.indexOf(":");
if(loc.charAt(0)!="/"&&(_7a==-1||_7a>loc.indexOf("/"))){
loc=d.baseUrl+loc;
}
return new d._Url(loc,url);
};
})();
if(typeof window!="undefined"){
dojo.isBrowser=true;
dojo._name="browser";
(function(){
var d=dojo;
if(document&&document.getElementsByTagName){
var _7c=document.getElementsByTagName("script");
var _7d=/dojo(\.xd)?\.js(\W|$)/i;
for(var i=0;i<_7c.length;i++){
var src=_7c[i].getAttribute("src");
if(!src){
continue;
}
var m=src.match(_7d);
if(m){
if(!d.config.baseUrl){
d.config.baseUrl=src.substring(0,m.index);
}
var cfg=_7c[i].getAttribute("djConfig");
if(cfg){
var _82=eval("({ "+cfg+" })");
for(var x in _82){
dojo.config[x]=_82[x];
}
}
break;
}
}
}
d.baseUrl=d.config.baseUrl;
var n=navigator;
var dua=n.userAgent;
var dav=n.appVersion;
var tv=parseFloat(dav);
if(dua.indexOf("Opera")>=0){
d.isOpera=tv;
}
var _88=Math.max(dav.indexOf("WebKit"),dav.indexOf("Safari"),0);
if(_88){
d.isSafari=parseFloat(dav.split("Version/")[1])||(parseFloat(dav.substr(_88+7))>419.3)?3:2;
}
if(dua.indexOf("AdobeAIR")>=0){
d.isAIR=1;
}
if(dav.indexOf("Konqueror")>=0||d.isSafari){
d.isKhtml=tv;
}
if(dua.indexOf("Gecko")>=0&&!d.isKhtml){
d.isMozilla=d.isMoz=tv;
}
if(d.isMoz){
d.isFF=parseFloat(dua.split("Firefox/")[1])||undefined;
}
if(document.all&&!d.isOpera){
d.isIE=parseFloat(dav.split("MSIE ")[1])||undefined;
}
if(dojo.isIE&&window.location.protocol==="file:"){
dojo.config.ieForceActiveXXhr=true;
}
var cm=document.compatMode;
d.isQuirks=cm=="BackCompat"||cm=="QuirksMode"||d.isIE<6;
d.locale=dojo.config.locale||(d.isIE?n.userLanguage:n.language).toLowerCase();
d._XMLHTTP_PROGIDS=["Msxml2.XMLHTTP","Microsoft.XMLHTTP","Msxml2.XMLHTTP.4.0"];
d._xhrObj=function(){
var _8a=null;
var _8b=null;
if(!dojo.isIE||!dojo.config.ieForceActiveXXhr){
try{
_8a=new XMLHttpRequest();
}
catch(e){
}
}
if(!_8a){
for(var i=0;i<3;++i){
var _8d=d._XMLHTTP_PROGIDS[i];
try{
_8a=new ActiveXObject(_8d);
}
catch(e){
_8b=e;
}
if(_8a){
d._XMLHTTP_PROGIDS=[_8d];
break;
}
}
}
if(!_8a){
throw new Error("XMLHTTP not available: "+_8b);
}
return _8a;
};
d._isDocumentOk=function(_8e){
var _8f=_8e.status||0;
return (_8f>=200&&_8f<300)||_8f==304||_8f==1223||(!_8f&&(location.protocol=="file:"||location.protocol=="chrome:"));
};
var _90=window.location+"";
var _91=document.getElementsByTagName("base");
var _92=(_91&&_91.length>0);
d._getText=function(uri,_94){
var _95=this._xhrObj();
if(!_92&&dojo._Url){
uri=(new dojo._Url(_90,uri)).toString();
}
if(d.config.cacheBust){
uri+="";
uri+=(uri.indexOf("?")==-1?"?":"&")+String(d.config.cacheBust).replace(/\W+/g,"");
}
_95.open("GET",uri,false);
try{
_95.send(null);
if(!d._isDocumentOk(_95)){
var err=Error("Unable to load "+uri+" status:"+_95.status);
err.status=_95.status;
err.responseText=_95.responseText;
throw err;
}
}
catch(e){
if(_94){
return null;
}
throw e;
}
return _95.responseText;
};
d._windowUnloaders=[];
d.windowUnloaded=function(){
var mll=this._windowUnloaders;
while(mll.length){
(mll.pop())();
}
};
d.addOnWindowUnload=function(obj,_99){
d._onto(d._windowUnloaders,obj,_99);
};
})();
dojo._initFired=false;
dojo._loadInit=function(e){
dojo._initFired=true;
var _9b=(e&&e.type)?e.type.toLowerCase():"load";
if(arguments.callee.initialized||(_9b!="domcontentloaded"&&_9b!="load")){
return;
}
arguments.callee.initialized=true;
if("_khtmlTimer" in dojo){
clearInterval(dojo._khtmlTimer);
delete dojo._khtmlTimer;
}
if(dojo._inFlightCount==0){
dojo._modulesLoaded();
}
};
dojo._fakeLoadInit=function(){
dojo._loadInit({type:"load"});
};
if(!dojo.config.afterOnLoad){
if(document.addEventListener){
if(dojo.isOpera||dojo.isFF>=3||(dojo.isMoz&&dojo.config.enableMozDomContentLoaded===true)){
document.addEventListener("DOMContentLoaded",dojo._loadInit,null);
}
window.addEventListener("load",dojo._loadInit,null);
}
if(dojo.isAIR){
window.addEventListener("load",dojo._loadInit,null);
}else{
if(/(WebKit|khtml)/i.test(navigator.userAgent)){
dojo._khtmlTimer=setInterval(function(){
if(/loaded|complete/.test(document.readyState)){
dojo._loadInit();
}
},10);
}
}
}
(function(){
var _w=window;
var _9d=function(_9e,fp){
var _a0=_w[_9e]||function(){
};
_w[_9e]=function(){
fp.apply(_w,arguments);
_a0.apply(_w,arguments);
};
};
if(dojo.isIE){
if(!dojo.config.afterOnLoad){
document.write("<scr"+"ipt defer src=\"//:\" "+"onreadystatechange=\"if(this.readyState=='complete'){"+dojo._scopeName+"._loadInit();}\">"+"</scr"+"ipt>");
}
try{
document.namespaces.add("v","urn:schemas-microsoft-com:vml");
document.createStyleSheet().addRule("v\\:*","behavior:url(#default#VML)");
}
catch(e){
}
}
_9d("onbeforeunload",function(){
dojo.unloaded();
});
_9d("onunload",function(){
dojo.windowUnloaded();
});
})();
}
(function(){
var mp=dojo.config["modulePaths"];
if(mp){
for(var _a2 in mp){
dojo.registerModulePath(_a2,mp[_a2]);
}
}
})();
if(dojo.config.isDebug){
dojo.require("dojo._firebug.firebug");
}
if(dojo.config.debugAtAllCosts){
dojo.config.useXDomain=true;
dojo.require("dojo._base._loader.loader_xd");
dojo.require("dojo._base._loader.loader_debug");
}
if(!dojo._hasResource["dojo._base.lang"]){
dojo._hasResource["dojo._base.lang"]=true;
dojo.provide("dojo._base.lang");
dojo.isString=function(it){
return !!arguments.length&&it!=null&&(typeof it=="string"||it instanceof String);
};
dojo.isArray=function(it){
return it&&(it instanceof Array||typeof it=="array");
};
dojo.isFunction=(function(){
var _a5=function(it){
return it&&(typeof it=="function"||it instanceof Function);
};
return dojo.isSafari?function(it){
if(typeof it=="function"&&it=="[object NodeList]"){
return false;
}
return _a5(it);
}:_a5;
})();
dojo.isObject=function(it){
return it!==undefined&&(it===null||typeof it=="object"||dojo.isArray(it)||dojo.isFunction(it));
};
dojo.isArrayLike=function(it){
var d=dojo;
return it&&it!==undefined&&!d.isString(it)&&!d.isFunction(it)&&!(it.tagName&&it.tagName.toLowerCase()=="form")&&(d.isArray(it)||isFinite(it.length));
};
dojo.isAlien=function(it){
return it&&!dojo.isFunction(it)&&/\{\s*\[native code\]\s*\}/.test(String(it));
};
dojo.extend=function(_ac,_ad){
for(var i=1,l=arguments.length;i<l;i++){
dojo._mixin(_ac.prototype,arguments[i]);
}
return _ac;
};
dojo._hitchArgs=function(_b0,_b1){
var pre=dojo._toArray(arguments,2);
var _b3=dojo.isString(_b1);
return function(){
var _b4=dojo._toArray(arguments);
var f=_b3?(_b0||dojo.global)[_b1]:_b1;
return f&&f.apply(_b0||this,pre.concat(_b4));
};
};
dojo.hitch=function(_b6,_b7){
if(arguments.length>2){
return dojo._hitchArgs.apply(dojo,arguments);
}
if(!_b7){
_b7=_b6;
_b6=null;
}
if(dojo.isString(_b7)){
_b6=_b6||dojo.global;
if(!_b6[_b7]){
throw (["dojo.hitch: scope[\"",_b7,"\"] is null (scope=\"",_b6,"\")"].join(""));
}
return function(){
return _b6[_b7].apply(_b6,arguments||[]);
};
}
return !_b6?_b7:function(){
return _b7.apply(_b6,arguments||[]);
};
};
dojo.delegate=dojo._delegate=(function(){
function TMP(){
};
return function(obj,_b9){
TMP.prototype=obj;
var tmp=new TMP();
if(_b9){
dojo._mixin(tmp,_b9);
}
return tmp;
};
})();
(function(){
var _bb=function(obj,_bd,_be){
return (_be||[]).concat(Array.prototype.slice.call(obj,_bd||0));
};
var _bf=function(obj,_c1,_c2){
var arr=_c2||[];
for(var x=_c1||0;x<obj.length;x++){
arr.push(obj[x]);
}
return arr;
};
dojo._toArray=(!dojo.isIE)?_bb:function(obj){
return ((obj.item)?_bf:_bb).apply(this,arguments);
};
})();
dojo.partial=function(_c6){
var arr=[null];
return dojo.hitch.apply(dojo,arr.concat(dojo._toArray(arguments)));
};
dojo.clone=function(o){
if(!o){
return o;
}
if(dojo.isArray(o)){
var r=[];
for(var i=0;i<o.length;++i){
r.push(dojo.clone(o[i]));
}
return r;
}
if(!dojo.isObject(o)){
return o;
}
if(o.nodeType&&o.cloneNode){
return o.cloneNode(true);
}
if(o instanceof Date){
return new Date(o.getTime());
}
var r=new o.constructor();
for(var i in o){
if(!(i in r)||r[i]!=o[i]){
r[i]=dojo.clone(o[i]);
}
}
return r;
};
dojo.trim=function(str){
return str.replace(/^\s\s*/,"").replace(/\s\s*$/,"");
};
}
if(!dojo._hasResource["dojo._base.declare"]){
dojo._hasResource["dojo._base.declare"]=true;
dojo.provide("dojo._base.declare");
dojo.declare=function(_cc,_cd,_ce){
var dd=arguments.callee,_d0;
if(dojo.isArray(_cd)){
_d0=_cd;
_cd=_d0.shift();
}
if(_d0){
dojo.forEach(_d0,function(m){
if(!m){
throw (_cc+": mixin #"+i+" is null");
}
_cd=dd._delegate(_cd,m);
});
}
var _d2=dd._delegate(_cd);
_ce=_ce||{};
_d2.extend(_ce);
dojo.extend(_d2,{declaredClass:_cc,_constructor:_ce.constructor});
_d2.prototype.constructor=_d2;
return dojo.setObject(_cc,_d2);
};
dojo.mixin(dojo.declare,{_delegate:function(_d3,_d4){
var bp=(_d3||0).prototype,mp=(_d4||0).prototype,dd=dojo.declare;
var _d8=dd._makeCtor();
dojo.mixin(_d8,{superclass:bp,mixin:mp,extend:dd._extend});
if(_d3){
_d8.prototype=dojo._delegate(bp);
}
dojo.extend(_d8,dd._core,mp||0,{_constructor:null,preamble:null});
_d8.prototype.constructor=_d8;
_d8.prototype.declaredClass=(bp||0).declaredClass+"_"+(mp||0).declaredClass;
return _d8;
},_extend:function(_d9){
var i,fn;
for(i in _d9){
if(dojo.isFunction(fn=_d9[i])&&!0[i]){
fn.nom=i;
fn.ctor=this;
}
}
dojo.extend(this,_d9);
},_makeCtor:function(){
return function(){
this._construct(arguments);
};
},_core:{_construct:function(_dc){
var c=_dc.callee,s=c.superclass,ct=s&&s.constructor,m=c.mixin,mct=m&&m.constructor,a=_dc,ii,fn;
if(a[0]){
if(((fn=a[0].preamble))){
a=fn.apply(this,a)||a;
}
}
if((fn=c.prototype.preamble)){
a=fn.apply(this,a)||a;
}
if(ct&&ct.apply){
ct.apply(this,a);
}
if(mct&&mct.apply){
mct.apply(this,a);
}
if((ii=c.prototype._constructor)){
ii.apply(this,_dc);
}
if(this.constructor.prototype==c.prototype&&(ct=this.postscript)){
ct.apply(this,_dc);
}
},_findMixin:function(_e5){
var c=this.constructor,p,m;
while(c){
p=c.superclass;
m=c.mixin;
if(m==_e5||(m instanceof _e5.constructor)){
return p;
}
if(m&&m._findMixin&&(m=m._findMixin(_e5))){
return m;
}
c=p&&p.constructor;
}
},_findMethod:function(_e9,_ea,_eb,has){
var p=_eb,c,m,f;
do{
c=p.constructor;
m=c.mixin;
if(m&&(m=this._findMethod(_e9,_ea,m,has))){
return m;
}
if((f=p[_e9])&&(has==(f==_ea))){
return p;
}
p=c.superclass;
}while(p);
return !has&&(p=this._findMixin(_eb))&&this._findMethod(_e9,_ea,p,has);
},inherited:function(_f1,_f2,_f3){
var a=arguments;
if(!dojo.isString(a[0])){
_f3=_f2;
_f2=_f1;
_f1=_f2.callee.nom;
}
a=_f3||_f2;
var c=_f2.callee,p=this.constructor.prototype,fn,mp;
if(this[_f1]!=c||p[_f1]==c){
mp=(c.ctor||0).superclass||this._findMethod(_f1,c,p,true);
if(!mp){
throw (this.declaredClass+": inherited method \""+_f1+"\" mismatch");
}
p=this._findMethod(_f1,c,mp,false);
}
fn=p&&p[_f1];
if(!fn){
throw (mp.declaredClass+": inherited method \""+_f1+"\" not found");
}
return fn.apply(this,a);
}}});
}
if(!dojo._hasResource["dojo._base.connect"]){
dojo._hasResource["dojo._base.connect"]=true;
dojo.provide("dojo._base.connect");
dojo._listener={getDispatcher:function(){
return function(){
var ap=Array.prototype,c=arguments.callee,ls=c._listeners,t=c.target;
var r=t&&t.apply(this,arguments);
var lls;
lls=[].concat(ls);
for(var i in lls){
if(!(i in ap)){
lls[i].apply(this,arguments);
}
}
return r;
};
},add:function(_100,_101,_102){
_100=_100||dojo.global;
var f=_100[_101];
if(!f||!f._listeners){
var d=dojo._listener.getDispatcher();
d.target=f;
d._listeners=[];
f=_100[_101]=d;
}
return f._listeners.push(_102);
},remove:function(_105,_106,_107){
var f=(_105||dojo.global)[_106];
if(f&&f._listeners&&_107--){
delete f._listeners[_107];
}
}};
dojo.connect=function(obj,_10a,_10b,_10c,_10d){
var a=arguments,args=[],i=0;
args.push(dojo.isString(a[0])?null:a[i++],a[i++]);
var a1=a[i+1];
args.push(dojo.isString(a1)||dojo.isFunction(a1)?a[i++]:null,a[i++]);
for(var l=a.length;i<l;i++){
args.push(a[i]);
}
return dojo._connect.apply(this,args);
};
dojo._connect=function(obj,_113,_114,_115){
var l=dojo._listener,h=l.add(obj,_113,dojo.hitch(_114,_115));
return [obj,_113,h,l];
};
dojo.disconnect=function(_118){
if(_118&&_118[0]!==undefined){
dojo._disconnect.apply(this,_118);
delete _118[0];
}
};
dojo._disconnect=function(obj,_11a,_11b,_11c){
_11c.remove(obj,_11a,_11b);
};
dojo._topics={};
dojo.subscribe=function(_11d,_11e,_11f){
return [_11d,dojo._listener.add(dojo._topics,_11d,dojo.hitch(_11e,_11f))];
};
dojo.unsubscribe=function(_120){
if(_120){
dojo._listener.remove(dojo._topics,_120[0],_120[1]);
}
};
dojo.publish=function(_121,args){
var f=dojo._topics[_121];
if(f){
f.apply(this,args||[]);
}
};
dojo.connectPublisher=function(_124,obj,_126){
var pf=function(){
dojo.publish(_124,arguments);
};
return (_126)?dojo.connect(obj,_126,pf):dojo.connect(obj,pf);
};
}
if(!dojo._hasResource["dojo._base.Deferred"]){
dojo._hasResource["dojo._base.Deferred"]=true;
dojo.provide("dojo._base.Deferred");
dojo.Deferred=function(_128){
this.chain=[];
this.id=this._nextId();
this.fired=-1;
this.paused=0;
this.results=[null,null];
this.canceller=_128;
this.silentlyCancelled=false;
};
dojo.extend(dojo.Deferred,{_nextId:(function(){
var n=1;
return function(){
return n++;
};
})(),cancel:function(){
var err;
if(this.fired==-1){
if(this.canceller){
err=this.canceller(this);
}else{
this.silentlyCancelled=true;
}
if(this.fired==-1){
if(!(err instanceof Error)){
var res=err;
err=new Error("Deferred Cancelled");
err.dojoType="cancel";
err.cancelResult=res;
}
this.errback(err);
}
}else{
if((this.fired==0)&&(this.results[0] instanceof dojo.Deferred)){
this.results[0].cancel();
}
}
},_resback:function(res){
this.fired=((res instanceof Error)?1:0);
this.results[this.fired]=res;
this._fire();
},_check:function(){
if(this.fired!=-1){
if(!this.silentlyCancelled){
throw new Error("already called!");
}
this.silentlyCancelled=false;
return;
}
},callback:function(res){
this._check();
this._resback(res);
},errback:function(res){
this._check();
if(!(res instanceof Error)){
res=new Error(res);
}
this._resback(res);
},addBoth:function(cb,cbfn){
var _131=dojo.hitch.apply(dojo,arguments);
return this.addCallbacks(_131,_131);
},addCallback:function(cb,cbfn){
return this.addCallbacks(dojo.hitch.apply(dojo,arguments));
},addErrback:function(cb,cbfn){
return this.addCallbacks(null,dojo.hitch.apply(dojo,arguments));
},addCallbacks:function(cb,eb){
this.chain.push([cb,eb]);
if(this.fired>=0){
this._fire();
}
return this;
},_fire:function(){
var _138=this.chain;
var _139=this.fired;
var res=this.results[_139];
var self=this;
var cb=null;
while((_138.length>0)&&(this.paused==0)){
var f=_138.shift()[_139];
if(!f){
continue;
}
var func=function(){
var ret=f(res);
if(typeof ret!="undefined"){
res=ret;
}
_139=((res instanceof Error)?1:0);
if(res instanceof dojo.Deferred){
cb=function(res){
self._resback(res);
self.paused--;
if((self.paused==0)&&(self.fired>=0)){
self._fire();
}
};
this.paused++;
}
};
if(dojo.config.isDebug){
func.call(this);
}else{
try{
func.call(this);
}
catch(err){
_139=1;
res=err;
}
}
}
this.fired=_139;
this.results[_139]=res;
if((cb)&&(this.paused)){
res.addBoth(cb);
}
}});
}
if(!dojo._hasResource["dojo._base.json"]){
dojo._hasResource["dojo._base.json"]=true;
dojo.provide("dojo._base.json");
dojo.fromJson=function(json){
return eval("("+json+")");
};
dojo._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.toJsonIndentStr="\t";
dojo.toJson=function(it,_144,_145){
if(it===undefined){
return "undefined";
}
var _146=typeof it;
if(_146=="number"||_146=="boolean"){
return it+"";
}
if(it===null){
return "null";
}
if(dojo.isString(it)){
return dojo._escapeString(it);
}
var _147=arguments.callee;
var _148;
_145=_145||"";
var _149=_144?_145+dojo.toJsonIndentStr:"";
var tf=it.__json__||it.json;
if(dojo.isFunction(tf)){
_148=tf.call(it);
if(it!==_148){
return _147(_148,_144,_149);
}
}
if(it.nodeType&&it.cloneNode){
throw new Error("Can't serialize DOM nodes");
}
var sep=_144?" ":"";
var _14c=_144?"\n":"";
if(dojo.isArray(it)){
var res=dojo.map(it,function(obj){
var val=_147(obj,_144,_149);
if(typeof val!="string"){
val="undefined";
}
return _14c+_149+val;
});
return "["+res.join(","+sep)+_14c+_145+"]";
}
if(_146=="function"){
return null;
}
var _150=[],key;
for(key in it){
var _152,val;
if(typeof key=="number"){
_152="\""+key+"\"";
}else{
if(typeof key=="string"){
_152=dojo._escapeString(key);
}else{
continue;
}
}
val=_147(it[key],_144,_149);
if(typeof val!="string"){
continue;
}
_150.push(_14c+_149+_152+":"+sep+val);
}
return "{"+_150.join(","+sep)+_14c+_145+"}";
};
}
if(!dojo._hasResource["dojo._base.array"]){
dojo._hasResource["dojo._base.array"]=true;
dojo.provide("dojo._base.array");
(function(){
var _154=function(arr,obj,cb){
return [dojo.isString(arr)?arr.split(""):arr,obj||dojo.global,dojo.isString(cb)?new Function("item","index","array",cb):cb];
};
dojo.mixin(dojo,{indexOf:function(_158,_159,_15a,_15b){
var step=1,end=_158.length||0,i=0;
if(_15b){
i=end-1;
step=end=-1;
}
if(_15a!=undefined){
i=_15a;
}
if((_15b&&i>end)||i<end){
for(;i!=end;i+=step){
if(_158[i]==_159){
return i;
}
}
}
return -1;
},lastIndexOf:function(_15e,_15f,_160){
return dojo.indexOf(_15e,_15f,_160,true);
},forEach:function(arr,_162,_163){
if(!arr||!arr.length){
return;
}
var _p=_154(arr,_163,_162);
arr=_p[0];
for(var i=0,l=arr.length;i<l;++i){
_p[2].call(_p[1],arr[i],i,arr);
}
},_everyOrSome:function(_167,arr,_169,_16a){
var _p=_154(arr,_16a,_169);
arr=_p[0];
for(var i=0,l=arr.length;i<l;++i){
var _16e=!!_p[2].call(_p[1],arr[i],i,arr);
if(_167^_16e){
return _16e;
}
}
return _167;
},every:function(arr,_170,_171){
return this._everyOrSome(true,arr,_170,_171);
},some:function(arr,_173,_174){
return this._everyOrSome(false,arr,_173,_174);
},map:function(arr,_176,_177){
var _p=_154(arr,_177,_176);
arr=_p[0];
var _179=(arguments[3]?(new arguments[3]()):[]);
for(var i=0,l=arr.length;i<l;++i){
_179.push(_p[2].call(_p[1],arr[i],i,arr));
}
return _179;
},filter:function(arr,_17d,_17e){
var _p=_154(arr,_17e,_17d);
arr=_p[0];
var _180=[];
for(var i=0,l=arr.length;i<l;++i){
if(_p[2].call(_p[1],arr[i],i,arr)){
_180.push(arr[i]);
}
}
return _180;
}});
})();
}
if(!dojo._hasResource["dojo._base.Color"]){
dojo._hasResource["dojo._base.Color"]=true;
dojo.provide("dojo._base.Color");
dojo.Color=function(_183){
if(_183){
this.setColor(_183);
}
};
dojo.Color.named={black:[0,0,0],silver:[192,192,192],gray:[128,128,128],white:[255,255,255],maroon:[128,0,0],red:[255,0,0],purple:[128,0,128],fuchsia:[255,0,255],green:[0,128,0],lime:[0,255,0],olive:[128,128,0],yellow:[255,255,0],navy:[0,0,128],blue:[0,0,255],teal:[0,128,128],aqua:[0,255,255]};
dojo.extend(dojo.Color,{r:255,g:255,b:255,a:1,_set:function(r,g,b,a){
var t=this;
t.r=r;
t.g=g;
t.b=b;
t.a=a;
},setColor:function(_189){
var d=dojo;
if(d.isString(_189)){
d.colorFromString(_189,this);
}else{
if(d.isArray(_189)){
d.colorFromArray(_189,this);
}else{
this._set(_189.r,_189.g,_189.b,_189.a);
if(!(_189 instanceof d.Color)){
this.sanitize();
}
}
}
return this;
},sanitize:function(){
return this;
},toRgb:function(){
var t=this;
return [t.r,t.g,t.b];
},toRgba:function(){
var t=this;
return [t.r,t.g,t.b,t.a];
},toHex:function(){
var arr=dojo.map(["r","g","b"],function(x){
var s=this[x].toString(16);
return s.length<2?"0"+s:s;
},this);
return "#"+arr.join("");
},toCss:function(_190){
var t=this,rgb=t.r+", "+t.g+", "+t.b;
return (_190?"rgba("+rgb+", "+t.a:"rgb("+rgb)+")";
},toString:function(){
return this.toCss(true);
}});
dojo.blendColors=function(_193,end,_195,obj){
var d=dojo,t=obj||new dojo.Color();
d.forEach(["r","g","b","a"],function(x){
t[x]=_193[x]+(end[x]-_193[x])*_195;
if(x!="a"){
t[x]=Math.round(t[x]);
}
});
return t.sanitize();
};
dojo.colorFromRgb=function(_19a,obj){
var m=_19a.toLowerCase().match(/^rgba?\(([\s\.,0-9]+)\)/);
return m&&dojo.colorFromArray(m[1].split(/\s*,\s*/),obj);
};
dojo.colorFromHex=function(_19d,obj){
var d=dojo,t=obj||new d.Color(),bits=(_19d.length==4)?4:8,mask=(1<<bits)-1;
_19d=Number("0x"+_19d.substr(1));
if(isNaN(_19d)){
return null;
}
d.forEach(["b","g","r"],function(x){
var c=_19d&mask;
_19d>>=bits;
t[x]=bits==4?17*c:c;
});
t.a=1;
return t;
};
dojo.colorFromArray=function(a,obj){
var t=obj||new dojo.Color();
t._set(Number(a[0]),Number(a[1]),Number(a[2]),Number(a[3]));
if(isNaN(t.a)){
t.a=1;
}
return t.sanitize();
};
dojo.colorFromString=function(str,obj){
var a=dojo.Color.named[str];
return a&&dojo.colorFromArray(a,obj)||dojo.colorFromRgb(str,obj)||dojo.colorFromHex(str,obj);
};
}
if(!dojo._hasResource["dojo._base"]){
dojo._hasResource["dojo._base"]=true;
dojo.provide("dojo._base");
}
if(!dojo._hasResource["dojo._base.window"]){
dojo._hasResource["dojo._base.window"]=true;
dojo.provide("dojo._base.window");
dojo.doc=window["document"]||null;
dojo.body=function(){
return dojo.doc.body||dojo.doc.getElementsByTagName("body")[0];
};
dojo.setContext=function(_1ab,_1ac){
dojo.global=_1ab;
dojo.doc=_1ac;
};
dojo._fireCallback=function(_1ad,_1ae,_1af){
if(_1ae&&dojo.isString(_1ad)){
_1ad=_1ae[_1ad];
}
return _1ad.apply(_1ae,_1af||[]);
};
dojo.withGlobal=function(_1b0,_1b1,_1b2,_1b3){
var rval;
var _1b5=dojo.global;
var _1b6=dojo.doc;
try{
dojo.setContext(_1b0,_1b0.document);
rval=dojo._fireCallback(_1b1,_1b2,_1b3);
}
finally{
dojo.setContext(_1b5,_1b6);
}
return rval;
};
dojo.withDoc=function(_1b7,_1b8,_1b9,_1ba){
var rval;
var _1bc=dojo.doc;
try{
dojo.doc=_1b7;
rval=dojo._fireCallback(_1b8,_1b9,_1ba);
}
finally{
dojo.doc=_1bc;
}
return rval;
};
}
if(!dojo._hasResource["dojo._base.event"]){
dojo._hasResource["dojo._base.event"]=true;
dojo.provide("dojo._base.event");
(function(){
var del=(dojo._event_listener={add:function(node,name,fp){
if(!node){
return;
}
name=del._normalizeEventName(name);
fp=del._fixCallback(name,fp);
var _1c1=name;
if(!dojo.isIE&&(name=="mouseenter"||name=="mouseleave")){
var ofp=fp;
name=(name=="mouseenter")?"mouseover":"mouseout";
fp=function(e){
try{
e.relatedTarget.tagName;
}
catch(e2){
return;
}
if(!dojo.isDescendant(e.relatedTarget,node)){
return ofp.call(this,e);
}
};
}
node.addEventListener(name,fp,false);
return fp;
},remove:function(node,_1c5,_1c6){
if(node){
_1c5=del._normalizeEventName(_1c5);
if(!dojo.isIE&&(_1c5=="mouseenter"||_1c5=="mouseleave")){
_1c5=(_1c5=="mouseenter")?"mouseover":"mouseout";
}
node.removeEventListener(_1c5,_1c6,false);
}
},_normalizeEventName:function(name){
return name.slice(0,2)=="on"?name.slice(2):name;
},_fixCallback:function(name,fp){
return name!="keypress"?fp:function(e){
return fp.call(this,del._fixEvent(e,this));
};
},_fixEvent:function(evt,_1cc){
switch(evt.type){
case "keypress":
del._setKeyChar(evt);
break;
}
return evt;
},_setKeyChar:function(evt){
evt.keyChar=evt.charCode?String.fromCharCode(evt.charCode):"";
evt.charOrCode=evt.keyChar||evt.keyCode;
},_punctMap:{106:42,111:47,186:59,187:43,188:44,189:45,190:46,191:47,192:96,219:91,220:92,221:93,222:39}});
dojo.fixEvent=function(evt,_1cf){
return del._fixEvent(evt,_1cf);
};
dojo.stopEvent=function(evt){
evt.preventDefault();
evt.stopPropagation();
};
var _1d1=dojo._listener;
dojo._connect=function(obj,_1d3,_1d4,_1d5,_1d6){
var _1d7=obj&&(obj.nodeType||obj.attachEvent||obj.addEventListener);
var lid=!_1d7?0:(!_1d6?1:2),l=[dojo._listener,del,_1d1][lid];
var h=l.add(obj,_1d3,dojo.hitch(_1d4,_1d5));
return [obj,_1d3,h,lid];
};
dojo._disconnect=function(obj,_1dc,_1dd,_1de){
([dojo._listener,del,_1d1][_1de]).remove(obj,_1dc,_1dd);
};
dojo.keys={BACKSPACE:8,TAB:9,CLEAR:12,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESCAPE:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT_ARROW:37,UP_ARROW:38,RIGHT_ARROW:39,DOWN_ARROW:40,INSERT:45,DELETE:46,HELP:47,LEFT_WINDOW:91,RIGHT_WINDOW:92,SELECT:93,NUMPAD_0:96,NUMPAD_1:97,NUMPAD_2:98,NUMPAD_3:99,NUMPAD_4:100,NUMPAD_5:101,NUMPAD_6:102,NUMPAD_7:103,NUMPAD_8:104,NUMPAD_9:105,NUMPAD_MULTIPLY:106,NUMPAD_PLUS:107,NUMPAD_ENTER:108,NUMPAD_MINUS:109,NUMPAD_PERIOD:110,NUMPAD_DIVIDE:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,F13:124,F14:125,F15:126,NUM_LOCK:144,SCROLL_LOCK:145};
if(dojo.isIE){
var _1df=function(e,code){
try{
return (e.keyCode=code);
}
catch(e){
return 0;
}
};
var iel=dojo._listener;
var _1e3=dojo._ieListenersName="_"+dojo._scopeName+"_listeners";
if(!dojo.config._allow_leaks){
_1d1=iel=dojo._ie_listener={handlers:[],add:function(_1e4,_1e5,_1e6){
_1e4=_1e4||dojo.global;
var f=_1e4[_1e5];
if(!f||!f[_1e3]){
var d=dojo._getIeDispatcher();
d.target=f&&(ieh.push(f)-1);
d[_1e3]=[];
f=_1e4[_1e5]=d;
}
return f[_1e3].push(ieh.push(_1e6)-1);
},remove:function(_1ea,_1eb,_1ec){
var f=(_1ea||dojo.global)[_1eb],l=f&&f[_1e3];
if(f&&l&&_1ec--){
delete ieh[l[_1ec]];
delete l[_1ec];
}
}};
var ieh=iel.handlers;
}
dojo.mixin(del,{add:function(node,_1f0,fp){
if(!node){
return;
}
_1f0=del._normalizeEventName(_1f0);
if(_1f0=="onkeypress"){
var kd=node.onkeydown;
if(!kd||!kd[_1e3]||!kd._stealthKeydownHandle){
var h=del.add(node,"onkeydown",del._stealthKeyDown);
kd=node.onkeydown;
kd._stealthKeydownHandle=h;
kd._stealthKeydownRefs=1;
}else{
kd._stealthKeydownRefs++;
}
}
return iel.add(node,_1f0,del._fixCallback(fp));
},remove:function(node,_1f5,_1f6){
_1f5=del._normalizeEventName(_1f5);
iel.remove(node,_1f5,_1f6);
if(_1f5=="onkeypress"){
var kd=node.onkeydown;
if(--kd._stealthKeydownRefs<=0){
iel.remove(node,"onkeydown",kd._stealthKeydownHandle);
delete kd._stealthKeydownHandle;
}
}
},_normalizeEventName:function(_1f8){
return _1f8.slice(0,2)!="on"?"on"+_1f8:_1f8;
},_nop:function(){
},_fixEvent:function(evt,_1fa){
if(!evt){
var w=_1fa&&(_1fa.ownerDocument||_1fa.document||_1fa).parentWindow||window;
evt=w.event;
}
if(!evt){
return (evt);
}
evt.target=evt.srcElement;
evt.currentTarget=(_1fa||evt.srcElement);
evt.layerX=evt.offsetX;
evt.layerY=evt.offsetY;
var se=evt.srcElement,doc=(se&&se.ownerDocument)||document;
var _1fe=((dojo.isIE<6)||(doc["compatMode"]=="BackCompat"))?doc.body:doc.documentElement;
var _1ff=dojo._getIeDocumentElementOffset();
evt.pageX=evt.clientX+dojo._fixIeBiDiScrollLeft(_1fe.scrollLeft||0)-_1ff.x;
evt.pageY=evt.clientY+(_1fe.scrollTop||0)-_1ff.y;
if(evt.type=="mouseover"){
evt.relatedTarget=evt.fromElement;
}
if(evt.type=="mouseout"){
evt.relatedTarget=evt.toElement;
}
evt.stopPropagation=del._stopPropagation;
evt.preventDefault=del._preventDefault;
return del._fixKeys(evt);
},_fixKeys:function(evt){
switch(evt.type){
case "keypress":
var c=("charCode" in evt?evt.charCode:evt.keyCode);
if(c==10){
c=0;
evt.keyCode=13;
}else{
if(c==13||c==27){
c=0;
}else{
if(c==3){
c=99;
}
}
}
evt.charCode=c;
del._setKeyChar(evt);
break;
}
return evt;
},_stealthKeyDown:function(evt){
var kp=evt.currentTarget.onkeypress;
if(!kp||!kp[_1e3]){
return;
}
var k=evt.keyCode;
var _205=(k!=13)&&(k!=32)&&(k!=27)&&(k<48||k>90)&&(k<96||k>111)&&(k<186||k>192)&&(k<219||k>222);
if(_205||evt.ctrlKey){
var c=_205?0:k;
if(evt.ctrlKey){
if(k==3||k==13){
return;
}else{
if(c>95&&c<106){
c-=48;
}else{
if((!evt.shiftKey)&&(c>=65&&c<=90)){
c+=32;
}else{
c=del._punctMap[c]||c;
}
}
}
}
var faux=del._synthesizeEvent(evt,{type:"keypress",faux:true,charCode:c});
kp.call(evt.currentTarget,faux);
evt.cancelBubble=faux.cancelBubble;
evt.returnValue=faux.returnValue;
_1df(evt,faux.keyCode);
}
},_stopPropagation:function(){
this.cancelBubble=true;
},_preventDefault:function(){
this.bubbledKeyCode=this.keyCode;
if(this.ctrlKey){
_1df(this,0);
}
this.returnValue=false;
}});
dojo.stopEvent=function(evt){
evt=evt||window.event;
del._stopPropagation.call(evt);
del._preventDefault.call(evt);
};
}
del._synthesizeEvent=function(evt,_20a){
var faux=dojo.mixin({},evt,_20a);
del._setKeyChar(faux);
faux.preventDefault=function(){
evt.preventDefault();
};
faux.stopPropagation=function(){
evt.stopPropagation();
};
return faux;
};
if(dojo.isOpera){
dojo.mixin(del,{_fixEvent:function(evt,_20d){
switch(evt.type){
case "keypress":
var c=evt.which;
if(c==3){
c=99;
}
c=((c<41)&&(!evt.shiftKey)?0:c);
if((evt.ctrlKey)&&(!evt.shiftKey)&&(c>=65)&&(c<=90)){
c+=32;
}
return del._synthesizeEvent(evt,{charCode:c});
}
return evt;
}});
}
if(dojo.isSafari){
del._add=del.add;
del._remove=del.remove;
dojo.mixin(del,{add:function(node,_210,fp){
if(!node){
return;
}
var _212=del._add(node,_210,fp);
if(del._normalizeEventName(_210)=="keypress"){
_212._stealthKeyDownHandle=del._add(node,"keydown",function(evt){
var k=evt.keyCode;
var _215=(k!=13)&&(k!=32)&&(k!=27)&&(k<48||k>90)&&(k<96||k>111)&&(k<186||k>192)&&(k<219||k>222);
if(_215||evt.ctrlKey){
var c=_215?0:k;
if(evt.ctrlKey){
if(k==3||k==13){
return;
}else{
if(c>95&&c<106){
c-=48;
}else{
if((!evt.shiftKey)&&(c>=65&&c<=90)){
c+=32;
}else{
c=del._punctMap[c]||c;
}
}
}
}
var faux=del._synthesizeEvent(evt,{type:"keypress",faux:true,charCode:c});
fp.call(evt.currentTarget,faux);
}
});
}
return _212;
},remove:function(node,_219,_21a){
if(node){
if(_21a._stealthKeyDownHandle){
del._remove(node,"keydown",_21a._stealthKeyDownHandle);
}
del._remove(node,_219,_21a);
}
},_fixEvent:function(evt,_21c){
switch(evt.type){
case "keypress":
if(evt.faux){
return evt;
}
var c=evt.charCode;
c=c>=32?c:0;
return del._synthesizeEvent(evt,{charCode:c,faux:true});
}
return evt;
}});
}
})();
if(dojo.isIE){
dojo._ieDispatcher=function(args,_21f){
var ap=Array.prototype,h=dojo._ie_listener.handlers,c=args.callee,ls=c[dojo._ieListenersName],t=h[c.target];
var r=t&&t.apply(_21f,args);
var lls=[].concat(ls);
for(var i in lls){
if(!(i in ap)){
h[lls[i]].apply(_21f,args);
}
}
return r;
};
dojo._getIeDispatcher=function(){
return new Function(dojo._scopeName+"._ieDispatcher(arguments, this)");
};
dojo._event_listener._fixCallback=function(fp){
var f=dojo._event_listener._fixEvent;
return function(e){
return fp.call(this,f(e,this));
};
};
}
}
if(!dojo._hasResource["dojo._base.html"]){
dojo._hasResource["dojo._base.html"]=true;
dojo.provide("dojo._base.html");
try{
document.execCommand("BackgroundImageCache",false,true);
}
catch(e){
}
if(dojo.isIE||dojo.isOpera){
dojo.byId=function(id,doc){
if(dojo.isString(id)){
var _d=doc||dojo.doc;
var te=_d.getElementById(id);
if(te&&te.attributes.id.value==id){
return te;
}else{
var eles=_d.all[id];
if(!eles||!eles.length){
return eles;
}
var i=0;
while((te=eles[i++])){
if(te.attributes.id.value==id){
return te;
}
}
}
}else{
return id;
}
};
}else{
dojo.byId=function(id,doc){
return dojo.isString(id)?(doc||dojo.doc).getElementById(id):id;
};
}
(function(){
var d=dojo;
var _234=null;
dojo.addOnWindowUnload(function(){
_234=null;
});
dojo._destroyElement=function(node){
node=d.byId(node);
try{
if(!_234||_234.ownerDocument!=node.ownerDocument){
_234=node.ownerDocument.createElement("div");
}
_234.appendChild(node.parentNode?node.parentNode.removeChild(node):node);
_234.innerHTML="";
}
catch(e){
}
};
dojo.isDescendant=function(node,_237){
try{
node=d.byId(node);
_237=d.byId(_237);
while(node){
if(node===_237){
return true;
}
node=node.parentNode;
}
}
catch(e){
}
return false;
};
dojo.setSelectable=function(node,_239){
node=d.byId(node);
if(d.isMozilla){
node.style.MozUserSelect=_239?"":"none";
}else{
if(d.isKhtml){
node.style.KhtmlUserSelect=_239?"auto":"none";
}else{
if(d.isIE){
var v=(node.unselectable=_239?"":"on");
d.query("*",node).forEach("item.unselectable = '"+v+"'");
}
}
}
};
var _23b=function(node,ref){
ref.parentNode.insertBefore(node,ref);
return true;
};
var _23e=function(node,ref){
var pn=ref.parentNode;
if(ref==pn.lastChild){
pn.appendChild(node);
}else{
return _23b(node,ref.nextSibling);
}
return true;
};
dojo.place=function(node,_243,_244){
if(!node||!_243){
return false;
}
node=d.byId(node);
_243=d.byId(_243);
if(typeof _244=="number"){
var cn=_243.childNodes;
if(!cn.length||cn.length<=_244){
_243.appendChild(node);
return true;
}
return _23b(node,_244<=0?_243.firstChild:cn[_244]);
}
switch(_244){
case "before":
return _23b(node,_243);
case "after":
return _23e(node,_243);
case "first":
if(_243.firstChild){
return _23b(node,_243.firstChild);
}
default:
_243.appendChild(node);
return true;
}
};
dojo.boxModel="content-box";
if(d.isIE){
var _dcm=document.compatMode;
d.boxModel=_dcm=="BackCompat"||_dcm=="QuirksMode"||d.isIE<6?"border-box":"content-box";
}
var gcs;
if(d.isSafari){
gcs=function(node){
var s;
if(node instanceof HTMLElement){
var dv=node.ownerDocument.defaultView;
s=dv.getComputedStyle(node,null);
if(!s&&node.style){
node.style.display="";
s=dv.getComputedStyle(node,null);
}
}
return s||{};
};
}else{
if(d.isIE){
gcs=function(node){
return node.nodeType==1?node.currentStyle:{};
};
}else{
gcs=function(node){
return node instanceof HTMLElement?node.ownerDocument.defaultView.getComputedStyle(node,null):{};
};
}
}
dojo.getComputedStyle=gcs;
if(!d.isIE){
dojo._toPixelValue=function(_24d,_24e){
return parseFloat(_24e)||0;
};
}else{
dojo._toPixelValue=function(_24f,_250){
if(!_250){
return 0;
}
if(_250=="medium"){
return 4;
}
if(_250.slice&&(_250.slice(-2)=="px")){
return parseFloat(_250);
}
with(_24f){
var _251=style.left;
var _252=runtimeStyle.left;
runtimeStyle.left=currentStyle.left;
try{
style.left=_250;
_250=style.pixelLeft;
}
catch(e){
_250=0;
}
style.left=_251;
runtimeStyle.left=_252;
}
return _250;
};
}
var px=d._toPixelValue;
var astr="DXImageTransform.Microsoft.Alpha";
var af=function(n,f){
try{
return n.filters.item(astr);
}
catch(e){
return f?{}:null;
}
};
dojo._getOpacity=d.isIE?function(node){
try{
return af(node).Opacity/100;
}
catch(e){
return 1;
}
}:function(node){
return gcs(node).opacity;
};
dojo._setOpacity=d.isIE?function(node,_25b){
var ov=_25b*100;
node.style.zoom=1;
af(node,1).Enabled=(_25b==1?false:true);
if(!af(node)){
node.style.filter+=" progid:"+astr+"(Opacity="+ov+")";
}else{
af(node,1).Opacity=ov;
}
if(node.nodeName.toLowerCase()=="tr"){
d.query("> td",node).forEach(function(i){
d._setOpacity(i,_25b);
});
}
return _25b;
}:function(node,_25f){
return node.style.opacity=_25f;
};
var _260={left:true,top:true};
var _261=/margin|padding|width|height|max|min|offset/;
var _262=function(node,type,_265){
type=type.toLowerCase();
if(d.isIE){
if(_265=="auto"){
if(type=="height"){
return node.offsetHeight;
}
if(type=="width"){
return node.offsetWidth;
}
}
if(type=="fontweight"){
switch(_265){
case 700:
return "bold";
case 400:
default:
return "normal";
}
}
}
if(!(type in _260)){
_260[type]=_261.test(type);
}
return _260[type]?px(node,_265):_265;
};
var _266=d.isIE?"styleFloat":"cssFloat";
var _267={"cssFloat":_266,"styleFloat":_266,"float":_266};
dojo.style=function(node,_269,_26a){
var n=d.byId(node),args=arguments.length,op=(_269=="opacity");
_269=_267[_269]||_269;
if(args==3){
return op?d._setOpacity(n,_26a):n.style[_269]=_26a;
}
if(args==2&&op){
return d._getOpacity(n);
}
var s=gcs(n);
if(args==2&&!d.isString(_269)){
for(var x in _269){
d.style(node,x,_269[x]);
}
return s;
}
return (args==1)?s:_262(n,_269,s[_269]||n.style[_269]);
};
dojo._getPadExtents=function(n,_271){
var s=_271||gcs(n),l=px(n,s.paddingLeft),t=px(n,s.paddingTop);
return {l:l,t:t,w:l+px(n,s.paddingRight),h:t+px(n,s.paddingBottom)};
};
dojo._getBorderExtents=function(n,_276){
var ne="none",s=_276||gcs(n),bl=(s.borderLeftStyle!=ne?px(n,s.borderLeftWidth):0),bt=(s.borderTopStyle!=ne?px(n,s.borderTopWidth):0);
return {l:bl,t:bt,w:bl+(s.borderRightStyle!=ne?px(n,s.borderRightWidth):0),h:bt+(s.borderBottomStyle!=ne?px(n,s.borderBottomWidth):0)};
};
dojo._getPadBorderExtents=function(n,_27c){
var s=_27c||gcs(n),p=d._getPadExtents(n,s),b=d._getBorderExtents(n,s);
return {l:p.l+b.l,t:p.t+b.t,w:p.w+b.w,h:p.h+b.h};
};
dojo._getMarginExtents=function(n,_281){
var s=_281||gcs(n),l=px(n,s.marginLeft),t=px(n,s.marginTop),r=px(n,s.marginRight),b=px(n,s.marginBottom);
if(d.isSafari&&(s.position!="absolute")){
r=l;
}
return {l:l,t:t,w:l+r,h:t+b};
};
dojo._getMarginBox=function(node,_288){
var s=_288||gcs(node),me=d._getMarginExtents(node,s);
var l=node.offsetLeft-me.l,t=node.offsetTop-me.t,p=node.parentNode;
if(d.isMoz){
var sl=parseFloat(s.left),st=parseFloat(s.top);
if(!isNaN(sl)&&!isNaN(st)){
l=sl,t=st;
}else{
if(p&&p.style){
var pcs=gcs(p);
if(pcs.overflow!="visible"){
var be=d._getBorderExtents(p,pcs);
l+=be.l,t+=be.t;
}
}
}
}else{
if(d.isOpera){
if(p){
var be=d._getBorderExtents(p);
l-=be.l;
t-=be.t;
}
}
}
return {l:l,t:t,w:node.offsetWidth+me.w,h:node.offsetHeight+me.h};
};
dojo._getContentBox=function(node,_293){
var s=_293||gcs(node),pe=d._getPadExtents(node,s),be=d._getBorderExtents(node,s),w=node.clientWidth,h;
if(!w){
w=node.offsetWidth,h=node.offsetHeight;
}else{
h=node.clientHeight,be.w=be.h=0;
}
if(d.isOpera){
pe.l+=be.l;
pe.t+=be.t;
}
return {l:pe.l,t:pe.t,w:w-pe.w-be.w,h:h-pe.h-be.h};
};
dojo._getBorderBox=function(node,_29a){
var s=_29a||gcs(node),pe=d._getPadExtents(node,s),cb=d._getContentBox(node,s);
return {l:cb.l-pe.l,t:cb.t-pe.t,w:cb.w+pe.w,h:cb.h+pe.h};
};
dojo._setBox=function(node,l,t,w,h,u){
u=u||"px";
var s=node.style;
if(!isNaN(l)){
s.left=l+u;
}
if(!isNaN(t)){
s.top=t+u;
}
if(w>=0){
s.width=w+u;
}
if(h>=0){
s.height=h+u;
}
};
dojo._isButtonTag=function(node){
return node.tagName=="BUTTON"||node.tagName=="INPUT"&&node.getAttribute("type").toUpperCase()=="BUTTON";
};
dojo._usesBorderBox=function(node){
var n=node.tagName;
return d.boxModel=="border-box"||n=="TABLE"||dojo._isButtonTag(node);
};
dojo._setContentSize=function(node,_2a9,_2aa,_2ab){
if(d._usesBorderBox(node)){
var pb=d._getPadBorderExtents(node,_2ab);
if(_2a9>=0){
_2a9+=pb.w;
}
if(_2aa>=0){
_2aa+=pb.h;
}
}
d._setBox(node,NaN,NaN,_2a9,_2aa);
};
dojo._setMarginBox=function(node,_2ae,_2af,_2b0,_2b1,_2b2){
var s=_2b2||gcs(node);
var bb=d._usesBorderBox(node),pb=bb?_2b6:d._getPadBorderExtents(node,s);
if(dojo.isSafari){
if(dojo._isButtonTag(node)){
var ns=node.style;
if(_2b0>=0&&!ns.width){
ns.width="4px";
}
if(_2b1>=0&&!ns.height){
ns.height="4px";
}
}
}
var mb=d._getMarginExtents(node,s);
if(_2b0>=0){
_2b0=Math.max(_2b0-pb.w-mb.w,0);
}
if(_2b1>=0){
_2b1=Math.max(_2b1-pb.h-mb.h,0);
}
d._setBox(node,_2ae,_2af,_2b0,_2b1);
};
var _2b6={l:0,t:0,w:0,h:0};
dojo.marginBox=function(node,box){
var n=d.byId(node),s=gcs(n),b=box;
return !b?d._getMarginBox(n,s):d._setMarginBox(n,b.l,b.t,b.w,b.h,s);
};
dojo.contentBox=function(node,box){
var n=d.byId(node),s=gcs(n),b=box;
return !b?d._getContentBox(n,s):d._setContentSize(n,b.w,b.h,s);
};
var _2c3=function(node,prop){
if(!(node=(node||0).parentNode)){
return 0;
}
var val,_2c7=0,_b=d.body();
while(node&&node.style){
if(gcs(node).position=="fixed"){
return 0;
}
val=node[prop];
if(val){
_2c7+=val-0;
if(node==_b){
break;
}
}
node=node.parentNode;
}
return _2c7;
};
dojo._docScroll=function(){
var _b=d.body(),_w=d.global,de=d.doc.documentElement;
return {y:(_w.pageYOffset||de.scrollTop||_b.scrollTop||0),x:(_w.pageXOffset||d._fixIeBiDiScrollLeft(de.scrollLeft)||_b.scrollLeft||0)};
};
dojo._isBodyLtr=function(){
return !("_bodyLtr" in d)?d._bodyLtr=gcs(d.body()).direction=="ltr":d._bodyLtr;
};
dojo._getIeDocumentElementOffset=function(){
var de=d.doc.documentElement;
return (d.isIE>=7)?{x:de.getBoundingClientRect().left,y:de.getBoundingClientRect().top}:{x:d._isBodyLtr()||window.parent==window?de.clientLeft:de.offsetWidth-de.clientWidth-de.clientLeft,y:de.clientTop};
};
dojo._fixIeBiDiScrollLeft=function(_2cd){
var dd=d.doc;
if(d.isIE&&!dojo._isBodyLtr()){
var de=dd.compatMode=="BackCompat"?dd.body:dd.documentElement;
return _2cd+de.clientWidth-de.scrollWidth;
}
return _2cd;
};
dojo._abs=function(node,_2d1){
var _2d2=node.ownerDocument;
var ret={x:0,y:0};
var db=d.body();
if(d.isIE||(d.isFF>=3)){
var _2d5=node.getBoundingClientRect();
var cs;
if(d.isFF){
var dv=node.ownerDocument.defaultView;
cs=dv.getComputedStyle(db.parentNode,null);
}
var _2d8=(d.isIE)?d._getIeDocumentElementOffset():{x:px(db.parentNode,cs.marginLeft),y:px(db.parentNode,cs.marginTop)};
ret.x=_2d5.left-_2d8.x;
ret.y=_2d5.top-_2d8.y;
}else{
if(node["offsetParent"]){
var _2d9;
if(d.isSafari&&(gcs(node).position=="absolute")&&(node.parentNode==db)){
_2d9=db;
}else{
_2d9=db.parentNode;
}
var cs=gcs(node);
var n=node;
if(d.isOpera&&cs.position!="absolute"){
n=n.offsetParent;
}
ret.x-=_2c3(n,"scrollLeft");
ret.y-=_2c3(n,"scrollTop");
var _2db=node;
do{
var n=_2db.offsetLeft;
if(!d.isOpera||n>0){
ret.x+=isNaN(n)?0:n;
}
var t=_2db.offsetTop;
ret.y+=isNaN(t)?0:t;
var cs=gcs(_2db);
if(_2db!=node){
if(d.isSafari){
ret.x+=px(_2db,cs.borderLeftWidth);
ret.y+=px(_2db,cs.borderTopWidth);
}else{
if(d.isFF){
ret.x+=2*px(_2db,cs.borderLeftWidth);
ret.y+=2*px(_2db,cs.borderTopWidth);
}
}
}
if(d.isFF&&cs.position=="static"){
var _2dd=_2db.parentNode;
while(_2dd!=_2db.offsetParent){
var pcs=gcs(_2dd);
if(pcs.position=="static"){
ret.x+=px(_2db,pcs.borderLeftWidth);
ret.y+=px(_2db,pcs.borderTopWidth);
}
_2dd=_2dd.parentNode;
}
}
_2db=_2db.offsetParent;
}while((_2db!=_2d9)&&_2db);
}else{
if(node.x&&node.y){
ret.x+=isNaN(node.x)?0:node.x;
ret.y+=isNaN(node.y)?0:node.y;
}
}
}
if(_2d1){
var _2df=d._docScroll();
ret.y+=_2df.y;
ret.x+=_2df.x;
}
return ret;
};
dojo.coords=function(node,_2e1){
var n=d.byId(node),s=gcs(n),mb=d._getMarginBox(n,s);
var abs=d._abs(n,_2e1);
mb.x=abs.x;
mb.y=abs.y;
return mb;
};
var _2e6=d.isIE<8;
var _2e7=function(name){
switch(name.toLowerCase()){
case "tabindex":
return _2e6?"tabIndex":"tabindex";
case "for":
case "htmlfor":
return _2e6?"htmlFor":"for";
case "class":
return d.isIE?"className":"class";
default:
return name;
}
};
var _2e9={colspan:"colSpan",enctype:"enctype",frameborder:"frameborder",method:"method",rowspan:"rowSpan",scrolling:"scrolling",shape:"shape",span:"span",type:"type",valuetype:"valueType"};
dojo.hasAttr=function(node,name){
node=d.byId(node);
var _2ec=_2e7(name);
_2ec=_2ec=="htmlFor"?"for":_2ec;
var attr=node.getAttributeNode&&node.getAttributeNode(_2ec);
return attr?attr.specified:false;
};
var _2ee={};
var _ctr=0;
var _2f0=dojo._scopeName+"attrid";
dojo.attr=function(node,name,_2f3){
var args=arguments.length;
if(args==2&&!d.isString(name)){
for(var x in name){
d.attr(node,x,name[x]);
}
return;
}
node=d.byId(node);
name=_2e7(name);
if(args==3){
if(d.isFunction(_2f3)){
var _2f6=d.attr(node,_2f0);
if(!_2f6){
_2f6=_ctr++;
d.attr(node,_2f0,_2f6);
}
if(!_2ee[_2f6]){
_2ee[_2f6]={};
}
var h=_2ee[_2f6][name];
if(h){
d.disconnect(h);
}else{
try{
delete node[name];
}
catch(e){
}
}
_2ee[_2f6][name]=d.connect(node,name,_2f3);
}else{
if((typeof _2f3=="boolean")||(name=="innerHTML")){
node[name]=_2f3;
}else{
if((name=="style")&&(!d.isString(_2f3))){
d.style(node,_2f3);
}else{
node.setAttribute(name,_2f3);
}
}
}
return;
}else{
var prop=_2e9[name.toLowerCase()];
if(prop){
return node[prop];
}else{
var _2f9=node[name];
return (typeof _2f9=="boolean"||typeof _2f9=="function")?_2f9:(d.hasAttr(node,name)?node.getAttribute(name):null);
}
}
};
dojo.removeAttr=function(node,name){
d.byId(node).removeAttribute(_2e7(name));
};
var _2fc="className";
dojo.hasClass=function(node,_2fe){
return ((" "+d.byId(node)[_2fc]+" ").indexOf(" "+_2fe+" ")>=0);
};
dojo.addClass=function(node,_300){
node=d.byId(node);
var cls=node[_2fc];
if((" "+cls+" ").indexOf(" "+_300+" ")<0){
node[_2fc]=cls+(cls?" ":"")+_300;
}
};
dojo.removeClass=function(node,_303){
node=d.byId(node);
var t=d.trim((" "+node[_2fc]+" ").replace(" "+_303+" "," "));
if(node[_2fc]!=t){
node[_2fc]=t;
}
};
dojo.toggleClass=function(node,_306,_307){
if(_307===undefined){
_307=!d.hasClass(node,_306);
}
d[_307?"addClass":"removeClass"](node,_306);
};
})();
}
if(!dojo._hasResource["dojo._base.NodeList"]){
dojo._hasResource["dojo._base.NodeList"]=true;
dojo.provide("dojo._base.NodeList");
(function(){
var d=dojo;
var tnl=function(arr){
arr.constructor=dojo.NodeList;
dojo._mixin(arr,dojo.NodeList.prototype);
return arr;
};
var _30b=function(func,_30d){
return function(){
var _a=arguments;
var aa=d._toArray(_a,0,[null]);
var s=this.map(function(i){
aa[0]=i;
return d[func].apply(d,aa);
});
return (_30d||((_a.length>1)||!d.isString(_a[0])))?this:s;
};
};
dojo.NodeList=function(){
return tnl(Array.apply(null,arguments));
};
dojo.NodeList._wrap=tnl;
dojo.extend(dojo.NodeList,{slice:function(){
var a=d._toArray(arguments);
return tnl(a.slice.apply(this,a));
},splice:function(){
var a=d._toArray(arguments);
return tnl(a.splice.apply(this,a));
},concat:function(){
var a=d._toArray(arguments,0,[this]);
return tnl(a.concat.apply([],a));
},indexOf:function(_315,_316){
return d.indexOf(this,_315,_316);
},lastIndexOf:function(){
return d.lastIndexOf.apply(d,d._toArray(arguments,0,[this]));
},every:function(_317,_318){
return d.every(this,_317,_318);
},some:function(_319,_31a){
return d.some(this,_319,_31a);
},map:function(func,obj){
return d.map(this,func,obj,d.NodeList);
},forEach:function(_31d,_31e){
d.forEach(this,_31d,_31e);
return this;
},coords:function(){
return d.map(this,d.coords);
},attr:_30b("attr"),style:_30b("style"),addClass:_30b("addClass",true),removeClass:_30b("removeClass",true),toggleClass:_30b("toggleClass",true),connect:_30b("connect",true),place:function(_31f,_320){
var item=d.query(_31f)[0];
return this.forEach(function(i){
d.place(i,item,_320);
});
},orphan:function(_323){
return (_323?d._filterQueryResult(this,_323):this).forEach("if(item.parentNode){ item.parentNode.removeChild(item); }");
},adopt:function(_324,_325){
var item=this[0];
return d.query(_324).forEach(function(ai){
d.place(ai,item,_325||"last");
});
},query:function(_328){
if(!_328){
return this;
}
var ret=d.NodeList();
this.forEach(function(item){
ret=ret.concat(d.query(_328,item).filter(function(_32b){
return (_32b!==undefined);
}));
});
return ret;
},filter:function(_32c){
var _32d=this;
var _a=arguments;
var r=d.NodeList();
var rp=function(t){
if(t!==undefined){
r.push(t);
}
};
if(d.isString(_32c)){
_32d=d._filterQueryResult(this,_a[0]);
if(_a.length==1){
return _32d;
}
_a.shift();
}
d.forEach(d.filter(_32d,_a[0],_a[1]),rp);
return r;
},addContent:function(_332,_333){
var ta=d.doc.createElement("span");
if(d.isString(_332)){
ta.innerHTML=_332;
}else{
ta.appendChild(_332);
}
if(_333===undefined){
_333="last";
}
var ct=(_333=="first"||_333=="after")?"lastChild":"firstChild";
this.forEach(function(item){
var tn=ta.cloneNode(true);
while(tn[ct]){
d.place(tn[ct],item,_333);
}
});
return this;
},empty:function(){
return this.forEach("item.innerHTML='';");
},instantiate:function(_338,_339){
var c=d.isFunction(_338)?_338:d.getObject(_338);
return this.forEach(function(i){
new c(_339||{},i);
});
},at:function(){
var nl=new dojo.NodeList();
dojo.forEach(arguments,function(i){
if(this[i]){
nl.push(this[i]);
}
},this);
return nl;
}});
d.forEach(["blur","focus","click","keydown","keypress","keyup","mousedown","mouseenter","mouseleave","mousemove","mouseout","mouseover","mouseup","submit","load","error"],function(evt){
var _oe="on"+evt;
d.NodeList.prototype[_oe]=function(a,b){
return this.connect(_oe,a,b);
};
});
})();
}
if(!dojo._hasResource["dojo._base.query"]){
dojo._hasResource["dojo._base.query"]=true;
dojo.provide("dojo._base.query");
(function(){
var d=dojo;
var _343=dojo.isIE?"children":"childNodes";
var _344=false;
var _345=function(_346){
if(">~+".indexOf(_346.charAt(_346.length-1))>=0){
_346+=" *";
}
_346+=" ";
var ts=function(s,e){
return d.trim(_346.slice(s,e));
};
var _34a=[];
var _34b=-1;
var _34c=-1;
var _34d=-1;
var _34e=-1;
var _34f=-1;
var inId=-1;
var _351=-1;
var lc="";
var cc="";
var _354;
var x=0;
var ql=_346.length;
var _357=null;
var _cp=null;
var _359=function(){
if(_351>=0){
var tv=(_351==x)?null:ts(_351,x);
_357[(">~+".indexOf(tv)<0)?"tag":"oper"]=tv;
_351=-1;
}
};
var _35b=function(){
if(inId>=0){
_357.id=ts(inId,x).replace(/\\/g,"");
inId=-1;
}
};
var _35c=function(){
if(_34f>=0){
_357.classes.push(ts(_34f+1,x).replace(/\\/g,""));
_34f=-1;
}
};
var _35d=function(){
_35b();
_359();
_35c();
};
for(;lc=cc,cc=_346.charAt(x),x<ql;x++){
if(lc=="\\"){
continue;
}
if(!_357){
_354=x;
_357={query:null,pseudos:[],attrs:[],classes:[],tag:null,oper:null,id:null};
_351=x;
}
if(_34b>=0){
if(cc=="]"){
if(!_cp.attr){
_cp.attr=ts(_34b+1,x);
}else{
_cp.matchFor=ts((_34d||_34b+1),x);
}
var cmf=_cp.matchFor;
if(cmf){
if((cmf.charAt(0)=="\"")||(cmf.charAt(0)=="'")){
_cp.matchFor=cmf.substring(1,cmf.length-1);
}
}
_357.attrs.push(_cp);
_cp=null;
_34b=_34d=-1;
}else{
if(cc=="="){
var _35f=("|~^$*".indexOf(lc)>=0)?lc:"";
_cp.type=_35f+cc;
_cp.attr=ts(_34b+1,x-_35f.length);
_34d=x+1;
}
}
}else{
if(_34c>=0){
if(cc==")"){
if(_34e>=0){
_cp.value=ts(_34c+1,x);
}
_34e=_34c=-1;
}
}else{
if(cc=="#"){
_35d();
inId=x+1;
}else{
if(cc=="."){
_35d();
_34f=x;
}else{
if(cc==":"){
_35d();
_34e=x;
}else{
if(cc=="["){
_35d();
_34b=x;
_cp={};
}else{
if(cc=="("){
if(_34e>=0){
_cp={name:ts(_34e+1,x),value:null};
_357.pseudos.push(_cp);
}
_34c=x;
}else{
if(cc==" "&&lc!=cc){
_35d();
if(_34e>=0){
_357.pseudos.push({name:ts(_34e+1,x)});
}
_357.hasLoops=(_357.pseudos.length||_357.attrs.length||_357.classes.length);
_357.query=ts(_354,x);
_357.otag=_357.tag=(_357["oper"])?null:(_357.tag||"*");
if(_357.tag){
_357.tag=_357.tag.toUpperCase();
}
_34a.push(_357);
_357=null;
}
}
}
}
}
}
}
}
}
return _34a;
};
var _360={"*=":function(attr,_362){
return "[contains(@"+attr+", '"+_362+"')]";
},"^=":function(attr,_364){
return "[starts-with(@"+attr+", '"+_364+"')]";
},"$=":function(attr,_366){
return "[substring(@"+attr+", string-length(@"+attr+")-"+(_366.length-1)+")='"+_366+"']";
},"~=":function(attr,_368){
return "[contains(concat(' ',@"+attr+",' '), ' "+_368+" ')]";
},"|=":function(attr,_36a){
return "[contains(concat(' ',@"+attr+",' '), ' "+_36a+"-')]";
},"=":function(attr,_36c){
return "[@"+attr+"='"+_36c+"']";
}};
var _36d=function(_36e,_36f,_370,_371){
d.forEach(_36f.attrs,function(attr){
var _373;
if(attr.type&&_36e[attr.type]){
_373=_36e[attr.type](attr.attr,attr.matchFor);
}else{
if(attr.attr.length){
_373=_370(attr.attr);
}
}
if(_373){
_371(_373);
}
});
};
var _374=function(_375){
var _376=".";
var _377=_345(d.trim(_375));
while(_377.length){
var tqp=_377.shift();
var _379;
var _37a="";
if(tqp.oper==">"){
_379="/";
tqp=_377.shift();
}else{
if(tqp.oper=="~"){
_379="/following-sibling::";
tqp=_377.shift();
}else{
if(tqp.oper=="+"){
_379="/following-sibling::";
_37a="[position()=1]";
tqp=_377.shift();
}else{
_379="//";
}
}
}
_376+=_379+tqp.tag+_37a;
if(tqp.id){
_376+="[@id='"+tqp.id+"'][1]";
}
d.forEach(tqp.classes,function(cn){
var cnl=cn.length;
var _37d=" ";
if(cn.charAt(cnl-1)=="*"){
_37d="";
cn=cn.substr(0,cnl-1);
}
_376+="[contains(concat(' ',@class,' '), ' "+cn+_37d+"')]";
});
_36d(_360,tqp,function(_37e){
return "[@"+_37e+"]";
},function(_37f){
_376+=_37f;
});
}
return _376;
};
var _380={};
var _381=function(path){
if(_380[path]){
return _380[path];
}
var doc=d.doc;
var _384=_374(path);
var tf=function(_386){
var ret=[];
var _388;
var tdoc=doc;
if(_386){
tdoc=(_386.nodeType==9)?_386:_386.ownerDocument;
}
try{
_388=tdoc.evaluate(_384,_386,null,XPathResult.ANY_TYPE,null);
}
catch(e){
console.debug("failure in exprssion:",_384,"under:",_386);
console.debug(e);
}
var _38a=_388.iterateNext();
while(_38a){
ret.push(_38a);
_38a=_388.iterateNext();
}
return ret;
};
return _380[path]=tf;
};
var _38b={};
var _38c={};
var _38d=function(_38e,_38f){
if(!_38e){
return _38f;
}
if(!_38f){
return _38e;
}
return function(){
return _38e.apply(window,arguments)&&_38f.apply(window,arguments);
};
};
var _390=function(root){
var ret=[];
var te,x=0,tret=root[_343];
while((te=tret[x++])){
if(te.nodeType==1){
ret.push(te);
}
}
return ret;
};
var _396=function(root,_398){
var ret=[];
var te=root;
while(te=te.nextSibling){
if(te.nodeType==1){
ret.push(te);
if(_398){
break;
}
}
}
return ret;
};
var _39b=function(_39c,_39d,_39e,idx){
var nidx=idx+1;
var _3a1=(_39d.length==nidx);
var tqp=_39d[idx];
if(tqp.oper){
var ecn=(tqp.oper==">")?_390(_39c):_396(_39c,(tqp.oper=="+"));
if(!ecn||!ecn.length){
return;
}
nidx++;
_3a1=(_39d.length==nidx);
var tf=_3a5(_39d[idx+1]);
for(var x=0,ecnl=ecn.length,te;x<ecnl,te=ecn[x];x++){
if(tf(te)){
if(_3a1){
_39e.push(te);
}else{
_39b(te,_39d,_39e,nidx);
}
}
}
}
var _3a9=_3aa(tqp)(_39c);
if(_3a1){
while(_3a9.length){
_39e.push(_3a9.shift());
}
}else{
while(_3a9.length){
_39b(_3a9.shift(),_39d,_39e,nidx);
}
}
};
var _3ab=function(_3ac,_3ad){
var ret=[];
var x=_3ac.length-1,te;
while((te=_3ac[x--])){
_39b(te,_3ad,ret,0);
}
return ret;
};
var _3a5=function(q){
if(_38b[q.query]){
return _38b[q.query];
}
var ff=null;
if(q.tag){
if(q.tag=="*"){
ff=_38d(ff,function(elem){
return (elem.nodeType==1);
});
}else{
ff=_38d(ff,function(elem){
return ((elem.nodeType==1)&&(q[_344?"otag":"tag"]==elem.tagName));
});
}
}
if(q.id){
ff=_38d(ff,function(elem){
return ((elem.nodeType==1)&&(elem.id==q.id));
});
}
if(q.hasLoops){
ff=_38d(ff,_3b6(q));
}
return _38b[q.query]=ff;
};
var _3b7=function(node){
var pn=node.parentNode;
var pnc=pn.childNodes;
var nidx=-1;
var _3bc=pn.firstChild;
if(!_3bc){
return nidx;
}
var ci=node["__cachedIndex"];
var cl=pn["__cachedLength"];
if(((typeof cl=="number")&&(cl!=pnc.length))||(typeof ci!="number")){
pn["__cachedLength"]=pnc.length;
var idx=1;
do{
if(_3bc===node){
nidx=idx;
}
if(_3bc.nodeType==1){
_3bc["__cachedIndex"]=idx;
idx++;
}
_3bc=_3bc.nextSibling;
}while(_3bc);
}else{
nidx=ci;
}
return nidx;
};
var _3c0=0;
var _3c1="";
var _3c2=function(elem,attr){
if(attr=="class"){
return elem.className||_3c1;
}
if(attr=="for"){
return elem.htmlFor||_3c1;
}
if(attr=="style"){
return elem.style.cssText||_3c1;
}
return (_344?elem.getAttribute(attr):elem.getAttribute(attr,2))||_3c1;
};
var _3c5={"*=":function(attr,_3c7){
return function(elem){
return (_3c2(elem,attr).indexOf(_3c7)>=0);
};
},"^=":function(attr,_3ca){
return function(elem){
return (_3c2(elem,attr).indexOf(_3ca)==0);
};
},"$=":function(attr,_3cd){
var tval=" "+_3cd;
return function(elem){
var ea=" "+_3c2(elem,attr);
return (ea.lastIndexOf(_3cd)==(ea.length-_3cd.length));
};
},"~=":function(attr,_3d2){
var tval=" "+_3d2+" ";
return function(elem){
var ea=" "+_3c2(elem,attr)+" ";
return (ea.indexOf(tval)>=0);
};
},"|=":function(attr,_3d7){
var _3d8=" "+_3d7+"-";
return function(elem){
var ea=" "+(elem.getAttribute(attr,2)||"");
return ((ea==_3d7)||(ea.indexOf(_3d8)==0));
};
},"=":function(attr,_3dc){
return function(elem){
return (_3c2(elem,attr)==_3dc);
};
}};
var _3de={"checked":function(name,_3e0){
return function(elem){
return !!d.attr(elem,"checked");
};
},"first-child":function(name,_3e3){
return function(elem){
if(elem.nodeType!=1){
return false;
}
var fc=elem.previousSibling;
while(fc&&(fc.nodeType!=1)){
fc=fc.previousSibling;
}
return (!fc);
};
},"last-child":function(name,_3e7){
return function(elem){
if(elem.nodeType!=1){
return false;
}
var nc=elem.nextSibling;
while(nc&&(nc.nodeType!=1)){
nc=nc.nextSibling;
}
return (!nc);
};
},"empty":function(name,_3eb){
return function(elem){
var cn=elem.childNodes;
var cnl=elem.childNodes.length;
for(var x=cnl-1;x>=0;x--){
var nt=cn[x].nodeType;
if((nt==1)||(nt==3)){
return false;
}
}
return true;
};
},"contains":function(name,_3f2){
return function(elem){
if(_3f2.charAt(0)=="\""||_3f2.charAt(0)=="'"){
_3f2=_3f2.substr(1,_3f2.length-2);
}
return (elem.innerHTML.indexOf(_3f2)>=0);
};
},"not":function(name,_3f5){
var ntf=_3a5(_345(_3f5)[0]);
return function(elem){
return (!ntf(elem));
};
},"nth-child":function(name,_3f9){
var pi=parseInt;
if(_3f9=="odd"){
_3f9="2n+1";
}else{
if(_3f9=="even"){
_3f9="2n";
}
}
if(_3f9.indexOf("n")!=-1){
var _3fb=_3f9.split("n",2);
var pred=_3fb[0]?(_3fb[0]=="-"?-1:pi(_3fb[0])):1;
var idx=_3fb[1]?pi(_3fb[1]):0;
var lb=0,ub=-1;
if(pred>0){
if(idx<0){
idx=(idx%pred)&&(pred+(idx%pred));
}else{
if(idx>0){
if(idx>=pred){
lb=idx-idx%pred;
}
idx=idx%pred;
}
}
}else{
if(pred<0){
pred*=-1;
if(idx>0){
ub=idx;
idx=idx%pred;
}
}
}
if(pred>0){
return function(elem){
var i=_3b7(elem);
return (i>=lb)&&(ub<0||i<=ub)&&((i%pred)==idx);
};
}else{
_3f9=idx;
}
}
var _402=pi(_3f9);
return function(elem){
return (_3b7(elem)==_402);
};
}};
var _404=(d.isIE)?function(cond){
var clc=cond.toLowerCase();
return function(elem){
return (_344?elem.getAttribute(cond):elem[cond]||elem[clc]);
};
}:function(cond){
return function(elem){
return (elem&&elem.getAttribute&&elem.hasAttribute(cond));
};
};
var _3b6=function(_40a){
var _40b=(_38c[_40a.query]||_38b[_40a.query]);
if(_40b){
return _40b;
}
var ff=null;
if(_40a.id){
if(_40a.tag!="*"){
ff=_38d(ff,function(elem){
return (elem.tagName==_40a[_344?"otag":"tag"]);
});
}
}
d.forEach(_40a.classes,function(_40e,idx,arr){
var _411=_40e.charAt(_40e.length-1)=="*";
if(_411){
_40e=_40e.substr(0,_40e.length-1);
}
var re=new RegExp("(?:^|\\s)"+_40e+(_411?".*":"")+"(?:\\s|$)");
ff=_38d(ff,function(elem){
return re.test(elem.className);
});
ff.count=idx;
});
d.forEach(_40a.pseudos,function(_414){
if(_3de[_414.name]){
ff=_38d(ff,_3de[_414.name](_414.name,_414.value));
}
});
_36d(_3c5,_40a,_404,function(_415){
ff=_38d(ff,_415);
});
if(!ff){
ff=function(){
return true;
};
}
return _38c[_40a.query]=ff;
};
var _416={};
var _3aa=function(_417,root){
var fHit=_416[_417.query];
if(fHit){
return fHit;
}
if(_417.id&&!_417.hasLoops&&!_417.tag){
return _416[_417.query]=function(root){
return [d.byId(_417.id)];
};
}
var _41b=_3b6(_417);
var _41c;
if(_417.tag&&_417.id&&!_417.hasLoops){
_41c=function(root){
var te=d.byId(_417.id,(root.ownerDocument||root));
if(_41b(te)){
return [te];
}
};
}else{
var tret;
if(!_417.hasLoops){
_41c=function(root){
var ret=[];
var te,x=0,tret=root.getElementsByTagName(_417[_344?"otag":"tag"]);
while((te=tret[x++])){
ret.push(te);
}
return ret;
};
}else{
_41c=function(root){
var ret=[];
var te,x=0,tret=root.getElementsByTagName(_417[_344?"otag":"tag"]);
while((te=tret[x++])){
if(_41b(te)){
ret.push(te);
}
}
return ret;
};
}
}
return _416[_417.query]=_41c;
};
var _428={};
var _429={"*":d.isIE?function(root){
return root.all;
}:function(root){
return root.getElementsByTagName("*");
},"~":_396,"+":function(root){
return _396(root,true);
},">":_390};
var _42d=function(_42e){
var _42f=_345(d.trim(_42e));
if(_42f.length==1){
var tt=_3aa(_42f[0]);
tt.nozip=true;
return tt;
}
var sqf=function(root){
var _433=_42f.slice(0);
var _434;
if(_433[0].oper==">"){
_434=[root];
}else{
_434=_3aa(_433.shift())(root);
}
return _3ab(_434,_433);
};
return sqf;
};
var _435=((document["evaluate"]&&!d.isSafari)?function(_436,root){
var _438=_436.split(" ");
if((!_344)&&(document["evaluate"])&&(_436.indexOf(":")==-1)&&(_436.indexOf("+")==-1)){
if(((_438.length>2)&&(_436.indexOf(">")==-1))||(_438.length>3)||(_436.indexOf("[")>=0)||((1==_438.length)&&(0<=_436.indexOf(".")))){
return _381(_436);
}
}
return _42d(_436);
}:_42d);
var _439=function(_43a){
if(_429[_43a]){
return _429[_43a];
}
if(0>_43a.indexOf(",")){
return _429[_43a]=_435(_43a);
}else{
var _43b=_43a.split(/\s*,\s*/);
var tf=function(root){
var _43e=0;
var ret=[];
var tp;
while((tp=_43b[_43e++])){
ret=ret.concat(_435(tp,tp.indexOf(" "))(root));
}
return ret;
};
return _429[_43a]=tf;
}
};
var _441=0;
var _zip=function(arr){
if(arr&&arr.nozip){
return d.NodeList._wrap(arr);
}
var ret=new d.NodeList();
if(!arr){
return ret;
}
if(arr[0]){
ret.push(arr[0]);
}
if(arr.length<2){
return ret;
}
_441++;
if(d.isIE&&_344){
var _445=_441+"";
arr[0].setAttribute("_zipIdx",_445);
for(var x=1,te;te=arr[x];x++){
if(arr[x].getAttribute("_zipIdx")!=_445){
ret.push(te);
}
te.setAttribute("_zipIdx",_445);
}
}else{
arr[0]["_zipIdx"]=_441;
for(var x=1,te;te=arr[x];x++){
if(arr[x]["_zipIdx"]!=_441){
ret.push(te);
}
te["_zipIdx"]=_441;
}
}
return ret;
};
d.query=function(_448,root){
if(_448.constructor==d.NodeList){
return _448;
}
if(!d.isString(_448)){
return new d.NodeList(_448);
}
if(d.isString(root)){
root=d.byId(root);
}
root=root||d.doc;
var od=root.ownerDocument||root.documentElement;
_344=(root.contentType&&root.contentType=="application/xml")||(!!od)&&(d.isIE?od.xml:(root.xmlVersion||od.xmlVersion));
return _zip(_439(_448)(root));
};
d.query.pseudos=_3de;
d._filterQueryResult=function(_44b,_44c){
var tnl=new d.NodeList();
var ff=(_44c)?_3a5(_345(_44c)[0]):function(){
return true;
};
for(var x=0,te;te=_44b[x];x++){
if(ff(te)){
tnl.push(te);
}
}
return tnl;
};
})();
}
if(!dojo._hasResource["dojo._base.xhr"]){
dojo._hasResource["dojo._base.xhr"]=true;
dojo.provide("dojo._base.xhr");
(function(){
var _d=dojo;
function setValue(obj,name,_454){
var val=obj[name];
if(_d.isString(val)){
obj[name]=[val,_454];
}else{
if(_d.isArray(val)){
val.push(_454);
}else{
obj[name]=_454;
}
}
};
dojo.formToObject=function(_456){
var ret={};
var _458="file|submit|image|reset|button|";
_d.forEach(dojo.byId(_456).elements,function(item){
var _in=item.name;
var type=(item.type||"").toLowerCase();
if(_in&&type&&_458.indexOf(type)==-1&&!item.disabled){
if(type=="radio"||type=="checkbox"){
if(item.checked){
setValue(ret,_in,item.value);
}
}else{
if(item.multiple){
ret[_in]=[];
_d.query("option",item).forEach(function(opt){
if(opt.selected){
setValue(ret,_in,opt.value);
}
});
}else{
setValue(ret,_in,item.value);
if(type=="image"){
ret[_in+".x"]=ret[_in+".y"]=ret[_in].x=ret[_in].y=0;
}
}
}
}
});
return ret;
};
dojo.objectToQuery=function(map){
var enc=encodeURIComponent;
var _45f=[];
var _460={};
for(var name in map){
var _462=map[name];
if(_462!=_460[name]){
var _463=enc(name)+"=";
if(_d.isArray(_462)){
for(var i=0;i<_462.length;i++){
_45f.push(_463+enc(_462[i]));
}
}else{
_45f.push(_463+enc(_462));
}
}
}
return _45f.join("&");
};
dojo.formToQuery=function(_465){
return _d.objectToQuery(_d.formToObject(_465));
};
dojo.formToJson=function(_466,_467){
return _d.toJson(_d.formToObject(_466),_467);
};
dojo.queryToObject=function(str){
var ret={};
var qp=str.split("&");
var dec=decodeURIComponent;
_d.forEach(qp,function(item){
if(item.length){
var _46d=item.split("=");
var name=dec(_46d.shift());
var val=dec(_46d.join("="));
if(_d.isString(ret[name])){
ret[name]=[ret[name]];
}
if(_d.isArray(ret[name])){
ret[name].push(val);
}else{
ret[name]=val;
}
}
});
return ret;
};
dojo._blockAsync=false;
dojo._contentHandlers={"text":function(xhr){
return xhr.responseText;
},"json":function(xhr){
return _d.fromJson(xhr.responseText||null);
},"json-comment-filtered":function(xhr){
if(!dojo.config.useCommentedJson){
console.warn("Consider using the standard mimetype:application/json."+" json-commenting can introduce security issues. To"+" decrease the chances of hijacking, use the standard the 'json' handler and"+" prefix your json with: {}&&\n"+"Use djConfig.useCommentedJson=true to turn off this message.");
}
var _473=xhr.responseText;
var _474=_473.indexOf("/*");
var _475=_473.lastIndexOf("*/");
if(_474==-1||_475==-1){
throw new Error("JSON was not comment filtered");
}
return _d.fromJson(_473.substring(_474+2,_475));
},"javascript":function(xhr){
return _d.eval(xhr.responseText);
},"xml":function(xhr){
var _478=xhr.responseXML;
if(_d.isIE&&(!_478||_478.documentElement==null)){
_d.forEach(["MSXML2","Microsoft","MSXML","MSXML3"],function(_479){
try{
var dom=new ActiveXObject(_479+".XMLDOM");
dom.async=false;
dom.loadXML(xhr.responseText);
_478=dom;
}
catch(e){
}
});
}
return _478;
}};
dojo._contentHandlers["json-comment-optional"]=function(xhr){
var _47c=_d._contentHandlers;
if(xhr.responseText&&xhr.responseText.indexOf("/*")!=-1){
return _47c["json-comment-filtered"](xhr);
}else{
return _47c["json"](xhr);
}
};
dojo._ioSetArgs=function(args,_47e,_47f,_480){
var _481={args:args,url:args.url};
var _482=null;
if(args.form){
var form=_d.byId(args.form);
var _484=form.getAttributeNode("action");
_481.url=_481.url||(_484?_484.value:null);
_482=_d.formToObject(form);
}
var _485=[{}];
if(_482){
_485.push(_482);
}
if(args.content){
_485.push(args.content);
}
if(args.preventCache){
_485.push({"dojo.preventCache":new Date().valueOf()});
}
_481.query=_d.objectToQuery(_d.mixin.apply(null,_485));
_481.handleAs=args.handleAs||"text";
var d=new _d.Deferred(_47e);
d.addCallbacks(_47f,function(_487){
return _480(_487,d);
});
var ld=args.load;
if(ld&&_d.isFunction(ld)){
d.addCallback(function(_489){
return ld.call(args,_489,_481);
});
}
var err=args.error;
if(err&&_d.isFunction(err)){
d.addErrback(function(_48b){
return err.call(args,_48b,_481);
});
}
var _48c=args.handle;
if(_48c&&_d.isFunction(_48c)){
d.addBoth(function(_48d){
return _48c.call(args,_48d,_481);
});
}
d.ioArgs=_481;
return d;
};
var _48e=function(dfd){
dfd.canceled=true;
var xhr=dfd.ioArgs.xhr;
var _at=typeof xhr.abort;
if(_at=="function"||_at=="object"||_at=="unknown"){
xhr.abort();
}
var err=dfd.ioArgs.error;
if(!err){
err=new Error("xhr cancelled");
err.dojoType="cancel";
}
return err;
};
var _493=function(dfd){
var ret=_d._contentHandlers[dfd.ioArgs.handleAs](dfd.ioArgs.xhr);
return (typeof ret=="undefined")?null:ret;
};
var _496=function(_497,dfd){
console.debug(_497);
return _497;
};
var _499=null;
var _49a=[];
var _49b=function(){
var now=(new Date()).getTime();
if(!_d._blockAsync){
for(var i=0,tif;i<_49a.length&&(tif=_49a[i]);i++){
var dfd=tif.dfd;
var func=function(){
if(!dfd||dfd.canceled||!tif.validCheck(dfd)){
_49a.splice(i--,1);
}else{
if(tif.ioCheck(dfd)){
_49a.splice(i--,1);
tif.resHandle(dfd);
}else{
if(dfd.startTime){
if(dfd.startTime+(dfd.ioArgs.args.timeout||0)<now){
_49a.splice(i--,1);
var err=new Error("timeout exceeded");
err.dojoType="timeout";
dfd.errback(err);
dfd.cancel();
}
}
}
}
};
if(dojo.config.isDebug){
func.call(this);
}else{
try{
func.call(this);
}
catch(e){
dfd.errback(e);
}
}
}
}
if(!_49a.length){
clearInterval(_499);
_499=null;
return;
}
};
dojo._ioCancelAll=function(){
try{
_d.forEach(_49a,function(i){
try{
i.dfd.cancel();
}
catch(e){
}
});
}
catch(e){
}
};
if(_d.isIE){
_d.addOnWindowUnload(_d._ioCancelAll);
}
_d._ioWatch=function(dfd,_4a4,_4a5,_4a6){
if(dfd.ioArgs.args.timeout){
dfd.startTime=(new Date()).getTime();
}
_49a.push({dfd:dfd,validCheck:_4a4,ioCheck:_4a5,resHandle:_4a6});
if(!_499){
_499=setInterval(_49b,50);
}
_49b();
};
var _4a7="application/x-www-form-urlencoded";
var _4a8=function(dfd){
return dfd.ioArgs.xhr.readyState;
};
var _4aa=function(dfd){
return 4==dfd.ioArgs.xhr.readyState;
};
var _4ac=function(dfd){
var xhr=dfd.ioArgs.xhr;
if(_d._isDocumentOk(xhr)){
dfd.callback(dfd);
}else{
var err=new Error("Unable to load "+dfd.ioArgs.url+" status:"+xhr.status);
err.status=xhr.status;
err.responseText=xhr.responseText;
dfd.errback(err);
}
};
dojo._ioAddQueryToUrl=function(_4b0){
if(_4b0.query.length){
_4b0.url+=(_4b0.url.indexOf("?")==-1?"?":"&")+_4b0.query;
_4b0.query=null;
}
};
dojo.xhr=function(_4b1,args,_4b3){
var dfd=_d._ioSetArgs(args,_48e,_493,_496);
dfd.ioArgs.xhr=_d._xhrObj(dfd.ioArgs.args);
if(_4b3){
if("postData" in args){
dfd.ioArgs.query=args.postData;
}else{
if("putData" in args){
dfd.ioArgs.query=args.putData;
}
}
}else{
_d._ioAddQueryToUrl(dfd.ioArgs);
}
var _4b5=dfd.ioArgs;
var xhr=_4b5.xhr;
xhr.open(_4b1,_4b5.url,args.sync!==true,args.user||undefined,args.password||undefined);
if(args.headers){
for(var hdr in args.headers){
if(hdr.toLowerCase()==="content-type"&&!args.contentType){
args.contentType=args.headers[hdr];
}else{
xhr.setRequestHeader(hdr,args.headers[hdr]);
}
}
}
xhr.setRequestHeader("Content-Type",args.contentType||_4a7);
if(!args.headers||!args.headers["X-Requested-With"]){
xhr.setRequestHeader("X-Requested-With","XMLHttpRequest");
}
if(dojo.config.isDebug){
xhr.send(_4b5.query);
}else{
try{
xhr.send(_4b5.query);
}
catch(e){
dfd.ioArgs.error=e;
dfd.cancel();
}
}
_d._ioWatch(dfd,_4a8,_4aa,_4ac);
xhr=null;
return dfd;
};
dojo.xhrGet=function(args){
return _d.xhr("GET",args);
};
dojo.rawXhrPost=dojo.xhrPost=function(args){
return _d.xhr("POST",args,true);
};
dojo.rawXhrPut=dojo.xhrPut=function(args){
return _d.xhr("PUT",args,true);
};
dojo.xhrDelete=function(args){
return _d.xhr("DELETE",args);
};
})();
}
if(!dojo._hasResource["dojo._base.fx"]){
dojo._hasResource["dojo._base.fx"]=true;
dojo.provide("dojo._base.fx");
(function(){
var d=dojo;
dojo._Line=function(_4bd,end){
this.start=_4bd;
this.end=end;
this.getValue=function(n){
return ((this.end-this.start)*n)+this.start;
};
};
d.declare("dojo._Animation",null,{constructor:function(args){
d.mixin(this,args);
if(d.isArray(this.curve)){
this.curve=new d._Line(this.curve[0],this.curve[1]);
}
},duration:350,repeat:0,rate:10,_percent:0,_startRepeatCount:0,_fire:function(evt,args){
if(this[evt]){
if(dojo.config.isDebug){
this[evt].apply(this,args||[]);
}else{
try{
this[evt].apply(this,args||[]);
}
catch(e){
console.error("exception in animation handler for:",evt);
console.error(e);
}
}
}
return this;
},play:function(_4c3,_4c4){
var _t=this;
if(_4c4){
_t._stopTimer();
_t._active=_t._paused=false;
_t._percent=0;
}else{
if(_t._active&&!_t._paused){
return _t;
}
}
_t._fire("beforeBegin");
var de=_4c3||_t.delay;
var _p=dojo.hitch(_t,"_play",_4c4);
if(de>0){
setTimeout(_p,de);
return _t;
}
_p();
return _t;
},_play:function(_4c8){
var _t=this;
_t._startTime=new Date().valueOf();
if(_t._paused){
_t._startTime-=_t.duration*_t._percent;
}
_t._endTime=_t._startTime+_t.duration;
_t._active=true;
_t._paused=false;
var _4ca=_t.curve.getValue(_t._percent);
if(!_t._percent){
if(!_t._startRepeatCount){
_t._startRepeatCount=_t.repeat;
}
_t._fire("onBegin",[_4ca]);
}
_t._fire("onPlay",[_4ca]);
_t._cycle();
return _t;
},pause:function(){
this._stopTimer();
if(!this._active){
return this;
}
this._paused=true;
this._fire("onPause",[this.curve.getValue(this._percent)]);
return this;
},gotoPercent:function(_4cb,_4cc){
this._stopTimer();
this._active=this._paused=true;
this._percent=_4cb;
if(_4cc){
this.play();
}
return this;
},stop:function(_4cd){
if(!this._timer){
return this;
}
this._stopTimer();
if(_4cd){
this._percent=1;
}
this._fire("onStop",[this.curve.getValue(this._percent)]);
this._active=this._paused=false;
return this;
},status:function(){
if(this._active){
return this._paused?"paused":"playing";
}
return "stopped";
},_cycle:function(){
var _t=this;
if(_t._active){
var curr=new Date().valueOf();
var step=(curr-_t._startTime)/(_t._endTime-_t._startTime);
if(step>=1){
step=1;
}
_t._percent=step;
if(_t.easing){
step=_t.easing(step);
}
_t._fire("onAnimate",[_t.curve.getValue(step)]);
if(_t._percent<1){
_t._startTimer();
}else{
_t._active=false;
if(_t.repeat>0){
_t.repeat--;
_t.play(null,true);
}else{
if(_t.repeat==-1){
_t.play(null,true);
}else{
if(_t._startRepeatCount){
_t.repeat=_t._startRepeatCount;
_t._startRepeatCount=0;
}
}
}
_t._percent=0;
_t._fire("onEnd");
_t._stopTimer();
}
}
return _t;
}});
var ctr=0;
var _4d2=[];
var _4d3={run:function(){
}};
var _4d4=null;
dojo._Animation.prototype._startTimer=function(){
if(!this._timer){
this._timer=d.connect(_4d3,"run",this,"_cycle");
ctr++;
}
if(!_4d4){
_4d4=setInterval(d.hitch(_4d3,"run"),this.rate);
}
};
dojo._Animation.prototype._stopTimer=function(){
if(this._timer){
d.disconnect(this._timer);
this._timer=null;
ctr--;
}
if(ctr<=0){
clearInterval(_4d4);
_4d4=null;
ctr=0;
}
};
var _4d5=(d.isIE)?function(node){
var ns=node.style;
if(!ns.width.length&&d.style(node,"width")=="auto"){
ns.width="auto";
}
}:function(){
};
dojo._fade=function(args){
args.node=d.byId(args.node);
var _4d9=d.mixin({properties:{}},args);
var _4da=(_4d9.properties.opacity={});
_4da.start=!("start" in _4d9)?function(){
return Number(d.style(_4d9.node,"opacity"));
}:_4d9.start;
_4da.end=_4d9.end;
var anim=d.animateProperty(_4d9);
d.connect(anim,"beforeBegin",d.partial(_4d5,_4d9.node));
return anim;
};
dojo.fadeIn=function(args){
return d._fade(d.mixin({end:1},args));
};
dojo.fadeOut=function(args){
return d._fade(d.mixin({end:0},args));
};
dojo._defaultEasing=function(n){
return 0.5+((Math.sin((n+1.5)*Math.PI))/2);
};
var _4df=function(_4e0){
this._properties=_4e0;
for(var p in _4e0){
var prop=_4e0[p];
if(prop.start instanceof d.Color){
prop.tempColor=new d.Color();
}
}
this.getValue=function(r){
var ret={};
for(var p in this._properties){
var prop=this._properties[p];
var _4e7=prop.start;
if(_4e7 instanceof d.Color){
ret[p]=d.blendColors(_4e7,prop.end,r,prop.tempColor).toCss();
}else{
if(!d.isArray(_4e7)){
ret[p]=((prop.end-_4e7)*r)+_4e7+(p!="opacity"?prop.units||"px":"");
}
}
}
return ret;
};
};
dojo.animateProperty=function(args){
args.node=d.byId(args.node);
if(!args.easing){
args.easing=d._defaultEasing;
}
var anim=new d._Animation(args);
d.connect(anim,"beforeBegin",anim,function(){
var pm={};
for(var p in this.properties){
if(p=="width"||p=="height"){
this.node.display="block";
}
var prop=this.properties[p];
prop=pm[p]=d.mixin({},(d.isObject(prop)?prop:{end:prop}));
if(d.isFunction(prop.start)){
prop.start=prop.start();
}
if(d.isFunction(prop.end)){
prop.end=prop.end();
}
var _4ed=(p.toLowerCase().indexOf("color")>=0);
function getStyle(node,p){
var v=({height:node.offsetHeight,width:node.offsetWidth})[p];
if(v!==undefined){
return v;
}
v=d.style(node,p);
return (p=="opacity")?Number(v):(_4ed?v:parseFloat(v));
};
if(!("end" in prop)){
prop.end=getStyle(this.node,p);
}else{
if(!("start" in prop)){
prop.start=getStyle(this.node,p);
}
}
if(_4ed){
prop.start=new d.Color(prop.start);
prop.end=new d.Color(prop.end);
}else{
prop.start=(p=="opacity")?Number(prop.start):parseFloat(prop.start);
}
}
this.curve=new _4df(pm);
});
d.connect(anim,"onAnimate",d.hitch(d,"style",anim.node));
return anim;
};
dojo.anim=function(node,_4f2,_4f3,_4f4,_4f5,_4f6){
return d.animateProperty({node:node,duration:_4f3||d._Animation.prototype.duration,properties:_4f2,easing:_4f4,onEnd:_4f5}).play(_4f6||0);
};
})();
}
if(!dojo._hasResource["dojo._base.browser"]){
dojo._hasResource["dojo._base.browser"]=true;
dojo.provide("dojo._base.browser");
if(dojo.config.require){
dojo.forEach(dojo.config.require,"dojo['require'](item);");
}
}
if(!dojo._hasResource["dojo.date.stamp"]){
dojo._hasResource["dojo.date.stamp"]=true;
dojo.provide("dojo.date.stamp");
dojo.date.stamp.fromISOString=function(_4f7,_4f8){
if(!dojo.date.stamp._isoRegExp){
dojo.date.stamp._isoRegExp=/^(?:(\d{4})(?:-(\d{2})(?:-(\d{2}))?)?)?(?:T(\d{2}):(\d{2})(?::(\d{2})(.\d+)?)?((?:[+-](\d{2}):(\d{2}))|Z)?)?$/;
}
var _4f9=dojo.date.stamp._isoRegExp.exec(_4f7);
var _4fa=null;
if(_4f9){
_4f9.shift();
if(_4f9[1]){
_4f9[1]--;
}
if(_4f9[6]){
_4f9[6]*=1000;
}
if(_4f8){
_4f8=new Date(_4f8);
dojo.map(["FullYear","Month","Date","Hours","Minutes","Seconds","Milliseconds"],function(prop){
return _4f8["get"+prop]();
}).forEach(function(_4fc,_4fd){
if(_4f9[_4fd]===undefined){
_4f9[_4fd]=_4fc;
}
});
}
_4fa=new Date(_4f9[0]||1970,_4f9[1]||0,_4f9[2]||1,_4f9[3]||0,_4f9[4]||0,_4f9[5]||0,_4f9[6]||0);
var _4fe=0;
var _4ff=_4f9[7]&&_4f9[7].charAt(0);
if(_4ff!="Z"){
_4fe=((_4f9[8]||0)*60)+(Number(_4f9[9])||0);
if(_4ff!="-"){
_4fe*=-1;
}
}
if(_4ff){
_4fe-=_4fa.getTimezoneOffset();
}
if(_4fe){
_4fa.setTime(_4fa.getTime()+_4fe*60000);
}
}
return _4fa;
};
dojo.date.stamp.toISOString=function(_500,_501){
var _=function(n){
return (n<10)?"0"+n:n;
};
_501=_501||{};
var _504=[];
var _505=_501.zulu?"getUTC":"get";
var date="";
if(_501.selector!="time"){
var year=_500[_505+"FullYear"]();
date=["0000".substr((year+"").length)+year,_(_500[_505+"Month"]()+1),_(_500[_505+"Date"]())].join("-");
}
_504.push(date);
if(_501.selector!="date"){
var time=[_(_500[_505+"Hours"]()),_(_500[_505+"Minutes"]()),_(_500[_505+"Seconds"]())].join(":");
var _509=_500[_505+"Milliseconds"]();
if(_501.milliseconds){
time+="."+(_509<100?"0":"")+_(_509);
}
if(_501.zulu){
time+="Z";
}else{
if(_501.selector!="time"){
var _50a=_500.getTimezoneOffset();
var _50b=Math.abs(_50a);
time+=(_50a>0?"-":"+")+_(Math.floor(_50b/60))+":"+_(_50b%60);
}
}
_504.push(time);
}
return _504.join("T");
};
}
if(!dojo._hasResource["dojo.parser"]){
dojo._hasResource["dojo.parser"]=true;
dojo.provide("dojo.parser");
dojo.parser=new function(){
var d=dojo;
var _50d=d._scopeName+"Type";
var qry="["+_50d+"]";
function val2type(_50f){
if(d.isString(_50f)){
return "string";
}
if(typeof _50f=="number"){
return "number";
}
if(typeof _50f=="boolean"){
return "boolean";
}
if(d.isFunction(_50f)){
return "function";
}
if(d.isArray(_50f)){
return "array";
}
if(_50f instanceof Date){
return "date";
}
if(_50f instanceof d._Url){
return "url";
}
return "object";
};
function str2obj(_510,type){
switch(type){
case "string":
return _510;
case "number":
return _510.length?Number(_510):NaN;
case "boolean":
return typeof _510=="boolean"?_510:!(_510.toLowerCase()=="false");
case "function":
if(d.isFunction(_510)){
_510=_510.toString();
_510=d.trim(_510.substring(_510.indexOf("{")+1,_510.length-1));
}
try{
if(_510.search(/[^\w\.]+/i)!=-1){
_510=d.parser._nameAnonFunc(new Function(_510),this);
}
return d.getObject(_510,false);
}
catch(e){
return new Function();
}
case "array":
return _510?_510.split(/\s*,\s*/):[];
case "date":
switch(_510){
case "":
return new Date("");
case "now":
return new Date();
default:
return d.date.stamp.fromISOString(_510);
}
case "url":
return d.baseUrl+_510;
default:
return d.fromJson(_510);
}
};
var _512={};
function getClassInfo(_513){
if(!_512[_513]){
var cls=d.getObject(_513);
if(!d.isFunction(cls)){
throw new Error("Could not load class '"+_513+"'. Did you spell the name correctly and use a full path, like 'dijit.form.Button'?");
}
var _515=cls.prototype;
var _516={};
for(var name in _515){
if(name.charAt(0)=="_"){
continue;
}
var _518=_515[name];
_516[name]=val2type(_518);
}
_512[_513]={cls:cls,params:_516};
}
return _512[_513];
};
this._functionFromScript=function(_519){
var _51a="";
var _51b="";
var _51c=_519.getAttribute("args");
if(_51c){
d.forEach(_51c.split(/\s*,\s*/),function(part,idx){
_51a+="var "+part+" = arguments["+idx+"]; ";
});
}
var _51f=_519.getAttribute("with");
if(_51f&&_51f.length){
d.forEach(_51f.split(/\s*,\s*/),function(part){
_51a+="with("+part+"){";
_51b+="}";
});
}
return new Function(_51a+_519.innerHTML+_51b);
};
this.instantiate=function(_521){
var _522=[];
d.forEach(_521,function(node){
if(!node){
return;
}
var type=node.getAttribute(_50d);
if((!type)||(!type.length)){
return;
}
var _525=getClassInfo(type);
var _526=_525.cls;
var ps=_526._noScript||_526.prototype._noScript;
var _528={};
var _529=node.attributes;
for(var name in _525.params){
var item=_529.getNamedItem(name);
if(!item||(!item.specified&&(!dojo.isIE||name.toLowerCase()!="value"))){
continue;
}
var _52c=item.value;
switch(name){
case "class":
_52c=node.className;
break;
case "style":
_52c=node.style&&node.style.cssText;
}
var _52d=_525.params[name];
_528[name]=str2obj(_52c,_52d);
}
if(!ps){
var _52e=[],_52f=[];
d.query("> script[type^='dojo/']",node).orphan().forEach(function(_530){
var _531=_530.getAttribute("event"),type=_530.getAttribute("type"),nf=d.parser._functionFromScript(_530);
if(_531){
if(type=="dojo/connect"){
_52e.push({event:_531,func:nf});
}else{
_528[_531]=nf;
}
}else{
_52f.push(nf);
}
});
}
var _533=_526["markupFactory"];
if(!_533&&_526["prototype"]){
_533=_526.prototype["markupFactory"];
}
var _534=_533?_533(_528,node,_526):new _526(_528,node);
_522.push(_534);
var _535=node.getAttribute("jsId");
if(_535){
d.setObject(_535,_534);
}
if(!ps){
d.forEach(_52e,function(_536){
d.connect(_534,_536.event,null,_536.func);
});
d.forEach(_52f,function(func){
func.call(_534);
});
}
});
d.forEach(_522,function(_538){
if(_538&&_538.startup&&!_538._started&&(!_538.getParent||!_538.getParent())){
_538.startup();
}
});
return _522;
};
this.parse=function(_539){
var list=d.query(qry,_539);
var _53b=this.instantiate(list);
return _53b;
};
}();
(function(){
var _53c=function(){
if(dojo.config["parseOnLoad"]==true){
dojo.parser.parse();
}
};
if(dojo.exists("dijit.wai.onload")&&(dijit.wai.onload===dojo._loaders[0])){
dojo._loaders.splice(1,0,_53c);
}else{
dojo._loaders.unshift(_53c);
}
})();
dojo.parser._anonCtr=0;
dojo.parser._anon={};
dojo.parser._nameAnonFunc=function(_53d,_53e){
var jpn="$joinpoint";
var nso=(_53e||dojo.parser._anon);
if(dojo.isIE){
var cn=_53d["__dojoNameCache"];
if(cn&&nso[cn]===_53d){
return _53d["__dojoNameCache"];
}
}
var ret="__"+dojo.parser._anonCtr++;
while(typeof nso[ret]!="undefined"){
ret="__"+dojo.parser._anonCtr++;
}
nso[ret]=_53d;
return ret;
};
}
if(!dojo._hasResource["dojo.regexp"]){
dojo._hasResource["dojo.regexp"]=true;
dojo.provide("dojo.regexp");
dojo.regexp.escapeString=function(str,_544){
return str.replace(/([\.$?*!=:|{}\(\)\[\]\\\/^])/g,function(ch){
if(_544&&_544.indexOf(ch)!=-1){
return ch;
}
return "\\"+ch;
});
};
dojo.regexp.buildGroupRE=function(arr,re,_548){
if(!(arr instanceof Array)){
return re(arr);
}
var b=[];
for(var i=0;i<arr.length;i++){
b.push(re(arr[i]));
}
return dojo.regexp.group(b.join("|"),_548);
};
dojo.regexp.group=function(_54b,_54c){
return "("+(_54c?"?:":"")+_54b+")";
};
}
if(!dojo._hasResource["dojo.cookie"]){
dojo._hasResource["dojo.cookie"]=true;
dojo.provide("dojo.cookie");
dojo.cookie=function(name,_54e,_54f){
var c=document.cookie;
if(arguments.length==1){
var _551=c.match(new RegExp("(?:^|; )"+dojo.regexp.escapeString(name)+"=([^;]*)"));
return _551?decodeURIComponent(_551[1]):undefined;
}else{
_54f=_54f||{};
var exp=_54f.expires;
if(typeof exp=="number"){
var d=new Date();
d.setTime(d.getTime()+exp*24*60*60*1000);
exp=_54f.expires=d;
}
if(exp&&exp.toUTCString){
_54f.expires=exp.toUTCString();
}
_54e=encodeURIComponent(_54e);
var _554=name+"="+_54e,_555;
for(_555 in _54f){
_554+="; "+_555;
var _556=_54f[_555];
if(_556!==true){
_554+="="+_556;
}
}
document.cookie=_554;
}
};
dojo.cookie.isSupported=function(){
if(!("cookieEnabled" in navigator)){
this("__djCookieTest__","CookiesAllowed");
navigator.cookieEnabled=this("__djCookieTest__")=="CookiesAllowed";
if(navigator.cookieEnabled){
this("__djCookieTest__","",{expires:-1});
}
}
return navigator.cookieEnabled;
};
}
if(!dojo._hasResource["dijit._base.focus"]){
dojo._hasResource["dijit._base.focus"]=true;
dojo.provide("dijit._base.focus");
dojo.mixin(dijit,{_curFocus:null,_prevFocus:null,isCollapsed:function(){
var _557=dojo.doc;
if(_557.selection){
var s=_557.selection;
if(s.type=="Text"){
return !s.createRange().htmlText.length;
}else{
return !s.createRange().length;
}
}else{
var _559=dojo.global;
var _55a=_559.getSelection();
if(dojo.isString(_55a)){
return !_55a;
}else{
return _55a.isCollapsed||!_55a.toString();
}
}
},getBookmark:function(){
var _55b,_55c=dojo.doc.selection;
if(_55c){
var _55d=_55c.createRange();
if(_55c.type.toUpperCase()=="CONTROL"){
if(_55d.length){
_55b=[];
var i=0,len=_55d.length;
while(i<len){
_55b.push(_55d.item(i++));
}
}else{
_55b=null;
}
}else{
_55b=_55d.getBookmark();
}
}else{
if(window.getSelection){
_55c=dojo.global.getSelection();
if(_55c){
_55d=_55c.getRangeAt(0);
_55b=_55d.cloneRange();
}
}else{
console.warn("No idea how to store the current selection for this browser!");
}
}
return _55b;
},moveToBookmark:function(_560){
var _561=dojo.doc;
if(_561.selection){
var _562;
if(dojo.isArray(_560)){
_562=_561.body.createControlRange();
dojo.forEach(_560,function(n){
_562.addElement(n);
});
}else{
_562=_561.selection.createRange();
_562.moveToBookmark(_560);
}
_562.select();
}else{
var _564=dojo.global.getSelection&&dojo.global.getSelection();
if(_564&&_564.removeAllRanges){
_564.removeAllRanges();
_564.addRange(_560);
}else{
console.warn("No idea how to restore selection for this browser!");
}
}
},getFocus:function(menu,_566){
return {node:menu&&dojo.isDescendant(dijit._curFocus,menu.domNode)?dijit._prevFocus:dijit._curFocus,bookmark:!dojo.withGlobal(_566||dojo.global,dijit.isCollapsed)?dojo.withGlobal(_566||dojo.global,dijit.getBookmark):null,openedForWindow:_566};
},focus:function(_567){
if(!_567){
return;
}
var node="node" in _567?_567.node:_567,_569=_567.bookmark,_56a=_567.openedForWindow;
if(node){
var _56b=(node.tagName.toLowerCase()=="iframe")?node.contentWindow:node;
if(_56b&&_56b.focus){
try{
_56b.focus();
}
catch(e){
}
}
dijit._onFocusNode(node);
}
if(_569&&dojo.withGlobal(_56a||dojo.global,dijit.isCollapsed)){
if(_56a){
_56a.focus();
}
try{
dojo.withGlobal(_56a||dojo.global,dijit.moveToBookmark,null,[_569]);
}
catch(e){
}
}
},_activeStack:[],registerWin:function(_56c){
if(!_56c){
_56c=window;
}
dojo.connect(_56c.document,"onmousedown",function(evt){
dijit._justMouseDowned=true;
setTimeout(function(){
dijit._justMouseDowned=false;
},0);
dijit._onTouchNode(evt.target||evt.srcElement);
});
var doc=_56c.document;
if(doc){
if(dojo.isIE){
doc.attachEvent("onactivate",function(evt){
if(evt.srcElement.tagName.toLowerCase()!="#document"){
dijit._onFocusNode(evt.srcElement);
}
});
doc.attachEvent("ondeactivate",function(evt){
dijit._onBlurNode(evt.srcElement);
});
}else{
doc.addEventListener("focus",function(evt){
dijit._onFocusNode(evt.target);
},true);
doc.addEventListener("blur",function(evt){
dijit._onBlurNode(evt.target);
},true);
}
}
doc=null;
},_onBlurNode:function(node){
dijit._prevFocus=dijit._curFocus;
dijit._curFocus=null;
if(dijit._justMouseDowned){
return;
}
if(dijit._clearActiveWidgetsTimer){
clearTimeout(dijit._clearActiveWidgetsTimer);
}
dijit._clearActiveWidgetsTimer=setTimeout(function(){
delete dijit._clearActiveWidgetsTimer;
dijit._setStack([]);
dijit._prevFocus=null;
},100);
},_onTouchNode:function(node){
if(dijit._clearActiveWidgetsTimer){
clearTimeout(dijit._clearActiveWidgetsTimer);
delete dijit._clearActiveWidgetsTimer;
}
var _575=[];
try{
while(node){
if(node.dijitPopupParent){
node=dijit.byId(node.dijitPopupParent).domNode;
}else{
if(node.tagName&&node.tagName.toLowerCase()=="body"){
if(node===dojo.body()){
break;
}
node=dijit.getDocumentWindow(node.ownerDocument).frameElement;
}else{
var id=node.getAttribute&&node.getAttribute("widgetId");
if(id){
_575.unshift(id);
}
node=node.parentNode;
}
}
}
}
catch(e){
}
dijit._setStack(_575);
},_onFocusNode:function(node){
if(!node){
return;
}
if(node.nodeType==9){
return;
}
if(node.nodeType==9){
var _578=dijit.getDocumentWindow(node).frameElement;
if(!_578){
return;
}
node=_578;
}
dijit._onTouchNode(node);
if(node==dijit._curFocus){
return;
}
if(dijit._curFocus){
dijit._prevFocus=dijit._curFocus;
}
dijit._curFocus=node;
dojo.publish("focusNode",[node]);
},_setStack:function(_579){
var _57a=dijit._activeStack;
dijit._activeStack=_579;
for(var _57b=0;_57b<Math.min(_57a.length,_579.length);_57b++){
if(_57a[_57b]!=_579[_57b]){
break;
}
}
for(var i=_57a.length-1;i>=_57b;i--){
var _57d=dijit.byId(_57a[i]);
if(_57d){
_57d._focused=false;
_57d._hasBeenBlurred=true;
if(_57d._onBlur){
_57d._onBlur();
}
if(_57d._setStateClass){
_57d._setStateClass();
}
dojo.publish("widgetBlur",[_57d]);
}
}
for(i=_57b;i<_579.length;i++){
_57d=dijit.byId(_579[i]);
if(_57d){
_57d._focused=true;
if(_57d._onFocus){
_57d._onFocus();
}
if(_57d._setStateClass){
_57d._setStateClass();
}
dojo.publish("widgetFocus",[_57d]);
}
}
}});
dojo.addOnLoad(dijit.registerWin);
}
if(!dojo._hasResource["dijit._base.manager"]){
dojo._hasResource["dijit._base.manager"]=true;
dojo.provide("dijit._base.manager");
dojo.declare("dijit.WidgetSet",null,{constructor:function(){
this._hash={};
},add:function(_57e){
if(this._hash[_57e.id]){
throw new Error("Tried to register widget with id=="+_57e.id+" but that id is already registered");
}
this._hash[_57e.id]=_57e;
},remove:function(id){
delete this._hash[id];
},forEach:function(func){
for(var id in this._hash){
func(this._hash[id]);
}
},filter:function(_582){
var res=new dijit.WidgetSet();
this.forEach(function(_584){
if(_582(_584)){
res.add(_584);
}
});
return res;
},byId:function(id){
return this._hash[id];
},byClass:function(cls){
return this.filter(function(_587){
return _587.declaredClass==cls;
});
}});
dijit.registry=new dijit.WidgetSet();
dijit._widgetTypeCtr={};
dijit.getUniqueId=function(_588){
var id;
do{
id=_588+"_"+(_588 in dijit._widgetTypeCtr?++dijit._widgetTypeCtr[_588]:dijit._widgetTypeCtr[_588]=0);
}while(dijit.byId(id));
return id;
};
if(dojo.isIE){
dojo.addOnWindowUnload(function(){
dijit.registry.forEach(function(_58a){
_58a.destroy();
});
});
}
dijit.byId=function(id){
return (dojo.isString(id))?dijit.registry.byId(id):id;
};
dijit.byNode=function(node){
return dijit.registry.byId(node.getAttribute("widgetId"));
};
dijit.getEnclosingWidget=function(node){
while(node){
if(node.getAttribute&&node.getAttribute("widgetId")){
return dijit.registry.byId(node.getAttribute("widgetId"));
}
node=node.parentNode;
}
return null;
};
dijit._tabElements={area:true,button:true,input:true,object:true,select:true,textarea:true};
dijit._isElementShown=function(elem){
var _58f=dojo.style(elem);
return (_58f.visibility!="hidden")&&(_58f.visibility!="collapsed")&&(_58f.display!="none")&&(dojo.attr(elem,"type")!="hidden");
};
dijit.isTabNavigable=function(elem){
if(dojo.hasAttr(elem,"disabled")){
return false;
}
var _591=dojo.hasAttr(elem,"tabindex");
var _592=dojo.attr(elem,"tabindex");
if(_591&&_592>=0){
return true;
}
var name=elem.nodeName.toLowerCase();
if(((name=="a"&&dojo.hasAttr(elem,"href"))||dijit._tabElements[name])&&(!_591||_592>=0)){
return true;
}
return false;
};
dijit._getTabNavigable=function(root){
var _595,last,_597,_598,_599,_59a;
var _59b=function(_59c){
dojo.query("> *",_59c).forEach(function(_59d){
var _59e=dijit._isElementShown(_59d);
if(_59e&&dijit.isTabNavigable(_59d)){
var _59f=dojo.attr(_59d,"tabindex");
if(!dojo.hasAttr(_59d,"tabindex")||_59f==0){
if(!_595){
_595=_59d;
}
last=_59d;
}else{
if(_59f>0){
if(!_597||_59f<_598){
_598=_59f;
_597=_59d;
}
if(!_599||_59f>=_59a){
_59a=_59f;
_599=_59d;
}
}
}
}
if(_59e&&_59d.nodeName.toUpperCase()!="SELECT"){
_59b(_59d);
}
});
};
if(dijit._isElementShown(root)){
_59b(root);
}
return {first:_595,last:last,lowest:_597,highest:_599};
};
dijit.getFirstInTabbingOrder=function(root){
var _5a1=dijit._getTabNavigable(dojo.byId(root));
return _5a1.lowest?_5a1.lowest:_5a1.first;
};
dijit.getLastInTabbingOrder=function(root){
var _5a3=dijit._getTabNavigable(dojo.byId(root));
return _5a3.last?_5a3.last:_5a3.highest;
};
dijit.defaultDuration=dojo.config["defaultDuration"]||200;
}
if(!dojo._hasResource["dojo.AdapterRegistry"]){
dojo._hasResource["dojo.AdapterRegistry"]=true;
dojo.provide("dojo.AdapterRegistry");
dojo.AdapterRegistry=function(_5a4){
this.pairs=[];
this.returnWrappers=_5a4||false;
};
dojo.extend(dojo.AdapterRegistry,{register:function(name,_5a6,wrap,_5a8,_5a9){
this.pairs[((_5a9)?"unshift":"push")]([name,_5a6,wrap,_5a8]);
},match:function(){
for(var i=0;i<this.pairs.length;i++){
var pair=this.pairs[i];
if(pair[1].apply(this,arguments)){
if((pair[3])||(this.returnWrappers)){
return pair[2];
}else{
return pair[2].apply(this,arguments);
}
}
}
throw new Error("No match found");
},unregister:function(name){
for(var i=0;i<this.pairs.length;i++){
var pair=this.pairs[i];
if(pair[0]==name){
this.pairs.splice(i,1);
return true;
}
}
return false;
}});
}
if(!dojo._hasResource["dijit._base.place"]){
dojo._hasResource["dijit._base.place"]=true;
dojo.provide("dijit._base.place");
dijit.getViewport=function(){
var _5af=dojo.global;
var _5b0=dojo.doc;
var w=0,h=0;
var de=_5b0.documentElement;
var dew=de.clientWidth,deh=de.clientHeight;
if(dojo.isMozilla){
var minw,minh,maxw,maxh;
var dbw=_5b0.body.clientWidth;
if(dbw>dew){
minw=dew;
maxw=dbw;
}else{
maxw=dew;
minw=dbw;
}
var dbh=_5b0.body.clientHeight;
if(dbh>deh){
minh=deh;
maxh=dbh;
}else{
maxh=deh;
minh=dbh;
}
w=(maxw>_5af.innerWidth)?minw:maxw;
h=(maxh>_5af.innerHeight)?minh:maxh;
}else{
if(!dojo.isOpera&&_5af.innerWidth){
w=_5af.innerWidth;
h=_5af.innerHeight;
}else{
if(dojo.isIE&&de&&deh){
w=dew;
h=deh;
}else{
if(dojo.body().clientWidth){
w=dojo.body().clientWidth;
h=dojo.body().clientHeight;
}
}
}
}
var _5bc=dojo._docScroll();
return {w:w,h:h,l:_5bc.x,t:_5bc.y};
};
dijit.placeOnScreen=function(node,pos,_5bf,_5c0){
var _5c1=dojo.map(_5bf,function(_5c2){
return {corner:_5c2,pos:pos};
});
return dijit._place(node,_5c1);
};
dijit._place=function(node,_5c4,_5c5){
var view=dijit.getViewport();
if(!node.parentNode||String(node.parentNode.tagName).toLowerCase()!="body"){
dojo.body().appendChild(node);
}
var best=null;
dojo.some(_5c4,function(_5c8){
var _5c9=_5c8.corner;
var pos=_5c8.pos;
if(_5c5){
_5c5(node,_5c8.aroundCorner,_5c9);
}
var _5cb=node.style;
var _5cc=_5cb.display;
var _5cd=_5cb.visibility;
_5cb.visibility="hidden";
_5cb.display="";
var mb=dojo.marginBox(node);
_5cb.display=_5cc;
_5cb.visibility=_5cd;
var _5cf=(_5c9.charAt(1)=="L"?pos.x:Math.max(view.l,pos.x-mb.w)),_5d0=(_5c9.charAt(0)=="T"?pos.y:Math.max(view.t,pos.y-mb.h)),endX=(_5c9.charAt(1)=="L"?Math.min(view.l+view.w,_5cf+mb.w):pos.x),endY=(_5c9.charAt(0)=="T"?Math.min(view.t+view.h,_5d0+mb.h):pos.y),_5d3=endX-_5cf,_5d4=endY-_5d0,_5d5=(mb.w-_5d3)+(mb.h-_5d4);
if(best==null||_5d5<best.overflow){
best={corner:_5c9,aroundCorner:_5c8.aroundCorner,x:_5cf,y:_5d0,w:_5d3,h:_5d4,overflow:_5d5};
}
return !_5d5;
});
node.style.left=best.x+"px";
node.style.top=best.y+"px";
if(best.overflow&&_5c5){
_5c5(node,best.aroundCorner,best.corner);
}
return best;
};
dijit.placeOnScreenAroundNode=function(node,_5d7,_5d8,_5d9){
_5d7=dojo.byId(_5d7);
var _5da=_5d7.style.display;
_5d7.style.display="";
var _5db=_5d7.offsetWidth;
var _5dc=_5d7.offsetHeight;
var _5dd=dojo.coords(_5d7,true);
_5d7.style.display=_5da;
return dijit._placeOnScreenAroundRect(node,_5dd.x,_5dd.y,_5db,_5dc,_5d8,_5d9);
};
dijit.placeOnScreenAroundRectangle=function(node,_5df,_5e0,_5e1){
return dijit._placeOnScreenAroundRect(node,_5df.x,_5df.y,_5df.width,_5df.height,_5e0,_5e1);
};
dijit._placeOnScreenAroundRect=function(node,x,y,_5e5,_5e6,_5e7,_5e8){
var _5e9=[];
for(var _5ea in _5e7){
_5e9.push({aroundCorner:_5ea,corner:_5e7[_5ea],pos:{x:x+(_5ea.charAt(1)=="L"?0:_5e5),y:y+(_5ea.charAt(0)=="T"?0:_5e6)}});
}
return dijit._place(node,_5e9,_5e8);
};
dijit.placementRegistry=new dojo.AdapterRegistry();
dijit.placementRegistry.register("node",function(n,x){
return typeof x=="object"&&typeof x.offsetWidth!="undefined"&&typeof x.offsetHeight!="undefined";
},dijit.placeOnScreenAroundNode);
dijit.placementRegistry.register("rect",function(n,x){
return typeof x=="object"&&"x" in x&&"y" in x&&"width" in x&&"height" in x;
},dijit.placeOnScreenAroundRectangle);
dijit.placeOnScreenAroundElement=function(node,_5f0,_5f1,_5f2){
return dijit.placementRegistry.match.apply(dijit.placementRegistry,arguments);
};
}
if(!dojo._hasResource["dijit._base.window"]){
dojo._hasResource["dijit._base.window"]=true;
dojo.provide("dijit._base.window");
dijit.getDocumentWindow=function(doc){
if(dojo.isIE&&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;
};
}
if(!dojo._hasResource["dijit._base.popup"]){
dojo._hasResource["dijit._base.popup"]=true;
dojo.provide("dijit._base.popup");
dijit.popup=new function(){
var _5f5=[],_5f6=1000,_5f7=1;
this.prepare=function(node){
var s=node.style;
s.visibility="hidden";
s.position="absolute";
s.top="-9999px";
if(s.display=="none"){
s.display="";
}
dojo.body().appendChild(node);
};
this.open=function(args){
var _5fb=args.popup,_5fc=args.orient||{"BL":"TL","TL":"BL"},_5fd=args.around,id=(args.around&&args.around.id)?(args.around.id+"_dropdown"):("popup_"+_5f7++);
var _5ff=dojo.doc.createElement("div");
dijit.setWaiRole(_5ff,"presentation");
_5ff.id=id;
_5ff.className="dijitPopup";
_5ff.style.zIndex=_5f6+_5f5.length;
_5ff.style.left=_5ff.style.top="0px";
_5ff.style.visibility="hidden";
if(args.parent){
_5ff.dijitPopupParent=args.parent.id;
}
dojo.body().appendChild(_5ff);
var s=_5fb.domNode.style;
s.display="";
s.visibility="";
s.position="";
_5ff.appendChild(_5fb.domNode);
var _601=new dijit.BackgroundIframe(_5ff);
var best=_5fd?dijit.placeOnScreenAroundElement(_5ff,_5fd,_5fc,_5fb.orient?dojo.hitch(_5fb,"orient"):null):dijit.placeOnScreen(_5ff,args,_5fc=="R"?["TR","BR","TL","BL"]:["TL","BL","TR","BR"]);
_5ff.style.visibility="visible";
var _603=[];
var _604=function(){
for(var pi=_5f5.length-1;pi>0&&_5f5[pi].parent===_5f5[pi-1].widget;pi--){
}
return _5f5[pi];
};
_603.push(dojo.connect(_5ff,"onkeypress",this,function(evt){
if(evt.charOrCode==dojo.keys.ESCAPE&&args.onCancel){
dojo.stopEvent(evt);
args.onCancel();
}else{
if(evt.charOrCode===dojo.keys.TAB){
dojo.stopEvent(evt);
var _607=_604();
if(_607&&_607.onCancel){
_607.onCancel();
}
}
}
}));
if(_5fb.onCancel){
_603.push(dojo.connect(_5fb,"onCancel",null,args.onCancel));
}
_603.push(dojo.connect(_5fb,_5fb.onExecute?"onExecute":"onChange",null,function(){
var _608=_604();
if(_608&&_608.onExecute){
_608.onExecute();
}
}));
_5f5.push({wrapper:_5ff,iframe:_601,widget:_5fb,parent:args.parent,onExecute:args.onExecute,onCancel:args.onCancel,onClose:args.onClose,handlers:_603});
if(_5fb.onOpen){
_5fb.onOpen(best);
}
return best;
};
this.close=function(_609){
while(dojo.some(_5f5,function(elem){
return elem.widget==_609;
})){
var top=_5f5.pop(),_60c=top.wrapper,_60d=top.iframe,_60e=top.widget,_60f=top.onClose;
if(_60e.onClose){
_60e.onClose();
}
dojo.forEach(top.handlers,dojo.disconnect);
if(!_60e||!_60e.domNode){
return;
}
this.prepare(_60e.domNode);
_60d.destroy();
dojo._destroyElement(_60c);
if(_60f){
_60f();
}
}
};
}();
dijit._frames=new function(){
var _610=[];
this.pop=function(){
var _611;
if(_610.length){
_611=_610.pop();
_611.style.display="";
}else{
if(dojo.isIE){
var burl=dojo.config["dojoBlankHtmlUrl"]||(dojo.moduleUrl("dojo","resources/blank.html")+"")||"javascript:\"\"";
var html="<iframe src='"+burl+"'"+" style='position: absolute; left: 0px; top: 0px;"+"z-index: -1; filter:Alpha(Opacity=\"0\");'>";
_611=dojo.doc.createElement(html);
}else{
_611=dojo.doc.createElement("iframe");
_611.src="javascript:\"\"";
_611.className="dijitBackgroundIframe";
}
_611.tabIndex=-1;
dojo.body().appendChild(_611);
}
return _611;
};
this.push=function(_614){
_614.style.display="none";
if(dojo.isIE){
_614.style.removeExpression("width");
_614.style.removeExpression("height");
}
_610.push(_614);
};
}();
if(dojo.isIE<7){
dojo.addOnLoad(function(){
var f=dijit._frames;
dojo.forEach([f.pop()],f.push);
});
}
dijit.BackgroundIframe=function(node){
if(!node.id){
throw new Error("no id");
}
if((dojo.isIE&&dojo.isIE<7)||(dojo.isFF&&dojo.isFF<3&&dojo.hasClass(dojo.body(),"dijit_a11y"))){
var _617=dijit._frames.pop();
node.appendChild(_617);
if(dojo.isIE){
_617.style.setExpression("width",dojo._scopeName+".doc.getElementById('"+node.id+"').offsetWidth");
_617.style.setExpression("height",dojo._scopeName+".doc.getElementById('"+node.id+"').offsetHeight");
}
this.iframe=_617;
}
};
dojo.extend(dijit.BackgroundIframe,{destroy:function(){
if(this.iframe){
dijit._frames.push(this.iframe);
delete this.iframe;
}
}});
}
if(!dojo._hasResource["dijit._base.scroll"]){
dojo._hasResource["dijit._base.scroll"]=true;
dojo.provide("dijit._base.scroll");
dijit.scrollIntoView=function(node){
try{
node=dojo.byId(node);
var doc=node.ownerDocument||dojo.doc;
var body=doc.body||dojo.body();
var html=doc.documentElement||body.parentNode;
if((!((dojo.isFF&&dojo.isFF>=3)||dojo.isIE||dojo.isSafari)||node==body||node==html)&&(typeof node.scrollIntoView=="function")){
node.scrollIntoView(false);
return;
}
var ltr=dojo._isBodyLtr();
var _61d=dojo.isIE&&dojo.isIE>=8&&!_61e;
var rtl=!ltr&&!_61d;
var _620=body;
var _61e=doc.compatMode=="BackCompat";
if(_61e){
html._offsetWidth=html._clientWidth=body._offsetWidth=body.clientWidth;
html._offsetHeight=html._clientHeight=body._offsetHeight=body.clientHeight;
}else{
if(dojo.isSafari){
body._offsetWidth=body._clientWidth=html.clientWidth;
body._offsetHeight=body._clientHeight=html.clientHeight;
}else{
_620=html;
}
html._offsetHeight=html.clientHeight;
html._offsetWidth=html.clientWidth;
}
function isFixedPosition(_621){
var ie=dojo.isIE;
return ((ie&&(ie<=6||(ie>=7&&_61e)))?false:(dojo.style(_621,"position").toLowerCase()=="fixed"));
};
function addPseudoAttrs(_623){
var _624=_623.parentNode;
var _625=_623.offsetParent;
if(_625==null||isFixedPosition(_623)){
_625=html;
_624=(_623==body)?html:null;
}
_623._offsetParent=_625;
_623._parent=_624;
var bp=dojo._getBorderExtents(_623);
_623._borderStart={H:(_61d&&!ltr)?(bp.w-bp.l):bp.l,V:bp.t};
_623._borderSize={H:bp.w,V:bp.h};
_623._scrolledAmount={H:_623.scrollLeft,V:_623.scrollTop};
_623._offsetSize={H:_623._offsetWidth||_623.offsetWidth,V:_623._offsetHeight||_623.offsetHeight};
_623._offsetStart={H:(_61d&&!ltr)?_625.clientWidth-_623.offsetLeft-_623._offsetSize.H:_623.offsetLeft,V:_623.offsetTop};
_623._clientSize={H:_623._clientWidth||_623.clientWidth,V:_623._clientHeight||_623.clientHeight};
if(_623!=body&&_623!=html&&_623!=node){
for(var dir in _623._offsetSize){
var _628=_623._offsetSize[dir]-_623._clientSize[dir]-_623._borderSize[dir];
var _629=_623._clientSize[dir]>0&&_628>0;
if(_629){
_623._offsetSize[dir]-=_628;
if(dojo.isIE&&rtl&&dir=="H"){
_623._offsetStart[dir]+=_628;
}
}
}
}
};
var _62a=node;
while(_62a!=null){
if(isFixedPosition(_62a)){
node.scrollIntoView(false);
return;
}
addPseudoAttrs(_62a);
_62a=_62a._parent;
}
if(dojo.isIE&&node._parent){
var _62b=node._offsetParent;
node._offsetStart.H+=_62b._borderStart.H;
node._offsetStart.V+=_62b._borderStart.V;
}
if(dojo.isIE&&dojo.isIE>=7&&_620==html&&rtl&&body._offsetStart&&body._offsetStart.H==0){
var _62c=html.scrollWidth-html._offsetSize.H;
if(_62c>0){
body._offsetStart.H=-_62c;
}
}
if(dojo.isIE&&dojo.isIE<=6&&!_61e){
html._offsetSize.H+=html._borderSize.H;
html._offsetSize.V+=html._borderSize.V;
}
if(rtl&&body._offsetStart&&_620==html&&html._scrolledAmount){
var ofs=body._offsetStart.H;
if(ofs<0){
html._scrolledAmount.H+=ofs;
body._offsetStart.H=0;
}
}
_62a=node;
while(_62a){
var _62e=_62a._parent;
if(!_62e){
break;
}
if(_62e.tagName=="TD"){
var _62f=_62e._parent._parent._parent;
if(_62e!=_62a._offsetParent&&_62e._offsetParent!=_62a._offsetParent){
_62e=_62f;
}
}
var _630=_62a._offsetParent==_62e;
for(var dir in _62a._offsetStart){
var _632=dir=="H"?"V":"H";
if(rtl&&dir=="H"&&(_62e!=html)&&(_62e!=body)&&(dojo.isIE||dojo.isSafari)&&_62e._clientSize.H>0&&_62e.scrollWidth>_62e._clientSize.H){
var _633=_62e.scrollWidth-_62e._clientSize.H;
if(_633>0){
_62e._scrolledAmount.H-=_633;
}
}
if(_62e._offsetParent.tagName=="TABLE"){
if(dojo.isIE){
_62e._offsetStart[dir]-=_62e._offsetParent._borderStart[dir];
_62e._borderStart[dir]=_62e._borderSize[dir]=0;
}else{
_62e._offsetStart[dir]+=_62e._offsetParent._borderStart[dir];
}
}
if(dojo.isIE){
_62e._offsetStart[dir]+=_62e._offsetParent._borderStart[dir];
}
var _634=_62a._offsetStart[dir]-_62e._scrolledAmount[dir]-(_630?0:_62e._offsetStart[dir])-_62e._borderStart[dir];
var _635=_634+_62a._offsetSize[dir]-_62e._offsetSize[dir]+_62e._borderSize[dir];
var _636=(dir=="H")?"scrollLeft":"scrollTop";
var _637=dir=="H"&&rtl;
var _638=_637?-_635:_634;
var _639=_637?-_634:_635;
var _63a=(_638*_639<=0)?0:Math[(_638<0)?"max":"min"](_638,_639);
if(_63a!=0){
var _63b=_62e[_636];
_62e[_636]+=(_637)?-_63a:_63a;
var _63c=_62e[_636]-_63b;
}
if(_630){
_62a._offsetStart[dir]+=_62e._offsetStart[dir];
}
_62a._offsetStart[dir]-=_62e[_636];
}
_62a._parent=_62e._parent;
_62a._offsetParent=_62e._offsetParent;
}
_62e=node;
var next;
while(_62e&&_62e.removeAttribute){
next=_62e.parentNode;
_62e.removeAttribute("_offsetParent");
_62e.removeAttribute("_parent");
_62e=next;
}
}
catch(error){
console.error("scrollIntoView: "+error);
node.scrollIntoView(false);
}
};
}
if(!dojo._hasResource["dijit._base.sniff"]){
dojo._hasResource["dijit._base.sniff"]=true;
dojo.provide("dijit._base.sniff");
(function(){
var d=dojo;
var ie=d.isIE;
var _640=d.isOpera;
var maj=Math.floor;
var ff=d.isFF;
var _643=d.boxModel.replace(/-/,"");
var _644={dj_ie:ie,dj_ie6:maj(ie)==6,dj_ie7:maj(ie)==7,dj_iequirks:ie&&d.isQuirks,dj_opera:_640,dj_opera8:maj(_640)==8,dj_opera9:maj(_640)==9,dj_khtml:d.isKhtml,dj_safari:d.isSafari,dj_gecko:d.isMozilla,dj_ff2:maj(ff)==2,dj_ff3:maj(ff)==3};
_644["dj_"+_643]=true;
var html=dojo.doc.documentElement;
for(var p in _644){
if(_644[p]){
if(html.className){
html.className+=" "+p;
}else{
html.className=p;
}
}
}
dojo._loaders.unshift(function(){
if(!dojo._isBodyLtr()){
html.className+=" dijitRtl";
for(var p in _644){
if(_644[p]){
html.className+=" "+p+"-rtl";
}
}
}
});
})();
}
if(!dojo._hasResource["dijit._base.typematic"]){
dojo._hasResource["dijit._base.typematic"]=true;
dojo.provide("dijit._base.typematic");
dijit.typematic={_fireEventAndReload:function(){
this._timer=null;
this._callback(++this._count,this._node,this._evt);
this._currentTimeout=(this._currentTimeout<0)?this._initialDelay:((this._subsequentDelay>1)?this._subsequentDelay:Math.round(this._currentTimeout*this._subsequentDelay));
this._timer=setTimeout(dojo.hitch(this,"_fireEventAndReload"),this._currentTimeout);
},trigger:function(evt,_649,node,_64b,obj,_64d,_64e){
if(obj!=this._obj){
this.stop();
this._initialDelay=_64e||500;
this._subsequentDelay=_64d||0.9;
this._obj=obj;
this._evt=evt;
this._node=node;
this._currentTimeout=-1;
this._count=-1;
this._callback=dojo.hitch(_649,_64b);
this._fireEventAndReload();
}
},stop:function(){
if(this._timer){
clearTimeout(this._timer);
this._timer=null;
}
if(this._obj){
this._callback(-1,this._node,this._evt);
this._obj=null;
}
},addKeyListener:function(node,_650,_651,_652,_653,_654){
if(_650.keyCode){
_650.charOrCode=_650.keyCode;
dojo.deprecated("keyCode attribute parameter for dijit.typematic.addKeyListener is deprecated. Use charOrCode instead.","","2.0");
}else{
if(_650.charCode){
_650.charOrCode=String.fromCharCode(_650.charCode);
dojo.deprecated("charCode attribute parameter for dijit.typematic.addKeyListener is deprecated. Use charOrCode instead.","","2.0");
}
}
return [dojo.connect(node,"onkeypress",this,function(evt){
if(evt.charOrCode==_650.charOrCode&&(_650.ctrlKey===undefined||_650.ctrlKey==evt.ctrlKey)&&(_650.altKey===undefined||_650.altKey==evt.ctrlKey)&&(_650.shiftKey===undefined||_650.shiftKey==evt.ctrlKey)){
dojo.stopEvent(evt);
dijit.typematic.trigger(_650,_651,node,_652,_650,_653,_654);
}else{
if(dijit.typematic._obj==_650){
dijit.typematic.stop();
}
}
}),dojo.connect(node,"onkeyup",this,function(evt){
if(dijit.typematic._obj==_650){
dijit.typematic.stop();
}
})];
},addMouseListener:function(node,_658,_659,_65a,_65b){
var dc=dojo.connect;
return [dc(node,"mousedown",this,function(evt){
dojo.stopEvent(evt);
dijit.typematic.trigger(evt,_658,node,_659,node,_65a,_65b);
}),dc(node,"mouseup",this,function(evt){
dojo.stopEvent(evt);
dijit.typematic.stop();
}),dc(node,"mouseout",this,function(evt){
dojo.stopEvent(evt);
dijit.typematic.stop();
}),dc(node,"mousemove",this,function(evt){
dojo.stopEvent(evt);
}),dc(node,"dblclick",this,function(evt){
dojo.stopEvent(evt);
if(dojo.isIE){
dijit.typematic.trigger(evt,_658,node,_659,node,_65a,_65b);
setTimeout(dojo.hitch(this,dijit.typematic.stop),50);
}
})];
},addListener:function(_662,_663,_664,_665,_666,_667,_668){
return this.addKeyListener(_663,_664,_665,_666,_667,_668).concat(this.addMouseListener(_662,_665,_666,_667,_668));
}};
}
if(!dojo._hasResource["dijit._base.wai"]){
dojo._hasResource["dijit._base.wai"]=true;
dojo.provide("dijit._base.wai");
dijit.wai={onload:function(){
var div=dojo.doc.createElement("div");
div.id="a11yTestNode";
div.style.cssText="border: 1px solid;"+"border-color:red green;"+"position: absolute;"+"height: 5px;"+"top: -999px;"+"background-image: url(\""+(dojo.config.blankGif||dojo.moduleUrl("dojo","resources/blank.gif"))+"\");";
dojo.body().appendChild(div);
var cs=dojo.getComputedStyle(div);
if(cs){
var _66b=cs.backgroundImage;
var _66c=(cs.borderTopColor==cs.borderRightColor)||(_66b!=null&&(_66b=="none"||_66b=="url(invalid-url:)"));
dojo[_66c?"addClass":"removeClass"](dojo.body(),"dijit_a11y");
if(dojo.isIE){
div.outerHTML="";
}else{
dojo.body().removeChild(div);
}
}
}};
if(dojo.isIE||dojo.isMoz){
dojo._loaders.unshift(dijit.wai.onload);
}
dojo.mixin(dijit,{_XhtmlRoles:/banner|contentinfo|definition|main|navigation|search|note|secondary|seealso/,hasWaiRole:function(elem,role){
var _66f=this.getWaiRole(elem);
if(role){
return (_66f.indexOf(role)>-1);
}else{
return (_66f.length>0);
}
},getWaiRole:function(elem){
return dojo.trim((dojo.attr(elem,"role")||"").replace(this._XhtmlRoles,"").replace("wairole:",""));
},setWaiRole:function(elem,role){
var _673=dojo.attr(elem,"role")||"";
if(dojo.isFF<3||!this._XhtmlRoles.test(_673)){
dojo.attr(elem,"role",dojo.isFF<3?"wairole:"+role:role);
}else{
if((" "+_673+" ").indexOf(" "+role+" ")<0){
var _674=dojo.trim(_673.replace(this._XhtmlRoles,""));
var _675=dojo.trim(_673.replace(_674,""));
dojo.attr(elem,"role",_675+(_675?" ":"")+role);
}
}
},removeWaiRole:function(elem,role){
var _678=dojo.attr(elem,"role");
if(!_678){
return;
}
if(role){
var _679=dojo.isFF<3?"wairole:"+role:role;
var t=dojo.trim((" "+_678+" ").replace(" "+_679+" "," "));
dojo.attr(elem,"role",t);
}else{
elem.removeAttribute("role");
}
},hasWaiState:function(elem,_67c){
if(dojo.isFF<3){
return elem.hasAttributeNS("http://www.w3.org/2005/07/aaa",_67c);
}else{
return elem.hasAttribute?elem.hasAttribute("aria-"+_67c):!!elem.getAttribute("aria-"+_67c);
}
},getWaiState:function(elem,_67e){
if(dojo.isFF<3){
return elem.getAttributeNS("http://www.w3.org/2005/07/aaa",_67e);
}else{
var _67f=elem.getAttribute("aria-"+_67e);
return _67f?_67f:"";
}
},setWaiState:function(elem,_681,_682){
if(dojo.isFF<3){
elem.setAttributeNS("http://www.w3.org/2005/07/aaa","aaa:"+_681,_682);
}else{
elem.setAttribute("aria-"+_681,_682);
}
},removeWaiState:function(elem,_684){
if(dojo.isFF<3){
elem.removeAttributeNS("http://www.w3.org/2005/07/aaa",_684);
}else{
elem.removeAttribute("aria-"+_684);
}
}});
}
if(!dojo._hasResource["dijit._base"]){
dojo._hasResource["dijit._base"]=true;
dojo.provide("dijit._base");
}
if(!dojo._hasResource["dijit._Widget"]){
dojo._hasResource["dijit._Widget"]=true;
dojo.provide("dijit._Widget");
dojo.require("dijit._base");
dojo.connect(dojo,"connect",function(_685,_686){
if(_685&&dojo.isFunction(_685._onConnect)){
_685._onConnect(_686);
}
});
dijit._connectOnUseEventHandler=function(_687){
};
dijit._lastKeyDownNode=null;
if(dojo.isIE){
dojo.doc.attachEvent("onkeydown",function(evt){
dijit._lastKeyDownNode=evt.srcElement;
});
}else{
dojo.doc.addEventListener("keydown",function(evt){
dijit._lastKeyDownNode=evt.target;
},true);
}
(function(){
var _68a={};
var _68b=function(dc){
if(!_68a[dc]){
var r=[];
var _68e;
var _68f=dojo.getObject(dc).prototype;
for(var _690 in _68f){
if(dojo.isFunction(_68f[_690])&&(_68e=_690.match(/^_set([a-zA-Z]*)Attr$/))&&_68e[1]){
r.push(_68e[1].charAt(0).toLowerCase()+_68e[1].substr(1));
}
}
_68a[dc]=r;
}
return _68a[dc]||[];
};
dojo.declare("dijit._Widget",null,{id:"",lang:"",dir:"","class":"",style:"",title:"",srcNodeRef:null,domNode:null,containerNode:null,attributeMap:{id:"",dir:"",lang:"","class":"",style:"",title:""},_deferredConnects:{onClick:"",onDblClick:"",onKeyDown:"",onKeyPress:"",onKeyUp:"",onMouseMove:"",onMouseDown:"",onMouseOut:"",onMouseOver:"",onMouseLeave:"",onMouseEnter:"",onMouseUp:""},onClick:dijit._connectOnUseEventHandler,onDblClick:dijit._connectOnUseEventHandler,onKeyDown:dijit._connectOnUseEventHandler,onKeyPress:dijit._connectOnUseEventHandler,onKeyUp:dijit._connectOnUseEventHandler,onMouseDown:dijit._connectOnUseEventHandler,onMouseMove:dijit._connectOnUseEventHandler,onMouseOut:dijit._connectOnUseEventHandler,onMouseOver:dijit._connectOnUseEventHandler,onMouseLeave:dijit._connectOnUseEventHandler,onMouseEnter:dijit._connectOnUseEventHandler,onMouseUp:dijit._connectOnUseEventHandler,_blankGif:(dojo.config.blankGif||dojo.moduleUrl("dojo","resources/blank.gif")),postscript:function(_691,_692){
this.create(_691,_692);
},create:function(_693,_694){
this.srcNodeRef=dojo.byId(_694);
this._connects=[];
this._deferredConnects=dojo.clone(this._deferredConnects);
for(var attr in this.attributeMap){
delete this._deferredConnects[attr];
}
for(attr in this._deferredConnects){
if(this[attr]!==dijit._connectOnUseEventHandler){
delete this._deferredConnects[attr];
}
}
if(this.srcNodeRef&&(typeof this.srcNodeRef.id=="string")){
this.id=this.srcNodeRef.id;
}
if(_693){
this.params=_693;
dojo.mixin(this,_693);
}
this.postMixInProperties();
if(!this.id){
this.id=dijit.getUniqueId(this.declaredClass.replace(/\./g,"_"));
}
dijit.registry.add(this);
this.buildRendering();
if(this.domNode){
this._applyAttributes();
for(attr in this.params){
this._onConnect(attr);
}
}
if(this.domNode){
this.domNode.setAttribute("widgetId",this.id);
}
this.postCreate();
if(this.srcNodeRef&&!this.srcNodeRef.parentNode){
delete this.srcNodeRef;
}
this._created=true;
},_applyAttributes:function(){
var _696=function(attr,_698){
if((_698.params&&attr in _698.params)||_698[attr]){
_698.attr(attr,_698[attr]);
}
};
for(var attr in this.attributeMap){
_696(attr,this);
}
dojo.forEach(_68b(this.declaredClass),function(a){
if(!(a in this.attributeMap)){
_696(a,this);
}
},this);
},postMixInProperties:function(){
},buildRendering:function(){
this.domNode=this.srcNodeRef||dojo.doc.createElement("div");
},postCreate:function(){
},startup:function(){
this._started=true;
},destroyRecursive:function(_69b){
this.destroyDescendants(_69b);
this.destroy(_69b);
},destroy:function(_69c){
this.uninitialize();
dojo.forEach(this._connects,function(_69d){
dojo.forEach(_69d,dojo.disconnect);
});
dojo.forEach(this._supportingWidgets||[],function(w){
if(w.destroy){
w.destroy();
}
});
this.destroyRendering(_69c);
dijit.registry.remove(this.id);
},destroyRendering:function(_69f){
if(this.bgIframe){
this.bgIframe.destroy(_69f);
delete this.bgIframe;
}
if(this.domNode){
if(!_69f){
dojo._destroyElement(this.domNode);
}
delete this.domNode;
}
if(this.srcNodeRef){
if(!_69f){
dojo._destroyElement(this.srcNodeRef);
}
delete this.srcNodeRef;
}
},destroyDescendants:function(_6a0){
dojo.forEach(this.getDescendants(),function(_6a1){
if(_6a1.destroy){
_6a1.destroy(_6a0);
}
});
},uninitialize:function(){
return false;
},onFocus:function(){
},onBlur:function(){
},_onFocus:function(e){
this.onFocus();
},_onBlur:function(){
this.onBlur();
},_onConnect:function(_6a3){
if(_6a3 in this._deferredConnects){
var _6a4=this[this._deferredConnects[_6a3]||"domNode"];
this.connect(_6a4,_6a3.toLowerCase(),this[_6a3]);
delete this._deferredConnects[_6a3];
}
},_setClassAttr:function(_6a5){
var _6a6=this[this.attributeMap["class"]||"domNode"];
dojo.removeClass(_6a6,this["class"]);
this["class"]=_6a5;
dojo.addClass(_6a6,_6a5);
},_setStyleAttr:function(_6a7){
var _6a8=this[this.attributeMap["style"]||"domNode"];
if(_6a8.style.cssText){
_6a8.style.cssText+="; "+_6a7;
}else{
_6a8.style.cssText=_6a7;
}
this["style"]=_6a7;
},setAttribute:function(attr,_6aa){
dojo.deprecated(this.declaredClass+"::setAttribute() is deprecated. Use attr() instead.","","2.0");
this.attr(attr,_6aa);
},_attrToDom:function(attr,_6ac){
var _6ad=this.attributeMap[attr];
dojo.forEach(dojo.isArray(_6ad)?_6ad:[_6ad],function(_6ae){
var _6af=this[_6ae.node||_6ae||"domNode"];
var type=_6ae.type||"attribute";
switch(type){
case "attribute":
if(dojo.isFunction(_6ac)){
_6ac=dojo.hitch(this,_6ac);
}
if(/^on[A-Z][a-zA-Z]*$/.test(attr)){
attr=attr.toLowerCase();
}
dojo.attr(_6af,attr,_6ac);
break;
case "innerHTML":
_6af.innerHTML=_6ac;
break;
case "class":
dojo.removeClass(_6af,this[attr]);
dojo.addClass(_6af,_6ac);
break;
}
},this);
this[attr]=_6ac;
},attr:function(name,_6b2){
var args=arguments.length;
if(args==1&&!dojo.isString(name)){
for(var x in name){
this.attr(x,name[x]);
}
return this;
}
var _6b5=this._getAttrNames(name);
if(args==2){
if(this[_6b5.s]){
return this[_6b5.s](_6b2)||this;
}else{
if(name in this.attributeMap){
this._attrToDom(name,_6b2);
}
this[name]=_6b2;
}
return this;
}else{
if(this[_6b5.g]){
return this[_6b5.g]();
}else{
return this[name];
}
}
},_attrPairNames:{},_getAttrNames:function(name){
var apn=this._attrPairNames;
if(apn[name]){
return apn[name];
}
var uc=name.charAt(0).toUpperCase()+name.substr(1);
return apn[name]={n:name+"Node",s:"_set"+uc+"Attr",g:"_get"+uc+"Attr"};
},toString:function(){
return "[Widget "+this.declaredClass+", "+(this.id||"NO ID")+"]";
},getDescendants:function(){
if(this.containerNode){
var list=dojo.query("[widgetId]",this.containerNode);
return list.map(dijit.byNode);
}else{
return [];
}
},nodesWithKeyClick:["input","button"],connect:function(obj,_6bb,_6bc){
var d=dojo;
var dc=d.connect;
var _6bf=[];
if(_6bb=="ondijitclick"){
if(!this.nodesWithKeyClick[obj.tagName.toLowerCase()]){
var m=d.hitch(this,_6bc);
_6bf.push(dc(obj,"onkeydown",this,function(e){
if((e.keyCode==d.keys.ENTER||e.keyCode==d.keys.SPACE)&&!e.ctrlKey&&!e.shiftKey&&!e.altKey&&!e.metaKey){
dijit._lastKeyDownNode=e.target;
d.stopEvent(e);
}
}),dc(obj,"onkeyup",this,function(e){
if((e.keyCode==d.keys.ENTER||e.keyCode==d.keys.SPACE)&&e.target===dijit._lastKeyDownNode&&!e.ctrlKey&&!e.shiftKey&&!e.altKey&&!e.metaKey){
dijit._lastKeyDownNode=null;
return m(e);
}
}));
}
_6bb="onclick";
}
_6bf.push(dc(obj,_6bb,this,_6bc));
this._connects.push(_6bf);
return _6bf;
},disconnect:function(_6c3){
for(var i=0;i<this._connects.length;i++){
if(this._connects[i]==_6c3){
dojo.forEach(_6c3,dojo.disconnect);
this._connects.splice(i,1);
return;
}
}
},isLeftToRight:function(){
return dojo._isBodyLtr();
},isFocusable:function(){
return this.focus&&(dojo.style(this.domNode,"display")!="none");
},placeAt:function(_6c5,_6c6){
if(_6c5["declaredClass"]&&_6c5["addChild"]){
_6c5.addChild(this,_6c6);
}else{
dojo.place(this.domNode,_6c5,_6c6);
}
return this;
}});
})();
}
if(!dojo._hasResource["dojo.string"]){
dojo._hasResource["dojo.string"]=true;
dojo.provide("dojo.string");
dojo.string.rep=function(str,num){
if(num<=0||!str){
return "";
}
var buf=[];
for(;;){
if(num&1){
buf.push(str);
}
if(!(num>>=1)){
break;
}
str+=str;
}
return buf.join("");
};
dojo.string.pad=function(text,size,ch,end){
if(!ch){
ch="0";
}
var out=String(text),pad=dojo.string.rep(ch,Math.ceil((size-out.length)/ch.length));
return end?out+pad:pad+out;
};
dojo.string.substitute=function(_6d0,map,_6d2,_6d3){
_6d3=_6d3||dojo.global;
_6d2=(!_6d2)?function(v){
return v;
}:dojo.hitch(_6d3,_6d2);
return _6d0.replace(/\$\{([^\s\:\}]+)(?:\:([^\s\:\}]+))?\}/g,function(_6d5,key,_6d7){
var _6d8=dojo.getObject(key,false,map);
if(_6d7){
_6d8=dojo.getObject(_6d7,false,_6d3).call(_6d3,_6d8,key);
}
return _6d2(_6d8,key).toString();
});
};
dojo.string.trim=function(str){
str=str.replace(/^\s+/,"");
for(var i=str.length-1;i>=0;i--){
if(/\S/.test(str.charAt(i))){
str=str.substring(0,i+1);
break;
}
}
return str;
};
}
if(!dojo._hasResource["dijit._Templated"]){
dojo._hasResource["dijit._Templated"]=true;
dojo.provide("dijit._Templated");
dojo.declare("dijit._Templated",null,{templateNode:null,templateString:null,templatePath:null,widgetsInTemplate:false,_skipNodeCache:false,_stringRepl:function(tmpl){
var _6dc=this.declaredClass,_6dd=this;
return dojo.string.substitute(tmpl,this,function(_6de,key){
if(key.charAt(0)=="!"){
_6de=_6dd[key.substr(1)];
}
if(typeof _6de=="undefined"){
throw new Error(_6dc+" template:"+key);
}
if(_6de==null){
return "";
}
return key.charAt(0)=="!"?_6de:_6de.toString().replace(/"/g,"&quot;");
},this);
},buildRendering:function(){
var _6e0=dijit._Templated.getCachedTemplate(this.templatePath,this.templateString,this._skipNodeCache);
var node;
if(dojo.isString(_6e0)){
node=dijit._Templated._createNodesFromText(this._stringRepl(_6e0))[0];
}else{
node=_6e0.cloneNode(true);
}
this.domNode=node;
this._attachTemplateNodes(node);
var _6e2=this.srcNodeRef;
if(_6e2&&_6e2.parentNode){
_6e2.parentNode.replaceChild(node,_6e2);
}
if(this.widgetsInTemplate){
var cw=(this._supportingWidgets=dojo.parser.parse(node));
this._attachTemplateNodes(cw,function(n,p){
return n[p];
});
}
this._fillContent(_6e2);
},_fillContent:function(_6e6){
var dest=this.containerNode;
if(_6e6&&dest){
while(_6e6.hasChildNodes()){
dest.appendChild(_6e6.firstChild);
}
}
},_attachTemplateNodes:function(_6e8,_6e9){
_6e9=_6e9||function(n,p){
return n.getAttribute(p);
};
var _6ec=dojo.isArray(_6e8)?_6e8:(_6e8.all||_6e8.getElementsByTagName("*"));
var x=dojo.isArray(_6e8)?0:-1;
var _6ee={};
for(;x<_6ec.length;x++){
var _6ef=(x==-1)?_6e8:_6ec[x];
if(this.widgetsInTemplate&&_6e9(_6ef,"dojoType")){
continue;
}
var _6f0=_6e9(_6ef,"dojoAttachPoint");
if(_6f0){
var _6f1,_6f2=_6f0.split(/\s*,\s*/);
while((_6f1=_6f2.shift())){
if(dojo.isArray(this[_6f1])){
this[_6f1].push(_6ef);
}else{
this[_6f1]=_6ef;
}
}
}
var _6f3=_6e9(_6ef,"dojoAttachEvent");
if(_6f3){
var _6f4,_6f5=_6f3.split(/\s*,\s*/);
var trim=dojo.trim;
while((_6f4=_6f5.shift())){
if(_6f4){
var _6f7=null;
if(_6f4.indexOf(":")!=-1){
var _6f8=_6f4.split(":");
_6f4=trim(_6f8[0]);
_6f7=trim(_6f8[1]);
}else{
_6f4=trim(_6f4);
}
if(!_6f7){
_6f7=_6f4;
}
this.connect(_6ef,_6f4,_6f7);
}
}
}
var role=_6e9(_6ef,"waiRole");
if(role){
dijit.setWaiRole(_6ef,role);
}
var _6fa=_6e9(_6ef,"waiState");
if(_6fa){
dojo.forEach(_6fa.split(/\s*,\s*/),function(_6fb){
if(_6fb.indexOf("-")!=-1){
var pair=_6fb.split("-");
dijit.setWaiState(_6ef,pair[0],pair[1]);
}
});
}
}
}});
dijit._Templated._templateCache={};
dijit._Templated.getCachedTemplate=function(_6fd,_6fe,_6ff){
var _700=dijit._Templated._templateCache;
var key=_6fe||_6fd;
var _702=_700[key];
if(_702){
if(!_702.ownerDocument||_702.ownerDocument==dojo.doc){
return _702;
}
dojo._destroyElement(_702);
}
if(!_6fe){
_6fe=dijit._Templated._sanitizeTemplateString(dojo._getText(_6fd));
}
_6fe=dojo.string.trim(_6fe);
if(_6ff||_6fe.match(/\$\{([^\}]+)\}/g)){
return (_700[key]=_6fe);
}else{
return (_700[key]=dijit._Templated._createNodesFromText(_6fe)[0]);
}
};
dijit._Templated._sanitizeTemplateString=function(_703){
if(_703){
_703=_703.replace(/^\s*<\?xml(\s)+version=[\'\"](\d)*.(\d)*[\'\"](\s)*\?>/im,"");
var _704=_703.match(/<body[^>]*>\s*([\s\S]+)\s*<\/body>/im);
if(_704){
_703=_704[1];
}
}else{
_703="";
}
return _703;
};
if(dojo.isIE){
dojo.addOnWindowUnload(function(){
var _705=dijit._Templated._templateCache;
for(var key in _705){
var _707=_705[key];
if(!isNaN(_707.nodeType)){
dojo._destroyElement(_707);
}
delete _705[key];
}
});
}
(function(){
var _708={cell:{re:/^<t[dh][\s\r\n>]/i,pre:"<table><tbody><tr>",post:"</tr></tbody></table>"},row:{re:/^<tr[\s\r\n>]/i,pre:"<table><tbody>",post:"</tbody></table>"},section:{re:/^<(thead|tbody|tfoot)[\s\r\n>]/i,pre:"<table>",post:"</table>"}};
var tn;
dijit._Templated._createNodesFromText=function(text){
if(tn&&tn.ownerDocument!=dojo.doc){
dojo._destroyElement(tn);
tn=undefined;
}
if(!tn){
tn=dojo.doc.createElement("div");
tn.style.display="none";
dojo.body().appendChild(tn);
}
var _70b="none";
var _70c=text.replace(/^\s+/,"");
for(var type in _708){
var map=_708[type];
if(map.re.test(_70c)){
_70b=type;
text=map.pre+text+map.post;
break;
}
}
tn.innerHTML=text;
if(tn.normalize){
tn.normalize();
}
var tag={cell:"tr",row:"tbody",section:"table"}[_70b];
var _710=(typeof tag!="undefined")?tn.getElementsByTagName(tag)[0]:tn;
var _711=[];
while(_710.firstChild){
_711.push(_710.removeChild(_710.firstChild));
}
tn.innerHTML="";
return _711;
};
})();
dojo.extend(dijit._Widget,{dojoAttachEvent:"",dojoAttachPoint:"",waiRole:"",waiState:""});
}
if(!dojo._hasResource["dijit.form._FormWidget"]){
dojo._hasResource["dijit.form._FormWidget"]=true;
dojo.provide("dijit.form._FormWidget");
dojo.declare("dijit.form._FormWidget",[dijit._Widget,dijit._Templated],{baseClass:"",name:"",alt:"",value:"",type:"text",tabIndex:"0",disabled:false,readOnly:false,intermediateChanges:false,attributeMap:dojo.mixin(dojo.clone(dijit._Widget.prototype.attributeMap),{value:"focusNode",disabled:"focusNode",readOnly:"focusNode",id:"focusNode",tabIndex:"focusNode",alt:"focusNode"}),_setDisabledAttr:function(_712){
this.disabled=_712;
dojo.attr(this.focusNode,"disabled",_712);
dijit.setWaiState(this.focusNode,"disabled",_712);
if(_712){
this._hovering=false;
this._active=false;
this.focusNode.removeAttribute("tabIndex");
}else{
this.focusNode.setAttribute("tabIndex",this.tabIndex);
}
this._setStateClass();
},setDisabled:function(_713){
dojo.deprecated("setDisabled("+_713+") is deprecated. Use attr('disabled',"+_713+") instead.","","2.0");
this.attr("disabled",_713);
},_scroll:true,_onFocus:function(e){
if(this._scroll){
dijit.scrollIntoView(this.domNode);
}
this.inherited(arguments);
},_onMouse:function(_715){
var _716=_715.currentTarget;
if(_716&&_716.getAttribute){
this.stateModifier=_716.getAttribute("stateModifier")||"";
}
if(!this.disabled){
switch(_715.type){
case "mouseenter":
case "mouseover":
this._hovering=true;
this._active=this._mouseDown;
break;
case "mouseout":
case "mouseleave":
this._hovering=false;
this._active=false;
break;
case "mousedown":
this._active=true;
this._mouseDown=true;
var _717=this.connect(dojo.body(),"onmouseup",function(){
if(this._mouseDown&&this.isFocusable()){
this.focus();
}
this._active=false;
this._mouseDown=false;
this._setStateClass();
this.disconnect(_717);
});
break;
}
this._setStateClass();
}
},isFocusable:function(){
return !this.disabled&&!this.readOnly&&this.focusNode&&(dojo.style(this.domNode,"display")!="none");
},focus:function(){
dijit.focus(this.focusNode);
},_setStateClass:function(){
var _718=this.baseClass.split(" ");
function multiply(_719){
_718=_718.concat(dojo.map(_718,function(c){
return c+_719;
}),"dijit"+_719);
};
if(this.checked){
multiply("Checked");
}
if(this.state){
multiply(this.state);
}
if(this.selected){
multiply("Selected");
}
if(this.disabled){
multiply("Disabled");
}else{
if(this.readOnly){
multiply("ReadOnly");
}else{
if(this._active){
multiply(this.stateModifier+"Active");
}else{
if(this._focused){
multiply("Focused");
}
if(this._hovering){
multiply(this.stateModifier+"Hover");
}
}
}
}
var tn=this.stateNode||this.domNode,_71c={};
dojo.forEach(tn.className.split(" "),function(c){
_71c[c]=true;
});
if("_stateClasses" in this){
dojo.forEach(this._stateClasses,function(c){
delete _71c[c];
});
}
dojo.forEach(_718,function(c){
_71c[c]=true;
});
var _720=[];
for(var c in _71c){
_720.push(c);
}
tn.className=_720.join(" ");
this._stateClasses=_718;
},compare:function(val1,val2){
if((typeof val1=="number")&&(typeof val2=="number")){
return (isNaN(val1)&&isNaN(val2))?0:(val1-val2);
}else{
if(val1>val2){
return 1;
}else{
if(val1<val2){
return -1;
}else{
return 0;
}
}
}
},onChange:function(_724){
},_onChangeActive:false,_handleOnChange:function(_725,_726){
this._lastValue=_725;
if(this._lastValueReported==undefined&&(_726===null||!this._onChangeActive)){
this._resetValue=this._lastValueReported=_725;
}
if((this.intermediateChanges||_726||_726===undefined)&&((typeof _725!=typeof this._lastValueReported)||this.compare(_725,this._lastValueReported)!=0)){
this._lastValueReported=_725;
if(this._onChangeActive){
this.onChange(_725);
}
}
},create:function(){
this.inherited(arguments);
this._onChangeActive=true;
this._setStateClass();
},destroy:function(){
if(this._layoutHackHandle){
clearTimeout(this._layoutHackHandle);
}
this.inherited(arguments);
},setValue:function(_727){
dojo.deprecated("dijit.form._FormWidget:setValue("+_727+") is deprecated.  Use attr('value',"+_727+") instead.","","2.0");
this.attr("value",_727);
},getValue:function(){
dojo.deprecated(this.declaredClass+"::getValue() is deprecated. Use attr('value') instead.","","2.0");
return this.attr("value");
},_layoutHack:function(){
if(dojo.isFF==2&&!this._layoutHackHandle){
var node=this.domNode;
var old=node.style.opacity;
node.style.opacity="0.999";
this._layoutHackHandle=setTimeout(dojo.hitch(this,function(){
this._layoutHackHandle=null;
node.style.opacity=old;
}),0);
}
}});
dojo.declare("dijit.form._FormValueWidget",dijit.form._FormWidget,{attributeMap:dojo.mixin(dojo.clone(dijit.form._FormWidget.prototype.attributeMap),{value:""}),postCreate:function(){
if(dojo.isIE||dojo.isSafari){
this.connect(this.focusNode||this.domNode,"onkeydown",this._onKeyDown);
}
if(this._resetValue===undefined){
this._resetValue=this.value;
}
},_setValueAttr:function(_72a,_72b){
this.value=_72a;
this._handleOnChange(_72a,_72b);
},_getValueAttr:function(_72c){
return this._lastValue;
},undo:function(){
this._setValueAttr(this._lastValueReported,false);
},reset:function(){
this._hasBeenBlurred=false;
this._setValueAttr(this._resetValue,true);
},_valueChanged:function(){
var v=this.attr("value");
var lv=this._lastValueReported;
return ((v!==null&&(v!==undefined)&&v.toString)?v.toString():"")!==((lv!==null&&(lv!==undefined)&&lv.toString)?lv.toString():"");
},_onKeyDown:function(e){
if(e.keyCode==dojo.keys.ESCAPE&&!e.ctrlKey&&!e.altKey){
var te;
if(dojo.isIE){
e.preventDefault();
te=document.createEventObject();
te.keyCode=dojo.keys.ESCAPE;
te.shiftKey=e.shiftKey;
e.srcElement.fireEvent("onkeypress",te);
}else{
if(dojo.isSafari){
te=document.createEvent("Events");
te.initEvent("keypress",true,true);
te.keyCode=dojo.keys.ESCAPE;
te.shiftKey=e.shiftKey;
e.target.dispatchEvent(te);
}
}
}
},_onKeyPress:function(e){
if(e.charOrCode==dojo.keys.ESCAPE&&!e.ctrlKey&&!e.altKey&&this._valueChanged()){
this.undo();
dojo.stopEvent(e);
return false;
}else{
if(this.intermediateChanges){
var _732=this;
setTimeout(function(){
_732._handleOnChange(_732.attr("value"),false);
},0);
}
}
return true;
}});
}
if(!dojo._hasResource["dijit._Container"]){
dojo._hasResource["dijit._Container"]=true;
dojo.provide("dijit._Container");
dojo.declare("dijit._Contained",null,{getParent:function(){
for(var p=this.domNode.parentNode;p;p=p.parentNode){
var id=p.getAttribute&&p.getAttribute("widgetId");
if(id){
var _735=dijit.byId(id);
return _735.isContainer?_735:null;
}
}
return null;
},_getSibling:function(_736){
var node=this.domNode;
do{
node=node[_736+"Sibling"];
}while(node&&node.nodeType!=1);
if(!node){
return null;
}
var id=node.getAttribute("widgetId");
return dijit.byId(id);
},getPreviousSibling:function(){
return this._getSibling("previous");
},getNextSibling:function(){
return this._getSibling("next");
},getIndexInParent:function(){
var p=this.getParent();
if(!p||!p.getIndexOfChild){
return -1;
}
return p.getIndexOfChild(this);
}});
dojo.declare("dijit._Container",null,{isContainer:true,buildRendering:function(){
this.inherited(arguments);
if(!this.containerNode){
this.containerNode=this.domNode;
}
},addChild:function(_73a,_73b){
var _73c=this.containerNode;
if(_73b&&typeof _73b=="number"){
var _73d=dojo.query("> [widgetId]",_73c);
if(_73d&&_73d.length>=_73b){
_73c=_73d[_73b-1];
_73b="after";
}
}
dojo.place(_73a.domNode,_73c,_73b);
if(this._started&&!_73a._started){
_73a.startup();
}
},removeChild:function(_73e){
if(typeof _73e=="number"&&_73e>0){
_73e=this.getChildren()[_73e];
}
if(!_73e||!_73e.domNode){
return;
}
var node=_73e.domNode;
node.parentNode.removeChild(node);
},_nextElement:function(node){
do{
node=node.nextSibling;
}while(node&&node.nodeType!=1);
return node;
},_firstElement:function(node){
node=node.firstChild;
if(node&&node.nodeType!=1){
node=this._nextElement(node);
}
return node;
},getChildren:function(){
return dojo.query("> [widgetId]",this.containerNode).map(dijit.byNode);
},hasChildren:function(){
return !!this._firstElement(this.containerNode);
},destroyDescendants:function(_742){
dojo.forEach(this.getChildren(),function(_743){
_743.destroyRecursive(_742);
});
},_getSiblingOfChild:function(_744,dir){
var node=_744.domNode;
var _747=(dir>0?"nextSibling":"previousSibling");
do{
node=node[_747];
}while(node&&(node.nodeType!=1||!dijit.byNode(node)));
return node?dijit.byNode(node):null;
},getIndexOfChild:function(_748){
var _749=this.getChildren();
for(var i=0,c;c=_749[i];i++){
if(c==_748){
return i;
}
}
return -1;
}});
dojo.declare("dijit._KeyNavContainer",[dijit._Container],{_keyNavCodes:{},connectKeyNavHandlers:function(_74c,_74d){
var _74e=this._keyNavCodes={};
var prev=dojo.hitch(this,this.focusPrev);
var next=dojo.hitch(this,this.focusNext);
dojo.forEach(_74c,function(code){
_74e[code]=prev;
});
dojo.forEach(_74d,function(code){
_74e[code]=next;
});
this.connect(this.domNode,"onkeypress","_onContainerKeypress");
this.connect(this.domNode,"onfocus","_onContainerFocus");
},startupKeyNavChildren:function(){
dojo.forEach(this.getChildren(),dojo.hitch(this,"_startupChild"));
},addChild:function(_753,_754){
dijit._KeyNavContainer.superclass.addChild.apply(this,arguments);
this._startupChild(_753);
},focus:function(){
this.focusFirstChild();
},focusFirstChild:function(){
this.focusChild(this._getFirstFocusableChild());
},focusNext:function(){
if(this.focusedChild&&this.focusedChild.hasNextFocalNode&&this.focusedChild.hasNextFocalNode()){
this.focusedChild.focusNext();
return;
}
var _755=this._getNextFocusableChild(this.focusedChild,1);
if(_755.getFocalNodes){
this.focusChild(_755,_755.getFocalNodes()[0]);
}else{
this.focusChild(_755);
}
},focusPrev:function(){
if(this.focusedChild&&this.focusedChild.hasPrevFocalNode&&this.focusedChild.hasPrevFocalNode()){
this.focusedChild.focusPrev();
return;
}
var _756=this._getNextFocusableChild(this.focusedChild,-1);
if(_756.getFocalNodes){
var _757=_756.getFocalNodes();
this.focusChild(_756,_757[_757.length-1]);
}else{
this.focusChild(_756);
}
},focusChild:function(_758,node){
if(_758){
if(this.focusedChild&&_758!==this.focusedChild){
this._onChildBlur(this.focusedChild);
}
this.focusedChild=_758;
if(node&&_758.focusFocalNode){
_758.focusFocalNode(node);
}else{
_758.focus();
}
}
},_startupChild:function(_75a){
if(_75a.getFocalNodes){
dojo.forEach(_75a.getFocalNodes(),function(node){
dojo.attr(node,"tabindex",-1);
this._connectNode(node);
},this);
}else{
var node=_75a.focusNode||_75a.domNode;
if(_75a.isFocusable()){
dojo.attr(node,"tabindex",-1);
}
this._connectNode(node);
}
},_connectNode:function(node){
this.connect(node,"onfocus","_onNodeFocus");
this.connect(node,"onblur","_onNodeBlur");
},_onContainerFocus:function(evt){
if(evt.target===this.domNode){
this.focusFirstChild();
}
},_onContainerKeypress:function(evt){
if(evt.ctrlKey||evt.altKey){
return;
}
var func=this._keyNavCodes[evt.charOrCode];
if(func){
func();
dojo.stopEvent(evt);
}
},_onNodeFocus:function(evt){
dojo.attr(this.domNode,"tabindex",-1);
var _762=dijit.getEnclosingWidget(evt.target);
if(_762&&_762.isFocusable()){
this.focusedChild=_762;
}
dojo.stopEvent(evt);
},_onNodeBlur:function(evt){
if(this.tabIndex){
dojo.attr(this.domNode,"tabindex",this.tabIndex);
}
dojo.stopEvent(evt);
},_onChildBlur:function(_764){
},_getFirstFocusableChild:function(){
return this._getNextFocusableChild(null,1);
},_getNextFocusableChild:function(_765,dir){
if(_765){
_765=this._getSiblingOfChild(_765,dir);
}
var _767=this.getChildren();
for(var i=0;i<_767.length;i++){
if(!_765){
_765=_767[(dir>0)?0:(_767.length-1)];
}
if(_765.isFocusable()){
return _765;
}
_765=this._getSiblingOfChild(_765,dir);
}
return null;
}});
}
if(!dojo._hasResource["dojo.dnd.common"]){
dojo._hasResource["dojo.dnd.common"]=true;
dojo.provide("dojo.dnd.common");
dojo.dnd._isMac=navigator.appVersion.indexOf("Macintosh")>=0;
dojo.dnd._copyKey=dojo.dnd._isMac?"metaKey":"ctrlKey";
dojo.dnd.getCopyKeyState=function(e){
return e[dojo.dnd._copyKey];
};
dojo.dnd._uniqueId=0;
dojo.dnd.getUniqueId=function(){
var id;
do{
id=dojo._scopeName+"Unique"+(++dojo.dnd._uniqueId);
}while(dojo.byId(id));
return id;
};
dojo.dnd._empty={};
dojo.dnd.isFormElement=function(e){
var t=e.target;
if(t.nodeType==3){
t=t.parentNode;
}
return " button textarea input select option ".indexOf(" "+t.tagName.toLowerCase()+" ")>=0;
};
}
if(!dojo._hasResource["dojo.dnd.autoscroll"]){
dojo._hasResource["dojo.dnd.autoscroll"]=true;
dojo.provide("dojo.dnd.autoscroll");
dojo.dnd.getViewport=function(){
var d=dojo.doc,dd=d.documentElement,w=window,b=dojo.body();
if(dojo.isMozilla){
return {w:dd.clientWidth,h:w.innerHeight};
}else{
if(!dojo.isOpera&&w.innerWidth){
return {w:w.innerWidth,h:w.innerHeight};
}else{
if(!dojo.isOpera&&dd&&dd.clientWidth){
return {w:dd.clientWidth,h:dd.clientHeight};
}else{
if(b.clientWidth){
return {w:b.clientWidth,h:b.clientHeight};
}
}
}
}
return null;
};
dojo.dnd.V_TRIGGER_AUTOSCROLL=32;
dojo.dnd.H_TRIGGER_AUTOSCROLL=32;
dojo.dnd.V_AUTOSCROLL_VALUE=16;
dojo.dnd.H_AUTOSCROLL_VALUE=16;
dojo.dnd.autoScroll=function(e){
var v=dojo.dnd.getViewport(),dx=0,dy=0;
if(e.clientX<dojo.dnd.H_TRIGGER_AUTOSCROLL){
dx=-dojo.dnd.H_AUTOSCROLL_VALUE;
}else{
if(e.clientX>v.w-dojo.dnd.H_TRIGGER_AUTOSCROLL){
dx=dojo.dnd.H_AUTOSCROLL_VALUE;
}
}
if(e.clientY<dojo.dnd.V_TRIGGER_AUTOSCROLL){
dy=-dojo.dnd.V_AUTOSCROLL_VALUE;
}else{
if(e.clientY>v.h-dojo.dnd.V_TRIGGER_AUTOSCROLL){
dy=dojo.dnd.V_AUTOSCROLL_VALUE;
}
}
window.scrollBy(dx,dy);
};
dojo.dnd._validNodes={"div":1,"p":1,"td":1};
dojo.dnd._validOverflow={"auto":1,"scroll":1};
dojo.dnd.autoScrollNodes=function(e){
for(var n=e.target;n;){
if(n.nodeType==1&&(n.tagName.toLowerCase() in dojo.dnd._validNodes)){
var s=dojo.getComputedStyle(n);
if(s.overflow.toLowerCase() in dojo.dnd._validOverflow){
var b=dojo._getContentBox(n,s),t=dojo._abs(n,true);
var w=Math.min(dojo.dnd.H_TRIGGER_AUTOSCROLL,b.w/2),h=Math.min(dojo.dnd.V_TRIGGER_AUTOSCROLL,b.h/2),rx=e.pageX-t.x,ry=e.pageY-t.y,dx=0,dy=0;
if(dojo.isSafari||dojo.isOpera){
rx+=dojo.body().scrollLeft,ry+=dojo.body().scrollTop;
}
if(rx>0&&rx<b.w){
if(rx<w){
dx=-w;
}else{
if(rx>b.w-w){
dx=w;
}
}
}
if(ry>0&&ry<b.h){
if(ry<h){
dy=-h;
}else{
if(ry>b.h-h){
dy=h;
}
}
}
var _780=n.scrollLeft,_781=n.scrollTop;
n.scrollLeft=n.scrollLeft+dx;
n.scrollTop=n.scrollTop+dy;
if(_780!=n.scrollLeft||_781!=n.scrollTop){
return;
}
}
}
try{
n=n.parentNode;
}
catch(x){
n=null;
}
}
dojo.dnd.autoScroll(e);
};
}
if(!dojo._hasResource["dojo.dnd.Mover"]){
dojo._hasResource["dojo.dnd.Mover"]=true;
dojo.provide("dojo.dnd.Mover");
dojo.declare("dojo.dnd.Mover",null,{constructor:function(node,e,host){
this.node=dojo.byId(node);
this.marginBox={l:e.pageX,t:e.pageY};
this.mouseButton=e.button;
var h=this.host=host,d=node.ownerDocument,_787=dojo.connect(d,"onmousemove",this,"onFirstMove");
this.events=[dojo.connect(d,"onmousemove",this,"onMouseMove"),dojo.connect(d,"onmouseup",this,"onMouseUp"),dojo.connect(d,"ondragstart",dojo.stopEvent),dojo.connect(d.body,"onselectstart",dojo.stopEvent),_787];
if(h&&h.onMoveStart){
h.onMoveStart(this);
}
},onMouseMove:function(e){
dojo.dnd.autoScroll(e);
var m=this.marginBox;
this.host.onMove(this,{l:m.l+e.pageX,t:m.t+e.pageY});
dojo.stopEvent(e);
},onMouseUp:function(e){
if(dojo.isSafari&&dojo.dnd._isMac&&this.mouseButton==2?e.button==0:this.mouseButton==e.button){
this.destroy();
}
dojo.stopEvent(e);
},onFirstMove:function(){
var s=this.node.style,l,t,h=this.host;
switch(s.position){
case "relative":
case "absolute":
l=Math.round(parseFloat(s.left));
t=Math.round(parseFloat(s.top));
break;
default:
s.position="absolute";
var m=dojo.marginBox(this.node);
var b=dojo.doc.body;
var bs=dojo.getComputedStyle(b);
var bm=dojo._getMarginBox(b,bs);
var bc=dojo._getContentBox(b,bs);
l=m.l-(bc.l-bm.l);
t=m.t-(bc.t-bm.t);
break;
}
this.marginBox.l=l-this.marginBox.l;
this.marginBox.t=t-this.marginBox.t;
if(h&&h.onFirstMove){
h.onFirstMove(this);
}
dojo.disconnect(this.events.pop());
},destroy:function(){
dojo.forEach(this.events,dojo.disconnect);
var h=this.host;
if(h&&h.onMoveStop){
h.onMoveStop(this);
}
this.events=this.node=this.host=null;
}});
}
if(!dojo._hasResource["dojo.dnd.Moveable"]){
dojo._hasResource["dojo.dnd.Moveable"]=true;
dojo.provide("dojo.dnd.Moveable");
dojo.declare("dojo.dnd.Moveable",null,{handle:"",delay:0,skip:false,constructor:function(node,_796){
this.node=dojo.byId(node);
if(!_796){
_796={};
}
this.handle=_796.handle?dojo.byId(_796.handle):null;
if(!this.handle){
this.handle=this.node;
}
this.delay=_796.delay>0?_796.delay:0;
this.skip=_796.skip;
this.mover=_796.mover?_796.mover:dojo.dnd.Mover;
this.events=[dojo.connect(this.handle,"onmousedown",this,"onMouseDown"),dojo.connect(this.handle,"ondragstart",this,"onSelectStart"),dojo.connect(this.handle,"onselectstart",this,"onSelectStart")];
},markupFactory:function(_797,node){
return new dojo.dnd.Moveable(node,_797);
},destroy:function(){
dojo.forEach(this.events,dojo.disconnect);
this.events=this.node=this.handle=null;
},onMouseDown:function(e){
if(this.skip&&dojo.dnd.isFormElement(e)){
return;
}
if(this.delay){
this.events.push(dojo.connect(this.handle,"onmousemove",this,"onMouseMove"),dojo.connect(this.handle,"onmouseup",this,"onMouseUp"));
this._lastX=e.pageX;
this._lastY=e.pageY;
}else{
this.onDragDetected(e);
}
dojo.stopEvent(e);
},onMouseMove:function(e){
if(Math.abs(e.pageX-this._lastX)>this.delay||Math.abs(e.pageY-this._lastY)>this.delay){
this.onMouseUp(e);
this.onDragDetected(e);
}
dojo.stopEvent(e);
},onMouseUp:function(e){
for(var i=0;i<2;++i){
dojo.disconnect(this.events.pop());
}
dojo.stopEvent(e);
},onSelectStart:function(e){
if(!this.skip||!dojo.dnd.isFormElement(e)){
dojo.stopEvent(e);
}
},onDragDetected:function(e){
new this.mover(this.node,e,this);
},onMoveStart:function(_79f){
dojo.publish("/dnd/move/start",[_79f]);
dojo.addClass(dojo.body(),"dojoMove");
dojo.addClass(this.node,"dojoMoveItem");
},onMoveStop:function(_7a0){
dojo.publish("/dnd/move/stop",[_7a0]);
dojo.removeClass(dojo.body(),"dojoMove");
dojo.removeClass(this.node,"dojoMoveItem");
},onFirstMove:function(_7a1){
},onMove:function(_7a2,_7a3){
this.onMoving(_7a2,_7a3);
var s=_7a2.node.style;
s.left=_7a3.l+"px";
s.top=_7a3.t+"px";
this.onMoved(_7a2,_7a3);
},onMoving:function(_7a5,_7a6){
},onMoved:function(_7a7,_7a8){
}});
}
if(!dojo._hasResource["dojo.dnd.move"]){
dojo._hasResource["dojo.dnd.move"]=true;
dojo.provide("dojo.dnd.move");
dojo.declare("dojo.dnd.move.constrainedMoveable",dojo.dnd.Moveable,{constraints:function(){
},within:false,markupFactory:function(_7a9,node){
return new dojo.dnd.move.constrainedMoveable(node,_7a9);
},constructor:function(node,_7ac){
if(!_7ac){
_7ac={};
}
this.constraints=_7ac.constraints;
this.within=_7ac.within;
},onFirstMove:function(_7ad){
var c=this.constraintBox=this.constraints.call(this,_7ad);
c.r=c.l+c.w;
c.b=c.t+c.h;
if(this.within){
var mb=dojo.marginBox(_7ad.node);
c.r-=mb.w;
c.b-=mb.h;
}
},onMove:function(_7b0,_7b1){
var c=this.constraintBox,s=_7b0.node.style;
s.left=(_7b1.l<c.l?c.l:c.r<_7b1.l?c.r:_7b1.l)+"px";
s.top=(_7b1.t<c.t?c.t:c.b<_7b1.t?c.b:_7b1.t)+"px";
}});
dojo.declare("dojo.dnd.move.boxConstrainedMoveable",dojo.dnd.move.constrainedMoveable,{box:{},markupFactory:function(_7b4,node){
return new dojo.dnd.move.boxConstrainedMoveable(node,_7b4);
},constructor:function(node,_7b7){
var box=_7b7&&_7b7.box;
this.constraints=function(){
return box;
};
}});
dojo.declare("dojo.dnd.move.parentConstrainedMoveable",dojo.dnd.move.constrainedMoveable,{area:"content",markupFactory:function(_7b9,node){
return new dojo.dnd.move.parentConstrainedMoveable(node,_7b9);
},constructor:function(node,_7bc){
var area=_7bc&&_7bc.area;
this.constraints=function(){
var n=this.node.parentNode,s=dojo.getComputedStyle(n),mb=dojo._getMarginBox(n,s);
if(area=="margin"){
return mb;
}
var t=dojo._getMarginExtents(n,s);
mb.l+=t.l,mb.t+=t.t,mb.w-=t.w,mb.h-=t.h;
if(area=="border"){
return mb;
}
t=dojo._getBorderExtents(n,s);
mb.l+=t.l,mb.t+=t.t,mb.w-=t.w,mb.h-=t.h;
if(area=="padding"){
return mb;
}
t=dojo._getPadExtents(n,s);
mb.l+=t.l,mb.t+=t.t,mb.w-=t.w,mb.h-=t.h;
return mb;
};
}});
dojo.dnd.move.constrainedMover=function(fun,_7c3){
dojo.deprecated("dojo.dnd.move.constrainedMover, use dojo.dnd.move.constrainedMoveable instead");
var _7c4=function(node,e,_7c7){
dojo.dnd.Mover.call(this,node,e,_7c7);
};
dojo.extend(_7c4,dojo.dnd.Mover.prototype);
dojo.extend(_7c4,{onMouseMove:function(e){
dojo.dnd.autoScroll(e);
var m=this.marginBox,c=this.constraintBox,l=m.l+e.pageX,t=m.t+e.pageY;
l=l<c.l?c.l:c.r<l?c.r:l;
t=t<c.t?c.t:c.b<t?c.b:t;
this.host.onMove(this,{l:l,t:t});
},onFirstMove:function(){
dojo.dnd.Mover.prototype.onFirstMove.call(this);
var c=this.constraintBox=fun.call(this);
c.r=c.l+c.w;
c.b=c.t+c.h;
if(_7c3){
var mb=dojo.marginBox(this.node);
c.r-=mb.w;
c.b-=mb.h;
}
}});
return _7c4;
};
dojo.dnd.move.boxConstrainedMover=function(box,_7d0){
dojo.deprecated("dojo.dnd.move.boxConstrainedMover, use dojo.dnd.move.boxConstrainedMoveable instead");
return dojo.dnd.move.constrainedMover(function(){
return box;
},_7d0);
};
dojo.dnd.move.parentConstrainedMover=function(area,_7d2){
dojo.deprecated("dojo.dnd.move.parentConstrainedMover, use dojo.dnd.move.parentConstrainedMoveable instead");
var fun=function(){
var n=this.node.parentNode,s=dojo.getComputedStyle(n),mb=dojo._getMarginBox(n,s);
if(area=="margin"){
return mb;
}
var t=dojo._getMarginExtents(n,s);
mb.l+=t.l,mb.t+=t.t,mb.w-=t.w,mb.h-=t.h;
if(area=="border"){
return mb;
}
t=dojo._getBorderExtents(n,s);
mb.l+=t.l,mb.t+=t.t,mb.w-=t.w,mb.h-=t.h;
if(area=="padding"){
return mb;
}
t=dojo._getPadExtents(n,s);
mb.l+=t.l,mb.t+=t.t,mb.w-=t.w,mb.h-=t.h;
return mb;
};
return dojo.dnd.move.constrainedMover(fun,_7d2);
};
dojo.dnd.constrainedMover=dojo.dnd.move.constrainedMover;
dojo.dnd.boxConstrainedMover=dojo.dnd.move.boxConstrainedMover;
dojo.dnd.parentConstrainedMover=dojo.dnd.move.parentConstrainedMover;
}
if(!dojo._hasResource["dijit.form.Button"]){
dojo._hasResource["dijit.form.Button"]=true;
dojo.provide("dijit.form.Button");
dojo.declare("dijit.form.Button",dijit.form._FormWidget,{label:"",showLabel:true,iconClass:"",type:"button",baseClass:"dijitButton",templateString:"<span class=\"dijit dijitReset dijitLeft dijitInline\"\r\n\tdojoAttachEvent=\"ondijitclick:_onButtonClick,onmouseenter:_onMouse,onmouseleave:_onMouse,onmousedown:_onMouse\"\r\n\t><span class=\"dijitReset dijitRight dijitInline\"\r\n\t\t><span class=\"dijitReset dijitInline dijitButtonNode\"\r\n\t\t\t><button class=\"dijitReset dijitStretch dijitButtonContents\"\r\n\t\t\t\tdojoAttachPoint=\"titleNode,focusNode\" \r\n\t\t\t\tname=\"${name}\" type=\"${type}\" waiRole=\"button\" waiState=\"labelledby-${id}_label\"\r\n\t\t\t\t><span class=\"dijitReset dijitInline\" dojoAttachPoint=\"iconNode\" \r\n\t\t\t\t\t><span class=\"dijitReset dijitToggleButtonIconChar\">&#10003;</span \r\n\t\t\t\t></span \r\n\t\t\t\t><span class=\"dijitReset dijitInline dijitButtonText\" \r\n\t\t\t\t\tid=\"${id}_label\"  \r\n\t\t\t\t\tdojoAttachPoint=\"containerNode\"\r\n\t\t\t\t></span\r\n\t\t\t></button\r\n\t\t></span\r\n\t></span\r\n></span>\r\n",attributeMap:dojo.mixin(dojo.clone(dijit.form._FormWidget.prototype.attributeMap),{label:{node:"containerNode",type:"innerHTML"},iconClass:{node:"iconNode",type:"class"}}),_onClick:function(e){
if(this.disabled||this.readOnly){
return false;
}
this._clicked();
return this.onClick(e);
},_onButtonClick:function(e){
if(e.type!="click"&&!(this.type=="submit"||this.type=="reset")){
dojo.stopEvent(e);
}
if(this._onClick(e)===false){
e.preventDefault();
}else{
if(this.type=="submit"&&!this.focusNode.form){
for(var node=this.domNode;node.parentNode;node=node.parentNode){
var _7db=dijit.byNode(node);
if(_7db&&typeof _7db._onSubmit=="function"){
_7db._onSubmit(e);
break;
}
}
}
}
},_fillContent:function(_7dc){
if(_7dc&&!("label" in this.params)){
this.attr("label",_7dc.innerHTML);
}
},postCreate:function(){
if(this.showLabel==false){
dojo.addClass(this.containerNode,"dijitDisplayNone");
}
dojo.setSelectable(this.focusNode,false);
this.inherited(arguments);
},onClick:function(e){
return true;
},_clicked:function(e){
},setLabel:function(_7df){
dojo.deprecated("dijit.form.Button.setLabel() is deprecated.  Use attr('label', ...) instead.","","2.0");
this.attr("label",_7df);
},_setLabelAttr:function(_7e0){
this.containerNode.innerHTML=this.label=_7e0;
this._layoutHack();
if(this.showLabel==false&&!this.params.title){
this.titleNode.title=dojo.trim(this.containerNode.innerText||this.containerNode.textContent||"");
}
}});
dojo.declare("dijit.form.DropDownButton",[dijit.form.Button,dijit._Container],{baseClass:"dijitDropDownButton",templateString:"<span class=\"dijit dijitReset dijitLeft dijitInline\"\r\n\tdojoAttachEvent=\"onmouseenter:_onMouse,onmouseleave:_onMouse,onmousedown:_onMouse,onclick:_onDropDownClick,onkeydown:_onDropDownKeydown,onblur:_onDropDownBlur,onkeypress:_onKey\"\r\n\t><span class='dijitReset dijitRight dijitInline'\r\n\t\t><span class='dijitReset dijitInline dijitButtonNode'\r\n\t\t\t><button class=\"dijitReset dijitStretch dijitButtonContents\" \r\n\t\t\t\ttype=\"${type}\" name=\"${name}\"\r\n\t\t\t\tdojoAttachPoint=\"focusNode,titleNode\" \r\n\t\t\t\twaiRole=\"button\" waiState=\"haspopup-true,labelledby-${id}_label\"\r\n\t\t\t\t><span class=\"dijitReset dijitInline\" \r\n\t\t\t\t\tdojoAttachPoint=\"iconNode\"\r\n\t\t\t\t></span\r\n\t\t\t\t><span class=\"dijitReset dijitInline dijitButtonText\"  \r\n\t\t\t\t\tdojoAttachPoint=\"containerNode,popupStateNode\" \r\n\t\t\t\t\tid=\"${id}_label\"\r\n\t\t\t\t></span\r\n\t\t\t\t><span class=\"dijitReset dijitInline dijitArrowButtonInner\">&thinsp;</span\r\n\t\t\t\t><span class=\"dijitReset dijitInline dijitArrowButtonChar\">&#9660;</span\r\n\t\t\t></button\r\n\t\t></span\r\n\t></span\r\n></span>\r\n",_fillContent:function(){
if(this.srcNodeRef){
var _7e1=dojo.query("*",this.srcNodeRef);
dijit.form.DropDownButton.superclass._fillContent.call(this,_7e1[0]);
this.dropDownContainer=this.srcNodeRef;
}
},startup:function(){
if(this._started){
return;
}
if(!this.dropDown){
var _7e2=dojo.query("[widgetId]",this.dropDownContainer)[0];
this.dropDown=dijit.byNode(_7e2);
delete this.dropDownContainer;
}
dijit.popup.prepare(this.dropDown.domNode);
this.inherited(arguments);
},destroyDescendants:function(){
if(this.dropDown){
this.dropDown.destroyRecursive();
delete this.dropDown;
}
this.inherited(arguments);
},_onArrowClick:function(e){
if(this.disabled||this.readOnly){
return;
}
this._toggleDropDown();
},_onDropDownClick:function(e){
var _7e5=dojo.isFF&&dojo.isFF<3&&navigator.appVersion.indexOf("Macintosh")!=-1;
if(!_7e5||e.detail!=0||this._seenKeydown){
this._onArrowClick(e);
}
this._seenKeydown=false;
},_onDropDownKeydown:function(e){
this._seenKeydown=true;
},_onDropDownBlur:function(e){
this._seenKeydown=false;
},_onKey:function(e){
if(this.disabled||this.readOnly){
return;
}
if(e.charOrCode==dojo.keys.DOWN_ARROW){
if(!this.dropDown||this.dropDown.domNode.style.visibility=="hidden"){
dojo.stopEvent(e);
this._toggleDropDown();
}
}
},_onBlur:function(){
this._closeDropDown();
this.inherited(arguments);
},_toggleDropDown:function(){
if(this.disabled||this.readOnly){
return;
}
dijit.focus(this.popupStateNode);
var _7e9=this.dropDown;
if(!_7e9){
return;
}
if(!this._opened){
if(_7e9.href&&!_7e9.isLoaded){
var self=this;
var _7eb=dojo.connect(_7e9,"onLoad",function(){
dojo.disconnect(_7eb);
self._openDropDown();
});
_7e9._loadCheck(true);
return;
}else{
this._openDropDown();
}
}else{
this._closeDropDown();
}
},_openDropDown:function(){
var _7ec=this.dropDown;
var _7ed=_7ec.domNode.style.width;
var self=this;
dijit.popup.open({parent:this,popup:_7ec,around:this.domNode,orient:this.isLeftToRight()?{"BL":"TL","BR":"TR","TL":"BL","TR":"BR"}:{"BR":"TR","BL":"TL","TR":"BR","TL":"BL"},onExecute:function(){
self._closeDropDown(true);
},onCancel:function(){
self._closeDropDown(true);
},onClose:function(){
_7ec.domNode.style.width=_7ed;
self.popupStateNode.removeAttribute("popupActive");
self._opened=false;
}});
if(this.domNode.offsetWidth>_7ec.domNode.offsetWidth){
var _7ef=null;
if(!this.isLeftToRight()){
_7ef=_7ec.domNode.parentNode;
var _7f0=_7ef.offsetLeft+_7ef.offsetWidth;
}
dojo.marginBox(_7ec.domNode,{w:this.domNode.offsetWidth});
if(_7ef){
_7ef.style.left=_7f0-this.domNode.offsetWidth+"px";
}
}
this.popupStateNode.setAttribute("popupActive","true");
this._opened=true;
if(_7ec.focus){
_7ec.focus();
}
},_closeDropDown:function(_7f1){
if(this._opened){
dijit.popup.close(this.dropDown);
if(_7f1){
this.focus();
}
this._opened=false;
}
}});
dojo.declare("dijit.form.ComboButton",dijit.form.DropDownButton,{templateString:"<table class='dijit dijitReset dijitInline dijitLeft'\r\n\tcellspacing='0' cellpadding='0' waiRole=\"presentation\"\r\n\t><tbody waiRole=\"presentation\"><tr waiRole=\"presentation\"\r\n\t\t><td class=\"dijitReset dijitStretch dijitButtonContents dijitButtonNode\"\r\n\t\t\tdojoAttachEvent=\"ondijitclick:_onButtonClick,onmouseenter:_onMouse,onmouseleave:_onMouse,onmousedown:_onMouse\"  dojoAttachPoint=\"titleNode\"\r\n\t\t\twaiRole=\"button\" waiState=\"labelledby-${id}_label\"\r\n\t\t\t><div class=\"dijitReset dijitInline\" dojoAttachPoint=\"iconNode\" waiRole=\"presentation\"></div\r\n\t\t\t><div class=\"dijitReset dijitInline dijitButtonText\" id=\"${id}_label\" dojoAttachPoint=\"containerNode\" waiRole=\"presentation\"></div\r\n\t\t></td\r\n\t\t><td class='dijitReset dijitRight dijitButtonNode dijitArrowButton dijitDownArrowButton'\r\n\t\t\tdojoAttachPoint=\"popupStateNode,focusNode\"\r\n\t\t\tdojoAttachEvent=\"ondijitclick:_onArrowClick, onkeypress:_onKey,onmouseenter:_onMouse,onmouseleave:_onMouse\"\r\n\t\t\tstateModifier=\"DownArrow\"\r\n\t\t\ttitle=\"${optionsTitle}\" name=\"${name}\"\r\n\t\t\twaiRole=\"button\" waiState=\"haspopup-true\"\r\n\t\t\t><div class=\"dijitReset dijitArrowButtonInner\" waiRole=\"presentation\">&thinsp;</div\r\n\t\t\t><div class=\"dijitReset dijitArrowButtonChar\" waiRole=\"presentation\">&#9660;</div\r\n\t\t></td\r\n\t></tr></tbody\r\n></table>\r\n",attributeMap:dojo.mixin(dojo.clone(dijit.form.Button.prototype.attributeMap),{id:"",name:"",tabIndex:["focusNode","titleNode"]}),optionsTitle:"",baseClass:"dijitComboButton",_focusedNode:null,postCreate:function(){
this.inherited(arguments);
this._focalNodes=[this.titleNode,this.popupStateNode];
dojo.forEach(this._focalNodes,dojo.hitch(this,function(node){
if(dojo.isIE){
this.connect(node,"onactivate",this._onNodeFocus);
this.connect(node,"ondeactivate",this._onNodeBlur);
}else{
this.connect(node,"onfocus",this._onNodeFocus);
this.connect(node,"onblur",this._onNodeBlur);
}
}));
},focusFocalNode:function(node){
this._focusedNode=node;
dijit.focus(node);
},hasNextFocalNode:function(){
return this._focusedNode!==this.getFocalNodes()[1];
},focusNext:function(){
this._focusedNode=this.getFocalNodes()[this._focusedNode?1:0];
dijit.focus(this._focusedNode);
},hasPrevFocalNode:function(){
return this._focusedNode!==this.getFocalNodes()[0];
},focusPrev:function(){
this._focusedNode=this.getFocalNodes()[this._focusedNode?0:1];
dijit.focus(this._focusedNode);
},getFocalNodes:function(){
return this._focalNodes;
},_onNodeFocus:function(evt){
this._focusedNode=evt.currentTarget;
var fnc=this._focusedNode==this.focusNode?"dijitDownArrowButtonFocused":"dijitButtonContentsFocused";
dojo.addClass(this._focusedNode,fnc);
},_onNodeBlur:function(evt){
var fnc=evt.currentTarget==this.focusNode?"dijitDownArrowButtonFocused":"dijitButtonContentsFocused";
dojo.removeClass(evt.currentTarget,fnc);
},_onBlur:function(){
this.inherited(arguments);
this._focusedNode=null;
}});
dojo.declare("dijit.form.ToggleButton",dijit.form.Button,{baseClass:"dijitToggleButton",checked:false,attributeMap:dojo.mixin(dojo.clone(dijit.form.Button.prototype.attributeMap),{checked:"focusNode"}),_clicked:function(evt){
this.attr("checked",!this.checked);
},_setCheckedAttr:function(_7f9){
this.checked=_7f9;
dojo.attr(this.focusNode||this.domNode,"checked",_7f9);
dijit.setWaiState(this.focusNode||this.domNode,"pressed",_7f9);
this._setStateClass();
this._handleOnChange(_7f9,true);
},setChecked:function(_7fa){
dojo.deprecated("setChecked("+_7fa+") is deprecated. Use attr('checked',"+_7fa+") instead.","","2.0");
this.attr("checked",_7fa);
},reset:function(){
this._hasBeenBlurred=false;
this.attr("checked",this.params.checked||false);
}});
}
if(!dojo._hasResource["dojo.i18n"]){
dojo._hasResource["dojo.i18n"]=true;
dojo.provide("dojo.i18n");
dojo.i18n.getLocalization=function(_7fb,_7fc,_7fd){
_7fd=dojo.i18n.normalizeLocale(_7fd);
var _7fe=_7fd.split("-");
var _7ff=[_7fb,"nls",_7fc].join(".");
var _800=dojo._loadedModules[_7ff];
if(_800){
var _801;
for(var i=_7fe.length;i>0;i--){
var loc=_7fe.slice(0,i).join("_");
if(_800[loc]){
_801=_800[loc];
break;
}
}
if(!_801){
_801=_800.ROOT;
}
if(_801){
var _804=function(){
};
_804.prototype=_801;
return new _804();
}
}
throw new Error("Bundle not found: "+_7fc+" in "+_7fb+" , locale="+_7fd);
};
dojo.i18n.normalizeLocale=function(_805){
var _806=_805?_805.toLowerCase():dojo.locale;
if(_806=="root"){
_806="ROOT";
}
return _806;
};
dojo.i18n._requireLocalization=function(_807,_808,_809,_80a){
var _80b=dojo.i18n.normalizeLocale(_809);
var _80c=[_807,"nls",_808].join(".");
var _80d="";
if(_80a){
var _80e=_80a.split(",");
for(var i=0;i<_80e.length;i++){
if(_80b["indexOf"](_80e[i])==0){
if(_80e[i].length>_80d.length){
_80d=_80e[i];
}
}
}
if(!_80d){
_80d="ROOT";
}
}
var _810=_80a?_80d:_80b;
var _811=dojo._loadedModules[_80c];
var _812=null;
if(_811){
if(dojo.config.localizationComplete&&_811._built){
return;
}
var _813=_810.replace(/-/g,"_");
var _814=_80c+"."+_813;
_812=dojo._loadedModules[_814];
}
if(!_812){
_811=dojo["provide"](_80c);
var syms=dojo._getModuleSymbols(_807);
var _816=syms.concat("nls").join("/");
var _817;
dojo.i18n._searchLocalePath(_810,_80a,function(loc){
var _819=loc.replace(/-/g,"_");
var _81a=_80c+"."+_819;
var _81b=false;
if(!dojo._loadedModules[_81a]){
dojo["provide"](_81a);
var _81c=[_816];
if(loc!="ROOT"){
_81c.push(loc);
}
_81c.push(_808);
var _81d=_81c.join("/")+".js";
_81b=dojo._loadPath(_81d,null,function(hash){
var _81f=function(){
};
_81f.prototype=_817;
_811[_819]=new _81f();
for(var j in hash){
_811[_819][j]=hash[j];
}
});
}else{
_81b=true;
}
if(_81b&&_811[_819]){
_817=_811[_819];
}else{
_811[_819]=_817;
}
if(_80a){
return true;
}
});
}
if(_80a&&_80b!=_80d){
_811[_80b.replace(/-/g,"_")]=_811[_80d.replace(/-/g,"_")];
}
};
(function(){
var _821=dojo.config.extraLocale;
if(_821){
if(!_821 instanceof Array){
_821=[_821];
}
var req=dojo.i18n._requireLocalization;
dojo.i18n._requireLocalization=function(m,b,_825,_826){
req(m,b,_825,_826);
if(_825){
return;
}
for(var i=0;i<_821.length;i++){
req(m,b,_821[i],_826);
}
};
}
})();
dojo.i18n._searchLocalePath=function(_828,down,_82a){
_828=dojo.i18n.normalizeLocale(_828);
var _82b=_828.split("-");
var _82c=[];
for(var i=_82b.length;i>0;i--){
_82c.push(_82b.slice(0,i).join("-"));
}
_82c.push(false);
if(down){
_82c.reverse();
}
for(var j=_82c.length-1;j>=0;j--){
var loc=_82c[j]||"ROOT";
var stop=_82a(loc);
if(stop){
break;
}
}
};
dojo.i18n._preloadLocalizations=function(_831,_832){
function preload(_833){
_833=dojo.i18n.normalizeLocale(_833);
dojo.i18n._searchLocalePath(_833,true,function(loc){
for(var i=0;i<_832.length;i++){
if(_832[i]==loc){
dojo["require"](_831+"_"+loc);
return true;
}
}
return false;
});
};
preload();
var _836=dojo.config.extraLocale||[];
for(var i=0;i<_836.length;i++){
preload(_836[i]);
}
};
}
if(!dojo._hasResource["dojo.number"]){
dojo._hasResource["dojo.number"]=true;
dojo.provide("dojo.number");
dojo.number.format=function(_838,_839){
_839=dojo.mixin({},_839||{});
var _83a=dojo.i18n.normalizeLocale(_839.locale);
var _83b=dojo.i18n.getLocalization("dojo.cldr","number",_83a);
_839.customs=_83b;
var _83c=_839.pattern||_83b[(_839.type||"decimal")+"Format"];
if(isNaN(_838)){
return null;
}
return dojo.number._applyPattern(_838,_83c,_839);
};
dojo.number._numberPatternRE=/[#0,]*[#0](?:\.0*#*)?/;
dojo.number._applyPattern=function(_83d,_83e,_83f){
_83f=_83f||{};
var _840=_83f.customs.group;
var _841=_83f.customs.decimal;
var _842=_83e.split(";");
var _843=_842[0];
_83e=_842[(_83d<0)?1:0]||("-"+_843);
if(_83e.indexOf("%")!=-1){
_83d*=100;
}else{
if(_83e.indexOf("‰")!=-1){
_83d*=1000;
}else{
if(_83e.indexOf("¤")!=-1){
_840=_83f.customs.currencyGroup||_840;
_841=_83f.customs.currencyDecimal||_841;
_83e=_83e.replace(/\u00a4{1,3}/,function(_844){
var prop=["symbol","currency","displayName"][_844.length-1];
return _83f[prop]||_83f.currency||"";
});
}else{
if(_83e.indexOf("E")!=-1){
throw new Error("exponential notation not supported");
}
}
}
}
var _846=dojo.number._numberPatternRE;
var _847=_843.match(_846);
if(!_847){
throw new Error("unable to find a number expression in pattern: "+_83e);
}
if(_83f.fractional===false){
_83f.places=0;
}
return _83e.replace(_846,dojo.number._formatAbsolute(_83d,_847[0],{decimal:_841,group:_840,places:_83f.places,round:_83f.round}));
};
dojo.number.round=function(_848,_849,_84a){
var _84b=String(_848).split(".");
var _84c=(_84b[1]&&_84b[1].length)||0;
if(_84c>_849){
var _84d=Math.pow(10,_849);
if(_84a>0){
_84d*=10/_84a;
_849++;
}
_848=Math.round(_848*_84d)/_84d;
_84b=String(_848).split(".");
_84c=(_84b[1]&&_84b[1].length)||0;
if(_84c>_849){
_84b[1]=_84b[1].substr(0,_849);
_848=Number(_84b.join("."));
}
}
return _848;
};
dojo.number._formatAbsolute=function(_84e,_84f,_850){
_850=_850||{};
if(_850.places===true){
_850.places=0;
}
if(_850.places===Infinity){
_850.places=6;
}
var _851=_84f.split(".");
var _852=(_850.places>=0)?_850.places:(_851[1]&&_851[1].length)||0;
if(!(_850.round<0)){
_84e=dojo.number.round(_84e,_852,_850.round);
}
var _853=String(Math.abs(_84e)).split(".");
var _854=_853[1]||"";
if(_850.places){
var _855=dojo.isString(_850.places)&&_850.places.indexOf(",");
if(_855){
_850.places=_850.places.substring(_855+1);
}
_853[1]=dojo.string.pad(_854.substr(0,_850.places),_850.places,"0",true);
}else{
if(_851[1]&&_850.places!==0){
var pad=_851[1].lastIndexOf("0")+1;
if(pad>_854.length){
_853[1]=dojo.string.pad(_854,pad,"0",true);
}
var _857=_851[1].length;
if(_857<_854.length){
_853[1]=_854.substr(0,_857);
}
}else{
if(_853[1]){
_853.pop();
}
}
}
var _858=_851[0].replace(",","");
pad=_858.indexOf("0");
if(pad!=-1){
pad=_858.length-pad;
if(pad>_853[0].length){
_853[0]=dojo.string.pad(_853[0],pad);
}
if(_858.indexOf("#")==-1){
_853[0]=_853[0].substr(_853[0].length-pad);
}
}
var _859=_851[0].lastIndexOf(",");
var _85a,_85b;
if(_859!=-1){
_85a=_851[0].length-_859-1;
var _85c=_851[0].substr(0,_859);
_859=_85c.lastIndexOf(",");
if(_859!=-1){
_85b=_85c.length-_859-1;
}
}
var _85d=[];
for(var _85e=_853[0];_85e;){
var off=_85e.length-_85a;
_85d.push((off>0)?_85e.substr(off):_85e);
_85e=(off>0)?_85e.slice(0,off):"";
if(_85b){
_85a=_85b;
delete _85b;
}
}
_853[0]=_85d.reverse().join(_850.group||",");
return _853.join(_850.decimal||".");
};
dojo.number.regexp=function(_860){
return dojo.number._parseInfo(_860).regexp;
};
dojo.number._parseInfo=function(_861){
_861=_861||{};
var _862=dojo.i18n.normalizeLocale(_861.locale);
var _863=dojo.i18n.getLocalization("dojo.cldr","number",_862);
var _864=_861.pattern||_863[(_861.type||"decimal")+"Format"];
var _865=_863.group;
var _866=_863.decimal;
var _867=1;
if(_864.indexOf("%")!=-1){
_867/=100;
}else{
if(_864.indexOf("‰")!=-1){
_867/=1000;
}else{
var _868=_864.indexOf("¤")!=-1;
if(_868){
_865=_863.currencyGroup||_865;
_866=_863.currencyDecimal||_866;
}
}
}
var _869=_864.split(";");
if(_869.length==1){
_869.push("-"+_869[0]);
}
var re=dojo.regexp.buildGroupRE(_869,function(_86b){
_86b="(?:"+dojo.regexp.escapeString(_86b,".")+")";
return _86b.replace(dojo.number._numberPatternRE,function(_86c){
var _86d={signed:false,separator:_861.strict?_865:[_865,""],fractional:_861.fractional,decimal:_866,exponent:false};
var _86e=_86c.split(".");
var _86f=_861.places;
if(_86e.length==1||_86f===0){
_86d.fractional=false;
}else{
if(_86f===undefined){
_86f=_861.pattern?_86e[1].lastIndexOf("0")+1:Infinity;
}
if(_86f&&_861.fractional==undefined){
_86d.fractional=true;
}
if(!_861.places&&(_86f<_86e[1].length)){
_86f+=","+_86e[1].length;
}
_86d.places=_86f;
}
var _870=_86e[0].split(",");
if(_870.length>1){
_86d.groupSize=_870.pop().length;
if(_870.length>1){
_86d.groupSize2=_870.pop().length;
}
}
return "("+dojo.number._realNumberRegexp(_86d)+")";
});
},true);
if(_868){
re=re.replace(/([\s\xa0]*)(\u00a4{1,3})([\s\xa0]*)/g,function(_871,_872,_873,_874){
var prop=["symbol","currency","displayName"][_873.length-1];
var _876=dojo.regexp.escapeString(_861[prop]||_861.currency||"");
_872=_872?"[\\s\\xa0]":"";
_874=_874?"[\\s\\xa0]":"";
if(!_861.strict){
if(_872){
_872+="*";
}
if(_874){
_874+="*";
}
return "(?:"+_872+_876+_874+")?";
}
return _872+_876+_874;
});
}
return {regexp:re.replace(/[\xa0 ]/g,"[\\s\\xa0]"),group:_865,decimal:_866,factor:_867};
};
dojo.number.parse=function(_877,_878){
var info=dojo.number._parseInfo(_878);
var _87a=(new RegExp("^"+info.regexp+"$")).exec(_877);
if(!_87a){
return NaN;
}
var _87b=_87a[1];
if(!_87a[1]){
if(!_87a[2]){
return NaN;
}
_87b=_87a[2];
info.factor*=-1;
}
_87b=_87b.replace(new RegExp("["+info.group+"\\s\\xa0"+"]","g"),"").replace(info.decimal,".");
return Number(_87b)*info.factor;
};
dojo.number._realNumberRegexp=function(_87c){
_87c=_87c||{};
if(!("places" in _87c)){
_87c.places=Infinity;
}
if(typeof _87c.decimal!="string"){
_87c.decimal=".";
}
if(!("fractional" in _87c)||/^0/.test(_87c.places)){
_87c.fractional=[true,false];
}
if(!("exponent" in _87c)){
_87c.exponent=[true,false];
}
if(!("eSigned" in _87c)){
_87c.eSigned=[true,false];
}
var _87d=dojo.number._integerRegexp(_87c);
var _87e=dojo.regexp.buildGroupRE(_87c.fractional,function(q){
var re="";
if(q&&(_87c.places!==0)){
re="\\"+_87c.decimal;
if(_87c.places==Infinity){
re="(?:"+re+"\\d+)?";
}else{
re+="\\d{"+_87c.places+"}";
}
}
return re;
},true);
var _881=dojo.regexp.buildGroupRE(_87c.exponent,function(q){
if(q){
return "([eE]"+dojo.number._integerRegexp({signed:_87c.eSigned})+")";
}
return "";
});
var _883=_87d+_87e;
if(_87e){
_883="(?:(?:"+_883+")|(?:"+_87e+"))";
}
return _883+_881;
};
dojo.number._integerRegexp=function(_884){
_884=_884||{};
if(!("signed" in _884)){
_884.signed=[true,false];
}
if(!("separator" in _884)){
_884.separator="";
}else{
if(!("groupSize" in _884)){
_884.groupSize=3;
}
}
var _885=dojo.regexp.buildGroupRE(_884.signed,function(q){
return q?"[-+]":"";
},true);
var _887=dojo.regexp.buildGroupRE(_884.separator,function(sep){
if(!sep){
return "(?:0|[1-9]\\d*)";
}
sep=dojo.regexp.escapeString(sep);
if(sep==" "){
sep="\\s";
}else{
if(sep==" "){
sep="\\s\\xa0";
}
}
var grp=_884.groupSize,grp2=_884.groupSize2;
if(grp2){
var _88b="(?:0|[1-9]\\d{0,"+(grp2-1)+"}(?:["+sep+"]\\d{"+grp2+"})*["+sep+"]\\d{"+grp+"})";
return ((grp-grp2)>0)?"(?:"+_88b+"|(?:0|[1-9]\\d{0,"+(grp-1)+"}))":_88b;
}
return "(?:0|[1-9]\\d{0,"+(grp-1)+"}(?:["+sep+"]\\d{"+grp+"})*)";
},true);
return _885+_887;
};
}
if(!dojo._hasResource["dijit.form.Slider"]){
dojo._hasResource["dijit.form.Slider"]=true;
dojo.provide("dijit.form.Slider");
dojo.declare("dijit.form.HorizontalSlider",[dijit.form._FormValueWidget,dijit._Container],{templateString:"<table class=\"dijit dijitReset dijitSlider\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\" rules=\"none\" dojoAttachEvent=\"onkeypress:_onKeyPress\"\r\n\t><tr class=\"dijitReset\"\r\n\t\t><td class=\"dijitReset\" colspan=\"2\"></td\r\n\t\t><td dojoAttachPoint=\"containerNode,topDecoration\" class=\"dijitReset\" style=\"text-align:center;width:100%;\"></td\r\n\t\t><td class=\"dijitReset\" colspan=\"2\"></td\r\n\t></tr\r\n\t><tr class=\"dijitReset\"\r\n\t\t><td class=\"dijitReset dijitSliderButtonContainer dijitSliderButtonContainerH\"\r\n\t\t\t><div class=\"dijitSliderDecrementIconH\" tabIndex=\"-1\" style=\"display:none\" dojoAttachPoint=\"decrementButton\"><span class=\"dijitSliderButtonInner\">-</span></div\r\n\t\t></td\r\n\t\t><td class=\"dijitReset\"\r\n\t\t\t><div class=\"dijitSliderBar dijitSliderBumper dijitSliderBumperH dijitSliderLeftBumper dijitSliderLeftBumper\" dojoAttachEvent=\"onclick:_onClkDecBumper\"></div\r\n\t\t></td\r\n\t\t><td class=\"dijitReset\"\r\n\t\t\t><input dojoAttachPoint=\"valueNode\" type=\"hidden\" name=\"${name}\"\r\n\t\t\t/><div class=\"dijitReset dijitSliderBarContainerH\" waiRole=\"presentation\" dojoAttachPoint=\"sliderBarContainer\"\r\n\t\t\t\t><div waiRole=\"presentation\" dojoAttachPoint=\"progressBar\" class=\"dijitSliderBar dijitSliderBarH dijitSliderProgressBar dijitSliderProgressBarH\" dojoAttachEvent=\"onclick:_onBarClick\"\r\n\t\t\t\t\t><div class=\"dijitSliderMoveable dijitSliderMoveableH\" \r\n\t\t\t\t\t\t><div dojoAttachPoint=\"sliderHandle,focusNode\" class=\"dijitSliderImageHandle dijitSliderImageHandleH\" dojoAttachEvent=\"onmousedown:_onHandleClick\" waiRole=\"slider\" valuemin=\"${minimum}\" valuemax=\"${maximum}\"></div\r\n\t\t\t\t\t></div\r\n\t\t\t\t></div\r\n\t\t\t\t><div waiRole=\"presentation\" dojoAttachPoint=\"remainingBar\" class=\"dijitSliderBar dijitSliderBarH dijitSliderRemainingBar dijitSliderRemainingBarH\" dojoAttachEvent=\"onclick:_onBarClick\"></div\r\n\t\t\t></div\r\n\t\t></td\r\n\t\t><td class=\"dijitReset\"\r\n\t\t\t><div class=\"dijitSliderBar dijitSliderBumper dijitSliderBumperH dijitSliderRightBumper dijitSliderRightBumper\" dojoAttachEvent=\"onclick:_onClkIncBumper\"></div\r\n\t\t></td\r\n\t\t><td class=\"dijitReset dijitSliderButtonContainer dijitSliderButtonContainerH\" style=\"right:0px;\"\r\n\t\t\t><div class=\"dijitSliderIncrementIconH\" tabIndex=\"-1\" style=\"display:none\" dojoAttachPoint=\"incrementButton\"><span class=\"dijitSliderButtonInner\">+</span></div\r\n\t\t></td\r\n\t></tr\r\n\t><tr class=\"dijitReset\"\r\n\t\t><td class=\"dijitReset\" colspan=\"2\"></td\r\n\t\t><td dojoAttachPoint=\"containerNode,bottomDecoration\" class=\"dijitReset\" style=\"text-align:center;\"></td\r\n\t\t><td class=\"dijitReset\" colspan=\"2\"></td\r\n\t></tr\r\n></table>\r\n",value:0,showButtons:true,minimum:0,maximum:100,discreteValues:Infinity,pageIncrement:2,clickSelect:true,slideDuration:dijit.defaultDuration,widgetsInTemplate:true,attributeMap:dojo.mixin(dojo.clone(dijit.form._FormWidget.prototype.attributeMap),{id:"",name:"valueNode"}),baseClass:"dijitSlider",_mousePixelCoord:"pageX",_pixelCount:"w",_startingPixelCoord:"x",_startingPixelCount:"l",_handleOffsetCoord:"left",_progressPixelSize:"width",_onKeyPress:function(e){
if(this.disabled||this.readOnly||e.altKey||e.ctrlKey){
return;
}
switch(e.charOrCode){
case dojo.keys.HOME:
this._setValueAttr(this.minimum,true);
break;
case dojo.keys.END:
this._setValueAttr(this.maximum,true);
break;
case ((this._descending||this.isLeftToRight())?dojo.keys.RIGHT_ARROW:dojo.keys.LEFT_ARROW):
case (this._descending===false?dojo.keys.DOWN_ARROW:dojo.keys.UP_ARROW):
case (this._descending===false?dojo.keys.PAGE_DOWN:dojo.keys.PAGE_UP):
this.increment(e);
break;
case ((this._descending||this.isLeftToRight())?dojo.keys.LEFT_ARROW:dojo.keys.RIGHT_ARROW):
case (this._descending===false?dojo.keys.UP_ARROW:dojo.keys.DOWN_ARROW):
case (this._descending===false?dojo.keys.PAGE_UP:dojo.keys.PAGE_DOWN):
this.decrement(e);
break;
default:
this.inherited(arguments);
return;
}
dojo.stopEvent(e);
},_onHandleClick:function(e){
if(this.disabled||this.readOnly){
return;
}
if(!dojo.isIE){
dijit.focus(this.sliderHandle);
}
dojo.stopEvent(e);
},_isReversed:function(){
return !this.isLeftToRight();
},_onBarClick:function(e){
if(this.disabled||this.readOnly||!this.clickSelect){
return;
}
dijit.focus(this.sliderHandle);
dojo.stopEvent(e);
var _88f=dojo.coords(this.sliderBarContainer,true);
var _890=e[this._mousePixelCoord]-_88f[this._startingPixelCoord];
this._setPixelValue(this._isReversed()?(_88f[this._pixelCount]-_890):_890,_88f[this._pixelCount],true);
},_setPixelValue:function(_891,_892,_893){
if(this.disabled||this.readOnly){
return;
}
_891=_891<0?0:_892<_891?_892:_891;
var _894=this.discreteValues;
if(_894<=1||_894==Infinity){
_894=_892;
}
_894--;
var _895=_892/_894;
var _896=Math.round(_891/_895);
this._setValueAttr((this.maximum-this.minimum)*_896/_894+this.minimum,_893);
},_setValueAttr:function(_897,_898){
this.valueNode.value=this.value=_897;
dijit.setWaiState(this.focusNode,"valuenow",_897);
this.inherited(arguments);
var _899=(_897-this.minimum)/(this.maximum-this.minimum);
var _89a=(this._descending===false)?this.remainingBar:this.progressBar;
var _89b=(this._descending===false)?this.progressBar:this.remainingBar;
if(this._inProgressAnim&&this._inProgressAnim.status!="stopped"){
this._inProgressAnim.stop(true);
}
if(_898&&this.slideDuration>0&&_89a.style[this._progressPixelSize]){
var _89c=this;
var _89d={};
var _89e=parseFloat(_89a.style[this._progressPixelSize]);
var _89f=this.slideDuration*(_899-_89e/100);
if(_89f==0){
return;
}
if(_89f<0){
_89f=0-_89f;
}
_89d[this._progressPixelSize]={start:_89e,end:_899*100,units:"%"};
this._inProgressAnim=dojo.animateProperty({node:_89a,duration:_89f,onAnimate:function(v){
_89b.style[_89c._progressPixelSize]=(100-parseFloat(v[_89c._progressPixelSize]))+"%";
},onEnd:function(){
delete _89c._inProgressAnim;
},properties:_89d});
this._inProgressAnim.play();
}else{
_89a.style[this._progressPixelSize]=(_899*100)+"%";
_89b.style[this._progressPixelSize]=((1-_899)*100)+"%";
}
},_bumpValue:function(_8a1){
if(this.disabled||this.readOnly){
return;
}
var s=dojo.getComputedStyle(this.sliderBarContainer);
var c=dojo._getContentBox(this.sliderBarContainer,s);
var _8a4=this.discreteValues;
if(_8a4<=1||_8a4==Infinity){
_8a4=c[this._pixelCount];
}
_8a4--;
var _8a5=(this.value-this.minimum)*_8a4/(this.maximum-this.minimum)+_8a1;
if(_8a5<0){
_8a5=0;
}
if(_8a5>_8a4){
_8a5=_8a4;
}
_8a5=_8a5*(this.maximum-this.minimum)/_8a4+this.minimum;
this._setValueAttr(_8a5,true);
},_onClkIncBumper:function(){
this._setValueAttr(this._descending===false?this.minimum:this.maximum,true);
},_onClkDecBumper:function(){
this._setValueAttr(this._descending===false?this.maximum:this.minimum,true);
},decrement:function(e){
this._bumpValue(e.charOrCode==dojo.keys.PAGE_DOWN?-this.pageIncrement:-1);
},increment:function(e){
this._bumpValue(e.charOrCode==dojo.keys.PAGE_UP?this.pageIncrement:1);
},_mouseWheeled:function(evt){
dojo.stopEvent(evt);
var _8a9=!dojo.isMozilla;
var _8aa=evt[(_8a9?"wheelDelta":"detail")]*(_8a9?1:-1);
this[(_8aa<0?"decrement":"increment")](evt);
},startup:function(){
dojo.forEach(this.getChildren(),function(_8ab){
if(this[_8ab.container]!=this.containerNode){
this[_8ab.container].appendChild(_8ab.domNode);
}
},this);
},_typematicCallback:function(_8ac,_8ad,e){
if(_8ac==-1){
return;
}
this[(_8ad==(this._descending?this.incrementButton:this.decrementButton))?"decrement":"increment"](e);
},postCreate:function(){
if(this.showButtons){
this.incrementButton.style.display="";
this.decrementButton.style.display="";
this._connects.push(dijit.typematic.addMouseListener(this.decrementButton,this,"_typematicCallback",25,500));
this._connects.push(dijit.typematic.addMouseListener(this.incrementButton,this,"_typematicCallback",25,500));
}
this.connect(this.domNode,!dojo.isMozilla?"onmousewheel":"DOMMouseScroll","_mouseWheeled");
var _8af=this;
var _8b0=function(){
dijit.form._SliderMover.apply(this,arguments);
this.widget=_8af;
};
dojo.extend(_8b0,dijit.form._SliderMover.prototype);
this._movable=new dojo.dnd.Moveable(this.sliderHandle,{mover:_8b0});
var _8b1=dojo.query("label[for=\""+this.id+"\"]");
if(_8b1.length){
_8b1[0].id=(this.id+"_label");
dijit.setWaiState(this.focusNode,"labelledby",_8b1[0].id);
}
dijit.setWaiState(this.focusNode,"valuemin",this.minimum);
dijit.setWaiState(this.focusNode,"valuemax",this.maximum);
this.inherited(arguments);
},destroy:function(){
this._movable.destroy();
if(this._inProgressAnim&&this._inProgressAnim.status!="stopped"){
this._inProgressAnim.stop(true);
}
this.inherited(arguments);
}});
dojo.declare("dijit.form.VerticalSlider",dijit.form.HorizontalSlider,{templateString:"<table class=\"dijitReset dijitSlider\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\" rules=\"none\" dojoAttachEvent=\"onkeypress:_onKeyPress\"\r\n><tbody class=\"dijitReset\"\r\n\t><tr class=\"dijitReset\"\r\n\t\t><td class=\"dijitReset\"></td\r\n\t\t><td class=\"dijitReset dijitSliderButtonContainer dijitSliderButtonContainerV\"\r\n\t\t\t><div class=\"dijitSliderIncrementIconV\" tabIndex=\"-1\" style=\"display:none\" dojoAttachPoint=\"decrementButton\"><span class=\"dijitSliderButtonInner\">+</span></div\r\n\t\t></td\r\n\t\t><td class=\"dijitReset\"></td\r\n\t></tr\r\n\t><tr class=\"dijitReset\"\r\n\t\t><td class=\"dijitReset\"></td\r\n\t\t><td class=\"dijitReset\"\r\n\t\t\t><center><div class=\"dijitSliderBar dijitSliderBumper dijitSliderBumperV dijitSliderTopBumper dijitSliderTopBumper\" dojoAttachEvent=\"onclick:_onClkIncBumper\"></div></center\r\n\t\t></td\r\n\t\t><td class=\"dijitReset\"></td\r\n\t></tr\r\n\t><tr class=\"dijitReset\"\r\n\t\t><td dojoAttachPoint=\"leftDecoration\" class=\"dijitReset\" style=\"text-align:center;height:100%;\"></td\r\n\t\t><td class=\"dijitReset\" style=\"height:100%;\"\r\n\t\t\t><input dojoAttachPoint=\"valueNode\" type=\"hidden\" name=\"${name}\"\r\n\t\t\t/><center class=\"dijitReset dijitSliderBarContainerV\" waiRole=\"presentation\" dojoAttachPoint=\"sliderBarContainer\"\r\n\t\t\t\t><div waiRole=\"presentation\" dojoAttachPoint=\"remainingBar\" class=\"dijitSliderBar dijitSliderBarV dijitSliderRemainingBar dijitSliderRemainingBarV\" dojoAttachEvent=\"onclick:_onBarClick\"><!--#5629--></div\r\n\t\t\t\t><div waiRole=\"presentation\" dojoAttachPoint=\"progressBar\" class=\"dijitSliderBar dijitSliderBarV dijitSliderProgressBar dijitSliderProgressBarV\" dojoAttachEvent=\"onclick:_onBarClick\"\r\n\t\t\t\t\t><div class=\"dijitSliderMoveable\" style=\"vertical-align:top;\" \r\n\t\t\t\t\t\t><div dojoAttachPoint=\"sliderHandle,focusNode\" class=\"dijitSliderImageHandle dijitSliderImageHandleV\" dojoAttachEvent=\"onmousedown:_onHandleClick\" waiRole=\"slider\" valuemin=\"${minimum}\" valuemax=\"${maximum}\"></div\r\n\t\t\t\t\t></div\r\n\t\t\t\t></div\r\n\t\t\t></center\r\n\t\t></td\r\n\t\t><td dojoAttachPoint=\"containerNode,rightDecoration\" class=\"dijitReset\" style=\"text-align:center;height:100%;\"></td\r\n\t></tr\r\n\t><tr class=\"dijitReset\"\r\n\t\t><td class=\"dijitReset\"></td\r\n\t\t><td class=\"dijitReset\"\r\n\t\t\t><center><div class=\"dijitSliderBar dijitSliderBumper dijitSliderBumperV dijitSliderBottomBumper dijitSliderBottomBumper\" dojoAttachEvent=\"onclick:_onClkDecBumper\"></div></center\r\n\t\t></td\r\n\t\t><td class=\"dijitReset\"></td\r\n\t></tr\r\n\t><tr class=\"dijitReset\"\r\n\t\t><td class=\"dijitReset\"></td\r\n\t\t><td class=\"dijitReset dijitSliderButtonContainer dijitSliderButtonContainerV\"\r\n\t\t\t><div class=\"dijitSliderDecrementIconV\" tabIndex=\"-1\" style=\"display:none\" dojoAttachPoint=\"incrementButton\"><span class=\"dijitSliderButtonInner\">-</span></div\r\n\t\t></td\r\n\t\t><td class=\"dijitReset\"></td\r\n\t></tr\r\n></tbody></table>\r\n",_mousePixelCoord:"pageY",_pixelCount:"h",_startingPixelCoord:"y",_startingPixelCount:"t",_handleOffsetCoord:"top",_progressPixelSize:"height",_descending:true,startup:function(){
if(this._started){
return;
}
if(!this.isLeftToRight()&&dojo.isMoz){
if(this.leftDecoration){
this._rtlRectify(this.leftDecoration);
}
if(this.rightDecoration){
this._rtlRectify(this.rightDecoration);
}
}
this.inherited(arguments);
},_isReversed:function(){
return this._descending;
},_rtlRectify:function(_8b2){
var _8b3=[];
while(_8b2.firstChild){
_8b3.push(_8b2.firstChild);
_8b2.removeChild(_8b2.firstChild);
}
for(var i=_8b3.length-1;i>=0;i--){
if(_8b3[i]){
_8b2.appendChild(_8b3[i]);
}
}
}});
dojo.declare("dijit.form._SliderMover",dojo.dnd.Mover,{onMouseMove:function(e){
var _8b6=this.widget;
var _8b7=_8b6._abspos;
if(!_8b7){
_8b7=_8b6._abspos=dojo.coords(_8b6.sliderBarContainer,true);
_8b6._setPixelValue_=dojo.hitch(_8b6,"_setPixelValue");
_8b6._isReversed_=_8b6._isReversed();
}
var _8b8=e[_8b6._mousePixelCoord]-_8b7[_8b6._startingPixelCoord];
_8b6._setPixelValue_(_8b6._isReversed_?(_8b7[_8b6._pixelCount]-_8b8):_8b8,_8b7[_8b6._pixelCount],false);
},destroy:function(e){
dojo.dnd.Mover.prototype.destroy.apply(this,arguments);
var _8ba=this.widget;
_8ba._abspos=null;
_8ba._setValueAttr(_8ba.value,true);
}});
dojo.declare("dijit.form.HorizontalRule",[dijit._Widget,dijit._Templated],{templateString:"<div class=\"dijitRuleContainer dijitRuleContainerH\"></div>",count:3,container:"containerNode",ruleStyle:"",_positionPrefix:"<div class=\"dijitRuleMark dijitRuleMarkH\" style=\"left:",_positionSuffix:"%;",_suffix:"\"></div>",_genHTML:function(pos,ndx){
return this._positionPrefix+pos+this._positionSuffix+this.ruleStyle+this._suffix;
},_isHorizontal:true,postCreate:function(){
var _8bd;
if(this.count==1){
_8bd=this._genHTML(50,0);
}else{
var i;
var _8bf=100/(this.count-1);
if(!this._isHorizontal||this.isLeftToRight()){
_8bd=this._genHTML(0,0);
for(i=1;i<this.count-1;i++){
_8bd+=this._genHTML(_8bf*i,i);
}
_8bd+=this._genHTML(100,this.count-1);
}else{
_8bd=this._genHTML(100,0);
for(i=1;i<this.count-1;i++){
_8bd+=this._genHTML(100-_8bf*i,i);
}
_8bd+=this._genHTML(0,this.count-1);
}
}
this.domNode.innerHTML=_8bd;
}});
dojo.declare("dijit.form.VerticalRule",dijit.form.HorizontalRule,{templateString:"<div class=\"dijitRuleContainer dijitRuleContainerV\"></div>",_positionPrefix:"<div class=\"dijitRuleMark dijitRuleMarkV\" style=\"top:",_isHorizontal:false});
dojo.declare("dijit.form.HorizontalRuleLabels",dijit.form.HorizontalRule,{templateString:"<div class=\"dijitRuleContainer dijitRuleContainerH dijitRuleLabelsContainer dijitRuleLabelsContainerH\"></div>",labelStyle:"",labels:[],numericMargin:0,minimum:0,maximum:1,constraints:{pattern:"#%"},_positionPrefix:"<div class=\"dijitRuleLabelContainer dijitRuleLabelContainerH\" style=\"left:",_labelPrefix:"\"><span class=\"dijitRuleLabel dijitRuleLabelH\">",_suffix:"</span></div>",_calcPosition:function(pos){
return pos;
},_genHTML:function(pos,ndx){
return this._positionPrefix+this._calcPosition(pos)+this._positionSuffix+this.labelStyle+this._labelPrefix+this.labels[ndx]+this._suffix;
},getLabels:function(){
var _8c3=this.labels;
if(!_8c3.length){
_8c3=dojo.query("> li",this.srcNodeRef).map(function(node){
return String(node.innerHTML);
});
}
this.srcNodeRef.innerHTML="";
if(!_8c3.length&&this.count>1){
var _8c5=this.minimum;
var inc=(this.maximum-_8c5)/(this.count-1);
for(var i=0;i<this.count;i++){
_8c3.push((i<this.numericMargin||i>=(this.count-this.numericMargin))?"":dojo.number.format(_8c5,this.constraints));
_8c5+=inc;
}
}
return _8c3;
},postMixInProperties:function(){
this.inherited(arguments);
this.labels=this.getLabels();
this.count=this.labels.length;
}});
dojo.declare("dijit.form.VerticalRuleLabels",dijit.form.HorizontalRuleLabels,{templateString:"<div class=\"dijitRuleContainer dijitRuleContainerV dijitRuleLabelsContainer dijitRuleLabelsContainerV\"></div>",_positionPrefix:"<div class=\"dijitRuleLabelContainer dijitRuleLabelContainerV\" style=\"top:",_labelPrefix:"\"><span class=\"dijitRuleLabel dijitRuleLabelV\">",_calcPosition:function(pos){
return 100-pos;
},_isHorizontal:false});
}
if(!dojo._hasResource["dojo.date"]){
dojo._hasResource["dojo.date"]=true;
dojo.provide("dojo.date");
dojo.date.getDaysInMonth=function(_8c9){
var _8ca=_8c9.getMonth();
var days=[31,28,31,30,31,30,31,31,30,31,30,31];
if(_8ca==1&&dojo.date.isLeapYear(_8c9)){
return 29;
}
return days[_8ca];
};
dojo.date.isLeapYear=function(_8cc){
var year=_8cc.getFullYear();
return !(year%400)||(!(year%4)&&!!(year%100));
};
dojo.date.getTimezoneName=function(_8ce){
var str=_8ce.toString();
var tz="";
var _8d1;
var pos=str.indexOf("(");
if(pos>-1){
tz=str.substring(++pos,str.indexOf(")"));
}else{
var pat=/([A-Z\/]+) \d{4}$/;
if((_8d1=str.match(pat))){
tz=_8d1[1];
}else{
str=_8ce.toLocaleString();
pat=/ ([A-Z\/]+)$/;
if((_8d1=str.match(pat))){
tz=_8d1[1];
}
}
}
return (tz=="AM"||tz=="PM")?"":tz;
};
dojo.date.compare=function(_8d4,_8d5,_8d6){
_8d4=new Date(Number(_8d4));
_8d5=new Date(Number(_8d5||new Date()));
if(_8d6!=="undefined"){
if(_8d6=="date"){
_8d4.setHours(0,0,0,0);
_8d5.setHours(0,0,0,0);
}else{
if(_8d6=="time"){
_8d4.setFullYear(0,0,0);
_8d5.setFullYear(0,0,0);
}
}
}
if(_8d4>_8d5){
return 1;
}
if(_8d4<_8d5){
return -1;
}
return 0;
};
dojo.date.add=function(date,_8d8,_8d9){
var sum=new Date(Number(date));
var _8db=false;
var _8dc="Date";
switch(_8d8){
case "day":
break;
case "weekday":
var days,_8de;
var mod=_8d9%5;
if(!mod){
days=(_8d9>0)?5:-5;
_8de=(_8d9>0)?((_8d9-5)/5):((_8d9+5)/5);
}else{
days=mod;
_8de=parseInt(_8d9/5);
}
var strt=date.getDay();
var adj=0;
if(strt==6&&_8d9>0){
adj=1;
}else{
if(strt==0&&_8d9<0){
adj=-1;
}
}
var trgt=strt+days;
if(trgt==0||trgt==6){
adj=(_8d9>0)?2:-2;
}
_8d9=(7*_8de)+days+adj;
break;
case "year":
_8dc="FullYear";
_8db=true;
break;
case "week":
_8d9*=7;
break;
case "quarter":
_8d9*=3;
case "month":
_8db=true;
_8dc="Month";
break;
case "hour":
case "minute":
case "second":
case "millisecond":
_8dc="UTC"+_8d8.charAt(0).toUpperCase()+_8d8.substring(1)+"s";
}
if(_8dc){
sum["set"+_8dc](sum["get"+_8dc]()+_8d9);
}
if(_8db&&(sum.getDate()<date.getDate())){
sum.setDate(0);
}
return sum;
};
dojo.date.difference=function(_8e3,_8e4,_8e5){
_8e4=_8e4||new Date();
_8e5=_8e5||"day";
var _8e6=_8e4.getFullYear()-_8e3.getFullYear();
var _8e7=1;
switch(_8e5){
case "quarter":
var m1=_8e3.getMonth();
var m2=_8e4.getMonth();
var q1=Math.floor(m1/3)+1;
var q2=Math.floor(m2/3)+1;
q2+=(_8e6*4);
_8e7=q2-q1;
break;
case "weekday":
var days=Math.round(dojo.date.difference(_8e3,_8e4,"day"));
var _8ed=parseInt(dojo.date.difference(_8e3,_8e4,"week"));
var mod=days%7;
if(mod==0){
days=_8ed*5;
}else{
var adj=0;
var aDay=_8e3.getDay();
var bDay=_8e4.getDay();
_8ed=parseInt(days/7);
mod=days%7;
var _8f2=new Date(_8e3);
_8f2.setDate(_8f2.getDate()+(_8ed*7));
var _8f3=_8f2.getDay();
if(days>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 (_8f3+mod)>5:
adj=-2;
}
}else{
if(days<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 (_8f3+mod)<0:
adj=2;
}
}
}
days+=adj;
days-=(_8ed*2);
}
_8e7=days;
break;
case "year":
_8e7=_8e6;
break;
case "month":
_8e7=(_8e4.getMonth()-_8e3.getMonth())+(_8e6*12);
break;
case "week":
_8e7=parseInt(dojo.date.difference(_8e3,_8e4,"day")/7);
break;
case "day":
_8e7/=24;
case "hour":
_8e7/=60;
case "minute":
_8e7/=60;
case "second":
_8e7/=1000;
case "millisecond":
_8e7*=_8e4.getTime()-_8e3.getTime();
}
return Math.round(_8e7);
};
}
if(!dojo._hasResource["dojo.cldr.supplemental"]){
dojo._hasResource["dojo.cldr.supplemental"]=true;
dojo.provide("dojo.cldr.supplemental");
dojo.cldr.supplemental.getFirstDayOfWeek=function(_8f4){
var _8f5={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,sy:4};
var _8f6=dojo.cldr.supplemental._region(_8f4);
var dow=_8f5[_8f6];
return (dow===undefined)?1:dow;
};
dojo.cldr.supplemental._region=function(_8f8){
_8f8=dojo.i18n.normalizeLocale(_8f8);
var tags=_8f8.split("-");
var _8fa=tags[1];
if(!_8fa){
_8fa={de:"de",en:"us",es:"es",fi:"fi",fr:"fr",he:"il",hu:"hu",it:"it",ja:"jp",ko:"kr",nl:"nl",pt:"br",sv:"se",zh:"cn"}[tags[0]];
}else{
if(_8fa.length==4){
_8fa=tags[2];
}
}
return _8fa;
};
dojo.cldr.supplemental.getWeekend=function(_8fb){
var _8fc={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 _8fd={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};
var _8fe=dojo.cldr.supplemental._region(_8fb);
var _8ff=_8fc[_8fe];
var end=_8fd[_8fe];
if(_8ff===undefined){
_8ff=6;
}
if(end===undefined){
end=0;
}
return {start:_8ff,end:end};
};
}
if(!dojo._hasResource["dojo.date.locale"]){
dojo._hasResource["dojo.date.locale"]=true;
dojo.provide("dojo.date.locale");
(function(){
function formatPattern(_901,_902,_903,_904){
return _904.replace(/([a-z])\1*/ig,function(_905){
var s,pad;
var c=_905.charAt(0);
var l=_905.length;
var _90a=["abbr","wide","narrow"];
switch(c){
case "G":
s=_902[(l<4)?"eraAbbr":"eraNames"][_901.getFullYear()<0?0:1];
break;
case "y":
s=_901.getFullYear();
switch(l){
case 1:
break;
case 2:
if(!_903){
s=String(s);
s=s.substr(s.length-2);
break;
}
default:
pad=true;
}
break;
case "Q":
case "q":
s=Math.ceil((_901.getMonth()+1)/3);
pad=true;
break;
case "M":
var m=_901.getMonth();
if(l<3){
s=m+1;
pad=true;
}else{
var _90c=["months","format",_90a[l-3]].join("-");
s=_902[_90c][m];
}
break;
case "w":
var _90d=0;
s=dojo.date.locale._getWeekOfYear(_901,_90d);
pad=true;
break;
case "d":
s=_901.getDate();
pad=true;
break;
case "D":
s=dojo.date.locale._getDayOfYear(_901);
pad=true;
break;
case "E":
var d=_901.getDay();
if(l<3){
s=d+1;
pad=true;
}else{
var _90f=["days","format",_90a[l-3]].join("-");
s=_902[_90f][d];
}
break;
case "a":
var _910=(_901.getHours()<12)?"am":"pm";
s=_902[_910];
break;
case "h":
case "H":
case "K":
case "k":
var h=_901.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=_901.getMinutes();
pad=true;
break;
case "s":
s=_901.getSeconds();
pad=true;
break;
case "S":
s=Math.round(_901.getMilliseconds()*Math.pow(10,l-3));
pad=true;
break;
case "v":
case "z":
s=dojo.date.getTimezoneName(_901);
if(s){
break;
}
l=4;
case "Z":
var _912=_901.getTimezoneOffset();
var tz=[(_912<=0?"+":"-"),dojo.string.pad(Math.floor(Math.abs(_912)/60),2),dojo.string.pad(Math.abs(_912)%60,2)];
if(l==4){
tz.splice(0,0,"GMT");
tz.splice(3,0,":");
}
s=tz.join("");
break;
default:
throw new Error("dojo.date.locale.format: invalid pattern char: "+_904);
}
if(pad){
s=dojo.string.pad(s,l);
}
return s;
});
};
dojo.date.locale.format=function(_914,_915){
_915=_915||{};
var _916=dojo.i18n.normalizeLocale(_915.locale);
var _917=_915.formatLength||"short";
var _918=dojo.date.locale._getGregorianBundle(_916);
var str=[];
var _91a=dojo.hitch(this,formatPattern,_914,_918,_915.fullYear);
if(_915.selector=="year"){
var year=_914.getFullYear();
if(_916.match(/^zh|^ja/)){
year+="年";
}
return year;
}
if(_915.selector!="time"){
var _91c=_915.datePattern||_918["dateFormat-"+_917];
if(_91c){
str.push(_processPattern(_91c,_91a));
}
}
if(_915.selector!="date"){
var _91d=_915.timePattern||_918["timeFormat-"+_917];
if(_91d){
str.push(_processPattern(_91d,_91a));
}
}
var _91e=str.join(" ");
return _91e;
};
dojo.date.locale.regexp=function(_91f){
return dojo.date.locale._parseInfo(_91f).regexp;
};
dojo.date.locale._parseInfo=function(_920){
_920=_920||{};
var _921=dojo.i18n.normalizeLocale(_920.locale);
var _922=dojo.date.locale._getGregorianBundle(_921);
var _923=_920.formatLength||"short";
var _924=_920.datePattern||_922["dateFormat-"+_923];
var _925=_920.timePattern||_922["timeFormat-"+_923];
var _926;
if(_920.selector=="date"){
_926=_924;
}else{
if(_920.selector=="time"){
_926=_925;
}else{
_926=_924+" "+_925;
}
}
var _927=[];
var re=_processPattern(_926,dojo.hitch(this,_buildDateTimeRE,_927,_922,_920));
return {regexp:re,tokens:_927,bundle:_922};
};
dojo.date.locale.parse=function(_929,_92a){
var info=dojo.date.locale._parseInfo(_92a);
var _92c=info.tokens,_92d=info.bundle;
var re=new RegExp("^"+info.regexp+"$",info.strict?"":"i");
var _92f=re.exec(_929);
if(!_92f){
return null;
}
var _930=["abbr","wide","narrow"];
var _931=[1970,0,1,0,0,0,0];
var amPm="";
var _933=dojo.every(_92f,function(v,i){
if(!i){
return true;
}
var _936=_92c[i-1];
var l=_936.length;
switch(_936.charAt(0)){
case "y":
if(l!=2&&_92a.strict){
_931[0]=v;
}else{
if(v<100){
v=Number(v);
var year=""+new Date().getFullYear();
var _939=year.substring(0,2)*100;
var _93a=Math.min(Number(year.substring(2,4))+20,99);
var num=(v<_93a)?_939+v:_939-100+v;
_931[0]=num;
}else{
if(_92a.strict){
return false;
}
_931[0]=v;
}
}
break;
case "M":
if(l>2){
var _93c=_92d["months-format-"+_930[l-3]].concat();
if(!_92a.strict){
v=v.replace(".","").toLowerCase();
_93c=dojo.map(_93c,function(s){
return s.replace(".","").toLowerCase();
});
}
v=dojo.indexOf(_93c,v);
if(v==-1){
return false;
}
}else{
v--;
}
_931[1]=v;
break;
case "E":
case "e":
var days=_92d["days-format-"+_930[l-3]].concat();
if(!_92a.strict){
v=v.toLowerCase();
days=dojo.map(days,function(d){
return d.toLowerCase();
});
}
v=dojo.indexOf(days,v);
if(v==-1){
return false;
}
break;
case "D":
_931[1]=0;
case "d":
_931[2]=v;
break;
case "a":
var am=_92a.am||_92d.am;
var pm=_92a.pm||_92d.pm;
if(!_92a.strict){
var _942=/\./g;
v=v.replace(_942,"").toLowerCase();
am=am.replace(_942,"").toLowerCase();
pm=pm.replace(_942,"").toLowerCase();
}
if(_92a.strict&&v!=am&&v!=pm){
return false;
}
amPm=(v==pm)?"p":(v==am)?"a":"";
break;
case "K":
if(v==24){
v=0;
}
case "h":
case "H":
case "k":
if(v>23){
return false;
}
_931[3]=v;
break;
case "m":
_931[4]=v;
break;
case "s":
_931[5]=v;
break;
case "S":
_931[6]=v;
}
return true;
});
var _943=+_931[3];
if(amPm==="p"&&_943<12){
_931[3]=_943+12;
}else{
if(amPm==="a"&&_943==12){
_931[3]=0;
}
}
var _944=new Date(_931[0],_931[1],_931[2],_931[3],_931[4],_931[5],_931[6]);
if(_92a.strict){
_944.setFullYear(_931[0]);
}
var _945=_92c.join(""),_946=_945.indexOf("d")!=-1,_947=_945.indexOf("M")!=-1;
if(!_933||(_947&&_944.getMonth()>_931[1])||(_946&&_944.getDate()>_931[2])){
return null;
}
if((_947&&_944.getMonth()<_931[1])||(_946&&_944.getDate()<_931[2])){
_944=dojo.date.add(_944,"hour",1);
}
return _944;
};
function _processPattern(_948,_949,_94a,_94b){
var _94c=function(x){
return x;
};
_949=_949||_94c;
_94a=_94a||_94c;
_94b=_94b||_94c;
var _94e=_948.match(/(''|[^'])+/g);
var _94f=_948.charAt(0)=="'";
dojo.forEach(_94e,function(_950,i){
if(!_950){
_94e[i]="";
}else{
_94e[i]=(_94f?_94a:_949)(_950);
_94f=!_94f;
}
});
return _94b(_94e.join(""));
};
function _buildDateTimeRE(_952,_953,_954,_955){
_955=dojo.regexp.escapeString(_955);
if(!_954.strict){
_955=_955.replace(" a"," ?a");
}
return _955.replace(/([a-z])\1*/ig,function(_956){
var s;
var c=_956.charAt(0);
var l=_956.length;
var p2="",p3="";
if(_954.strict){
if(l>1){
p2="0"+"{"+(l-1)+"}";
}
if(l>2){
p3="0"+"{"+(l-2)+"}";
}
}else{
p2="0?";
p3="0{0,2}";
}
switch(c){
case "y":
s="\\d{2,4}";
break;
case "M":
s=(l>2)?"\\S+?":p2+"[1-9]|1[0-2]";
break;
case "D":
s=p2+"[1-9]|"+p3+"[1-9][0-9]|[12][0-9][0-9]|3[0-5][0-9]|36[0-6]";
break;
case "d":
s="[12]\\d|"+p2+"[1-9]|3[01]";
break;
case "w":
s=p2+"[1-9]|[1-4][0-9]|5[0-3]";
break;
case "E":
s="\\S+";
break;
case "h":
s=p2+"[1-9]|1[0-2]";
break;
case "k":
s=p2+"\\d|1[01]";
break;
case "H":
s=p2+"\\d|1\\d|2[0-3]";
break;
case "K":
s=p2+"[1-9]|1\\d|2[0-4]";
break;
case "m":
case "s":
s="[0-5]\\d";
break;
case "S":
s="\\d{"+l+"}";
break;
case "a":
var am=_954.am||_953.am||"AM";
var pm=_954.pm||_953.pm||"PM";
if(_954.strict){
s=am+"|"+pm;
}else{
s=am+"|"+pm;
if(am!=am.toLowerCase()){
s+="|"+am.toLowerCase();
}
if(pm!=pm.toLowerCase()){
s+="|"+pm.toLowerCase();
}
if(s.indexOf(".")!=-1){
s+="|"+s.replace(/\./g,"");
}
}
s=s.replace(/\./g,"\\.");
break;
default:
s=".*";
}
if(_952){
_952.push(_956);
}
return "("+s+")";
}).replace(/[\xa0 ]/g,"[\\s\\xa0]");
};
})();
(function(){
var _95e=[];
dojo.date.locale.addCustomFormats=function(_95f,_960){
_95e.push({pkg:_95f,name:_960});
};
dojo.date.locale._getGregorianBundle=function(_961){
var _962={};
dojo.forEach(_95e,function(desc){
var _964=dojo.i18n.getLocalization(desc.pkg,desc.name,_961);
_962=dojo.mixin(_962,_964);
},this);
return _962;
};
})();
dojo.date.locale.addCustomFormats("dojo.cldr","gregorian");
dojo.date.locale.getNames=function(item,type,use,_968){
var _969;
var _96a=dojo.date.locale._getGregorianBundle(_968);
var _96b=[item,use,type];
if(use=="standAlone"){
var key=_96b.join("-");
_969=_96a[key];
if(_969[0]==1){
_969=undefined;
}
}
_96b[1]="format";
return (_969||_96a[_96b.join("-")]).concat();
};
dojo.date.locale.isWeekend=function(_96d,_96e){
var _96f=dojo.cldr.supplemental.getWeekend(_96e);
var day=(_96d||new Date()).getDay();
if(_96f.end<_96f.start){
_96f.end+=7;
if(day<_96f.start){
day+=7;
}
}
return day>=_96f.start&&day<=_96f.end;
};
dojo.date.locale._getDayOfYear=function(_971){
return dojo.date.difference(new Date(_971.getFullYear(),0,1,_971.getHours()),_971)+1;
};
dojo.date.locale._getWeekOfYear=function(_972,_973){
if(arguments.length==1){
_973=0;
}
var _974=new Date(_972.getFullYear(),0,1).getDay();
var adj=(_974-_973+7)%7;
var week=Math.floor((dojo.date.locale._getDayOfYear(_972)+adj-1)/7);
if(_974==_973){
week++;
}
return week;
};
}
if(!dojo._hasResource["dijit.layout._LayoutWidget"]){
dojo._hasResource["dijit.layout._LayoutWidget"]=true;
dojo.provide("dijit.layout._LayoutWidget");
dojo.declare("dijit.layout._LayoutWidget",[dijit._Widget,dijit._Container,dijit._Contained],{baseClass:"dijitLayoutContainer",isLayoutContainer:true,postCreate:function(){
dojo.addClass(this.domNode,"dijitContainer");
dojo.addClass(this.domNode,this.baseClass);
},startup:function(){
if(this._started){
return;
}
dojo.forEach(this.getChildren(),function(_977){
_977.startup();
});
if(!this.getParent||!this.getParent()){
this.resize();
this.connect(dojo.global,"onresize","resize");
}
this.inherited(arguments);
},resize:function(_978,_979){
var node=this.domNode;
if(_978){
dojo.marginBox(node,_978);
if(_978.t){
node.style.top=_978.t+"px";
}
if(_978.l){
node.style.left=_978.l+"px";
}
}
var mb=_979||{};
dojo.mixin(mb,_978||{});
if(!("h" in mb)||!("w" in mb)){
mb=dojo.mixin(dojo.marginBox(node),mb);
}
var cs=dojo.getComputedStyle(node);
var me=dojo._getMarginExtents(node,cs);
var be=dojo._getBorderExtents(node,cs);
var bb=this._borderBox={w:mb.w-(me.w+be.w),h:mb.h-(me.h+be.h)};
var pe=dojo._getPadExtents(node,cs);
this._contentBox={l:dojo._toPixelValue(node,cs.paddingLeft),t:dojo._toPixelValue(node,cs.paddingTop),w:bb.w-pe.w,h:bb.h-pe.h};
this.layout();
},layout:function(){
},_setupChild:function(_981){
if(_981.baseClass){
dojo.addClass(_981.domNode,this.baseClass+"-"+_981.baseClass);
}
},addChild:function(_982,_983){
this.inherited(arguments);
if(this._started){
this._setupChild(_982);
}
},removeChild:function(_984){
if(_984.baseClass){
dojo.removeClass(_984.domNode,this.baseClass+"-"+_984.baseClass);
}
this.inherited(arguments);
}});
dijit.layout.marginBox2contentBox=function(node,mb){
var cs=dojo.getComputedStyle(node);
var me=dojo._getMarginExtents(node,cs);
var pb=dojo._getPadBorderExtents(node,cs);
return {l:dojo._toPixelValue(node,cs.paddingLeft),t:dojo._toPixelValue(node,cs.paddingTop),w:mb.w-(me.w+pb.w),h:mb.h-(me.h+pb.h)};
};
(function(){
var _98a=function(word){
return word.substring(0,1).toUpperCase()+word.substring(1);
};
var size=function(_98d,dim){
_98d.resize?_98d.resize(dim):dojo.marginBox(_98d.domNode,dim);
dojo.mixin(_98d,dojo.marginBox(_98d.domNode));
dojo.mixin(_98d,dim);
};
dijit.layout.layoutChildren=function(_98f,dim,_991){
dim=dojo.mixin({},dim);
dojo.addClass(_98f,"dijitLayoutContainer");
_991=dojo.filter(_991,function(item){
return item.layoutAlign!="client";
}).concat(dojo.filter(_991,function(item){
return item.layoutAlign=="client";
}));
dojo.forEach(_991,function(_994){
var elm=_994.domNode,pos=_994.layoutAlign;
var _997=elm.style;
_997.left=dim.l+"px";
_997.top=dim.t+"px";
_997.bottom=_997.right="auto";
dojo.addClass(elm,"dijitAlign"+_98a(pos));
if(pos=="top"||pos=="bottom"){
size(_994,{w:dim.w});
dim.h-=_994.h;
if(pos=="top"){
dim.t+=_994.h;
}else{
_997.top=dim.t+dim.h+"px";
}
}else{
if(pos=="left"||pos=="right"){
size(_994,{h:dim.h});
dim.w-=_994.w;
if(pos=="left"){
dim.l+=_994.w;
}else{
_997.left=dim.l+dim.w+"px";
}
}else{
if(pos=="client"){
size(_994,dim);
}
}
}
});
};
})();
}
if(!dojo._hasResource["dijit.dijit"]){
dojo._hasResource["dijit.dijit"]=true;
dojo.provide("dijit.dijit");
}
if(!dojo._hasResource["dijit._Calendar"]){
dojo._hasResource["dijit._Calendar"]=true;
dojo.provide("dijit._Calendar");
dojo.declare("dijit._Calendar",[dijit._Widget,dijit._Templated],{templateString:"<table cellspacing=\"0\" cellpadding=\"0\" class=\"dijitCalendarContainer\">\r\n\t<thead>\r\n\t\t<tr class=\"dijitReset dijitCalendarMonthContainer\" valign=\"top\">\r\n\t\t\t<th class='dijitReset' dojoAttachPoint=\"decrementMonth\">\r\n\t\t\t\t<div class=\"dijitInline dijitCalendarIncrementControl dijitCalendarDecrease\"><span dojoAttachPoint=\"decreaseArrowNode\" class=\"dijitA11ySideArrow dijitCalendarIncrementControl dijitCalendarDecreaseInner\">-</span></div>\r\n\t\t\t</th>\r\n\t\t\t<th class='dijitReset' colspan=\"5\">\r\n\t\t\t\t<div dojoAttachPoint=\"monthLabelSpacer\" class=\"dijitCalendarMonthLabelSpacer\"></div>\r\n\t\t\t\t<div dojoAttachPoint=\"monthLabelNode\" class=\"dijitCalendarMonthLabel\"></div>\r\n\t\t\t</th>\r\n\t\t\t<th class='dijitReset' dojoAttachPoint=\"incrementMonth\">\r\n\t\t\t\t<div class=\"dijitInline dijitCalendarIncrementControl dijitCalendarIncrease\"><span dojoAttachPoint=\"increaseArrowNode\" class=\"dijitA11ySideArrow dijitCalendarIncrementControl dijitCalendarIncreaseInner\">+</span></div>\r\n\t\t\t</th>\r\n\t\t</tr>\r\n\t\t<tr>\r\n\t\t\t<th class=\"dijitReset dijitCalendarDayLabelTemplate\"><span class=\"dijitCalendarDayLabel\"></span></th>\r\n\t\t</tr>\r\n\t</thead>\r\n\t<tbody dojoAttachEvent=\"onclick: _onDayClick, onmouseover: _onDayMouseOver, onmouseout: _onDayMouseOut\" class=\"dijitReset dijitCalendarBodyContainer\">\r\n\t\t<tr class=\"dijitReset dijitCalendarWeekTemplate\">\r\n\t\t\t<td class=\"dijitReset dijitCalendarDateTemplate\"><span class=\"dijitCalendarDateLabel\"></span></td>\r\n\t\t</tr>\r\n\t</tbody>\r\n\t<tfoot class=\"dijitReset dijitCalendarYearContainer\">\r\n\t\t<tr>\r\n\t\t\t<td class='dijitReset' valign=\"top\" colspan=\"7\">\r\n\t\t\t\t<h3 class=\"dijitCalendarYearLabel\">\r\n\t\t\t\t\t<span dojoAttachPoint=\"previousYearLabelNode\" class=\"dijitInline dijitCalendarPreviousYear\"></span>\r\n\t\t\t\t\t<span dojoAttachPoint=\"currentYearLabelNode\" class=\"dijitInline dijitCalendarSelectedYear\"></span>\r\n\t\t\t\t\t<span dojoAttachPoint=\"nextYearLabelNode\" class=\"dijitInline dijitCalendarNextYear\"></span>\r\n\t\t\t\t</h3>\r\n\t\t\t</td>\r\n\t\t</tr>\r\n\t</tfoot>\r\n</table>\t\r\n",value:new Date(),dayWidth:"narrow",setValue:function(_998){
dojo.deprecated("dijit.Calendar:setValue() is deprecated.  Use attr('value', ...) instead.","","2.0");
this.attr("value",_998);
},_getValueAttr:function(){
var _999=new Date(this.value);
_999.setHours(0,0,0,0);
if(_999.getDate()<this.value.getDate()){
_999=dojo.date.add(_999,"hour",1);
}
return _999;
},_setValueAttr:function(_99a){
if(!this.value||dojo.date.compare(_99a,this.value)){
_99a=new Date(_99a);
_99a.setHours(1);
this.displayMonth=new Date(_99a);
if(!this.isDisabledDate(_99a,this.lang)){
this.onChange(this.value=_99a);
}
this._populateGrid();
}
},_setText:function(node,text){
while(node.firstChild){
node.removeChild(node.firstChild);
}
node.appendChild(dojo.doc.createTextNode(text));
},_populateGrid:function(){
var _99d=this.displayMonth;
_99d.setDate(1);
var _99e=_99d.getDay();
var _99f=dojo.date.getDaysInMonth(_99d);
var _9a0=dojo.date.getDaysInMonth(dojo.date.add(_99d,"month",-1));
var _9a1=new Date();
var _9a2=this.value;
var _9a3=dojo.cldr.supplemental.getFirstDayOfWeek(this.lang);
if(_9a3>_99e){
_9a3-=7;
}
dojo.query(".dijitCalendarDateTemplate",this.domNode).forEach(function(_9a4,i){
i+=_9a3;
var date=new Date(_99d);
var _9a7,_9a8="dijitCalendar",adj=0;
if(i<_99e){
_9a7=_9a0-_99e+i+1;
adj=-1;
_9a8+="Previous";
}else{
if(i>=(_99e+_99f)){
_9a7=i-_99e-_99f+1;
adj=1;
_9a8+="Next";
}else{
_9a7=i-_99e+1;
_9a8+="Current";
}
}
if(adj){
date=dojo.date.add(date,"month",adj);
}
date.setDate(_9a7);
if(!dojo.date.compare(date,_9a1,"date")){
_9a8="dijitCalendarCurrentDate "+_9a8;
}
if(!dojo.date.compare(date,_9a2,"date")){
_9a8="dijitCalendarSelectedDate "+_9a8;
}
if(this.isDisabledDate(date,this.lang)){
_9a8="dijitCalendarDisabledDate "+_9a8;
}
var _9aa=this.getClassForDate(date,this.lang);
if(_9aa){
_9a8=_9aa+" "+_9a8;
}
_9a4.className=_9a8+"Month dijitCalendarDateTemplate";
_9a4.dijitDateValue=date.valueOf();
var _9ab=dojo.query(".dijitCalendarDateLabel",_9a4)[0];
this._setText(_9ab,date.getDate());
},this);
var _9ac=dojo.date.locale.getNames("months","wide","standAlone",this.lang);
this._setText(this.monthLabelNode,_9ac[_99d.getMonth()]);
var y=_99d.getFullYear()-1;
var d=new Date();
dojo.forEach(["previous","current","next"],function(name){
d.setFullYear(y++);
this._setText(this[name+"YearLabelNode"],dojo.date.locale.format(d,{selector:"year",locale:this.lang}));
},this);
var _9b0=this;
var _9b1=function(_9b2,_9b3,adj){
_9b0._connects.push(dijit.typematic.addMouseListener(_9b0[_9b2],_9b0,function(_9b5){
if(_9b5>=0){
_9b0._adjustDisplay(_9b3,adj);
}
},0.8,500));
};
_9b1("incrementMonth","month",1);
_9b1("decrementMonth","month",-1);
_9b1("nextYearLabelNode","year",1);
_9b1("previousYearLabelNode","year",-1);
},goToToday:function(){
this.attr("value",new Date());
},postCreate:function(){
this.inherited(arguments);
var _9b6=dojo.hitch(this,function(_9b7,n){
var _9b9=dojo.query(_9b7,this.domNode)[0];
for(var i=0;i<n;i++){
_9b9.parentNode.appendChild(_9b9.cloneNode(true));
}
});
_9b6(".dijitCalendarDayLabelTemplate",6);
_9b6(".dijitCalendarDateTemplate",6);
_9b6(".dijitCalendarWeekTemplate",5);
var _9bb=dojo.date.locale.getNames("days",this.dayWidth,"standAlone",this.lang);
var _9bc=dojo.cldr.supplemental.getFirstDayOfWeek(this.lang);
dojo.query(".dijitCalendarDayLabel",this.domNode).forEach(function(_9bd,i){
this._setText(_9bd,_9bb[(i+_9bc)%7]);
},this);
var _9bf=dojo.date.locale.getNames("months","wide","standAlone",this.lang);
dojo.forEach(_9bf,function(name){
var _9c1=dojo.doc.createElement("div");
this._setText(_9c1,name);
this.monthLabelSpacer.appendChild(_9c1);
},this);
this.value=null;
this.attr("value",new Date());
},_adjustDisplay:function(part,_9c3){
this.displayMonth=dojo.date.add(this.displayMonth,part,_9c3);
this._populateGrid();
},_onDayClick:function(evt){
var node=evt.target;
dojo.stopEvent(evt);
while(!node.dijitDateValue){
node=node.parentNode;
}
if(!dojo.hasClass(node,"dijitCalendarDisabledDate")){
this.attr("value",node.dijitDateValue);
this.onValueSelected(this.value);
}
},_onDayMouseOver:function(evt){
var node=evt.target;
if(node&&(node.dijitDateValue||node==this.previousYearLabelNode||node==this.nextYearLabelNode)){
dojo.addClass(node,"dijitCalendarHoveredDate");
this._currentNode=node;
}
},_onDayMouseOut:function(evt){
if(!this._currentNode){
return;
}
for(var node=evt.relatedTarget;node;){
if(node==this._currentNode){
return;
}
try{
node=node.parentNode;
}
catch(x){
node=null;
}
}
dojo.removeClass(this._currentNode,"dijitCalendarHoveredDate");
this._currentNode=null;
},onValueSelected:function(date){
},onChange:function(date){
},isDisabledDate:function(_9cc,_9cd){
},getClassForDate:function(_9ce,_9cf){
}});
}
if(!dojo._hasResource["dijit._editor.selection"]){
dojo._hasResource["dijit._editor.selection"]=true;
dojo.provide("dijit._editor.selection");
dojo.mixin(dijit._editor.selection,{getType:function(){
if(dojo.doc.selection){
return dojo.doc.selection.type.toLowerCase();
}else{
var _9d0="text";
var oSel;
try{
oSel=dojo.global.getSelection();
}
catch(e){
}
if(oSel&&oSel.rangeCount==1){
var _9d2=oSel.getRangeAt(0);
if((_9d2.startContainer==_9d2.endContainer)&&((_9d2.endOffset-_9d2.startOffset)==1)&&(_9d2.startContainer.nodeType!=3)){
_9d0="control";
}
}
return _9d0;
}
},getSelectedText:function(){
if(dojo.doc.selection){
if(dijit._editor.selection.getType()=="control"){
return null;
}
return dojo.doc.selection.createRange().text;
}else{
var _9d3=dojo.global.getSelection();
if(_9d3){
return _9d3.toString();
}
}
return "";
},getSelectedHtml:function(){
if(dojo.doc.selection){
if(dijit._editor.selection.getType()=="control"){
return null;
}
return dojo.doc.selection.createRange().htmlText;
}else{
var _9d4=dojo.global.getSelection();
if(_9d4&&_9d4.rangeCount){
var frag=_9d4.getRangeAt(0).cloneContents();
var div=dojo.doc.createElement("div");
div.appendChild(frag);
return div.innerHTML;
}
return null;
}
},getSelectedElement:function(){
if(dijit._editor.selection.getType()=="control"){
if(dojo.doc.selection){
var _9d7=dojo.doc.selection.createRange();
if(_9d7&&_9d7.item){
return dojo.doc.selection.createRange().item(0);
}
}else{
var _9d8=dojo.global.getSelection();
return _9d8.anchorNode.childNodes[_9d8.anchorOffset];
}
}
return null;
},getParentElement:function(){
if(dijit._editor.selection.getType()=="control"){
var p=this.getSelectedElement();
if(p){
return p.parentNode;
}
}else{
if(dojo.doc.selection){
var r=dojo.doc.selection.createRange();
r.collapse(true);
return r.parentElement();
}else{
var _9db=dojo.global.getSelection();
if(_9db){
var node=_9db.anchorNode;
while(node&&(node.nodeType!=1)){
node=node.parentNode;
}
return node;
}
}
}
return null;
},hasAncestorElement:function(_9dd){
return this.getAncestorElement.apply(this,arguments)!=null;
},getAncestorElement:function(_9de){
var node=this.getSelectedElement()||this.getParentElement();
return this.getParentOfType(node,arguments);
},isTag:function(node,tags){
if(node&&node.tagName){
var _nlc=node.tagName.toLowerCase();
for(var i=0;i<tags.length;i++){
var _tlc=String(tags[i]).toLowerCase();
if(_nlc==_tlc){
return _tlc;
}
}
}
return "";
},getParentOfType:function(node,tags){
while(node){
if(this.isTag(node,tags).length){
return node;
}
node=node.parentNode;
}
return null;
},collapse:function(_9e7){
if(window["getSelection"]){
var _9e8=dojo.global.getSelection();
if(_9e8.removeAllRanges){
if(_9e7){
_9e8.collapseToStart();
}else{
_9e8.collapseToEnd();
}
}else{
_9e8.collapse(_9e7);
}
}else{
if(dojo.doc.selection){
var _9e9=dojo.doc.selection.createRange();
_9e9.collapse(_9e7);
_9e9.select();
}
}
},remove:function(){
var _s=dojo.doc.selection;
if(_s){
if(_s.type.toLowerCase()!="none"){
_s.clear();
}
return _s;
}else{
_s=dojo.global.getSelection();
_s.deleteFromDocument();
return _s;
}
},selectElementChildren:function(_9eb,_9ec){
var _9ed=dojo.global;
var _9ee=dojo.doc;
_9eb=dojo.byId(_9eb);
if(_9ee.selection&&dojo.body().createTextRange){
var _9ef=_9eb.ownerDocument.body.createTextRange();
_9ef.moveToElementText(_9eb);
if(!_9ec){
try{
_9ef.select();
}
catch(e){
}
}
}else{
if(_9ed.getSelection){
var _9f0=_9ed.getSelection();
if(_9f0.setBaseAndExtent){
_9f0.setBaseAndExtent(_9eb,0,_9eb,_9eb.innerText.length-1);
}else{
if(_9f0.selectAllChildren){
_9f0.selectAllChildren(_9eb);
}
}
}
}
},selectElement:function(_9f1,_9f2){
var _9f3,_9f4=dojo.doc;
_9f1=dojo.byId(_9f1);
if(_9f4.selection&&dojo.body().createTextRange){
try{
_9f3=dojo.body().createControlRange();
_9f3.addElement(_9f1);
if(!_9f2){
_9f3.select();
}
}
catch(e){
this.selectElementChildren(_9f1,_9f2);
}
}else{
if(dojo.global.getSelection){
var _9f5=dojo.global.getSelection();
if(_9f5.removeAllRanges){
_9f3=_9f4.createRange();
_9f3.selectNode(_9f1);
_9f5.removeAllRanges();
_9f5.addRange(_9f3);
}
}
}
}});
}
if(!dojo._hasResource["dijit._editor.range"]){
dojo._hasResource["dijit._editor.range"]=true;
dojo.provide("dijit._editor.range");
dijit.range={};
dijit.range.getIndex=function(node,_9f7){
var ret=[],retR=[];
var stop=_9f7;
var _9fb=node;
var _9fc,n;
while(node!=stop){
var i=0;
_9fc=node.parentNode;
while((n=_9fc.childNodes[i++])){
if(n===node){
--i;
break;
}
}
if(i>=_9fc.childNodes.length){
dojo.debug("Error finding index of a node in dijit.range.getIndex");
}
ret.unshift(i);
retR.unshift(i-_9fc.childNodes.length);
node=_9fc;
}
if(ret.length>0&&_9fb.nodeType==3){
n=_9fb.previousSibling;
while(n&&n.nodeType==3){
ret[ret.length-1]--;
n=n.previousSibling;
}
n=_9fb.nextSibling;
while(n&&n.nodeType==3){
retR[retR.length-1]++;
n=n.nextSibling;
}
}
return {o:ret,r:retR};
};
dijit.range.getNode=function(_9ff,_a00){
if(!dojo.isArray(_9ff)||_9ff.length==0){
return _a00;
}
var node=_a00;
dojo.every(_9ff,function(i){
if(i>=0&&i<node.childNodes.length){
node=node.childNodes[i];
}else{
node=null;
console.debug("Error: can not find node with index",_9ff,"under parent node",_a00);
return false;
}
return true;
});
return node;
};
dijit.range.getCommonAncestor=function(n1,n2){
var _a05=function(n){
var as=[];
while(n){
as.unshift(n);
if(n.nodeName!="BODY"){
n=n.parentNode;
}else{
break;
}
}
return as;
};
var n1as=_a05(n1);
var n2as=_a05(n2);
var m=Math.min(n1as.length,n2as.length);
var com=n1as[0];
for(var i=1;i<m;i++){
if(n1as[i]===n2as[i]){
com=n1as[i];
}else{
break;
}
}
return com;
};
dijit.range.getAncestor=function(node,_a0e,root){
root=root||node.ownerDocument.body;
while(node&&node!==root){
var name=node.nodeName.toUpperCase();
if(_a0e.test(name)){
return node;
}
node=node.parentNode;
}
return null;
};
dijit.range.BlockTagNames=/^(?:P|DIV|H1|H2|H3|H4|H5|H6|ADDRESS|PRE|OL|UL|LI|DT|DE)$/;
dijit.range.getBlockAncestor=function(node,_a12,root){
root=root||node.ownerDocument.body;
_a12=_a12||dijit.range.BlockTagNames;
var _a14=null,_a15;
while(node&&node!==root){
var name=node.nodeName.toUpperCase();
if(!_a14&&_a12.test(name)){
_a14=node;
}
if(!_a15&&(/^(?:BODY|TD|TH|CAPTION)$/).test(name)){
_a15=node;
}
node=node.parentNode;
}
return {blockNode:_a14,blockContainer:_a15||node.ownerDocument.body};
};
dijit.range.atBeginningOfContainer=function(_a17,node,_a19){
var _a1a=false;
var _a1b=(_a19==0);
if(!_a1b&&node.nodeType==3){
if(dojo.trim(node.nodeValue.substr(0,_a19))==0){
_a1b=true;
}
}
if(_a1b){
var _a1c=node;
_a1a=true;
while(_a1c&&_a1c!==_a17){
if(_a1c.previousSibling){
_a1a=false;
break;
}
_a1c=_a1c.parentNode;
}
}
return _a1a;
};
dijit.range.atEndOfContainer=function(_a1d,node,_a1f){
var _a20=false;
var _a21=(_a1f==(node.length||node.childNodes.length));
if(!_a21&&node.nodeType==3){
if(dojo.trim(node.nodeValue.substr(_a1f))==0){
_a21=true;
}
}
if(_a21){
var _a22=node;
_a20=true;
while(_a22&&_a22!==_a1d){
if(_a22.nextSibling){
_a20=false;
break;
}
_a22=_a22.parentNode;
}
}
return _a20;
};
dijit.range.adjacentNoneTextNode=function(_a23,next){
var node=_a23;
var len=(0-_a23.length)||0;
var prop=next?"nextSibling":"previousSibling";
while(node){
if(node.nodeType!=3){
break;
}
len+=node.length;
node=node[prop];
}
return [node,len];
};
dijit.range._w3c=Boolean(window["getSelection"]);
dijit.range.create=function(win){
if(dijit.range._w3c){
return (win||dojo.global).document.createRange();
}else{
return new dijit.range.W3CRange;
}
};
dijit.range.getSelection=function(win,_a2a){
if(dijit.range._w3c){
return win.getSelection();
}else{
var s=new dijit.range.ie.selection(win);
if(!_a2a){
s._getCurrentSelection();
}
return s;
}
};
if(!dijit.range._w3c){
dijit.range.ie={cachedSelection:{},selection:function(win){
this._ranges=[];
this.addRange=function(r,_a2e){
this._ranges.push(r);
if(!_a2e){
r._select();
}
this.rangeCount=this._ranges.length;
};
this.removeAllRanges=function(){
this._ranges=[];
this.rangeCount=0;
};
var _a2f=function(){
var r=win.document.selection.createRange();
var type=win.document.selection.type.toUpperCase();
if(type=="CONTROL"){
return new dijit.range.W3CRange(dijit.range.ie.decomposeControlRange(r));
}else{
return new dijit.range.W3CRange(dijit.range.ie.decomposeTextRange(r));
}
};
this.getRangeAt=function(i){
return this._ranges[i];
};
this._getCurrentSelection=function(){
this.removeAllRanges();
var r=_a2f();
if(r){
this.addRange(r,true);
}
};
},decomposeControlRange:function(_a34){
var _a35=_a34.item(0),_a36=_a34.item(_a34.length-1);
var _a37=_a35.parentNode,_a38=_a36.parentNode;
var _a39=dijit.range.getIndex(_a35,_a37).o;
var _a3a=dijit.range.getIndex(_a36,_a38).o+1;
return [[_a37,_a39],[_a38,_a3a]];
},getEndPoint:function(_a3b,end){
var _a3d=_a3b.duplicate();
_a3d.collapse(!end);
var _a3e="EndTo"+(end?"End":"Start");
var _a3f=_a3d.parentElement();
var _a40,_a41,_a42;
if(_a3f.childNodes.length>0){
dojo.every(_a3f.childNodes,function(node,i){
var _a45;
if(node.nodeType!=3){
_a3d.moveToElementText(node);
if(_a3d.compareEndPoints(_a3e,_a3b)>0){
_a40=node.previousSibling;
if(_a42&&_a42.nodeType==3){
_a40=_a42;
_a45=true;
}else{
_a40=_a3f;
_a41=i;
return false;
}
}else{
if(i==_a3f.childNodes.length-1){
_a40=_a3f;
_a41=_a3f.childNodes.length;
return false;
}
}
}else{
if(i==_a3f.childNodes.length-1){
_a40=node;
_a45=true;
}
}
if(_a45&&_a40){
var _a46=dijit.range.adjacentNoneTextNode(_a40)[0];
if(_a46){
_a40=_a46.nextSibling;
}else{
_a40=_a3f.firstChild;
}
var _a47=dijit.range.adjacentNoneTextNode(_a40);
_a46=_a47[0];
var _a48=_a47[1];
if(_a46){
_a3d.moveToElementText(_a46);
_a3d.collapse(false);
}else{
_a3d.moveToElementText(_a3f);
}
_a3d.setEndPoint(_a3e,_a3b);
_a41=_a3d.text.length-_a48;
return false;
}
_a42=node;
return true;
});
}else{
_a40=_a3f;
_a41=0;
}
if(!end&&_a40.nodeType!=3&&_a41==_a40.childNodes.length){
if(_a40.nextSibling&&_a40.nextSibling.nodeType==3){
_a40=_a40.nextSibling;
_a41=0;
}
}
return [_a40,_a41];
},setEndPoint:function(_a49,_a4a,_a4b){
var _a4c=_a49.duplicate(),node,len;
if(_a4a.nodeType!=3){
_a4c.moveToElementText(_a4a);
_a4c.collapse(true);
if(_a4b==_a4a.childNodes.length){
if(_a4b>0){
node=_a4a.lastChild;
len=0;
while(node&&node.nodeType==3){
len+=node.length;
_a4a=node;
node=node.previousSibling;
}
if(node){
_a4c.moveToElementText(node);
}
_a4c.collapse(false);
_a4b=len;
}else{
_a4c.moveToElementText(_a4a);
_a4c.collapse(true);
}
}else{
if(_a4b>0){
node=_a4a.childNodes[_a4b-1];
if(node.nodeType==3){
_a4a=node;
_a4b=node.length;
}else{
_a4c.moveToElementText(node);
_a4c.collapse(false);
}
}
}
}
if(_a4a.nodeType==3){
var _a4f=dijit.range.adjacentNoneTextNode(_a4a);
var _a50=_a4f[0];
len=_a4f[1];
if(_a50){
_a4c.moveToElementText(_a50);
_a4c.collapse(false);
if(_a50.contentEditable!="inherit"){
len++;
}
}else{
_a4c.moveToElementText(_a4a.parentNode);
_a4c.collapse(true);
}
_a4b+=len;
if(_a4b>0){
if(_a4c.move("character",_a4b)!=_a4b){
console.error("Error when moving!");
}
}
}
return _a4c;
},decomposeTextRange:function(_a51){
var _a52=dijit.range.ie.getEndPoint(_a51);
var _a53=_a52[0],_a54=_a52[1];
var _a55=_a52[0],_a56=_a52[1];
if(_a51.htmlText.length){
if(_a51.htmlText==_a51.text){
_a56=_a54+_a51.text.length;
}else{
_a52=dijit.range.ie.getEndPoint(_a51,true);
_a55=_a52[0],_a56=_a52[1];
}
}
return [[_a53,_a54],[_a55,_a56]];
},setRange:function(_a57,_a58,_a59,_a5a,_a5b,_a5c){
var _a5d=dijit.range.ie.setEndPoint(_a57,_a58,_a59);
_a57.setEndPoint("StartToStart",_a5d);
var _a5e=_a5d;
if(!_a5c){
_a5e=dijit.range.ie.setEndPoint(_a57,_a5a,_a5b);
}
_a57.setEndPoint("EndToEnd",_a5e);
return _a57;
}};
dojo.declare("dijit.range.W3CRange",null,{constructor:function(){
if(arguments.length>0){
this.setStart(arguments[0][0][0],arguments[0][0][1]);
this.setEnd(arguments[0][1][0],arguments[0][1][1]);
}else{
this.commonAncestorContainer=null;
this.startContainer=null;
this.startOffset=0;
this.endContainer=null;
this.endOffset=0;
this.collapsed=true;
}
},_simpleSetEndPoint:function(node,_a60,end){
var r=(this._body||node.ownerDocument.body).createTextRange();
if(node.nodeType!=1){
r.moveToElementText(node.parentNode);
}else{
r.moveToElementText(node);
}
r.collapse(true);
_a60.setEndPoint(end?"EndToEnd":"StartToStart",r);
},_updateInternal:function(){
if(this.startContainer!==this.endContainer){
this.commonAncestorContainer=dijit.range.getCommonAncestor(this.startContainer,this.endContainer);
}else{
this.commonAncestorContainer=this.startContainer;
}
this.collapsed=(this.startContainer===this.endContainer)&&(this.startOffset==this.endOffset);
},setStart:function(node,_a64){
_a64=parseInt(_a64);
if(this.startContainer===node&&this.startOffset==_a64){
return;
}
delete this._cachedBookmark;
this.startContainer=node;
this.startOffset=_a64;
if(!this.endContainer){
this.setEnd(node,_a64);
}else{
this._updateInternal();
}
},setEnd:function(node,_a66){
_a66=parseInt(_a66);
if(this.endContainer===node&&this.endOffset==_a66){
return;
}
delete this._cachedBookmark;
this.endContainer=node;
this.endOffset=_a66;
if(!this.startContainer){
this.setStart(node,_a66);
}else{
this._updateInternal();
}
},setStartAfter:function(node,_a68){
this._setPoint("setStart",node,_a68,1);
},setStartBefore:function(node,_a6a){
this._setPoint("setStart",node,_a6a,0);
},setEndAfter:function(node,_a6c){
this._setPoint("setEnd",node,_a6c,1);
},setEndBefore:function(node,_a6e){
this._setPoint("setEnd",node,_a6e,0);
},_setPoint:function(what,node,_a71,ext){
var _a73=dijit.range.getIndex(node,node.parentNode).o;
this[what](node.parentNode,_a73.pop()+ext);
},_getIERange:function(){
var r=(this._body||this.endContainer.ownerDocument.body).createTextRange();
dijit.range.ie.setRange(r,this.startContainer,this.startOffset,this.endContainer,this.endOffset,this.collapsed);
return r;
},getBookmark:function(body){
this._getIERange();
return this._cachedBookmark;
},_select:function(){
var r=this._getIERange();
r.select();
},deleteContents:function(){
var r=this._getIERange();
r.pasteHTML("");
this.endContainer=this.startContainer;
this.endOffset=this.startOffset;
this.collapsed=true;
},cloneRange:function(){
var r=new dijit.range.W3CRange([[this.startContainer,this.startOffset],[this.endContainer,this.endOffset]]);
r._body=this._body;
return r;
},detach:function(){
this._body=null;
this.commonAncestorContainer=null;
this.startContainer=null;
this.startOffset=0;
this.endContainer=null;
this.endOffset=0;
this.collapsed=true;
}});
}
}
if(!dojo._hasResource["dijit._editor.html"]){
dojo._hasResource["dijit._editor.html"]=true;
dojo.provide("dijit._editor.html");
dijit._editor.escapeXml=function(str,_a7a){
str=str.replace(/&/gm,"&amp;").replace(/</gm,"&lt;").replace(/>/gm,"&gt;").replace(/"/gm,"&quot;");
if(!_a7a){
str=str.replace(/'/gm,"&#39;");
}
return str;
};
dijit._editor.getNodeHtml=function(node){
var _a7c;
switch(node.nodeType){
case 1:
_a7c="<"+node.nodeName.toLowerCase();
var _a7d=[];
if(dojo.isIE&&node.outerHTML){
var s=node.outerHTML;
s=s.substr(0,s.indexOf(">")).replace(/(['"])[^"']*\1/g,"");
var reg=/(\b\w+)\s?=/g;
var m,key;
while((m=reg.exec(s))){
key=m[1];
if(key.substr(0,3)!="_dj"){
if(key=="src"||key=="href"){
if(node.getAttribute("_djrealurl")){
_a7d.push([key,node.getAttribute("_djrealurl")]);
continue;
}
}
var val;
switch(key){
case "style":
val=node.style.cssText.toLowerCase();
break;
case "class":
val=node.className;
break;
default:
val=node.getAttribute(key);
}
if(val!=null){
_a7d.push([key,val.toString()]);
}
}
}
}else{
var attr,i=0;
while((attr=node.attributes[i++])){
var n=attr.name;
if(n.substr(0,3)!="_dj"){
var v=attr.value;
if(n=="src"||n=="href"){
if(node.getAttribute("_djrealurl")){
v=node.getAttribute("_djrealurl");
}
}
_a7d.push([n,v]);
}
}
}
_a7d.sort(function(a,b){
return a[0]<b[0]?-1:(a[0]==b[0]?0:1);
});
var j=0;
while((attr=_a7d[j++])){
_a7c+=" "+attr[0]+"=\""+(dojo.isString(attr[1])?dijit._editor.escapeXml(attr[1],true):attr[1])+"\"";
}
if(node.childNodes.length){
_a7c+=">"+dijit._editor.getChildrenHtml(node)+"</"+node.nodeName.toLowerCase()+">";
}else{
_a7c+=" />";
}
break;
case 3:
_a7c=dijit._editor.escapeXml(node.nodeValue,true);
break;
case 8:
_a7c="<!--"+dijit._editor.escapeXml(node.nodeValue,true)+"-->";
break;
default:
_a7c="<!-- Element not recognized - Type: "+node.nodeType+" Name: "+node.nodeName+"-->";
}
return _a7c;
};
dijit._editor.getChildrenHtml=function(dom){
var out="";
if(!dom){
return out;
}
var _a8b=dom["childNodes"]||dom;
var node,i=0;
while((node=_a8b[i++])){
if(!dojo.isIE||(node.parentNode==dom||!node.parentNode)){
out+=dijit._editor.getNodeHtml(node);
}
}
return out;
};
}
if(!dojo._hasResource["dijit._editor.RichText"]){
dojo._hasResource["dijit._editor.RichText"]=true;
dojo.provide("dijit._editor.RichText");
if(!dojo.config["useXDomain"]||dojo.config["allowXdRichTextSave"]){
if(dojo._postLoad){
(function(){
var _a8d=dojo.doc.createElement("textarea");
_a8d.id=dijit._scopeName+"._editor.RichText.savedContent";
var s=_a8d.style;
s.display="none";
s.position="absolute";
s.top="-100px";
s.left="-100px";
s.height="3px";
s.width="3px";
dojo.body().appendChild(_a8d);
})();
}else{
try{
dojo.doc.write("<textarea id=\""+dijit._scopeName+"._editor.RichText.savedContent\" "+"style=\"display:none;position:absolute;top:-100px;left:-100px;height:3px;width:3px;overflow:hidden;\"></textarea>");
}
catch(e){
}
}
}
dojo.declare("dijit._editor.RichText",dijit._Widget,{constructor:function(_a8f){
this.contentPreFilters=[];
this.contentPostFilters=[];
this.contentDomPreFilters=[];
this.contentDomPostFilters=[];
this.editingAreaStyleSheets=[];
this._keyHandlers={};
this.contentPreFilters.push(dojo.hitch(this,"_preFixUrlAttributes"));
if(dojo.isMoz){
this.contentPreFilters.push(this._fixContentForMoz);
this.contentPostFilters.push(this._removeMozBogus);
}
if(dojo.isSafari){
this.contentPostFilters.push(this._removeSafariBogus);
}
this.onLoadDeferred=new dojo.Deferred();
var d=dojo.doc;
this._charset=d.charset||d.characterSet||d.defaultCharset||"UTF-8";
},inheritWidth:false,focusOnLoad:false,name:"",styleSheets:"",_content:"",height:"300px",minHeight:"1em",isClosed:true,isLoaded:false,_SEPARATOR:"@@**%%__RICHTEXTBOUNDRY__%%**@@",onLoadDeferred:null,isTabIndent:false,postCreate:function(){
if("textarea"==this.domNode.tagName.toLowerCase()){
console.warn("RichText should not be used with the TEXTAREA tag.  See dijit._editor.RichText docs.");
}
dojo.publish(dijit._scopeName+"._editor.RichText::init",[this]);
this.open();
this.setupDefaultShortcuts();
},setupDefaultShortcuts:function(){
var exec=dojo.hitch(this,function(cmd,arg){
return function(){
return !this.execCommand(cmd,arg);
};
});
var _a94={b:exec("bold"),i:exec("italic"),u:exec("underline"),a:exec("selectall"),s:function(){
this.save(true);
},m:function(){
this.isTabIndent=!this.isTabIndent;
},"1":exec("formatblock","h1"),"2":exec("formatblock","h2"),"3":exec("formatblock","h3"),"4":exec("formatblock","h4"),"\\":exec("insertunorderedlist")};
if(!dojo.isIE){
_a94.Z=exec("redo");
}
for(var key in _a94){
this.addKeyHandler(key,true,false,_a94[key]);
}
},events:["onKeyPress","onKeyDown","onKeyUp","onClick"],captureEvents:[],_editorCommandsLocalized:false,_localizeEditorCommands:function(){
if(this._editorCommandsLocalized){
return;
}
this._editorCommandsLocalized=true;
var _a96=["div","p","pre","h1","h2","h3","h4","h5","h6","ol","ul","address"];
var _a97="",_a98,i=0;
while((_a98=_a96[i++])){
if(_a98.charAt(1)!="l"){
_a97+="<"+_a98+"><span>content</span></"+_a98+"><br/>";
}else{
_a97+="<"+_a98+"><li>content</li></"+_a98+"><br/>";
}
}
var div=dojo.doc.createElement("div");
dojo.style(div,{position:"absolute",left:"-2000px",top:"-2000px"});
dojo.doc.body.appendChild(div);
div.innerHTML=_a97;
var node=div.firstChild;
while(node){
dijit._editor.selection.selectElement(node.firstChild);
dojo.withGlobal(this.window,"selectElement",dijit._editor.selection,[node.firstChild]);
var _a9b=node.tagName.toLowerCase();
this._local2NativeFormatNames[_a9b]=document.queryCommandValue("formatblock");
this._native2LocalFormatNames[this._local2NativeFormatNames[_a9b]]=_a9b;
node=node.nextSibling.nextSibling;
}
dojo.body().removeChild(div);
},open:function(_a9c){
if((!this.onLoadDeferred)||(this.onLoadDeferred.fired>=0)){
this.onLoadDeferred=new dojo.Deferred();
}
if(!this.isClosed){
this.close();
}
dojo.publish(dijit._scopeName+"._editor.RichText::open",[this]);
this._content="";
if((arguments.length==1)&&(_a9c["nodeName"])){
this.domNode=_a9c;
}
var dn=this.domNode;
var html;
if((dn["nodeName"])&&(dn.nodeName.toLowerCase()=="textarea")){
var ta=this.textarea=dn;
this.name=ta.name;
html=this._preFilterContent(ta.value);
dn=this.domNode=dojo.doc.createElement("div");
dn.setAttribute("widgetId",this.id);
ta.removeAttribute("widgetId");
dn.cssText=ta.cssText;
dn.className+=" "+ta.className;
dojo.place(dn,ta,"before");
var _aa0=dojo.hitch(this,function(){
with(ta.style){
display="block";
position="absolute";
left=top="-1000px";
if(dojo.isIE){
this.__overflow=overflow;
overflow="hidden";
}
}
});
if(dojo.isIE){
setTimeout(_aa0,10);
}else{
_aa0();
}
if(ta.form){
dojo.connect(ta.form,"onsubmit",this,function(){
ta.value=this.getValue();
});
}
}else{
html=this._preFilterContent(dijit._editor.getChildrenHtml(dn));
dn.innerHTML="";
}
if(html==""){
html="&nbsp;";
}
var _aa1=dojo.contentBox(dn);
this._oldHeight=_aa1.h;
this._oldWidth=_aa1.w;
this.savedContent=html;
if((dn["nodeName"])&&(dn.nodeName=="LI")){
dn.innerHTML=" <br>";
}
this.editingArea=dn.ownerDocument.createElement("div");
dn.appendChild(this.editingArea);
if(this.name!=""&&(!dojo.config["useXDomain"]||dojo.config["allowXdRichTextSave"])){
var _aa2=dojo.byId(dijit._scopeName+"._editor.RichText.savedContent");
if(_aa2.value!=""){
var _aa3=_aa2.value.split(this._SEPARATOR),i=0,dat;
while((dat=_aa3[i++])){
var data=dat.split(":");
if(data[0]==this.name){
html=data[1];
_aa3.splice(i,1);
break;
}
}
}
this.connect(window,"onbeforeunload","_saveContent");
}
this.isClosed=false;
if(dojo.isIE||dojo.isSafari||dojo.isOpera){
var ifr=(this.editorObject=this.iframe=dojo.doc.createElement("iframe"));
ifr.id=this.id+"_iframe";
this._iframeSrc=this._getIframeDocTxt(html);
ifr.style.border="none";
ifr.style.width="100%";
if(this._layoutMode){
ifr.style.height="100%";
}else{
if(dojo.isIE>=7){
if(this.height){
ifr.style.height=this.height;
}
if(this.minHeight){
ifr.style.minHeight=this.minHeight;
}
}else{
ifr.style.height=this.height?this.height:this.minHeight;
}
}
ifr.frameBorder=0;
ifr._loadFunc=dojo.hitch(this,function(win){
this.window=win;
this.document=this.window.document;
if(dojo.isIE){
this._localizeEditorCommands();
}
this.onLoad();
this.savedContent=this.getValue(true);
});
var s="javascript:parent.dijit.byId(\""+this.id+"\")._iframeSrc";
ifr.setAttribute("src",s);
this.editingArea.appendChild(ifr);
if(dojo.isSafari){
setTimeout(function(){
ifr.setAttribute("src",s);
},0);
}
}else{
this._drawIframe(html);
this.savedContent=this.getValue(true);
}
if(dn.nodeName=="LI"){
dn.lastChild.style.marginTop="-1.2em";
}
dojo.addClass(this.domNode,"RichTextEditable");
},_local2NativeFormatNames:{},_native2LocalFormatNames:{},_localizedIframeTitles:null,_getIframeDocTxt:function(html){
var _cs=dojo.getComputedStyle(this.domNode);
if(dojo.isIE||(!this.height&&!dojo.isMoz)){
html="<div>"+html+"</div>";
}
var font=[_cs.fontWeight,_cs.fontSize,_cs.fontFamily].join(" ");
var _aac=_cs.lineHeight;
if(_aac.indexOf("px")>=0){
_aac=parseFloat(_aac)/parseFloat(_cs.fontSize);
}else{
if(_aac.indexOf("em")>=0){
_aac=parseFloat(_aac);
}else{
_aac="1.0";
}
}
var _aad="";
this.style.replace(/(^|;)(line-|font-?)[^;]+/g,function(_aae){
_aad+=_aae.replace(/^;/g,"")+";";
});
return [this.isLeftToRight()?"<html><head>":"<html dir='rtl'><head>",(dojo.isMoz?"<title>"+this._localizedIframeTitles.iframeEditTitle+"</title>":""),"<meta http-equiv='Content-Type' content='text/html; charset="+this._charset+"'>","<style>","body,html {","\tbackground:transparent;","\tpadding: 1em 0 0 0;","\tmargin: -1em 0 0 0;","}","body{","\ttop:0px; left:0px; right:0px;","\tfont:",font,";",((this.height||dojo.isOpera)?"":"position: fixed;"),"\tmin-height:",this.minHeight,";","\tline-height:",_aac,"}","p{ margin: 1em 0; }",(this.height?"":"body,html{overflow-y:hidden;/*for IE*/} body > div {overflow-x:auto;/*FF:horizontal scrollbar*/ overflow-y:hidden;/*safari*/ min-height:"+this.minHeight+";/*safari*/}"),"li > ul:-moz-first-node, li > ol:-moz-first-node{ padding-top: 1.2em; } ","li{ min-height:1.2em; }","</style>",this._applyEditingAreaStyleSheets(),"</head><body onload='frameElement._loadFunc(window,document)' style='"+_aad+"'>"+html+"</body></html>"].join("");
},_drawIframe:function(html){
if(!this.iframe){
var ifr=this.iframe=dojo.doc.createElement("iframe");
ifr.id=this.id+"_iframe";
var ifrs=ifr.style;
ifrs.border="none";
ifrs.lineHeight="0";
ifrs.verticalAlign="bottom";
this.editorObject=this.iframe;
this._localizedIframeTitles=dojo.i18n.getLocalization("dijit.form","Textarea");
var _ab2=dojo.query("label[for=\""+this.id+"\"]");
if(_ab2.length){
this._localizedIframeTitles.iframeEditTitle=_ab2[0].innerHTML+" "+this._localizedIframeTitles.iframeEditTitle;
}
ifr._loadFunc=function(win){
};
}
this.iframe.style.width=this.inheritWidth?this._oldWidth:"100%";
if(this._layoutMode){
this.iframe.style.height="100%";
}else{
if(this.height){
this.iframe.style.height=this.height;
}else{
this.iframe.height=this._oldHeight;
}
}
var _ab4;
if(this.textarea){
_ab4=this.srcNodeRef;
}else{
_ab4=dojo.doc.createElement("div");
_ab4.style.display="none";
_ab4.innerHTML=html;
this.editingArea.appendChild(_ab4);
}
this.editingArea.appendChild(this.iframe);
var _ab5=dojo.hitch(this,function(){
if(!this.editNode){
if(!this.document){
try{
if(this.iframe.contentWindow){
this.window=this.iframe.contentWindow;
this.document=this.iframe.contentWindow.document;
}else{
if(this.iframe.contentDocument){
this.window=this.iframe.contentDocument.window;
this.document=this.iframe.contentDocument;
}
}
}
catch(e){
}
if(!this.document){
setTimeout(_ab5,50);
return;
}
var _ab6=this.document;
_ab6.open();
if(dojo.isAIR){
_ab6.body.innerHTML=html;
}else{
_ab6.write(this._getIframeDocTxt(html));
}
_ab6.close();
dojo._destroyElement(_ab4);
}
if(!this.document.body){
setTimeout(_ab5,50);
return;
}
this.onLoad();
}else{
dojo._destroyElement(_ab4);
this.editNode.innerHTML=html;
this.onDisplayChanged();
}
this._preDomFilterContent(this.editNode);
});
_ab5();
},_applyEditingAreaStyleSheets:function(){
var _ab7=[];
if(this.styleSheets){
_ab7=this.styleSheets.split(";");
this.styleSheets="";
}
_ab7=_ab7.concat(this.editingAreaStyleSheets);
this.editingAreaStyleSheets=[];
var text="",i=0,url;
while((url=_ab7[i++])){
var _aba=(new dojo._Url(dojo.global.location,url)).toString();
this.editingAreaStyleSheets.push(_aba);
text+="<link rel=\"stylesheet\" type=\"text/css\" href=\""+_aba+"\"/>";
}
return text;
},addStyleSheet:function(uri){
var url=uri.toString();
if(url.charAt(0)=="."||(url.charAt(0)!="/"&&!uri.host)){
url=(new dojo._Url(dojo.global.location,url)).toString();
}
if(dojo.indexOf(this.editingAreaStyleSheets,url)>-1){
return;
}
this.editingAreaStyleSheets.push(url);
if(this.document.createStyleSheet){
this.document.createStyleSheet(url);
}else{
var head=this.document.getElementsByTagName("head")[0];
var _abe=this.document.createElement("link");
with(_abe){
rel="stylesheet";
type="text/css";
href=url;
}
head.appendChild(_abe);
}
},removeStyleSheet:function(uri){
var url=uri.toString();
if(url.charAt(0)=="."||(url.charAt(0)!="/"&&!uri.host)){
url=(new dojo._Url(dojo.global.location,url)).toString();
}
var _ac1=dojo.indexOf(this.editingAreaStyleSheets,url);
if(_ac1==-1){
return;
}
delete this.editingAreaStyleSheets[_ac1];
dojo.withGlobal(this.window,"query",dojo,["link:[href=\""+url+"\"]"]).orphan();
},disabled:true,_mozSettingProps:{"styleWithCSS":false},_setDisabledAttr:function(_ac2){
if(!this.editNode||"_delayedDisabled" in this){
this._delayedDisabled=_ac2;
return;
}
_ac2=Boolean(_ac2);
if(dojo.isIE||dojo.isSafari||dojo.isOpera){
var _ac3=dojo.isIE&&(this.isLoaded||!this.focusOnLoad);
if(_ac3){
this.editNode.unselectable="on";
}
this.editNode.contentEditable=!_ac2;
if(_ac3){
var _ac4=this;
setTimeout(function(){
_ac4.editNode.unselectable="off";
},0);
}
}else{
try{
this.document.designMode=(_ac2?"off":"on");
}
catch(e){
return;
}
if(!_ac2&&this._mozSettingProps){
var ps=this._mozSettingProps;
for(var n in ps){
if(ps.hasOwnProperty(n)){
try{
this.document.execCommand(n,false,ps[n]);
}
catch(e){
}
}
}
}
}
this.disabled=_ac2;
},_isResized:function(){
return false;
},onLoad:function(e){
if(!this.window.__registeredWindow){
this.window.__registeredWindow=true;
dijit.registerWin(this.window);
}
if(!dojo.isIE&&(this.height||dojo.isMoz)){
this.editNode=this.document.body;
}else{
this.editNode=this.document.body.firstChild;
var _ac8=this;
if(dojo.isIE){
var _ac9=this.tabStop=dojo.doc.createElement("<div tabIndex=-1>");
this.editingArea.appendChild(_ac9);
this.iframe.onfocus=function(){
_ac8.editNode.setActive();
};
}
}
this.focusNode=this.editNode;
try{
this.attr("disabled",false);
}
catch(e){
var _aca=dojo.connect(this,"onClick",this,function(){
this.attr("disabled",false);
dojo.disconnect(_aca);
});
}
this._preDomFilterContent(this.editNode);
var _acb=this.events.concat(this.captureEvents);
var ap=(this.iframe)?this.document:this.editNode;
dojo.forEach(_acb,function(item){
this.connect(ap,item.toLowerCase(),item);
},this);
if(dojo.isIE){
this.connect(this.document,"onmousedown","_onIEMouseDown");
this.editNode.style.zoom=1;
}
if(dojo.isSafari){
this._webkitListener=dojo.connect(this.document,"onmouseup",this,"onDisplayChanged");
}
if(this.focusOnLoad){
dojo.addOnLoad(dojo.hitch(this,"focus"));
}
this.onDisplayChanged(e);
if("_delayedDisabled" in this){
var d=this._delayedDisabled;
delete this._delayedDisabled;
this.attr("disabled",d);
}
this.isLoaded=true;
if(this.onLoadDeferred){
this.onLoadDeferred.callback(true);
}
},onKeyDown:function(e){
if(e.keyCode===dojo.keys.TAB&&this.isTabIndent){
dojo.stopEvent(e);
if(this.queryCommandEnabled((e.shiftKey?"outdent":"indent"))){
this.execCommand((e.shiftKey?"outdent":"indent"));
}
}
if(dojo.isIE){
if(e.keyCode==dojo.keys.TAB&&!this.isTabIndent){
if(e.shiftKey&&!e.ctrlKey&&!e.altKey){
this.iframe.focus();
}else{
if(!e.shiftKey&&!e.ctrlKey&&!e.altKey){
this.tabStop.focus();
}
}
}else{
if(e.keyCode===dojo.keys.BACKSPACE&&this.document.selection.type==="Control"){
dojo.stopEvent(e);
this.execCommand("delete");
}else{
if((65<=e.keyCode&&e.keyCode<=90)||(e.keyCode>=37&&e.keyCode<=40)){
e.charCode=e.keyCode;
this.onKeyPress(e);
}
}
}
}else{
if(dojo.isMoz&&!this.isTabIndent){
if(e.keyCode==dojo.keys.TAB&&!e.shiftKey&&!e.ctrlKey&&!e.altKey&&this.iframe){
var _ad0=dojo.isFF<3?this.iframe.contentDocument:this.iframe;
_ad0.title=this._localizedIframeTitles.iframeFocusTitle;
this.iframe.focus();
dojo.stopEvent(e);
}else{
if(e.keyCode==dojo.keys.TAB&&e.shiftKey){
if(this.toolbar){
this.toolbar.focus();
}
dojo.stopEvent(e);
}
}
}
}
return true;
},onKeyUp:function(e){
return;
},setDisabled:function(_ad2){
dojo.deprecated("dijit.Editor::setDisabled is deprecated","use dijit.Editor::attr(\"disabled\",boolean) instead",2);
this.attr("disabled",_ad2);
},_setValueAttr:function(_ad3){
this.setValue(_ad3);
},onKeyPress:function(e){
var c=(e.keyChar&&e.keyChar.toLowerCase())||e.keyCode;
var _ad6=this._keyHandlers[c];
var args=arguments;
if(_ad6&&!e.altKey){
dojo.forEach(_ad6,function(h){
if((!!h.shift==!!e.shiftKey)&&(!!h.ctrl==!!e.ctrlKey)){
if(!h.handler.apply(this,args)){
e.preventDefault();
}
}
},this);
}
if(!this._onKeyHitch){
this._onKeyHitch=dojo.hitch(this,"onKeyPressed");
}
setTimeout(this._onKeyHitch,1);
return true;
},addKeyHandler:function(key,ctrl,_adb,_adc){
if(!dojo.isArray(this._keyHandlers[key])){
this._keyHandlers[key]=[];
}
this._keyHandlers[key].push({shift:_adb||false,ctrl:ctrl||false,handler:_adc});
},onKeyPressed:function(){
this.onDisplayChanged();
},onClick:function(e){
this.onDisplayChanged(e);
},_onIEMouseDown:function(e){
if(!this._focused&&!this.disabled){
this.focus();
}
},_onBlur:function(e){
this.inherited(arguments);
var _c=this.getValue(true);
if(_c!=this.savedContent){
this.onChange(_c);
this.savedContent=_c;
}
if(dojo.isMoz&&this.iframe){
var _ae1=dojo.isFF<3?this.iframe.contentDocument:this.iframe;
_ae1.title=this._localizedIframeTitles.iframeEditTitle;
}
},_initialFocus:true,_onFocus:function(e){
if(dojo.isMoz&&this._initialFocus){
this._initialFocus=false;
if(this.editNode.innerHTML.replace(/^\s+|\s+$/g,"")=="&nbsp;"){
this.placeCursorAtStart();
}
}
this.inherited(arguments);
},blur:function(){
if(!dojo.isIE&&this.window.document.documentElement&&this.window.document.documentElement.focus){
this.window.document.documentElement.focus();
}else{
if(dojo.doc.body.focus){
dojo.doc.body.focus();
}
}
},focus:function(){
if(!dojo.isIE){
dijit.focus(this.iframe);
}else{
if(this.editNode&&this.editNode.focus){
this.iframe.fireEvent("onfocus",document.createEventObject());
}
}
},updateInterval:200,_updateTimer:null,onDisplayChanged:function(e){
if(this._updateTimer){
clearTimeout(this._updateTimer);
}
if(!this._updateHandler){
this._updateHandler=dojo.hitch(this,"onNormalizedDisplayChanged");
}
this._updateTimer=setTimeout(this._updateHandler,this.updateInterval);
},onNormalizedDisplayChanged:function(){
delete this._updateTimer;
},onChange:function(_ae4){
},_normalizeCommand:function(cmd,_ae6){
var _ae7=cmd.toLowerCase();
if(_ae7=="formatblock"){
if(dojo.isSafari&&_ae6===undefined){
_ae7="heading";
}
}else{
if(_ae7=="hilitecolor"&&!dojo.isMoz){
_ae7="backcolor";
}
}
return _ae7;
},_qcaCache:{},queryCommandAvailable:function(_ae8){
var ca=this._qcaCache[_ae8];
if(ca!=undefined){
return ca;
}
return this._qcaCache[_ae8]=this._queryCommandAvailable(_ae8);
},_queryCommandAvailable:function(_aea){
var ie=1;
var _aec=1<<1;
var _aed=1<<2;
var _aee=1<<3;
var _aef=1<<4;
var _af0=dojo.isSafari;
function isSupportedBy(_af1){
return {ie:Boolean(_af1&ie),mozilla:Boolean(_af1&_aec),safari:Boolean(_af1&_aed),safari420:Boolean(_af1&_aef),opera:Boolean(_af1&_aee)};
};
var _af2=null;
switch(_aea.toLowerCase()){
case "bold":
case "italic":
case "underline":
case "subscript":
case "superscript":
case "fontname":
case "fontsize":
case "forecolor":
case "hilitecolor":
case "justifycenter":
case "justifyfull":
case "justifyleft":
case "justifyright":
case "delete":
case "selectall":
case "toggledir":
_af2=isSupportedBy(_aec|ie|_aed|_aee);
break;
case "createlink":
case "unlink":
case "removeformat":
case "inserthorizontalrule":
case "insertimage":
case "insertorderedlist":
case "insertunorderedlist":
case "indent":
case "outdent":
case "formatblock":
case "inserthtml":
case "undo":
case "redo":
case "strikethrough":
case "tabindent":
_af2=isSupportedBy(_aec|ie|_aee|_aef);
break;
case "blockdirltr":
case "blockdirrtl":
case "dirltr":
case "dirrtl":
case "inlinedirltr":
case "inlinedirrtl":
_af2=isSupportedBy(ie);
break;
case "cut":
case "copy":
case "paste":
_af2=isSupportedBy(ie|_aec|_aef);
break;
case "inserttable":
_af2=isSupportedBy(_aec|ie);
break;
case "insertcell":
case "insertcol":
case "insertrow":
case "deletecells":
case "deletecols":
case "deleterows":
case "mergecells":
case "splitcell":
_af2=isSupportedBy(ie|_aec);
break;
default:
return false;
}
return (dojo.isIE&&_af2.ie)||(dojo.isMoz&&_af2.mozilla)||(dojo.isSafari&&_af2.safari)||(_af0&&_af2.safari420)||(dojo.isOpera&&_af2.opera);
},execCommand:function(_af3,_af4){
var _af5;
this.focus();
_af3=this._normalizeCommand(_af3,_af4);
if(_af4!=undefined){
if(_af3=="heading"){
throw new Error("unimplemented");
}else{
if((_af3=="formatblock")&&dojo.isIE){
_af4="<"+_af4+">";
}
}
}
if(_af3==="inserthorizontalrule"&&dojo.isIE){
_af3="inserthtml";
_af4="<hr>";
}
if(_af3=="inserthtml"){
_af4=this._preFilterContent(_af4);
_af5=true;
if(dojo.isIE){
var _af6=this.document.selection.createRange();
if(this.document.selection.type.toUpperCase()=="CONTROL"){
var n=_af6.item(0);
while(_af6.length){
_af6.remove(_af6.item(0));
}
n.outerHTML=_af4;
}else{
_af6.pasteHTML(_af4);
}
_af6.select();
}else{
if(dojo.isMoz&&!_af4.length){
this._sCall("remove");
}else{
_af5=this.document.execCommand(_af3,false,_af4);
}
}
}else{
if((_af3=="unlink")&&(this.queryCommandEnabled("unlink"))&&(dojo.isMoz||dojo.isSafari)){
var a=this._sCall("getAncestorElement",["a"]);
this._sCall("selectElement",[a]);
_af5=this.document.execCommand("unlink",false,null);
}else{
if((_af3=="hilitecolor")&&(dojo.isMoz)){
this.document.execCommand("styleWithCSS",false,true);
_af5=this.document.execCommand(_af3,false,_af4);
this.document.execCommand("styleWithCSS",false,false);
}else{
if((dojo.isIE)&&((_af3=="backcolor")||(_af3=="forecolor"))){
_af4=arguments.length>1?_af4:null;
_af5=this.document.execCommand(_af3,false,_af4);
}else{
_af4=arguments.length>1?_af4:null;
if(_af4||_af3!="createlink"){
_af5=this.document.execCommand(_af3,false,_af4);
}
}
}
}
}
this.onDisplayChanged();
return _af5;
},queryCommandEnabled:function(_af9){
if(this.disabled){
return false;
}
_af9=this._normalizeCommand(_af9);
if(dojo.isMoz||dojo.isSafari){
if(_af9=="unlink"){
this._sCall("hasAncestorElement",["a"]);
}else{
if(_af9=="inserttable"){
return true;
}
}
}
if(dojo.isSafari){
if(_af9=="copy"){
_af9="cut";
}else{
if(_af9=="paste"){
return true;
}
}
}
var elem=dojo.isIE?this.document.selection.createRange():this.document;
return elem.queryCommandEnabled(_af9);
},queryCommandState:function(_afb){
if(this.disabled){
return false;
}
_afb=this._normalizeCommand(_afb);
return this.document.queryCommandState(_afb);
},queryCommandValue:function(_afc){
if(this.disabled){
return false;
}
var r;
_afc=this._normalizeCommand(_afc);
if(dojo.isIE&&_afc=="formatblock"){
r=this._native2LocalFormatNames[this.document.queryCommandValue(_afc)];
}else{
r=this.document.queryCommandValue(_afc);
}
return r;
},_sCall:function(name,args){
return dojo.withGlobal(this.window,name,dijit._editor.selection,args);
},placeCursorAtStart:function(){
this.focus();
var _b00=false;
if(dojo.isMoz){
var _b01=this.editNode.firstChild;
while(_b01){
if(_b01.nodeType==3){
if(_b01.nodeValue.replace(/^\s+|\s+$/g,"").length>0){
_b00=true;
this._sCall("selectElement",[_b01]);
break;
}
}else{
if(_b01.nodeType==1){
_b00=true;
this._sCall("selectElementChildren",[_b01]);
break;
}
}
_b01=_b01.nextSibling;
}
}else{
_b00=true;
this._sCall("selectElementChildren",[this.editNode]);
}
if(_b00){
this._sCall("collapse",[true]);
}
},placeCursorAtEnd:function(){
this.focus();
var _b02=false;
if(dojo.isMoz){
var last=this.editNode.lastChild;
while(last){
if(last.nodeType==3){
if(last.nodeValue.replace(/^\s+|\s+$/g,"").length>0){
_b02=true;
this._sCall("selectElement",[last]);
break;
}
}else{
if(last.nodeType==1){
_b02=true;
if(last.lastChild){
this._sCall("selectElement",[last.lastChild]);
}else{
this._sCall("selectElement",[last]);
}
break;
}
}
last=last.previousSibling;
}
}else{
_b02=true;
this._sCall("selectElementChildren",[this.editNode]);
}
if(_b02){
this._sCall("collapse",[false]);
}
},getValue:function(_b04){
if(this.textarea){
if(this.isClosed||!this.isLoaded){
return this.textarea.value;
}
}
return this._postFilterContent(null,_b04);
},_getValueAttr:function(){
return this.getValue();
},setValue:function(html){
if(!this.isLoaded){
this.onLoadDeferred.addCallback(dojo.hitch(this,function(){
this.setValue(html);
}));
return;
}
if(this.textarea&&(this.isClosed||!this.isLoaded)){
this.textarea.value=html;
}else{
html=this._preFilterContent(html);
var node=this.isClosed?this.domNode:this.editNode;
node.innerHTML=html;
this._preDomFilterContent(node);
}
this.onDisplayChanged();
},replaceValue:function(html){
if(this.isClosed){
this.setValue(html);
}else{
if(this.window&&this.window.getSelection&&!dojo.isMoz){
this.setValue(html);
}else{
if(this.window&&this.window.getSelection){
html=this._preFilterContent(html);
this.execCommand("selectall");
if(dojo.isMoz&&!html){
html="&nbsp;";
}
this.execCommand("inserthtml",html);
this._preDomFilterContent(this.editNode);
}else{
if(this.document&&this.document.selection){
this.setValue(html);
}
}
}
}
},_preFilterContent:function(html){
var ec=html;
dojo.forEach(this.contentPreFilters,function(ef){
if(ef){
ec=ef(ec);
}
});
return ec;
},_preDomFilterContent:function(dom){
dom=dom||this.editNode;
dojo.forEach(this.contentDomPreFilters,function(ef){
if(ef&&dojo.isFunction(ef)){
ef(dom);
}
},this);
},_postFilterContent:function(dom,_b0e){
var ec;
if(!dojo.isString(dom)){
dom=dom||this.editNode;
if(this.contentDomPostFilters.length){
if(_b0e){
dom=dojo.clone(dom);
}
dojo.forEach(this.contentDomPostFilters,function(ef){
dom=ef(dom);
});
}
ec=dijit._editor.getChildrenHtml(dom);
}else{
ec=dom;
}
if(!dojo.trim(ec.replace(/^\xA0\xA0*/,"").replace(/\xA0\xA0*$/,"")).length){
ec="";
}
dojo.forEach(this.contentPostFilters,function(ef){
ec=ef(ec);
});
return ec;
},_saveContent:function(e){
var _b13=dojo.byId(dijit._scopeName+"._editor.RichText.savedContent");
_b13.value+=this._SEPARATOR+this.name+":"+this.getValue();
},escapeXml:function(str,_b15){
str=str.replace(/&/gm,"&amp;").replace(/</gm,"&lt;").replace(/>/gm,"&gt;").replace(/"/gm,"&quot;");
if(!_b15){
str=str.replace(/'/gm,"&#39;");
}
return str;
},getNodeHtml:function(node){
dojo.deprecated("dijit.Editor::getNodeHtml is deprecated","use dijit._editor.getNodeHtml instead",2);
return dijit._editor.getNodeHtml(node);
},getNodeChildrenHtml:function(dom){
dojo.deprecated("dijit.Editor::getNodeChildrenHtml is deprecated","use dijit._editor.getChildrenHtml instead",2);
return dijit._editor.getChildrenHtml(dom);
},close:function(save,_b19){
if(this.isClosed){
return false;
}
if(!arguments.length){
save=true;
}
this._content=this.getValue();
var _b1a=(this.savedContent!=this._content);
if(this.interval){
clearInterval(this.interval);
}
if(this._webkitListener){
dojo.disconnect(this._webkitListener);
delete this._webkitListener;
}
if(dojo.isIE){
this.iframe.onfocus=null;
}
this.iframe._loadFunc=null;
if(this.textarea){
with(this.textarea.style){
position="";
left=top="";
if(dojo.isIE){
overflow=this.__overflow;
this.__overflow=null;
}
}
this.textarea.value=save?this._content:this.savedContent;
dojo._destroyElement(this.domNode);
this.domNode=this.textarea;
}else{
this.domNode.innerHTML=save?this._content:this.savedContent;
}
delete this.iframe;
dojo.removeClass(this.domNode,"RichTextEditable");
this.isClosed=true;
this.isLoaded=false;
delete this.editNode;
if(this.window&&this.window._frameElement){
this.window._frameElement=null;
}
this.window=null;
this.document=null;
this.editingArea=null;
this.editorObject=null;
return _b1a;
},destroyRendering:function(_b1b){
this.inherited(arguments,[true]);
},destroy:function(){
if(!this.isClosed){
this.close(false);
}
this.inherited("destroy",arguments);
},_removeMozBogus:function(html){
return html.replace(/\stype="_moz"/gi,"").replace(/\s_moz_dirty=""/gi,"");
},_removeSafariBogus:function(html){
return html.replace(/\sclass="webkit-block-placeholder"/gi,"");
},_fixContentForMoz:function(html){
return html.replace(/<(\/)?strong([ \>])/gi,"<$1b$2").replace(/<(\/)?em([ \>])/gi,"<$1i$2");
},_preFixUrlAttributes:function(html){
return html.replace(/(?:(<a(?=\s).*?\shref=)("|')(.*?)\2)|(?:(<a\s.*?href=)([^"'][^ >]+))/gi,"$1$4$2$3$5$2 _djrealurl=$2$3$5$2").replace(/(?:(<img(?=\s).*?\ssrc=)("|')(.*?)\2)|(?:(<img\s.*?src=)([^"'][^ >]+))/gi,"$1$4$2$3$5$2 _djrealurl=$2$3$5$2");
}});
}
if(!dojo._hasResource["dijit.Toolbar"]){
dojo._hasResource["dijit.Toolbar"]=true;
dojo.provide("dijit.Toolbar");
dojo.declare("dijit.Toolbar",[dijit._Widget,dijit._Templated,dijit._KeyNavContainer],{templateString:"<div class=\"dijit dijitToolbar\" waiRole=\"toolbar\" tabIndex=\"${tabIndex}\" dojoAttachPoint=\"containerNode\">"+"</div>",tabIndex:"0",postCreate:function(){
this.connectKeyNavHandlers(this.isLeftToRight()?[dojo.keys.LEFT_ARROW]:[dojo.keys.RIGHT_ARROW],this.isLeftToRight()?[dojo.keys.RIGHT_ARROW]:[dojo.keys.LEFT_ARROW]);
},startup:function(){
if(this._started){
return;
}
this.startupKeyNavChildren();
this.inherited(arguments);
}});
dojo.declare("dijit.ToolbarSeparator",[dijit._Widget,dijit._Templated],{templateString:"<div class=\"dijitToolbarSeparator dijitInline\"></div>",postCreate:function(){
dojo.setSelectable(this.domNode,false);
},isFocusable:function(){
return false;
}});
}
if(!dojo._hasResource["dijit._editor._Plugin"]){
dojo._hasResource["dijit._editor._Plugin"]=true;
dojo.provide("dijit._editor._Plugin");
dojo.declare("dijit._editor._Plugin",null,{constructor:function(args,node){
if(args){
dojo.mixin(this,args);
}
this._connects=[];
},editor:null,iconClassPrefix:"dijitEditorIcon",button:null,queryCommand:null,command:"",commandArg:null,useDefaultCommand:true,buttonClass:dijit.form.Button,getLabel:function(key){
return this.editor.commands[key];
},_initButton:function(_b23){
if(this.command.length){
var _b24=this.getLabel(this.command);
var _b25=this.iconClassPrefix+" "+this.iconClassPrefix+this.command.charAt(0).toUpperCase()+this.command.substr(1);
if(!this.button){
_b23=dojo.mixin({label:_b24,showLabel:false,iconClass:_b25,dropDown:this.dropDown,tabIndex:"-1"},_b23||{});
this.button=new this.buttonClass(_b23);
}
}
},destroy:function(f){
dojo.forEach(this._connects,dojo.disconnect);
},connect:function(o,f,tf){
this._connects.push(dojo.connect(o,f,this,tf));
},updateState:function(){
var e=this.editor;
var c=this.command;
if(!e){
return;
}
if(!e.isLoaded){
return;
}
if(!c.length){
return;
}
if(this.button){
try{
var _b2c=e.queryCommandEnabled(c);
if(this.enabled!==_b2c){
this.enabled=_b2c;
this.button.attr("disabled",!_b2c);
}
if(typeof this.button.checked=="boolean"){
var _b2d=e.queryCommandState(c);
if(this.checked!==_b2d){
this.checked=_b2d;
this.button.attr("checked",e.queryCommandState(c));
}
}
}
catch(err){
console.debug(err);
}
}
},setEditor:function(_b2e){
this.editor=_b2e;
this._initButton();
if(this.command.length&&!this.editor.queryCommandAvailable(this.command)){
if(this.button){
this.button.domNode.style.display="none";
}
}
if(this.button&&this.useDefaultCommand){
this.connect(this.button,"onClick",dojo.hitch(this.editor,"execCommand",this.command,this.commandArg));
}
this.connect(this.editor,"onNormalizedDisplayChanged","updateState");
},setToolbar:function(_b2f){
if(this.button){
_b2f.addChild(this.button);
}
}});
}
if(!dojo._hasResource["dijit._editor.plugins.EnterKeyHandling"]){
dojo._hasResource["dijit._editor.plugins.EnterKeyHandling"]=true;
dojo.provide("dijit._editor.plugins.EnterKeyHandling");
dojo.declare("dijit._editor.plugins.EnterKeyHandling",dijit._editor._Plugin,{blockNodeForEnter:"BR",constructor:function(args){
if(args){
dojo.mixin(this,args);
}
},setEditor:function(_b31){
this.editor=_b31;
if(this.blockNodeForEnter=="BR"){
if(dojo.isIE){
_b31.contentDomPreFilters.push(dojo.hitch(this,"regularPsToSingleLinePs"));
_b31.contentDomPostFilters.push(dojo.hitch(this,"singleLinePsToRegularPs"));
_b31.onLoadDeferred.addCallback(dojo.hitch(this,"_fixNewLineBehaviorForIE"));
}else{
_b31.onLoadDeferred.addCallback(dojo.hitch(this,function(d){
try{
this.editor.document.execCommand("insertBrOnReturn",false,true);
}
catch(e){
}
return d;
}));
}
}else{
if(this.blockNodeForEnter){
dojo["require"]("dijit._editor.range");
var h=dojo.hitch(this,this.handleEnterKey);
_b31.addKeyHandler(13,0,0,h);
_b31.addKeyHandler(13,0,1,h);
this.connect(this.editor,"onKeyPressed","onKeyPressed");
}
}
},connect:function(o,f,tf){
if(!this._connects){
this._connects=[];
}
this._connects.push(dojo.connect(o,f,this,tf));
},destroy:function(){
dojo.forEach(this._connects,dojo.disconnect);
this._connects=[];
},onKeyPressed:function(e){
if(this._checkListLater){
if(dojo.withGlobal(this.editor.window,"isCollapsed",dijit)){
var _b38=dojo.withGlobal(this.editor.window,"getAncestorElement",dijit._editor.selection,["LI"]);
if(!_b38){
dijit._editor.RichText.prototype.execCommand.call(this.editor,"formatblock",this.blockNodeForEnter);
var _b39=dojo.withGlobal(this.editor.window,"getAncestorElement",dijit._editor.selection,[this.blockNodeForEnter]);
if(_b39){
_b39.innerHTML=this.bogusHtmlContent;
if(dojo.isIE){
var r=this.editor.document.selection.createRange();
r.move("character",-1);
r.select();
}
}else{
console.error("onKeyPressed: Cannot find the new block node");
}
}else{
if(dojo.isMoz){
if(_b38.parentNode.parentNode.nodeName=="LI"){
_b38=_b38.parentNode.parentNode;
}
}
var fc=_b38.firstChild;
if(fc&&fc.nodeType==1&&(fc.nodeName=="UL"||fc.nodeName=="OL")){
_b38.insertBefore(fc.ownerDocument.createTextNode(" "),fc);
var _b3c=dijit.range.create(this.editor.window);
_b3c.setStart(_b38.firstChild,0);
var _b3d=dijit.range.getSelection(this.editor.window,true);
_b3d.removeAllRanges();
_b3d.addRange(_b3c);
}
}
}
this._checkListLater=false;
}
if(this._pressedEnterInBlock){
if(this._pressedEnterInBlock.previousSibling){
this.removeTrailingBr(this._pressedEnterInBlock.previousSibling);
}
delete this._pressedEnterInBlock;
}
},bogusHtmlContent:"&nbsp;",blockNodes:/^(?:P|H1|H2|H3|H4|H5|H6|LI)$/,handleEnterKey:function(e){
if(!this.blockNodeForEnter){
return true;
}
var _b3f,_b40,_b41,doc=this.editor.document,br;
if(e.shiftKey||this.blockNodeForEnter=="BR"){
var _b44=dojo.withGlobal(this.editor.window,"getParentElement",dijit._editor.selection);
var _b45=dijit.range.getAncestor(_b44,this.blockNodes);
if(_b45){
if(!e.shiftKey&&_b45.tagName=="LI"){
return true;
}
_b3f=dijit.range.getSelection(this.editor.window);
_b40=_b3f.getRangeAt(0);
if(!_b40.collapsed){
_b40.deleteContents();
}
if(dijit.range.atBeginningOfContainer(_b45,_b40.startContainer,_b40.startOffset)){
if(e.shiftKey){
br=doc.createElement("br");
_b41=dijit.range.create(this.editor.window);
_b45.insertBefore(br,_b45.firstChild);
_b41.setStartBefore(br.nextSibling);
_b3f.removeAllRanges();
_b3f.addRange(_b41);
}else{
dojo.place(br,_b45,"before");
}
}else{
if(dijit.range.atEndOfContainer(_b45,_b40.startContainer,_b40.startOffset)){
_b41=dijit.range.create(this.editor.window);
br=doc.createElement("br");
if(e.shiftKey){
_b45.appendChild(br);
_b45.appendChild(doc.createTextNode(" "));
_b41.setStart(_b45.lastChild,0);
}else{
dojo.place(br,_b45,"after");
_b41.setStartAfter(_b45);
}
_b3f.removeAllRanges();
_b3f.addRange(_b41);
}else{
return true;
}
}
}else{
dijit._editor.RichText.prototype.execCommand.call(this.editor,"inserthtml","<br>");
}
return false;
}
var _b46=true;
_b3f=dijit.range.getSelection(this.editor.window);
_b40=_b3f.getRangeAt(0);
if(!_b40.collapsed){
_b40.deleteContents();
}
var _b47=dijit.range.getBlockAncestor(_b40.endContainer,null,this.editor.editNode);
var _b48=_b47.blockNode;
if((this._checkListLater=(_b48&&(_b48.nodeName=="LI"||_b48.parentNode.nodeName=="LI")))){
if(dojo.isMoz){
this._pressedEnterInBlock=_b48;
}
if(/^(\s|&nbsp;|\xA0|<span\b[^>]*\bclass=['"]Apple-style-span['"][^>]*>(\s|&nbsp;|\xA0)<\/span>)?(<br>)?$/.test(_b48.innerHTML)){
_b48.innerHTML="";
if(dojo.isSafari){
_b41=dijit.range.create(this.editor.window);
_b41.setStart(_b48,0);
_b3f.removeAllRanges();
_b3f.addRange(_b41);
}
this._checkListLater=false;
}
return true;
}
if(!_b47.blockNode||_b47.blockNode===this.editor.editNode){
try{
dijit._editor.RichText.prototype.execCommand.call(this.editor,"formatblock",this.blockNodeForEnter);
}
catch(e2){
}
_b47={blockNode:dojo.withGlobal(this.editor.window,"getAncestorElement",dijit._editor.selection,[this.blockNodeForEnter]),blockContainer:this.editor.editNode};
if(_b47.blockNode){
if(_b47.blockNode!=this.editor.editNode&&(!(_b47.blockNode.textContent||_b47.blockNode.innerHTML).replace(/^\s+|\s+$/g,"").length)){
this.removeTrailingBr(_b47.blockNode);
return false;
}
}else{
_b47.blockNode=this.editor.editNode;
}
_b3f=dijit.range.getSelection(this.editor.window);
_b40=_b3f.getRangeAt(0);
}
var _b49=doc.createElement(this.blockNodeForEnter);
_b49.innerHTML=this.bogusHtmlContent;
this.removeTrailingBr(_b47.blockNode);
if(dijit.range.atEndOfContainer(_b47.blockNode,_b40.endContainer,_b40.endOffset)){
if(_b47.blockNode===_b47.blockContainer){
_b47.blockNode.appendChild(_b49);
}else{
dojo.place(_b49,_b47.blockNode,"after");
}
_b46=false;
_b41=dijit.range.create(this.editor.window);
_b41.setStart(_b49,0);
_b3f.removeAllRanges();
_b3f.addRange(_b41);
if(this.editor.height){
dijit.scrollIntoView(_b49);
}
}else{
if(dijit.range.atBeginningOfContainer(_b47.blockNode,_b40.startContainer,_b40.startOffset)){
dojo.place(_b49,_b47.blockNode,_b47.blockNode===_b47.blockContainer?"first":"before");
if(_b49.nextSibling&&this.editor.height){
_b41=dijit.range.create(this.editor.window);
_b41.setStart(_b49.nextSibling,0);
_b3f.removeAllRanges();
_b3f.addRange(_b41);
dijit.scrollIntoView(_b49.nextSibling);
}
_b46=false;
}else{
if(dojo.isMoz){
this._pressedEnterInBlock=_b47.blockNode;
}
}
}
return _b46;
},removeTrailingBr:function(_b4a){
var para=/P|DIV|LI/i.test(_b4a.tagName)?_b4a:dijit._editor.selection.getParentOfType(_b4a,["P","DIV","LI"]);
if(!para){
return;
}
if(para.lastChild){
if((para.childNodes.length>1&&para.lastChild.nodeType==3&&/^[\s\xAD]*$/.test(para.lastChild.nodeValue))||para.lastChild.tagName=="BR"){
dojo._destroyElement(para.lastChild);
}
}
if(!para.childNodes.length){
para.innerHTML=this.bogusHtmlContent;
}
},_fixNewLineBehaviorForIE:function(d){
if(this.editor.document.__INSERTED_EDITIOR_NEWLINE_CSS===undefined){
var _b4d="p{margin:0 !important;}";
var _b4e=function(_b4f,doc,URI){
if(!_b4f){
return null;
}
if(!doc){
doc=document;
}
var _b52=doc.createElement("style");
_b52.setAttribute("type","text/css");
var head=doc.getElementsByTagName("head")[0];
if(!head){
console.debug("No head tag in document, aborting styles");
return null;
}else{
head.appendChild(_b52);
}
if(_b52.styleSheet){
var _b54=function(){
try{
_b52.styleSheet.cssText=_b4f;
}
catch(e){
console.debug(e);
}
};
if(_b52.styleSheet.disabled){
setTimeout(_b54,10);
}else{
_b54();
}
}else{
var _b55=doc.createTextNode(_b4f);
_b52.appendChild(_b55);
}
return _b52;
};
_b4e(_b4d,this.editor.document);
this.editor.document.__INSERTED_EDITIOR_NEWLINE_CSS=true;
return d;
}
return null;
},regularPsToSingleLinePs:function(_b56,_b57){
function wrapLinesInPs(el){
function wrapNodes(_b59){
var newP=_b59[0].ownerDocument.createElement("p");
_b59[0].parentNode.insertBefore(newP,_b59[0]);
dojo.forEach(_b59,function(node){
newP.appendChild(node);
});
};
var _b5c=0;
var _b5d=[];
var _b5e;
while(_b5c<el.childNodes.length){
_b5e=el.childNodes[_b5c];
if(_b5e.nodeType==3||(_b5e.nodeType==1&&_b5e.nodeName!="BR"&&dojo.style(_b5e,"display")!="block")){
_b5d.push(_b5e);
}else{
var _b5f=_b5e.nextSibling;
if(_b5d.length){
wrapNodes(_b5d);
_b5c=(_b5c+1)-_b5d.length;
if(_b5e.nodeName=="BR"){
dojo._destroyElement(_b5e);
}
}
_b5d=[];
}
_b5c++;
}
if(_b5d.length){
wrapNodes(_b5d);
}
};
function splitP(el){
var _b61=null;
var _b62=[];
var _b63=el.childNodes.length-1;
for(var i=_b63;i>=0;i--){
_b61=el.childNodes[i];
if(_b61.nodeName=="BR"){
var newP=_b61.ownerDocument.createElement("p");
dojo.place(newP,el,"after");
if(_b62.length==0&&i!=_b63){
newP.innerHTML="&nbsp;";
}
dojo.forEach(_b62,function(node){
newP.appendChild(node);
});
dojo._destroyElement(_b61);
_b62=[];
}else{
_b62.unshift(_b61);
}
}
};
var _b67=[];
var ps=_b56.getElementsByTagName("p");
dojo.forEach(ps,function(p){
_b67.push(p);
});
dojo.forEach(_b67,function(p){
if((p.previousSibling)&&(p.previousSibling.nodeName=="P"||dojo.style(p.previousSibling,"display")!="block")){
var newP=p.parentNode.insertBefore(this.document.createElement("p"),p);
newP.innerHTML=_b57?"":"&nbsp;";
}
splitP(p);
},this.editor);
wrapLinesInPs(_b56);
return _b56;
},singleLinePsToRegularPs:function(_b6c){
function getParagraphParents(node){
var ps=node.getElementsByTagName("p");
var _b6f=[];
for(var i=0;i<ps.length;i++){
var p=ps[i];
var _b72=false;
for(var k=0;k<_b6f.length;k++){
if(_b6f[k]===p.parentNode){
_b72=true;
break;
}
}
if(!_b72){
_b6f.push(p.parentNode);
}
}
return _b6f;
};
function isParagraphDelimiter(node){
if(node.nodeType!=1||node.tagName!="P"){
return dojo.style(node,"display")=="block";
}else{
if(!node.childNodes.length||node.innerHTML=="&nbsp;"){
return true;
}
}
return false;
};
var _b75=getParagraphParents(_b6c);
for(var i=0;i<_b75.length;i++){
var _b77=_b75[i];
var _b78=null;
var node=_b77.firstChild;
var _b7a=null;
while(node){
if(node.nodeType!="1"||node.tagName!="P"){
_b78=null;
}else{
if(isParagraphDelimiter(node)){
_b7a=node;
_b78=null;
}else{
if(_b78==null){
_b78=node;
}else{
if((!_b78.lastChild||_b78.lastChild.nodeName!="BR")&&(node.firstChild)&&(node.firstChild.nodeName!="BR")){
_b78.appendChild(this.editor.document.createElement("br"));
}
while(node.firstChild){
_b78.appendChild(node.firstChild);
}
_b7a=node;
}
}
}
node=node.nextSibling;
if(_b7a){
dojo._destroyElement(_b7a);
_b7a=null;
}
}
}
return _b6c;
}});
}
if(!dojo._hasResource["dijit.Editor"]){
dojo._hasResource["dijit.Editor"]=true;
dojo.provide("dijit.Editor");
dojo.declare("dijit.Editor",dijit._editor.RichText,{plugins:null,extraPlugins:null,constructor:function(){
if(!dojo.isArray(this.plugins)){
this.plugins=["undo","redo","|","cut","copy","paste","|","bold","italic","underline","strikethrough","|","insertOrderedList","insertUnorderedList","indent","outdent","|","justifyLeft","justifyRight","justifyCenter","justifyFull","dijit._editor.plugins.EnterKeyHandling"];
}
this._plugins=[];
this._editInterval=this.editActionInterval*1000;
if(dojo.isIE){
this.events.push("onBeforeDeactivate");
}
},postCreate:function(){
if(this.customUndo){
dojo["require"]("dijit._editor.range");
this._steps=this._steps.slice(0);
this._undoedSteps=this._undoedSteps.slice(0);
}
if(dojo.isArray(this.extraPlugins)){
this.plugins=this.plugins.concat(this.extraPlugins);
}
this.inherited(arguments);
this.commands=dojo.i18n.getLocalization("dijit._editor","commands",this.lang);
if(!this.toolbar){
this.toolbar=new dijit.Toolbar({});
dojo.place(this.toolbar.domNode,this.editingArea,"before");
}
dojo.forEach(this.plugins,this.addPlugin,this);
this.onNormalizedDisplayChanged();
this.toolbar.startup();
},destroy:function(){
dojo.forEach(this._plugins,function(p){
if(p&&p.destroy){
p.destroy();
}
});
this._plugins=[];
this.toolbar.destroy();
delete this.toolbar;
this.inherited(arguments);
},addPlugin:function(_b7c,_b7d){
var args=dojo.isString(_b7c)?{name:_b7c}:_b7c;
if(!args.setEditor){
var o={"args":args,"plugin":null,"editor":this};
dojo.publish(dijit._scopeName+".Editor.getPlugin",[o]);
if(!o.plugin){
var pc=dojo.getObject(args.name);
if(pc){
o.plugin=new pc(args);
}
}
if(!o.plugin){
console.warn("Cannot find plugin",_b7c);
return;
}
_b7c=o.plugin;
}
if(arguments.length>1){
this._plugins[_b7d]=_b7c;
}else{
this._plugins.push(_b7c);
}
_b7c.setEditor(this);
if(dojo.isFunction(_b7c.setToolbar)){
_b7c.setToolbar(this.toolbar);
}
},startup:function(){
},resize:function(){
dijit.layout._LayoutWidget.prototype.resize.apply(this,arguments);
},layout:function(){
this.editingArea.style.height=(this._contentBox.h-dojo.marginBox(this.toolbar.domNode).h)+"px";
if(this.iframe){
this.iframe.style.height="100%";
}
this._layoutMode=true;
},_onIEMouseDown:function(e){
delete this._savedSelection;
if(e.target.tagName=="BODY"){
setTimeout(dojo.hitch(this,"placeCursorAtEnd"),0);
}
this.inherited(arguments);
},onBeforeDeactivate:function(e){
if(this.customUndo){
this.endEditing(true);
}
this._saveSelection();
},customUndo:dojo.isIE,editActionInterval:3,beginEditing:function(cmd){
if(!this._inEditing){
this._inEditing=true;
this._beginEditing(cmd);
}
if(this.editActionInterval>0){
if(this._editTimer){
clearTimeout(this._editTimer);
}
this._editTimer=setTimeout(dojo.hitch(this,this.endEditing),this._editInterval);
}
},_steps:[],_undoedSteps:[],execCommand:function(cmd){
if(this.customUndo&&(cmd=="undo"||cmd=="redo")){
return this[cmd]();
}else{
if(this.customUndo){
this.endEditing();
this._beginEditing();
}
try{
var r=this.inherited("execCommand",arguments);
if(dojo.isSafari&&cmd=="paste"&&!r){
var su=dojo.string.substitute,_isM=navigator.userAgent.indexOf("Macintosh")!=-1;
alert(su(this.commands.systemShortcut,[this.commands[cmd],su(this.commands[_isM?"appleKey":"ctrlKey"],["V"])]));
}
}
catch(e){
if(dojo.isMoz&&/copy|cut|paste/.test(cmd)){
var sub=dojo.string.substitute,_b89={cut:"X",copy:"C",paste:"V"},_b8a=navigator.userAgent.indexOf("Macintosh")!=-1;
alert(sub(this.commands.systemShortcutFF,[this.commands[cmd],sub(this.commands[_b8a?"appleKey":"ctrlKey"],[_b89[cmd]])]));
}
r=false;
}
if(this.customUndo){
this._endEditing();
}
return r;
}
},queryCommandEnabled:function(cmd){
if(this.customUndo&&(cmd=="undo"||cmd=="redo")){
return cmd=="undo"?(this._steps.length>1):(this._undoedSteps.length>0);
}else{
return this.inherited("queryCommandEnabled",arguments);
}
},focus:function(){
var _b8c=0;
if(this._savedSelection&&dojo.isIE){
_b8c=dijit._curFocus!=this.editNode;
}
this.inherited(arguments);
if(_b8c){
this._restoreSelection();
}
},_moveToBookmark:function(b){
var _b8e=b;
if(dojo.isIE){
if(dojo.isArray(b)){
_b8e=[];
dojo.forEach(b,function(n){
_b8e.push(dijit.range.getNode(n,this.editNode));
},this);
}
}else{
var r=dijit.range.create(this.window);
r.setStart(dijit.range.getNode(b.startContainer,this.editNode),b.startOffset);
r.setEnd(dijit.range.getNode(b.endContainer,this.editNode),b.endOffset);
_b8e=r;
}
dojo.withGlobal(this.window,"moveToBookmark",dijit,[_b8e]);
},_changeToStep:function(from,to){
this.setValue(to.text);
var b=to.bookmark;
if(!b){
return;
}
this._moveToBookmark(b);
},undo:function(){
this.endEditing(true);
var s=this._steps.pop();
if(this._steps.length>0){
this.focus();
this._changeToStep(s,this._steps[this._steps.length-1]);
this._undoedSteps.push(s);
this.onDisplayChanged();
return true;
}
return false;
},redo:function(){
this.endEditing(true);
var s=this._undoedSteps.pop();
if(s&&this._steps.length>0){
this.focus();
this._changeToStep(this._steps[this._steps.length-1],s);
this._steps.push(s);
this.onDisplayChanged();
return true;
}
return false;
},endEditing:function(_b96){
if(this._editTimer){
clearTimeout(this._editTimer);
}
if(this._inEditing){
this._endEditing(_b96);
this._inEditing=false;
}
},_getBookmark:function(){
var b=dojo.withGlobal(this.window,dijit.getBookmark);
var tmp=[];
if(dojo.isIE){
if(dojo.isArray(b)){
dojo.forEach(b,function(n){
tmp.push(dijit.range.getIndex(n,this.editNode).o);
},this);
b=tmp;
}
}else{
tmp=dijit.range.getIndex(b.startContainer,this.editNode).o;
b={startContainer:tmp,startOffset:b.startOffset,endContainer:b.endContainer===b.startContainer?tmp:dijit.range.getIndex(b.endContainer,this.editNode).o,endOffset:b.endOffset};
}
return b;
},_beginEditing:function(cmd){
if(this._steps.length===0){
this._steps.push({"text":this.savedContent,"bookmark":this._getBookmark()});
}
},_endEditing:function(_b9b){
var v=this.getValue(true);
this._undoedSteps=[];
this._steps.push({text:v,bookmark:this._getBookmark()});
},onKeyDown:function(e){
if(!dojo.isIE&&!this.iframe&&e.keyCode==dojo.keys.TAB&&!this.tabIndent){
this._saveSelection();
}
if(!this.customUndo){
this.inherited("onKeyDown",arguments);
return;
}
var k=e.keyCode,ks=dojo.keys;
if(e.ctrlKey&&!e.altKey){
if(k==90||k==122){
dojo.stopEvent(e);
this.undo();
return;
}else{
if(k==89||k==121){
dojo.stopEvent(e);
this.redo();
return;
}
}
}
this.inherited("onKeyDown",arguments);
switch(k){
case ks.ENTER:
case ks.BACKSPACE:
case ks.DELETE:
this.beginEditing();
break;
case 88:
case 86:
if(e.ctrlKey&&!e.altKey&&!e.metaKey){
this.endEditing();
if(e.keyCode==88){
this.beginEditing("cut");
setTimeout(dojo.hitch(this,this.endEditing),1);
}else{
this.beginEditing("paste");
setTimeout(dojo.hitch(this,this.endEditing),1);
}
break;
}
default:
if(!e.ctrlKey&&!e.altKey&&!e.metaKey&&(e.keyCode<dojo.keys.F1||e.keyCode>dojo.keys.F15)){
this.beginEditing();
break;
}
case ks.ALT:
this.endEditing();
break;
case ks.UP_ARROW:
case ks.DOWN_ARROW:
case ks.LEFT_ARROW:
case ks.RIGHT_ARROW:
case ks.HOME:
case ks.END:
case ks.PAGE_UP:
case ks.PAGE_DOWN:
this.endEditing(true);
break;
case ks.CTRL:
case ks.SHIFT:
case ks.TAB:
break;
}
},_onBlur:function(){
this.inherited("_onBlur",arguments);
this.endEditing(true);
},_saveSelection:function(){
this._savedSelection=this._getBookmark();
},_restoreSelection:function(){
if(this._savedSelection){
if(dojo.withGlobal(this.window,"isCollapsed",dijit)){
this._moveToBookmark(this._savedSelection);
}
delete this._savedSelection;
}
},_onFocus:function(){
setTimeout(dojo.hitch(this,"_restoreSelection"),0);
this.inherited(arguments);
},onClick:function(){
this.endEditing(true);
this.inherited("onClick",arguments);
}});
dojo.subscribe(dijit._scopeName+".Editor.getPlugin",null,function(o){
if(o.plugin){
return;
}
var args=o.args,p;
var _p=dijit._editor._Plugin;
var name=args.name;
switch(name){
case "undo":
case "redo":
case "cut":
case "copy":
case "paste":
case "insertOrderedList":
case "insertUnorderedList":
case "indent":
case "outdent":
case "justifyCenter":
case "justifyFull":
case "justifyLeft":
case "justifyRight":
case "delete":
case "selectAll":
case "removeFormat":
case "unlink":
case "insertHorizontalRule":
p=new _p({command:name});
break;
case "bold":
case "italic":
case "underline":
case "strikethrough":
case "subscript":
case "superscript":
p=new _p({buttonClass:dijit.form.ToggleButton,command:name});
break;
case "|":
p=new _p({button:new dijit.ToolbarSeparator()});
}
o.plugin=p;
});
}
if(!dojo._hasResource["dijit.Menu"]){
dojo._hasResource["dijit.Menu"]=true;
dojo.provide("dijit.Menu");
dojo.declare("dijit.Menu",[dijit._Widget,dijit._Templated,dijit._KeyNavContainer],{constructor:function(){
this._bindings=[];
},templateString:"<table class=\"dijit dijitMenu dijitReset dijitMenuTable\" waiRole=\"menu\" dojoAttachEvent=\"onkeypress:_onKeyPress\">"+"<tbody class=\"dijitReset\" dojoAttachPoint=\"containerNode\"></tbody>"+"</table>",targetNodeIds:[],contextMenuForWindow:false,leftClickToOpen:false,parentMenu:null,popupDelay:500,_contextMenuWithMouse:false,postCreate:function(){
if(this.contextMenuForWindow){
this.bindDomNode(dojo.body());
}else{
dojo.forEach(this.targetNodeIds,this.bindDomNode,this);
}
this.connectKeyNavHandlers([dojo.keys.UP_ARROW],[dojo.keys.DOWN_ARROW]);
},startup:function(){
if(this._started){
return;
}
dojo.forEach(this.getChildren(),function(_ba5){
_ba5.startup();
});
this.startupKeyNavChildren();
this.inherited(arguments);
},onExecute:function(){
},onCancel:function(_ba6){
},_moveToPopup:function(evt){
if(this.focusedChild&&this.focusedChild.popup&&!this.focusedChild.disabled){
this.focusedChild._onClick(evt);
}
},_onKeyPress:function(evt){
if(evt.ctrlKey||evt.altKey){
return;
}
switch(evt.charOrCode){
case dojo.keys.RIGHT_ARROW:
this._moveToPopup(evt);
dojo.stopEvent(evt);
break;
case dojo.keys.LEFT_ARROW:
if(this.parentMenu){
this.onCancel(false);
}else{
dojo.stopEvent(evt);
}
break;
}
},onItemHover:function(item){
this.focusChild(item);
if(this.focusedChild.popup&&!this.focusedChild.disabled&&!this.hover_timer){
this.hover_timer=setTimeout(dojo.hitch(this,"_openPopup"),this.popupDelay);
}
},_onChildBlur:function(item){
dijit.popup.close(item.popup);
item._blur();
this._stopPopupTimer();
},onItemUnhover:function(item){
},_stopPopupTimer:function(){
if(this.hover_timer){
clearTimeout(this.hover_timer);
this.hover_timer=null;
}
},_getTopMenu:function(){
for(var top=this;top.parentMenu;top=top.parentMenu){
}
return top;
},onItemClick:function(item,evt){
if(item.disabled){
return false;
}
if(item.popup){
if(!this.is_open){
this._openPopup();
}
}else{
this.onExecute();
item.onClick(evt);
}
},_iframeContentWindow:function(_baf){
var win=dijit.getDocumentWindow(dijit.Menu._iframeContentDocument(_baf))||dijit.Menu._iframeContentDocument(_baf)["__parent__"]||(_baf.name&&dojo.doc.frames[_baf.name])||null;
return win;
},_iframeContentDocument:function(_bb1){
var doc=_bb1.contentDocument||(_bb1.contentWindow&&_bb1.contentWindow.document)||(_bb1.name&&dojo.doc.frames[_bb1.name]&&dojo.doc.frames[_bb1.name].document)||null;
return doc;
},bindDomNode:function(node){
node=dojo.byId(node);
var win=dijit.getDocumentWindow(node.ownerDocument);
if(node.tagName.toLowerCase()=="iframe"){
win=this._iframeContentWindow(node);
node=dojo.withGlobal(win,dojo.body);
}
var cn=(node==dojo.body()?dojo.doc:node);
node[this.id]=this._bindings.push([dojo.connect(cn,(this.leftClickToOpen)?"onclick":"oncontextmenu",this,"_openMyself"),dojo.connect(cn,"onkeydown",this,"_contextKey"),dojo.connect(cn,"onmousedown",this,"_contextMouse")]);
},unBindDomNode:function(_bb6){
var node=dojo.byId(_bb6);
if(node){
var bid=node[this.id]-1,b=this._bindings[bid];
dojo.forEach(b,dojo.disconnect);
delete this._bindings[bid];
}
},_contextKey:function(e){
this._contextMenuWithMouse=false;
if(e.keyCode==dojo.keys.F10){
dojo.stopEvent(e);
if(e.shiftKey&&e.type=="keydown"){
var _e={target:e.target,pageX:e.pageX,pageY:e.pageY};
_e.preventDefault=_e.stopPropagation=function(){
};
window.setTimeout(dojo.hitch(this,function(){
this._openMyself(_e);
}),1);
}
}
},_contextMouse:function(e){
this._contextMenuWithMouse=true;
},_openMyself:function(e){
if(this.leftClickToOpen&&e.button>0){
return;
}
dojo.stopEvent(e);
var x,y;
if(dojo.isSafari||this._contextMenuWithMouse){
x=e.pageX;
y=e.pageY;
}else{
var _bc0=dojo.coords(e.target,true);
x=_bc0.x+10;
y=_bc0.y+10;
}
var self=this;
var _bc2=dijit.getFocus(this);
function closeAndRestoreFocus(){
dijit.focus(_bc2);
dijit.popup.close(self);
};
dijit.popup.open({popup:this,x:x,y:y,onExecute:closeAndRestoreFocus,onCancel:closeAndRestoreFocus,orient:this.isLeftToRight()?"L":"R"});
this.focus();
this._onBlur=function(){
this.inherited("_onBlur",arguments);
dijit.popup.close(this);
};
},onOpen:function(e){
this.isShowingNow=true;
},onClose:function(){
this._stopPopupTimer();
this.parentMenu=null;
this.isShowingNow=false;
this.currentPopup=null;
if(this.focusedChild){
this._onChildBlur(this.focusedChild);
this.focusedChild=null;
}
},_openPopup:function(){
this._stopPopupTimer();
var _bc4=this.focusedChild;
var _bc5=_bc4.popup;
if(_bc5.isShowingNow){
return;
}
_bc5.parentMenu=this;
var self=this;
dijit.popup.open({parent:this,popup:_bc5,around:_bc4.domNode,orient:this.isLeftToRight()?{"TR":"TL","TL":"TR"}:{"TL":"TR","TR":"TL"},onCancel:function(){
dijit.popup.close(_bc5);
_bc4.focus();
self.currentPopup=null;
}});
this.currentPopup=_bc5;
if(_bc5.focus){
_bc5.focus();
}
},uninitialize:function(){
dojo.forEach(this.targetNodeIds,this.unBindDomNode,this);
this.inherited(arguments);
}});
dojo.declare("dijit.MenuItem",[dijit._Widget,dijit._Templated,dijit._Contained],{templateString:"<tr class=\"dijitReset dijitMenuItem\" dojoAttachPoint=\"focusNode\" waiRole=\"menuitem\" tabIndex=\"-1\""+"dojoAttachEvent=\"onmouseenter:_onHover,onmouseleave:_onUnhover,ondijitclick:_onClick\">"+"<td class=\"dijitReset\" waiRole=\"presentation\"><div class=\"dijitMenuItemIcon\" dojoAttachPoint=\"iconNode\"></div></td>"+"<td class=\"dijitReset dijitMenuItemLabel\" dojoAttachPoint=\"containerNode\"></td>"+"<td class=\"dijitReset dijitMenuArrowCell\" waiRole=\"presentation\">"+"<div dojoAttachPoint=\"arrowWrapper\" style=\"display: none\">"+"<div class=\"dijitMenuExpand\"></div>"+"<span class=\"dijitMenuExpandA11y\">+</span>"+"</div>"+"</td>"+"</tr>",attributeMap:dojo.mixin(dojo.clone(dijit._Widget.prototype.attributeMap),{label:{node:"containerNode",type:"innerHTML"},iconClass:{node:"iconNode",type:"class"}}),label:"",iconClass:"",disabled:false,_fillContent:function(_bc7){
if(_bc7&&!("label" in this.params)){
this.attr("label",_bc7.innerHTML);
}
},postCreate:function(){
dojo.setSelectable(this.domNode,false);
dojo.attr(this.containerNode,"id",this.id+"_text");
dijit.setWaiState(this.domNode,"labelledby",this.id+"_text");
},_onHover:function(){
this.getParent().onItemHover(this);
},_onUnhover:function(){
this.getParent().onItemUnhover(this);
},_onClick:function(evt){
this.getParent().onItemClick(this,evt);
dojo.stopEvent(evt);
},onClick:function(evt){
},focus:function(){
dojo.addClass(this.domNode,"dijitMenuItemHover");
try{
dijit.focus(this.focusNode);
}
catch(e){
}
},_blur:function(){
dojo.removeClass(this.domNode,"dijitMenuItemHover");
},setLabel:function(_bca){
dojo.deprecated("dijit.MenuItem.setLabel() is deprecated.  Use attr('label', ...) instead.","","2.0");
this.attr("label",_bca);
},setDisabled:function(_bcb){
dojo.deprecated("dijit.Menu.setDisabled() is deprecated.  Use attr('disabled', bool) instead.","","2.0");
this.attr("disabled",_bcb);
},_setDisabledAttr:function(_bcc){
this.disabled=_bcc;
dojo[_bcc?"addClass":"removeClass"](this.domNode,"dijitMenuItemDisabled");
dijit.setWaiState(this.focusNode,"disabled",_bcc?"true":"false");
}});
dojo.declare("dijit.PopupMenuItem",dijit.MenuItem,{_fillContent:function(){
if(this.srcNodeRef){
var _bcd=dojo.query("*",this.srcNodeRef);
dijit.PopupMenuItem.superclass._fillContent.call(this,_bcd[0]);
this.dropDownContainer=this.srcNodeRef;
}
},startup:function(){
if(this._started){
return;
}
this.inherited(arguments);
if(!this.popup){
var node=dojo.query("[widgetId]",this.dropDownContainer)[0];
this.popup=dijit.byNode(node);
}
dojo.body().appendChild(this.popup.domNode);
this.popup.domNode.style.display="none";
dojo.style(this.arrowWrapper,"display","");
dijit.setWaiState(this.focusNode,"haspopup","true");
},destroyDescendants:function(){
if(this.popup){
this.popup.destroyRecursive();
delete this.popup;
}
this.inherited(arguments);
}});
dojo.declare("dijit.MenuSeparator",[dijit._Widget,dijit._Templated,dijit._Contained],{templateString:"<tr class=\"dijitMenuSeparator\"><td colspan=3>"+"<div class=\"dijitMenuSeparatorTop\"></div>"+"<div class=\"dijitMenuSeparatorBottom\"></div>"+"</td></tr>",postCreate:function(){
dojo.setSelectable(this.domNode,false);
},isFocusable:function(){
return false;
}});
dojo.declare("dijit.CheckedMenuItem",dijit.MenuItem,{templateString:"<tr class=\"dijitReset dijitMenuItem\" dojoAttachPoint=\"focusNode\" waiRole=\"menuitemcheckbox\" tabIndex=\"-1\""+"dojoAttachEvent=\"onmouseenter:_onHover,onmouseleave:_onUnhover,ondijitclick:_onClick\">"+"<td class=\"dijitReset\" waiRole=\"presentation\"><div class=\"dijitMenuItemIcon dijitCheckedMenuItemIcon\" dojoAttachPoint=\"iconNode\">"+"<div class=\"dijitCheckedMenuItemIconChar\">&#10003;</div>"+"</div></td>"+"<td class=\"dijitReset dijitMenuItemLabel\" dojoAttachPoint=\"containerNode,labelNode\"></td>"+"<td class=\"dijitReset dijitMenuArrowCell\" waiRole=\"presentation\">"+"<div dojoAttachPoint=\"arrowWrapper\" style=\"display: none\">"+"<div class=\"dijitMenuExpand\"></div>"+"<span class=\"dijitMenuExpandA11y\">+</span>"+"</div>"+"</td>"+"</tr>",checked:false,_setCheckedAttr:function(_bcf){
dojo.toggleClass(this.iconNode,"dijitCheckedMenuItemIconChecked",_bcf);
dijit.setWaiState(this.domNode,"checked",_bcf);
this.checked=_bcf;
},onChange:function(_bd0){
},_onClick:function(e){
if(!this.disabled){
this.attr("checked",!this.checked);
this.onChange(this.checked);
}
this.inherited(arguments);
}});
}
if(!dojo._hasResource["dijit.Tooltip"]){
dojo._hasResource["dijit.Tooltip"]=true;
dojo.provide("dijit.Tooltip");
dojo.declare("dijit._MasterTooltip",[dijit._Widget,dijit._Templated],{duration:dijit.defaultDuration,templateString:"<div class=\"dijitTooltip dijitTooltipLeft\" id=\"dojoTooltip\">\r\n\t<div class=\"dijitTooltipContainer dijitTooltipContents\" dojoAttachPoint=\"containerNode\" waiRole='alert'></div>\r\n\t<div class=\"dijitTooltipConnector\"></div>\r\n</div>\r\n",postCreate:function(){
dojo.body().appendChild(this.domNode);
this.bgIframe=new dijit.BackgroundIframe(this.domNode);
this.fadeIn=dojo.fadeIn({node:this.domNode,duration:this.duration,onEnd:dojo.hitch(this,"_onShow")});
this.fadeOut=dojo.fadeOut({node:this.domNode,duration:this.duration,onEnd:dojo.hitch(this,"_onHide")});
},show:function(_bd2,_bd3,_bd4){
if(this.aroundNode&&this.aroundNode===_bd3){
return;
}
if(this.fadeOut.status()=="playing"){
this._onDeck=arguments;
return;
}
this.containerNode.innerHTML=_bd2;
this.domNode.style.top=(this.domNode.offsetTop+1)+"px";
var _bd5={};
var ltr=this.isLeftToRight();
dojo.forEach((_bd4&&_bd4.length)?_bd4:dijit.Tooltip.defaultPosition,function(pos){
switch(pos){
case "after":
_bd5[ltr?"BR":"BL"]=ltr?"BL":"BR";
break;
case "before":
_bd5[ltr?"BL":"BR"]=ltr?"BR":"BL";
break;
case "below":
_bd5[ltr?"BL":"BR"]=ltr?"TL":"TR";
_bd5[ltr?"BR":"BL"]=ltr?"TR":"TL";
break;
case "above":
default:
_bd5[ltr?"TL":"TR"]=ltr?"BL":"BR";
_bd5[ltr?"TR":"TL"]=ltr?"BR":"BL";
break;
}
});
var pos=dijit.placeOnScreenAroundElement(this.domNode,_bd3,_bd5,dojo.hitch(this,"orient"));
dojo.style(this.domNode,"opacity",0);
this.fadeIn.play();
this.isShowingNow=true;
this.aroundNode=_bd3;
},orient:function(node,_bda,_bdb){
node.className="dijitTooltip "+{"BL-TL":"dijitTooltipBelow dijitTooltipABLeft","TL-BL":"dijitTooltipAbove dijitTooltipABLeft","BR-TR":"dijitTooltipBelow dijitTooltipABRight","TR-BR":"dijitTooltipAbove dijitTooltipABRight","BR-BL":"dijitTooltipRight","BL-BR":"dijitTooltipLeft"}[_bda+"-"+_bdb];
},_onShow:function(){
if(dojo.isIE){
this.domNode.style.filter="";
}
},hide:function(_bdc){
if(this._onDeck&&this._onDeck[1]==_bdc){
this._onDeck=null;
}else{
if(this.aroundNode===_bdc){
this.fadeIn.stop();
this.isShowingNow=false;
this.aroundNode=null;
this.fadeOut.play();
}else{
}
}
},_onHide:function(){
this.domNode.style.cssText="";
if(this._onDeck){
this.show.apply(this,this._onDeck);
this._onDeck=null;
}
}});
dijit.showTooltip=function(_bdd,_bde,_bdf){
if(!dijit._masterTT){
dijit._masterTT=new dijit._MasterTooltip();
}
return dijit._masterTT.show(_bdd,_bde,_bdf);
};
dijit.hideTooltip=function(_be0){
if(!dijit._masterTT){
dijit._masterTT=new dijit._MasterTooltip();
}
return dijit._masterTT.hide(_be0);
};
dojo.declare("dijit.Tooltip",dijit._Widget,{label:"",showDelay:400,connectId:[],position:[],postCreate:function(){
dojo.addClass(this.domNode,"dijitTooltipData");
this._connectNodes=[];
dojo.forEach(this.connectId,function(id){
var node=dojo.byId(id);
if(node){
this._connectNodes.push(node);
dojo.forEach(["onMouseEnter","onMouseLeave","onFocus","onBlur"],function(_be3){
this.connect(node,_be3.toLowerCase(),"_"+_be3);
},this);
if(dojo.isIE){
node.style.zoom=1;
}
}
},this);
},_onMouseEnter:function(e){
this._onHover(e);
},_onMouseLeave:function(e){
this._onUnHover(e);
},_onFocus:function(e){
this._focus=true;
this._onHover(e);
this.inherited(arguments);
},_onBlur:function(e){
this._focus=false;
this._onUnHover(e);
this.inherited(arguments);
},_onHover:function(e){
if(!this._showTimer){
var _be9=e.target;
this._showTimer=setTimeout(dojo.hitch(this,function(){
this.open(_be9);
}),this.showDelay);
}
},_onUnHover:function(e){
if(this._focus){
return;
}
if(this._showTimer){
clearTimeout(this._showTimer);
delete this._showTimer;
}
this.close();
},open:function(_beb){
_beb=_beb||this._connectNodes[0];
if(!_beb){
return;
}
if(this._showTimer){
clearTimeout(this._showTimer);
delete this._showTimer;
}
dijit.showTooltip(this.label||this.domNode.innerHTML,_beb,this.position);
this._connectNode=_beb;
},close:function(){
if(this._connectNode){
dijit.hideTooltip(this._connectNode);
delete this._connectNode;
}
if(this._showTimer){
clearTimeout(this._showTimer);
delete this._showTimer;
}
},uninitialize:function(){
this.close();
}});
dijit.Tooltip.defaultPosition=["after","before"];
}
if(!dojo._hasResource["dijit.form.TextBox"]){
dojo._hasResource["dijit.form.TextBox"]=true;
dojo.provide("dijit.form.TextBox");
dojo.declare("dijit.form.TextBox",dijit.form._FormValueWidget,{trim:false,uppercase:false,lowercase:false,propercase:false,maxLength:"",templateString:"<input class=\"dijit dijitReset dijitLeft\" dojoAttachPoint='textbox,focusNode' name=\"${name}\"\r\n\tdojoAttachEvent='onmouseenter:_onMouse,onmouseleave:_onMouse,onfocus:_onMouse,onblur:_onMouse,onkeypress:_onKeyPress'\r\n\tautocomplete=\"off\" type=\"${type}\"\r\n\t/>\r\n",baseClass:"dijitTextBox",attributeMap:dojo.mixin(dojo.clone(dijit.form._FormValueWidget.prototype.attributeMap),{maxLength:"focusNode"}),_getValueAttr:function(){
return this.parse(this.attr("displayedValue"),this.constraints);
},_setValueAttr:function(_bec,_bed,_bee){
var _bef;
if(_bec!==undefined){
_bef=this.filter(_bec);
if(_bef!==null&&((typeof _bef!="number")||!isNaN(_bef))){
if(typeof _bee!="string"){
_bee=this.format(_bef,this.constraints);
}
}else{
_bee="";
}
}
if(_bee!=null&&_bee!=undefined){
this.textbox.value=_bee;
}
dijit.form.TextBox.superclass._setValueAttr.call(this,_bef,_bed);
},displayedValue:"",getDisplayedValue:function(){
dojo.deprecated(this.declaredClass+"::getDisplayedValue() is deprecated. Use attr('displayedValue') instead.","","2.0");
return this.attr("displayedValue");
},_getDisplayedValueAttr:function(){
return this.filter(this.textbox.value);
},setDisplayedValue:function(_bf0){
dojo.deprecated(this.declaredClass+"::setDisplayedValue() is deprecated. Use attr('displayedValue', ...) instead.","","2.0");
this.attr("displayedValue",_bf0);
},_setDisplayedValueAttr:function(_bf1){
this.textbox.value=_bf1;
this._setValueAttr(this.attr("value"));
},format:function(_bf2,_bf3){
return ((_bf2==null||_bf2==undefined)?"":(_bf2.toString?_bf2.toString():_bf2));
},parse:function(_bf4,_bf5){
return _bf4;
},postCreate:function(){
this.textbox.setAttribute("value",this.textbox.value);
this.inherited(arguments);
this._layoutHack();
},filter:function(val){
if(typeof val!="string"){
return val;
}
if(this.trim){
val=dojo.trim(val);
}
if(this.uppercase){
val=val.toUpperCase();
}
if(this.lowercase){
val=val.toLowerCase();
}
if(this.propercase){
val=val.replace(/[^\s]+/g,function(word){
return word.substring(0,1).toUpperCase()+word.substring(1);
});
}
return val;
},_setBlurValue:function(){
this._setValueAttr(this.attr("value"),(this.isValid?this.isValid():true));
},_onBlur:function(){
this._setBlurValue();
this.inherited(arguments);
}});
dijit.selectInputText=function(_bf8,_bf9,stop){
var _bfb=dojo.global;
var _bfc=dojo.doc;
_bf8=dojo.byId(_bf8);
if(isNaN(_bf9)){
_bf9=0;
}
if(isNaN(stop)){
stop=_bf8.value?_bf8.value.length:0;
}
_bf8.focus();
if(_bfc["selection"]&&dojo.body()["createTextRange"]){
if(_bf8.createTextRange){
var _bfd=_bf8.createTextRange();
with(_bfd){
collapse(true);
moveStart("character",_bf9);
moveEnd("character",stop);
select();
}
}
}else{
if(_bfb["getSelection"]){
var _bfe=_bfb.getSelection();
if(_bf8.setSelectionRange){
_bf8.setSelectionRange(_bf9,stop);
}
}
}
};
}
if(!dojo._hasResource["dijit.form.ValidationTextBox"]){
dojo._hasResource["dijit.form.ValidationTextBox"]=true;
dojo.provide("dijit.form.ValidationTextBox");
dojo.declare("dijit.form.ValidationTextBox",dijit.form.TextBox,{templateString:"<div class=\"dijit dijitReset dijitInlineTable dijitLeft\"\r\n\tid=\"widget_${id}\"\r\n\tdojoAttachEvent=\"onmouseenter:_onMouse,onmouseleave:_onMouse,onmousedown:_onMouse\" waiRole=\"presentation\"\r\n\t><div style=\"overflow:hidden;\"\r\n\t\t><div class=\"dijitReset dijitValidationIcon\"><br></div\r\n\t\t><div class=\"dijitReset dijitValidationIconText\">&Chi;</div\r\n\t\t><div class=\"dijitReset dijitInputField\"\r\n\t\t\t><input class=\"dijitReset\" dojoAttachPoint='textbox,focusNode' dojoAttachEvent='onfocus:_update,onkeyup:_update,onblur:_onMouse,onkeypress:_onKeyPress' autocomplete=\"off\"\r\n\t\t\ttype='${type}' name='${name}'\r\n\t\t/></div\r\n\t></div\r\n></div>\r\n",baseClass:"dijitTextBox",required:false,promptMessage:"",invalidMessage:"$_unset_$",constraints:{},regExp:".*",regExpGen:function(_bff){
return this.regExp;
},state:"",tooltipPosition:[],_setValueAttr:function(){
this.inherited(arguments);
this.validate(this._focused);
},validator:function(_c00,_c01){
return (new RegExp("^(?:"+this.regExpGen(_c01)+")"+(this.required?"":"?")+"$")).test(_c00)&&(!this.required||!this._isEmpty(_c00))&&(this._isEmpty(_c00)||this.parse(_c00,_c01)!==undefined);
},_isValidSubset:function(){
return this.textbox.value.search(this._partialre)==0;
},isValid:function(_c02){
return this.validator(this.textbox.value,this.constraints);
},_isEmpty:function(_c03){
return /^\s*$/.test(_c03);
},getErrorMessage:function(_c04){
return this.invalidMessage;
},getPromptMessage:function(_c05){
return this.promptMessage;
},_maskValidSubsetError:true,validate:function(_c06){
var _c07="";
var _c08=this.disabled||this.isValid(_c06);
if(_c08){
this._maskValidSubsetError=true;
}
var _c09=!_c08&&_c06&&this._isValidSubset();
var _c0a=this._isEmpty(this.textbox.value);
this.state=(_c08||(!this._hasBeenBlurred&&_c0a)||_c09)?"":"Error";
if(this.state=="Error"){
this._maskValidSubsetError=false;
}
this._setStateClass();
dijit.setWaiState(this.focusNode,"invalid",_c08?"false":"true");
if(_c06){
if(_c0a){
_c07=this.getPromptMessage(true);
}
if(!_c07&&(this.state=="Error"||(_c09&&!this._maskValidSubsetError))){
_c07=this.getErrorMessage(true);
}
}
this.displayMessage(_c07);
return _c08;
},_message:"",displayMessage:function(_c0b){
if(this._message==_c0b){
return;
}
this._message=_c0b;
dijit.hideTooltip(this.domNode);
if(_c0b){
dijit.showTooltip(_c0b,this.domNode,this.tooltipPosition);
}
},_refreshState:function(){
this.validate(this._focused);
},_update:function(e){
this._refreshState();
this._onMouse(e);
},constructor:function(){
this.constraints={};
},postMixInProperties:function(){
this.inherited(arguments);
this.constraints.locale=this.lang;
this.messages=dojo.i18n.getLocalization("dijit.form","validate",this.lang);
if(this.invalidMessage=="$_unset_$"){
this.invalidMessage=this.messages.invalidMessage;
}
var p=this.regExpGen(this.constraints);
this.regExp=p;
var _c0e="";
if(p!=".*"){
this.regExp.replace(/\\.|\[\]|\[.*?[^\\]{1}\]|\{.*?\}|\(\?[=:!]|./g,function(re){
switch(re.charAt(0)){
case "{":
case "+":
case "?":
case "*":
case "^":
case "$":
case "|":
case "(":
_c0e+=re;
break;
case ")":
_c0e+="|$)";
break;
default:
_c0e+="(?:"+re+"|$)";
break;
}
});
}
try{
"".search(_c0e);
}
catch(e){
_c0e=this.regExp;
console.debug("RegExp error in "+this.declaredClass+": "+this.regExp);
}
this._partialre="^(?:"+_c0e+")$";
},_setDisabledAttr:function(_c10){
this.inherited(arguments);
if(this.valueNode){
this.valueNode.disabled=_c10;
}
this._refreshState();
},_setRequiredAttr:function(_c11){
this.required=_c11;
dijit.setWaiState(this.focusNode,"required",_c11);
this._refreshState();
},postCreate:function(){
if(dojo.isIE){
var s=dojo.getComputedStyle(this.focusNode);
if(s){
var ff=s.fontFamily;
if(ff){
this.focusNode.style.fontFamily=ff;
}
}
}
this.inherited(arguments);
}});
dojo.declare("dijit.form.MappedTextBox",dijit.form.ValidationTextBox,{serialize:function(val,_c15){
return val.toString?val.toString():"";
},toString:function(){
var val=this.filter(this.attr("value"));
return val!=null?(typeof val=="string"?val:this.serialize(val,this.constraints)):"";
},validate:function(){
this.valueNode.value=this.toString();
return this.inherited(arguments);
},buildRendering:function(){
this.inherited(arguments);
var _c17=this.textbox;
var _c18=(this.valueNode=dojo.doc.createElement("input"));
_c18.setAttribute("type",_c17.type);
dojo.style(_c18,"display","none");
this.valueNode.name=this.textbox.name;
dojo.place(_c18,_c17,"after");
this.textbox.name=this.textbox.name+"_displayed_";
this.textbox.removeAttribute("name");
},_setDisabledAttr:function(_c19){
this.inherited(arguments);
dojo.attr(this.valueNode,"disabled",_c19);
}});
dojo.declare("dijit.form.RangeBoundTextBox",dijit.form.MappedTextBox,{rangeMessage:"",rangeCheck:function(_c1a,_c1b){
var _c1c="min" in _c1b;
var _c1d="max" in _c1b;
if(_c1c||_c1d){
return (!_c1c||this.compare(_c1a,_c1b.min)>=0)&&(!_c1d||this.compare(_c1a,_c1b.max)<=0);
}
return true;
},isInRange:function(_c1e){
return this.rangeCheck(this.attr("value"),this.constraints);
},_isDefinitelyOutOfRange:function(){
var val=this.attr("value");
var _c20=false;
var _c21=false;
if("min" in this.constraints){
var min=this.constraints.min;
val=this.compare(val,((typeof min=="number")&&min>=0&&val!=0)?0:min);
_c20=(typeof val=="number")&&val<0;
}
if("max" in this.constraints){
var max=this.constraints.max;
val=this.compare(val,((typeof max!="number")||max>0)?max:0);
_c21=(typeof val=="number")&&val>0;
}
return _c20||_c21;
},_isValidSubset:function(){
return this.inherited(arguments)&&!this._isDefinitelyOutOfRange();
},isValid:function(_c24){
return this.inherited(arguments)&&((this._isEmpty(this.textbox.value)&&!this.required)||this.isInRange(_c24));
},getErrorMessage:function(_c25){
if(dijit.form.RangeBoundTextBox.superclass.isValid.call(this,false)&&!this.isInRange(_c25)){
return this.rangeMessage;
}
return this.inherited(arguments);
},postMixInProperties:function(){
this.inherited(arguments);
if(!this.rangeMessage){
this.messages=dojo.i18n.getLocalization("dijit.form","validate",this.lang);
this.rangeMessage=this.messages.rangeMessage;
}
},postCreate:function(){
this.inherited(arguments);
if(this.constraints.min!==undefined){
dijit.setWaiState(this.focusNode,"valuemin",this.constraints.min);
}
if(this.constraints.max!==undefined){
dijit.setWaiState(this.focusNode,"valuemax",this.constraints.max);
}
},_setValueAttr:function(_c26,_c27){
dijit.setWaiState(this.focusNode,"valuenow",_c26);
this.inherited(arguments);
}});
}
if(!dojo._hasResource["dojo.data.util.sorter"]){
dojo._hasResource["dojo.data.util.sorter"]=true;
dojo.provide("dojo.data.util.sorter");
dojo.data.util.sorter.basicComparator=function(a,b){
var ret=0;
if(a>b||typeof a==="undefined"||a===null){
ret=1;
}else{
if(a<b||typeof b==="undefined"||b===null){
ret=-1;
}
}
return ret;
};
dojo.data.util.sorter.createSortFunction=function(_c2b,_c2c){
var _c2d=[];
function createSortFunction(attr,dir){
return function(_c30,_c31){
var a=_c2c.getValue(_c30,attr);
var b=_c2c.getValue(_c31,attr);
var _c34=null;
if(_c2c.comparatorMap){
if(typeof attr!=="string"){
attr=_c2c.getIdentity(attr);
}
_c34=_c2c.comparatorMap[attr]||dojo.data.util.sorter.basicComparator;
}
_c34=_c34||dojo.data.util.sorter.basicComparator;
return dir*_c34(a,b);
};
};
var _c35;
for(var i=0;i<_c2b.length;i++){
_c35=_c2b[i];
if(_c35.attribute){
var _c37=(_c35.descending)?-1:1;
_c2d.push(createSortFunction(_c35.attribute,_c37));
}
}
return function(rowA,rowB){
var i=0;
while(i<_c2d.length){
var ret=_c2d[i++](rowA,rowB);
if(ret!==0){
return ret;
}
}
return 0;
};
};
}
if(!dojo._hasResource["dojo.data.util.simpleFetch"]){
dojo._hasResource["dojo.data.util.simpleFetch"]=true;
dojo.provide("dojo.data.util.simpleFetch");
dojo.data.util.simpleFetch.fetch=function(_c3c){
_c3c=_c3c||{};
if(!_c3c.store){
_c3c.store=this;
}
var self=this;
var _c3e=function(_c3f,_c40){
if(_c40.onError){
var _c41=_c40.scope||dojo.global;
_c40.onError.call(_c41,_c3f,_c40);
}
};
var _c42=function(_c43,_c44){
var _c45=_c44.abort||null;
var _c46=false;
var _c47=_c44.start?_c44.start:0;
var _c48=(_c44.count&&(_c44.count!==Infinity))?(_c47+_c44.count):_c43.length;
_c44.abort=function(){
_c46=true;
if(_c45){
_c45.call(_c44);
}
};
var _c49=_c44.scope||dojo.global;
if(!_c44.store){
_c44.store=self;
}
if(_c44.onBegin){
_c44.onBegin.call(_c49,_c43.length,_c44);
}
if(_c44.sort){
_c43.sort(dojo.data.util.sorter.createSortFunction(_c44.sort,self));
}
if(_c44.onItem){
for(var i=_c47;(i<_c43.length)&&(i<_c48);++i){
var item=_c43[i];
if(!_c46){
_c44.onItem.call(_c49,item,_c44);
}
}
}
if(_c44.onComplete&&!_c46){
var _c4c=null;
if(!_c44.onItem){
_c4c=_c43.slice(_c47,_c48);
}
_c44.onComplete.call(_c49,_c4c,_c44);
}
};
this._fetchItems(_c3c,_c42,_c3e);
return _c3c;
};
}
if(!dojo._hasResource["dojo.data.util.filter"]){
dojo._hasResource["dojo.data.util.filter"]=true;
dojo.provide("dojo.data.util.filter");
dojo.data.util.filter.patternToRegExp=function(_c4d,_c4e){
var rxp="^";
var c=null;
for(var i=0;i<_c4d.length;i++){
c=_c4d.charAt(i);
switch(c){
case "\\":
rxp+=c;
i++;
rxp+=_c4d.charAt(i);
break;
case "*":
rxp+=".*";
break;
case "?":
rxp+=".";
break;
case "$":
case "^":
case "/":
case "+":
case ".":
case "|":
case "(":
case ")":
case "{":
case "}":
case "[":
case "]":
rxp+="\\";
default:
rxp+=c;
}
}
rxp+="$";
if(_c4e){
return new RegExp(rxp,"mi");
}else{
return new RegExp(rxp,"m");
}
};
}
if(!dojo._hasResource["dijit.form.ComboBox"]){
dojo._hasResource["dijit.form.ComboBox"]=true;
dojo.provide("dijit.form.ComboBox");
dojo.declare("dijit.form.ComboBoxMixin",null,{item:null,pageSize:Infinity,store:null,fetchProperties:{},query:{},autoComplete:true,highlightMatch:"first",searchDelay:100,searchAttr:"name",labelAttr:"",labelType:"text",queryExpr:"${0}*",ignoreCase:true,hasDownArrow:true,templateString:"<div class=\"dijit dijitReset dijitInlineTable dijitLeft\"\r\n\tid=\"widget_${id}\"\r\n\tdojoAttachEvent=\"onmouseenter:_onMouse,onmouseleave:_onMouse,onmousedown:_onMouse\" dojoAttachPoint=\"comboNode\" waiRole=\"combobox\" tabIndex=\"-1\"\r\n\t><div style=\"overflow:hidden;\"\r\n\t\t><div class='dijitReset dijitRight dijitButtonNode dijitArrowButton dijitDownArrowButton'\r\n\t\t\tdojoAttachPoint=\"downArrowNode\" waiRole=\"presentation\"\r\n\t\t\tdojoAttachEvent=\"onmousedown:_onArrowMouseDown,onmouseup:_onMouse,onmouseenter:_onMouse,onmouseleave:_onMouse\"\r\n\t\t\t><div class=\"dijitArrowButtonInner\">&thinsp;</div\r\n\t\t\t><div class=\"dijitArrowButtonChar\">&#9660;</div\r\n\t\t></div\r\n\t\t><div class=\"dijitReset dijitValidationIcon\"><br></div\r\n\t\t><div class=\"dijitReset dijitValidationIconText\">&Chi;</div\r\n\t\t><div class=\"dijitReset dijitInputField\"\r\n\t\t\t><input type=\"text\" autocomplete=\"off\" name=\"${name}\" class='dijitReset'\r\n\t\t\tdojoAttachEvent=\"onkeypress:_onKeyPress, onfocus:_update, compositionend\"\r\n\t\t\tdojoAttachPoint=\"textbox,focusNode\" waiRole=\"textbox\" waiState=\"haspopup-true,autocomplete-list\"\r\n\t\t/></div\r\n\t></div\r\n></div>\r\n",baseClass:"dijitComboBox",_getCaretPos:function(_c52){
var pos=0;
if(typeof (_c52.selectionStart)=="number"){
pos=_c52.selectionStart;
}else{
if(dojo.isIE){
var tr=dojo.doc.selection.createRange().duplicate();
var ntr=_c52.createTextRange();
tr.move("character",0);
ntr.move("character",0);
try{
ntr.setEndPoint("EndToEnd",tr);
pos=String(ntr.text).replace(/\r/g,"").length;
}
catch(e){
}
}
}
return pos;
},_setCaretPos:function(_c56,_c57){
_c57=parseInt(_c57);
dijit.selectInputText(_c56,_c57,_c57);
},_setDisabledAttr:function(_c58){
dijit.setWaiState(this.comboNode,"disabled",_c58);
},_onKeyPress:function(evt){
var key=evt.charOrCode;
if(evt.altKey||(evt.ctrlKey&&(key!="x"&&key!="v"))||evt.key==dojo.keys.SHIFT){
return;
}
var _c5b=false;
var pw=this._popupWidget;
var dk=dojo.keys;
if(this._isShowingNow){
pw.handleKey(key);
}
switch(key){
case dk.PAGE_DOWN:
case dk.DOWN_ARROW:
if(!this._isShowingNow||this._prev_key_esc){
this._arrowPressed();
_c5b=true;
}else{
this._announceOption(pw.getHighlightedOption());
}
dojo.stopEvent(evt);
this._prev_key_backspace=false;
this._prev_key_esc=false;
break;
case dk.PAGE_UP:
case dk.UP_ARROW:
if(this._isShowingNow){
this._announceOption(pw.getHighlightedOption());
}
dojo.stopEvent(evt);
this._prev_key_backspace=false;
this._prev_key_esc=false;
break;
case dk.ENTER:
var _c5e;
if(this._isShowingNow&&(_c5e=pw.getHighlightedOption())){
if(_c5e==pw.nextButton){
this._nextSearch(1);
dojo.stopEvent(evt);
break;
}else{
if(_c5e==pw.previousButton){
this._nextSearch(-1);
dojo.stopEvent(evt);
break;
}
}
}else{
this._setDisplayedValueAttr(this.attr("displayedValue"),true);
}
evt.preventDefault();
case dk.TAB:
var _c5f=this.attr("displayedValue");
if(pw&&(_c5f==pw._messages["previousMessage"]||_c5f==pw._messages["nextMessage"])){
break;
}
if(this._isShowingNow){
this._prev_key_backspace=false;
this._prev_key_esc=false;
if(pw.getHighlightedOption()){
pw.attr("value",{target:pw.getHighlightedOption()});
}
this._lastQuery=null;
this._hideResultList();
}
break;
case " ":
this._prev_key_backspace=false;
this._prev_key_esc=false;
if(this._isShowingNow&&pw.getHighlightedOption()){
dojo.stopEvent(evt);
this._selectOption();
this._hideResultList();
}else{
_c5b=true;
}
break;
case dk.ESCAPE:
this._prev_key_backspace=false;
this._prev_key_esc=true;
if(this._isShowingNow){
dojo.stopEvent(evt);
this._hideResultList();
}else{
this.inherited(arguments);
}
break;
case dk.DELETE:
case dk.BACKSPACE:
this._prev_key_esc=false;
this._prev_key_backspace=true;
_c5b=true;
break;
case dk.RIGHT_ARROW:
case dk.LEFT_ARROW:
this._prev_key_backspace=false;
this._prev_key_esc=false;
break;
default:
this._prev_key_backspace=false;
this._prev_key_esc=false;
_c5b=typeof key=="string"||key==229;
}
if(this.searchTimer){
clearTimeout(this.searchTimer);
}
if(_c5b){
setTimeout(dojo.hitch(this,"_startSearchFromInput"),1);
}
},_autoCompleteText:function(text){
var fn=this.focusNode;
dijit.selectInputText(fn,fn.value.length);
var _c62=this.ignoreCase?"toLowerCase":"substr";
if(text[_c62](0).indexOf(this.focusNode.value[_c62](0))==0){
var cpos=this._getCaretPos(fn);
if((cpos+1)>fn.value.length){
fn.value=text;
dijit.selectInputText(fn,cpos);
}
}else{
fn.value=text;
dijit.selectInputText(fn);
}
},_openResultList:function(_c64,_c65){
if(this.disabled||this.readOnly||(_c65.query[this.searchAttr]!=this._lastQuery)){
return;
}
this._popupWidget.clearResultList();
if(!_c64.length){
this._hideResultList();
return;
}
var _c66=new String(this.store.getValue(_c64[0],this.searchAttr));
if(_c66&&this.autoComplete&&!this._prev_key_backspace&&(_c65.query[this.searchAttr]!="*")){
this._autoCompleteText(_c66);
}
_c65._maxOptions=this._maxOptions;
this._popupWidget.createOptions(_c64,_c65,dojo.hitch(this,"_getMenuLabelFromItem"));
this._showResultList();
if(_c65.direction){
if(1==_c65.direction){
this._popupWidget.highlightFirstOption();
}else{
if(-1==_c65.direction){
this._popupWidget.highlightLastOption();
}
}
this._announceOption(this._popupWidget.getHighlightedOption());
}
},_showResultList:function(){
this._hideResultList();
var _c67=this._popupWidget.getItems(),_c68=Math.min(_c67.length,this.maxListLength);
this._arrowPressed();
this.displayMessage("");
dojo.style(this._popupWidget.domNode,{width:"",height:""});
var best=this.open();
var _c6a=dojo.marginBox(this._popupWidget.domNode);
this._popupWidget.domNode.style.overflow=((best.h==_c6a.h)&&(best.w==_c6a.w))?"hidden":"auto";
var _c6b=best.w;
if(best.h<this._popupWidget.domNode.scrollHeight){
_c6b+=16;
}
dojo.marginBox(this._popupWidget.domNode,{h:best.h,w:Math.max(_c6b,this.domNode.offsetWidth)});
dijit.setWaiState(this.comboNode,"expanded","true");
},_hideResultList:function(){
if(this._isShowingNow){
dijit.popup.close(this._popupWidget);
this._arrowIdle();
this._isShowingNow=false;
dijit.setWaiState(this.comboNode,"expanded","false");
dijit.removeWaiState(this.focusNode,"activedescendant");
}
},_setBlurValue:function(){
var _c6c=this.attr("displayedValue");
var pw=this._popupWidget;
if(pw&&(_c6c==pw._messages["previousMessage"]||_c6c==pw._messages["nextMessage"])){
this._setValueAttr(this._lastValueReported,true);
}else{
this.attr("displayedValue",_c6c);
}
},_onBlur:function(){
this._hideResultList();
this._arrowIdle();
this.inherited(arguments);
},_announceOption:function(node){
if(node==null){
return;
}
var _c6f;
if(node==this._popupWidget.nextButton||node==this._popupWidget.previousButton){
_c6f=node.innerHTML;
}else{
_c6f=this.store.getValue(node.item,this.searchAttr);
}
this.focusNode.value=this.focusNode.value.substring(0,this._getCaretPos(this.focusNode));
dijit.setWaiState(this.focusNode,"activedescendant",dojo.attr(node,"id"));
this._autoCompleteText(_c6f);
},_selectOption:function(evt){
var tgt=null;
if(!evt){
evt={target:this._popupWidget.getHighlightedOption()};
}
if(!evt.target){
this.attr("displayedValue",this.attr("displayedValue"));
return;
}else{
tgt=evt.target;
}
if(!evt.noHide){
this._hideResultList();
this._setCaretPos(this.focusNode,this.store.getValue(tgt.item,this.searchAttr).length);
}
this._doSelect(tgt);
},_doSelect:function(tgt){
this.item=tgt.item;
this.attr("value",this.store.getValue(tgt.item,this.searchAttr));
},_onArrowMouseDown:function(evt){
if(this.disabled||this.readOnly){
return;
}
dojo.stopEvent(evt);
this.focus();
if(this._isShowingNow){
this._hideResultList();
}else{
this._startSearch("");
}
},_startSearchFromInput:function(){
this._startSearch(this.focusNode.value.replace(/([\\\*\?])/g,"\\$1"));
},_getQueryString:function(text){
return dojo.string.substitute(this.queryExpr,[text]);
},_startSearch:function(key){
if(!this._popupWidget){
var _c76=this.id+"_popup";
this._popupWidget=new dijit.form._ComboBoxMenu({onChange:dojo.hitch(this,this._selectOption),id:_c76});
dijit.removeWaiState(this.focusNode,"activedescendant");
dijit.setWaiState(this.textbox,"owns",_c76);
}
this.item=null;
var _c77=dojo.clone(this.query);
this._lastInput=key;
this._lastQuery=_c77[this.searchAttr]=this._getQueryString(key);
this.searchTimer=setTimeout(dojo.hitch(this,function(_c78,_c79){
var _c7a={queryOptions:{ignoreCase:this.ignoreCase,deep:true},query:_c78,onBegin:dojo.hitch(this,"_setMaxOptions"),onComplete:dojo.hitch(this,"_openResultList"),onError:function(_c7b){
console.error("dijit.form.ComboBox: "+_c7b);
dojo.hitch(_c79,"_hideResultList")();
},start:0,count:this.pageSize};
dojo.mixin(_c7a,_c79.fetchProperties);
var _c7c=_c79.store.fetch(_c7a);
var _c7d=function(_c7e,_c7f){
_c7e.start+=_c7e.count*_c7f;
_c7e.direction=_c7f;
this.store.fetch(_c7e);
};
this._nextSearch=this._popupWidget.onPage=dojo.hitch(this,_c7d,_c7c);
},_c77,this),this.searchDelay);
},_setMaxOptions:function(size,_c81){
this._maxOptions=size;
},_getValueField:function(){
return this.searchAttr;
},_arrowPressed:function(){
if(!this.disabled&&!this.readOnly&&this.hasDownArrow){
dojo.addClass(this.downArrowNode,"dijitArrowButtonActive");
}
},_arrowIdle:function(){
if(!this.disabled&&!this.readOnly&&this.hasDownArrow){
dojo.removeClass(this.downArrowNode,"dojoArrowButtonPushed");
}
},compositionend:function(evt){
this._onKeyPress({charOrCode:229});
},constructor:function(){
this.query={};
this.fetchProperties={};
},postMixInProperties:function(){
if(!this.hasDownArrow){
this.baseClass="dijitTextBox";
}
if(!this.store){
var _c83=this.srcNodeRef;
this.store=new dijit.form._ComboBoxDataStore(_c83);
if(!this.value||((typeof _c83.selectedIndex=="number")&&_c83.selectedIndex.toString()===this.value)){
var item=this.store.fetchSelectedItem();
if(item){
this.value=this.store.getValue(item,this._getValueField());
}
}
}
},_postCreate:function(){
var _c85=dojo.query("label[for=\""+this.id+"\"]");
if(_c85.length){
_c85[0].id=(this.id+"_label");
var cn=this.comboNode;
dijit.setWaiState(cn,"labelledby",_c85[0].id);
}
},uninitialize:function(){
if(this._popupWidget){
this._hideResultList();
this._popupWidget.destroy();
}
},_getMenuLabelFromItem:function(item){
var _c88=this.store.getValue(item,this.labelAttr||this.searchAttr);
var _c89=this.labelType;
if(this.highlightMatch!="none"&&this.labelType=="text"&&this._lastInput){
_c88=this.doHighlight(_c88,this._escapeHtml(this._lastInput));
_c89="html";
}
return {html:_c89=="html",label:_c88};
},doHighlight:function(_c8a,find){
var _c8c="i"+(this.highlightMatch=="all"?"g":"");
var _c8d=this._escapeHtml(_c8a);
var ret=_c8d.replace(new RegExp("^("+find+")",_c8c),"<span class=\"dijitComboBoxHighlightMatch\">$1</span>");
if(_c8d==ret){
ret=_c8d.replace(new RegExp(" ("+find+")",_c8c)," <span class=\"dijitComboBoxHighlightMatch\">$1</span>");
}
return ret;
},_escapeHtml:function(str){
str=String(str).replace(/&/gm,"&amp;").replace(/</gm,"&lt;").replace(/>/gm,"&gt;").replace(/"/gm,"&quot;");
return str;
},open:function(){
this._isShowingNow=true;
return dijit.popup.open({popup:this._popupWidget,around:this.domNode,parent:this});
},reset:function(){
this.item=null;
this.inherited(arguments);
}});
dojo.declare("dijit.form._ComboBoxMenu",[dijit._Widget,dijit._Templated],{templateString:"<ul class='dijitReset dijitMenu' dojoAttachEvent='onmousedown:_onMouseDown,onmouseup:_onMouseUp,onmouseover:_onMouseOver,onmouseout:_onMouseOut' tabIndex='-1' style='overflow: \"auto\"; overflow-x: \"hidden\";'>"+"<li class='dijitMenuItem dijitMenuPreviousButton' dojoAttachPoint='previousButton'></li>"+"<li class='dijitMenuItem dijitMenuNextButton' dojoAttachPoint='nextButton'></li>"+"</ul>",_messages:null,postMixInProperties:function(){
this._messages=dojo.i18n.getLocalization("dijit.form","ComboBox",this.lang);
this.inherited("postMixInProperties",arguments);
},_setValueAttr:function(_c90){
this.value=_c90;
this.onChange(_c90);
},onChange:function(_c91){
},onPage:function(_c92){
},postCreate:function(){
this.previousButton.innerHTML=this._messages["previousMessage"];
this.nextButton.innerHTML=this._messages["nextMessage"];
this.inherited(arguments);
},onClose:function(){
this._blurOptionNode();
},_createOption:function(item,_c94){
var _c95=_c94(item);
var _c96=dojo.doc.createElement("li");
dijit.setWaiRole(_c96,"option");
if(_c95.html){
_c96.innerHTML=_c95.label;
}else{
_c96.appendChild(dojo.doc.createTextNode(_c95.label));
}
if(_c96.innerHTML==""){
_c96.innerHTML="&nbsp;";
}
_c96.item=item;
return _c96;
},createOptions:function(_c97,_c98,_c99){
this.previousButton.style.display=(_c98.start==0)?"none":"";
dojo.attr(this.previousButton,"id",this.id+"_prev");
dojo.forEach(_c97,function(item,i){
var _c9c=this._createOption(item,_c99);
_c9c.className="dijitReset dijitMenuItem";
dojo.attr(_c9c,"id",this.id+i);
this.domNode.insertBefore(_c9c,this.nextButton);
},this);
var _c9d=false;
if(_c98._maxOptions&&_c98._maxOptions!=-1){
if((_c98.start+_c98.count)<_c98._maxOptions){
_c9d=true;
}else{
if((_c98.start+_c98.count)>(_c98._maxOptions-1)){
if(_c98.count==_c97.length){
_c9d=true;
}
}
}
}else{
if(_c98.count==_c97.length){
_c9d=true;
}
}
this.nextButton.style.display=_c9d?"":"none";
dojo.attr(this.nextButton,"id",this.id+"_next");
},clearResultList:function(){
while(this.domNode.childNodes.length>2){
this.domNode.removeChild(this.domNode.childNodes[this.domNode.childNodes.length-2]);
}
},getItems:function(){
return this.domNode.childNodes;
},getListLength:function(){
return this.domNode.childNodes.length-2;
},_onMouseDown:function(evt){
dojo.stopEvent(evt);
},_onMouseUp:function(evt){
if(evt.target===this.domNode){
return;
}else{
if(evt.target==this.previousButton){
this.onPage(-1);
}else{
if(evt.target==this.nextButton){
this.onPage(1);
}else{
var tgt=evt.target;
while(!tgt.item){
tgt=tgt.parentNode;
}
this._setValueAttr({target:tgt},true);
}
}
}
},_onMouseOver:function(evt){
if(evt.target===this.domNode){
return;
}
var tgt=evt.target;
if(!(tgt==this.previousButton||tgt==this.nextButton)){
while(!tgt.item){
tgt=tgt.parentNode;
}
}
this._focusOptionNode(tgt);
},_onMouseOut:function(evt){
if(evt.target===this.domNode){
return;
}
this._blurOptionNode();
},_focusOptionNode:function(node){
if(this._highlighted_option!=node){
this._blurOptionNode();
this._highlighted_option=node;
dojo.addClass(this._highlighted_option,"dijitMenuItemHover");
}
},_blurOptionNode:function(){
if(this._highlighted_option){
dojo.removeClass(this._highlighted_option,"dijitMenuItemHover");
this._highlighted_option=null;
}
},_highlightNextOption:function(){
var fc=this.domNode.firstChild;
if(!this.getHighlightedOption()){
this._focusOptionNode(fc.style.display=="none"?fc.nextSibling:fc);
}else{
var ns=this._highlighted_option.nextSibling;
if(ns&&ns.style.display!="none"){
this._focusOptionNode(ns);
}
}
dijit.scrollIntoView(this._highlighted_option);
},highlightFirstOption:function(){
this._focusOptionNode(this.domNode.firstChild.nextSibling);
dijit.scrollIntoView(this._highlighted_option);
},highlightLastOption:function(){
this._focusOptionNode(this.domNode.lastChild.previousSibling);
dijit.scrollIntoView(this._highlighted_option);
},_highlightPrevOption:function(){
var lc=this.domNode.lastChild;
if(!this.getHighlightedOption()){
this._focusOptionNode(lc.style.display=="none"?lc.previousSibling:lc);
}else{
var ps=this._highlighted_option.previousSibling;
if(ps&&ps.style.display!="none"){
this._focusOptionNode(ps);
}
}
dijit.scrollIntoView(this._highlighted_option);
},_page:function(up){
var _caa=0;
var _cab=this.domNode.scrollTop;
var _cac=dojo.style(this.domNode,"height");
if(!this.getHighlightedOption()){
this._highlightNextOption();
}
while(_caa<_cac){
if(up){
if(!this.getHighlightedOption().previousSibling||this._highlighted_option.previousSibling.style.display=="none"){
break;
}
this._highlightPrevOption();
}else{
if(!this.getHighlightedOption().nextSibling||this._highlighted_option.nextSibling.style.display=="none"){
break;
}
this._highlightNextOption();
}
var _cad=this.domNode.scrollTop;
_caa+=(_cad-_cab)*(up?-1:1);
_cab=_cad;
}
},pageUp:function(){
this._page(true);
},pageDown:function(){
this._page(false);
},getHighlightedOption:function(){
var ho=this._highlighted_option;
return (ho&&ho.parentNode)?ho:null;
},handleKey:function(key){
switch(key){
case dojo.keys.DOWN_ARROW:
this._highlightNextOption();
break;
case dojo.keys.PAGE_DOWN:
this.pageDown();
break;
case dojo.keys.UP_ARROW:
this._highlightPrevOption();
break;
case dojo.keys.PAGE_UP:
this.pageUp();
break;
}
}});
dojo.declare("dijit.form.ComboBox",[dijit.form.ValidationTextBox,dijit.form.ComboBoxMixin],{postMixInProperties:function(){
dijit.form.ComboBoxMixin.prototype.postMixInProperties.apply(this,arguments);
dijit.form.ValidationTextBox.prototype.postMixInProperties.apply(this,arguments);
},postCreate:function(){
dijit.form.ComboBoxMixin.prototype._postCreate.apply(this,arguments);
dijit.form.ValidationTextBox.prototype.postCreate.apply(this,arguments);
},_setDisabledAttr:function(_cb0){
dijit.form.ValidationTextBox.prototype._setDisabledAttr.apply(this,arguments);
dijit.form.ComboBoxMixin.prototype._setDisabledAttr.apply(this,arguments);
},_setValueAttr:function(_cb1,_cb2){
if(!_cb1){
_cb1="";
}
dijit.form.ValidationTextBox.prototype._setValueAttr.call(this,_cb1,_cb2);
}});
dojo.declare("dijit.form._ComboBoxDataStore",null,{constructor:function(root){
this.root=root;
dojo.query("> option",root).forEach(function(node){
node.innerHTML=dojo.trim(node.innerHTML);
});
},getValue:function(item,_cb6,_cb7){
return (_cb6=="value")?item.value:(item.innerText||item.textContent||"");
},isItemLoaded:function(_cb8){
return true;
},getFeatures:function(){
return {"dojo.data.api.Read":true,"dojo.data.api.Identity":true};
},_fetchItems:function(args,_cba,_cbb){
if(!args.query){
args.query={};
}
if(!args.query.name){
args.query.name="";
}
if(!args.queryOptions){
args.queryOptions={};
}
var _cbc=dojo.data.util.filter.patternToRegExp(args.query.name,args.queryOptions.ignoreCase),_cbd=dojo.query("> option",this.root).filter(function(_cbe){
return (_cbe.innerText||_cbe.textContent||"").match(_cbc);
});
if(args.sort){
_cbd.sort(dojo.data.util.sorter.createSortFunction(args.sort,this));
}
_cba(_cbd,args);
},close:function(_cbf){
return;
},getLabel:function(item){
return item.innerHTML;
},getIdentity:function(item){
return dojo.attr(item,"value");
},fetchItemByIdentity:function(args){
var item=dojo.query("option[value='"+args.identity+"']",this.root)[0];
args.onItem(item);
},fetchSelectedItem:function(){
var root=this.root,si=root.selectedIndex;
return dojo.query("> option:nth-child("+(si!=-1?si+1:1)+")",root)[0];
}});
dojo.extend(dijit.form._ComboBoxDataStore,dojo.data.util.simpleFetch);
}
dojo.i18n._preloadLocalizations("dojo.nls.dojo",["da","es","hu","de","pt-br","pl","pt","ca","sv","ar","pt-pt","fi","zh","ru","xx","fr","zh-tw","it","th","cs","he","nl","el","no","ko","tr","en","ROOT","ja"]);
if(dojo.config.afterOnLoad&&dojo.isBrowser){
window.setTimeout(dojo._fakeLoadInit,1000);
}
})();
/* ***************************************************************** */
/* Copyright IBM Corp. 2001, 2009  All Rights Reserved.              */
/* ***************************************************************** */
dojo.provide("lconn.dogear");
if(!dojo._hasResource["lconn.core"]){
dojo._hasResource["lconn.core"]=true;
dojo.provide("lconn.core");
lconn.core.sayHi=function(){
alert("hello from the Core");
};
}
if(!dojo._hasResource["lconn.core.Res"]){
dojo._hasResource["lconn.core.Res"]=true;
dojo.provide("lconn.core.Res");
dojo.declare("lconn.core.Res",[],{bundleFor:"lconn.core",resBundle:null,loadDefaultBundle:function(){
this.resBundle=dojo.i18n.getLocalization(this.bundleFor,"strings");
},loadBundle:function(_1){
this.resBundle=dojo.i18n.getLocalization(_1,"strings");
},getDefaultBundle:function(){
return dojo.i18n.getLocalization(this.bundleFor,"strings");
},getBundle:function(_2){
return dojo.i18n.getLocalization(_2,"strings");
},getStringFrom:function(_3,_4,_5){
var _6=dojo.i18n.getLocalization(_3,"strings")[_4];
if(_5==undefined){
return _6;
}else{
return dojo.string.substitute(_6,_5);
}
},getString:function(_7,_8){
var _9=dojo.i18n.getLocalization(this.bundleFor,"strings")[_7];
if(_8==undefined){
return _9;
}else{
return dojo.string.substitute(_9,_8);
}
}});
}
if(!dojo._hasResource["lconn.core.DateUtil"]){
dojo._hasResource["lconn.core.DateUtil"]=true;
dojo.provide("lconn.core.DateUtil");
var w={};
w.MILLS_IN_DAY=86400000;
w.inited=null;
w.Today="Error: not inited";
w.Yesterday="Error: not inited";
w.Tomorrow="Error: not inited";
w.initResStrings=function(){
var _a=new lconn.core.Res();
_a.loadDefaultBundle();
var b=_a.resBundle;
this.Today=b.rs_today;
this.Yesterday=b.rs_yesterday;
this.Tomorrow=b.rs_tomorrow;
this.inited=true;
};
w.delta=function(_c,_d){
var _e=_c.getTime()-_d;
var _f=Math.ceil(_e/(this.MILLS_IN_DAY));
return _f;
};
w.toString=function(_10,_11){
var _12;
if(!_10||!(_12=Date.parse(_10))){
console.log("Invalid date passed to DateUtil.toString(): "+_10);
return;
}
var _13="";
_13=this.toStringForTimeinMs(_12,_11);
if(djConfig.locale=="ar"){
return "‏"+_13;
}
return _13;
};
w.toStringForTimeinMs=function(_14,_15){
if(this.Days==null){
this.Days=dojo.i18n.getLocalization("dojo.cldr","gregorian")["days-format-wide"];
}
if(this.Month==null){
this.Month=dojo.i18n.getLocalization("dojo.cldr","gregorian")["months-format-abbr"];
}
if(this.inited==null){
this.initResStrings();
}
var _16=new Date();
_16.setHours(0,0,0,0);
var _17=new Date();
_17.setTime(_14);
var _18=this.delta(_16,_14);
var _19="";
if(_18<=2&&_18>=-2){
if(_18==2){
if(_15===undefined){
_19=this.Days[_17.getDay()]+" "+this.getLocalizedTime(_17);
}else{
_19=this.Days[_17.getDay()];
}
}else{
if(_18==1){
if(_15===undefined){
_19=this.Yesterday+" "+this.getLocalizedTime(_17);
}else{
_19=this.Yesterday;
}
}else{
if(_18==0){
if(_15===undefined){
_19=this.Today+" "+this.getLocalizedTime(_17);
}else{
_19=this.Today;
}
}else{
if(_18==-1){
_19=this.Tomorrow;
}else{
if(_18==-2){
_19=this.Days[_17.getDay()];
}
}
}
}
}
}else{
if(_16.getFullYear()==_17.getFullYear()){
var _1a=djConfig.locale.substring(0,2).toLowerCase();
var _1b="";
if(djConfig.locale.length>2){
_1b=djConfig.locale.substring(3,5).toLowerCase();
}
if(_1a=="en"&&(_1b==""||_1b=="us")){
_19=this.Month[_17.getMonth()]+" "+_17.getDate();
}else{
_19=this.getLocalizedDate(_17);
}
}else{
var _1a=djConfig.locale.substring(0,2).toLowerCase();
var _1b="";
if(djConfig.locale.length>2){
_1b=djConfig.locale.substring(3,5).toLowerCase();
}
if(_1a=="en"&&(_1b==""||_1b=="us")){
_19=this.Month[_17.getMonth()]+" "+_17.getDate()+" "+_17.getFullYear();
}else{
_19=this.getLocalizedDate(_17);
}
}
}
return _19;
};
w.getLocalizedTime=function(_1c){
return dojo.date.locale.format(_1c,{selector:"time",formatLength:"short",locale:djConfig.locale});
};
w.getLocalizedDate=function(_1d){
return dojo.date.locale.format(_1d,{selector:"date",formatLength:"medium",locale:djConfig.locale});
};
w.getLocaleString=function(_1e){
var _1f=new Date();
_1f.setTime(_1e);
return _1f.toLocaleString();
};
lconn.core.DateUtil=w;
lconn.core.DateUtil.AtomDateToString=function(_20){
var _21=_20;
var s=_20;
var _23=(s.charAt(s.length-1)=="Z");
var _24=s.indexOf("-");
if(s.length>="yyyy-mm-ddThh:mm".length){
s=s.substring(_24-4);
var y=parseInt(s.substr(0,4));
var m=parseInt(s.substr(5,2),10)-1;
var d=parseInt(s.substr(8,2),10);
var h=parseInt(s.substr(11,2),10);
var mi=parseInt(s.substr(14,2),10);
var utc=0;
if(_23){
var _2b=s.substring(17,s.length-1);
var _2c=parseFloat(_2b);
utc=Date.UTC(y,m,d,h,mi)+_2c*1000;
}else{
var zh=0;
var zm=0;
var _2f=s.length-6;
var _30=s.charAt(_2f);
if((_30=="+"||_30=="-")&&s.indexOf("T")<s.length-5){
var se=parseInt(s.substr(17,2),10);
var zh=parseInt(s.substr(_2f,3),10);
var zm=parseInt(s.substr(_2f+4,2),10);
}
utc=Date.UTC(y,m,d,h,mi,se)-(zh*60*60*1000+zm*60*1000);
}
var _32=new Date(utc);
_21=lconn.core.DateUtil.toString(_32);
}
return _21;
};
}
if(!dojo._hasResource["lconn.core.HTMLUtil"]){
dojo._hasResource["lconn.core.HTMLUtil"]=true;
dojo.provide("lconn.core.HTMLUtil");
lconn.core.HTMLUtil.setInnerTextNode=function(_33,_34){
_33.innerHTML="";
_33.appendChild(document.createTextNode(_34));
};
lconn.core.HTMLUtil.escapeInlineText=function(_35){
return lconn.core.HTMLUtil.escapeText(_35,true);
};
lconn.core.HTMLUtil.escapeText=function(_36,_37){
var _38=document.getElementById("escapeBufferDiv");
if(!_38){
var tmp=document.createElement("div");
tmp.id="escapeBufferDiv";
document.body.appendChild(tmp);
_38=tmp;
}
_38.appendChild(document.createTextNode(_36));
var _3a=_38.innerHTML;
_38.innerHTML="";
if(_37){
_3a=lconn.core.HTMLUtil.escape_q(_3a);
}
return _3a;
};
lconn.core.HTMLUtil.escape_q=function(s){
var t="";
for(var i=0;i<s.length;i++){
var c=s.charAt(i);
if(c=="\""){
t+="&#34;";
}else{
if(c=="'"){
t+="&#39;";
}else{
if(c=="\\"){
t+="&#92;&#92;";
}else{
t+=c;
}
}
}
}
return t;
};
}
if(!dojo._hasResource["lconn.core.NameUtil"]){
dojo._hasResource["lconn.core.NameUtil"]=true;
dojo.provide("lconn.core.NameUtil");
lconn.core.NameUtil={getHTML:function(_3f,_40,_41,id,_43){
var _44;
var _45=lconn.core.HTMLUtil.escapeText(_41);
if(_40){
var _46=lconn.core.HTMLUtil.escapeText(_40);
if(_3f){
_44=(_43?_3f:lconn.core.HTMLUtil.escapeText(_3f));
}else{
_44=_46;
}
return "<span"+(id?" id=\""+id+"\"":"")+"><span class=\"vcard\"><span class=\"fn person lotusPerson\">"+_44+"</span><span class=\"email\" style=\"display: none;\">"+_46+"</span><span class=\"x-lconn-userid\" style=\"display: none;\">"+_45+"</span></span></span>";
}else{
var _44;
var _47=lconn.core.HTMLUtil.escapeInlineText(_41);
if(_3f){
_44=(_43?_3f:lconn.core.HTMLUtil.escapeText(_3f));
}else{
_44=_45;
}
return "<span"+(id?" id=\""+id+"\"":"")+"><span class=\"vcard\"><span class=\"fn person lotusPerson\">"+_44+"</span><span class=\"x-lconn-userid\" style=\"display: none;\">"+_45+"</span></span></span>";
}
}};
}
if(!dojo._hasResource["lconn.core.MimeClass"]){
dojo._hasResource["lconn.core.MimeClass"]=true;
dojo.provide("lconn.core.MimeClass");
lconn.core.MimeClass={getClass:function(_48){
var _49=lconn.core.MimeClass.mimetypes[_48];
if(_49!=undefined){
return _49;
}else{
return "generic";
}
},mimetypes:{"image/bmp":"image","image/gif":"image","image/jpeg":"image","image/tiff":"image","image/x-icon":"image","image/png":"image","image/vnd.adobe.photoshop":"image","vnd.microsoft.icon":"image","application/msword":"document","application/pdf":"document","application/rtf":"document","application/vnd.ms-outlook":"document","application/vnd.ms-project":"document","application/vnd.ms-works":"document","application/x-mswrite":"document","application/postscript":"document","text/html":"document","text/plain":"document","text/richtext":"document","application/vnd.sun.xml.writer":"document","application/vnd.oasis.opendocument.text":"document","application/vnd.ms-powerpoint":"presentation","application/powerpoint":"presentation","application/vnd.oasis.opendocument.presentation":"presentation","application/vnd.sun.xml.impress":"presentation","application/excel":"spreadsheet","application/vnd.ms-excel":"spreadsheet","application/x-msaccess":"spreadsheet","application/vnd.oasis.opendocument.spreadsheet":"spreadsheet","application/vnd.sun.xml.calc":"spreadsheet","application/x-compress":"archive","application/x-compressed":"archive","application/x-gtar":"archive","application/x-gzip":"archive","application/zip":"archive","audio/basic":"audio","audio/mid":"audio","audio/mpeg":"audio","audio/x-aiff":"audio","audio/x-mpegurl":"audio","audio/x-pn-realaudio":"audio","audio/x-wav":"audio","video/mpeg":"video","video/quicktime":"video","video/x-la-asf":"video","video/x-ms-asf":"video","video/x-msvideo":"video","video/x-sgi-movie":"video"}};
}
({today:"Today",yesterday:"Yesterday",tomorrow:"Tomorrow"});
if(!dojo._hasResource["lconn.core.TypeAhead"]){
dojo._hasResource["lconn.core.TypeAhead"]=true;
dojo.provide("lconn.core.TypeAhead");
dojo.declare("lconn.core.TypeAhead",[dijit.form.ComboBox],{formatItem:function(_4a,_4b){
if(!_4b){
return _4a;
}else{
return _4a=_4a.replace(/&/gm,"&amp;").replace(/</gm,"&lt;").replace(/>/gm,"&gt;").replace(/"/gm,"&quot;");
}
},minChars:1,hasDownArrow:false,multipleValues:true,token:"",autoComplete:false,submitFormOnKey:false,_onKeyPress:function(evt){
var key=evt.charOrCode;
if(evt.altKey||(evt.ctrlKey&&(key!="x"&&key!="v"))||evt.key==dojo.keys.SHIFT){
return;
}
var _4e=false;
var pw=this._popupWidget;
var dk=dojo.keys;
if(this._isShowingNow){
pw.handleKey(key);
}
switch(key){
case dk.PAGE_DOWN:
case dk.DOWN_ARROW:
if(!this._isShowingNow||this._prev_key_esc){
this._arrowPressed();
_4e=true;
}else{
this._announceOption(pw.getHighlightedOption());
}
dojo.stopEvent(evt);
this._prev_key_backspace=false;
this._prev_key_esc=false;
break;
case dk.PAGE_UP:
case dk.UP_ARROW:
if(this._isShowingNow){
this._announceOption(pw.getHighlightedOption());
}
dojo.stopEvent(evt);
this._prev_key_backspace=false;
this._prev_key_esc=false;
break;
case dk.ENTER:
var _51;
if(this._isShowingNow&&(_51=pw.getHighlightedOption())){
if(_51==pw.nextButton){
this._nextSearch(1);
dojo.stopEvent(evt);
break;
}else{
if(_51==pw.previousButton){
this._nextSearch(-1);
dojo.stopEvent(evt);
break;
}
}
}else{
this._setDisplayedValueAttr(this.attr("displayedValue"),true);
}
if(!this.submitFormOnKey){
evt.preventDefault();
}
case dk.TAB:
var _52=this.attr("displayedValue");
if(pw&&(_52==pw._messages["previousMessage"]||_52==pw._messages["nextMessage"])){
break;
}
if(this._isShowingNow){
this._prev_key_backspace=false;
this._prev_key_esc=false;
if(pw.getHighlightedOption()){
pw.attr("value",{target:pw.getHighlightedOption()});
}
this._lastQuery=null;
this._hideResultList();
}
break;
case dk.ESCAPE:
this._prev_key_backspace=false;
this._prev_key_esc=true;
if(this._isShowingNow){
dojo.stopEvent(evt);
this._hideResultList();
}
break;
case dk.DELETE:
case dk.BACKSPACE:
this._prev_key_esc=false;
this._prev_key_backspace=true;
_4e=true;
break;
case dk.RIGHT_ARROW:
case dk.LEFT_ARROW:
this._prev_key_backspace=false;
this._prev_key_esc=false;
break;
default:
this._prev_key_backspace=false;
this._prev_key_esc=false;
_4e=typeof key=="string"||key==229;
}
if(this.searchTimer){
clearTimeout(this.searchTimer);
}
if(_4e){
setTimeout(dojo.hitch(this,"_startSearchFromInput"),1);
}
},_numTokensPreceding:function(str,pos){
var i=-1,_56=0;
while(i<pos){
i=str.indexOf(this.token,i+1);
if(i==-1){
i=str.length;
}else{
if(i<pos){
_56++;
}
}
}
return _56;
},_autoCompleteText:function(_57){
var fn=this.focusNode;
var _59=this._getCaretPos(fn);
dijit.selectInputText(fn,fn.value.length);
var _5a;
if(this.multipleValues){
_5a=fn.value.split(this.token);
}else{
_5a=[fn.value];
}
var _5b=0;
if(this.multipleValues){
_5b=this._numTokensPreceding(fn.value,_59);
}
if(this.multipleValues&&this.token!=" "&&_5b>0){
_57=" "+_57;
}
var _5c=this.ignoreCase?"toLowerCase":"substr";
if(dojo.string.trim(_57[_5c](0)).indexOf(dojo.string.trim(_5a[_5b][_5c](0)))==0){
if(_59+1>fn.value.length||fn.value.charAt(_59)==this.token){
var end=_59+_57.length-_5a[_5b].length;
_5a[_5b]=_57;
fn.value=_5a.join(this.token);
dijit.selectInputText(fn,_59,end);
}
}else{
_5a[_5b]=_57;
fn.value=_5a.join(this.token);
var _5e=0;
for(var i=0;i<_5b;i++){
_5e+=_5a[i].length;
}
_5e+=this.token.length*_5b;
dijit.selectInputText(fn,_5e,_5e+_57.length);
}
},_openResultList:function(_60,_61){
if(this.disabled||this.readOnly||(_61.query!=this._lastQuery)){
return;
}
this._popupWidget.clearResultList();
if(!_60.length){
this._hideResultList();
return;
}
var _62=new String(this.formatItem(_60[0]));
if(_62&&this.autoComplete&&!this._prev_key_backspace&&(_61.query!="")){
this._autoCompleteText(_62);
}
_61._maxOptions=this._maxOptions;
this._popupWidget.createOptions(_60,_61,dojo.hitch(this,"_getMenuLabelFromItem"));
this._showResultList();
if(_61.direction){
if(1==_61.direction){
this._popupWidget.highlightFirstOption();
}else{
if(-1==_61.direction){
this._popupWidget.highlightLastOption();
}
}
this._announceOption(this._popupWidget.getHighlightedOption());
}
},_announceOption:function(_63){
if(_63==null){
return;
}
var _64;
if(_63==this._popupWidget.nextButton||_63==this._popupWidget.previousButton||_63==this._popupWidget.searchButton){
_64=_63.innerHTML;
}else{
_64=this.formatItem(_63.item);
}
if(this.multipleValues){
var _65=this._getCaretPos(this.focusNode);
var _66=this.focusNode.value.split(this.token);
var _67=this._numTokensPreceding(this.focusNode.value,_65);
var q=this._lastQuery;
if(this.multipleValues&&this.token!=" "&&_67>0){
q=" "+q;
}
_66[_67]=q;
this.focusNode.value=_66.join(this.token);
}else{
this.focusNode.value=this.focusNode.value.substring(0,this._getCaretPos(this.focusNode));
}
this._setCaretPos(this.focusNode,_65);
dijit.setWaiState(this.focusNode,"activedescendant",dojo.attr(_63,"id"));
this._autoCompleteText(_64);
},_doSelect:function(tgt){
var _6a=this.formatItem(tgt.item);
if(this.multipleValues){
var _6b=this.keyArr[this.keyIdx];
this.keyArr[this.keyIdx]=(this.keyIdx!=0&&this.token!=" "?" ":"")+_6a;
_6a=this.keyArr.join(this.token);
var _6c=this.token+(this.token!=" "?" ":"");
if(_6a.length>=_6c.length&&_6a.substring(_6a.length-_6c.length)!=_6c){
_6a+=_6c;
}
}else{
this.item=tgt.item;
}
this.attr("value",_6a);
this._setCaretPos(this.focusNode,_6a.length);
},_startSearchFromInput:function(){
var _6d=this.focusNode.value;
var _6e=_6d;
if(this.multipleValues){
this.keyArr=_6d.split(this.token);
this.caretPos=this._getCaretPos(this.focusNode);
this.keyIdx=this._numTokensPreceding(_6d,this.caretPos);
_6e=this.keyArr[this.keyIdx];
}
_6e=dojo.string.trim(_6e);
if(_6e.length>=this.minChars){
this._startSearch(_6e);
}else{
this._hideResultList();
}
},_startSearch:function(key){
if(!this._popupWidget){
var _70=this.id+"_popup";
this._popupWidget=new dijit.form._ComboBoxMenu({onChange:dojo.hitch(this,this._selectOption),id:_70});
dijit.removeWaiState(this.focusNode,"activedescendant");
dijit.setWaiState(this.textbox,"owns",_70);
}
this.item=null;
var _71=dojo.clone(this.query);
this._lastInput=key;
this._lastQuery=_71=key;
this.searchTimer=setTimeout(dojo.hitch(this,function(_72,_73){
var _74={queryOptions:{ignoreCase:this.ignoreCase,deep:true},query:_72,onComplete:dojo.hitch(this,"_openResultList"),onError:function(_75){
console.error("dijit.form.ComboBox: "+_75);
dojo.hitch(_73,"_hideResultList")();
},start:0,count:this.pageSize};
dojo.mixin(_74,_73.fetchProperties);
var _76=_73.store.fetch(_74);
var _77=function(_78,_79){
_78.start+=_78.count*_79;
_78.direction=_79;
this.store.fetch(_78);
};
this._nextSearch=this._popupWidget.onPage=dojo.hitch(this,_77,_76);
},_71,this),this.searchDelay);
},getAttribute:function(_7a){
if(this.item&&this.item[_7a]){
return this.item[_7a];
}else{
return "";
}
},getTextBoxValue:function(){
return this.focusNode.value;
},_getMenuLabelFromItem:function(_7b){
var _7c=this.formatItem(_7b,true);
var key="";
if(this.multipleValues){
key=dojo.string.trim(this.keyArr[this.keyIdx]);
}else{
key=dojo.string.trim(this.focusNode.value);
}
key=key.replace(/&/gm,"&amp;").replace(/</gm,"&lt;").replace(/>/gm,"&gt;").replace(/"/gm,"&quot;");
var _7e=_7c.toLowerCase();
var _7f=key.toLowerCase();
var _80=0;
var _81=null;
while(key&&-1<(_81=_7e.indexOf(_7f,_80))){
_7c=_7c.substr(0,_81)+"<b>"+_7c.substring(_81,_81+key.length)+"</b>"+_7c.substring(_81+key.length);
_80=_81+key.length+7;
_7e=_7c.toLowerCase();
}
return {html:true,label:_7c};
}});
}
if(!dojo._hasResource["lconn.core.TypeAheadDataStore"]){
dojo._hasResource["lconn.core.TypeAheadDataStore"]=true;
dojo.provide("lconn.core.TypeAheadDataStore");
dojo.declare("lconn.core.TypeAheadDataStore",null,{constructor:function(_82,_83){
this.queryParam=(_82.queryParam?_82.queryParam:_83.getAttribute("queryParam"));
this.url=(_82.url?_82.url:_83.getAttribute("url"));
},queryParam:"",cache:[],fetch:function(_84){
var _85={};
this.searchDirectory=(_84.searchDirectory?true:false);
if(typeof this.cache[_84.query.toLowerCase()]=="object"){
_84.onComplete(this.cache[_84.query.toLowerCase()],_84);
return _84;
}
if(this.queryParam){
_85[this.queryParam]=_84.query;
}
dojo.xhrPost({url:this.url,content:_85,handleAs:"json-comment-optional",timeout:5000,contentType:"application/x-www-form-urlencoded;charset=UTF-8",load:dojo.hitch(this,function(_86){
this.cache[_84.query.toLowerCase()]=_86;
if(_84.onComplete){
_84.onComplete(_86,_84);
}
}),error:function(){
console.log("There was an error");
}});
return _84;
},getValue:function(_87,_88,_89){
return _87;
}});
}
if(!dojo._hasResource["lconn.core.PeopleDataStore"]){
dojo._hasResource["lconn.core.PeopleDataStore"]=true;
dojo.provide("lconn.core.PeopleDataStore");
dojo.declare("lconn.core.PeopleDataStore",null,{constructor:function(_8a,_8b){
this.queryParam=(_8a.queryParam?_8a.queryParam:_8b.getAttribute("queryParam"));
this.url=(_8a.url?_8a.url:_8b.getAttribute("url"));
},queryParam:"",searchDirectory:false,cache:[],dirCache:[],fetch:function(_8c){
var _8d={};
var _8e;
this.searchDirectory=(_8c.searchDirectory?true:false);
if(this.searchDirectory){
_8e=this.dirCache;
}else{
_8e=this.cache;
}
if(typeof _8e[_8c.query.toLowerCase()]=="object"){
_8c.onComplete(_8e[_8c.query.toLowerCase()],_8c);
return _8c;
}
if(this.queryParam){
_8d[this.queryParam]=_8c.query;
}
if(this.searchDirectory){
_8d.usedirectory="yes";
}
dojo.xhrPost({url:this.url,content:_8d,handleAs:"json-comment-optional",timeout:5000,contentType:"application/x-www-form-urlencoded;charset=UTF-8",load:dojo.hitch(this,function(_8f){
var _90;
if(this.searchDirectory){
_90=this.dirCache;
}else{
_90=this.cache;
}
_90[_8c.query.toLowerCase()]=_8f.items;
if(_8c.onComplete){
_8c.onComplete(_8f.items,_8c);
}
}),error:function(){
console.log("There was an error");
}});
return _8c;
},getValue:function(_91,_92,_93){
if(_91[_92]){
return _91[_92];
}else{
return _93;
}
}});
}
if(!dojo._hasResource["lconn.core.PeopleTypeAhead"]){
dojo._hasResource["lconn.core.PeopleTypeAhead"]=true;
dojo.provide("lconn.core.PeopleTypeAhead");
dojo.declare("lconn.core.PeopleTypeAhead",[lconn.core.TypeAhead],{getItem:function(){
return (this.item?this.item:null);
},formatItem:function(_94,_95){
var str="";
if(_94.name.indexOf(",")!=-1&&_94.name.length>1&&_94.name[0]!="\""&&_94.name[_94.name.length-1]!="\""){
if(_95){
str+="&quot;"+_94.name.replace(/&/gm,"&amp;").replace(/</gm,"&lt;").replace(/>/gm,"&gt;").replace(/"/gm,"&quot;")+"&quot;";
}else{
str+="\""+_94.name+"\"";
}
}else{
str+=_94.name;
}
if(_94.member){
if(_95){
str+=" &lt;"+_94.member.replace(/&/gm,"&amp;").replace(/</gm,"&lt;").replace(/>/gm,"&gt;").replace(/"/gm,"&quot;")+"&gt;&lrm;";
}else{
str+=" <"+_94.member+">‎";
}
}
return str;
},_onKeyPress:function(evt){
var key=evt.charOrCode;
if(evt.altKey||(evt.ctrlKey&&(key!="x"&&key!="v"))||evt.key==dojo.keys.SHIFT){
return;
}
var _99=false;
var pw=this._popupWidget;
var dk=dojo.keys;
if(this._isShowingNow){
pw.handleKey(key);
}
switch(key){
case dk.PAGE_DOWN:
case dk.DOWN_ARROW:
if(!this._isShowingNow||this._prev_key_esc){
this._arrowPressed();
_99=true;
}else{
this._announceOption(pw.getHighlightedOption());
}
dojo.stopEvent(evt);
this._prev_key_backspace=false;
this._prev_key_esc=false;
break;
case dk.PAGE_UP:
case dk.UP_ARROW:
if(this._isShowingNow){
this._announceOption(pw.getHighlightedOption());
}
dojo.stopEvent(evt);
this._prev_key_backspace=false;
this._prev_key_esc=false;
break;
case dk.ENTER:
var _9c;
if(this._isShowingNow&&(_9c=pw.getHighlightedOption())){
if(_9c==pw.nextButton){
this._nextSearch(1);
dojo.stopEvent(evt);
break;
}else{
if(_9c==pw.previousButton){
this._nextSearch(-1);
dojo.stopEvent(evt);
break;
}else{
if(_9c==pw.searchButton){
pw.searchDirectory();
dojo.stopEvent(evt);
return;
}else{
if(_9c.item&&parseInt(_9c.item.type)<0){
dojo.stopEvent(evt);
break;
}
}
}
}
}else{
this._setDisplayedValueAttr(this.attr("displayedValue"),true);
}
evt.preventDefault();
case dk.TAB:
var _9d=this.attr("displayedValue");
if(pw&&(_9d==pw._messages["previousMessage"]||_9d==pw._messages["nextMessage"])){
break;
}
if(this._isShowingNow){
this._prev_key_backspace=false;
this._prev_key_esc=false;
if(pw.getHighlightedOption()){
pw.attr("value",{target:pw.getHighlightedOption()});
}
this._lastQuery=null;
this._hideResultList();
}
break;
case " ":
this._prev_key_backspace=false;
this._prev_key_esc=false;
if(this._isShowingNow&&pw.getHighlightedOption()){
dojo.stopEvent(evt);
this._selectOption();
this._hideResultList();
}else{
_99=true;
}
break;
case dk.ESCAPE:
this._prev_key_backspace=false;
this._prev_key_esc=true;
if(this._isShowingNow){
dojo.stopEvent(evt);
this._hideResultList();
}
break;
case dk.DELETE:
case dk.BACKSPACE:
this._prev_key_esc=false;
this._prev_key_backspace=true;
_99=true;
break;
case dk.RIGHT_ARROW:
case dk.LEFT_ARROW:
this._prev_key_backspace=false;
this._prev_key_esc=false;
break;
default:
this._prev_key_backspace=false;
this._prev_key_esc=false;
_99=typeof key=="string"||key==229;
}
if(this.searchTimer){
clearTimeout(this.searchTimer);
}
if(_99){
setTimeout(dojo.hitch(this,"_startSearchFromInput"),1);
}
},_openResultList:function(_9e,_9f){
if(this.disabled||this.readOnly||(_9f.query!=this._lastQuery)){
return;
}
this._popupWidget.clearResultList();
if(_9e.length){
var _a0=new String(this.formatItem(_9e[0]));
if(_a0&&this.autoComplete&&!this._prev_key_backspace&&(_9f.query!="")){
this._autoCompleteText(_a0);
}
}
_9f._maxOptions=this._maxOptions;
this._popupWidget.createOptions(_9e,_9f,dojo.hitch(this,"_getMenuLabelFromItem"));
this._showResultList();
if(_9f.direction){
if(1==_9f.direction){
this._popupWidget.highlightFirstOption();
}else{
if(-1==_9f.direction){
this._popupWidget.highlightLastOption();
}
}
this._announceOption(this._popupWidget.getHighlightedOption());
}
},_startSearchFromInput:function(_a1,_a2){
var _a3=this.focusNode.value;
var _a4=_a3;
if(this.multipleValues){
this.keyArr=_a3.split(this.token);
this.caretPos=this._getCaretPos(this.focusNode);
this.keyIdx=this._numTokensPreceding(_a3,this.caretPos);
_a4=this.keyArr[this.keyIdx];
}
_a4=dojo.string.trim(_a4);
if(_a4.length>=this.minChars){
this._startSearch(_a4,_a2);
}else{
this._hideResultList();
}
},_startSearch:function(key,_a6){
if(!this._popupWidget){
var _a7=this.id+"_popup";
this._popupWidget=new lconn.act.PeopleTypeAheadMenu({onChange:dojo.hitch(this,this._selectOption),id:_a7});
dijit.removeWaiState(this.focusNode,"activedescendant");
dijit.setWaiState(this.textbox,"owns",_a7);
}
if(_a6==undefined){
_a6=false;
}
this.item=null;
var _a8=dojo.clone(this.query);
this._lastInput=key;
this._lastQuery=_a8=key;
this.searchTimer=setTimeout(dojo.hitch(this,function(_a9,_aa){
var _ab={queryOptions:{ignoreCase:this.ignoreCase,deep:true},searchDirectory:_a6,query:_a9,onComplete:dojo.hitch(this,"_openResultList"),onError:function(_ac){
console.error("dijit.form.ComboBox: "+_ac);
dojo.hitch(_aa,"_hideResultList")();
},start:0,count:this.pageSize};
dojo.mixin(_ab,_aa.fetchProperties);
var _ad=_aa.store.fetch(_ab);
var _ae=function(_af,_b0){
_af.start+=_af.count*_b0;
_af.direction=_b0;
this.store.fetch(_af);
};
this._nextSearch=this._popupWidget.onPage=dojo.hitch(this,_ae,_ad);
this._popupWidget.searchDirectory=dojo.hitch(this,dojo.hitch(this,function(){
this._startSearch(key,true);
}));
},_a8,this),this.searchDelay);
}});
dojo.declare("lconn.act.PeopleTypeAheadMenu",[dijit.form._ComboBoxMenu,lconn.core.Res],{rs_searchDirectory:"",templateString:"<ul class='dijitReset dijitMenu' dojoAttachEvent='onmousedown:_onMouseDown,onmouseup:_onMouseUp,onmouseover:_onMouseOver,onmouseout:_onMouseOut' waiRole='alert' role='waiRole:alert' tabIndex='-1' style='overflow:\"auto\";'>"+"<li class='dijitMenuItem dijitMenuPreviousButton' dojoAttachPoint='previousButton'></li>"+"<li class='dijitMenuItem searchDirectory' dojoAttachPoint='searchButton'>${rs_searchDirectory}</li>"+"<li class='dijitMenuItem dijitMenuNextButton' dojoAttachPoint='nextButton'></li>"+"</ul>",_messages:null,tooltipAroundNode:null,tooltipTimeout:null,tooltipDelay:600,tooltipId:0,popupClosed:true,postMixInProperties:function(){
this.loadDefaultBundle();
this.rs_searchDirectory=this.resBundle.rs_searchDirectory;
this.inherited("postMixInProperties",arguments);
},searchDirectory:function(){
},_setValueAttr:function(_b1){
if(_b1.target.item&&parseInt(_b1.target.item.type)>=0){
this.value=_b1;
this.onChange(_b1);
}
},_createOption:function(_b2,_b3){
var _b4=_b3(_b2);
var _b5=document.createElement("li");
dijit.setWaiRole(_b5,"option");
if(_b2.userid){
dojo.attr(_b5,"exid",_b2.userid);
}
if(_b4.html){
_b5.innerHTML=_b4.label;
}else{
_b5.appendChild(document.createTextNode(_b4.label));
}
if(_b5.innerHTML==""){
_b5.innerHTML="&nbsp;";
}
_b5.item=_b2;
return _b5;
},createOptions:function(_b6,_b7,_b8){
this.previousButton.style.display=(_b7.start==0)?"none":"";
dojo.attr(this.previousButton,"id",this.id+"_prev");
dojo.forEach(_b6,function(_b9,i){
var _bb=this._createOption(_b9,_b8);
_bb.className="dijitMenuItem";
dojo.attr(_bb,"id",this.id+i);
this.domNode.insertBefore(_bb,this.searchButton);
},this);
var _bc=false;
if(_b7._maxOptions&&_b7._maxOptions!=-1){
if((_b7.start+_b7.count)<_b7._maxOptions){
_bc=true;
}else{
if((_b7.start+_b7.count)>(_b7._maxOptions-1)){
if(_b7.count==_b6.length){
_bc=true;
}
}
}
}else{
if(_b7.count==_b6.length){
_bc=true;
}
}
this.nextButton.style.display=_bc?"":"none";
dojo.attr(this.nextButton,"id",this.id+"_next");
this.searchButton.style.display=(_b7.searchDirectory?"none":"");
},_onMouseUp:function(evt){
if(evt.target==this.searchButton){
this.searchDirectory();
}else{
this.inherited("_onMouseUp",arguments);
}
},_onMouseOver:function(evt){
if(evt.target===this.domNode){
return;
}
var tgt=evt.target;
if(!(tgt==this.previousButton||tgt==this.nextButton||tgt==this.searchButton)){
while(!tgt.item){
tgt=tgt.parentNode;
}
}
this._focusOptionNode(tgt);
},_focusOptionNode:function(_c0){
if(this._highlighted_option!=_c0){
var _c1=dojo.attr(_c0,"exid");
this.closeTooltip();
this.tooltipId++;
this.popupClosed=false;
if(_c1&&window.lconn&&lconn.profiles&&lconn.profiles.bizCard.bizCard.renderMiniBizCard){
this.tooltipTimeout=setTimeout(dojo.hitch(this,"renderBizCard",_c1,dojo.hitch(this,"showTooltip",this.tooltipId,_c0)),this.tooltipDelay);
}
}
this.inherited("_focusOptionNode",arguments);
},renderBizCard:function(_c2,fn){
if(window.lconn&&lconn.profiles&&lconn.profiles.bizCard.bizCard.renderMiniBizCard){
lconn.profiles.bizCard.bizCard.renderMiniBizCard(_c2,fn);
}
},showTooltip:function(id,_c5,_c6){
if(id==this.tooltipId&&!this.popupClosed){
this.tooltipAroundNode=_c5;
dijit.showTooltip(_c6,_c5,["after","before"]);
}
},closeTooltip:function(){
if(this.tooltipAroundNode){
dijit.hideTooltip(this.tooltipAroundNode);
this.tooltipAroundNode=null;
}
if(this.tooltipTimeout){
clearTimeout(this.tooltipTimeout);
this.tooltipTimeout=null;
}
},onClose:function(){
this.popupClosed=true;
this.closeTooltip();
this._blurOptionNode();
},clearResultList:function(){
while(this.domNode.childNodes.length>3){
this.domNode.removeChild(this.domNode.childNodes[this.domNode.childNodes.length-3]);
}
},getListLength:function(){
return this.domNode.childNodes.length-3;
}});
}
if(!dojo._hasResource["lconn.core.MenuItem"]){
dojo._hasResource["lconn.core.MenuItem"]=true;
dojo.provide("lconn.core.MenuItem");
var w={};
w.iconSrc="";
w.postCreate=function(){
this.inherited("postCreate",arguments);
if(this.iconSrc!=""){
var img=document.createElement("img");
img.src=this.iconSrc;
this.iconNode.appendChild(img);
}
};
dojo.declare("lconn.core.MenuItem",[dijit.MenuItem],w);
}
if(!dojo._hasResource["lconn.dogear.Res"]){
dojo._hasResource["lconn.dogear.Res"]=true;
dojo.provide("lconn.dogear.Res");
dojo.declare("lconn.dogear.Res",[],{bundleFor:"lconn.dogear",resBundle:null,loadDefaultBundle:function(){
this.resBundle=dojo.i18n.getLocalization(this.bundleFor,"strings");
},loadBundle:function(pkg){
this.resBundle=dojo.i18n.getLocalization(pkg,"strings");
},getDefaultBundle:function(){
return dojo.i18n.getLocalization(this.bundleFor,"strings");
},getBundle:function(pkg){
return dojo.i18n.getLocalization(pkg,"strings");
},getStringFrom:function(pkg,key,_cc){
var _cd=dojo.i18n.getLocalization(pkg,"strings")[key];
if(_cc==undefined){
return _cd;
}else{
return dojo.string.substitute(_cd,_cc);
}
},getString:function(key,_cf){
var _d0=dojo.i18n.getLocalization(this.bundleFor,"strings")[key];
if(_cf==undefined){
return _d0;
}else{
return dojo.string.substitute(_d0,_cf);
}
}});
}
if(!dojo._hasResource["lconn.dogear._Templated"]){
dojo._hasResource["lconn.dogear._Templated"]=true;
dojo.provide("lconn.dogear._Templated");
dojo.declare("lconn.dogear._Templated",dijit._Templated,{escapeText:function(_d1){
return escapeText(_d1);
},escapeInlineText:function(_d2){
return escapeInlineText(_d2);
},destroy_AP:dojo.isIE<7?function(){
for(var ap in this){
if(ap.indexOf("_AP")>0){
delete this[ap];
}
}
}:function(){
}});
}
if(!dojo._hasResource["dojo.dnd.TimedMoveable"]){
dojo._hasResource["dojo.dnd.TimedMoveable"]=true;
dojo.provide("dojo.dnd.TimedMoveable");
(function(){
var _d4=dojo.dnd.Moveable.prototype.onMove;
dojo.declare("dojo.dnd.TimedMoveable",dojo.dnd.Moveable,{timeout:40,constructor:function(_d5,_d6){
if(!_d6){
_d6={};
}
if(_d6.timeout&&typeof _d6.timeout=="number"&&_d6.timeout>=0){
this.timeout=_d6.timeout;
}
},markupFactory:function(_d7,_d8){
return new dojo.dnd.TimedMoveable(_d8,_d7);
},onMoveStop:function(_d9){
if(_d9._timer){
clearTimeout(_d9._timer);
_d4.call(this,_d9,_d9._leftTop);
}
dojo.dnd.Moveable.prototype.onMoveStop.apply(this,arguments);
},onMove:function(_da,_db){
_da._leftTop=_db;
if(!_da._timer){
var _t=this;
_da._timer=setTimeout(function(){
_da._timer=null;
_d4.call(_t,_da,_da._leftTop);
},this.timeout);
}
}});
})();
}
if(!dojo._hasResource["dojo.fx"]){
dojo._hasResource["dojo.fx"]=true;
dojo.provide("dojo.fx");
dojo.provide("dojo.fx.Toggler");
(function(){
var _dd={_fire:function(evt,_df){
if(this[evt]){
this[evt].apply(this,_df||[]);
}
return this;
}};
var _e0=function(_e1){
this._index=-1;
this._animations=_e1||[];
this._current=this._onAnimateCtx=this._onEndCtx=null;
this.duration=0;
dojo.forEach(this._animations,function(a){
this.duration+=a.duration;
if(a.delay){
this.duration+=a.delay;
}
},this);
};
dojo.extend(_e0,{_onAnimate:function(){
this._fire("onAnimate",arguments);
},_onEnd:function(){
dojo.disconnect(this._onAnimateCtx);
dojo.disconnect(this._onEndCtx);
this._onAnimateCtx=this._onEndCtx=null;
if(this._index+1==this._animations.length){
this._fire("onEnd");
}else{
this._current=this._animations[++this._index];
this._onAnimateCtx=dojo.connect(this._current,"onAnimate",this,"_onAnimate");
this._onEndCtx=dojo.connect(this._current,"onEnd",this,"_onEnd");
this._current.play(0,true);
}
},play:function(_e3,_e4){
if(!this._current){
this._current=this._animations[this._index=0];
}
if(!_e4&&this._current.status()=="playing"){
return this;
}
var _e5=dojo.connect(this._current,"beforeBegin",this,function(){
this._fire("beforeBegin");
}),_e6=dojo.connect(this._current,"onBegin",this,function(arg){
this._fire("onBegin",arguments);
}),_e8=dojo.connect(this._current,"onPlay",this,function(arg){
this._fire("onPlay",arguments);
dojo.disconnect(_e5);
dojo.disconnect(_e6);
dojo.disconnect(_e8);
});
if(this._onAnimateCtx){
dojo.disconnect(this._onAnimateCtx);
}
this._onAnimateCtx=dojo.connect(this._current,"onAnimate",this,"_onAnimate");
if(this._onEndCtx){
dojo.disconnect(this._onEndCtx);
}
this._onEndCtx=dojo.connect(this._current,"onEnd",this,"_onEnd");
this._current.play.apply(this._current,arguments);
return this;
},pause:function(){
if(this._current){
var e=dojo.connect(this._current,"onPause",this,function(arg){
this._fire("onPause",arguments);
dojo.disconnect(e);
});
this._current.pause();
}
return this;
},gotoPercent:function(_ec,_ed){
this.pause();
var _ee=this.duration*_ec;
this._current=null;
dojo.some(this._animations,function(a){
if(a.duration<=_ee){
this._current=a;
return true;
}
_ee-=a.duration;
return false;
});
if(this._current){
this._current.gotoPercent(_ee/this._current.duration,_ed);
}
return this;
},stop:function(_f0){
if(this._current){
if(_f0){
for(;this._index+1<this._animations.length;++this._index){
this._animations[this._index].stop(true);
}
this._current=this._animations[this._index];
}
var e=dojo.connect(this._current,"onStop",this,function(arg){
this._fire("onStop",arguments);
dojo.disconnect(e);
});
this._current.stop();
}
return this;
},status:function(){
return this._current?this._current.status():"stopped";
},destroy:function(){
if(this._onAnimateCtx){
dojo.disconnect(this._onAnimateCtx);
}
if(this._onEndCtx){
dojo.disconnect(this._onEndCtx);
}
}});
dojo.extend(_e0,_dd);
dojo.fx.chain=function(_f3){
return new _e0(_f3);
};
var _f4=function(_f5){
this._animations=_f5||[];
this._connects=[];
this._finished=0;
this.duration=0;
dojo.forEach(_f5,function(a){
var _f7=a.duration;
if(a.delay){
_f7+=a.delay;
}
if(this.duration<_f7){
this.duration=_f7;
}
this._connects.push(dojo.connect(a,"onEnd",this,"_onEnd"));
},this);
this._pseudoAnimation=new dojo._Animation({curve:[0,1],duration:this.duration});
dojo.forEach(["beforeBegin","onBegin","onPlay","onAnimate","onPause","onStop"],function(evt){
this._connects.push(dojo.connect(this._pseudoAnimation,evt,dojo.hitch(this,"_fire",evt)));
},this);
};
dojo.extend(_f4,{_doAction:function(_f9,_fa){
dojo.forEach(this._animations,function(a){
a[_f9].apply(a,_fa);
});
return this;
},_onEnd:function(){
if(++this._finished==this._animations.length){
this._fire("onEnd");
}
},_call:function(_fc,_fd){
var t=this._pseudoAnimation;
t[_fc].apply(t,_fd);
},play:function(_ff,_100){
this._finished=0;
this._doAction("play",arguments);
this._call("play",arguments);
return this;
},pause:function(){
this._doAction("pause",arguments);
this._call("pause",arguments);
return this;
},gotoPercent:function(_101,_102){
var ms=this.duration*_101;
dojo.forEach(this._animations,function(a){
a.gotoPercent(a.duration<ms?1:(ms/a.duration),_102);
});
this._call("gotoPercent",arguments);
return this;
},stop:function(_105){
this._doAction("stop",arguments);
this._call("stop",arguments);
return this;
},status:function(){
return this._pseudoAnimation.status();
},destroy:function(){
dojo.forEach(this._connects,dojo.disconnect);
}});
dojo.extend(_f4,_dd);
dojo.fx.combine=function(_106){
return new _f4(_106);
};
})();
dojo.declare("dojo.fx.Toggler",null,{constructor:function(args){
var _t=this;
dojo.mixin(_t,args);
_t.node=args.node;
_t._showArgs=dojo.mixin({},args);
_t._showArgs.node=_t.node;
_t._showArgs.duration=_t.showDuration;
_t.showAnim=_t.showFunc(_t._showArgs);
_t._hideArgs=dojo.mixin({},args);
_t._hideArgs.node=_t.node;
_t._hideArgs.duration=_t.hideDuration;
_t.hideAnim=_t.hideFunc(_t._hideArgs);
dojo.connect(_t.showAnim,"beforeBegin",dojo.hitch(_t.hideAnim,"stop",true));
dojo.connect(_t.hideAnim,"beforeBegin",dojo.hitch(_t.showAnim,"stop",true));
},node:null,showFunc:dojo.fadeIn,hideFunc:dojo.fadeOut,showDuration:200,hideDuration:200,show:function(_109){
return this.showAnim.play(_109||0);
},hide:function(_10a){
return this.hideAnim.play(_10a||0);
}});
dojo.fx.wipeIn=function(args){
args.node=dojo.byId(args.node);
var node=args.node,s=node.style,o;
var anim=dojo.animateProperty(dojo.mixin({properties:{height:{start:function(){
o=s.overflow;
s.overflow="hidden";
if(s.visibility=="hidden"||s.display=="none"){
s.height="1px";
s.display="";
s.visibility="";
return 1;
}else{
var _110=dojo.style(node,"height");
return Math.max(_110,1);
}
},end:function(){
return node.scrollHeight;
}}}},args));
dojo.connect(anim,"onEnd",function(){
s.height="auto";
s.overflow=o;
});
return anim;
};
dojo.fx.wipeOut=function(args){
var node=args.node=dojo.byId(args.node);
var s=node.style;
var o;
var anim=dojo.animateProperty(dojo.mixin({properties:{height:{end:1}}},args));
dojo.connect(anim,"beforeBegin",function(){
o=s.overflow;
s.overflow="hidden";
s.display="";
});
dojo.connect(anim,"onEnd",function(){
s.overflow=o;
s.height="auto";
s.display="none";
});
return anim;
};
dojo.fx.slideTo=function(args){
var node=(args.node=dojo.byId(args.node));
var top=null;
var left=null;
var init=(function(n){
return function(){
var cs=dojo.getComputedStyle(n);
var pos=cs.position;
top=(pos=="absolute"?n.offsetTop:parseInt(cs.top)||0);
left=(pos=="absolute"?n.offsetLeft:parseInt(cs.left)||0);
if(pos!="absolute"&&pos!="relative"){
var ret=dojo.coords(n,true);
top=ret.y;
left=ret.x;
n.style.position="absolute";
n.style.top=top+"px";
n.style.left=left+"px";
}
};
})(node);
init();
var anim=dojo.animateProperty(dojo.mixin({properties:{top:{end:args.top||0},left:{end:args.left||0}}},args));
dojo.connect(anim,"beforeBegin",anim,init);
return anim;
};
}
if(!dojo._hasResource["dojo.html"]){
dojo._hasResource["dojo.html"]=true;
dojo.provide("dojo.html");
(function(){
var _120=0;
dojo.html._secureForInnerHtml=function(cont){
return cont.replace(/(?:\s*<!DOCTYPE\s[^>]+>|<title[^>]*>[\s\S]*?<\/title>)/ig,"");
};
dojo.html._emptyNode=function(node){
while(node.firstChild){
dojo._destroyElement(node.firstChild);
}
};
dojo.html._setNodeContent=function(node,cont,_125){
if(_125){
dojo.html._emptyNode(node);
}
if(typeof cont=="string"){
var pre="",post="",walk=0,name=node.nodeName.toLowerCase();
switch(name){
case "tr":
pre="<tr>";
post="</tr>";
walk+=1;
case "tbody":
case "thead":
pre="<tbody>"+pre;
post+="</tbody>";
walk+=1;
case "table":
pre="<table>"+pre;
post+="</table>";
walk+=1;
break;
}
if(walk){
var n=node.ownerDocument.createElement("div");
n.innerHTML=pre+cont+post;
do{
n=n.firstChild;
}while(--walk);
dojo.forEach(n.childNodes,function(n){
node.appendChild(n.cloneNode(true));
});
}else{
node.innerHTML=cont;
}
}else{
if(cont.nodeType){
node.appendChild(cont);
}else{
dojo.forEach(cont,function(n){
node.appendChild(n.cloneNode(true));
});
}
}
return node;
};
dojo.declare("dojo.html._ContentSetter",null,{node:"",content:"",id:"",cleanContent:false,extractContent:false,parseContent:false,constructor:function(_12d,node){
dojo.mixin(this,_12d||{});
node=this.node=dojo.byId(this.node||node);
if(!this.id){
this.id=["Setter",(node)?node.id||node.tagName:"",_120++].join("_");
}
if(!(this.node||node)){
new Error(this.declaredClass+": no node provided to "+this.id);
}
},set:function(cont,_130){
if(undefined!==cont){
this.content=cont;
}
if(_130){
this._mixin(_130);
}
this.onBegin();
this.setContent();
this.onEnd();
return this.node;
},setContent:function(){
var node=this.node;
if(!node){
console.error("setContent given no node");
}
try{
node=dojo.html._setNodeContent(node,this.content);
}
catch(e){
var _132=this.onContentError(e);
try{
node.innerHTML=_132;
}
catch(e){
console.error("Fatal "+this.declaredClass+".setContent could not change content due to "+e.message,e);
}
}
this.node=node;
},empty:function(){
if(this.parseResults&&this.parseResults.length){
dojo.forEach(this.parseResults,function(w){
if(w.destroy){
w.destroy();
}
});
delete this.parseResults;
}
dojo.html._emptyNode(this.node);
},onBegin:function(){
var cont=this.content;
if(dojo.isString(cont)){
if(this.cleanContent){
cont=dojo.html._secureForInnerHtml(cont);
}
if(this.extractContent){
var _135=cont.match(/<body[^>]*>\s*([\s\S]+)\s*<\/body>/im);
if(_135){
cont=_135[1];
}
}
}
this.empty();
this.content=cont;
return this.node;
},onEnd:function(){
if(this.parseContent){
this._parse();
}
return this.node;
},tearDown:function(){
delete this.parseResults;
delete this.node;
delete this.content;
},onContentError:function(err){
return "Error occured setting content: "+err;
},_mixin:function(_137){
var _138={},key;
for(key in _137){
if(key in _138){
continue;
}
this[key]=_137[key];
}
},_parse:function(){
var _13a=this.node;
try{
this.parseResults=dojo.parser.parse(_13a,true);
}
catch(e){
this._onError("Content",e,"Error parsing in _ContentSetter#"+this.id);
}
},_onError:function(type,err,_13d){
var _13e=this["on"+type+"Error"].call(this,err);
if(_13d){
console.error(_13d,err);
}else{
if(_13e){
dojo.html._setNodeContent(this.node,_13e,true);
}
}
}});
dojo.html.set=function(node,cont,_141){
if(undefined==cont){
console.warn("dojo.html.set: no cont argument provided, using empty string");
cont="";
}
if(!_141){
return dojo.html._setNodeContent(node,cont,true);
}else{
var op=new dojo.html._ContentSetter(dojo.mixin(_141,{content:cont,node:node}));
return op.set();
}
};
})();
}
if(!dojo._hasResource["dijit.layout.ContentPane"]){
dojo._hasResource["dijit.layout.ContentPane"]=true;
dojo.provide("dijit.layout.ContentPane");
dojo.declare("dijit.layout.ContentPane",dijit._Widget,{href:"",extractContent:false,parseOnLoad:true,preventCache:false,preload:false,refreshOnShow:false,loadingMessage:"<span class='dijitContentPaneLoading'>${loadingState}</span>",errorMessage:"<span class='dijitContentPaneError'>${errorState}</span>",isLoaded:false,baseClass:"dijitContentPane",doLayout:true,_isRealContent:true,postMixInProperties:function(){
this.inherited(arguments);
var _143=dojo.i18n.getLocalization("dijit","loading",this.lang);
this.loadingMessage=dojo.string.substitute(this.loadingMessage,_143);
this.errorMessage=dojo.string.substitute(this.errorMessage,_143);
},buildRendering:function(){
this.inherited(arguments);
if(!this.containerNode){
this.containerNode=this.domNode;
}
},postCreate:function(){
this.domNode.title="";
if(!dijit.hasWaiRole(this.domNode)){
dijit.setWaiRole(this.domNode,"group");
}
dojo.addClass(this.domNode,this.baseClass);
},startup:function(){
if(this._started){
return;
}
if(this.doLayout!="false"&&this.doLayout!==false){
this._checkIfSingleChild();
if(this._singleChild){
this._singleChild.startup();
}
}
this._loadCheck();
this.inherited(arguments);
},_checkIfSingleChild:function(){
var _144=dojo.query(">",this.containerNode),_145=_144.filter(function(node){
return dojo.hasAttr(node,"dojoType")||dojo.hasAttr(node,"widgetId");
}),_147=dojo.filter(_145.map(dijit.byNode),function(_148){
return _148&&_148.domNode&&_148.resize;
});
if(_144.length==_145.length&&_147.length==1){
this.isContainer=true;
this._singleChild=_147[0];
}else{
delete this.isContainer;
delete this._singleChild;
}
},refresh:function(){
return this._prepareLoad(true);
},setHref:function(href){
dojo.deprecated("dijit.layout.ContentPane.setHref() is deprecated.\tUse attr('href', ...) instead.","","2.0");
return this.attr("href",href);
},_setHrefAttr:function(href){
this.href=href;
if(this._created){
return this._prepareLoad();
}
},setContent:function(data){
dojo.deprecated("dijit.layout.ContentPane.setContent() is deprecated.  Use attr('content', ...) instead.","","2.0");
this.attr("content",data);
},_setContentAttr:function(data){
this.href="";
this.cancel();
this._setContent(data||"");
this._isDownloaded=false;
if(this.doLayout!="false"&&this.doLayout!==false){
this._checkIfSingleChild();
if(this._singleChild&&this._singleChild.resize){
this._singleChild.startup();
var cb=this._contentBox||dojo.contentBox(this.containerNode);
this._singleChild.resize({w:cb.w,h:cb.h});
}
}
},_getContentAttr:function(){
return this.containerNode.innerHTML;
},cancel:function(){
if(this._xhrDfd&&(this._xhrDfd.fired==-1)){
this._xhrDfd.cancel();
}
delete this._xhrDfd;
},destroyRecursive:function(_14e){
if(this._beingDestroyed){
return;
}
this._beingDestroyed=true;
this.inherited(arguments);
},resize:function(size){
dojo.marginBox(this.domNode,size);
var node=this.containerNode,mb=dojo.mixin(dojo.marginBox(node),size||{});
var cb=this._contentBox=dijit.layout.marginBox2contentBox(node,mb);
if(this._singleChild&&this._singleChild.resize){
this._singleChild.resize({w:cb.w,h:cb.h});
}
},_prepareLoad:function(_153){
this.cancel();
this.isLoaded=false;
this._loadCheck(_153);
},_isShown:function(){
if("open" in this){
return this.open;
}else{
var node=this.domNode;
return (node.style.display!="none")&&(node.style.visibility!="hidden");
}
},_loadCheck:function(_155){
var _156=this._isShown();
if(this.href&&(_155||(this.preload&&!this.isLoaded&&!this._xhrDfd)||(this.refreshOnShow&&_156&&!this._xhrDfd)||(!this.isLoaded&&_156&&!this._xhrDfd))){
this._downloadExternalContent();
}
},_downloadExternalContent:function(){
this._setContent(this.onDownloadStart(),true);
var self=this;
var _158={preventCache:(this.preventCache||this.refreshOnShow),url:this.href,handleAs:"text"};
if(dojo.isObject(this.ioArgs)){
dojo.mixin(_158,this.ioArgs);
}
var hand=this._xhrDfd=(this.ioMethod||dojo.xhrGet)(_158);
hand.addCallback(function(html){
try{
self._isDownloaded=true;
self._setContent(html,false);
self.onDownloadEnd();
}
catch(err){
self._onError("Content",err);
}
delete self._xhrDfd;
return html;
});
hand.addErrback(function(err){
if(!hand.cancelled){
self._onError("Download",err);
}
delete self._xhrDfd;
return err;
});
},_onLoadHandler:function(data){
this.isLoaded=true;
try{
this.onLoad(data);
}
catch(e){
console.error("Error "+this.widgetId+" running custom onLoad code");
}
},_onUnloadHandler:function(){
this.isLoaded=false;
try{
this.onUnload();
}
catch(e){
console.error("Error "+this.widgetId+" running custom onUnload code");
}
},destroyDescendants:function(){
if(this._isRealContent){
this._onUnloadHandler();
}
var _15d=this._contentSetter;
if(_15d){
_15d.empty();
}else{
this.inherited(arguments);
dojo.html._emptyNode(this.containerNode);
}
},_setContent:function(cont,_15f){
this.destroyDescendants();
this._isRealContent=!_15f;
var _160=this._contentSetter;
if(!(_160&&_160 instanceof dojo.html._ContentSetter)){
_160=this._contentSetter=new dojo.html._ContentSetter({node:this.containerNode,_onError:dojo.hitch(this,this._onError),onContentError:dojo.hitch(this,function(e){
var _162=this.onContentError(e);
try{
this.containerNode.innerHTML=_162;
}
catch(e){
console.error("Fatal "+this.id+" could not change content due to "+e.message,e);
}
})});
}
var _163=dojo.mixin({cleanContent:this.cleanContent,extractContent:this.extractContent,parseContent:this.parseOnLoad},this._contentSetterParams||{});
dojo.mixin(_160,_163);
_160.set((dojo.isObject(cont)&&cont.domNode)?cont.domNode:cont);
delete this._contentSetterParams;
if(!_15f){
this._onLoadHandler(cont);
}
},_onError:function(type,err,_166){
var _167=this["on"+type+"Error"].call(this,err);
if(_166){
console.error(_166,err);
}else{
if(_167){
this._setContent(_167,true);
}
}
},_createSubWidgets:function(){
try{
dojo.parser.parse(this.containerNode,true);
}
catch(e){
this._onError("Content",e,"Couldn't create widgets in "+this.id+(this.href?" from "+this.href:""));
}
},onLoad:function(data){
},onUnload:function(){
},onDownloadStart:function(){
return this.loadingMessage;
},onContentError:function(_169){
},onDownloadError:function(_16a){
return this.errorMessage;
},onDownloadEnd:function(){
}});
}
if(!dojo._hasResource["dijit.form.Form"]){
dojo._hasResource["dijit.form.Form"]=true;
dojo.provide("dijit.form.Form");
dojo.declare("dijit.form._FormMixin",null,{reset:function(){
dojo.forEach(this.getDescendants(),function(_16b){
if(_16b.reset){
_16b.reset();
}
});
},validate:function(){
var _16c=false;
return dojo.every(dojo.map(this.getDescendants(),function(_16d){
_16d._hasBeenBlurred=true;
var _16e=_16d.disabled||!_16d.validate||_16d.validate();
if(!_16e&&!_16c){
dijit.scrollIntoView(_16d.containerNode||_16d.domNode);
_16d.focus();
_16c=true;
}
return _16e;
}),function(item){
return item;
});
},setValues:function(val){
dojo.deprecated(this.declaredClass+"::setValues() is deprecated. Use attr('value', val) instead.","","2.0");
return this.attr("value",val);
},_setValueAttr:function(obj){
var map={};
dojo.forEach(this.getDescendants(),function(_173){
if(!_173.name){
return;
}
var _174=map[_173.name]||(map[_173.name]=[]);
_174.push(_173);
});
for(var name in map){
if(!map.hasOwnProperty(name)){
continue;
}
var _176=map[name],_177=dojo.getObject(name,false,obj);
if(_177===undefined){
continue;
}
if(!dojo.isArray(_177)){
_177=[_177];
}
if(typeof _176[0].checked=="boolean"){
dojo.forEach(_176,function(w,i){
w.attr("value",dojo.indexOf(_177,w.value)!=-1);
});
}else{
if(_176[0]._multiValue){
_176[0].attr("value",_177);
}else{
dojo.forEach(_176,function(w,i){
w.attr("value",_177[i]);
});
}
}
}
},getValues:function(){
dojo.deprecated(this.declaredClass+"::getValues() is deprecated. Use attr('value') instead.","","2.0");
return this.attr("value");
},_getValueAttr:function(){
var obj={};
dojo.forEach(this.getDescendants(),function(_17d){
var name=_17d.name;
if(!name||_17d.disabled){
return;
}
var _17f=_17d.attr("value");
if(typeof _17d.checked=="boolean"){
if(/Radio/.test(_17d.declaredClass)){
if(_17f!==false){
dojo.setObject(name,_17f,obj);
}
}else{
var ary=dojo.getObject(name,false,obj);
if(!ary){
ary=[];
dojo.setObject(name,ary,obj);
}
if(_17f!==false){
ary.push(_17f);
}
}
}else{
dojo.setObject(name,_17f,obj);
}
});
return obj;
},isValid:function(){
this._invalidWidgets=[];
return dojo.every(this.getDescendants(),function(_181){
var _182=_181.disabled||!_181.isValid||_181.isValid();
if(!_182){
this._invalidWidgets.push(_181);
}
return _182;
},this);
},onValidStateChange:function(_183){
},_widgetChange:function(_184){
var _185=this._lastValidState;
if(!_184||this._lastValidState===undefined){
_185=this.isValid();
if(this._lastValidState===undefined){
this._lastValidState=_185;
}
}else{
if(_184.isValid){
this._invalidWidgets=dojo.filter(this._invalidWidgets||[],function(w){
return (w!=_184);
},this);
if(!_184.isValid()&&!_184.attr("disabled")){
this._invalidWidgets.push(_184);
}
_185=(this._invalidWidgets.length===0);
}
}
if(_185!==this._lastValidState){
this._lastValidState=_185;
this.onValidStateChange(_185);
}
},connectChildren:function(){
dojo.forEach(this._changeConnections,dojo.hitch(this,"disconnect"));
var _187=this;
var _188=this._changeConnections=[];
dojo.forEach(dojo.filter(this.getDescendants(),function(item){
return item.validate;
}),function(_18a){
_188.push(_187.connect(_18a,"validate",dojo.hitch(_187,"_widgetChange",_18a)));
_188.push(_187.connect(_18a,"_setDisabledAttr",dojo.hitch(_187,"_widgetChange",_18a)));
});
this._widgetChange(null);
},startup:function(){
this.inherited(arguments);
this._changeConnections=[];
this.connectChildren();
}});
dojo.declare("dijit.form.Form",[dijit._Widget,dijit._Templated,dijit.form._FormMixin],{name:"",action:"",method:"",encType:"","accept-charset":"",accept:"",target:"",templateString:"<form dojoAttachPoint='containerNode' dojoAttachEvent='onreset:_onReset,onsubmit:_onSubmit' name='${name}'></form>",attributeMap:dojo.mixin(dojo.clone(dijit._Widget.prototype.attributeMap),{action:"",method:"",encType:"","accept-charset":"",accept:"",target:""}),execute:function(_18b){
},onExecute:function(){
},_setEncTypeAttr:function(_18c){
this.encType=_18c;
dojo.attr(this.domNode,"encType",_18c);
if(dojo.isIE){
this.domNode.encoding=_18c;
}
},postCreate:function(){
if(dojo.isIE&&this.srcNodeRef&&this.srcNodeRef.attributes){
var item=this.srcNodeRef.attributes.getNamedItem("encType");
if(item&&!item.specified&&(typeof item.value=="string")){
this.attr("encType",item.value);
}
}
this.inherited(arguments);
},onReset:function(e){
return true;
},_onReset:function(e){
var faux={returnValue:true,preventDefault:function(){
this.returnValue=false;
},stopPropagation:function(){
},currentTarget:e.currentTarget,target:e.target};
if(!(this.onReset(faux)===false)&&faux.returnValue){
this.reset();
}
dojo.stopEvent(e);
return false;
},_onSubmit:function(e){
var fp=dijit.form.Form.prototype;
if(this.execute!=fp.execute||this.onExecute!=fp.onExecute){
dojo.deprecated("dijit.form.Form:execute()/onExecute() are deprecated. Use onSubmit() instead.","","2.0");
this.onExecute();
this.execute(this.getValues());
}
if(this.onSubmit(e)===false){
dojo.stopEvent(e);
}
},onSubmit:function(e){
return this.isValid();
},submit:function(){
if(!(this.onSubmit()===false)){
this.containerNode.submit();
}
}});
}
if(!dojo._hasResource["dijit.Dialog"]){
dojo._hasResource["dijit.Dialog"]=true;
dojo.provide("dijit.Dialog");
dojo.declare("dijit.DialogUnderlay",[dijit._Widget,dijit._Templated],{templateString:"<div class='dijitDialogUnderlayWrapper' id='${id}_wrapper'><div class='dijitDialogUnderlay ${class}' id='${id}' dojoAttachPoint='node'></div></div>",attributeMap:{},postCreate:function(){
dojo.body().appendChild(this.domNode);
this.bgIframe=new dijit.BackgroundIframe(this.domNode);
},layout:function(){
var _194=dijit.getViewport();
var is=this.node.style,os=this.domNode.style;
os.top=_194.t+"px";
os.left=_194.l+"px";
is.width=_194.w+"px";
is.height=_194.h+"px";
var _197=dijit.getViewport();
if(_194.w!=_197.w){
is.width=_197.w+"px";
}
if(_194.h!=_197.h){
is.height=_197.h+"px";
}
},show:function(){
this.domNode.style.display="block";
this.layout();
if(this.bgIframe.iframe){
this.bgIframe.iframe.style.display="block";
}
},hide:function(){
this.domNode.style.display="none";
if(this.bgIframe.iframe){
this.bgIframe.iframe.style.display="none";
}
},uninitialize:function(){
if(this.bgIframe){
this.bgIframe.destroy();
}
}});
dojo.declare("dijit._DialogMixin",null,{attributeMap:dijit._Widget.prototype.attributeMap,execute:function(_198){
},onCancel:function(){
},onExecute:function(){
},_onSubmit:function(){
this.onExecute();
this.execute(this.attr("value"));
},_getFocusItems:function(_199){
var _19a=dijit._getTabNavigable(dojo.byId(_199));
this._firstFocusItem=_19a.lowest||_19a.first||_199;
this._lastFocusItem=_19a.last||_19a.highest||this._firstFocusItem;
if(dojo.isMoz&&this._firstFocusItem.tagName.toLowerCase()=="input"&&dojo.attr(this._firstFocusItem,"type").toLowerCase()=="file"){
dojo.attr(_199,"tabindex","0");
this._firstFocusItem=_199;
}
}});
dojo.declare("dijit.Dialog",[dijit.layout.ContentPane,dijit._Templated,dijit.form._FormMixin,dijit._DialogMixin],{templateString:null,templateString:"<div class=\"dijitDialog\" tabindex=\"-1\" waiRole=\"dialog\" waiState=\"labelledby-${id}_title\">\r\n\t<div dojoAttachPoint=\"titleBar\" class=\"dijitDialogTitleBar\">\r\n\t<span dojoAttachPoint=\"titleNode\" class=\"dijitDialogTitle\" id=\"${id}_title\"></span>\r\n\t<span dojoAttachPoint=\"closeButtonNode\" class=\"dijitDialogCloseIcon\" dojoAttachEvent=\"onclick: onCancel\" title=\"${buttonCancel}\">\r\n\t\t<span dojoAttachPoint=\"closeText\" class=\"closeText\" title=\"${buttonCancel}\">x</span>\r\n\t</span>\r\n\t</div>\r\n\t\t<div dojoAttachPoint=\"containerNode\" class=\"dijitDialogPaneContent\"></div>\r\n</div>\r\n",attributeMap:dojo.mixin(dojo.clone(dijit._Widget.prototype.attributeMap),{title:[{node:"titleNode",type:"innerHTML"},{node:"titleBar",type:"attribute"}]}),open:false,duration:dijit.defaultDuration,refocus:true,autofocus:true,_firstFocusItem:null,_lastFocusItem:null,doLayout:false,draggable:true,postMixInProperties:function(){
var _19b=dojo.i18n.getLocalization("dijit","common");
dojo.mixin(this,_19b);
this.inherited(arguments);
},postCreate:function(){
var s=this.domNode.style;
s.visibility="hidden";
s.position="absolute";
s.display="";
s.top="-9999px";
dojo.body().appendChild(this.domNode);
this.inherited(arguments);
this.connect(this,"onExecute","hide");
this.connect(this,"onCancel","hide");
this._modalconnects=[];
},onLoad:function(){
this._position();
this.inherited(arguments);
},_endDrag:function(e){
if(e&&e.node&&e.node===this.domNode){
var vp=dijit.getViewport();
var p=e._leftTop||dojo.coords(e.node,true);
this._relativePosition={t:p.t-vp.t,l:p.l-vp.l};
}
},_setup:function(){
var node=this.domNode;
if(this.titleBar&&this.draggable){
this._moveable=(dojo.isIE==6)?new dojo.dnd.TimedMoveable(node,{handle:this.titleBar}):new dojo.dnd.Moveable(node,{handle:this.titleBar,timeout:0});
dojo.subscribe("/dnd/move/stop",this,"_endDrag");
}else{
dojo.addClass(node,"dijitDialogFixed");
}
this._underlay=new dijit.DialogUnderlay({id:this.id+"_underlay","class":dojo.map(this["class"].split(/\s/),function(s){
return s+"_underlay";
}).join(" ")});
var _1a2=this._underlay;
this._fadeIn=dojo.fadeIn({node:node,duration:this.duration,onBegin:dojo.hitch(_1a2,"show")});
this._fadeOut=dojo.fadeOut({node:node,duration:this.duration,onEnd:function(){
node.style.visibility="hidden";
node.style.top="-9999px";
_1a2.hide();
}});
},uninitialize:function(){
if(this._fadeIn&&this._fadeIn.status()=="playing"){
this._fadeIn.stop();
}
if(this._fadeOut&&this._fadeOut.status()=="playing"){
this._fadeOut.stop();
}
if(this._underlay){
this._underlay.destroy();
}
if(this._moveable){
this._moveable.destroy();
}
},_size:function(){
var mb=dojo.marginBox(this.domNode);
var _1a4=dijit.getViewport();
if(mb.w>=_1a4.w||mb.h>=_1a4.h){
dojo.style(this.containerNode,{width:Math.min(mb.w,Math.floor(_1a4.w*0.75))+"px",height:Math.min(mb.h,Math.floor(_1a4.h*0.75))+"px",overflow:"auto",position:"relative"});
}
},_position:function(){
if(!dojo.hasClass(dojo.body(),"dojoMove")){
var node=this.domNode;
var _1a6=dijit.getViewport();
var p=this._relativePosition;
var mb=p?null:dojo.marginBox(node);
dojo.style(node,{left:Math.floor(_1a6.l+(p?p.l:(_1a6.w-mb.w)/2))+"px",top:Math.floor(_1a6.t+(p?p.t:(_1a6.h-mb.h)/2))+"px"});
}
},_onKey:function(evt){
if(evt.charOrCode){
var dk=dojo.keys;
var node=evt.target;
if(evt.charOrCode===dk.TAB){
this._getFocusItems(this.domNode);
}
var _1ac=(this._firstFocusItem==this._lastFocusItem);
if(node==this._firstFocusItem&&evt.shiftKey&&evt.charOrCode===dk.TAB){
if(!_1ac){
dijit.focus(this._lastFocusItem);
}
dojo.stopEvent(evt);
}else{
if(node==this._lastFocusItem&&evt.charOrCode===dk.TAB&&!evt.shiftKey){
if(!_1ac){
dijit.focus(this._firstFocusItem);
}
dojo.stopEvent(evt);
}else{
while(node){
if(node==this.domNode){
if(evt.charOrCode==dk.ESCAPE){
this.onCancel();
}else{
return;
}
}
node=node.parentNode;
}
if(evt.charOrCode!==dk.TAB){
dojo.stopEvent(evt);
}else{
if(!dojo.isOpera){
try{
this._firstFocusItem.focus();
}
catch(e){
}
}
}
}
}
}
},show:function(){
if(this.open){
return;
}
if(!this._alreadyInitialized){
this._setup();
this._alreadyInitialized=true;
}
if(this._fadeOut.status()=="playing"){
this._fadeOut.stop();
}
this._modalconnects.push(dojo.connect(window,"onscroll",this,"layout"));
this._modalconnects.push(dojo.connect(window,"onresize",this,"layout"));
this._modalconnects.push(dojo.connect(dojo.doc.documentElement,"onkeypress",this,"_onKey"));
dojo.style(this.domNode,{opacity:0,visibility:""});
dojo.style(this.containerNode,{width:"auto",height:"auto"});
this.open=true;
this._loadCheck();
this._size();
this._position();
this._fadeIn.play();
this._savedFocus=dijit.getFocus(this);
if(this.autofocus){
this._getFocusItems(this.domNode);
setTimeout(dojo.hitch(dijit,"focus",this._firstFocusItem),50);
}
},hide:function(){
if(!this._alreadyInitialized){
return;
}
if(this._fadeIn.status()=="playing"){
this._fadeIn.stop();
}
this._fadeOut.play();
if(this._scrollConnected){
this._scrollConnected=false;
}
dojo.forEach(this._modalconnects,dojo.disconnect);
this._modalconnects=[];
if(this.refocus){
this.connect(this._fadeOut,"onEnd",dojo.hitch(dijit,"focus",this._savedFocus));
}
if(this._relativePosition){
delete this._relativePosition;
}
this.open=false;
},layout:function(){
if(this.domNode.style.visibility!="hidden"){
this._underlay.layout();
this._position();
}
},destroy:function(){
dojo.forEach(this._modalconnects,dojo.disconnect);
if(this.refocus&&this.open){
setTimeout(dojo.hitch(dijit,"focus",this._savedFocus),25);
}
this.inherited(arguments);
}});
dojo.declare("dijit.TooltipDialog",[dijit.layout.ContentPane,dijit._Templated,dijit.form._FormMixin,dijit._DialogMixin],{title:"",doLayout:false,autofocus:true,"class":"dijitTooltipDialog",_firstFocusItem:null,_lastFocusItem:null,templateString:null,templateString:"<div waiRole=\"presentation\">\r\n\t<div class=\"dijitTooltipContainer\" waiRole=\"presentation\">\r\n\t\t<div class =\"dijitTooltipContents dijitTooltipFocusNode\" dojoAttachPoint=\"containerNode\" tabindex=\"-1\" waiRole=\"dialog\"></div>\r\n\t</div>\r\n\t<div class=\"dijitTooltipConnector\" waiRole=\"presentation\"></div>\r\n</div>\r\n",postCreate:function(){
this.inherited(arguments);
this.connect(this.containerNode,"onkeypress","_onKey");
this.containerNode.title=this.title;
},orient:function(node,_1ae,_1af){
this.domNode.className=this["class"]+" dijitTooltipAB"+(_1af.charAt(1)=="L"?"Left":"Right")+" dijitTooltip"+(_1af.charAt(0)=="T"?"Below":"Above");
},onOpen:function(pos){
this.orient(this.domNode,pos.aroundCorner,pos.corner);
this._loadCheck();
if(this.autofocus){
this._getFocusItems(this.containerNode);
dijit.focus(this._firstFocusItem);
}
},_onKey:function(evt){
var node=evt.target;
var dk=dojo.keys;
if(evt.charOrCode===dk.TAB){
this._getFocusItems(this.containerNode);
}
var _1b4=(this._firstFocusItem==this._lastFocusItem);
if(evt.charOrCode==dk.ESCAPE){
this.onCancel();
dojo.stopEvent(evt);
}else{
if(node==this._firstFocusItem&&evt.shiftKey&&evt.charOrCode===dk.TAB){
if(!_1b4){
dijit.focus(this._lastFocusItem);
}
dojo.stopEvent(evt);
}else{
if(node==this._lastFocusItem&&evt.charOrCode===dk.TAB&&!evt.shiftKey){
if(!_1b4){
dijit.focus(this._firstFocusItem);
}
dojo.stopEvent(evt);
}else{
if(evt.charOrCode===dk.TAB){
evt.stopPropagation();
}
}
}
}
}});
}
if(!dojo._hasResource["dijit.form.CheckBox"]){
dojo._hasResource["dijit.form.CheckBox"]=true;
dojo.provide("dijit.form.CheckBox");
dojo.declare("dijit.form.CheckBox",dijit.form.ToggleButton,{templateString:"<div class=\"dijitReset dijitInline\" waiRole=\"presentation\"\r\n\t><input\r\n\t \ttype=\"${type}\" name=\"${name}\"\r\n\t\tclass=\"dijitReset dijitCheckBoxInput\"\r\n\t\tdojoAttachPoint=\"focusNode\"\r\n\t \tdojoAttachEvent=\"onmouseover:_onMouse,onmouseout:_onMouse,onclick:_onClick\"\r\n/></div>\r\n",baseClass:"dijitCheckBox",type:"checkbox",value:"on",_setValueAttr:function(_1b5){
if(typeof _1b5=="string"){
this.value=_1b5;
dojo.attr(this.focusNode,"value",_1b5);
_1b5=true;
}
if(this._created){
this.attr("checked",_1b5);
}
},_getValueAttr:function(){
return (this.checked?this.value:false);
},postMixInProperties:function(){
if(this.value==""){
this.value="on";
}
this.inherited(arguments);
},_fillContent:function(_1b6){
},reset:function(){
this._hasBeenBlurred=false;
this.attr("checked",this.params.checked||false);
this.value=this.params.value||"on";
dojo.attr(this.focusNode,"value",this.value);
},_onFocus:function(){
if(this.id){
dojo.query("label[for='"+this.id+"']").addClass("dijitFocusedLabel");
}
},_onBlur:function(){
if(this.id){
dojo.query("label[for='"+this.id+"']").removeClass("dijitFocusedLabel");
}
}});
dojo.declare("dijit.form.RadioButton",dijit.form.CheckBox,{type:"radio",baseClass:"dijitRadio",_setCheckedAttr:function(_1b7){
this.inherited(arguments);
if(!this._created){
return;
}
if(_1b7){
var _1b8=this;
dojo.query("INPUT[type=radio][name="+this.name+"]",this.focusNode.form||dojo.doc).forEach(function(_1b9){
if(_1b9!=_1b8.focusNode&&_1b9.form==_1b8.focusNode.form){
var _1ba=dijit.getEnclosingWidget(_1b9);
if(_1ba&&_1ba.checked){
_1ba.attr("checked",false);
}
}
});
}
},_clicked:function(e){
if(!this.checked){
this.attr("checked",true);
}
}});
}
if(!dojo._hasResource["dojo.io.iframe"]){
dojo._hasResource["dojo.io.iframe"]=true;
dojo.provide("dojo.io.iframe");
dojo.io.iframe={create:function(_1bc,_1bd,uri){
if(window[_1bc]){
return window[_1bc];
}
if(window.frames[_1bc]){
return window.frames[_1bc];
}
var _1bf=null;
var turi=uri;
if(!turi){
if(dojo.config["useXDomain"]&&!dojo.config["dojoBlankHtmlUrl"]){
console.warn("dojo.io.iframe.create: When using cross-domain Dojo builds,"+" please save dojo/resources/blank.html to your domain and set djConfig.dojoBlankHtmlUrl"+" to the path on your domain to blank.html");
}
turi=(dojo.config["dojoBlankHtmlUrl"]||dojo.moduleUrl("dojo","resources/blank.html"));
}
var _1c1=dojo.isIE?"<iframe name=\""+_1bc+"\" src=\""+turi+"\" onload=\""+_1bd+"\">":"iframe";
_1bf=dojo.doc.createElement(_1c1);
with(_1bf){
name=_1bc;
setAttribute("name",_1bc);
id=_1bc;
}
dojo.body().appendChild(_1bf);
window[_1bc]=_1bf;
with(_1bf.style){
if(!(dojo.isSafari<3)){
position="absolute";
}
left=top="1px";
height=width="1px";
visibility="hidden";
}
if(!dojo.isIE){
this.setSrc(_1bf,turi,true);
_1bf.onload=new Function(_1bd);
}
return _1bf;
},setSrc:function(_1c2,src,_1c4){
try{
if(!_1c4){
if(dojo.isSafari){
_1c2.location=src;
}else{
frames[_1c2.name].location=src;
}
}else{
var idoc;
if(dojo.isIE||dojo.isSafari>2){
idoc=_1c2.contentWindow.document;
}else{
if(dojo.isSafari){
idoc=_1c2.document;
}else{
idoc=_1c2.contentWindow;
}
}
if(!idoc){
_1c2.location=src;
return;
}else{
idoc.location.replace(src);
}
}
}
catch(e){
console.debug("dojo.io.iframe.setSrc: ",e);
}
},doc:function(_1c6){
var doc=_1c6.contentDocument||(((_1c6.name)&&(_1c6.document)&&(document.getElementsByTagName("iframe")[_1c6.name].contentWindow)&&(document.getElementsByTagName("iframe")[_1c6.name].contentWindow.document)))||((_1c6.name)&&(document.frames[_1c6.name])&&(document.frames[_1c6.name].document))||null;
return doc;
},send:function(args){
if(!this["_frame"]){
this._frame=this.create(this._iframeName,dojo._scopeName+".io.iframe._iframeOnload();");
}
var dfd=dojo._ioSetArgs(args,function(dfd){
dfd.canceled=true;
dfd.ioArgs._callNext();
},function(dfd){
var _1cc=null;
try{
var _1cd=dfd.ioArgs;
var dii=dojo.io.iframe;
var ifd=dii.doc(dii._frame);
var _1d0=_1cd.handleAs;
_1cc=ifd;
if(_1d0!="html"){
if(_1d0=="xml"){
if(dojo.isIE){
dojo.query("a",dii._frame.contentWindow.document.documentElement).orphan();
var _1d1=(dii._frame.contentWindow.document).documentElement.innerText;
_1d1=_1d1.replace(/>\s+</g,"><");
if(!this._ieXmlDom){
for(var i=0,a=["MSXML2","Microsoft","MSXML","MSXML3"],l=a.length;i<l;i++){
try{
var test=new ActiveXObject(a[i]+".XmlDom");
this._ieXmlDom=a[i]+".XmlDom";
break;
}
catch(e){
}
}
if(!this._ieXmlDom){
throw new Error("dojo.io.iframe.send (return handler): your copy of Internet Explorer does not support XML documents.");
}
}
var _xml=new ActiveXObject(this._ieXmlDom);
_xml.async=false;
_xml.loadXML(_1d1);
_1cc=_xml;
}
}else{
_1cc=ifd.getElementsByTagName("textarea")[0].value;
if(_1d0=="json"){
_1cc=dojo.fromJson(_1cc);
}else{
if(_1d0=="javascript"){
_1cc=dojo.eval(_1cc);
}
}
}
}
}
catch(e){
_1cc=e;
}
finally{
_1cd._callNext();
}
return _1cc;
},function(_1d7,dfd){
dfd.ioArgs._hasError=true;
dfd.ioArgs._callNext();
return _1d7;
});
dfd.ioArgs._callNext=function(){
if(!this["_calledNext"]){
this._calledNext=true;
dojo.io.iframe._currentDfd=null;
dojo.io.iframe._fireNextRequest();
}
};
this._dfdQueue.push(dfd);
this._fireNextRequest();
dojo._ioWatch(dfd,function(dfd){
return !dfd.ioArgs["_hasError"];
},function(dfd){
return (!!dfd.ioArgs["_finished"]);
},function(dfd){
if(dfd.ioArgs._finished){
dfd.callback(dfd);
}else{
dfd.errback(new Error("Invalid dojo.io.iframe request state"));
}
});
return dfd;
},_currentDfd:null,_dfdQueue:[],_iframeName:dojo._scopeName+"IoIframe",_fireNextRequest:function(){
try{
if((this._currentDfd)||(this._dfdQueue.length==0)){
return;
}
var dfd=this._currentDfd=this._dfdQueue.shift();
var _1dd=dfd.ioArgs;
var args=_1dd.args;
_1dd._contentToClean=[];
var fn=dojo.byId(args["form"]);
var _1e0=args["content"]||{};
if(fn){
if(_1e0){
var _1e1=function(name,_1e3){
var tn;
if(dojo.isIE){
tn=dojo.doc.createElement("<input type='hidden' name='"+name+"'>");
}else{
tn=dojo.doc.createElement("input");
tn.type="hidden";
tn.name=name;
}
tn.value=_1e3;
fn.appendChild(tn);
_1dd._contentToClean.push(name);
};
for(var x in _1e0){
var val=_1e0[x];
if(dojo.isArray(val)&&val.length>1){
var i;
for(i=0;i<val.length;i++){
_1e1(x,val[i]);
}
}else{
if(!fn[x]){
_1e1(x,val);
}else{
fn[x].value=val;
}
}
}
}
var _1e8=fn.getAttributeNode("action");
var _1e9=fn.getAttributeNode("method");
var _1ea=fn.getAttributeNode("target");
if(args["url"]){
_1dd._originalAction=_1e8?_1e8.value:null;
if(_1e8){
_1e8.value=args.url;
}else{
fn.setAttribute("action",args.url);
}
}
if(!_1e9||!_1e9.value){
if(_1e9){
_1e9.value=(args["method"])?args["method"]:"post";
}else{
fn.setAttribute("method",(args["method"])?args["method"]:"post");
}
}
_1dd._originalTarget=_1ea?_1ea.value:null;
if(_1ea){
_1ea.value=this._iframeName;
}else{
fn.setAttribute("target",this._iframeName);
}
fn.target=this._iframeName;
fn.submit();
}else{
var _1eb=args.url+(args.url.indexOf("?")>-1?"&":"?")+_1dd.query;
this.setSrc(this._frame,_1eb,true);
}
}
catch(e){
dfd.errback(e);
}
},_iframeOnload:function(){
var dfd=this._currentDfd;
if(!dfd){
this._fireNextRequest();
return;
}
var _1ed=dfd.ioArgs;
var args=_1ed.args;
var _1ef=dojo.byId(args.form);
if(_1ef){
var _1f0=_1ed._contentToClean;
for(var i=0;i<_1f0.length;i++){
var key=_1f0[i];
for(var j=0;j<_1ef.childNodes.length;j++){
var _1f4=_1ef.childNodes[j];
if(_1f4.name==key){
dojo._destroyElement(_1f4);
break;
}
}
}
if(_1ed["_originalAction"]){
_1ef.setAttribute("action",_1ed._originalAction);
}
if(_1ed["_originalTarget"]){
_1ef.setAttribute("target",_1ed._originalTarget);
_1ef.target=_1ed._originalTarget;
}
}
_1ed._finished=true;
}};
}
if(!dojo._hasResource["lconn.dogear.bookmarkimporter"]){
dojo._hasResource["lconn.dogear.bookmarkimporter"]=true;
dojo.provide("lconn.dogear.bookmarkimporter");
dojo.declare("lconn.dogear.bookmarkimporter",null,{pageSize:10,bookmarks:null,currentPageIndex:-1,importAsPrivate:false,waitDialog:null,showError:function(_1f5){
var _1f6=dojo.byId("bookmarksUploadErrors");
if(!_1f6){
_1f6=document.createElement("div");
_1f6.id="bookmarksUploadErrors";
document.body.appendChild(_1f6);
}
_1f6.innerHTML="<img title='Error icon' alt='Error icon' src='"+dogearContext+"/nav/common/styles/images/iconError.gif'/>&nbsp;"+_1f5;
_1f6.style.display="";
},showWait:function(){
this.waitDialog=dijit.byId("dogearBookmarkWaitDiv");
if(!this.waitDialog){
var _1f7=this.getBundle();
var _1f8=document.createElement("div");
_1f8.id="dogearBookmarkWaitDiv";
_1f8.className="lotusDialogWrapper";
_1f8.innerHTML="<div class='lotusDialogBorder'><div class='lotusDialog'><div class='lotusDialogContent'>"+"<img title=\""+_1f7["uploading"]+"\" alt=\""+_1f7["uploading"]+"\" src='"+dogearContext+"/h3/images/progressIndicator.gif' />&nbsp;"+_1f7["uploading"]+"</div></div></div>";
document.body.appendChild(_1f8);
this.waitDialog=new dijit.Dialog({id:"dogearBookmarkWaitDiv"},_1f8);
this.waitDialog.startup();
}
this.waitDialog.show();
},hideWait:function(){
this.waitDialog.hide();
},upload:function(){
var _1f9=this;
_1f9.importAsPrivate=dojo.byId("private").checked;
var _1fa=dojo.byId("uploadBookmarksFile");
if(dojo.isIE){
_1fa.encoding="multipart/form-data";
var _1fb=_1fa.getAttributeNode("method");
_1fb.value="POST";
}
var kw={form:_1fa,method:"POST",url:fileUploadActionURL+"&forceRefresh="+Math.random(),handleAs:"json",handle:function(rt){
_1f9.hideWait();
if(rt instanceof Error){
_1f9.showError("Dogear failed to read the file.");
return;
}
if(rt){
if(rt=="0"){
_1f9.showError("Dogear failed to read the file.");
}else{
_1f9.generatePagedBookmarks(rt);
_1f9.showBookmarksPage();
}
}
},error:function(data){
_1f9.hideWait();
},sync:true};
this.showWait();
var _1ff=dojo.io.iframe.send(kw);
},getBundle:function(){
var res=new lconn.dogear.Res();
res.loadDefaultBundle();
return res.resBundle;
},generatePagedBookmarks:function(_201){
this.bookmarks=_201;
var _202=this.getBundle();
var html="<div class='lotusDialogBorder'><div class='lotusDialog'><h1><a href='#' class='lotusRight' onclick='javascript:dijit.byId(\"bookmarksUploadedDialog\").onCancel();return false;'>";
html+="<img alt='close' src='"+dogearContext+"/nav/common/styles/images/iconClosePopUp.gif' />";
html+="</a>";
html+=_202["importDialogTitle"]+"</h1>";
html+="<div class='lotusDialogContent'>";
html+="<div class='importDialogDesc'>";
html+=_202["importDialogTooltip"]+"<br />";
html+=_202["select"];
html+="<a onclick='importer.selectAllInPage(); return false;' href='#'>"+_202["all"]+"</a>&nbsp;&nbsp;<a onclick='importer.selectNoneInPage();return false;' href='#'>"+_202["none"]+"</a>";
html+="</div>";
var _204=Math.ceil(this.bookmarks.length/this.pageSize);
var reg=/^\w*:\/\//;
var _206="<div class='' id='bookmarksImportContainer'>";
_206+="<div align='center' style='display:none;' id='selectAllLinkContainer'></div>";
for(var i=0;i<_204;i++){
_206+="<table class='lotusTable' id='bookmarks_page_"+i+"' cellspacing='0' cellspadding='0' border='0' style='display:none;'>";
for(var j=i*this.pageSize;j<(i+1)*this.pageSize&&j<this.bookmarks.length;j++){
_206+="<tr>";
_206+="<td class='lotusFirstCell' width='16px'><input type='checkbox' onclick='if (this.checked == false) {importer.hideSelectAllLink();importer.bookmarks["+j+"].selected = false;}else{importer.bookmarks["+j+"].selected = true;}' class='lotusCheckBox' value='"+j+"'></td>";
_206+="<td width='20px'><img width='16px' height='16px' src='"+cPath+"/favicon?host="+this.bookmarks[j].url.replace(reg,"").split("/")[0]+"'></td>";
_206+="<td>"+"<h4><a href='"+this.bookmarks[j].url+"' target='blank'>"+this.bookmarks[j].title+"</a></h4>"+"<span class='tags'>"+_202["tags"]+this.bookmarks[j].tags+"</span>"+"</td>";
_206+="</tr>";
if(this.bookmarks[j].description){
_206+="<tr class='lotusDetails'>";
_206+="<td> </td><td colspan='2'>"+this.bookmarks[j].description+"</td>";
_206+="</tr>";
}
}
_206+="</table>";
}
_206+="</div>";
this.currentPageIndex=0;
var _209=this.generatePagingButton();
dijit.byId("importDialog").hide();
var _20a=dojo.byId("bookmarksUploaded");
if(!_20a){
_20a=document.createElement("DIV");
_20a.id="bookmarksUploaded";
_20a.className="lotusDialogWrapper";
document.body.appendChild(_20a);
}
var w=dijit.byId("bookmarksUploadedDialog");
if(w){
w.setContent((html+"<div class='lotusPaging' id='pagingBar1'></div>"+_206+"<div class='lotusPaging' id='pagingBar2'></div></div><div class='lotusDialogFooter'>"+this.generateActionButtons()+"</div></div></div>"));
w.show();
}else{
_20a.innerHTML="";
_20a.innerHTML=(html+"<div class='lotusPaging' id='pagingBar1'></div>"+_206+"<div class='lotusPaging' id='pagingBar2'></div></div><div class='lotusDialogFooter'>"+this.generateActionButtons()+"</div></div></div>");
w=new dijit.Dialog({id:"bookmarksUploadedDialog"},_20a);
w.startup();
w.show();
}
},showBookmarksPage:function(){
var _20c=Math.ceil(this.bookmarks.length/this.pageSize);
for(var i=0;i<_20c;i++){
if(dojo.byId("bookmarks_page_"+i)){
dojo.byId("bookmarks_page_"+i).style.display="none";
}
}
if(dojo.byId("bookmarks_page_"+this.currentPageIndex)){
dojo.byId("bookmarks_page_"+this.currentPageIndex).style.display="";
}
if(dojo.byId("pagingBar1")){
dojo.byId("pagingBar1").innerHTML=this.generatePagingButton();
}
if(dojo.byId("pagingBar2")){
dojo.byId("pagingBar2").innerHTML=this.generatePagingButton();
}
},generateActionButtons:function(){
var _20e=this.getBundle();
var html="";
html+="<input type='button' class='lotusFormButton' value='"+_20e["importBtnLabel"]+"' onclick='importer.doImport();'>";
html+="&nbsp;&nbsp;";
html+="<a onclick='dijit.byId(\"bookmarksUploadedDialog\").onCancel();return false;' href='#'>"+_20e["cancelBtnLabel"]+"</a>";
return html;
},generateSelectAllLink:function(){
var _210=this.getBundle();
var html=dojo.string.substitute(_210["selectAllTip"],[this.pageSize])+"<a onclick='importer.selectAllCrossPage(); return false;' href='#'>"+dojo.string.substitute(_210["selectAllLinkTxt"],[this.bookmarks.length])+"</a>";
return html;
},generateCleanSelectionLink:function(){
var _212=this.getBundle();
var html=dojo.string.substitute(_212["allSelected"],[this.bookmarks.length])+"<a onclick='importer.selectNone(); return false;' href='#'>"+_212["cleanSelection"]+"</a>";
return html;
},generatePagingButton:function(){
var _214=this.getBundle();
var _215=Math.ceil(this.bookmarks.length/this.pageSize);
var _216=false,_217=false;
var _218,_219;
if(this.currentPageIndex+1==_215){
_216=true;
}
if(this.currentPageIndex==0){
_217=true;
}
_218=this.currentPageIndex*this.pageSize+1;
_219=(this.currentPageIndex+1)*this.pageSize>this.bookmarks.length?this.bookmarks.length:(this.currentPageIndex+1)*this.pageSize;
var _21a="";
_21a+="<div class='lotusLeft lotusInlinelist'>"+dojo.string.substitute(_214["pagingString"],[_218,_219,this.bookmarks.length])+"</div>";
_21a+="<ul class='lotusRight lotusInlinelist'>"+"<li class='lotusFirst'>"+(_217?_214["previousPage"]:"<a href='#' onclick='importer.previousPage();'>"+_214["previousPage"]+"</a>")+"</li>"+"<li>"+(_216?_214["nextPage"]:"<a href='#' onclick='importer.nextPage();'>"+_214["nextPage"]+"</a>")+"</li>"+"</ul>";
return _21a;
},nextPage:function(){
var _21b=Math.ceil(this.bookmarks.length/this.pageSize);
this.currentPageIndex=(this.currentPageIndex+1)%_21b;
this.showBookmarksPage();
},previousPage:function(){
var _21c=Math.ceil(this.bookmarks.length/this.pageSize);
this.currentPageIndex=(this.currentPageIndex+_21c-1)%_21c;
this.showBookmarksPage();
},showSelectAllLink:function(){
if(dojo.byId("selectAllLinkContainer")){
dojo.byId("selectAllLinkContainer").innerHTML=this.generateSelectAllLink();
dojo.byId("selectAllLinkContainer").style.display="";
}
},hideSelectAllLink:function(){
if(dojo.byId("selectAllLinkContainer")){
dojo.byId("selectAllLinkContainer").innerHTML=this.generateSelectAllLink();
dojo.byId("selectAllLinkContainer").style.display="none";
}
},selectAllInPage:function(){
dojo.query("#bookmarks_page_"+this.currentPageIndex+" input.lotusCheckBox").attr("checked",true);
for(var i=this.currentPageIndex*this.pageSize;i<(this.currentPageIndex+1)*this.pageSize&&i<this.bookmarks.length;i++){
this.bookmarks[i].selected=true;
}
if(this.bookmarks.length>this.pageSize){
this.showSelectAllLink();
}
},selectNone:function(){
dojo.query("#bookmarksImportContainer input.lotusCheckBox").attr("checked",false);
for(var i=0;i<this.bookmarks.length;i++){
this.bookmarks[i].selected=false;
}
this.hideSelectAllLink();
},selectNoneInPage:function(){
dojo.query("#bookmarks_page_"+this.currentPageIndex+" input.lotusCheckBox").attr("checked",false);
for(var i=this.currentPageIndex*this.pageSize;i<(this.currentPageIndex+1)*this.pageSize&&i<this.bookmarks.length;i++){
this.bookmarks[i].selected=false;
}
},selectAllCrossPage:function(){
dojo.query("#bookmarksImportContainer input.lotusCheckBox").attr("checked",true);
for(var i=0;i<this.bookmarks.length;i++){
this.bookmarks[i].selected=true;
}
if(this.bookmarks.length>this.pageSize){
dojo.byId("selectAllLinkContainer").innerHTML=this.generateCleanSelectionLink();
}
},doImport:function(){
this.showWait();
dojo.forEach(this.bookmarks,function(item){
if(item.selected){
var _222="<?xml version=\"1.0\" encoding=\"utf-8\"?>"+"<entry xmlns=\"http://www.w3.org/2005/Atom\" xmlns:snx=\"http://www.ibm.com/xmlns/prod/sn\">"+"\t<title>"+item.title.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")+"</title>"+"\t<category scheme=\"http://www.ibm.com/xmlns/prod/sn/type\" term=\"bookmark\" />"+"\t<link href=\""+item.url.replace(/&/g,"&amp;")+"\" />"+"\t<content type=\"html\"><![CDATA["+item.description+"\t]]></content>";
var tags=item.tags==""?[]:item.tags.split(" ");
for(var i=0;i<tags.length;i++){
_222+="<category term=\""+tags[i].replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")+"\" />";
}
if(importer.importAsPrivate){
_222+="<category scheme=\"http://www.ibm.com/xmlns/prod/sn/flags\" term=\"private\"/>";
}
_222+="</entry>";
dojo.rawXhrPost({url:dogearContext+"/api/app",handleAs:"xml",postData:_222,headers:{"Content-Type":"application/atom+xml"},load:function(data){
},error:function(data){
if(console.debug){
console.debug(item.title)+"  failed...";
}
},sync:true});
}
});
this.hideWait();
location.reload();
}});
importer=new lconn.dogear.bookmarkimporter();
}
if(!dojo._hasResource["lconn.dogear.DogearPeopleTypeAhead"]){
dojo._hasResource["lconn.dogear.DogearPeopleTypeAhead"]=true;
dojo.provide("lconn.dogear.DogearPeopleTypeAhead");
dojo.declare("lconn.dogear.DogearPeopleTypeAhead",[lconn.core.PeopleTypeAhead],{submitFormDirectly:false,wrapText:false,nameIndicator:"",_openResultList:function(_227,_228){
if(this.disabled||this.readOnly||(_228.query!=this._lastQuery)){
return;
}
this._popupWidget.clearResultList();
if(!_227.length){
this._hideResultList();
return;
}
var _229=new String(this.formatItem(_227[0]));
if(_229&&this.autoComplete&&!this._prev_key_backspace&&(_228.query!="")){
this._autoCompleteText(_229);
}
this._popupWidget.createOptions(_227,_228,dojo.hitch(this,"_getMenuLabelFromItem"));
this._popupWidget.searchButton.innerHTML=dojo.string.substitute(dojo.i18n.getLocalization("lconn.dogear","strings")["rs_searchDirectoryFor"],[this._lastQuery.replace(/</g,"&lt;").replace(/>/g,"&gt;")])+"&lrm;";
this._showResultList();
if(_228.direction){
if(1==_228.direction){
this._popupWidget.highlightFirstOption();
}else{
if(-1==_228.direction){
this._popupWidget.highlightLastOption();
}
}
this._announceOption(this._popupWidget.getHighlightedOption());
}
},_startSearch:function(key,_22b){
if(!this._popupWidget){
var _22c=this.id+"_popup";
this._popupWidget=new lconn.act.PeopleTypeAheadMenu({rs_searchDirectory:this.rs_searchDirectory,onChange:dojo.hitch(this,this._selectOption),id:_22c});
dijit.removeWaiState(this.focusNode,"activedescendant");
dijit.setWaiState(this.textbox,"owns",_22c);
}
if(_22b==undefined){
_22b=false;
}
this.item=null;
var _22d=dojo.clone(this.query);
this._lastQuery=_22d=key;
this.searchTimer=setTimeout(dojo.hitch(this,function(_22e,_22f){
var _230=this.store.fetch({queryOptions:{ignoreCase:this.ignoreCase,deep:true},searchDirectory:_22b,query:_22e,onComplete:dojo.hitch(this,"_openResultList"),onError:function(_231){
console.error("dijit.form.ComboBox: "+_231);
dojo.hitch(_22f,"_hideResultList")();
},start:0,count:this.pageSize});
var _232=function(_233,_234){
_233.start+=_233.count*_234;
_233.direction=_234;
this.store.fetch(_233);
};
this._nextSearch=this._popupWidget.onPage=dojo.hitch(this,_232,_230);
this._popupWidget.searchDirectory=dojo.hitch(this,dojo.hitch(this,function(){
this._startSearch(key,true);
}));
},_22d,this),this.searchDelay);
},_getMenuLabelFromItem:function(item){
var _236=this.formatItem(item);
var key="";
if(this.multipleValues){
key=dojo.string.trim(this.keyArr[this.keyIdx]);
}else{
key=dojo.string.trim(this.focusNode.value);
}
key=key.replace(/</g,"&lt;").replace(/>/g,"&gt;");
if(!this.wrapText){
_236=_236.replace(/</g,"&lt;").replace(/>/g,"&gt;");
}else{
_236=item.name.replace(/</g,"&lt;").replace(/>/g,"&gt;")+"<br>"+(item.member?item.member.replace(/</g,"&lt;").replace(/>/g,"&gt;"):"");
}
var _238=_236.toLowerCase();
var _239=key.toLowerCase();
var _23a=0;
var _23b=null;
while(key&&-1<(_23b=_238.indexOf(_239,_23a))){
_236=_236.substr(0,_23b)+"<b>"+_236.substring(_23b,_23b+key.length)+"</b>"+_236.substring(_23b+key.length);
_23a=_23b+key.length+7;
_238=_236.toLowerCase();
}
_236=_236+"&lrm;";
return {html:true,label:_236};
}});
}
if(!dojo._hasResource["lconn.core.MenuUtility"]){
dojo._hasResource["lconn.core.MenuUtility"]=true;
dojo.provide("lconn.core.MenuUtility");
dojo.declare("lconn.core.MenuUtility",null,{openedBy:null,openMenu:function(evt,_23d){
var menu=dijit.byId(_23d);
evt=dojo.fixEvent(evt);
var _23f=evt.target;
function closeAndRestoreFocus(){
try{
dijit.focus(_23f);
}
catch(exception){
}
dijit.popup.close(menu);
};
dijit.popup.open({popup:menu,around:evt.target,orient:dojo._isBodyLtr()?{"BL":"TL","BR":"TR","TL":"BL","TR":"BR"}:{"BR":"TR","BL":"TL","TR":"BR","TL":"BL"},onExecute:closeAndRestoreFocus,onCancel:closeAndRestoreFocus});
menu.focus();
dojo.connect(menu,"_onBlur",function(){
dijit.popup.close(menu);
});
dojo.stopEvent(evt);
},openMenuA11y:function(evt,_241){
if(evt.keyCode==dojo.keys.ENTER){
this.openMenu(evt,_241);
}
}});
menuUtility=new lconn.core.MenuUtility();
lconn.core.MenuUtility.open=function(_242,e){
menuUtility.openMenu(e,_242);
};
}
if(!dojo._hasResource["lconn.core.LanguageSelector"]){
dojo._hasResource["lconn.core.LanguageSelector"]=true;
dojo.provide("lconn.core.LanguageSelector");
dojo.declare("lconn.core.LanguageSelector",null,{_jsonString:null,_selectorNode:null,_menu:null,_cookieProperties:null,COOKIE_NAME:null,constructor:function(_244,_245,_246,_247){
this._selectorNode=_244;
this._jsonString=_245;
this._cookieProperties=_247;
this.COOKIE_NAME=_246;
this._setSelectorLabel();
dojo.connect(this._selectorNode,"onclick",dojo.hitch(this,"_openMenu"));
},_openMenu:function(evt){
try{
this._buildLanguageMenu();
menuUtility.openMenu(evt,this._menu.id);
dojo.stopEvent(evt);
}
catch(e){
console.log(e);
}
},_setSelectorLabel:function(){
var _249=dojo.cookie(this.COOKIE_NAME);
var res=new lconn.core.Res();
res.loadDefaultBundle();
this.strBundle=res.resBundle;
if(_249!=null){
for(var key in this._jsonString){
if(this._isCodeEqual(key,_249)){
this._selectorNode.innerHTML=this._jsonString[key]+" &#9660;";
break;
}
}
if(!this._isCodeEqual(key,_249)){
this._selectorNode.innerHTML=this.strBundle.rs_customLangaugeLinkLabel+" &#9660;";
}
}else{
this._selectorNode.innerHTML=this.strBundle.rs_customLangaugeLinkLabel+" &#9660;";
}
},_buildLanguageMenu:function(){
if(this._menu==null){
this._menu=new dijit.Menu();
for(var key in this._jsonString){
this._menu.addChild(this._buildMenuItem(this._jsonString[key],key));
}
var res=new lconn.core.Res();
res.loadDefaultBundle();
this.strBundle=res.resBundle;
this._menu.addChild(this._buildMenuItem(this.strBundle.rs_browser_setting,"BD"));
this._menu.domNode.style.display="none";
dojo.body().appendChild(this._menu.domNode);
var that=this;
dojo.connect(this._menu,"onItemClick",function(item){
if((item!=null)&&(typeof item.language!="undefined")){
dojo.cookie(that.COOKIE_NAME,item.language,that._cookieProperties);
var _250=null;
var _251=document.getElementById("REFRESH_URL");
if(_251!=null){
_250=_251.getAttribute("href");
}else{
_250=window.location.href;
}
if(_250.indexOf("lang=")>0){
var _252=/([\&\?])(lang=)([^\&\#]*)/g;
var _253=null;
if(item.language&&item.language!=="BD"){
_253=_250.replace(_252,function(){
var _254=arguments[1]+arguments[2]+item.language;
return _254;
});
}else{
_253=_250.replace(_252,function(){
var _255=arguments[1];
return _255;
});
}
window.location=_253;
if(_253.indexOf("#")!==-1){
window.location.reload(false);
}
}else{
window.location=_250;
if(_250.indexOf("#")!==-1){
window.location.reload(false);
}
}
}
});
}
},_buildMenuItem:function(_256,_257){
var item=new dijit.MenuItem({label:_256});
item.language=_257;
return item;
},_isCodeEqual:function(_259,_25a){
var str1=_259.toLowerCase().replace(/-/,"_");
var str2=_25a.toLowerCase().replace(/-/,"_");
return str1===str2;
}});
}
if(!dojo._hasResource["com.ibm.ajax.auth"]){
dojo._hasResource["com.ibm.ajax.auth"]=true;
dojo.provide("com.ibm.ajax.auth");
com.ibm.ajax.auth={prepareSecure:function(args,_25e,_25f){
if(args["com.ibm.ajax.auth.prepareSecureCalled"]){
return args;
}else{
args["com.ibm.ajax.auth.prepareSecureCalled"]=true;
}
args._handle=args.handle;
args.handle=dojo.partial(this.testAuthenticationHandler,this,_25e,_25f);
return args;
},setAuthenticationHandler:function(_260){
this.authenticationHandler=_260;
},setTestAuthenticationHandler:function(_261){
this.testAuthenticationHandler=_261;
},setDefaultAuthenticationTests:function(_262,_263,_264){
this.checkFromCaller=_262;
this.checkByContentType=_263;
this.checkByStatusCode=_264;
},addAuthenticationCheck:function(_265){
if(_265){
this.authenticationChecks.push(_265);
}
},isAuthenticationRequired:function(_266,_267){
if(_267.xhr&&(!_266||dojo.indexOf(["cancel","timeout"],_266.dojoType)==-1)){
var _268;
try{
_268=_267.xhr.status;
}
catch(e){
}
var _269=_267.args.expectedContentType;
if(!_269){
_269=_267.args.handleAs;
}
var _26a=dojo.indexOf(["xml","json","json-comment-optional"],_269)!=-1;
if(window.debugMode!=null){
console.log("auth::isAuthenticationRequired DEBUG expectedContentType: "+_269+" restContentExpected: "+_26a+" for "+_267.args.url);
}
if(this.checkByContentType&&_26a&&/^text\/html/.exec(_267.xhr.getResponseHeader("Content-Type"))&&_268>=200&&_268<300){
console.log("auth::isAuthenticationRequired DEBUG content type does not match request, assume logged out");
return true;
}
if(this.checkByStatusCode&&_26a){
if(_268==302){
console.log("auth::isAuthenticationRequired DEBUG redirect received, assume login request");
return true;
}
if(_268==401){
console.log("auth::isAuthenticationRequired DEBUG 401 Unauthorized, assume login required");
return true;
}
if(dojo.isIE&&(_268==0||_268=="unknown")){
console.log("auth::isAuthenticationRequired DEBUG status code was 0 or 'unknown' in IE, assume login request");
return true;
}
}
}
for(var i=0;i<this.authenticationChecks.length;i++){
if(this.authenticationChecks[i](this,_266,_267)){
return true;
}
}
return false;
},testAuthenticationHandler:function(auth,_26d,_26e,_26f,_270){
var args=dojo._toArray(arguments).slice(3);
var _272=false;
if(!_26f||dojo.indexOf(["cancel","timeout"],_26f.dojoType)==-1){
if(auth.checkFromCaller&&typeof _26d=="function"&&_26d(_26f,_270)){
console.log("auth::_testAuthentication DEBUG caller provided detection logic that indicated form login, assume logged out");
_272=true;
}else{
_272=auth.isAuthenticationRequired(_26f,_270,_26d);
}
}
if(_272){
var path=auth._parseUri(_270.args.url).path;
dojo.cookie("WASPostParam",null,{expires:-1,path:path});
dojo.cookie("WASReqURL",null,{expires:-1,path:"/"});
auth.authenticationHandler(_26f,_270,_26e);
args[0]=new Error("xhr unauthenticated");
args[0].dojoType="unauthenticated";
}
if(_270.args._handle){
return _270.args._handle.apply(this,args);
}else{
return (_26f);
}
},_parseUri:function(uri){
if(!uri){
return null;
}
uri=new dojo._Url(uri);
var _275=this._splitQuery(uri.query);
uri.queryParameters=_275;
return uri;
},_splitQuery:function(_276){
var _277={};
if(!_276){
return _277;
}
if(_276.charAt(0)=="?"){
_276=_276.substring(1);
}
var args=_276.split("&");
for(var i=0;i<args.length;i++){
if(args[i].length>0){
var _27a=args[i].indexOf("=");
if(_27a==-1){
var key=decodeURIComponent(args[i]);
var _27c=_277[key];
if(dojo.isArray(_27c)){
_27c.push("");
}else{
if(_27c){
_277[key]=[_27c,""];
}else{
_277[key]="";
}
}
}else{
if(_27a>0){
var key=decodeURIComponent(args[i].substring(0,_27a));
var _27d=decodeURIComponent(args[i].substring(_27a+1));
var _27c=_277[key];
if(dojo.isArray(_27c)){
_27c.push(_27d);
}else{
if(_27c){
_277[key]=[_27c,_27d];
}else{
_277[key]=_27d;
}
}
}
}
}
}
return _277;
},checkFromCaller:true,checkByContentType:true,checkByStatusCode:true,authenticationChecks:[],authenticationHandler:function(){
console.log("auth::authenticationHandler DEBUG authentication was required");
}};
}
if(!dojo._hasResource["com.ibm.mm.livetext.serviceImpl"]){
dojo._hasResource["com.ibm.mm.livetext.serviceImpl"]=true;
dojo.provide("com.ibm.mm.livetext.serviceImpl");
dojo.declare("com.ibm.mm.livetext.serviceImpl",null,{_tagTypes:null,tagChanged:"/com/ibm/mashups/livetext/livetextchanged",tagStatusChange:"/com/ibm/mashups/livetext/livetextchanged",tagContentChanged:"/com/ibm/mashups/livetext/livetextcontentchanged",entryAdded:"/com/ibm/mashups/livetext/configentryadded",entryRemoved:"/com/ibm/mashups/livetext/configentryremoved",init:function(){
this._loadTags();
dojo.subscribe(this.tagChanged,this,"onTagChanged");
dojo.subscribe(this.tagContentChanged,this,"onTagContentChanged");
dojo.subscribe(this.entryAdded,this,"onAddConfigEntry");
dojo.subscribe(this.entryRemoved,this,"onRemoveConfigEntry");
dojo.publish(this.tagContentChanged,[document,true]);
},_getNodes:function(node,_27f){
if(_27f.processEnclosedTags){
return dojo.query(_27f.match,node);
}else{
var a=dojo.query(_27f.match+" "+_27f.match,node);
var b=dojo.query(_27f.match,node);
var _282,_283;
while(a.length>0){
_282=a[0];
_283=0;
while(_283<b.length){
if(_282==b[_283]){
a.splice(0,1);
b.splice(_283,1);
break;
}else{
_283++;
}
}
}
return b;
}
},onTagChanged:function(node,_285,_286,_287){
var tag=null,_289=null,tags=null;
for(var _28b=0;_28b<this._tagTypes.length;_28b++){
tag=this._tagTypes[_28b];
this._processTypeTag(node,tag,_285,_286,_287,true);
}
},onTagContentChanged:function(node,_28d,_28e,_28f){
var tag=null,_291=null,tags=null;
for(var _293=0;_293<this._tagTypes.length;_293++){
tag=this._tagTypes[_293];
this._processTypeTag(node,tag,_28d,_28e,_28f,false);
}
},_processTypeTag:function(node,tag,_296,_297,_298,_299){
var tags=[];
if(_299&&this._checkRoot(node,tag)){
tags[0]=node;
}
tags=tags.concat(this._getNodes(node,tag));
var _29b=[];
_29b=_29b.concat(tags);
if(_29b.length>0){
if(tag.loaded==null){
this._loadTagHandler(tag);
}
var _29c=[];
if(dojo.isFunction(_297)){
try{
_297(node,_29b);
}
catch(error){
console.debug(error);
}
}
for(var _29d=0;_29d<tags.length;_29d++){
try{
tag.tagHandler.processTag(tags[_29d]);
}
catch(error){
_29c[_29c.length]=error;
if(_296){
break;
}
}
}
if(dojo.isFunction(_298)){
try{
_298(node,_29b,_29c);
}
catch(error){
console.debug(error);
}
}
}
},_checkRoot:function(node,tag){
var _2a0=false;
if(node!=null&&node.nodeType){
var _2a1=node.cloneNode(false);
var _2a2=document.createElement("div");
_2a2.appendChild(_2a1);
var _2a3=this._getNodes(_2a2,tag);
if(_2a3!=null&&_2a3.length>0){
_2a0=true;
}
delete _2a1;
delete _2a2;
delete _2a3;
}
return _2a0;
},_loadTags:function(){
if(this._tagTypes==null){
var _2a4=this;
if(typeof livetextCfg!="undefined"){
this._tagTypes=livetextCfg;
}else{
dojo.xhrGet({url:dojo.moduleUrl("com.ibm.mm.livetext","tagservice.entries.cfg"),handleAs:"text",sync:true,load:function(_2a5){
_2a4._tagTypes=dojo.fromJson(_2a5);
},error:function(data){
console.dir(data);
}});
}
}
},onAddConfigEntry:function(_2a7){
},onRemoveConfigEntry:function(_2a8){
},parseDom:function(_2a9,node){
dojo.publish(this.tagChanged,[node]);
},_loadTagHandler:function(tag){
dojo.registerModulePath(tag.module,tag.path);
dojo.eval("dojo.r"+"equire('"+tag.baseClass+"')");
var _2ac="{create:function(){return new "+tag.baseClass+"()}}";
var _2ad=dojo.fromJson(_2ac);
tag.tagHandler=_2ad.create();
tag.loaded=true;
}});
}
if(!dojo._hasResource["lconn.core.url"]){
dojo._hasResource["lconn.core.url"]=true;
dojo.provide("lconn.core.url");
dojo.provide("lconn.core.url.UrlStruct");
dojo.provide("lconn.core.url.ProxyUrlHelper");
lconn.core.url._const={regex:/(^[a-zA-Z]+)\:\/\/([a-zA-Z\d][\a-z\A-Z\d\-\.]*)(:\d{1,5})?([\/\?\#].*)?/,protocolPorts:{"http":80,"https":443}};
dojo.declare("lconn.core.url.UrlStruct",null,{isInvalidUrl:false,url:"",protocol:"",host:"",port:"",hasPort:false,urlRemainder:"",constructor:function(url){
if(url!=null&&url.match(lconn.core.url._const.regex)){
var t=lconn.core.url._const.regex.exec(url);
this.url=t[0];
this.protocol=t[1];
this.host=t[2];
this.port=this._parsePort(t[3]);
this.urlRemainder=t[4];
}else{
this.isInvalidUrl=true;
}
},_parsePort:function(_2b0){
if(_2b0==null||_2b0==""){
return "";
}
this.hasPort=true;
return _2b0.substr(_2b0.indexOf(":")+1);
},normalizedPort:function(){
var pp=lconn.core.url._const.protocolPorts;
if(this.hasPort){
return this.port;
}else{
if(typeof (pp[this.protocol])=="undefined"){
return "";
}else{
return pp[this.protocol];
}
}
}});
dojo.declare("lconn.core.url.ProxyUrlHelper",null,{proxyURL:"",_proxyStruct:null,constructor:function(_2b2){
if(_2b2.length>1&&_2b2.lastIndexOf("/")==_2b2.length-1){
_2b2=_2b2.substr(0,_2b2.length-1);
}
this.proxyURL=_2b2;
this._proxyStruct=new lconn.core.url.UrlStruct(this.proxyURL);
},getProxifiedURL:function(url){
var surl=new lconn.core.url.UrlStruct(url);
var _2b5=this._proxyStruct;
if(this._matchUrlBase(surl)){
return surl.protocol+"://"+surl.host+(_2b5.hasPort?":"+_2b5.port:"")+surl.urlRemainder;
}
return this.proxyURL+"/"+surl.protocol+"/"+surl.host+(surl.hasPort?"%3A"+surl.port:"")+surl.urlRemainder;
},_matchUrlBase:function(surl){
var ps=this._proxyStruct;
return (ps.protocol==surl.protocol&&ps.host==surl.host&&this._matchPort(surl));
},_matchPort:function(surl){
var np=this._proxyStruct.normalizedPort();
return np==surl.normalizedPort();
}});
}
if(!dojo._hasResource["lconn.core.bizCard.bizCardUtils"]){
dojo._hasResource["lconn.core.bizCard.bizCardUtils"]=true;
dojo.provide("lconn.core.bizCard.bizCardUtils");
lconn.core.bizCard.bizCardUtils={isDebug:false,scriptResourceName:"semanticTagService.js",version:"2.5.0",scripts:new Array(),css:new Array(),initiated:false,_haveProxy:false,_proxyHelper:null,appChksum:null,init:function(_2ba){
if(this.initiated==false){
this.baseUrl=lconn.core.bizCard.bizCardUtils.initBaseUrl();
this._initProxyHelper();
this._initAppCksum();
if(window.semtagrs==null){
lconn.core.bizCard.bizCardUtils.loadScript(this.baseUrl+"/resourceStrings.do?t=1");
}
if(window.SemTagSvcConfig!=null&&SemTagSvcConfig.debug==true){
lconn.core.bizCard.bizCardUtils.isDebug=true;
}
if(window.SemTagPersonConfig_noCss==null){
if(window.SemTagSvcConfig!=null){
if(SemTagSvcConfig.loadCssFiles==true){
lconn.core.bizCard.bizCardUtils.loadCssIfNeeded();
}
}else{
lconn.core.bizCard.bizCardUtils.loadCssIfNeeded();
}
}
this.initiated=true;
}
},initBaseUrl:function(){
var _2bb="";
if(window.SemTagSvc_baseUrl!=null){
_2bb=SemTagSvc_baseUrl;
}else{
if(window.SemTagSvcConfig!=null&&SemTagSvcConfig.baseUrl!=null){
_2bb=SemTagSvcConfig.baseUrl;
}else{
_2bb=this.getURL(this.scriptResourceName,"script",SemTagSvc.baseUrl,"src").baseUrl;
}
}
return _2bb;
},_initProxyHelper:function(){
if(window.SemTagSvcConfig!=null&&typeof (window.SemTagSvcConfig.proxyURL)!="undefined"&&window.SemTagSvcConfig.proxyURL.length>0){
this._haveProxy=true;
this._proxyHelper=new lconn.core.url.ProxyUrlHelper(window.SemTagSvcConfig.proxyURL);
}
},_initAppCksum:function(){
this.appChksum=this._getConfigValue("appChksum","UNDEFINED");
},_getConfigValue:function(_2bc,_2bd){
if(window.SemTagSvcConfig!=null&&typeof (window.SemTagSvcConfig[_2bc])!="undefined"){
return window.SemTagSvcConfig[_2bc];
}
return _2bd;
},appendAppChkSum:function(url){
if(url==null||url.indexOf("acs=")>=0){
return url;
}
var c=null;
if(url.indexOf("?")<0){
c="?";
}else{
c="&";
}
return url+c+"acs="+this.appChksum;
},getService:function(_2c0){
for(i=0;i<livetextCfg.length;i++){
var _2c1=livetextCfg[i];
if(_2c1.id==_2c0){
return _2c1;
}
}
return null;
},processUntilAvailable:function(_2c2,test,_2c4){
var _2c5="";
_2c5=window.setInterval(function(){
if(eval(test)){
if(_2c4!=null){
_2c2(_2c4);
}else{
_2c2();
}
window.clearInterval(_2c5);
}
},300);
},getBaseURL:function(_2c6){
var _2c7=lconn.core.bizCard.bizCardUtils.getService(_2c6);
if(_2c7!=null&&_2c7.baseURL!=null){
return _2c7.baseURL;
}else{
return this.baseUrl;
}
},buildBaseURL:function(_2c8){
var _2c9=_2c8.indexOf("//")+2;
var _2ca=_2c8.substring(0,_2c9);
var _2cb=_2c8.substring(_2c9,_2c8.length);
_2c9=_2cb.indexOf("/")+1;
var _2cc=_2cb.substring(0,_2c9);
_2cb=_2cb.substring(_2c9,_2cb.length);
_2c9=_2cb.indexOf("/");
var _2cd=_2cb.substring(0,_2c9);
_2cb=_2cb.substring(_2c9,_2cb.length);
var _2ce=_2ca+_2cc+_2cd;
return _2ce;
},getURL:function(_2cf,_2d0,_2d1,_2d2){
var temp={};
var _2d4=location.protocol+"//"+location.host;
var s=document.getElementsByTagName(_2d0);
var _2d6="";
var _2d7=null;
for(var i=0;i<s.length;i++){
var src=s[i].getAttribute(_2d2);
if(src&&src.indexOf(_2cf)!=-1){
_2d7=src;
_2d6=src.substring(0,src.indexOf(_2d1));
if(_2d1==null){
_2d6=this.buildBaseURL(src);
temp.baseUrl=_2d6;
}
temp.resourceFound=true;
break;
}
}
if(temp.baseUrl=="undefined"){
temp.baseUrl=(_2d6==_2d4)?_2d1:_2d6+_2d1;
}
return temp;
},getUrlParam:function(_2da){
var _2db=unescape(window.location);
if(_2db.indexOf(_2da)==-1){
return null;
}else{
var _2dc=_2db.substring(_2db.indexOf(_2da+"=")+_2da.length+1);
var _2dd=_2dc.indexOf("&");
if(_2dd!=-1){
_2dc=_2dc.substring(0,_2dd);
}
return _2dc;
}
},getProxifiedURL:function(url,_2df,_2e0){
for(var key in _2df){
var _2e2=new RegExp("@@@"+key+"@@@");
var val=_2df[key];
url=url.replace(_2e2,val);
}
url=this.appendAppChkSum(url);
if(this._haveProxy){
return this._proxyHelper.getProxifiedURL(url);
}
return url+"&callback="+_2e0;
},_timeout:10000,getBizCardData:function(url,_2e5,_2e6,_2e7,_2e8,_2e9,_2ea){
var url=this.getProxifiedURL(url,_2e5,_2e6);
if(this._haveProxy){
var _2eb=function(_2ec){
var data=dojo.fromJson(_2ec.replace(/^\s*while\(1\);/,""));
_2e8(true,data,_2e9);
};
var _2ee=function(_2ef){
_2e8(false,data,_2e9);
};
dojo.xhrGet({url:url,timeout:this._timeout,load:_2eb,error:_2ee});
}else{
_2e7.request(url,this._timeout,_2e8,_2e9,_2ea);
}
},out:function(){
this.buffer="";
this.write=function(str){
this.buffer+=str;
};
},hasRule:function(_2f1){
var _2f2=document.styleSheets;
if(_2f2&&_2f2.length){
for(var i=0;i<_2f2.length;i++){
var _2f4=_2f2[i];
var _2f5=_2f4.cssRules||_2f4.rules;
if(_2f5&&_2f5.length){
for(var j=0;j<_2f5.length;j++){
var rule=_2f5[j];
if(rule&&rule.selectorText==_2f1){
return true;
}
}
}
}
}
return false;
},loadCssIfNeeded:function(){
if(!this.hasRule(".lotusVCard")){
if(window.SemTagSvcConfig!=null&&SemTagSvcConfig.isBidiRTL){
this.loadCss(this.baseUrl+"/nav/common/styles/base/standaloneVcardRTL.css");
}else{
this.loadCss(this.baseUrl+"/nav/common/styles/base/standaloneVcard.css");
}
this.loadCss(this.baseUrl+"/nav/common/styles/base/semanticTagStyles.css");
this.standaloneCSSloaded=true;
}
},getSinglePropertyValue:function(prop){
if(!prop){
return false;
}
var _2f9=prop.innerHTML.replace(/<[a-zA-Z\/][^>]*>/gi,"");
return _2f9;
},sortByOrder:function(a,b){
if(a.order>b.order){
return 1;
}else{
if(a.order<b.order){
return -1;
}else{
return 0;
}
}
},getElementsByClassName:function(_2fc,_2fd,_2fe,_2ff){
if(!_2fd){
_2fd=document.body;
}
if(!_2fe){
limit=0;
}
if(!_2ff){
_2ff=["*"];
}
var _300=new RegExp("(^|\\s)"+_2fc+"(\\s|$)");
if(_2fd&&_2fd.className&&_2fd.className.match(_300)){
return new Array(_2fd);
}
var _301=new Array();
for(var t=0;t<_2ff.length;t++){
var _303=_2fd.getElementsByTagName(_2ff[t]);
for(var i=0;i<_303.length;i++){
var _305=_303[i];
if(_305.className.match(_300)){
_301.push(_305);
}
if(0<_2fe&&_2fe==_301.length){
break;
}
}
}
return _301;
},getParentByClassName:function(_306,_307){
if(!_307){
return null;
}
var _308=new RegExp("(^|\\s)"+_306+"(\\s|$)");
if(_307.className&&_307.className.match(_308)){
return _307;
}
while(_307.parentNode){
_307=_307.parentNode;
if(_307.className&&_307.className.match(_308)){
return _307;
}
}
},addHover:function(elem,_30a,_30b,_30c){
while(typeof SemTagMenu==undefined){
alert("waiting...");
}
var _30d=elem.getAttribute(this.refcntAttr);
if(_30d){
elem.setAttribute(this.refcntAttr,parseInt(Number(_30d)+1));
if(SemTagMenu.staticHover){
var img=SemTagMenu.findHoverFromLiveElement(elem);
if(img){
dojo.connect(img,"onclick",_30b);
img.setAttribute("href","javascript:a11y()");
}else{
alert("couldn't find the hover for this element!");
}
}else{
dojo.connect(elem,"onmouseover",_30a);
dojo.connect(elem,"onfocus",_30a);
}
}else{
elem.setAttribute(this.refcntAttr,"1");
if(SemTagMenu.staticHover){
var img=this.createHoverImage();
dojo.connect(img,"onclick",_30b);
img.setAttribute("href","javascript:a11y()");
var _30f=elem.nextSibling;
if(_30f){
_30f.parentNode.insertBefore(img,_30f);
}else{
elem.parentNode.appendChild(img);
}
elem.setAttribute(this.hoverIdPrefix+"idx",parseInt(this.hoverIdx));
elem.id=this.liveElemPrefix+this.hoverIdx;
}else{
var _310=dojo.isFF?elem.getAttribute("class"):elem.className;
if(_310&&0<_310.length){
_310+=" hasHover";
}else{
_310="hasHover";
}
if(dojo.isFF){
elem.setAttribute("class",_310);
}else{
elem.className=_310;
}
dojo.connect(elem,"onmouseover",_30a);
dojo.connect(elem,"onfocus",_30a);
}
if(_30c!=null){
dojo.connect(elem,"onkeydown",_30c);
}
}
},createHoverImage:function(){
var img=document.createElement("img");
this.hoverIdx++;
img.id=this.hoverIdPrefix+this.hoverIdx;
img.className=SemTagMenu.iconName;
img.setAttribute("src",this.baseUrl+"/images/menu_selected_hover.gif");
img.setAttribute("border","0");
var link=document.createElement("a");
dojo.connect(link,"onfocus",SemTagMenu.activateHover);
dojo.connect(link,"onmouseover",SemTagMenu.activateHover);
dojo.connect(link,"onmouseout",SemTagMenu.deactivateHover);
link.appendChild(img);
return link;
},showHover:function(_313,_314){
try{
SemTagMenu.showHover(_313,_314);
}
catch(e){
console.log("Error in lconn.core.bizCard.bizCardUtils.showHover");
console.log(e);
}
},setMenuData:function(_315,_316,_317,_318,_319){
SemTagMenu.setMenuData(_315,_316,_317,_318,_319);
},getMenuItemJson:function(_31a,href,_31c,icon){
var o=_31c?_31c:0;
var i=icon?icon:"";
return {"label":_31a,"href":href,"order":o,"icon":i};
},getMenuHeaderJson:function(_320,_321){
return {"markup":_320,"order":_321};
},getMenuFooterJson:function(_322,_323){
return {"markup":_322,"order":_323};
},getElementFromEvent:function(_324){
return _324.target?_324.target:_324.srcElement;
},getLiveElementFromEvent:function(_325){
return SemTagMenu.findLiveElementFromEventSource(this.getElementFromEvent(_325));
},getEventAbsoluteX:function(e){
var x=0;
if(e.pageX){
x=e.pageX;
}else{
if(e.clientX){
x=e.clientX+document.body.scrollLeft;
}
}
return x;
},getEventAbsoluteY:function(e){
var y=0;
if(e.pageY){
y=e.pageY;
}else{
if(e.clientY){
y=e.clientY+document.body.scrollTop;
}
}
return y;
},findPosition:function(obj){
var _32b=0,posX=0,posY=0;
var _32e=1400*1;
if(obj.offsetParent){
if(obj.currentStyle){
posY+=obj.offsetHeight-parseInt(this.getStyle(obj,"paddingBottom"));
}else{
if(window.getComputedStyle){
posY+=obj.offsetHeight-parseInt(this.getStyle(obj,"padding-bottom"));
}
}
while(obj!=null){
if(obj.offsetLeft>=_32e&&SemTagSvcConfig.isBidiRTL){
posX+=obj.offsetLeft-250;
}else{
posX+=obj.offsetLeft;
}
posY+=obj.offsetTop;
obj=obj.offsetParent;
_32b++;
}
return [posX,posY];
}else{
return [obj.x,obj.y];
}
},getStyle:function(node,_330){
var _331;
if(window.getComputedStyle){
_331=document.defaultView.getComputedStyle(node,null).getPropertyValue(_330);
}else{
if(node.currentStyle){
_331=node.currentStyle[_330];
}
}
return _331;
},createGroupJson:function(ctx,exts){
return {"context":ctx,"extenders":exts};
},createActionJson:function(id,ctx,_336,desc,url,_339){
var o=parseInt(_339);
return {"id":id,"context":ctx,"label":_336,"description":desc,"url":url,"order":o};
},parseOrder:function(_33b){
if(_33b==null||_33b.length==0){
return 0;
}
if(_33b.charAt(0)=="-"){
return parseInt(_33b.substr(1))*-1;
}else{
return parseInt(_33b);
}
},_langParamValue:"",getLangParam:function(){
if(this._langParamValue==""){
if(window.djConfig!=null&&djConfig.locale!=null){
this._langParamValue=djConfig.locale;
return this._langParamValue;
}
var _33c="lcLang";
if(typeof (profilesData)!="undefined"&&typeof (profilesData.config)!="undefined"&&typeof (profilesData.config.langCookieName)!="undefined"){
_33c=profilesData.config.langCookieName;
}
var _33d=dojo.cookie(_33c);
if(_33d==null||_33d==""){
_33d=this.getUrlParam("lang");
}
if(_33d==null||_33d==""){
if(typeof (navigator.language)!="undefined"){
_33d=navigator.language;
}else{
if(typeof (navigator.browserLanguage)!="undefined"){
_33d=navigator.browserLanguage;
}
}
}
var _33e=/(\w\w){1}([\-_]\w\w){0,2}/i;
if(_33d!=null&&!_33d.match(_33e)){
_33d=null;
}
if(_33d==null||_33d==""){
_33d="en";
}
_33d=_33d.replace(/\-/g,"_");
_33d=_33d.toLowerCase();
this._langParamValue=_33d;
}
return this._langParamValue;
},getTextValue:function(elem){
if(!elem){
return "";
}
return elem.innerHTML.replace(/<[a-zA-Z\/][^>]*>/gi,"");
},getTypedValue:function(elem,_341){
if(!_341){
_341="def";
}
var _342=new Array();
var _343=this.getElementsByClassName("type",elem);
var _344=this.getElementsByClassName("value",elem);
var _345="";
if(_344.length<1){
_345=this.getTextValue(elem);
}
for(i=0;i<_344.length;i++){
_345+=this.getTextValue(_344[i]);
}
if(_343.length<1){
_342[_341]=_345;
}else{
for(j=0;j<_343.length;j++){
var _346=_343[j];
var type=_346.tagName.match(/^abbr$/i)?_346.getAttribute("title"):this.getTextValue(_346);
_342[type.toLowerCase()]=_345;
}
}
return _342;
},findNameElementInHcard:function(elem){
if(elem.className!="vcard"){
elem=this.getParentByClassName("vcard",elem);
}
var _349=this.getElementsByClassName("fn",elem)[0];
if(!_349){
_349=this.getElementsByClassName("n",elem)[0];
}
return _349;
},findElementByNameInHcard:function(elem,name){
if(elem.className!="vcard"){
elem=this.getParentByClassName("vcard",elem);
}
return this.getElementsByClassName(name,elem)[0];
},loadScript:function(_34c){
var _34d=this.getLangParam();
if(_34c.indexOf("lang=")!=-1&&_34d!=null){
_34c=_34c.substring(0,_34c.indexOf("lang"))+"lang="+_34d;
}else{
if(_34c.indexOf("resourcebundle")!=-1&&_34d!=null){
_34c=_34c+"&lang="+_34d;
}
if(_34c.indexOf("resourceStrings")!=-1&&_34d!=null){
_34c=_34c+"&lang="+_34d;
}
if(_34c.indexOf("js-resources.js")!=-1&&_34d!=null){
_34c=_34c+((_34c.indexOf("?")!=-1)?"&":"?")+"lang="+_34d;
}
}
_34c=this.appendAppChkSum(_34c);
if(!this.scripts[_34c]){
this.scripts[_34c]=true;
var _34e=document.createElement("script");
_34e.src=_34c;
document.body.insertBefore(_34e,document.body.firstChild);
}
},loadCss:function(css){
css=this.appendAppChkSum(css);
if(!this.css[css]){
var head=document.getElementsByTagName("head");
if(head[0]){
this.css[css]=true;
var _351=document.createElement("link");
_351.rel="stylesheet";
_351.href=css;
_351.type="text/css";
_351.media="screen";
head[0].appendChild(_351);
}
}
},toggleInlineCard:function(pDiv){
var _353=document.getElementById(pDiv+"_Pivot");
var _354=document.getElementById(pDiv+"_Details");
if(_353!=null&&_354!=null){
if(_353.className.indexOf("lotusPivotNavOpen")!=-1){
_353.className="lotusPivotNav";
_354.style.display="none";
}else{
_353.className="lotusPivotNav lotusPivotNavOpen";
_354.style.display="block";
}
}
}};
window.SemTagMenu={isDebug:false,staticHover:false,id:"semtagmenu",hideDelay:3000,showDelay:500,timeouts:new Array(),iconName:"menu_drop_icon",showing:false,currentElem:null,refCount:-1,tabOrderByDomNodeOrder:0,tabOrderByTabIndex:0,elemOrigTabIdx:null,elemTempTabIdx:1000,elemNext:null,svcHandlers:new Array(),items:new Array(),headers:new Array(),footers:new Array(),hoverIdRE:null,iconNameRE:new RegExp("(^|\\s)menu_drop_icon(\\s|$)"),initited:false,init:function(){
if(this.initited==false){
SemTagMenu.hoverIdRE=new RegExp(lconn.core.bizCard.bizCardUtils.hoverIdPrefix);
dojo.connect(document,"onclick",SemTagMenu.click);
dojo.connect(document,"onkeydown",SemTagMenu.catchEscape);
this.initited=true;
}
},activateFocus:function(_355){
lconn.core.bizCard.bizCardUtils.activateHover(_355);
},activateHover:function(_356){
var _357=lconn.core.bizCard.bizCardUtils.getElementFromEvent(_356);
if(_357){
_357.src=lconn.core.bizCard.bizCardUtils.baseUrl+"/images/menu_selected_hover.gif";
}
SemTagMenu.setCurrentElement(SemTagMenu.findLiveElementFromEventSource(_357));
},deactivateHover:function(_358){
var _359=lconn.core.bizCard.bizCardUtils.getElementFromEvent(_358);
if(_359){
_359.src=lconn.core.bizCard.bizCardUtils.baseUrl+"/images/menu_selected_hover.gif";
}
SemTagMenu.setCurrentElement(null);
},showHover:function(_35a,_35b){
try{
if(SemTagMenu.staticHover){
return;
}
var elem=lconn.core.bizCard.bizCardUtils.getElementFromEvent(_35a);
SemTagMenu.elemOrigTabIdx=elem.getAttribute("tabIndex");
if(SemTagMenu.tabOrderByTabIndex&&!SemTagMenu.elemOrigTabIdx){
SemTagMenu.elemNext=elem.nextSibling;
elem.setAttribute("tabIndex",parseInt(Number(SemTagMenu.elemTempTabIdx)));
}
var tag=SemTagMenu.getMenuTag(elem);
var _35e=0;
if(elem&&elem!=SemTagMenu.currentElem){
SemTagMenu.clearAllSvcHandlers(tag);
_35e=elem.getAttribute(lconn.core.bizCard.bizCardUtils.refcntAttr);
if(_35e){
SemTagMenu.setCurrentElement(elem);
}else{
if(lconn.core.bizCard.bizCardUtils.isDebug){
console.log("SemTagMenu.showHover called for a DOM element with no refcnt attribute!");
}
SemTagMenu.setCurrentElement(null);
return;
}
}
SemTagMenu.addSvcHandler(tag,_35b);
SemTagMenu.setRefCount(_35e);
if(SemTagMenu.showing&&tag.style.display!="none"){
return;
}
SemTagMenu.showing=false;
var out=new lconn.core.bizCard.bizCardUtils.out();
SemTagMenu.writeHover(out,"ltr");
tag.innerHTML=out.buffer;
var pos=SemTagMenu.currentElemPosition;
SemTagMenu.show(SemTagMenu.id,_35a,pos[0]+SemTagMenu.hoverOffset[0],pos[1]+SemTagMenu.hoverOffset[1],SemTagMenu.hoverDimension[0],SemTagMenu.hoverDimension[1]);
}
catch(e){
console.log("Error in SemTagMenu.showHover");
console.log(e);
}
},addSvcHandler:function(tag,_362){
SemTagMenu.svcHandlers.push(dojo.connect(tag,"onclick",_362));
},clearAllSvcHandlers:function(tag){
while(0<SemTagMenu.svcHandlers.length){
var _364=SemTagMenu.svcHandlers.pop();
if(_364){
dojo.disconnect(_364);
}
}
},setCurrentElement:function(elem){
if(elem!=null){
SemTagMenu.currentElem=elem;
SemTagMenu.currentElemPosition=lconn.core.bizCard.bizCardUtils.findPosition(elem);
SemTagMenu.setRefCount(elem?Number(elem.getAttribute(lconn.core.bizCard.bizCardUtils.refcntAttr)):0);
while(0<SemTagMenu.headers.length){
SemTagMenu.headers.pop();
}
while(0<SemTagMenu.items.length){
SemTagMenu.items.pop();
}
while(0<SemTagMenu.footers.length){
SemTagMenu.footers.pop();
}
}
},setRefCount:function(cnt){
SemTagMenu.refCount=cnt;
},setMenuData:function(_367,_368,_369,_36a,_36b){
if(lconn.core.bizCard.bizCardUtils.isDebug){
console.log("Menu.setMenuData: items.length="+_368.length);
}
if(!SemTagMenu.staticHover&&SemTagMenu.refCount<0){
if(lconn.core.bizCard.bizCardUtils.isDebug){
console.log("setMenuData called when refCount="+SemTagMenu.refCount);
}
return;
}
var elem=SemTagMenu.findLiveElementFromEventSource(lconn.core.bizCard.bizCardUtils.getElementFromEvent(_367));
if(!elem){
if(lconn.core.bizCard.bizCardUtils.isDebug){
console.log("setMenuData called on a null live element");
}
return;
}
if(SemTagMenu.staticHover&&(elem!=SemTagMenu.currentElem||SemTagMenu.showing)){
SemTagMenu.setCurrentElement(elem);
}
for(var i=0;i<_368.length;i++){
SemTagMenu.items.push(_368[i]);
}
if(_369){
SemTagMenu.currentMenuCss=_369;
}
if(_36a){
SemTagMenu.headers.push(_36a);
}
if(_36b){
SemTagMenu.footers.push(_36b);
}
SemTagMenu.stopEvent(_367);
SemTagMenu.showMenu();
},getCurrentElement:function(){
return SemTagMenu.currentElem;
},showMenu:function(){
SemTagMenu.items.sort(lconn.core.bizCard.bizCardUtils.sortByOrder);
if(1<SemTagMenu.headers.length){
SemTagMenu.headers.sort(lconn.core.bizCard.bizCardUtils.sortByOrder);
}
if(1<SemTagMenu.footers.length){
SemTagMenu.footers.sort(lconn.core.bizCard.bizCardUtils.sortByOrder);
}
var out=new lconn.core.bizCard.bizCardUtils.out();
SemTagMenu.startMenu(out,"ltr");
if(0<SemTagMenu.headers.length){
SemTagMenu.writeHeader(out,SemTagMenu.headers[0],"ltr");
}
SemTagMenu.startActionSection(out,"ltr",SemTagMenu.currentMenuCss);
for(var i=0;i<SemTagMenu.items.length;i++){
SemTagMenu.writeMenuItem(out,SemTagMenu.items[i],"ltr");
}
SemTagMenu.endActionSection(out,"ltr");
if(0<SemTagMenu.footers.length){
SemTagMenu.writeFooter(out,SemTagMenu.footers[0],"ltr");
}
SemTagMenu.endMenu(out,"ltr");
var tag=SemTagMenu.getMenuTag();
SemTagMenu.clearAllSvcHandlers(tag);
SemTagMenu.offScreen(tag);
tag.innerHTML=out.buffer;
SemTagMenu.showing=true;
SemTagMenu.defaultCursor();
if(SemTagMenu.staticHover&&dojo.isFF){
var _371=tag.getElementsByTagName("a");
if(0<_371.length){
_371[0].focus();
}
}
var _372={"target":SemTagMenu.currentElem};
var pos=SemTagMenu.currentElemPosition;
SemTagMenu.show(SemTagMenu.id,_372,pos[0]+SemTagMenu.menuOffset[0],pos[1]+SemTagMenu.menuOffset[1],tag.offsetWidth,tag.offsetHeight);
},getMenuTag:function(elem){
var tag=document.getElementById(SemTagMenu.id);
if(!tag){
tag=document.createElement((SemTagMenu.tabOrderByDomNodeOrder?"div":"span"));
tag.setAttribute("id",SemTagMenu.id);
tag.style.position=(SemTagMenu.tabOrderByDomNodeOrder?"fixed":"absolute");
tag.style.display="none";
if(SemTagMenu.tabOrderByTabIndex&&typeof (elem)!="undefined"&&elem!=null){
var _376=elem.getAttribute("tabIndex");
if(SemTagMenu.tabOrderByTabIndex&&_376){
tag.setAttribute("tabIndex",parseInt(Number(_376)+1));
}
}
dojo.connect(tag,"onmouseout",SemTagMenu.mouseout);
dojo.connect(tag,"onmouseover",SemTagMenu.mouseover);
dojo.connect(tag,"onfocus",SemTagMenu.focus);
if(SemTagMenu.tabOrderByTabIndex){
dojo.connect(tag,"keydown",SemTagMenu.keydown);
}
if(SemTagMenu.tabOrderByDomNodeOrder){
if(elem){
elem.parentNode.appendChild(tag);
}else{
document.body.insertBefore(tag,document.body.firstChild);
}
}else{
document.body.insertBefore(tag,document.body.firstChild);
}
}else{
if(SemTagMenu.tabOrderByTabIndex&&typeof (elem)!="undefined"&&elem!=null){
var _376=elem.getAttribute("tabIndex");
if(_376){
tag.setAttribute("tabIndex",parseInt(Number(_376)+1));
}
}else{
if(SemTagMenu.tabOrderByDomNodeOrder){
if(elem){
elem.parentNode.appendChild(tag);
}
}
}
}
return tag;
},show:function(_377,e,xpos,ypos,_37b,_37c){
SemTagMenu.clearTimeouts();
var _37d=document.getElementById(_377);
if(_37b==null){
_37b=0;
}
if(_37c==null){
_37c=0;
}
var top,left;
if(xpos!=null&&ypos!=null){
var top=ypos;
var left=xpos;
}else{
var top=lconn.core.bizCard.bizCardUtils.getEventAbsoluteY(e);
var left=lconn.core.bizCard.bizCardUtils.getEventAbsoluteX(e);
}
var vSrc=(e.target)?e.target:e.srcElement;
var _381,_382,d=document;
if(typeof window.innerWidth!="undefined"){
_381=window.innerWidth;
_382=window.innerHeight;
}else{
if(d.documentElement&&typeof d.documentElement.clientWidth!="undefined"&&d.documentElement.clientWidth!=0){
_381=d.documentElement.clientWidth;
_382=d.documentElement.clientHeight;
}else{
if(d.body&&typeof d.body.clientWidth!="undefined"){
_381=d.body.clientWidth;
_382=d.body.clientHeight;
}
}
}
var _384=(document.body.scrollLeft>document.documentElement.scrollLeft)?document.body.scrollLeft:document.documentElement.scrollLeft;
if((left+_37b)>(_381+_384)){
var _385=(left+_37b)-_381-_384;
left-=_385;
}
var _386=(document.body.scrollTop>document.documentElement.scrollTop)?document.body.scrollTop:document.documentElement.scrollTop;
if((top+_37c)>(_382+_386)){
var _385=(top+_37c)-_382-_386;
top-=_385;
}
_37d.style.top=top+"px";
_37d.style.left=left+"px";
_37d.style.display="block";
var _387=document.getElementById("tempIframe");
if(_387==null){
_387=document.createElement("iframe");
_387.setAttribute("id","tempIframe");
_387.setAttribute("frameBorder","no");
_387.setAttribute("scrolling","no");
_387.setAttribute("src",lconn.core.bizCard.bizCardUtils.baseUrl+"/nav/blankIE.html");
_387.style.position="absolute";
_387.style.left=left+"px";
_387.style.top=top+"px";
_387.width=(_37d.offsetWidth).toString()+"px";
_387.height=(_37d.offsetHeight).toString()+"px";
_387.style.display="block";
_387.style.zIndex="899";
document.body.appendChild(_387);
}else{
_387.style.left=left+"px";
_387.style.top=top+"px";
_387.width=(_37d.offsetWidth).toString()+"px";
_387.height=(_37d.offsetHeight).toString()+"px";
_387.style.display="block";
}
var _388=document.getElementById("A11Yblank");
if(_388){
_388.focus();
}else{
if(typeof (SemTagMenu.startHideTimer)!="undefined"){
SemTagMenu.startHideTimer(_377);
}
}
},hide:function(_389,e){
var tag=SemTagMenu.getMenuTag();
if(!tag){
return false;
}
tag.style.display="none";
SemTagMenu.showing=false;
SemTagMenu.setCurrentElement(null);
SemTagMenu.clearAllSvcHandlers(tag);
SemTagMenu.defaultCursor();
var elem=SemTagMenu.getCurrentElement();
if(SemTagMenu.tabOrderByTabIndex&&elem&&elem.getAttribute("tabIndex")){
tag.setAttribute("tabIndex",null);
elem.setAttribute("tabIndex",SemTagMenu.elemOrigTabIdx);
}
var _38d=document.getElementById("tempIframe");
if(_38d!=null){
_38d.style.display="none";
}
return true;
},offScreen:function(_38e){
_38e.style.top="-1000px";
_38e.style.left="-1000px";
_38e.style.display="block";
},findLiveElementFromEventSource:function(_38f){
if(SemTagMenu.staticHover){
var id=_38f.id;
if(!id.match(SemTagMenu.hoverIdRE)){
var _391=_38f.getElementsByTagName("img");
for(var i=0;i<_391.length;i++){
if(_391[i].id&&_391[i].id.match(SemTagMenu.hoverIdRE)){
id=_391[i].id;
break;
}
}
}
var idx=id.substr(lconn.core.bizCard.bizCardUtils.hoverIdPrefix.length);
return document.getElementById(lconn.core.bizCard.bizCardUtils.liveElemPrefix+idx);
}else{
var _394=SemTagMenu.getCurrentElement();
return _394?_394:_38f;
}
},findHoverFromLiveElement:function(_395){
var idx=_395.getAttribute(lconn.core.bizCard.bizCardUtils.hoverIdPrefix+"idx");
return document.getElementById(lconn.core.bizCard.bizCardUtils.hoverIdPrefix+idx);
},inMenu:function(_397,_398,_399,_39a){
if(!_397){
return false;
}
if(!SemTagMenu.showing){
return false;
}
if(!_399){
_399=0;
}
if(!_39a){
_39a=0;
}
var _39b=lconn.core.bizCard.bizCardUtils.getEventAbsoluteX(_398);
var _39c=lconn.core.bizCard.bizCardUtils.getEventAbsoluteY(_398);
var _39d=_397.style.left.replace(/px$/,"");
var _39e=_397.style.top.replace(/px$/,"");
var sumX=parseInt(_39d)+parseInt(_397.clientWidth);
var sumY=parseInt(_39e)+parseInt(_397.clientHeight);
if((_39b-1<=(_39d-_399))||(_39c-1<=(_39e-_39a))||(_39b>=(sumX+_399))||(_39c>=(sumY+_39a))){
return false;
}else{
return true;
}
},mouseout:function(_3a1){
var _3a2=SemTagMenu.id;
menuElem=document.getElementById(_3a2);
if(SemTagMenu.inMenu(menuElem,_3a1)){
}else{
if(typeof (SemTagMenu.startHideTimer)!="undefined"){
SemTagMenu.startHideTimer(_3a2);
}
}
},mouseover:function(_3a3){
SemTagMenu.clearTimeouts();
},focus:function(_3a4){
SemTagMenu.mouseover(_3a4);
},unfocus:function(_3a5){
SemTagMenu.mouseout(_3a5);
},click:function(_3a6){
if(!_3a6){
return;
}
var _3a7=lconn.core.bizCard.bizCardUtils.getElementFromEvent(_3a6);
if(_3a7.className!="javlinHover"){
menuElem=document.getElementById(SemTagMenu.id);
if(!SemTagMenu.inMenu(menuElem,_3a6)){
SemTagMenu.hide(SemTagMenu.id);
}
}
},keydown:function(_3a8){
SemTagMenu.catchEscape(_3a8);
SemTagMenu.catchTab(_3a8);
},catchEscape:function(_3a9){
if(_3a9.keyCode==27){
SemTagMenu.hide(SemTagMenu.id);
}
},catchTab:function(_3aa){
if(_3aa.keyCode==9){
if(SemTagMenu.elemNext&&typeof (SemTagMenu.elemNext.focus)!="undefined"){
SemTagMenu.elemNext.focus();
}
SemTagMenu.hide(SemTagMenu.id);
}
},simulateClick:function(_3ab){
if(_3ab.ctrlKey&&_3ab.keyCode==13){
if(_3ab.preventDefault){
_3ab.preventDefault();
}
var evt=null;
if(document.createEvent){
evt=document.createEvent("MouseEvents");
}
if(evt&&evt.initMouseEvent){
evt.initMouseEvent("click",true,true,document.defaultView,1,0,0,0,0,false,false,false,false,0,null);
}
var _3ad=document.getElementById(SemTagMenu.id);
if(_3ad.dispatchEvent){
_3ad.dispatchEvent(evt);
}else{
if(_3ad.fireEvent){
_3ad.fireEvent("onclick");
}
}
}
},stopEvent:function(_3ae){
if(!_3ae){
return;
}
if(dojo.isFF){
if(_3ae.preventDefault==null){
_3ae=_3ae.original;
}
_3ae.preventDefault();
_3ae.stopPropagation();
}else{
try{
if(_3ae.returnValue==null){
_3ae=_3ae.original;
}
_3ae.returnValue=false;
_3ae.cancelBubble=true;
}
catch(e){
}
}
},startHideTimer:function(_3af){
if(0<SemTagMenu.hideDelay){
SemTagMenu.timeouts.push(window.setTimeout("SemTagMenu.endHideTimer(\""+_3af+"\")",SemTagMenu.hideDelay));
}
},endHideTimer:function(_3b0){
menuElem=document.getElementById(_3b0);
SemTagMenu.hide(_3b0);
},clearTimeouts:function(){
for(i=0;i<SemTagMenu.timeouts.length;i++){
window.clearTimeout(SemTagMenu.timeouts[i]);
}
},defaultCursor:function(){
document.body.style.cursor="default";
},waitCursor:function(){
document.body.style.cursor="wait";
},clickCursor:function(){
document.body.style.cursor="pointer";
}};
SemTagMenu.defaultLoaded=true;
SemTagMenu.hoverDimension=[14,14];
SemTagMenu.hoverOffset=[15,3];
SemTagMenu.menuOffset=[15,0];
SemTagMenu.writeHover=function(out,bidi){
if(window.semtagrs!=null){
var _3b3="z-index: 900; opacity: 1;";
if(window.SemTagSvcConfig!=null&&SemTagSvcConfig.isBidiRTL){
_3b3+="padding:2px 25px 2px 3px; background-position:96% center;";
}
out.write("<div class='javlinHover' "+" onmouseover='javascript:SemTagMenu.clickCursor();'"+" onmouseout='javascript:SemTagMenu.defaultCursor();'"+" style='"+_3b3+"' "+" title='"+semtagrs["label.semtag.hover"]+"' "+">"+semtagrs["label.semtag.hover"]+"</div>");
}else{
console.log("SemTagMenu.writeHover: semtagrs is null. Need for strings");
}
};
SemTagMenu.startMenu=function(out,bidi){
out.write("<div class='popupPersonCard' style='z-index: 900;'>");
};
SemTagMenu.writeHeader=function(out,_3b7,bidi){
out.write(_3b7.markup);
};
SemTagMenu.startActionSection=function(out,bidi,_3bb){
out.write("<a href='javascript:a11y()'><a>");
if(!_3bb){
_3bb="personMenuActions";
}
out.write("<div class='"+_3bb+"'>");
out.write("<ul>");
};
SemTagMenu.writeMenuItem=function(out,item,bidi){
out.write("<li><a href='"+item.href+"'>"+item.label+"</a></li>");
};
SemTagMenu.endActionSection=function(out,bidi){
out.write("</ul>");
out.write("</div>");
};
SemTagMenu.writeFooter=function(out,_3c2,bidi){
out.write(_3c2.markup);
};
SemTagMenu.endMenu=function(out,bidi){
out.write("</div>");
};
window.SemTagUtil={crossDomainRequest:function(){
var _3c6=new Array();
var _3c7=new Array();
var _3c8=new Array();
var self=this;
createTimeoutFunction=function(_3ca){
return function(){
self.cancelRequest(_3ca);
};
};
this.getScriptId=function(id){
return "_JVLN_"+id;
};
this.getScriptObject=function(id){
return document.getElementById(this.getScriptId(id));
};
this.cloneObject=function(obj){
var _3ce=new Object();
for(i in obj){
_3ce[i]=obj[i];
}
return _3ce;
};
this.request=function(url,_3d0,_3d1,_3d2,_3d3){
if(lconn.core.bizCard.bizCardUtils.isDebug){
console.log("SemTagUtil.request: started");
}
if(lconn.core.bizCard.bizCardUtils.isDebug){
console.log("SemTagUtil.request: connectionId "+_3d3);
}
_3d3=_3d3.toLowerCase();
var _3d4=this.getScriptId(_3d3);
if(lconn.core.bizCard.bizCardUtils.isDebug){
console.log("SemTagUtil.request: objId "+_3d4);
}
if(_3d1!=null){
_3c6[_3d3]=_3d1;
}
if(_3d2!=null){
if(!dojo.isFF){
_3c7[_3d3]=this.cloneObject(_3d2);
}else{
_3c7[_3d3]=_3d2;
}
}
var _3d5=document.createElement("script");
_3d5.id=_3d4;
_3d5.type="text/javascript";
_3d5.defer=true;
try{
_3d5.src=url;
if(lconn.core.bizCard.bizCardUtils.isDebug){
console.log("SemTagUtil.request: url: "+url);
}
}
catch(e){
if(lconn.core.bizCard.bizCardUtils.isDebug){
console.log("SemTagUtil.request: error:",e);
}
return false;
}
try{
var body=document.getElementsByTagName("body");
if(body[0]){
body[0].appendChild(_3d5);
}else{
if(lconn.core.bizCard.bizCardUtils.isDebug){
console.log("SemTagUtil.request: error getting body element to insert script:"+_3d5.id);
}
return false;
}
}
catch(e){
if(lconn.core.bizCard.bizCardUtils.isDebug){
console.log("SemTagUtil.request: error:",e);
}
return false;
}
if(lconn.core.bizCard.bizCardUtils.isDebug){
console.log("SemTagUtil.request: added script: "+_3d5.id);
}
if(_3d0){
var self=this;
_3c8[_3d3]=window.setTimeout(createTimeoutFunction(_3d3),_3d0);
}
};
this.cancelRequest=function(id){
if(lconn.core.bizCard.bizCardUtils.isDebug){
console.log("SemTagUtil.cancelRequest:  Request ["+id+"] took too long.  Cancelling request for id: "+_3c8[id]);
}
var _3d9=_3c6[id];
_3c6[id]=null;
var _3da=_3c7[id];
_3c7[id]=null;
if(_3d9!=null){
try{
if(_3d9){
_3d9(false,null,_3da);
}
this.removeScript(id);
}
catch(e){
if(lconn.core.bizCard.bizCardUtils.isDebug){
console.log("SemTagUtil.cancelRequest: Exception Caught: "+e);
}
}
}else{
if(lconn.core.bizCard.bizCardUtils.isDebug){
console.log("SemTagUtil.cancelRequest: no callback for : "+id);
}
}
};
this.removeScript=function(id){
if(lconn.core.bizCard.bizCardUtils.isDebug){
console.log("SemTagUtil.removeScript: removing script element for: "+id);
}
if(id){
var _3dc=this.getScriptObject(id);
if(_3dc!=null){
var body=document.getElementsByTagName("body");
body[0].removeChild(_3dc);
if(lconn.core.bizCard.bizCardUtils.isDebug){
console.log("SemTagUtil.removeScript: removed script for id: "+id);
}
}else{
if(lconn.core.bizCard.bizCardUtils.isDebug){
console.log("SemTagUtil.removeScript: script is null for id: "+id);
}
}
}else{
if(lconn.core.bizCard.bizCardUtils.isDebug){
console.log("SemTagUtil.removeScript: id is null");
}
}
};
this.dispatch=function(id,data){
if(lconn.core.bizCard.bizCardUtils.isDebug){
console.log("SemTagUtil.dispatch: id: "+id);
}
if(id!=null){
id=id.toLowerCase();
}
try{
if(id!=null&&typeof (_3c8[id])!="undefined"&&_3c8[id]!=null){
if(lconn.core.bizCard.bizCardUtils.isDebug){
console.log("request dispatched. removing timeout for id ["+id+"]  timeout id: "+_3c8[id]);
}
window.clearTimeout(_3c8[id]);
}
var _3e0=_3c6[id];
var _3e1=_3c7[id];
_3c7[id]=null;
if(_3e0!=null){
_3c6[id]=null;
_3e0(true,data,_3e1);
window.setTimeout(function(){
self.removeScript(id);
},1000);
}else{
if(lconn.core.bizCard.bizCardUtils.isDebug){
console.log("SemTagUtil.dispatch: callback is null for id: "+id);
}
}
}
catch(e){
console.log("SemTagUtil.dispatch: Exception Caught: ");
console.log(e);
}
};
}};
}
if(!dojo._hasResource["lconn.communities.bizCard.bizCard"]){
dojo._hasResource["lconn.communities.bizCard.bizCard"]=true;
dojo.provide("lconn.communities.bizCard.bizCard");
lconn.communities.bizCard.bizCard={servletUrl:null,requestor:null,initited:false,init:function(){
this.servletUrl=lconn.core.bizCard.bizCardUtils.getBaseURL("hgroup")+"/service/json/communityview?communityUuid=@@@UUID@@@";
if(this.initited==false){
this.requestor=new SemTagUtil.crossDomainRequest();
this.initited=true;
}
},getIdMethod:function(_3e2){
return _3e2.uuid?_3e2.uuid:null;
},convMethod:function(_3e3){
return _3e3;
},customTrim:function(_3e4){
return _3e4.replace(/^\s+/,"").replace(/\s+$/,"");
},processTag:function(_3e5){
try{
if(!this.initited){
lconn.core.bizCard.bizCardUtils.init();
SemTagMenu.init();
this.init();
}
this.processHcard(_3e5);
}
catch(e){
console.log(e);
}
},processHcard:function(_3e6){
var _3e7=this.getNameElement(_3e6);
if(!_3e7){
return;
}
if(this.isInline(_3e6)){
var _3e8={"target":_3e7};
this.getTagFromServer(_3e8);
}else{
lconn.core.bizCard.bizCardUtils.addHover(_3e7,lconn.communities.bizCard.bizCard.showHover,lconn.communities.bizCard.bizCard.showMenu);
}
},isInline:function(_3e9){
return this.getHcardAttributeValue("X-community-display-inline",_3e9);
},loadHcardCommunity:function(_3ea){
var _3eb=new Object();
var _3ec=lconn.core.bizCard.bizCardUtils.getParentByClassName("vcomm",_3ea);
var _3ed=_3ec.getElementsByTagName("*");
for(i=0;i<_3ed.length;i++){
var _3ee=_3ed[i];
if(_3ee.className){
var _3ef=_3ee.className.split(" ");
for(j=0;j<_3ef.length;j++){
var c=_3ef[j];
var attr=this.getHcardAttributeValue(c,_3ec);
if(attr){
_3eb[c]=attr;
}
}
}
}
return _3eb;
},getHcardAttributeValue:function(_3f2,_3f3){
switch(_3f2){
case ("name"):
return this.getHcardTypedAttribute(_3f3,_3f2,"name");
case ("uuid"):
return this.getHcardTypedAttribute(_3f3,_3f2,"uuid");
case ("selectedWidgetId"):
return this.getHcardTypedAttribute(_3f3,_3f2,"selectedWidgetId");
}
var _3f4=lconn.core.bizCard.bizCardUtils.getParentByClassName("vcomm",_3f3);
var _3f5=lconn.core.bizCard.bizCardUtils.getElementsByClassName(_3f2,_3f4,1);
if(_3f5.length>0&&_3f5[0].tagName.match(/^abbr$/i)){
return _3f5[0].getAttribute("title");
}
switch(_3f2){
case ("uuid"):
var uuid=lconn.core.bizCard.bizCardUtils.getSinglePropertyValue(_3f5[0]);
if(uuid){
return uuid;
}else{
return this.getHcardAttributeValue("name",_3f3);
}
break;
case ("name"):
var name=lconn.core.bizCard.bizCardUtils.getSinglePropertyValue(_3f5[0]);
if(name){
return name;
}
break;
case ("selectedWidgetId"):
var _3f8=lconn.core.bizCard.bizCardUtils.getSinglePropertyValue(_3f5[0]);
if(_3f8){
return _3f8;
}
break;
case ("X-community-display-inline"):
if(_3f5.length>0){
return true;
}else{
return false;
}
default:
return lconn.core.bizCard.bizCardUtils.getSinglePropertyValue(_3f5[0]);
break;
}
},getHcardTypedAttribute:function(_3f9,_3fa,_3fb){
var _3fc=new Object();
var _3fd=lconn.core.bizCard.bizCardUtils.getParentByClassName("vcomm",_3f9);
var _3fe=lconn.core.bizCard.bizCardUtils.getElementsByClassName(_3fa,_3fd);
for(i=0;i<_3fe.length;i++){
var _3ff=_3fe[i];
_3fc=lconn.core.bizCard.bizCardUtils.getTypedValue(_3ff,_3fb);
}
return _3fc;
},showHover:function(_400){
try{
lconn.core.bizCard.bizCardUtils.showHover(_400,lconn.communities.bizCard.bizCard.showMenu);
}
catch(e){
console.log("Error in lconn.communities.bizCard.bizCard.showHover");
console.log(e);
}
},showMenu:function(_401){
SemTagMenu.waitCursor();
lconn.communities.bizCard.bizCard.getTagFromServer(_401);
},getTagFromServer:function(_402){
var _403=null;
var _404=null;
if(_402!=null&&_402.target!=null&&_402.target.className=="name"){
_403=_402.target;
_404=_402;
SemTagMenu.currentElem=_403;
}else{
_403=SemTagMenu.currentElem;
_404={target:_403,original:_402};
if(_403==null&&_402!=null){
_404=_402;
_403=_402.target;
}
}
var _405=this.customTrim(this.getElementUuid(_403));
var _406={"UUID":_405};
var _407="lconn.communities.bizCard.bizCard.dispatch";
var _408=_405;
if(lconn.core.bizCard.bizCardUtils.isDebug){
window.status="Community.getTagFromServer sending request for: "+_405+")";
}
lconn.core.bizCard.bizCardUtils.getBizCardData(this.servletUrl+"&preventCache="+new Date().getTime(),_406,_407,this.requestor,this.requestReturn,_404,_408);
},requestReturn:function(_409,_40a,_40b){
if(lconn.core.bizCard.bizCardUtils.isDebug){
window.status="Community.requestReturn: success="+_409;
}
var _40c=_409?lconn.communities.bizCard.bizCard.convMethod(_40a):{};
var _40d=lconn.core.bizCard.bizCardUtils.getLiveElementFromEvent(_40b);
lconn.communities.bizCard.bizCard.fillCommunityJsonMoreFromDom(_40c,_40d);
lconn.communities.bizCard.bizCard.update(_40c,_40d,_40b);
},fillCommunityJsonMoreFromDom:function(_40e,_40f){
if(lconn.core.bizCard.bizCardUtils.isDebug){
window.status="Community.fillCommunityJsonMoreFromDom";
}
if(!_40e.name){
var _410=lconn.core.bizCard.bizCardUtils.findNameElementInHcard(_40f);
if(_410){
_40e.name=lconn.core.bizCard.bizCardUtils.getTextValue(_410);
}
}
if(!_40e.uuid){
var uuid=this.getElementUuid(_40f);
_40e.uuid=uuid;
}
},update:function(_412,_413,_414){
if(lconn.core.bizCard.bizCardUtils.isDebug){
window.status="Community.update";
}
this.currentCommunity=_412;
var _415=lconn.core.bizCard.bizCardUtils.getParentByClassName("vcomm",_413);
if(this.isInline(_415)){
var out=new lconn.core.bizCard.bizCardUtils.out();
var _417=this.getHcardAttributeValue("selectedWidgetId",_415).selectedWidgetId;
lconn.communities.bizCard.bizCardUI.getInlineMarkup(_412,"ltr",out,_417);
var prev=lconn.core.bizCard.bizCardUtils.getElementsByClassName("personinlinemenu",_415,1);
if(prev.length>0){
prev[0].innerHTML=out.buffer;
}else{
var span=document.createElement("span");
span.className="personinlinemenu";
span.innerHTML=out.buffer;
_415.appendChild(span);
}
}else{
var _41a=new Array();
var _41b="personMenuActions";
var _41c=new lconn.core.bizCard.bizCardUtils.out();
var _41d=new lconn.core.bizCard.bizCardUtils.out();
lconn.communities.bizCard.bizCardUI.getMenuData(_412,"ltr",_41a,_41b,_41c,_41d);
lconn.core.bizCard.bizCardUtils.setMenuData(_414,_41a,_41b,lconn.core.bizCard.bizCardUtils.getMenuHeaderJson(_41c.buffer,-100));
}
},dispatch:function(data){
var _41f=this.getIdMethod(data);
this.requestor.dispatch(_41f,data);
},getElementUuid:function(elem){
var uuid;
var _422=lconn.core.bizCard.bizCardUtils.getParentByClassName("vcomm",elem);
if(_422!=null){
uuid=this.getHcardAttributeValue("uuid",_422);
uuid=uuid.uuid;
}
return uuid;
},getNameElement:function(elem){
if(elem.className!="vcomm"){
elem=lconn.core.bizCard.bizCardUtils.getParentByClassName("vcomm",elem);
}
var _424=lconn.core.bizCard.bizCardUtils.getElementsByClassName("name",elem,1)[0];
return _424;
}};
}
if(!dojo._hasResource["lconn.communities.bizCard.bizCardUI"]){
dojo._hasResource["lconn.communities.bizCard.bizCardUI"]=true;
var showLinks=(dojo.cookie("community.inline.card.links")==1);
dojo.provide("lconn.communities.bizCard.bizCardUI");
lconn.communities.bizCard.bizCardUI={getMenuData:function(_425,bidi,_427,_428,_429,_42a){
var _42b=dojo.i18n.getLocalization("lc_default")["label.overview"];
if(_42b==null){
_42b=dojo.i18n.getLocalization("lc_default")["label.navigation.overview.heading"];
}
var _42c="";
if(lconn.core.bizCard.bizCardUtils.standaloneCSSloaded){
_42c=" lotusui";
}
_429.write("<div id='container' "+_42c+" style='width: 32em; height:12em;border: 1px solid #e0e0e0; -moz-border-radius:7px;background-color:#F5F8FF;padding:10px 0px 8px 10px;'>");
_429.write("  <div id='navigationLinks' style='clear:left; border-bottom:1px solid #e0e0e0;padding: 0px 0pt 5px 0px;margin:0;'>");
_429.write("      <a href='"+_425.homeUrl+"' title=\""+_42b+"\" class='action'>"+_42b+"</a>");
this.writeLinksforPopupCard(_429,_425);
_429.write("  </div><br/>");
if(_425.imageUrl!=null&&_425.imageUrl!=""){
_429.write("  <img src='"+_425.imageUrl+"' alt=\""+_425.name+"\" title=\""+_425.name+"\" height='95' width='95' style='float:left;margin: 0px 10px 10px 10px; padding:2px !important; border:1px solid #c2c2c2;background-color:#fff;'/>");
}
_429.write("  <div  style='height:9em;overflow:hidden;'>");
_429.write("  <h2 style='font-size:1.1em;margin:0;margin-right:20px;padding:0;'>"+_425.name+"<span id='membersCount' style='font-size:.9em;color:#999;font-weight:normal;'> ("+_425.membercount+" "+dojo.i18n.getLocalization("lc_default")["label.members.lowercase"]+")</span></h2>");
if(_425.tags!=null&&_425.tags!=""){
_429.write("  <div style='font-size:.9em;color:#999;padding:0;margin:0;'>"+dojo.i18n.getLocalization("lc_default")["label.tags"]+" "+_425.tags+"</div>");
}
if(_425.description!=null&&_425.description!=""){
_429.write("  <p id='communityDescription' style='font-size:.9em;padding:3px 5px 0 0;margin:0;'>");
_429.write("      "+_425.description);
_429.write("  </p>                        ");
}
_429.write("  </div>                      ");
_429.write("</div><!-- end container -->");
},getInlineMarkup:function(comm,bidi,_42f,_430){
var _431=_42f;
var _432=(dojo.cookie("community.inline.card.links")!=0);
var _433="lotusTwistyOpen";
if(_432){
_433="lotusTwistyOpen";
}else{
_433="lotusTwistyClosed";
}
var _434="";
if(lconn.core.bizCard.bizCardUtils.standaloneCSSloaded){
_434="lotusui";
}
_431.write("<div class=\"lotusMenu "+_434+"\">");
_431.write("<div class=\"lotusBottomCorner  lotusInlineMenu\">");
_431.write("<div class=\"lotusInner\">");
_431.write("<div class=\" lotusCenter lotusInlinePhoto\"><a href=\""+comm.homeUrl+"\"><img src=\""+comm.imageUrl+"\" width=\"155\" height=\"155\" alt=\""+comm.name+"\" /></a></div>");
_431.write("<div class=\"lotusLeft\"><a id=\""+comm.uuid+"_twisty\" class=\"lotusSprite lotusArrow "+_433+"\" href=\"javascript:lconn.communities.bizCard.bizCardUI.toggleSection('"+comm.uuid+"');\"></a></div>");
_431.write("<h2><a href=\""+comm.homeUrl+"\">"+comm.name+"</a></h2>");
_431.write("<div class=\"lotusMenuSeparator\"></div>");
this.writeLinks(_431,comm,_430,_432);
_431.write("</div>");
_431.write("</div>");
_431.write("</div>");
},writeLinksforPopupCard:function(_435,_436){
for(var i=0;_436.links!=null&&i<_436.links.length;i++){
_435.write("&nbsp;&nbsp;|&nbsp;<a href='"+_436.links[i].url+"' title='"+_436.links[i].label+"' class='action'>"+_436.links[i].label+"</a>");
}
},toggleSection:function(_438){
var _439=dojo.byId(_438+"_twisty");
var _43a=dojo.byId(_438+"_comm_appLinks");
if(_43a.style.display=="none"){
dojo.fx.wipeIn({node:_43a,duration:300}).play();
dojo.removeClass(_439,"lotusTwistyClosed");
dojo.addClass(_439,"lotusTwistyOpen");
dojo.cookie("community.inline.card.links",1);
}else{
dojo.fx.wipeOut({node:_43a,duration:300}).play();
dojo.removeClass(_439,"lotusTwistyOpen");
dojo.addClass(_439,"lotusTwistyClosed");
dojo.cookie("community.inline.card.links",0);
}
},writeLinks:function(_43b,_43c,_43d,_43e){
var _43f=dojo.i18n.getLocalization("lc_default")["label.overview"];
if(_43f==null){
_43f=dojo.i18n.getLocalization("lc_default")["label.navigation.overview.heading"];
}
if(_43e){
_43b.write("<ul id=\""+_43c.uuid+"_comm_appLinks\">");
}else{
_43b.write("<ul id=\""+_43c.uuid+"_comm_appLinks\" style=\"display: none\">");
}
_43b.write("<li>"+"<a href='"+_43c.homeUrl+"' title=\""+_43f+"\" class='action'>"+_43f+"</a>"+"</li>");
for(var i=0;_43c.links!=null&&i<_43c.links.length;i++){
_43b.write("<li id=\""+_43c.links[i].id+"navItem\"");
if(_43d==_43c.links[i].id){
_43b.write(" class=\"lotusSelected\" ");
}
_43b.write("><a href=\""+_43c.links[i].url+"\" title=\""+_43c.links[i].label+"\" class=\"action\">"+_43c.links[i].label+"</a></li>");
}
_43b.write("</ul>");
return;
}};
}
if(!dojo._hasResource["lconn.core.i18nOverrider"]){
dojo._hasResource["lconn.core.i18nOverrider"]=true;
dojo.provide("lconn.core.i18nOverrider");
if(lconn.core.i18nOverrider.originalFunction==null){
lconn.core.i18nOverrider.originalFunction=dojo.i18n.getLocalization;
}
dojo.i18n.getLocalization=function(_441,_442,_443){
if(_441=="dijit"||_441=="dojo"){
return lconn.core.i18nOverrider.originalFunction(_441,_442,_443);
}
var _444=_442;
if(window[_441]!=null){
var _445=window[_441];
if(_445!=null&&_445!="undefined"){
return _445;
}else{
return lconn.core.i18nOverrider.originalFunction(_441,_442,_443);
}
}else{
return lconn.core.i18nOverrider.originalFunction(_441,_442,_443);
}
};
lconn.core.i18nOverrider.getResourceString=function(_446){
return dojo.i18n.getLocalization("lc_default",_446);
};
lconn.core.i18nOverrider.loadResourceStringsInParams=function(_447,_448){
if(_447==null){
_447=new Array;
}
for(var i=0;_448!=null&&i<_448.length;i++){
var _44a=dojo.i18n.getLocalization("default",_448[i]);
var _44b=_44a.replace(/\'\'/g,"'");
if(_44b==null||_44b==""){
_447.push([_448[i],_448[i]+" resourceKey not found"]);
}else{
_447.push([_448[i],_44b]);
}
}
return _447;
};
lconn.core.i18nOverrider.replaceParams=function(_44c,_44d){
var _44e=_44c.indexOf("{");
if(_44e!=-1){
var _44f=_44c.indexOf("}");
if(_44f==-1){
return _44c;
}
var _450=_44c.substring(_44e+1,_44f);
var _451=_44d[_450];
return _44c.substring(0,_44e)+_451+lconn.core.i18nOverrider.replaceParams(_44c.substring(_44f+1),_44d);
}else{
return _44c;
}
};
}
if(!dojo._hasResource["lconn.core.utilities"]){
dojo._hasResource["lconn.core.utilities"]=true;
dojo.provide("lconn.core.utilities");
lconn.core.utilities.getURLParam=function(_452){
var _453=decodeURIComponent(window.location);
if(_453.indexOf(_452)==-1){
return null;
}else{
var _454=_453.substring(_453.indexOf(_452+"=")+_452.length+1);
var _455=_454.indexOf("&");
if(_455!=-1){
_454=_454.substring(0,_455);
}
return _454;
}
};
lconn.core.utilities.replacePlaceHolders=function(_456,_457){
var _458=new Object();
for(var i=0;_457!=null&&i<_457.length;i++){
_458["{"+i+"}"]=_457[i];
}
return lconn.core.i18nOverrider.replaceParams(_456,_458);
};
lconn.core.utilities.processUntilElementIsFound=function(_45a,_45b,_45c,_45d){
var _45e="";
var _45f=0;
_45e=window.setInterval(function(){
var _460=null;
if(_45c!=null){
_460=_45c.getElementById(_45a);
}else{
_460=dojo.byId(_45a);
}
_45f++;
if(_460!=null){
window.clearInterval(_45e);
_45b(_460,_45d);
}else{
if(_45f==20){
window.clearInterval(_45e);
}
}
},500);
};
lconn.core.utilities.processUntilAvailable=function(_461,test,_463){
var _464="";
var _465=0;
_464=window.setInterval(function(){
_465++;
if(eval(test)){
window.clearInterval(_464);
if(_463!=null){
_461(_463);
}else{
_461();
}
}else{
if(_465==20){
window.clearInterval(_464);
}
}
},500);
};
lconn.core.utilities.gotoURL=function(url,_467){
if(_467==null){
if(url.indexOf("?")!=-1){
url+="&ver="+profilesData.config.buildNumber+"&lastMod="+profilesData.config.profileLastMod;
}else{
url+="?ver="+profilesData.config.buildNumber+"&lastMod="+profilesData.config.profileLastMod;
}
}
if(dojo.isIE){
var _468=url;
setTimeout("window.location.href = SideBar_RedirectUrl",0);
}else{
window.location.assign(url);
}
};
lconn.core.utilities.toggleVisibility=function(_469,_46a){
var _46b=null;
if((typeof _469)=="string"){
_46b=dojo.byId(_469);
}else{
_46b=_469;
}
if(_46b){
if(_46b.style.visibility=="hidden"){
lconn.core.utilities.show(_46b,_46a);
}else{
lconn.core.utilities.hide(_46b,_46a);
}
}
return false;
};
lconn.core.utilities.hide=function(_46c,_46d,nofx,_46f){
var _470=null;
if((typeof _46c)=="string"){
_470=dojo.byId(_46c);
}else{
_470=_46c;
}
if(_470!=null){
var _471=function(){
_470.style.visibility="hidden";
if(!_46d){
_470.style.display="none";
}
if(_46f!=null){
_46f();
}
};
if(nofx==null||nofx==false){
var _472=dojo.fx.wipeOut({node:_470,duration:300,onEnd:_471});
_472.play();
}else{
_471();
}
}
return false;
};
lconn.core.utilities.show=function(_473,_474,_475,nofx,_477){
var _478=0;
var _479=null;
if((typeof _473)=="string"){
_479=dojo.byId(_473);
}else{
_479=_473;
}
if(_475&&_479==null){
var _47a="";
_47a=window.setInterval(function(){
_478++;
if((typeof _473)=="string"){
_479=dojo.byId(_473);
}else{
_479=_473;
}
if(_479!=null){
window.clearInterval(_47a);
lconn.core.utilities.show(_479,_474,false,nofx,_477);
}else{
if(_478==20){
window.clearInterval(_47a);
}
}
},300);
}else{
if(_479!=null){
var _47b=function(){
_479.style.visibility="visible";
if(!_474){
_479.style.display="block";
}
if(_477!=null){
_477();
}
};
if(nofx==null||nofx==false){
var _47c=dojo.fx.wipeIn({node:_479,duration:300});
_47c.play();
}else{
_47b();
}
}
}
return false;
};
}
if(!dojo._hasResource["lconn.profiles.bizCard.bizCard"]){
dojo._hasResource["lconn.profiles.bizCard.bizCard"]=true;
dojo.provide("lconn.profiles.bizCard.bizCard");
if(!window.SemTagPerson){
window.SemTagPerson={services:[]};
}
lconn.profiles.bizCard.bizCard={applicationContext:null,servletUrlByUserId:null,servletUrlByEmail:null,requestor:null,services:[],initited:false,init:function(){
if(this.initited==false){
this.applicationContext=lconn.core.bizCard.bizCardUtils.getBaseURL("hcard");
this.servletUrlByUserId2=lconn.core.bizCard.bizCardUtils.getBaseURL("hcard")+"/json/profile.do?userid=@@@USERID@@@&lang=@@@LANG@@@";
this.servletUrlByEmail2=lconn.core.bizCard.bizCardUtils.getBaseURL("hcard")+"/json/profile.do?email=@@@EMAIL@@@&lang=@@@LANG@@@";
this.servletUrlByUserId=lconn.core.bizCard.bizCardUtils.getBaseURL("hcard")+"/json/profile.do?userid=@@@USERID@@@&callback=lconn.profiles.bizCard.bizCard.dispatchByUserId&lang=@@@LANG@@@";
this.servletUrlByEmail=lconn.core.bizCard.bizCardUtils.getBaseURL("hcard")+"/json/profile.do?email=@@@EMAIL@@@&callback=lconn.profiles.bizCard.bizCard.dispatchByEmail&lang=@@@LANG@@@";
this.requestor=new SemTagUtil.crossDomainRequest();
if(window.generalrs==null){
lconn.core.bizCard.bizCardUtils.loadScript(lconn.core.bizCard.bizCardUtils.getBaseURL("hcard")+"/resources/js-resources.js");
}
this.initited=true;
}
},getIdMethod:function(_47d){
return (_47d.email&&_47d.email.internet)?_47d.email.internet:null;
},convMethod:function(_47e){
return _47e;
},dispatchByEmail:function(data){
if(lconn.core.bizCard.bizCardUtils.isDebug){
console.log("lconn.profiles.bizCard.bizCard.dispatchByEmail: data: "+data);
}
var _480=(data.email&&data.email.internet)?data.email.internet:null;
this.dispatch(_480,data);
},dispatchByUserId:function(data){
if(lconn.core.bizCard.bizCardUtils.isDebug){
console.log("lconn.profiles.bizCard.bizCard.dispatchByUserId: data: "+data);
}
var _482=data.X_lconn_userid?data.X_lconn_userid:null;
this.dispatch(_482,data);
},dispatchByConfig:function(data){
if(lconn.core.bizCard.bizCardUtils.isDebug){
console.log("lconn.profiles.bizCard.bizCard.dispatchByConfig: data: "+data);
}
this.dispatch("configDataId",data);
},dispatch:function(id,data){
if(lconn.core.bizCard.bizCardUtils.isDebug){
console.log("lconn.profiles.bizCard.bizCard.dispatch: id:"+id+"  data: "+data);
}
this.requestor.dispatch(id,data);
},processTag:function(_486){
try{
if(!this.initited){
lconn.core.bizCard.bizCardUtils.init();
SemTagMenu.init();
this.init();
}
this.processHcard(_486);
}
catch(e){
console.log(e);
}
},processHcard:function(_487){
var _488=this.getNameElement(_487);
if(!_488){
return;
}
if(this.isInline(_487)){
var _489={"target":_488};
this.getTagFromServer(_489);
}else{
lconn.core.bizCard.bizCardUtils.addHover(_488,this.showHover,this.showMenu,this.keystrokeHandler);
}
},isInline:function(_48a){
return this.getHcardAttributeValue("X-person-display-inline",_48a);
},loadHcardPerson:function(_48b){
var _48c=new Object();
var _48d=lconn.core.bizCard.bizCardUtils.getParentByClassName("vcard",_48b);
var _48e=_48d.getElementsByTagName("*");
for(i=0;i<_48e.length;i++){
var _48f=_48e[i];
if(_48f.className){
var _490=_48f.className.split(" ");
for(j=0;j<_490.length;j++){
var c=_490[j];
var attr=this.getHcardAttributeValue(c,_48d);
if(attr){
_48c[c]=attr;
}
}
}
}
return _48c;
},getHcardAttributeValue:function(_493,_494){
switch(_493){
case ("email"):
return this.getHcardTypedAttribute(_494,_493,"internet");
case ("tel"):
return this.getHcardTypedAttribute(_494,_493,"voice");
case ("adr"):
return this.getHcardTypedAttribute(_494,_493,"intl");
}
var _495=lconn.core.bizCard.bizCardUtils.getParentByClassName("vcard",_494);
var _496=lconn.core.bizCard.bizCardUtils.getElementsByClassName(_493,_495,1);
if(_496.length>0&&_496[0].tagName.match(/^abbr$/i)){
return _496[0].getAttribute("title");
}
switch(_493){
case ("fn"):
var fn=lconn.core.bizCard.bizCardUtils.getSinglePropertyValue(_496[0]);
if(fn){
return fn;
}else{
return this.getHcardAttributeValue("n",_494);
}
break;
case ("n"):
if(_496.length>0){
var _498=_496[0];
var _499="";
var _49a=["honorific-prefix","given-name","additional-name","family-name","honorific-suffix"];
for(i=0;i<5;i++){
var n=lconn.core.bizCard.bizCardUtils.getSinglePropertyValue(lconn.core.bizCard.bizCardUtils.getElementsByClassName(_49a[i],_498,1)[0]);
if(n){
_499+=n+" ";
}
}
return _499;
}
return "";
break;
case ("photo"):
var _49c=_496[0];
if(_49c){
return _49c.getAttribute("src");
}else{
return;
}
break;
case ("X-sametime-status"):
var _49d=_496[0];
if(!_49d){
return "";
}
var _49e=_49d.getAttribute("value");
if(_49e){
return _49e;
}else{
return lconn.core.bizCard.bizCardUtils.getSinglePropertyValue(_49d);
}
break;
case ("X-person-display-inline"):
if(_496.length>0){
return true;
}else{
return false;
}
case ("street-address"):
case ("post-office-box"):
case ("extended-address"):
case ("locality"):
case ("region"):
case ("postal-code"):
case ("country-name"):
case ("title"):
case ("role"):
case ("org"):
default:
return lconn.core.bizCard.bizCardUtils.getSinglePropertyValue(_496[0]);
break;
}
},getHcardTypedAttribute:function(_49f,_4a0,_4a1){
var _4a2=new Object();
var _4a3=lconn.core.bizCard.bizCardUtils.getParentByClassName("vcard",_49f);
var _4a4=lconn.core.bizCard.bizCardUtils.getElementsByClassName(_4a0,_4a3);
for(i=0;i<_4a4.length;i++){
var _4a5=_4a4[i];
if(_4a0=="email"&&_4a5.nodeName.toLowerCase()=="a"&&_4a5.href.match(/^mailto:/)){
var _4a6=_4a5.href.indexOf("?");
if(_4a6>-1){
_4a2[_4a1]=_4a5.href.slice(7,_4a6);
}else{
_4a2[_4a1]=_4a5.href.slice(7);
}
continue;
}
_4a2=lconn.core.bizCard.bizCardUtils.getTypedValue(_4a5,_4a1);
}
return _4a2;
},showHover:function(_4a7){
try{
lconn.core.bizCard.bizCardUtils.showHover(_4a7,lconn.profiles.bizCard.bizCard.showMenu);
}
catch(e){
console.log("Error in lconn.profiles.bizCard.bizCard.showHover");
console.log(e);
}
},showMenu:function(_4a8){
SemTagMenu.waitCursor();
lconn.profiles.bizCard.bizCard.getTagFromServer(_4a8);
},keystrokeHandler:function(_4a9){
if(_4a9.ctrlKey&&(_4a9.keyCode==13)){
if(_4a9.preventDefault){
_4a9.preventDefault();
}
lconn.profiles.bizCard.bizCard.showMenu(_4a9);
}
},getSearchType:function(_4aa){
indexOf.lconn.core.bizCard.bizCardUtils.getBaseURL("hcard");
},getTagFromServer:function(_4ab){
var _4ac=lconn.core.bizCard.bizCardUtils.getLiveElementFromEvent(_4ab);
var _4ad=lconn.core.bizCard.bizCardUtils.getLangParam();
var _4ae={"LANG":lconn.core.bizCard.bizCardUtils.getLangParam()};
var url=null;
var _4b0=null;
var _4b1=null;
var _4b2=this.getElementUserId(_4ac);
if(_4b2){
if(lconn.core.bizCard.bizCardUtils.isDebug){
console.log("Person.getTagFromServer sending request for user id: "+_4b2);
}
_4ae["USERID"]=_4b2;
_4b0=_4b2;
url=this.servletUrlByUserId2;
_4b1="lconn.profiles.bizCard.bizCard.dispatchByUserId";
}else{
var _4b3=this.getElementEmail(_4ac);
if(_4b3){
if(lconn.core.bizCard.bizCardUtils.isDebug){
console.log("Person.getTagFromServer sending request for email: "+_4b3);
}
_4ae["EMAIL"]=_4b3;
_4b0=_4b3;
url=this.servletUrlByEmail2;
_4b1="lconn.profiles.bizCard.bizCard.dispatchByEmail";
}
}
if(_4b0!=null){
lconn.core.bizCard.bizCardUtils.getBizCardData(url,_4ae,_4b1,this.requestor,this.requestReturn,_4ab,_4b0);
if(lconn.core.bizCard.bizCardUtils.isDebug){
console.log("Person.getTagFromServer sent");
}
}else{
this.noInformationProvided(_4ac,_4ab);
}
},noInformationProvided:function(_4b4,_4b5){
lconn.profiles.bizCard.bizCard.update(null,_4b4,_4b5);
},requestReturn:function(_4b6,_4b7,_4b8){
if(lconn.core.bizCard.bizCardUtils.isDebug){
console.log("Person.requestReturn: success="+_4b6);
}
var _4b9=lconn.core.bizCard.bizCardUtils.getLiveElementFromEvent(_4b8);
var _4b7=_4b6?lconn.profiles.bizCard.bizCard.convMethod.call(null,_4b7):{};
lconn.profiles.bizCard.bizCard.fillPersonJsonMoreFromDom(_4b7,_4b9);
lconn.profiles.bizCard.bizCard.update(_4b7,_4b9,_4b8);
},fillPersonJsonMoreFromDom:function(_4ba,_4bb){
if(lconn.core.bizCard.bizCardUtils.isDebug){
console.log("Person.fillPersonJsonMoreFromDom");
}
if(!_4ba.photo){
_4ba.photo=lconn.core.bizCard.bizCardUtils.baseUrl+"/images/profileNoPhoto.gif";
}
if(!_4ba.fn){
var _4bc=lconn.core.bizCard.bizCardUtils.findNameElementInHcard(_4bb);
if(_4bc){
_4ba.fn=lconn.core.bizCard.bizCardUtils.getTextValue(_4bc);
}
}
if(!_4ba.email||!_4ba.email.internet){
var _4bd=this.getElementEmail(_4bb);
_4ba.email={"internet":_4bd};
}
if(!_4ba.tel||!_4ba.tel.voice){
var _4be=lconn.core.bizCard.bizCardUtils.findElementByNameInHcard(_4bb,"tel");
if(_4be){
var tels=lconn.core.bizCard.bizCardUtils.getTypedValue(_4be,"voice");
_4ba.tel={"voice":tels["voice"]};
}
}
var _4c0=lconn.core.bizCard.bizCardUtils.findElementByNameInHcard(_4bb,"adr");
var _4c1={};
if(_4c0){
_4c1=SemTagAddr.getAddressJson(_4c0);
_4ba.adr=_4c1;
}
},update:function(_4c2,_4c3,_4c4){
if(lconn.core.bizCard.bizCardUtils.isDebug){
console.log("Person.update");
}
this.currentPerson=_4c2;
var _4c5=lconn.core.bizCard.bizCardUtils.getParentByClassName("vcard",_4c3);
if(this.isInline(_4c5)){
var out=new lconn.core.bizCard.bizCardUtils.out();
lconn.profiles.bizCard.bizCardUI.getInlineMarkup(_4c2,"ltr",out);
var span=document.createElement("span");
span.innerHTML=out.buffer;
_4c5.appendChild(span);
var _4c8=(dojo.cookie("card.inline.expanded")?false:true);
}else{
var _4c9=new Array();
var _4ca="personMenuActions";
var _4cb=new lconn.core.bizCard.bizCardUtils.out();
var _4cc=new lconn.core.bizCard.bizCardUtils.out();
lconn.profiles.bizCard.bizCardUI.getMenuData(_4c2,"ltr",_4c9,_4ca,_4cb,_4cc);
lconn.core.bizCard.bizCardUtils.setMenuData(_4c4,_4c9,_4ca,lconn.core.bizCard.bizCardUtils.getMenuHeaderJson(_4cb.buffer,-100));
}
if(_4c2!=null){
if(_4c2.X_bizCardSTAwareness){
this.invokeSametimeAwareness(_4c2);
}
}
},invokeSametimeAwareness:function(_4cd){
if(this.attemptedToLoadSametime==null&&window.Status==null){
var _4ce="http://localhost:59449/stwebapi/";
lconn.core.bizCard.bizCardUtils.loadScript(_4ce+"getStatusNonDojo.js");
lconn.core.bizCard.bizCardUtils.loadCss(lconn.core.bizCard.bizCardUtils.getBaseURL("hcard")+"/css/sametime/main.css");
this.attemptedToLoadSametime=true;
}
lconn.core.utilities.processUntilAvailable(this.invokeSametimeAwarenessForPerson,"window.Status != null",_4cd);
},invokeSametimeAwarenessForPerson:function(_4cf){
var _4d0="http://localhost:59449/stwebapi/";
var url=_4d0+"getstatus/";
url+=_4cf.email.internet+"?jsonp=lconn.profiles.bizCard.bizCard.sametimeCallBack&time="+new Date().getTime();
lconn.core.bizCard.bizCardUtils.loadScript(url);
},sametimeCallBack:function(_4d2){
if(_4d2.error!=null){
}else{
var _4d3=document.getElementById(_4d2.username+"vcardNameElem");
if(_4d3!=null&&typeof (Status)!="undefined"){
_4d3.className+=" awareness "+Status.getStyleForStatus(_4d2.status);
_4d3.setAttribute("userId",_4d2.username);
_4d3.onclick=function(){
var _4d4=this.getAttribute("userId");
sametime_invoke("chat",_4d4);
};
}
if(dojo.byId(_4d2.username+"ChatAction")!=null){
dojo.byId(_4d2.username+"ChatAction").style.display="inline";
}
if(dojo.byId(_4d2.username+"ChatActionMore")!=null){
dojo.byId(_4d2.username+"ChatActionMore").style.display="inline";
}
if(dojo.byId(_4d2.username+"CallActionMore")){
dojo.byId(_4d2.username+"CallActionMore").style.display="inline";
}
if(dojo.byId(_4d2.username+"vcardCommentElem")!=null){
if(_4d2.statusMessage!=null&&_4d2.statusMessage!=""){
dojo.byId(_4d2.username+"vcardCommentElem").style.display="block";
dojo.byId(_4d2.username+"vcardStStatusElem").innerHTML=_4d2.statusMessage;
}
}
}
},sametimeStart:function(_4d5,_4d6){
sametime_invoke(_4d5,_4d6);
},getElementEmail:function(elem){
var _4d8;
var _4d9=lconn.core.bizCard.bizCardUtils.getParentByClassName("vcard",elem);
if(_4d9){
_4d8=this.getHcardAttributeValue("email",_4d9);
_4d8=_4d8.internet;
}else{
if(elem.nodeName.toLowerCase()=="a"&&elem.href.match(/^mailto:/)){
_4d8=elem.href.replace(/^mailto:/,"");
}
}
return _4d8;
},getElementUserId:function(elem){
var _4db="";
var _4dc=lconn.core.bizCard.bizCardUtils.getParentByClassName("vcard",elem);
if(_4dc){
_4db=this.getHcardAttributeValue("x-lconn-userid",_4dc);
}
return _4db;
},getNameElement:function(elem){
if(elem.className!="vcard"){
elem=lconn.core.bizCard.bizCardUtils.getParentByClassName("vcard",elem);
}
var _4de=lconn.core.bizCard.bizCardUtils.getElementsByClassName("fn",elem,1)[0];
if(!_4de){
_4de=lconn.core.bizCard.bizCardUtils.getElementsByClassName("n",elem,1)[0];
}
return _4de;
},requestReturnMiniBizCard:function(_4df,_4e0,_4e1,_4e2){
var _4e0=_4df?lconn.profiles.bizCard.bizCard.convMethod.call(null,_4e0):{};
var _4e3=new lconn.core.bizCard.bizCardUtils.out();
lconn.profiles.bizCard.bizCardUI.getMenuData(_4e0,null,null,null,_4e3,null,true,(_4e2?true:false));
if(_4e1.target!=null){
_4e1.target.innerHTML=_4e3.buffer;
}else{
if(_4e1.callbackfn!=null){
_4e1.callbackfn(_4e3.buffer);
}
}
},renderMiniBizCard:function(_4e4,_4e5,_4e6){
this.init();
var _4e7={"target":_4e6,"callbackfn":_4e5};
var src=this.servletUrlByUserId.replace(/@@@USERID@@@/,_4e4);
this.requestor.request(src,10000,this.requestReturnMiniBizCard,_4e7,_4e4);
}};
}
if(!dojo._hasResource["lconn.profiles.bizCard.bizCardUI"]){
dojo._hasResource["lconn.profiles.bizCard.bizCardUI"]=true;
dojo.provide("lconn.profiles.bizCard.bizCardUI");
lconn.profiles.bizCard.bizCardUI={isDebug:false,isSlim:false,isExpandable:true,isEmailEnabled:true,getMenuData:function(_4e9,bidi,_4eb,_4ec,_4ed,_4ee,_4ef,_4f0){
var _4f1=dojo.cookie("card.popup.slim");
if(typeof (_4ef)!="undefined"&&_4ef!=null){
this.isSlim=_4ef;
}else{
if(_4f1!=null){
this.isSlim=(_4f1==1);
}
}
if(typeof (_4f0)!="undefined"){
this.isExpandable=_4f0;
}
if(_4e9!=null){
this.isEmailEnabled=(_4e9.email!=null&&_4e9.email.internet!=null);
}else{
this.isEmailEnabled=false;
}
if(this.isDebug){
SemTagSvc.debug("slim? "+this.isSlim);
SemTagSvc.debug("expandable? "+this.isExpandable);
SemTagSvc.debug("email? "+this.isEmailEnabled);
}
var _4f2=lconn.core.bizCard.bizCardUtils.getBaseURL("hcard");
_4ed.write("<div class=\"lotusui\">");
_4ed.write("<div id=\"cardDiv\" class=\"lotusVCard\" style=\"margin: 10px; position: static; opacity: 1;\">");
_4ed.write("<a id=\"A11Yblank\" href=\"javascript:void(0);\" ><img src=\""+_4f2+"/nav/common/styles/images/blank.gif\" alt=\"\" /></a>");
_4ed.write("<table id=\"cardTable\" class=\"lotusContainer\" cellspacing=\"0\">");
_4ed.write("<tbody>");
_4ed.write("<tr id=\"cardHeader\" "+((this.isSlim)?"style=\"display:none\"":"")+">"+"<td>"+"<table cellspacing=\"0\" width=\"100%\">");
if(_4e9!=null){
this.writeHeaderUIContent(_4ed,_4e9,false);
}
_4ed.write("</table>"+"</td></tr>");
_4ed.write("<tr id=\"cardBody\">");
_4ed.write("<td class=\"lotusDetails\" colspan=\"6\">");
this.writeBodyUIContent(_4e9,bidi,_4eb,_4ec,_4ed,_4ee,_4f2);
_4ed.write("</td>");
_4ed.write("</tr>");
if(_4e9!=null){
this.writeFooterUIContent(_4e9,bidi,_4eb,_4ec,_4ed,_4ee,_4f2);
}
_4ed.write("</tbody></table></div></div>");
},writeHeaderUIContent:function(_4f3,_4f4,_4f5){
this.writeLinks(_4f3,_4f4,_4f5);
},writeBodyUIContent:function(_4f6,bidi,_4f8,_4f9,_4fa,_4fb,_4fc){
this.getSubUIContent(_4f6,bidi,_4f8,_4f9,_4fa,_4fb,_4fc);
},writeFooterUIContent:function(_4fd,bidi,_4ff,_500,_501,_502,_503){
_501.write("<tr id=\"cardFooter\""+((this.isSlim)?"style=\"display:none\"":"")+">");
_501.write("<td colspan=\"6\">");
if(_4fd.X_inDirectory){
_501.write("<div class=\"lotusPersonActions\">");
_501.write("<ul class=\"lotusInlinelist\">");
var _504=(typeof (SemTagSvcConfig)!="undefined"&&SemTagSvcConfig.isBidiRTL);
if(_4fd.X_bizCardActions.length>0){
_501.write("<li class=\"lotusFirst\">"+this.getActionLink(_4fd,0,true)+"</li>");
if(_504){
_501.write("<li class=\"lotusFirst\"></li>");
}
}
if(this.isEmailEnabled&&_4fd.X_bizCardSTAwareness){
if(_4fd.X_STChatAction){
_501.write("<li id=\""+_4fd.email.internet+"ChatAction\" "+(_504?"class=\"lotusFirst\"":"")+" style=\"display:none;\">"+"<a href=\"javascript:void(0);\" onclick=\"lconn.profiles.bizCard.bizCard.sametimeStart('chat', '"+_4fd.email.internet+"');\">"+"<img src=\""+_503+"/nav/common/styles/images/iconChat.gif\" alt=\"\" /> "+generalrs.personCardChat+"</a>"+"</li>");
}
if(typeof (SemTagSvcConfig)!="undefined"&&SemTagSvcConfig.isBidiRTL){
_501.write("<li class=\"lotusFirst\"></li>");
}
}
if(_4fd.X_bizCardActions.length>1){
_501.write("<li "+(!this.isEmailEnabled||_504?"class=\"lotusFirst\"":"")+">"+"<a href=\"javascript:void(0);\" onclick=\"lconn.profiles.bizCard.bizCardUI.displayMore('"+_4fd.key+"MoreActionMenu',this.parentNode.parentNode);event.cancelBubble=true\">"+generalrs.personCardMoreActions+"<img src=\""+_503+"/nav/common/styles/images/btnDropDown.gif\" alt=\""+generalrs.personCardMoreActionsAltText+"\" title=\""+generalrs.personCardMoreActionsAltText+"\">"+"</a>"+"</li>");
}
_501.write("</ul>"+"</div>");
if(_4fd.X_bizCardActions.length>1||(this.isEmailEnabled&&_4fd.X_bizCardSTAwareness)){
this.writeMoreActionsMenu(_501,_4fd,_503,false);
}
}
_501.write("</td></tr>");
},getActionLink:function(_505,_506,_507){
var _508=_505.X_bizCardActions[_506];
var icon="";
if(_507&&typeof (_508.icon)!="undefined"){
icon="<img src=\""+_508.icon.href+"\" alt=\""+_508.icon.alt+"\" /> ";
}
return "<a class=\"email\" href=\""+_508.urlPattern+"\">"+icon+_508.label+"</a>";
},getSubUIContent:function(_50a,bidi,_50c,_50d,_50e,_50f,_510){
if(this.isExpandable){
this.writeExpandoUIContent(_50e,_510);
}
if(_50a!=null){
if(_50a.X_bizCardShowPhoto){
_50e.write("<div class=\"lotusPhoto photo\"><img src=\""+_50a.photo+"\" alt=\""+_50a.fn+"\" title=\""+_50a.fn+"\" height=\"59\" width=\"59\"></div>");
}
_50e.write("<div class=\"lotusPersonInfo\">");
if(_50a.X_inDirectory!="true"){
var _511=generalrs["label.personcard.noprofilemsg"];
_50e.write("<h3 id='noProfileMsg'>"+_511+"</h3>");
}else{
_50e.write(_50a.X_bizCardMainHtml);
}
_50e.write("</div><!--end lotusInfo-->");
var _512=((this.isEmailEnabled)?_50a.email.internet:"");
_50e.write("<div id=\""+_512+"vcardCommentElem\" class=\"lotusComment\" style=\"display: none;\">");
_50e.write("<div class=\"lotusCommentHeader\">&nbsp;</div><!--end comment header-->");
_50e.write("<div class=\"lotusCommentBody\">\t");
if(_512!=""&&_50a.X_bizCardSTStatusMsg){
_50e.write("<p>Sametime: <span id=\""+_512+"vcardStStatusElem\"></span></p>");
}
_50e.write("</div><!--end commentBody-->");
_50e.write("</div><!--end comment-->");
}else{
var _511=dojo.i18n.getLocalization("lc_default")["label.personcard.noprofilemsg"];
_50e.write("<h3 id='noProfileMsg'>"+_511+"</h3>");
}
},writeExpandoUIContent:function(_513,_514){
_513.write("<div class=\"lotusRight\">");
_513.write("<a onclick=\"lconn.profiles.bizCard.bizCardUI.toggleSlimCard(this,'"+_514+"');"+"event.cancelBubble=true;\""+"href=\"javascript:void(0);\">");
_513.write(" <img id=\"slimTwisty\" src=\""+_514+"/nav/common/styles/images/"+(this.isSlim?"iconShow.gif":"iconHide.gif")+"\" alt=\"\" title=\"\"/>");
_513.write("</a>");
_513.write("</div>");
},getInlineMarkup:function(_515,bidi,_517){
var _518=lconn.core.bizCard.bizCardUtils.getBaseURL("hcard");
var _519=_517;
if(_515!=null){
var _51a="";
if(this.isEmailEnabled){
_51a=_515.email.internet;
}
_519.write("<div class=\"lotusui\">");
_519.write("<div id=\""+_515.key+"\" class=\"vcard lotusVCard lotusInlineVCard\" style=\"position:static;margin:10px\">");
_519.write("  <div class=\"lotusContainer\">");
_519.write("    <div id=\""+_515.key+"_Pivot\" class=\"lotusPivotNav\">");
_519.write("      <div class=\"lotusPivotNavToggle\">");
_519.write("        <a href=\"javascript:void(0);\" title=\"\" onclick=\"lconn.core.bizCard.bizCardUtils.toggleInlineCard('"+_515.key+"')\">"+"&nbsp;"+"</a>");
_519.write("      </div>");
if(_515.X_bizCardShowPhoto){
_519.write("      <div class=\"lotusPhoto photo\">");
_519.write("        <img id=\"photo\" src=\""+_515.photo+"\" alt=\""+_515.fn+"\" title=\""+_515.fn+"\" height=\"35\" width=\"35\" />");
_519.write("      </div>");
}
_519.write("      <div class=\"lotusPersonInfo\">");
_519.write("        <h2 class=\"fn\" id=\""+_51a+"vcardNameElem\" class=\"fn\">"+_515.fn+"</h2>");
_519.write("      </div>");
_519.write("    </div>");
_519.write("    <div id=\""+_515.key+"_Details\" class=\"lotusInlineVCardDetails\">");
if(_515.X_bizCardActions.length>0){
_519.write("<div class=\"lotusEmail\">");
_519.write(this.getActionLink(_515,0,true));
_519.write("</div>");
}
this.writeLinks(_519,_515,true);
if(_515.X_bizCardActions.length>1){
_519.write("<div class=\"lotusPersonActions\">");
_519.write("  <ul class=\"lotusInlinelist\">");
_519.write("    <li class=\"lotusFirst\">");
_519.write("      <a href=\"javascript:;\"");
_519.write("        onclick=\"lconn.profiles.bizCard.bizCardUI.displayMore('"+_515.key+"InlineMoreActionMenu',this.parentNode.parentNode);event.cancelBubble=true\">");
_519.write(generalrs.personCardMoreActions);
_519.write("        <img src=\""+_518+"/nav/common/styles/images/btnDropDown.gif\" alt=\""+generalrs.personCardMoreActionsAltText+"\"");
_519.write("          title=\""+generalrs.personCardMoreActionsAltText+"\" />");
_519.write("      </a>");
_519.write("    </li>");
_519.write("  </ul>");
_519.write("</div>");
this.writeMoreActionsMenu(_519,_515,_518,true);
}
_519.write("    </div>");
_519.write("  </div>");
_519.write("</div>");
_519.write("</div>");
}else{
_519.write("<div class=\"lotusui\">");
_519.write("<div class=\"vcard lotusVCard lotusInlineVCard\" style=\"position:static;margin:10px\">");
_519.write("  <div class=\"lotusContainer\">");
_519.write("    </div>");
_519.write("    </div>");
_519.write("    </div>");
}
},writeLinks:function(_51b,_51c,_51d){
try{
var _51e=lconn.core.bizCard.bizCardUtils.getBaseURL("hcard");
if(!_51c.X_bizCardServiceLinks){
_51c.X_bizCardServiceLinks=[];
}
if(!_51c.X_concatSemPersonSvc&&SemTagPerson.services&&SemTagPerson.services.length>0){
_51c.X_bizCardServiceLinks=_51c.X_bizCardServiceLinks.concat(SemTagPerson.services);
_51c.X_concatSemPersonSvc=true;
}
if(_51c.X_bizCardServiceLinks&&_51c.X_bizCardServiceLinks.length>0){
_51b.write((_51d)?"<ul id=\"appLinks1\" class=\"lotusAppLinks\">":"<tr id=\"appLinks1\" class=\"lotusAppLinks\">");
var _51f=false;
var _520=false;
for(var k=0;k<_51c.X_bizCardServiceLinks.length;k++){
var _522=false;
var _523=_51c.X_bizCardServiceLinks[k];
if(_523==null||_523.name==null||_523.name==""){
continue;
}
var _524="";
var _525=false;
if(typeof (_523.href)!="undefined"&&_523.href!=null){
_524=_523.href;
}else{
if(typeof (_523.url_pattern)!="undefined"&&_523.url_pattern!=null&&_523.url_pattern!=""){
_524=_523.url_pattern;
if(_524.indexOf("{email}")!=-1&&(_51c.email!=null&&_51c.email.internet!=null)){
_524=_524.replace(/{email}/g,_51c.email.internet);
}
if(_524.indexOf("{uid}")!=-1&&(_51c.uid!=null)){
_524=_524.replace(/{uid}/g,_51c.uid);
}
if(_524.indexOf("{key}")!=-1&&(_51c.key!=null)){
_524=_524.replace(/{key}/g,_51c.key);
}
if(_524.indexOf("{fn}")!=-1&&(_51c.fn!=null)){
_524=_524.replace(/{fn}/g,_51c.fn);
}
if(_524.indexOf("{displayName}")!=-1&&(_51c.fn!=null)){
_524=_524.replace(/{displayName}/g,_51c.fn);
}
if(_524.indexOf("{workPhoneNumber}")!=-1&&(_51c.adr!=null&&_51c.adr.work!=null)){
_524=_524.replace(/{workPhoneNumber}/g,_51c.adr.work);
}
if(_524.indexOf("{userid}")!=-1&&(_51c.X_lconn_userid!=null)){
_524=_524.replace(/{userid}/g,_51c.X_lconn_userid);
}
if(typeof (_523.location)!="undefined"&&_523.location!=null){
_524=_523.location+_524;
}
}else{
continue;
}
}
if((_51d==false)&&k==4&&_51c.X_bizCardServiceLinks.length>=6&&!_51f){
_51b.write("<td>"+"<a onclick=\"lconn.profiles.bizCard.bizCardUI.toggleMoreApps('appLinks2',this); event.cancelBubble=true;\""+" href=\"javascript:void(0);\" "+" class=\"lotusMore lotusMoreExpanded\">&nbsp;"+"<span class=\"lotusAltText\">+</span>"+"</a>"+"</td>");
_51b.write("</tr>");
_51b.write("<tr id=\"appLinks2\" class=\"lotusAppLinks\">");
_51f=true;
_520=true;
}
_51b.write((_51d)?"<li ":"<td ");
if(k==0||_520==true){
_51b.write("class=\"lotusFirst\"");
}
_520=false;
var _526="";
if(typeof (_523.js_eval)!="undefined"&&_523.js_eval!=null&&_523.js_eval.indexOf("generalrs.")==0){
var key=_523.js_eval.substr("generalrs.".length);
if(typeof (generalrs[key])=="undefined"){
key=key.replace(/\_/g,".");
}
_526=generalrs[key];
}else{
if(_523.js_eval){
try{
if(_51c.X_allowEvalLabel){
_526=dojo.eval(_523.js_eval);
}else{
_526=new String(_523.js_eval);
}
}
catch(exception2){
_526="!error.eval!";
}
}else{
if(_523.label){
_526=new String(_523.label);
}else{
_526="???";
}
}
}
if(_523.name=="blogs"&&_51c.X_blogUrl!=null&&_51c.X_blogUrl!=""){
_51b.write("><a class=\"url\" href=\""+_51c.X_blogUrl+"\">"+_526+"</a>");
}else{
_51b.write("><a class=\"url\" href=\""+_524+"\">"+_526+"</a>");
}
_51b.write((_51d)?"</li>":"</td>");
}
if(_51f){
_51b.write("<td colspan=\""+(11-_51c.X_bizCardServiceLinks.length)+"\">&nbsp;</td>");
}
_51b.write((_51d)?"</ul>":"</tr>");
}
}
catch(exception2){
alert(exception2.message);
}
},writeMoreActionsMenu:function(_528,_529,_52a,_52b){
try{
_528.write("<ul class=\"lotusActionMenu\" id=\""+_529.key);
if(_52b){
_528.write("Inline");
}
_528.write("MoreActionMenu\">");
if(_529.X_bizCardActions.length>0&&!_52b){
_528.write("<li class=\""+_529.X_bizCardActions[0].liClass+"\">"+this.getActionLink(_529,0,false)+"</li>");
}
if(this.isEmailEnabled&&_529.X_bizCardSTAwareness&&_529.email.internet!=""){
if(_529.X_STChatAction){
_528.write("<li id=\""+_529.email.internet+"ChatActionMore\" style=\"display:none;\"><a href=\"javascript:void(0);\" onclick=\"lconn.profiles.bizCard.bizCard.sametimeStart('chat', '"+_529.email.internet+"');\"> "+generalrs.personCardChat+" </a></li>");
}
if(_529.X_STCallAction){
_528.write("<li id=\""+_529.email.internet+"CallActionMore\" style=\"display:none;\"><a href=\"javascript:void(0);\" onclick=\"lconn.profiles.bizCard.bizCard.sametimeStart('call', '"+_529.email.internet+"');\"> "+generalrs.personCardCall+" </a></li>");
}
}
if(_529.X_bizCardActions.length>1){
for(var i=1;i<_529.X_bizCardActions.length;i++){
_528.write("<li class=\""+_529.X_bizCardActions[i].liClass+"\">"+this.getActionLink(_529,i,false)+"</li>");
}
}
_528.write("</ul>");
}
catch(exception2){
alert(exception2.message);
}
},displayMore:function(_52d,_52e){
_52e.style.display="none";
document.getElementById(_52d).style.display="block";
},convertQuickrEmail:function(_52f){
_52f=_52f.replace(/@/g,"_at_");
_52f=_52f.replace(/\./g,"_");
return _52f;
},toggleMoreApps:function(pDiv,_531){
var _532=document.getElementById(pDiv);
if(_531.className.indexOf("lotusMoreExpanded")!=-1){
_531.className="lotusMore";
_532.style.display="none";
}else{
_531.className+=" lotusMoreExpanded";
_532.style.display="";
}
},toggleSlimCard:function(_533,_534){
var _535=document.getElementById("slimTwisty");
if(_535.src.indexOf("iconHide.gif")!=-1){
this.slimCard(_534);
dojo.cookie("card.popup.slim",1);
}else{
this.expandCard(_534);
dojo.cookie("card.popup.slim",0);
}
},slimCard:function(_536){
var _537=document.getElementById("slimTwisty");
var _538=document.getElementById("cardHeader");
var _539=document.getElementById("cardFooter");
if(_537){
_537.src=_536+"/nav/common/styles/images/iconShow.gif";
}
_538.style.display="none";
_539.style.display="none";
},expandCard:function(_53a){
var _53b=document.getElementById("slimTwisty");
var _53c=document.getElementById("cardHeader");
var _53d=document.getElementById("cardFooter");
if(_53b){
_53b.src=_53a+"/nav/common/styles/images/iconHide.gif";
}
_53c.style.display="";
_53d.style.display="";
},resizeObj:function(obj,_53f,_540){
if(typeof (obj.style.height)=="undefined"||obj.style.height<=0){
obj.style.height=obj.height;
}
if(typeof (obj.style.width)=="undefined"||obj.style.width<=0){
obj.style.width=obj.width;
}
obj.style.height=(_53f)?obj.style.height=_540+"%":obj.style.height;
obj.style.width=(_53f)?obj.style.width=_540+"%":obj.style.width;
},openVCardDialog:function(key,_542){
this._createVCardDialog(key,_542);
},_createVCardDialog:function(key,_544){
window.open(this._getVCardDownloadUrl(key,_544),"vcarddl","status=0,toolbar=0,scrollbars=0,resizable=0,height=350,width=550");
},_getVCardDownloadUrl:function(key,_546){
var base=lconn.core.bizCard.bizCardUtils.getBaseURL("hcard");
var lang=lconn.core.bizCard.bizCardUtils.getLangParam();
return base+"/html/exportVCardDialog.do?key="+key+"&lastMod="+_546+"&lang="+lang;
}};
}
if(!dojo._hasResource["lconn.core.TextBox"]){
dojo._hasResource["lconn.core.TextBox"]=true;
dojo.provide("lconn.core.TextBox");
dojo.declare("lconn.core.TextBox",[dijit._Widget,dijit._Templated],{shadowText:"",shadowTextOn:true,name:"",textBoxClass:"",templateString:"<span><input type=\"text\" class=\"${textBoxClass}\" dojoAttachPoint=\"textbox\" /><input type=\"hidden\" value=\"\" dojoAttachPoint=\"hiddenbox\" /></span>",postCreate:function(){
this.textbox.onfocus=dojo.hitch(this,"textBoxFocus");
this.textbox.onblur=dojo.hitch(this,"textBoxBlur");
this.textbox.name=this.id+"_textbox";
if(this.value){
this.textbox.value=this.value;
this.hiddenbox.value=this.value;
this.shadowTextOn=false;
}else{
dojo.addClass(this.textbox,"lotusInactive");
this.textbox.value=this.shadowText;
}
if(this.name){
this.hiddenbox.name=this.name;
}
if(this.title){
this.textbox.title=this.title;
}
},textBoxBlur:function(){
if(this.textbox.value.length==0){
dojo.addClass(this.textbox,"lotusInactive");
this.shadowTextOn=true;
this.textbox.value=this.shadowText;
this.hiddenbox.value="";
}else{
this.hiddenbox.value=this.textbox.value;
this.shadowTextOn=false;
}
},textBoxFocus:function(){
if(this.shadowTextOn){
this.shadowTextOn=false;
this.textbox.value="";
this.hiddenbox.value="";
dojo.removeClass(this.textbox,"lotusInactive");
this.textbox.focus();
}
},setHiddenValue:function(){
if(this.shadowTextOn){
this.hiddenbox.value="";
}else{
this.hiddenbox.value=this.textbox.value;
}
},focus:function(){
this.textbox.focus();
},getValue:function(){
return this.hiddenbox.value;
}});
}
if(!dojo._hasResource["lconn.core.SearchBar"]){
dojo._hasResource["lconn.core.SearchBar"]=true;
dojo.provide("lconn.core.SearchBar");
dojo.declare("lconn.core.SearchBar",[dijit._Widget,dijit._Templated],{templateString:["<div class=\"lotusSearch\"><form dojoAttachPoint=\"formNode\" method=\"POST\" dojoAttachEvent=\"onsubmit:formSubmitted\">","<input name=\"scope\" value=\"\" dojoAttachPoint=\"scopeInputNode\" type=\"hidden\" />","<input name=\"component\" value=\"\" dojoAttachPoint=\"featureInputNode\" type=\"hidden\" />","<table class=\"lotusLayout\" role=\"presentation\" summary=\"\"><tbody><tr>","<td><span id=\"${id}searchLbl\" class=\"lotusHidden\">${lblSelectScope}</span>","<a href=\"javascript:;\" title=\"${lblSelectScope}\" aria-labelledby=\"${id}searchLbl\" aria-describedby=\"${id}searchOpt\" wairole=\"menu\" role=\"menu\" class=\"lotusScope\" dojoAttachPoint=\"scopeNode\" dojoAttachEvent=\"onclick:openMenu\">","<img class=\"lotusIcon\" alt=\"\" src=\"${_blankGif}\" dojoAttachPoint=\"currScopeIconNode\" role=\"presentation\"/>","<span id=\"${id}searchOpt\" dojoAttachPoint=\"currScopeLabelNode\"> </span>","<span class=\"lotusAltText\" role=\"presentation\">&#9660;</span>","</a></td>","<td>","<label class=\"lotusHidden\" for=\"${id}searchInput\">${lblSearch}</label>","<input id=\"${id}searchInput\" dojoAttachPoint=\"textNode\" class=\"lotusText lotusInactive\" type=\"text\" name=\"query\" title=\"${lblSearch}\"/>","</td>","<td>","<span class=\"lotusBtnImg\">","<input dojoAttachPoint=\"onclick:submitForm\" class=\"lotusSearchButton\" type=\"image\" src=\"${_blankGif}\" alt=\"${lblSearch}\"/>","<a href=\"javascript:;\" alt=\"${lblSearch}\" dojoAttachEvent=\"onclick:submitForm\" class=\"lotusAltText\">${lblSearch}</a>","</span>","</td>","</tr></tbody></table>","</form></div>"].join(""),localOptions:[],globalOptions:[],localAction:"",searchContextPath:"",lblSearch:"",lblSelectScope:"",lblAllConnections:"",lblAdvanced:"",menuItems:[],featureIcons:{allareas:"lconnSprite lconnSprite-iconConnections16",activities:"lconnSprite lconnSprite-iconActivities16",blogs:"lconnSprite lconnSprite-iconBlogs16",communities:"lconnSprite lconnSprite-iconCommunities16",dogear:"lconnSprite lconnSprite-iconDogear16",files:"lconnSprite lconnSprite-iconFiles16",profiles:"lconnSprite lconnSprite-iconProfiles16",wikis:"lconnSprite lconnSprite-iconWikis16"},selectedOption:null,textBox:null,globalAction:"",advancedSearchUrl:"",SEARCH_ADVANCED:"searchAdvancedIdentifier",SEARCH_POST_PATH:"/web/search",SEARCH_ADVANCED_PATH:"/web/jsp/advancedSearch.jsp",postCreate:function(){
if(this.searchContextPath){
this.globalAction=this.searchContextPath+this.SEARCH_POST_PATH;
this.advancedSearchUrl=this.searchContextPath+this.SEARCH_ADVANCED_PATH;
}
this.showDefaultOption();
this.textBox=new lconn.core.TextBox({shadowText:this.lblSearch,textBoxClass:"lotusText",name:"query",title:this.lblSearch},this.textNode);
if(this.globalOptions&&this.globalOptions.length>0){
this.globalOptions.splice(0,0,{label:this.lblAllConnections,feature:"allareas",iconClass:"lconnSprite lconnSprite-iconConnections16"});
}
},changeLocalOptions:function(_549){
this.localOptions=_549;
if(this.scopeMenu){
this.scopeMenu.destroyRecursive();
this.scopeMenu=null;
this.menuItems=[];
}
this.showDefaultOption();
},showDefaultOption:function(){
for(var i in this.localOptions){
if(this.localOptions[i].defaultOption){
this.selectOption(this.localOptions[i],false);
return;
}
}
if(this.globalOptions&&this.globalOptions.length>0){
this.selectOption(this.globalOptions[0],false);
}
},getScopeMenu:function(){
if(!this.scopeMenu){
this.scopeMenu=new dijit.Menu({onItemClick:dojo.hitch(this,"selectOption")});
this.connect(this.scopeMenu,"_onBlur","closeMenu");
this.menuItems=[];
var _54b=this.localOptions;
for(var i in _54b){
_54b[i].parentMenu=this.scopeMenu;
this.menuItems.push(new dijit.MenuItem(_54b[i]));
}
if(this.globalOptions.length>0){
this.menuItems.push(new dijit.MenuSeparator({parentMenu:this.scopeMenu}));
}
_54b=this.globalOptions;
for(var i in _54b){
if(_54b[i].feature&&this.featureIcons[_54b[i].feature]){
_54b[i].parentMenu=this.scopeMenu;
_54b[i].iconClass=this.featureIcons[_54b[i].feature];
this.menuItems.push(new dijit.MenuItem(_54b[i]));
}
}
if(this.globalOptions.length>0){
this.menuItems.push(new dijit.MenuSeparator({parentMenu:this.scopeMenu}));
this.menuItems.push(new dijit.MenuItem({label:this.lblAdvanced,feature:this.SEARCH_ADVANCED}));
}
for(var i in this.menuItems){
this.scopeMenu.addChild(this.menuItems[i]);
}
}
return this.scopeMenu;
},openMenu:function(evt){
var menu=this.getScopeMenu();
dijit.popup.open({popup:menu,around:this.scopeNode,orient:(dojo._isBodyLtr()?{"BL":"TL","BR":"TR","TL":"BL","TR":"BR"}:{"BR":"TR","BL":"TL","TR":"BR","TL":"BL"}),onExecute:function(){
},onCancel:dojo.hitch(this,function(){
dijit.popup.close(menu);
dijit.focus(this.scopeNode);
}),onClose:function(){
}});
menu.focus();
dojo.stopEvent(evt);
},closeMenu:function(){
if(this.scopeMenu){
dijit.popup.close(this.scopeMenu);
}
},onSelectOption:function(item,evt){
this.selectOption(item,true);
},selectOption:function(item,_552){
this.closeMenu();
this.selectedOption=item;
if(item.feature&&item.feature==this.SEARCH_ADVANCED){
location.href=this.advancedSearchUrl;
return;
}
this.currScopeLabelNode.innerHTML=item.label;
this.currScopeIconNode.className="lotusIcon";
if(item.iconClass){
dojo.addClass(this.currScopeIconNode,item.iconClass);
}
if(item.scope){
this.scopeInputNode.value=item.scope;
this.featureInputNode.value="";
}else{
if(item.feature){
if(item.feature=="allareas"){
this.featureInputNode.value="";
}else{
this.featureInputNode.value=item.feature;
}
this.scopeInputNode.value="";
}
}
if(item.action){
this.formNode.action=item.action;
}else{
if(item.feature){
this.formNode.action=this.globalAction;
}else{
this.formNode.action=this.localAction;
}
}
if(_552){
this.textBox.focus();
}
},submitForm:function(evt){
this.textBox.setHiddenValue();
if(this.onSubmit()){
this.formNode.submit();
}
if(evt){
dojo.stopEvent(evt);
}
return false;
},getValue:function(){
return this.textBox.getValue();
},formSubmitted:function(evt){
this.submitForm();
dojo.stopEvent(evt);
},onSubmit:function(){
}});
}
dojo.i18n._preloadLocalizations("lconn.dogear.nls.dogear",["da","es","hu","de","pt-br","pl","pt","ca","sv","ar","pt-pt","fi","zh","ru","xx","fr","zh-tw","it","th","cs","he","nl","el","no","ko","tr","en","ROOT","ja"]);
/* Copyright IBM Corp. 2006, 2008  All Rights Reserved.              */

var Dogear = {
	version: "1.0",
	path: "",
	requires: [],
	count: 0,
	reqElems: new Array(5),
			
	init: function() {
		var included_libs,head,scripts,s,src,num,lib,param;
		included_libs = new Array();
		head = document.getElementsByTagName("head");
		scripts = head[0].getElementsByTagName('*');
		for (var i=0; i<scripts.length; i++) {
			s = scripts[i];
			src = s.src;
			if (src) {
				num = src.lastIndexOf("\/");
				lib = src.slice(num+1);
				included_libs[lib] = true;
				if (src.match(/script\/dogear\.js(\?.*)?$/)) {
					Dogear.path = src.replace(/script\/dogear\.js(\?.*)?$/,'');
				}
			}
		}
		for (i=0; i<Dogear.requires.length; i++) {
			lib = Dogear.requires[i];
			if (!included_libs[lib]) {
				var script=document.createElement('script');
				script.charset='UTF-8';
				script.src=Dogear.path+ "/" + lib;
				head[0].appendChild(script);
			}
		}
	},
	
	Util: {
			
		constructUrl: function(url, params)
		{
			var query = '';
			for (var p in params) {
				if (query.length > 0)
					query += "&";
				query += encodeURIComponent(p);
				query += "=";
				query += encodeURIComponent(params[p]);
			}
		
			if (query.length > 0)
				url += "?" + query;
			
			return url;
		},
		
		getCookie: function(name)
		{
		    key = name + "=";
		    c = document.cookie;
		    
		    // set start of cookie
		    start = c.indexOf("; " + key) + 2 + key.length;
		    start = start > -1 + 2 + key.length ? start : c.indexOf(name + "=") + key.length;	
		    
		    // set end of cookie if start is found
		    if (start > -1 + key.length) {
		       end = c.indexOf(";", start);
		       end = end > -1 ? end : c.length;
		       
		       // return cookie value
		       return unescape(c.substring(start , end));
		    } else {
		       // no cookie
		       return null;
		    }
		},
		
		setCookie: function(name, value)
		{
		    document.cookie = name + "=" + escape(value) +	"; expires=" + 
			    new Date(new Date().getTime() + 365*24*60*60*1000).toGMTString() + "; path=/";
		},
		
		setPreference: function(name, value)
		{
			Dogear.Util.setCookie(name, value);
			document.reload();
		},
		
		// Prefs
		setDescriptionVisibility: function(hide)
		{
			var divs = document.getElementsByTagName("div");
			for (var i = 0; i < divs.length; i++)
			{
				if (divs[i].className == 'verbiage' || divs[i].className == 'author')
					divs[i].style.display = hide ? 'none' : 'block';
			}
		},
		
		setHideDescription: function(hide)
		{
			Dogear.Util.setCookie('hv', hide ? 'true' : 'false');
			Dogear.Util.setDescriptionVisibility(hide);
		},
		
		addEngine: function()
		{
		  if ((typeof window.sidebar == "object") && (typeof window.sidebar.addSearchEngine == "function"))
		  {
			window.sidebar.addSearchEngine(
			  Dogear.path+"tools/dogear.src",
			  Dogear.path+"tools/dogear.png",
			  "dogear",
			  "Web" );
		  }
		  else
		  {
			alert(dojo.i18n.getLocalization("lconn.dogear","strings").dogearsearchalert);
		  }
		},
		
		addLoadEvent: function(func) 
		{
			var oldonload = window.onload;
			if (typeof window.onload != 'function')
			{
				window.onload = func;
			}
			else
			{
				window.onload = function() {
					oldonload();
					func();
				};
			}
		},
		
		addField: function(form, fieldType, fieldName, fieldId, fieldValue) {
			var input = document.createElement('INPUT');
			if (document.all) // what follows should work with NN6 but doesn't in M14
			{
				input.type = fieldType;
				input.name = fieldName;
				input.id = fieldId;
				input.value = fieldValue;
			}
			else if (document.getElementById) // so here is the NN6 workaround
			{
				input.setAttribute('type', fieldType);
				input.setAttribute('name', fieldName);
				input.setAttribute('id', fieldId);
				input.setAttribute('value', fieldValue);
			}
			form.appendChild(input);
		},
		
		
		popup_post: function(title, url, verbiage, feature)
		{
			dw = window.open(
				"about:blank",
				'dogear',
				'toolbars=no,scrollbars=yes,resizable=yes,width=670,height=700');
			if (!dojo.byId("tempForm")){
				var form = document.createElement("form");
				form.id = "tempForm";
				form.style.display = "none";
				if (dogearContext == "/"){
					form.action = "/bookmarklet/post";
				}else {
					form.action = dogearContext + "/bookmarklet/post";
				}
				form.action = form.action + "?lang=" + dojo.cookie("lang");
				form.method = "post";
				form.target = "dogear";
				document.body.appendChild(form);
			}
			document.forms["tempForm"].innerHTML = "<input type='text' name='url'>"+
				"<input type='text' name='title'>" + 
				"<textarea name='verbiage'></textarea><input type='text' name='lang' value='" + dojo.cookie("lang") + "'>";
				
			document.forms["tempForm"].url.value= url;
			document.forms["tempForm"].title.value = title;
			document.forms["tempForm"].verbiage.value = verbiage;
			switch(feature){
				case 'dogear':
					var _input = document.createElement("input");
					_input.name = "showDogearOnly";
					_input.type = "hidden";
					_input.value = "true";
					document.forms["tempForm"].appendChild(_input);
					break;
				case 'blogs':
					var _input = document.createElement("input");
					_input.name = "addToBlogs";
					_input.type = "hidden";
					_input.value = "true";
					document.forms["tempForm"].appendChild(_input);
					break;
				case 'activities':
					var _input = document.createElement("input");
					_input.name = "addToActivities";
					_input.type = "hidden";
					_input.value = "true";
					document.forms["tempForm"].appendChild(_input);
					break;
				case 'communities':
					var _input = document.createElement("input");
					_input.name = "addToCommunities";
					_input.type = "hidden";
					_input.value = "true";
					document.forms["tempForm"].appendChild(_input);
					break;
			}
			document.forms["tempForm"].submit();
			setTimeout('dw.focus();', 250);
			dijit.byId('MoreActionMenu').onCancel();
		}
	},
	
	currentForm: {
		id: "",	
		nonce: "",
	
		toggleNotifyForm: function (linkid){
			if(Dogear.currentForm.id != "") {
				con = confirm(dojo.i18n.getLocalization("lconn.dogear","strings").closeformmsg);
				if(con == true) Dogear.currentForm.hideNotifyForm(Dogear.currentForm.id);
				else return;
			}
			Dogear.currentForm.showNotifyForm(linkid);
			
		},
		
		showNotifyForm: function (linkid){
			Dogear.currentForm.id = linkid;
			var notifyForm = document.getElementById('NotifyForm_'+linkid);
			dojo.byId(notifyForm).style.display = '';
			//Effect.Appear(notifyForm,{duration:0.15});
			// var srcNode = document.getElementById('rteDiv_'+linkid);							
			// dojo.widget.createWidget("Editor2", {id:'editorWidget_'+linkid, height:'150px'}, srcNode);
		},
		
		hideNotifyForm: function (linkid){
			Dogear.currentForm.id = "";
			var emailsField = document.getElementById('notifyEmails_'+linkid);
			emailsField.value = "";
			var descField = document.getElementById('desc_'+linkid);
			descField.value = "";
			
			// var rteDiv = document.getElementById('rteDiv_'+linkid);
			// var children = rteDiv.childNodes;
			// for( var i = 0; i < children.length; ){
			// 	rteDiv.removeChild(children[i]);
			// }
			var notifyForm = document.getElementById('NotifyForm_'+linkid);
			// dojo.byId(notifyForm).style.display = 'none';
			Effect.Fade(notifyForm,{duration:0.15});
		},
		
		notify: function (linkid){
			//var emails = encodeURIComponent(document.getElementById('notifyEmails_'+linkid).value);
			//var desc = encodeURIComponent(document.getElementById('desc_'+linkid).value);
			//var url = dojo.byId('NotificationForm_'+linkid).getAttribute('action');
			//var options = {parameters: "linkid="+linkid+"&users="+emails+"&description="+desc, asynchronous: true};
			var notifyForm = document.getElementById('NotificationForm_'+linkid);
			notifyForm.submit();
			//this.hideNotifyForm(linkid);
		},
		
		setNonce: function (dogearUrl, form){
			if(Dogear.currentForm.nonce == ""){
				dojo.xhrGet({
					url: dogearUrl + "/securitynonce",
					handleAs: "text",
					handle: function(nonce){
								if (nonce != null){
									Dogear.currentForm.nonce = nonce;
									dojo.byId(form).dangerousurlnonce.value = nonce;
								}
							},
					error: function(data){console.log(data);},
					sync: true
				});
			}
		},
		
		getNonce: function (dogearUrl){
			dojo.xhrGet({
				url: dogearUrl + "/securitynonce",
				handleAs: "text",
				handle: function(nonce){
							if (nonce != null && nonce != "" && Dogear.currentForm.nonce!= nonce){
								Dogear.currentForm.nonce = nonce;
							}
						},
				error: function(data){console.log(data);},
				sync: true
			});
		}
	},

	menu: {
		
		add2Acti: "",
		add2Comm: "",
		add2Blog: "",
		
		openMoreActionsMenu: function (event, bmIndex){
			event = dojo.fixEvent(event);
			
			var moreActionmenu = dijit.byId('MoreActionMenu');
			
			Dogear.menu.add2Acti = document.getElementById('Add2Activities_'+bmIndex);
			Dogear.menu.add2Comm = document.getElementById('Add2Communities_'+bmIndex);
			Dogear.menu.add2Blog = document.getElementById('Add2Blogs_'+bmIndex);
			
			var add2ActiItem = moreActionmenu.getChildren()[0];
			var add2CommItem = moreActionmenu.getChildren()[1];
			var add2BlogItem = moreActionmenu.getChildren()[2];
			
			if(Dogear.menu.add2Acti) {
				add2ActiItem.onClick = function() {Dogear.menu.openWindow('activities');return false;};
			}
			
			if(Dogear.menu.add2Comm) {
				add2CommItem.onClick = function() {Dogear.menu.openWindow('community');return false;};
			}
			
			if(Dogear.menu.add2Blog) {
				add2BlogItem.onClick = function() {Dogear.menu.openWindow('blogs');return false;};
			}
			menuUtility.openMenu(event, 'MoreActionMenu');
		},
		
		openWindow: function(type) {
			if(type == 'activities') {
				Dogear.Util.popup_post(dojo.byId("title_" + currentIndex).value, dojo.byId("url_" + currentIndex).value, dojo.byId("verbiage_" + currentIndex).value, 'activities');
			}else if(type == 'community') {
				Dogear.Util.popup_post(dojo.byId("title_" + currentIndex).value, dojo.byId("url_" + currentIndex).value, dojo.byId("verbiage_" + currentIndex).value, 'communities');
			}else if(type == 'blogs') {
				Dogear.Util.popup_post(dojo.byId("title_" + currentIndex).value, dojo.byId("url_" + currentIndex).value, dojo.byId("verbiage_" + currentIndex).value, 'blogs');
			}
		}
	}
}

Dogear.init();

function selectedName(li) {
	var submit;
	spns = dojo.byId(li).getElementsByTagName("span"); 
	for (var i = 0; i < spns.length; i++) { 
    	name = spns[i].getAttribute("name"); 
 		if ( name == "email") { 
		     dojo.byId('namefield').value= spns[i].innerHTML;
		     submit='true';
		     break;
  		}
	}
	if (submit) {
		dojo.byId('actualnameform').submit();
	}
}

function clearSelectedMenuItems(menu){
	if (dojo.isIE) menu = menu.offsetParent;
	var menuitems = menu.getElementsByTagName("LI");
	if (menuitems.length){
		for(var i=0;i<menuitems.length;i++){
			if (dojo.isIE) {
				menuitems[i].className = "";
			}else {
				menuitems[i].setAttribute("class", "");
			}
		}
	}
	
}
function showDialog(context){
	var div = document.createElement("div");
	div.className = "lotusDialogWrapper";
	div.id = "dogear_alert_dialog";
	var html = "";
	html += '<div class="dijitDialogTitleBar" dojoattachpoint="titleBar">';
	html += '<span class="closeText" title="' + dojo.i18n.getLocalization("lconn.dogear","strings", dojo.locale).cancelBtnLabel + '" dojoattachpoint="closeText">x</span>';
	html += '</span>';
	html += '</div>';
	html += '<div class="dijitDialogPaneContent" dojoattachpoint="containerNode">';
	html += '<div class="lotusDialogBorder" style="width: 300px;">';
	html += '<form class="lotusDialog lotusForm">';
	html += '<h1 style="padding-right:12px;padding-left:12px">';
	html += '<a class="lotusRight lotusBtnImg lotusClose" title="'+ dojo.i18n.getLocalization("lconn.dogear","strings", dojo.locale).cancelBtnLabel + '" href="javascript:dijit.byId(' + "'dogear_alert_dialog'" + ').onCancel();">';
	html += '<img src="'+ dogearBaseUrl +'nav/common/styles/images/blank.gif" alt="'+dojo.i18n.getLocalization("lconn.dogear","strings", dojo.locale).cancelBtnLabel+'"/>';
	html += '<span class="lotusAltText">X</span>';
	html += '</a>';
	html += dojo.i18n.getLocalization("lconn.dogear","strings", dojo.locale).alertDialogTitle;
	html += '</h1>';
	html += '<div>';
	html += '<div class="lotusDialogContent" id="dialogContent">';
	html += context;
	html += '</div>';
	html += '</div>';
	html += '<div class="lotusDialogFooter">';
	html += '<input class="lotusFormButton" type="button" value="' + dojo.i18n.getLocalization("lconn.dogear","strings", dojo.locale).alertDialogOK + '" onclick="dijit.byId(' + "'dogear_alert_dialog'" + ').onCancel()"/>';
	html += '</div>';
	html += '</form>';
	html += '</div>';
	html += '</div>';
	div.innerHTML = html;
	document.body.appendChild(div);
	var dialog = new dijit.Dialog(null, div);
	dialog.onCancel = function(){
		this.hide();
		this.destroy();
	}
	dialog.show();
}
window.alert = showDialog;

function checkNotifyInputs(whichform){
	if (! dojo.byId(whichform).users || dojo.byId(whichform).users.value == ''){
		alert(dojo.i18n.getLocalization("lconn.dogear","strings").needRecipiants);
		return false;
	}
	return true;
}
/* Copyright IBM Corp. 2006, 2009  All Rights Reserved.              */

var defaultKeyword = dojo.i18n.getLocalization("lconn.dogear","strings").searchbookmarks;
var searchScope; //default value
var fldQuery;
		
function clearUpdateSetScope(id, label){
		//reset
			dojo.byId('dogMineSearchLi').className='';
			dojo.byId('dogModeSearchLi').className='';
			dojo.byId('dogAllSearchLi').className='';
			
			if(id == 'allForm'){
				searchScope = 'allForm';
				dojo.byId('dogAllSearchLi').className='lotusSelected';
			}
			if(id == 'modeForm'){
				searchScope = 'modeForm';
				dojo.byId('dogModeSearchLi').className='lotusSelected';
			}
			if(id == 'mineForm'){
				searchScope = 'mineForm';
				dojo.byId('dogMineSearchLi').className='lotusSelected';
			}

		}
		
function menuOptionSelected(id, label) {
	searchScope = id;
	
	//dojo.byId('dogSearch').style.display = "none";

	//if (fldDisplay.className == disabledClass) {
	//	fldDisplay.value = fldDesc.value;
	//}

}


 //Script to Perform Search 
function submitSearch()
{
	if (dojo.byId("lotusSearchScope")){
		if (dojo.byId("lotusSearchScope").value == "mybookmarks"){
			searchScope = "mineForm";
		}else if (dojo.byId("lotusSearchScope").value == "allbookmarks"){
			searchScope = "allForm";
		}else if (dojo.byId("lotusSearchScope").value == "thesebookmarks"){
			searchScope = "modeForm";
		}else{
			searchScope = "allareasSearchForm";
		}
	}
	var whichForm = dojo.byId(searchScope);	
	if (searchScope == "allareasSearchForm"){
		whichForm.query.value = dojo.byId('lotusSearchtext').value;
	}else {
		whichForm.search.value = dojo.byId('lotusSearchtext').value;
	}							
	if(dojo.byId('lotusSearchtext').value != defaultKeyword && dojo.byId('lotusSearchtext').value != ''){
	whichForm.submit();
	}
	return false;
}

function setSearchComponent(cName){
	var whichform = dojo.byId("allareasSearchForm");	
	whichform.component.value = cName;
}



/*

Old Search

 Script to Display Menu 

function queryDisplayFocus() {

	var fldQuery = getField("query");
	
	var fldDisplay = getField("queryDisplay");

		
}

function queryDisplayBlur() {


	
	
	var fldDisplay = getField("queryDisplay");



	fldQuery = fldDisplay.value;
	
}

var menuOptions = new Array();
function openMenu(e) {
showMenu("menuPopup",e);

}



 Script to Close Menu 

function closeMenu() {
	var fldPopup = getField("menuPopup");
	fldPopup.style.display = "none";
}

 Script to Select Value 


 Script to pull text from search box 
function getSearch(searchScopeValue){
    var fldDisplay = getField("queryDisplay");
	fldQuery = fldDisplay.value;
  
   submitSearch(searchScopeValue);
    }
    
Script to populate scope if not selected 

function getField(id) {
	return document.getElementById(id);
}


function MenuOption(id, label, icon) {
	this.id = id;
	this.label = label;
	this.icon = icon;

}
*/
/*
function submitSearchOption(){
var whichForm = dojo.byId(dojo.byId('searchSelect').value + "Form");
				whichForm.search.value = dojo.byId('searchtext').value;
				if(dojo.byId('searchtext').value != defaultKeyword && dojo.byId('searchtext').value != ''){
				whichForm.submit();
				}
				return false;

}

function toggleSearch(pElem){
		   var vForm=document.getElementById("searchForm");
		   if (pElem.parentNode.className.indexOf("tabExpanded")==-1){
		       pElem.parentNode.className+=" tabExpanded";
		       vForm.style.display="block";
		   }else{
		       pElem.parentNode.className="searchTab";
		       vForm.style.display="none";
		   }//end if
		 }

*/


/* Copyright IBM Corp. 2006, 2009  All Rights Reserved.              */


function toggleSubs(divToggle, divToggleImg, dogearContextPath){    
	var el = document.getElementById(divToggle);
	var img = document.getElementById(divToggleImg);
	var imgAltOpen = document.getElementById(divToggleImg+"AltTextOpen");
	var imgAltClosed = document.getElementById(divToggleImg+"AltTextClosed");
	if ( el.style.display != 'none' ) {
		el.style.display="none";
		img.className = 'lotusSprite lotusArrow lotusTwistyClosed';	
		if (imgAltOpen) {imgAltOpen.style.display = "none";}
		if (imgAltClosed) {imgAltClosed.style.display = "";}
		if (divToggle == 'dogearPeopleArea' || divToggle == 'dogearTagArea' || divToggle == 'mnContentDiv' || divToggle == 'mbContentDiv'){
	 		dojo.cookie(divToggle, 'closed', {path: dogearContext});
	 	}
	}
	else {
		el.style.display="";
		img.className = 'lotusSprite lotusArrow lotusTwistyOpen';		
		if (imgAltOpen) {imgAltOpen.style.display = "";}
		if (imgAltClosed) {imgAltClosed.style.display = "none";}
		if (divToggle == 'dogearPeopleArea' || divToggle == 'dogearTagArea' || divToggle == 'mnContentDiv' || divToggle == 'mbContentDiv'){
	 		dojo.cookie(divToggle, 'open', {path: dogearContext});
	 	}
	}
}


function toggleNoStyle(name){
	if (dojo.byId(name).style.display == "none"){
		new dojo.fx.Toggler({node: name, showDuration: 100, showFunc: dojo.fx.wipeIn}).show();
	}else {
		new dojo.fx.Toggler({node: name, showDuration: 100, showFunc: dojo.fx.wipeOut}).show();
	}
	
}

//function to open help window to a certain size
function openHelpWindow(dogearContextPath, url, windowName) {
	if (dogearContextPath == null || dogearContextPath == ''){
		dogearContextPath = dogearBaseUrl;
	}
    var h = window.screen.height / 4;
    if (h < 800)
    	h = 800;
    var w = window.screen.width / 4;
    if (w < 800) //should match min width in main.css
    	w = 900;
	var options="height="+h+",width="+w+",status=yes,toolbar=yes,menubar=no,location=yes,scrollbars=yes,resizable=yes";
	if(windowName != null){
	var dogearHelpWindow = window.open(dogearContextPath + url, windowName, options);
	}
	else{
    var dogearHelpWindow = window.open(dogearContextPath + url, "helpWindow", options);
    }
	dogearHelpWindow.focus();
    
    }
    
 
    
    //function to close Welcome Box and Set Cookie
    function closeWelcomeBox(){
    Dogear.Util.setCookie("dogear.newuserhelp", 'hide');
    var welcomeDiv = document.getElementById('lotusWelcomeBox');
    welcomeDiv.style.display = "none";
    
    // don't understand why reload page here..only close an welcome box..
    //reload the page
    //window.location.reload(true) 
     }
     
     //function to switch view from list view and cloud view on tag cloud
     function toggleCloudListView(view, location, hideLocation){
     Dogear.Util.setCookie("dogear.listcloudview", view);
     var divToDisplay = document.getElementById(location);
     divToDisplay.style.display = "inline";
     var divToHide = document.getElementById(hideLocation);
     divToDisplay.style.display = "none";
     //reload the page
      window.location.reload(true) 
     }
     
     function showLightBox(lightBoxDiv){
     		document.getElementById(lightBoxDiv).style.left="200px";
     		document.getElementById(lightBoxDiv).style.top="200px";
			var vOverlay=document.getElementById(lightBoxDiv+"_overlay");	
			//have to use javascript to get overlay to be as tall as the whole page
			var body = document.documentElement ? document.documentElement : document.body;
			var windowHeight = window.innerHeight ? window.innerHeight : body.clientHeight;	
			if (body.scrollHeight > windowHeight) windowHeight = body.scrollHeight;	
			vOverlay.style.height=windowHeight+ "px";
			vOverlay.style.display="block";	
     }
     
     function hideLightBox(lightBoxDiv){
     		var vTagPopup=document.getElementById(lightBoxDiv).style.left="-9999px";
			document.getElementById(lightBoxDiv+"_overlay").style.display="none";
     	
     }
     
     function createAltTextForHCMode(isBidi){
     	if (dojo.byId("dogearTagImage")){
        	dojo.byId("dogearTagImage").innerHTML = "<span id='dogearTagImageAltTextOpen' class='lotusAltText'>▼</span>";
        	if (isBidi){
        		dojo.byId("dogearTagImage").innerHTML += "<span id='dogearTagImageAltTextClosed' class='lotusAltText' style='display:none;'>◄</span>";
        	}else{
        		dojo.byId("dogearTagImage").innerHTML += "<span id='dogearTagImageAltTextClosed' class='lotusAltText' style='display:none;'>►</span>";
        	}
        }
        if (dojo.byId("dogearPeopleImage")){
        	dojo.byId("dogearPeopleImage").innerHTML = "<span id='dogearPeopleImageAltTextOpen' class='lotusAltText'>▼</span>";
        	if (isBidi){
        		dojo.byId("dogearPeopleImage").innerHTML += "<span id='dogearPeopleImageAltTextClosed' class='lotusAltText' style='display:none;'>◄</span>";
        	}else{
        		dojo.byId("dogearPeopleImage").innerHTML += "<span id='dogearPeopleImageAltTextClosed' class='lotusAltText' style='display:none;'>►</span>";
        	}
        }
        var mbImage = dojo.byId('mbImage');
        var mnImage = dojo.byId('mnImage');
        if (mbImage) {
        	mbImage.innerHTML = "<span id='mbImageAltTextOpen' class='lotusAltText'>▼</span>";
        	if (isBidi) {
        		mbImage.innerHTML += "<span id='mbImageAltTextClosed' class='lotusAltText' style='display:none;'>◄</span>"; 
        	}else {
        		mbImage.innerHTML += "<span id='mbImageAltTextClosed' class='lotusAltText' style='display:none;'>►</span>";
        	}
        }
        if (mnImage) {
        	mnImage.innerHTML = "<span id='mnImageAltTextOpen' class='lotusAltText'>▼</span>";
        	if (isBidi) {
        		mnImage.innerHTML += "<span id='mnImageAltTextClosed' class='lotusAltText' style='display:none;'>◄</span>"; 
        	}else {
        		mnImage.innerHTML += "<span id='mnImageAltTextClosed' class='lotusAltText' style='display:none;'>►</span>";
        	}
        }
     }
/* Copyright IBM Corp. 2006, 2009  All Rights Reserved.              */


	var pivotBrowseTag = function() {
		var s = dojo.byId('taginput').value;
		if(s == ''){
		//do nothing
		}
		else{
			dojo.byId('taginput').value = '';
			s = s.replace(/^ +| +$/g, '');
			s = s.replace(/ +/g, ' ');
			dojo.byId('tagfield').value = dojo.byId('tagfield').value +  ' ' + s;
			dojo.byId('tagfield').value = dojo.byId('tagfield').value.replace(/^ +| +$/g, '');
			dojo.byId('actualtagform').submit();
			
		}
	
	};
	
	var checkTagLength = function(id) {
		var s = dojo.byId(id).value;
		var tags = s.split(/\s+|,/);
		for(var count = 0; count < tags.length; count++){
			var tag = tags[count];
			
			if(tag.length > 255) {
				alert(dojo.i18n.getLocalization("lconn.dogear","strings").taglengthalert+tag.substr(0,50)+'...');
				return false;
			}			
		}
		return true;
	};
	
var TagHoverHandler = {
	href: null,
	args: {},
	cache: {},
	
	process: function(){
		if (!TagHoverHandler.cache[TagHoverHandler.args["tag"]]){
			dojo.xhrGet({
				url: TagHoverHandler.href,
				content: {
						  email: (TagHoverHandler.args.email?TagHoverHandler.args["email"]:""),
						  tag: TagHoverHandler.args["tag"], 
						  view: TagHoverHandler.args["currentServlet"]
						 },
				handleAs: "json",
				handle: TagHoverHandler.createHover,
				timeout: 5000
			});
		}else {
			TagHoverHandler.createHover(null, TagHoverHandler.cache[TagHoverHandler.args["tag"]]);
		}
	},
	
	createHover: function(request, cachedResult){
		var response;
		if (!cachedResult){
			eval("response = " + request.responseText + ";");
			TagHoverHandler.cache[TagHoverHandler.args["tag"]] = response;
			if (response.tagcounts.length == 0) return;
		}else {
			response = cachedResult;
		}
		
		if (!dojo.byId("tagHoverDiv")){
			var div = document.createElement("DIV");
			div.className = "tagStatDetailPopup";
			div.style.display = "none";
			div.id = "tagHoverDiv";
			document.body.appendChild(div);
		}
		
		var s = "<ul>";
		for(var i=0;i<response.tagcounts.length;i++){
			s = s + "<li><div class='count'>" + response.tagcounts[i].count + "</div><div class='taglabel'>" + response.tagcounts[i].tag + "</div></li>";
		}
		s = s + "</ul>";
		dojo.byId("tagHoverDiv").innerHTML = s;
		var left = 0, top = 0;
		var pnode = TagHoverHandler.args.element;
		while(pnode != document.body){
			left += pnode.offsetLeft;
			top += pnode.offsetTop;
			pnode = pnode.offsetParent;
			left += pnode.scrollLeft;
			top += pnode.scrollTop;
		}
		//left += TagHoverHandler.args.element.offsetWidth;
		top += TagHoverHandler.args.element.offsetHeight;
		
		//dojo.byId("tagHoverDiv").style.right = (document.documentElement.offsetWidth - left - TagHoverHandler.args.element.offsetWidth) + "px"
		dojo.byId("tagHoverDiv").style.left = left + "px";
		dojo.byId("tagHoverDiv").style.top = top + "px";
		if (TagHoverHandler.args.element.attachEvent){
			TagHoverHandler.args.element.attachEvent("onmouseout", TagHoverHandler.hide);
		}else {	
			TagHoverHandler.args.element.addEventListener("mouseout", function(event){TagHoverHandler.hide();}, true);
		}
		Element.show(dojo.byId("tagHoverDiv"));
	},
	
	showHover: function(node, evt, tag, url, email, currentServlet){
		TagHoverHandler.href = url;
		TagHoverHandler.args.tag = tag;
		TagHoverHandler.args.element = node;
		TagHoverHandler.args.event = evt;
		TagHoverHandler.args.currentServlet = currentServlet;
		if (email) TagHoverHandler.args.email = email;
		TagHoverHandler.process();
	},
	
	hide: function(){
		if (dojo.byId("tagHoverDiv")){
			Element.hide(dojo.byId("tagHoverDiv"));
		}
	}
};
/* Copyright IBM Corp. 2001, 2008  All Rights Reserved.               */

/*version 1.07.2 5/5/08*/
/* lconn.core.Menu

	CS 5/7/08
	showed the iframe using the dojo.appear effect also, to keep it from appearing before the popup element and hiding the popup appear affect.
	
	CS 5/5/08
	fixed iframe positioning in IE.  Needed to write out style attributes after the iframe and container elements were written to the page.
	
	CS 4/26/08
	Added iframe that is positioned behind the popup for accessibility in High Contrast mode.  Rather than rely on testing for high contrast, we just do this for every popup. 
  
   Begin Comment Port - VB
   
   Port to Dojo 1.0.2: Vincent Burckhardt (VB)
   		- Removed dependencies on prototype.js for the fading effects. Use of dojo.fadeIn and dojo.fadeOut instead
   		- Replaced some parts of the code with equivalent dojo functions when possible
   		- Switched to the Dojo syntax to declare classes
   		- All the functionalities of the popup stay the same
   
   Begin Comment Port - VB
   
   Author: Tim Finley (finleyt@us.ibm.com)
   Based off of Chris Samoiloff's menu.js  
   
   A small library to help display "modal" and "modeless" popups. Note these are not
   the true definition of modal and modeless, but close enough.
   
   For "modal" popups use the Popup object. These popups will not disappear unless you
   explicitly call Popup.hide( <id> )
   
   For "modeless" popups use the MenuPopup object. Only one "modeless" popup can be open
   at a time. Also these popus will automatically disappear if the user presses ESC or
   clicks the mouse anywhere on the page (other than the popup).
   
   !!! IMPORTANT NOTES !!!
   
   For Popups to work every popup needs to have certain styles. I recommend to make your
   popup html like this:
   
	   <div id="popupId" class="popup">
	   		... popup contents ...
	   </div>
   
   And use the following CSS styles
   
	   .popup { position: absolute;
	   			left: -9999px;
	   			z-index: 200;
	   			
	   			// These last styles are optional, just my suggested defaults
	   			background-color: white;
	            width: 20em;
	            float: none;
	            text-align: left;
	          }
   
   For MenuPopups to work you need to use this javascript. I haven't included it in this
   js file just in case you already have functions for doc onclick or onkeyup. 
   
		document.onclick = function () {
			MenuPopup.hideMenu();
		};
		document.onkeyup = function ( event ) {
			MenuPopup.hideOnKeypress( event );
		};
	
	!!! !!!
   
   
   Examples:
   
   This will show a popup. Note the third parameter is optional.
   
   		Popup.show( <idOfPopup>, event, { focus: <Element to focus on popup close. If you
                                                  care to return focus then most of the time
                                                  you'll pass "this" here>,
                                          state: { <This state is used to store data that
                                                    other javascript code may need to use.
                                                    Use this instead of setting global
                                                    variables> }
   		} );
   
   This will hide a popup.
   
	   Popup.hide( <idOfPopup> );
   
   This will show a the object with id 'helpbubbleId' as a MenuPopup, the options are the
   same as above.
   
	   MenuPopup.showMenu( 'helpbubbleId', event, { focus: this } );
   
   Some added functions, by Chris S, 1/9/08
		
		MenuPopup.showMenu('helpbubbleId', event, {{placement:xyvalues, closeFunction:'functionName(\'param1\', param2)'})
   			placement - xyvalues are sent as a string, delimited by a comma (or a variable that contains that string).  Examples ("left, bottom" or "left, above" or exact pixels like "20,50") x constants are left and right.  y constants are top, bottom, and above (above positions the whole menu above the trigger element)
			functionName - this allows you to pass a function (with its parameters), which will be executed when the menu closes.  Uses for this are to reset UI that was changed programatically when the menu was displayed.

   VB : Added 1/18/08. Possibility to pass a "pointer" for closeFunction. Example:
                    function testCloseFct(st){
			alert(st);
		}	
		var someStr = "Hello World"; 
		var closeFctPtr = dojo.hitch(null, "testCloseFct", someStr);
		MenuPopup.showMenu('helpbubbleId', event, {{placement:xyvalues, closeFunction:closeFctPtr})

		
   This will hide the currently open MenuPopup (since only one is open at a time).
   
   		MenuPopup.hide();
 

   Some other useful functions are
   		Popup.getState( <id> ) - return the saved state of a particular popup
   		Popup.getReturnFocus() - return focus that will be set after the popup closes
   		Popup.setReturnFocus() - change the return focus
   		Popup.isOpen( <id> )   - see if a particular popup is open
   		
   		MenuPopup.getState( )  - get the state of the currently open MenuPopup
   		MenuPopup.isOpen()     - check to see if there is a MenuPopup open
   		
   
*/

dojo.provide("lconn.core.Menu");

dojo.declare("lconn.core.PopupClass", null, {
	
	open: { },		//array of the open popups
	returnFocusElement: false,
	numOpenPopups: 0,
	passedState: { },
	toggler: null,
	
	CONTAINER: 'oa-popup-container',
	BACKGROUND: 'oa-popup-iframe',
	
	constructor: function( ) {
		
	},
	
	show: function ( id, event, options ) {	
		options = options || {};		
		/* don't open the menu if it was previously open. This will cause clicking the link
	       to open the menu twice to toggle the popup */
		
		if (this.isOpen(id)){
			this.hide( id );			
		} else {
			if ( options.focus ) {
				this.returnFocusElement = options.focus;
			}
			
			//if (dojo.hasClass(dojo.body(), "dijit_a11y")) this.setHighContrast(true);
			
			event = dojo.fixEvent(event);
					
			var eventSource = event.target // ) ? event.target : event.srcElement; /*gets event target, depending on browser*/
			var popupElement = dojo.byId(id);
			
				
			
			var openPopupArray = {
				element: popupElement,
				state: options.state || {},
				placement: options.placement || "",
				callFunction: options.closeFunction || ""
			};
			
			var popupContainer = this.getPopupContainer();
			popupContainer.appendChild(popupElement); 
			var popupBackground = this.getPopupBackground();		
			
			this.open[ id ] = openPopupArray;			
			this.numOpenPopups++;			
			this.sizeBackground(popupElement, popupBackground, eventSource, event);
			var position = this.calculatePosition( popupElement, eventSource, event, openPopupArray.placement);
			new Popup.Effect.Appear( id, position.left, position.top );	
			new Popup.Effect.Appear( this.BACKGROUND, position.left, position.top );
			dojo.stopEvent(event);
		}//end if	
	},	
	
	hide: function ( id, options ) {
		var element = dojo.byId(id);
		dojo.byId(this.BACKGROUND).style.display="none";
		new Popup.Effect.Fade(element);
		var popup = this.open[id];
		
		this.numOpenPopups--;
		
		if ( this.numOpenPopups == 0 && this.returnFocusElement ) {
			dojo.byId(this.returnFocusElement).focus();
			this.returnFocusElement = false;
		}
		
		this.open[ id ] = false;
		
		if (dojo.isString(popup.callFunction))
			eval(popup.callFunction)//this runs a close function, if one was passed from the menu open call.  You need to include parameters with the function, if they are required.
		else if (dojo.isFunction(popup.callFunction))
			popup.callFunction();		
	},
	
	isOpen: function ( id ) {
		var popup = this.open[ id ];
		return popup != false && popup !== null && popup !== undefined;		
	},
	
	getState: function( id ) {
		return this.open[ id ].state;
	},
	
	getReturnFocus: function() {
		return this.returnFocusElement;
	},
	
	clearReturnFocus: function() {
		var returnFocus = this.returnFocusElement;
		this.returnFocusElement = false;
		return returnFocus;
	},
	
	getPopupBackground: function ( ) {
	
		var popupBackground = dojo.byId(this.BACKGROUND);		
		if ( popupBackground == null ) {		
			var popupBackground = dojo.doc.createElement("iframe");
			popupBackground.setAttribute( 'id', this.BACKGROUND );
			popupBackground.setAttribute('frameBorder', 'no');
			popupBackground.setAttribute('tabindex', '-1');
			popupBackground.src = 'javascript:""';
			// and we need to make the popupBackground "layer" right under the popup container, whose z-index is 900
			//popupBackground.setAttribute( 'style', 'position: absolute; left: 0; top: 0; z-index:899;' );
			document.body.appendChild( popupBackground );
			//sometimes it's less buggy to set attributes after the element is added to the page.
			popupBackground = dojo.byId(this.BACKGROUND);
			popupBackground.style.position="absolute";
			popupBackground.style.left="0";
			popupBackground.style.top="0";
			popupBackground.style.zIndex="1000";
		}else{
			popupBackground.style.display="block";
		}//end if
		
		return popupBackground;
		
	},
	
	getPopupContainer: function ( ) {
	
		var popupContainer = dojo.byId(this.CONTAINER);
		
		if ( popupContainer == null ) {
		
			var popupContainer = document.createElement( 'div' );
			popupContainer.setAttribute( 'id', this.CONTAINER );
			
			// Make the popupContainer be a separate containg block with a high z-index
			// This is necessary since separate containing blocks have separate z orderings
			// and we need to make the popupContainer "layer" on top of everything else
			//popupContainer.setAttribute( 'style', 'position: absolute; left: 0; top: 0; z-index: 900;' );
			document.body.appendChild( popupContainer ); 
			//sometimes it's less buggy to set attributes after the element is added to the page.
			popupBackground = dojo.byId(this.CONTAINER);
			popupBackground.style.position="absolute";
			popupBackground.style.left="0";
			popupBackground.style.top="0";
			popupBackground.style.zIndex="1100";
		}
		
		return popupContainer;
		
	},
	
	menuGetOffsetTop: function (pElem,pOTOP){
		//this function is called recursively until we get to the body element.  Not needed for absolutely positioned items.
		var offset = 0;
		offset = dojo.coords(pElem,true).y;
		return offset;
	},
	
	menuGetOffsetLeft: function (pElem,pOLEFT){
		//this function is called recursively until we get to the body element. Not needed for absolutely positioned items.
		var offset = 0;
		var curElem = pElem;
		while (curElem){
			offset += curElem.offsetLeft;
	   		curElem = curElem.offsetParent;
	   		if (curElem) offset -= curElem.scrollLeft;
	   	}
		return offset;
	},
	
	/* Calculate postion will ensure that the popup is placed on the screen near the clicked element,
	   according to the following rules. 
	   
	   If the whole popup will fit on screen where it was intended (just below the clicked element) this
	   fuction will return those x and y values.
	   
	   If the popup will appear below the bottom of the page (part of the popup is cut off the bottom)
	   then the popup will appear above the clicked element, except...
	   
	   If when the popop is displayed above the element it cuts cut off the top of the page, or the general case
	   the popup has a height larger than the page then the popup will just appear flush to the top of the page.
	   
	   These rules also apply similarly to the left-right of the page.
	   
	   To sum it up, this just trys to display as much of the popup as possible preventing overlapping the edges
	   of the page when possible.
    */
		
	calculatePosition: function ( popupElement, eventSource, event, placement ) {
		//sets the menu position
		//normal position is a tad offset from the element that triggered the menu
		
		// to get the position for the drop down menu in case of RTL and LTR
		
		//sets the menu position
		//normal position is a tad offset from the element that triggered the menu
		
		// to get the position for the drop down menu in case of RTL and LTR
		var menuLeftOffset;
		//no offset if we have been passed placement values
		if (placement==""){
			if( typeof( bidir) != "undefined" && bidir != null && bidir =='rtl') {
				menuLeftOffset = (popupElement.offsetWidth > 0)? popupElement.offsetWidth : 175; // assume default value for menu if offsetWidth is zero. 		
				menuLeftOffset = 24 - menuLeftOffset;
			}else{
				menuLeftOffset = eventSource.offsetWidth - 24	;
			}
		
			var popupY = ( this.menuGetOffsetTop(eventSource,0) + eventSource.offsetHeight - 10);	
			var popupX = ( this.menuGetOffsetLeft(eventSource,0) + menuLeftOffset);
		}else{//placement has a value
			menuLeftOffset=0;
			var placementArray=placement.split(",");
			//left coordinate
			switch (placementArray[0]){
				case "left":
					popupX=this.menuGetOffsetLeft(eventSource,0);
					break;
				case "right":
					popupX=this.menuGetOffsetLeft(eventSource,0) + eventSource.offsetWidth;
					break;
				default:
					popupX=parseInt(placementArray[0]);
			}//end switch
			//top coordinate
			switch (placementArray[1]){
				case "above":
					popupY=this.menuGetOffsetTop(eventSource,0) - popupElement.offsetHeight;
					break;
				case "top":
					popupY=this.menuGetOffsetTop(eventSource,0);
					break;
				case "bottom":
					popupY=this.menuGetOffsetTop(eventSource,0) + eventSource.offsetHeight;
					break;
				default:
					popupY=parseInt(placementArray[1]);
			}//end switch
		}//end if
		
		//check to make sure position is not offscreen and adjust, if it is
		
		// IE vs Firefox properties
		var body = document.documentElement ? document.documentElement : document.body;
		var windowHeight = window.innerHeight ? window.innerHeight : body.clientHeight;
		var windowWidth = window.innerWidth ? window.innerWidth : body.clientWidth;
		var scrollX = document.all ? document.body.scrollLeft : window.pageXOffset;
		var scrollY = document.all ? document.body.scrollTop : window.pageYOffset;
		if ((popupY + popupElement.offsetHeight) > (windowHeight + scrollY) ) popupY -= popupElement.offsetHeight;	
		if ((popupX + popupElement.offsetWidth) > (windowWidth + scrollX) ) popupX -= popupElement.offsetWidth;
		
		//check to make sure our adjustments didn't result in values less than the scrolled edge of the page
		if (popupY < scrollY) popupY = scrollY;
		if (popupX < scrollX) popupX = scrollX;
		
		// VB: fix for Safari
		if (dojo.isSafari){
			popupX += scrollX;
			popupY += scrollY;			
		}
		
		return { left: popupX  + "px", top: popupY + "px" };
	},
	
	sizeBackground: function (popupElement, popupBackground, eventSource, event) {
		popupBackground.width=popupElement.offsetWidth;
		popupBackground.height=popupElement.offsetHeight;
	}});


dojo.declare("lconn.core.MenuPopupClass", lconn.core.PopupClass, 
	{
		currentMenu: false,
		
		hideMenu: function(options){
			if ( this.currentMenu ) {
				this.hide( this.currentMenu );
				this.currentMenu = false;
			}
		},
		
		showMenu: function(id, event, options){
			var tempCurrentMenu = this.currentMenu;
			this.hideMenu();
			
			// if you are trying open the existing menu then don't reshow it (causing it to toggle off)
			if ( id != tempCurrentMenu ) {
				this.currentMenu = id;
				this.show( id, event, options );
			}			
		},
		
		hideOnKeypress: function(event){
			if( typeof(event) != "undefined" && event !== null && event.keyCode == Event.KEY_ESC) {
				MenuPopup.hideMenu();
			}
		},
		
		isMenuOpen: function(){			
			if ( this.currentMenu ) {
				return true;
			}
			return false;			
		},
		
		getState: function(){
			if ( this.currentMenu ) {
				return this.open[ this.currentMenu ].state;
			}
		}});

Popup = new lconn.core.PopupClass();
MenuPopup = new lconn.core.MenuPopupClass();

/* Custom Popup Effects */




Popup.Effect = {};

Popup.Effect.DURATION = 250;

/* Fade out the popup to 0 opacity and move it off the page
   We can't set display: none since that will break our offset
   calculations in some Firefox versions */
Popup.Effect.Fade = function(element) {	
  element = dojo.byId(element);
  var oldOpacity = dojo.style(element, "opacity");
  
  var anim = dojo.fadeOut({node: element, duration: Popup.Effect.DURATION})
  
  dojo.connect(anim, "onEnd", function(){
  					dojo.style(element, "opacity", oldOpacity);
					dojo.style(element, "left", "-9999px")
  				});
  
  anim.play();
}

/* Fade in the popup and move it to (x,y) on the page */
Popup.Effect.Appear = function(element, x, y) {
	element = dojo.byId(element);	
	
	dojo.style(element, "opacity", 0);	
	dojo.style(element, "left", x);
	dojo.style(element, "top", y);	
	dojo.fadeIn({node: element, duration: Popup.Effect.DURATION}).play();	
}
/* Copyright IBM Corp. 2008, 2009  All Rights Reserved.              */
var _memberList = {};


_memberList.members = [];
_memberList.scrollThreshold = 4;
_memberList.memberElementHeight = 28;
//_memberList.personInLine = 4;

_memberList.init = function(widget, widgetParent){
	_memberList.typeAhead_W = widget;
	if (_memberList.holderElement) {
		_memberList.holderElement.innerHTML = "";
		_memberList.holderElement.style.display = "none";
	}
	this.holderElement = null;
	this.widgetParent = widgetParent;
	this.members = [];
	this.repaint();
	dojo.connect(this.typeAhead_W, "_doSelect", this, "add");
}

_memberList.add = function(){
	
	var pObj = null;
	if (this.typeAhead_W.getItem()){
		pObj = this.typeAhead_W.getItem();
	}else {
		var val = this.typeAhead_W.getTextBoxValue();
		if (!val.match(/.*@.*\..*/)) return;
		pObj = {};
		pObj.name = val;
		pObj.userid = val;
	}
	for(var i=0;i<this.members.length;i++){
		if (this.members[i].userid == pObj.userid) {
			this.typeAhead_W.reset();
			return;
		}
	}
	this.members.push(pObj);
	this.repaint(); 
	this.typeAhead_W.reset();
}

_memberList.removeMember = function(/*json*/ user){
	var found = false;
	for(var i=0;i<this.members.length;i++){
		if (this.members[i].userid == user.userid) {
			found = true;
			this.members.splice(i, 1); // remove this user from member list
			break;
		}
	}
	if (!found) return;
	this.repaint();
}

_memberList.repaint = function(){
	if(this.holderElement){
		this.holderElement.innerHTML = "";
		this.holderElement.style.display = "";
		this.holderElement.style.height = "auto"
	}else {
		var divHolder = document.createElement("div");
		divHolder.className = "memberList scroll";
		this.holderElement = divHolder;
		this.widgetParent.parentNode.insertBefore(this.holderElement, this.widgetParent)
	}
	if (this.members.length == 0) {
		this.widgetParent.style.width = "95%"
		this.holderElement.style.display = "none";
		if (dojo.byId('notifiedUsers') && dojo.byId('notifiedUsers').value){
			dojo.byId('notifiedUsers').value = "";
		}
		return;
	}
	this.widgetParent.style.width = "50%";
	var html = "";//"<div style='width:100%;'>"
	var membersStr = "";
	for(var i=0; i<this.members.length; i++){
		var personName = this.members[i].name + (this.members[i].member?"<" +this.members[i].member + ">" : "");
		var cardHtml = lconn.core.NameUtil.getHTML(personName, null, this.members[i].userid, null, true);
		html += "<div class='member'><nobr><span class='picon'>&nbsp;&nbsp;</span>&nbsp;"
				+ "<span class='nameContent'>" 
				+ cardHtml
				+ "<input type='button' class='fieldDel' title=\"" + altTxtForPersonRemoval + "\" onclick='_memberList.removeMember(_memberList.members["+i+"])'>" 
				+ "<span class='fieldDelText' title=\"" + altTxtForPersonRemoval + "\">X</span>"
				+ "</span></nobr></div>";
		membersStr += ("<" + this.members[i].userid + ">") + ", ";
	}
//	html += "</div>"
	html += "<input type='hidden' id='notifiedUsers' name=\"users\" value=\"" + membersStr + "\">";
	this.holderElement.innerHTML = html;
	if (this.members.length > this.scrollThreshold) {
		this.holderElement.style.overflow = "auto";
		this.holderElement.style.height = this.memberElementHeight * this.scrollThreshold + "px";
		this.holderElement.scrollTop = (this.members.length - this.scrollThreshold) * this.memberElementHeight;
	}
	if ( window.SemTagSvc && SemTagSvc.parseDom && SemTagSvc.service != null ){
            SemTagSvc.parseDom(0,this.holderElement);
    }
}
/* Copyright IBM Corp. 2007, 2009  All Rights Reserved.              */

var DOGEAR = {
	init: function() {
		this.Now = new Date();
		this.Now_Mills = this.Now.getTime();
	}
}

DOGEAR.date = {
	MILLS_IN_DAY:       86400000,
	
	Days: dojo.i18n.getLocalization("dojo.cldr", "gregorian")['days-format-wide'],
	Month: dojo.i18n.getLocalization("dojo.cldr", "gregorian")['months-format-abbr'],
	Today: dojo.i18n.getLocalization("lconn.dogear","strings").today,
	Yesterday: dojo.i18n.getLocalization("lconn.dogear","strings").yesterday,
	Tomorrow: dojo.i18n.getLocalization("lconn.dogear","strings").tomorrow,
	
	delta: function ( dateMillis ) {
		var todayMidnight = new Date();
		todayMidnight.setHours(0);
		todayMidnight.setMinutes(0);
		todayMidnight.setSeconds(0);
		todayMidnight.setMilliseconds(0);
	
		var diff  = todayMidnight.getTime() - dateMillis;
		/* calculate the number of days way from now the date is
		 * this uses the truncate function (we defined it) since floor() won't
		 * work with negative numbers */
		var dayDelta = Math.ceil( diff / ( DOGEAR.date.MILLS_IN_DAY) );	
		return dayDelta;
	},
	
	localize: function ( dateMillis, onlydate ) {
		var serverDate = new Date();
		serverDate.setTime( dateMillis );
		var dayDelta = DOGEAR.date.delta(dateMillis);
		var resultTime = "";
		
		if ( dayDelta <= 2 && dayDelta >= -2) {
		
			if ( dayDelta == 2 ) {
				//output "<day name> at hour"
				if(onlydate === undefined)
					resultTime = DOGEAR.date.Days[ serverDate.getDay() ] + " " + DOGEAR.date.getLocalizedTime( serverDate );
				else
					resultTime = DOGEAR.date.Days[ serverDate.getDay() ];			
			} else if( dayDelta == 1 ) {
				//output "Yesterday at hour"
				if(onlydate === undefined)
					//resultTime =  DOGEAR.date.Yesterday + DOGEAR.date.correctHoursAndMins( serverDate );
					resultTime =  DOGEAR.date.Yesterday + " " + DOGEAR.date.getLocalizedTime( serverDate );
				else
					resultTime =  DOGEAR.date.Yesterday;
			} else if( dayDelta == 0 ) {
				//output "Today at hour"
				if(onlydate === undefined)
					//resultTime =  DOGEAR.date.Today + DOGEAR.date.correctHoursAndMins( serverDate );
					resultTime =  DOGEAR.date.Today + " " + DOGEAR.date.getLocalizedTime( serverDate );
				else
					resultTime =  DOGEAR.date.Today;
			} else if( dayDelta == -1 ) {
				//output "Tomorrow"
				resultTime =  DOGEAR.date.Tomorrow;
			} else if( dayDelta == -2 ) {
				//output "<day name>"
				resultTime = DOGEAR.date.Days[ serverDate.getDay() ];
			}
			
		} else  if ( DOGEAR.Now.getFullYear() == serverDate.getFullYear() ) {
			//output "<day num> <month>"
			var mainLocale = dojoLocale.substring(0,2);
			if(mainLocale == 'en'){
				resultTime = serverDate.getDate() + " " + DOGEAR.date.Month[ serverDate.getMonth() ];
			}else {
				resultTime = DOGEAR.date.getLocalizedDate(serverDate);
			}
		} else {
			//output "<day num> <month> <year>"
			var mainLocale = dojoLocale.substring(0,2);
			if(mainLocale == 'en'){
				resultTime = serverDate.getDate() + " " + DOGEAR.date.Month[ serverDate.getMonth() ] + " " + serverDate.getFullYear();
			}else {
				resultTime = DOGEAR.date.getLocalizedDate(serverDate);
			}
		}
		
		//return "<span title=\"" + serverDate.toLocaleString() + "\">" + resultTime + "</span>";
		return resultTime;
	},
	
	getLocaleString: function(dateMillis){
		var serverDate = new Date();
		serverDate.setTime( dateMillis );
		return serverDate.toLocaleString()
	},


	correctHoursAndMins: function( date ) {
		var hours = date.getHours();
		var mins = date.getMinutes();
		
		if (mins < 10) {
			mins = "0" + mins;
		}
		
		var resultTime = "";
		
		if ( hours == 0 ) {
			resultTime = "12:" + mins + "am";
		} else if ( hours < 12) {
			resultTime = hours + ":" + mins + "am";
		} else if ( hours < 13) {
			resultTime = hours + ":" + mins + "pm";
		} else {
			resultTime = (hours - 12) + ":" + mins + "pm";
		}
		
		return resultTime;
	},
	
	getLocalizedTime: function( date ) {
		return dojo.date.locale.format(date, {selector:'time',formatLength:'short', locale:dojoLocale });
	},
	
	getLocalizedDate: function( date ) {
		return dojo.date.locale.format(date, {selector:'date',formatLength:'short', locale:dojoLocale  });
	}
}

DOGEAR.init();

function hasClassName ( id, classToCheck ) {
	var element = document.getElementById( id );
	var classes = element.className;
	return /classToCheck/.test( classes );
}

function addClassName ( id, classToAdd ) {
	var element = document.getElementById( id );
	var classes = element.className;
	element.setAttribute( 'class', classes + ' ' + classToAdd );
	element.setAttribute( 'className', classes + ' ' + classToAdd );  //for IE
}
/* Copyright IBM Corp. 2007, 2009  All Rights Reserved.              */


var currentEditForm = null; //actually using sourrounding div id instead of form's id
var currentLink = null;
var currentTargetItem = null;
var currentLinkOwner = null;
var currentIndex = null;
var currentFormType = null;

var checkboxes = [];
function registerCheckbox(c) { checkboxes.push(c); c.checked=false }
function scb(b) { checkboxes.each( function (c) { if (c.checked != b) c.click() }) }
var selectedUrls = [];
var selectedLinkNames = [];
var selectedPrivateLinksCount = 0;
//Array.prototype.without=function(val){for(var i=0;i<this.length;i++){if (this[i] == val){this.splice(i, 1);i--;}}return this;}
function deleteArrayElement(e, array){
	for(var i = 0;i < array.length; i++){
		if (array[i] == e){
			array.splice(i, 1);
			i--;
		}
	}
	return array;	
}

function clearCurrentForm(){
	document.getElementById(currentEditForm).style.display='none';
	currentEditForm = null;
}


function setSelected(url, selected, isPrivate){
	if (selected){
		selectedUrls.push(url);
		if (isPrivate){
			selectedPrivateLinksCount++;
		}
	}else{
		//selectedUrls = selectedUrls.without(url);
		selectedUrls = deleteArrayElement(url, selectedUrls);
		if (isPrivate){
			selectedPrivateLinksCount--;
		}
	}
}

function setLinkNames(name, selected)
{
	if (selected)
		selectedLinkNames.push(name);
	else
		//selectedLinkNames = selectedLinkNames.without(name);	
		selectedLinkNames = deleteArrayElement(name, selectedLinkNames);
}

function cancelFormDisplay(formToClose){
	displayHideElement(formToClose);
	currentEditForm = null;
}

function displayLinkNames(formToToggle, linkNamesSpan){
//check if user has selected any links
if(selectedUrls.length < 1){
	alert(dojo.i18n.getLocalization("lconn.dogear","strings").nobookmarkselected);
	return false;
}

//check if another form is open

	if(currentEditForm != null && currentEditForm != formToToggle){		
		if(confirm(dojo.i18n.getLocalization("lconn.dogear","strings").existingformopen)){ //user wants to change action
			clearCurrentForm();
			showUpdateLinks(formToToggle, linkNamesSpan);
			return true;
		}
		return false;
	}
	else if(currentEditForm == formToToggle){ //close the form
		currentEditForm = null;
		dojo.byId(formToToggle).style.display='none';
		return false;
	}else{ //show the form
		showUpdateLinks(formToToggle, linkNamesSpan);
		return true;
	}
}

function toggleForm(formId, type, linkId){
	//check if another form is open
	if(currentEditForm != null && currentEditForm != formId){		
		if(confirm(dojo.i18n.getLocalization("lconn.dogear","strings").existingformopen)){ //user wants to change action
			if(currentFormType == 'notify') cancelNotifyForm();
			else cancelBrokenURLForm();
			
			if(type == 'notify') showNotifyForm(formId, linkId);
			else showBrokenURLForm(formId);
			return true;
		}
		return false;
	}
	else if(currentEditForm == formId){ //close the form
		if(currentFormType == 'notify') cancelNotifyForm();
		else cancelBrokenURLForm();
		return false;
	}else{ //show the form
		if(type == 'notify') showNotifyForm(formId, linkId);
		else showBrokenURLForm(formId);
		return true;
	}
}

function showNotifyForm(formId, linkId){
	var notificationForm = document.getElementById('NotificationForm');
	var notifyLinks = document.getElementById('notifyLinks');
	notifyLinks.value = linkId;
	var notifyForm = document.getElementById(formId);
	notifyForm.appendChild(notificationForm);
	notifyForm.style.display = '';
	currentEditForm = formId;
	currentLink = linkId;
	currentFormType = 'notify';
}

function cancelNotifyForm(){
	var notificationForm = document.getElementById('NotificationForm');
	var notifyLinks = document.getElementById('notifyLinks');
	notifyLinks.value = '';
	var notifyForm = document.getElementById(currentEditForm);
	notifyForm.style.display = 'none';
	var formPool = document.getElementById('FormPool');
	formPool.appendChild(notificationForm);
	currentEditForm = null;
	currentLink = null;
	currentFormType = null;
}

function setCurrentActionTarget(linkId, index, linkOwner){
	currentTargetItem = linkId;
	currentLinkOwner = linkOwner;
	currentIndex = index;
}

function showBrokenURLForm(form){
	var brokenURL = document.getElementById('brokenUrl');
	brokenURL.value = currentTargetItem;
	var brokenURLOwner = document.getElementById('urlowner');
	brokenURLOwner.value = currentLinkOwner;
	var brokenComment = document.getElementById('FlagBrokenComment');
	brokenComment.innerHTML = document.getElementById('FlagBrokenComment_'+currentIndex).innerHTML;
	var flagAsBrokenForm = document.getElementById('FlagAsBrokenForm');
	var formId = 'FlagBrokenForm_'+currentIndex;
	var brokenForm = document.getElementById(formId);
	brokenForm.appendChild(flagAsBrokenForm);
	brokenForm.style.display = '';	
	currentEditForm = formId;
	currentFormType = 'brokenurl';
}

function cancelBrokenURLForm(){
	var flagAsBrokenForm = document.getElementById('FlagAsBrokenForm');
	var brokenForm = document.getElementById(currentEditForm);
	brokenForm.appendChild(flagAsBrokenForm);
	brokenForm.style.display = 'none';
	currentEditForm = null;
	currentFormType = null;
}

function showUpdateLinks(formToToggle, linkNamesSpan){
	currentEditForm = formToToggle;
	if(dojo.byId(formToToggle).style.display == 'none'){
		document.getElementById(linkNamesSpan).innerHTML =""; //reset
		var i=0;
		while(i < selectedLinkNames.length) {
			document.getElementById(linkNamesSpan).innerHTML += selectedLinkNames[i] +'<br/>';
			i++;
		}
	}
	displayHideElement(formToToggle);
}


function deleteMany(){
	if (selectedUrls.length == 0){
		alert(dojo.i18n.getLocalization("lconn.dogear","strings").nobookmarkselected);
		return;
		}
	if (selectedUrls.length == 1)
		msg = dojo.i18n.getLocalization("lconn.dogear","strings").deletesinglemsg;
	else
		msg = dojo.i18n.getLocalization("lconn.dogear","strings").deletemultimsg;
	if (!confirm(msg))
		return;
	dojo.byId('urlsToDelete').value = selectedUrls.join(",");
	dojo.byId('massDelete').submit();
}
function checkValues(){
	if (dojo.trim(dojo.byId("multiOldTags").value) == ""){
		alert(dojo.i18n.getLocalization("lconn.dogear","strings").nooldtag);
		return false;
	}
	if (dojo.trim(dojo.byId("multiNewTags").value) == ""){
		alert(dojo.i18n.getLocalization("lconn.dogear","strings").nonewtag);
		return false;
	}
	return true;
}
function multiNotify(){
	dojo.byId('multiNotifies').value = selectedUrls.join("+");
//	dojo.byId('multiNotifyForm').submit();
}
function checkAddTagsInput()
{
	if(dojo.trim(dojo.byId("multiTags").value.replace(/,/g, "").replace(/ /g, "")) == "") {
		alert(dojo.i18n.getLocalization("lconn.dogear","strings").notagspecified)
		return false;
	}
}

function addTagsToMany()
{
	dojo.byId('multiAddTags').value = selectedUrls.join(",");
	//dojo.byId('multiAddForm').submit();
}
function retagMany()
{
	dojo.byId('multiReTags').value = selectedUrls.join(",");
	//dojo.byId('multiRetagForm').submit();
}
function checkDelTagsInput()
{
	if(dojo.trim(dojo.byId("delTags").value.replace(/,/g, "").replace(/ /g, "")) == "") {
		alert(dojo.i18n.getLocalization("lconn.dogear","strings").notagspecified)
		return false;
	}
}
function deletetagMany()
{
	dojo.byId('multiDelTags').value = selectedUrls.join(",");
	//dojo.byId('multiDeltagForm').submit();
}

function setPublicBookmarkMany()
{
		if(selectedUrls.length < 1){
			alert(dojo.i18n.getLocalization("lconn.dogear","strings").nobookmarkselected);
			return;
		}
	dojo.byId('urlsToSetPublic').value = selectedUrls.join(",");
	dojo.byId('massPublic').submit();
}

function setPrivateBookmarkMany()
{
	if(selectedUrls.length < 1){
		alert(dojo.i18n.getLocalization("lconn.dogear","strings").nobookmarkselected);
		return;
	}
	dojo.byId('urlsToSetPrivate').value = selectedUrls.join(",");
	dojo.byId('massPrivate').submit();
}

function displayHideElement(elementToToggle){

	if(dojo.byId(elementToToggle).style.display=='none'){
		dojo.byId(elementToToggle).style.display='';
	}else{
		dojo.byId(elementToToggle).style.display='none';
	}
}

var editMode = Dogear.Util.getCookie("editMode");
if (editMode == null)
{
	Dogear.Util.setCookie("editMode", "false");
	editMode = false;
}
else
{
	editMode = (editMode == "true");
}

function setEditControlVisibility(element)
{
	if (Element.visible(element) != editMode) Element.toggle(element);
}

function toggleEditMode()
{
	editMode = !editMode
	Dogear.Util.setCookie("editMode", editMode ? "true" : "false");
	checkEditControls();
}

function checkEditControls()
{
	$A(document.getElementsByTagName('input')).each(function(element) {
		if (element.getAttribute("type") == 'checkbox')
			setEditControlVisibility(element);
	});
	$A(document.getElementsByClassName('editAction', 'editActions')).each(function(element) {
		setEditControlVisibility(element);
	});
	Element.removeClassName(dojo.byId('editToggle'), editMode ? 'off' : 'on');
	Element.addClassName(dojo.byId('editToggle'), editMode ? 'on' : 'off');
}
function focusElement(element){
	if (dojo.byId(element)){
		setTimeout(function(){
		try{
			dojo.byId(element).focus();
			dojo.byId(element).select();
		}catch(e){}
		}, 50);
	}
}
function showDialogBox(dialogid, divid){
	var dialogWidget = dijit.byId(dialogid);
	if(!dialogWidget){
		dialogWidget = new dijit.Dialog({id: dialogid}, dojo.byId(divid));
	}
	dialogWidget.getFocus = function(){
		switch(dialogid){
			case "importDialog":
				dojo.byId("importOption").focus();
				break;
			case "exportDialog":
				dojo.byId("access").focus();
				break;
			case "manageTagDialog":
				dojo.byId("tagsbefore").focus();
				break;
			default:
				return;
		}	
	}
	dojo.connect(dialogWidget, "show", dialogWidget, "getFocus");
	dialogWidget.show();
}
/* Copyright IBM Corp. 2001, 2008  All Rights Reserved.               */

/*this file replaces Menu.js for use with the dojo menu*/
dojo.declare("lconn.MenuUtility", null, {
	// contains the dom node that was last clicked/keypressed to open the menu
	openedBy: null,
 
	openMenu: function (evt, menuId){	
		// summary: open a dijit pointed by menuId (typically a dijit.Menu) in a popup placed around the node in evt.target
		//	typically called on a onclick event in the page (onclick="menuUtility.openMenu(event, 'id of your menu')"
		//	you can also use dojo.connect to bind it programmatically in a dom node
		var menu = dijit.byId(menuId);		
		
		// standardize the event (fix cross-browser differences)
		evt = dojo.fixEvent(evt);
		
		// store the DOM of the action link that opened the menu
		this.openedBy = evt.target;

		// open the menu, place it relative to the target position of the node
		dijit.popup.open({
			popup: menu,
			around: evt.target,
			orient: {'BL':'TL', 'BR':'TR', 'TL':'BL', 'TR':'BR'},
			onExecute: function(){ 
			},
			onCancel: function(){ 				
				dijit.popup.close(menu); 
			}, 
			onClose: function(){
	    		try{
		        	evt.target.focus();
		        }
		        catch(exception)
		        {
					//Will try again to add focus. IE doesn't like it when an element is invisible and focus is set on the element.
					setTimeout(function () {
				        try{
				        	evt.target.focus();
				        }
				        catch(exception2)
				        {
							//do nothing at this point
				        }
			        }, 1000);
		        }    			
			}}); 

		menu.focus();

		// close the menu when the user click outside the menu 
		dojo.connect(menu, "_onBlur", function(){dijit.popup.close(menu)}); 			
		
		dojo.stopEvent(evt);
	},

	openMenuA11y: function (evt, menuId){
		// for keyboard a11y
		if (evt.keyCode == dojo.keys.ENTER){
			this.openMenu(evt, menuId);
		} 
	}});
 
 // one instance per page
 menuUtility = new lconn.MenuUtility();
/* Copyright IBM Corp. 2008, 2009  All Rights Reserved.              */
function showTagVis(minVisThreshold){
	if (!dojo.byId('dogearTagCloud')) {
			// no tags on page
			return;
		}
		
		var as = dojo.byId('dogearTagCloud').getElementsByTagName('li');
		for (var i = 0; i < as.length; i++)
		{
			var a = as[i];
			var m = a.className.match(/^f\d+-(\d+)/);
			if (m)
			{
				
				var p = parseInt(m[1]);
				a.style.display = (p >= parseInt(minVisThreshold)) ? "inline" : "none";
			}
		}

}

function updateTagVis(minVisThreshold) {
		Dogear.Util.setCookie("sliderVis_lconnTagSliderHandle", minVisThreshold);
		showTagVis(minVisThreshold);
	}

function initSlider(){
	var sliderPosition = getSliderPosition("sliderVis_lconnTagSliderHandle");
	var slider_W = new dijit.form.HorizontalSlider({value: sliderPosition, maximum: 100, minimum: 0, showButtons: false, intermediateChanges: true}, "dogearSlider_AP");
	dojo.connect(slider_W, 'onChange', updateTagVis);
}

function getSliderPosition(){
var defaultSliderVisVal = Dogear.Util.getCookie("sliderVis_lconnTagSliderHandle");
			if (defaultSliderVisVal == null || defaultSliderVisVal < 0) {
				defaultSliderVisVal = 0;
			} else if (defaultSliderVisVal > 100) {
				defaultSliderVisVal = 100;
			}
			
	return defaultSliderVisVal;
}

function toggleCloudListView(cookieValue, divToHide, divToShow){
	Dogear.Util.setCookie("dogear.listcloudview", cookieValue);
	
	showHideDivs(cookieValue);
}

function showHideDivs(view){

			if(view == "cloud"){
					dojo.byId('dogearTagCloud').style.display="";
					dojo.byId('dogearTagList').style.display="none";
					dojo.byId('dogearSliderDisplay').style.display="";
					//setup links
					dojo.byId('listLink').style.display="none";
					dojo.byId('cloudLink').style.display="inline";
				}else{
					dojo.byId('dogearTagCloud').style.display="none";
					dojo.byId('dogearTagList').style.display="block";
					dojo.byId('dogearSliderDisplay').style.display="none";
					//setup links
					dojo.byId('cloudLink').style.display="none";
					dojo.byId('listLink').style.display="inline";
				
				}
		
}
