var dj_global=this;
function dj_undef(_1,_2){
if(!_2){
_2=dj_global;
}
return (typeof _2[_1]=="undefined");
}
if(dj_undef("djConfig")){
var djConfig={};
}
var dojo;
if(dj_undef("dojo")){
dojo={};
}
dojo.version={major:0,minor:2,patch:2,flag:"+",revision:Number("$Rev: 3301 $".match(/[0-9]+/)[0]),toString:function(){
with(dojo.version){
return major+"."+minor+"."+patch+flag+" ("+revision+")";
}
}};
dojo.evalObjPath=function(_3,_4){
if(typeof _3!="string"){
return dj_global;
}
if(_3.indexOf(".")==-1){
if((dj_undef(_3,dj_global))&&(_4)){
dj_global[_3]={};
}
return dj_global[_3];
}
var _5=_3.split(/\./);
var _6=dj_global;
for(var i=0;i<_5.length;++i){
if(!_4){
_6=_6[_5[i]];
if((typeof _6=="undefined")||(!_6)){
return _6;
}
}else{
if(dj_undef(_5[i],_6)){
_6[_5[i]]={};
}
_6=_6[_5[i]];
}
}
return _6;
};
dojo.errorToString=function(_8){
return ((!dj_undef("message",_8))?_8.message:(dj_undef("description",_8)?_8:_8.description));
};
dojo.raise=function(_9,_a){
if(_a){
_9=_9+": "+dojo.errorToString(_a);
}
var he=dojo.hostenv;
if((!dj_undef("hostenv",dojo))&&(!dj_undef("println",dojo.hostenv))){
dojo.hostenv.println("FATAL: "+_9);
}
throw Error(_9);
};
dj_throw=dj_rethrow=function(m,e){
dojo.deprecated("dj_throw and dj_rethrow deprecated, use dojo.raise instead");
dojo.raise(m,e);
};
dojo.debug=function(){
if(!djConfig.isDebug){
return;
}
var _e=arguments;
if(dj_undef("println",dojo.hostenv)){
dojo.raise("dojo.debug not available (yet?)");
}
var _f=dj_global["jum"]&&!dj_global["jum"].isBrowser;
var s=[(_f?"":"DEBUG: ")];
for(var i=0;i<_e.length;++i){
if(!false&&_e[i] instanceof Error){
var msg="["+_e[i].name+": "+dojo.errorToString(_e[i])+(_e[i].fileName?", file: "+_e[i].fileName:"")+(_e[i].lineNumber?", line: "+_e[i].lineNumber:"")+"]";
}else{
try{
var msg=String(_e[i]);
}
catch(e){
if(dojo.render.html.ie){
var msg="[ActiveXObject]";
}else{
var msg="[unknown]";
}
}
}
s.push(msg);
}
if(_f){
jum.debug(s.join(" "));
}else{
dojo.hostenv.println(s.join(" "));
}
};
dojo.debugShallow=function(obj){
if(!djConfig.isDebug){
return;
}
dojo.debug("------------------------------------------------------------");
dojo.debug("Object: "+obj);
var _14=[];
for(var _15 in obj){
try{
_14.push(_15+": "+obj[_15]);
}
catch(E){
_14.push(_15+": ERROR - "+E.message);
}
}
_14.sort();
for(var i=0;i<_14.length;i++){
dojo.debug(_14[i]);
}
dojo.debug("------------------------------------------------------------");
};
var dj_debug=dojo.debug;
function dj_eval(s){
return dj_global.eval?dj_global.eval(s):eval(s);
}
dj_unimplemented=dojo.unimplemented=function(_18,_19){
var _1a="'"+_18+"' not implemented";
if((!dj_undef(_19))&&(_19)){
_1a+=" "+_19;
}
dojo.raise(_1a);
};
dj_deprecated=dojo.deprecated=function(_1b,_1c,_1d){
var _1e="DEPRECATED: "+_1b;
if(_1c){
_1e+=" "+_1c;
}
if(_1d){
_1e+=" -- will be removed in version: "+_1d;
}
dojo.debug(_1e);
};
dojo.experimental=function(_1f,_20){
var _21="EXPERIMENTAL: "+_1f;
_21+=" -- Not yet ready for use.  APIs subject to change without notice.";
if(_20){
_21+=" "+_20;
}
dojo.debug(_21);
};
dojo.inherits=function(_22,_23){
if(typeof _23!="function"){
dojo.raise("superclass: "+_23+" borken");
}
_22.prototype=new _23();
_22.prototype.constructor=_22;
_22.superclass=_23.prototype;
_22["super"]=_23.prototype;
};
dj_inherits=function(_24,_25){
dojo.deprecated("dj_inherits deprecated, use dojo.inherits instead");
dojo.inherits(_24,_25);
};
dojo.render=(function(){
function vscaffold(_26,_27){
var tmp={capable:false,support:{builtin:false,plugin:false},prefixes:_26};
for(var x in _27){
tmp[x]=false;
}
return tmp;
}
return {name:"",ver:dojo.version,os:{win:false,linux:false,osx:false},html:vscaffold(["html"],["ie","opera","khtml","safari","moz"]),svg:vscaffold(["svg"],["corel","adobe","batik"]),vml:vscaffold(["vml"],["ie"]),swf:vscaffold(["Swf","Flash","Mm"],["mm"]),swt:vscaffold(["Swt"],["ibm"])};
})();
dojo.hostenv=(function(){
var _2a={isDebug:false,allowQueryConfig:false,baseScriptUri:"",baseRelativePath:"",libraryScriptUri:"",iePreventClobber:false,ieClobberMinimal:true,preventBackButtonFix:true,searchIds:[],parseWidgets:true};
if(typeof djConfig=="undefined"){
djConfig=_2a;
}else{
for(var _2b in _2a){
if(typeof djConfig[_2b]=="undefined"){
djConfig[_2b]=_2a[_2b];
}
}
}
var djc=djConfig;
function _def(obj,_2e,def){
return (dj_undef(_2e,obj)?def:obj[_2e]);
}
return {name_:"(unset)",version_:"(unset)",pkgFileName:"__package__",loading_modules_:{},loaded_modules_:{},addedToLoadingCount:[],removedFromLoadingCount:[],inFlightCount:0,modulePrefixes_:{dojo:{name:"dojo",value:"src"}},setModulePrefix:function(_30,_31){
this.modulePrefixes_[_30]={name:_30,value:_31};
},getModulePrefix:function(_32){
var mp=this.modulePrefixes_;
if((mp[_32])&&(mp[_32]["name"])){
return mp[_32].value;
}
return _32;
},getTextStack:[],loadUriStack:[],loadedUris:[],post_load_:false,modulesLoadedListeners:[],getName:function(){
return this.name_;
},getVersion:function(){
return this.version_;
},getText:function(uri){
dojo.unimplemented("getText","uri="+uri);
},getLibraryScriptUri:function(){
dojo.unimplemented("getLibraryScriptUri","");
}};
})();
dojo.hostenv.getBaseScriptUri=function(){
if(djConfig.baseScriptUri.length){
return djConfig.baseScriptUri;
}
var uri=new String(djConfig.libraryScriptUri||djConfig.baseRelativePath);
if(!uri){
dojo.raise("Nothing returned by getLibraryScriptUri(): "+uri);
}
var _36=uri.lastIndexOf("/");
djConfig.baseScriptUri=djConfig.baseRelativePath;
return djConfig.baseScriptUri;
};
dojo.hostenv.setBaseScriptUri=function(uri){
djConfig.baseScriptUri=uri;
};
dojo.hostenv.loadPath=function(_38,_39,cb){
if((_38.charAt(0)=="/")||(_38.match(/^\w+:/))){
dojo.raise("relpath '"+_38+"'; must be relative");
}
var uri=this.getBaseScriptUri()+_38;
if(djConfig.cacheBust&&dojo.render.html.capable){
uri+="?"+String(djConfig.cacheBust).replace(/\W+/g,"");
}
try{
return ((!_39)?this.loadUri(uri,cb):this.loadUriAndCheck(uri,_39,cb));
}
catch(e){
dojo.debug(e);
return false;
}
};
dojo.hostenv.loadUri=function(uri,cb){
if(this.loadedUris[uri]){
return;
}
var _3e=this.getText(uri,null,true);
if(_3e==null){
return 0;
}
this.loadedUris[uri]=true;
var _3f=dj_eval(_3e);
return 1;
};
dojo.hostenv.loadUriAndCheck=function(uri,_41,cb){
var ok=true;
try{
ok=this.loadUri(uri,cb);
}
catch(e){
dojo.debug("failed loading ",uri," with error: ",e);
}
return ((ok)&&(this.findModule(_41,false)))?true:false;
};
dojo.loaded=function(){
};
dojo.hostenv.loaded=function(){
this.post_load_=true;
var mll=this.modulesLoadedListeners;
for(var x=0;x<mll.length;x++){
mll[x]();
}
dojo.loaded();
};
dojo.addOnLoad=function(obj,_47){
if(arguments.length==1){
dojo.hostenv.modulesLoadedListeners.push(obj);
}else{
if(arguments.length>1){
dojo.hostenv.modulesLoadedListeners.push(function(){
obj[_47]();
});
}
}
};
dojo.hostenv.modulesLoaded=function(){
if(this.post_load_){
return;
}
if((this.loadUriStack.length==0)&&(this.getTextStack.length==0)){
if(this.inFlightCount>0){
dojo.debug("files still in flight!");
return;
}
if(typeof setTimeout=="object"){
setTimeout("dojo.hostenv.loaded();",0);
}else{
dojo.hostenv.loaded();
}
}
};
dojo.hostenv.moduleLoaded=function(_48){
var _49=dojo.evalObjPath((_48.split(".").slice(0,-1)).join("."));
this.loaded_modules_[(new String(_48)).toLowerCase()]=_49;
};
dojo.hostenv._global_omit_module_check=false;
dojo.hostenv.loadModule=function(_4a,_4b,_4c){
if(!_4a){
return;
}
_4c=this._global_omit_module_check||_4c;
var _4d=this.findModule(_4a,false);
if(_4d){
return _4d;
}
if(dj_undef(_4a,this.loading_modules_)){
this.addedToLoadingCount.push(_4a);
}
this.loading_modules_[_4a]=1;
var _4e=_4a.replace(/\./g,"/")+".js";
var _4f=_4a.split(".");
var _50=_4a.split(".");
for(var i=_4f.length-1;i>0;i--){
var _52=_4f.slice(0,i).join(".");
var _53=this.getModulePrefix(_52);
if(_53!=_52){
_4f.splice(0,i,_53);
break;
}
}
var _54=_4f[_4f.length-1];
if(_54=="*"){
_4a=(_50.slice(0,-1)).join(".");
while(_4f.length){
_4f.pop();
_4f.push(this.pkgFileName);
_4e=_4f.join("/")+".js";
if(_4e.charAt(0)=="/"){
_4e=_4e.slice(1);
}
ok=this.loadPath(_4e,((!_4c)?_4a:null));
if(ok){
break;
}
_4f.pop();
}
}else{
_4e=_4f.join("/")+".js";
_4a=_50.join(".");
var ok=this.loadPath(_4e,((!_4c)?_4a:null));
if((!ok)&&(!_4b)){
_4f.pop();
while(_4f.length){
_4e=_4f.join("/")+".js";
ok=this.loadPath(_4e,((!_4c)?_4a:null));
if(ok){
break;
}
_4f.pop();
_4e=_4f.join("/")+"/"+this.pkgFileName+".js";
if(_4e.charAt(0)=="/"){
_4e=_4e.slice(1);
}
ok=this.loadPath(_4e,((!_4c)?_4a:null));
if(ok){
break;
}
}
}
if((!ok)&&(!_4c)){
dojo.raise("Could not load '"+_4a+"'; last tried '"+_4e+"'");
}
}
if(!_4c){
_4d=this.findModule(_4a,false);
if(!_4d){
dojo.raise("symbol '"+_4a+"' is not defined after loading '"+_4e+"'");
}
}
return _4d;
};
dojo.hostenv.startPackage=function(_56){
var _57=_56.split(/\./);
if(_57[_57.length-1]=="*"){
_57.pop();
}
return dojo.evalObjPath(_57.join("."),true);
};
dojo.hostenv.findModule=function(_58,_59){
var lmn=(new String(_58)).toLowerCase();
if(this.loaded_modules_[lmn]){
return this.loaded_modules_[lmn];
}
var _5b=dojo.evalObjPath(_58);
if((_58)&&(typeof _5b!="undefined")&&(_5b)){
this.loaded_modules_[lmn]=_5b;
return _5b;
}
if(_59){
dojo.raise("no loaded module named '"+_58+"'");
}
return null;
};


if(typeof window=="undefined"){
dojo.raise("no window object");
}
(function(){
if(djConfig.allowQueryConfig){
var _1=document.location.toString();
var _2=_1.split("?",2);
if(_2.length>1){
var _3=_2[1];
var _4=_3.split("&");
for(var x in _4){
var sp=_4[x].split("=");
if((sp[0].length>9)&&(sp[0].substr(0,9)=="djConfig.")){
var _7=sp[0].substr(9);
try{
djConfig[_7]=eval(sp[1]);
}
catch(e){
djConfig[_7]=sp[1];
}
}
}
}
}
if(((djConfig["baseScriptUri"]=="")||(djConfig["baseRelativePath"]==""))&&(document&&document.getElementsByTagName)){
var _8=document.getElementsByTagName("script");
var _9=/(__package__|dojo|bootstrap1)\.js([\?\.]|$)/i;
for(var i=0;i<_8.length;i++){
var _b=_8[i].getAttribute("src");
if(!_b){
continue;
}
var m=_b.match(_9);
if(m){
root=_b.substring(0,m.index);
if(_b.indexOf("bootstrap1")>-1){
root+="../";
}
if(!this["djConfig"]){
djConfig={};
}
if(djConfig["baseScriptUri"]==""){
djConfig["baseScriptUri"]=root;
}
if(djConfig["baseRelativePath"]==""){
djConfig["baseRelativePath"]=root;
}
break;
}
}
}
var dr=dojo.render;
var _e=dojo.render.html;
var _f=dojo.render.svg;
var dua=_e.UA=navigator.userAgent;
var dav=_e.AV=navigator.appVersion;
var t=true;
var f=false;
_e.capable=t;
_e.support.builtin=t;
dr.ver=parseFloat(_e.AV);
dr.os.mac=dav.indexOf("Macintosh")>=0;
dr.os.win=dav.indexOf("Windows")>=0;
dr.os.linux=dav.indexOf("X11")>=0;
_e.opera=dua.indexOf("Opera")>=0;
_e.khtml=(dav.indexOf("Konqueror")>=0)||(dav.indexOf("Safari")>=0);
_e.safari=dav.indexOf("Safari")>=0;
var _14=dua.indexOf("Gecko");
_e.mozilla=_e.moz=(_14>=0)&&(!_e.khtml);
if(_e.mozilla){
_e.geckoVersion=dua.substring(_14+6,_14+14);
}
_e.ie=(document.all)&&(!_e.opera);
_e.ie50=_e.ie&&dav.indexOf("MSIE 5.0")>=0;
_e.ie55=_e.ie&&dav.indexOf("MSIE 5.5")>=0;
_e.ie60=_e.ie&&dav.indexOf("MSIE 6.0")>=0;
dr.vml.capable=_e.ie;
_f.capable=f;
_f.support.plugin=f;
_f.support.builtin=f;
_f.adobe=f;
if(document.implementation&&document.implementation.hasFeature&&document.implementation.hasFeature("org.w3c.dom.svg","1.0")){
_f.capable=t;
_f.support.builtin=t;
_f.support.plugin=f;
_f.adobe=f;
}else{
if(navigator.mimeTypes&&navigator.mimeTypes.length>0){
var _15=navigator.mimeTypes["image/svg+xml"]||navigator.mimeTypes["image/svg"]||navigator.mimeTypes["image/svg-xml"];
if(_15){
_f.adobe=_15&&_15.enabledPlugin&&_15.enabledPlugin.description&&(_15.enabledPlugin.description.indexOf("Adobe")>-1);
if(_f.adobe){
_f.capable=t;
_f.support.plugin=t;
}
}
}else{
if(_e.ie&&dr.os.win){
var _15=f;
try{
var _16=new ActiveXObject("Adobe.SVGCtl");
_15=t;
}
catch(e){
}
if(_15){
_f.capable=t;
_f.support.plugin=t;
_f.adobe=t;
}
}else{
_f.capable=f;
_f.support.plugin=f;
_f.adobe=f;
}
}
}
})();
dojo.hostenv.startPackage("dojo.hostenv");
dojo.hostenv.name_="browser";
dojo.hostenv.searchIds=[];
var DJ_XMLHTTP_PROGIDS=["Msxml2.XMLHTTP","Microsoft.XMLHTTP","Msxml2.XMLHTTP.4.0"];
dojo.hostenv.getXmlhttpObject=function(){
var _17=null;
var _18=null;
try{
_17=new XMLHttpRequest();
}
catch(e){
}
if(!_17){
for(var i=0;i<3;++i){
var _1a=DJ_XMLHTTP_PROGIDS[i];
try{
_17=new ActiveXObject(_1a);
}
catch(e){
_18=e;
}
if(_17){
DJ_XMLHTTP_PROGIDS=[_1a];
break;
}
}
}
if(!_17){
return dojo.raise("XMLHTTP not available",_18);
}
return _17;
};
dojo.hostenv.getText=function(uri,_1c,_1d){
var _1e=this.getXmlhttpObject();
if(_1c){
_1e.onreadystatechange=function(){
if((4==_1e.readyState)&&(_1e["status"])){
if(_1e.status==200){
_1c(_1e.responseText);
}
}
};
}
_1e.open("GET",uri,_1c?true:false);
try{
_1e.send(null);
}
catch(e){
if(_1d&&!_1c){
return null;
}else{
throw e;
}
}
if(_1c){
return null;
}
return _1e.responseText;
};
dojo.hostenv.defaultDebugContainerId="dojoDebug";
dojo.hostenv._println_buffer=[];
dojo.hostenv._println_safe=false;
dojo.hostenv.println=function(_1f){
if(!dojo.hostenv._println_safe){
dojo.hostenv._println_buffer.push(_1f);
}else{
try{
var _20=document.getElementById(djConfig.debugContainerId?djConfig.debugContainerId:dojo.hostenv.defaultDebugContainerId);
if(!_20){
_20=document.getElementsByTagName("body")[0]||document.body;
}
var div=document.createElement("div");
div.appendChild(document.createTextNode(_1f));
_20.appendChild(div);
}
catch(e){
try{
document.write("<div>"+_1f+"</div>");
}
catch(e2){
window.status=_1f;
}
}
}
};
dojo.addOnLoad(function(){
dojo.hostenv._println_safe=true;
while(dojo.hostenv._println_buffer.length>0){
dojo.hostenv.println(dojo.hostenv._println_buffer.shift());
}
});
function dj_addNodeEvtHdlr(_22,_23,fp,_25){
var _26=_22["on"+_23]||function(){
};
_22["on"+_23]=function(){
fp.apply(_22,arguments);
_26.apply(_22,arguments);
};
return true;
}
dj_load_init=function(){
if(arguments.callee.initialized){
return;
}
arguments.callee.initialized=true;
if(dojo.render.html.ie){
dojo.hostenv.makeWidgets();
}
dojo.hostenv.modulesLoaded();
};
dj_addNodeEvtHdlr(window,"load",dj_load_init);
dojo.hostenv.makeWidgets=function(){
var _27=[];
if(djConfig.searchIds&&djConfig.searchIds.length>0){
_27=_27.concat(djConfig.searchIds);
}
if(dojo.hostenv.searchIds&&dojo.hostenv.searchIds.length>0){
_27=_27.concat(dojo.hostenv.searchIds);
}
if((djConfig.parseWidgets)||(_27.length>0)){
if(dojo.evalObjPath("dojo.widget.Parse")){
try{
var _28=new dojo.xml.Parse();
if(_27.length>0){
for(var x=0;x<_27.length;x++){
var _2a=document.getElementById(_27[x]);
if(!_2a){
continue;
}
var _2b=_28.parseElement(_2a,null,true);
dojo.widget.getParser().createComponents(_2b);
}
}else{
if(djConfig.parseWidgets){
var _2b=_28.parseElement(document.getElementsByTagName("body")[0]||document.body,null,true);
dojo.widget.getParser().createComponents(_2b);
}
}
}
catch(e){
dojo.debug("auto-build-widgets error:",e);
}
}
}
};
dojo.hostenv.modulesLoadedListeners.push(function(){
if(!dojo.render.html.ie){
dojo.hostenv.makeWidgets();
}
});
try{
if(dojo.render.html.ie){
document.namespaces.add("v","urn:schemas-microsoft-com:vml");
document.createStyleSheet().addRule("v\\:*","behavior:url(#default#VML)");
}
}
catch(e){
}
dojo.hostenv.writeIncludes=function(){
};
dojo.hostenv.byId=dojo.byId=function(id,doc){
if(id&&(typeof id=="string"||id instanceof String)){
if(!doc){
doc=document;
}
return doc.getElementById(id);
}
return id;
};
dojo.hostenv.byIdArray=dojo.byIdArray=function(){
var ids=[];
for(var i=0;i<arguments.length;i++){
if((arguments[i] instanceof Array)||(typeof arguments[i]=="array")){
for(var j=0;j<arguments[i].length;j++){
ids=ids.concat(dojo.hostenv.byIdArray(arguments[i][j]));
}
}else{
ids.push(dojo.hostenv.byId(arguments[i]));
}
}
return ids;
};


dojo.hostenv.conditionalLoadModule=function(_1){
var _2=_1["common"]||[];
var _3=(_1[dojo.hostenv.name_])?_2.concat(_1[dojo.hostenv.name_]||[]):_2.concat(_1["default"]||[]);
for(var x=0;x<_3.length;x++){
var _5=_3[x];
if(_5.constructor==Array){
dojo.hostenv.loadModule.apply(dojo.hostenv,_5);
}else{
dojo.hostenv.loadModule(_5);
}
}
};
dojo.hostenv.require=dojo.hostenv.loadModule;
dojo.require=function(){
dojo.hostenv.loadModule.apply(dojo.hostenv,arguments);
};
dojo.requireAfter=dojo.require;
dojo.requireIf=function(){
if((arguments[0]===true)||(arguments[0]=="common")||(arguments[0]&&dojo.render[arguments[0]].capable)){
var _6=[];
for(var i=1;i<arguments.length;i++){
_6.push(arguments[i]);
}
dojo.require.apply(dojo,_6);
}
};
dojo.requireAfterIf=dojo.requireIf;
dojo.conditionalRequire=dojo.requireIf;
dojo.requireAll=function(){
for(var i=0;i<arguments.length;i++){
}
};
dojo.kwCompoundRequire=function(){
dojo.hostenv.conditionalLoadModule.apply(dojo.hostenv,arguments);
};
dojo.hostenv.provide=dojo.hostenv.startPackage;
dojo.provide=function(){
return dojo.hostenv.startPackage.apply(dojo.hostenv,arguments);
};
dojo.setModulePrefix=function(_9,_a){
return dojo.hostenv.setModulePrefix(_9,_a);
};
dojo.profile={start:function(){
},end:function(){
},stop:function(){
},dump:function(){
}};
dojo.exists=function(_b,_c){
var p=_c.split(".");
for(var i=0;i<p.length;i++){
if(!(_b[p[i]])){
return false;
}
_b=_b[p[i]];
}
return true;
};


dojo.provide("dojo.lang.common");
dojo.lang.mixin=function(_1,_2){
var _3={};
for(var x in _2){
if(typeof _3[x]=="undefined"||_3[x]!=_2[x]){
_1[x]=_2[x];
}
}
if(dojo.render.html.ie&&dojo.lang.isFunction(_2["toString"])&&_2["toString"]!=_1["toString"]){
_1.toString=_2.toString;
}
return _1;
};
dojo.lang.extend=function(_5,_6){
this.mixin(_5.prototype,_6);
};
dojo.lang.find=function(_7,_8,_9,_a){
if(!dojo.lang.isArrayLike(_7)&&dojo.lang.isArrayLike(_8)){
var a=_7;
_7=_8;
_8=a;
}
var _c=dojo.lang.isString(_7);
if(_c){
_7=_7.split("");
}
if(_a){
var _d=-1;
var i=_7.length-1;
var _f=-1;
}else{
var _d=1;
var i=0;
var _f=_7.length;
}
if(_9){
while(i!=_f){
if(_7[i]===_8){
return i;
}
i+=_d;
}
}else{
while(i!=_f){
if(_7[i]==_8){
return i;
}
i+=_d;
}
}
return -1;
};
dojo.lang.indexOf=dojo.lang.find;
dojo.lang.findLast=function(arr,val,_12){
return dojo.lang.find(arr,val,_12,true);
};
dojo.lang.lastIndexOf=dojo.lang.findLast;
dojo.lang.inArray=function(arr,val){
return dojo.lang.find(arr,val)>-1;
};
dojo.lang.forEach=function(obj,_16,_17){
if(dojo.lang.isString(obj)){
obj=obj.split("");
}
if(dojo.lang.isArray(obj)){
for(var i=0;i<obj.length;i++){
if(_16(obj[i],i,obj)=="break"){
break;
}
}
}else{
for(var i in obj){
if(_16(obj[i],i,obj)=="break"){
break;
}
}
}
};
dojo.lang.isObject=function(wh){
return typeof wh=="object"||dojo.lang.isArray(wh)||dojo.lang.isFunction(wh);
};
dojo.lang.isArray=function(wh){
return (wh instanceof Array||typeof wh=="array");
};
dojo.lang.isArrayLike=function(wh){
if(dojo.lang.isString(wh)){
return false;
}
if(dojo.lang.isFunction(wh)){
return false;
}
if(dojo.lang.isArray(wh)){
return true;
}
if(typeof wh!="undefined"&&wh&&dojo.lang.isNumber(wh.length)&&isFinite(wh.length)){
return true;
}
return false;
};
dojo.lang.isFunction=function(wh){
return (wh instanceof Function||typeof wh=="function");
};
dojo.lang.isString=function(wh){
return (wh instanceof String||typeof wh=="string");
};
dojo.lang.isAlien=function(wh){
return !dojo.lang.isFunction()&&/\{\s*\[native code\]\s*\}/.test(String(wh));
};
dojo.lang.isBoolean=function(wh){
return (wh instanceof Boolean||typeof wh=="boolean");
};
dojo.lang.isNumber=function(wh){
return (wh instanceof Number||typeof wh=="number");
};
dojo.lang.isUndefined=function(wh){
return ((wh==undefined)&&(typeof wh=="undefined"));
};


dojo.provide("dojo.lang");
dojo.provide("dojo.lang.Lang");


dojo.provide("dojo.string.common");
dojo.string.trim=function(_1,wh){
if(!_1.replace){
return _1;
}
if(!_1.length){
return _1;
}
var re=(wh>0)?(/^\s+/):(wh<0)?(/\s+$/):(/^\s+|\s+$/g);
return _1.replace(re,"");
};
dojo.string.trimStart=function(_4){
return dojo.string.trim(_4,1);
};
dojo.string.trimEnd=function(_5){
return dojo.string.trim(_5,-1);
};
dojo.string.repeat=function(_6,_7,_8){
var _9="";
for(var i=0;i<_7;i++){
_9+=_6;
if(_8&&i<_7-1){
_9+=_8;
}
}
return _9;
};
dojo.string.pad=function(_b,_c,c,_e){
var _f=String(_b);
if(!c){
c="0";
}
if(!_e){
_e=1;
}
while(_f.length<_c){
if(_e>0){
_f=c+_f;
}else{
_f+=c;
}
}
return _f;
};
dojo.string.padLeft=function(str,len,c){
return dojo.string.pad(str,len,c,1);
};
dojo.string.padRight=function(str,len,c){
return dojo.string.pad(str,len,c,-1);
};


dojo.provide("dojo.string");


dojo.provide("dojo.lang.type");
dojo.lang.whatAmI=function(wh){
try{
if(dojo.lang.isArray(wh)){
return "array";
}
if(dojo.lang.isFunction(wh)){
return "function";
}
if(dojo.lang.isString(wh)){
return "string";
}
if(dojo.lang.isNumber(wh)){
return "number";
}
if(dojo.lang.isBoolean(wh)){
return "boolean";
}
if(dojo.lang.isAlien(wh)){
return "alien";
}
if(dojo.lang.isUndefined(wh)){
return "undefined";
}
for(var _2 in dojo.lang.whatAmI.custom){
if(dojo.lang.whatAmI.custom[_2](wh)){
return _2;
}
}
if(dojo.lang.isObject(wh)){
return "object";
}
}
catch(E){
}
return "unknown";
};
dojo.lang.whatAmI.custom={};
dojo.lang.isNumeric=function(wh){
return (!isNaN(wh)&&isFinite(wh)&&(wh!=null)&&!dojo.lang.isBoolean(wh)&&!dojo.lang.isArray(wh));
};
dojo.lang.isBuiltIn=function(wh){
return (dojo.lang.isArray(wh)||dojo.lang.isFunction(wh)||dojo.lang.isString(wh)||dojo.lang.isNumber(wh)||dojo.lang.isBoolean(wh)||(wh==null)||(wh instanceof Error)||(typeof wh=="error"));
};
dojo.lang.isPureObject=function(wh){
return ((wh!=null)&&dojo.lang.isObject(wh)&&wh.constructor==Object);
};
dojo.lang.isOfType=function(_6,_7){
if(dojo.lang.isArray(_7)){
var _8=_7;
for(var i in _8){
var _a=_8[i];
if(dojo.lang.isOfType(_6,_a)){
return true;
}
}
return false;
}else{
if(dojo.lang.isString(_7)){
_7=_7.toLowerCase();
}
switch(_7){
case Array:
case "array":
return dojo.lang.isArray(_6);
break;
case Function:
case "function":
return dojo.lang.isFunction(_6);
break;
case String:
case "string":
return dojo.lang.isString(_6);
break;
case Number:
case "number":
return dojo.lang.isNumber(_6);
break;
case "numeric":
return dojo.lang.isNumeric(_6);
break;
case Boolean:
case "boolean":
return dojo.lang.isBoolean(_6);
break;
case Object:
case "object":
return dojo.lang.isObject(_6);
break;
case "pureobject":
return dojo.lang.isPureObject(_6);
break;
case "builtin":
return dojo.lang.isBuiltIn(_6);
break;
case "alien":
return dojo.lang.isAlien(_6);
break;
case "undefined":
return dojo.lang.isUndefined(_6);
break;
case null:
case "null":
return (_6===null);
break;
case "optional":
return ((_6===null)||dojo.lang.isUndefined(_6));
break;
default:
if(dojo.lang.isFunction(_7)){
return (_6 instanceof _7);
}else{
dojo.raise("dojo.lang.isOfType() was passed an invalid type");
}
break;
}
}
dojo.raise("If we get here, it means a bug was introduced above.");
};
dojo.lang.getObject=function(_b){
var _c=_b.split("."),i=0,obj=dj_global;
do{
obj=obj[_c[i++]];
}while(i<_c.length&&obj);
return (obj!=dj_global)?obj:null;
};
dojo.lang.doesObjectExist=function(_d){
var _e=_d.split("."),i=0,obj=dj_global;
do{
obj=obj[_e[i++]];
}while(i<_e.length&&obj);
return (obj&&obj!=dj_global);
};
dojo.lang.getConstructor=function(_f){
return _f.constructor;
};
dojo.lang.isConstructedBy=function(obj,_11){
return dojo.lang.getConstructor(obj)==_11;
};
dojo.lang.isSubOf=function(obj,_13){
return obj instanceof _13;
};
dojo.lang.isBaseOf=function(_14,obj){
return obj instanceof _14;
};
dojo.lang.createInstance=function(_16){
var o=null;
var f=_16;
if(typeof (f)=="string"){
f=dojo.lang.getObject(_16);
}
if(typeof (f)=="function"){
try{
o=new f();
}
catch(e){
}
}
return o;
};


dojo.provide("dojo.lang.func");
dojo.lang.hitch=function(_1,_2){
if(dojo.lang.isString(_2)){
var _3=_1[_2];
}else{
var _3=_2;
}
return function(){
return _3.apply(_1,arguments);
};
};
dojo.lang.anonCtr=0;
dojo.lang.anon={};
dojo.lang.nameAnonFunc=function(_4,_5){
var _6=(_5||dojo.lang.anon);
if((dj_global["djConfig"])&&(djConfig["slowAnonFuncLookups"]==true)){
for(var x in _6){
if(_6[x]===_4){
return x;
}
}
}
var _8="__"+dojo.lang.anonCtr++;
while(typeof _6[_8]!="undefined"){
_8="__"+dojo.lang.anonCtr++;
}
_6[_8]=_4;
return _8;
};
dojo.lang.forward=function(_9){
return function(){
return this[_9].apply(this,arguments);
};
};
dojo.lang.curry=function(ns,_b){
var _c=[];
ns=ns||dj_global;
if(dojo.lang.isString(_b)){
_b=ns[_b];
}
for(var x=2;x<arguments.length;x++){
_c.push(arguments[x]);
}
var _e=_b.length-_c.length;
function gather(_f,_10,_11){
var _12=_11;
var _13=_10.slice(0);
for(var x=0;x<_f.length;x++){
_13.push(_f[x]);
}
_11=_11-_f.length;
if(_11<=0){
var res=_b.apply(ns,_13);
_11=_12;
return res;
}else{
return function(){
return gather(arguments,_13,_11);
};
}
}
return gather([],_c,_e);
};
dojo.lang.curryArguments=function(ns,_17,_18,_19){
var _1a=[];
var x=_19||0;
for(x=_19;x<_18.length;x++){
_1a.push(_18[x]);
}
return dojo.lang.curry.apply(dojo.lang,[ns,_17].concat(_1a));
};
dojo.lang.tryThese=function(){
for(var x=0;x<arguments.length;x++){
try{
if(typeof arguments[x]=="function"){
var ret=(arguments[x]());
if(ret){
return ret;
}
}
}
catch(e){
dojo.debug(e);
}
}
};
dojo.lang.delayThese=function(_1e,cb,_20,_21){
if(!_1e.length){
if(typeof _21=="function"){
_21();
}
return;
}
if((typeof _20=="undefined")&&(typeof cb=="number")){
_20=cb;
cb=function(){
};
}else{
if(!cb){
cb=function(){
};
if(!_20){
_20=0;
}
}
}
setTimeout(function(){
(_1e.shift())();
cb();
dojo.lang.delayThese(_1e,cb,_20,_21);
},_20);
};


dojo.provide("dojo.lang.array");
dojo.lang.has=function(_1,_2){
try{
return (typeof _1[_2]!="undefined");
}
catch(e){
return false;
}
};
dojo.lang.isEmpty=function(_3){
if(dojo.lang.isObject(_3)){
var _4={};
var _5=0;
for(var x in _3){
if(_3[x]&&(!_4[x])){
_5++;
break;
}
}
return (_5==0);
}else{
if(dojo.lang.isArrayLike(_3)||dojo.lang.isString(_3)){
return _3.length==0;
}
}
};
dojo.lang.map=function(_7,_8,_9){
var _a=dojo.lang.isString(_7);
if(_a){
_7=_7.split("");
}
if(dojo.lang.isFunction(_8)&&(!_9)){
_9=_8;
_8=dj_global;
}else{
if(dojo.lang.isFunction(_8)&&_9){
var _b=_8;
_8=_9;
_9=_b;
}
}
if(Array.map){
var _c=Array.map(_7,_9,_8);
}else{
var _c=[];
for(var i=0;i<_7.length;++i){
_c.push(_9.call(_8,_7[i]));
}
}
if(_a){
return _c.join("");
}else{
return _c;
}
};
dojo.lang._everyOrSome=function(_e,_f,_10,_11){
var _12=dojo.lang.isString(_f);
if(_12){
_f=_f.split("");
}
if(Array.every){
return Array[(_e)?"every":"some"](_f,_10,_11);
}else{
if(!_11){
if(arguments.length>=3){
dojo.raise("thisObject doesn't exist!");
}
_11=dj_global;
}
for(var i=0;i<_f.length;i++){
var _14=_10.call(_11,_f[i],i,_f);
if((_e)&&(!_14)){
return false;
}else{
if((!_e)&&(_14)){
return true;
}
}
}
return (_e)?true:false;
}
};
dojo.lang.every=function(arr,_16,_17){
return this._everyOrSome(true,arr,_16,_17);
};
dojo.lang.some=function(arr,_19,_1a){
return this._everyOrSome(false,arr,_19,_1a);
};
dojo.lang.filter=function(arr,_1c,_1d){
var _1e=dojo.lang.isString(arr);
if(_1e){
arr=arr.split("");
}
if(Array.filter){
var _1f=Array.filter(arr,_1c,_1d);
}else{
if(!_1d){
if(arguments.length>=3){
dojo.raise("thisObject doesn't exist!");
}
_1d=dj_global;
}
var _1f=[];
for(var i=0;i<arr.length;i++){
if(_1c.call(_1d,arr[i],i,arr)){
_1f.push(arr[i]);
}
}
}
if(_1e){
return _1f.join("");
}else{
return _1f;
}
};
dojo.lang.unnest=function(){
var out=[];
for(var i=0;i<arguments.length;i++){
if(dojo.lang.isArrayLike(arguments[i])){
var add=dojo.lang.unnest.apply(this,arguments[i]);
out=out.concat(add);
}else{
out.push(arguments[i]);
}
}
return out;
};
dojo.lang.toArray=function(_24,_25){
var _26=[];
for(var i=_25||0;i<_24.length;i++){
_26.push(_24[i]);
}
return _26;
};


dojo.provide("dojo.dom");
dojo.dom.ELEMENT_NODE=1;
dojo.dom.ATTRIBUTE_NODE=2;
dojo.dom.TEXT_NODE=3;
dojo.dom.CDATA_SECTION_NODE=4;
dojo.dom.ENTITY_REFERENCE_NODE=5;
dojo.dom.ENTITY_NODE=6;
dojo.dom.PROCESSING_INSTRUCTION_NODE=7;
dojo.dom.COMMENT_NODE=8;
dojo.dom.DOCUMENT_NODE=9;
dojo.dom.DOCUMENT_TYPE_NODE=10;
dojo.dom.DOCUMENT_FRAGMENT_NODE=11;
dojo.dom.NOTATION_NODE=12;
dojo.dom.dojoml="http://www.dojotoolkit.org/2004/dojoml";
dojo.dom.xmlns={svg:"http://www.w3.org/2000/svg",smil:"http://www.w3.org/2001/SMIL20/",mml:"http://www.w3.org/1998/Math/MathML",cml:"http://www.xml-cml.org",xlink:"http://www.w3.org/1999/xlink",xhtml:"http://www.w3.org/1999/xhtml",xul:"http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul",xbl:"http://www.mozilla.org/xbl",fo:"http://www.w3.org/1999/XSL/Format",xsl:"http://www.w3.org/1999/XSL/Transform",xslt:"http://www.w3.org/1999/XSL/Transform",xi:"http://www.w3.org/2001/XInclude",xforms:"http://www.w3.org/2002/01/xforms",saxon:"http://icl.com/saxon",xalan:"http://xml.apache.org/xslt",xsd:"http://www.w3.org/2001/XMLSchema",dt:"http://www.w3.org/2001/XMLSchema-datatypes",xsi:"http://www.w3.org/2001/XMLSchema-instance",rdf:"http://www.w3.org/1999/02/22-rdf-syntax-ns#",rdfs:"http://www.w3.org/2000/01/rdf-schema#",dc:"http://purl.org/dc/elements/1.1/",dcq:"http://purl.org/dc/qualifiers/1.0","soap-env":"http://schemas.xmlsoap.org/soap/envelope/",wsdl:"http://schemas.xmlsoap.org/wsdl/",AdobeExtensions:"http://ns.adobe.com/AdobeSVGViewerExtensions/3.0/"};
dojo.dom.isNode=function(wh){
if(typeof Element=="object"){
try{
return wh instanceof Element;
}
catch(E){
}
}else{
return wh&&!isNaN(wh.nodeType);
}
};
dojo.dom.getTagName=function(_2){
var _3=_2.tagName;
if(_3.substr(0,5).toLowerCase()!="dojo:"){
if(_3.substr(0,4).toLowerCase()=="dojo"){
return "dojo:"+_3.substring(4).toLowerCase();
}
var _4=_2.getAttribute("dojoType")||_2.getAttribute("dojotype");
if(_4){
return "dojo:"+_4.toLowerCase();
}
if((_2.getAttributeNS)&&(_2.getAttributeNS(this.dojoml,"type"))){
return "dojo:"+_2.getAttributeNS(this.dojoml,"type").toLowerCase();
}
try{
_4=_2.getAttribute("dojo:type");
}
catch(e){
}
if(_4){
return "dojo:"+_4.toLowerCase();
}
if((!dj_global["djConfig"])||(!djConfig["ignoreClassNames"])){
var _5=_2.className||_2.getAttribute("class");
if((_5)&&(_5.indexOf)&&(_5.indexOf("dojo-")!=-1)){
var _6=_5.split(" ");
for(var x=0;x<_6.length;x++){
if((_6[x].length>5)&&(_6[x].indexOf("dojo-")>=0)){
return "dojo:"+_6[x].substr(5).toLowerCase();
}
}
}
}
}
return _3.toLowerCase();
};
dojo.dom.getUniqueId=function(){
do{
var id="dj_unique_"+(++arguments.callee._idIncrement);
}while(document.getElementById(id));
return id;
};
dojo.dom.getUniqueId._idIncrement=0;
dojo.dom.firstElement=dojo.dom.getFirstChildElement=function(_9,_a){
var _b=_9.firstChild;
while(_b&&_b.nodeType!=dojo.dom.ELEMENT_NODE){
_b=_b.nextSibling;
}
if(_a&&_b&&_b.tagName&&_b.tagName.toLowerCase()!=_a.toLowerCase()){
_b=dojo.dom.nextElement(_b,_a);
}
return _b;
};
dojo.dom.lastElement=dojo.dom.getLastChildElement=function(_c,_d){
var _e=_c.lastChild;
while(_e&&_e.nodeType!=dojo.dom.ELEMENT_NODE){
_e=_e.previousSibling;
}
if(_d&&_e&&_e.tagName&&_e.tagName.toLowerCase()!=_d.toLowerCase()){
_e=dojo.dom.prevElement(_e,_d);
}
return _e;
};
dojo.dom.nextElement=dojo.dom.getNextSiblingElement=function(_f,_10){
if(!_f){
return null;
}
do{
_f=_f.nextSibling;
}while(_f&&_f.nodeType!=dojo.dom.ELEMENT_NODE);
if(_f&&_10&&_10.toLowerCase()!=_f.tagName.toLowerCase()){
return dojo.dom.nextElement(_f,_10);
}
return _f;
};
dojo.dom.prevElement=dojo.dom.getPreviousSiblingElement=function(_11,_12){
if(!_11){
return null;
}
if(_12){
_12=_12.toLowerCase();
}
do{
_11=_11.previousSibling;
}while(_11&&_11.nodeType!=dojo.dom.ELEMENT_NODE);
if(_11&&_12&&_12.toLowerCase()!=_11.tagName.toLowerCase()){
return dojo.dom.prevElement(_11,_12);
}
return _11;
};
dojo.dom.moveChildren=function(_13,_14,_15){
var _16=0;
if(_15){
while(_13.hasChildNodes()&&_13.firstChild.nodeType==dojo.dom.TEXT_NODE){
_13.removeChild(_13.firstChild);
}
while(_13.hasChildNodes()&&_13.lastChild.nodeType==dojo.dom.TEXT_NODE){
_13.removeChild(_13.lastChild);
}
}
while(_13.hasChildNodes()){
_14.appendChild(_13.firstChild);
_16++;
}
return _16;
};
dojo.dom.copyChildren=function(_17,_18,_19){
var _1a=_17.cloneNode(true);
return this.moveChildren(_1a,_18,_19);
};
dojo.dom.removeChildren=function(_1b){
var _1c=_1b.childNodes.length;
while(_1b.hasChildNodes()){
_1b.removeChild(_1b.firstChild);
}
return _1c;
};
dojo.dom.replaceChildren=function(_1d,_1e){
dojo.dom.removeChildren(_1d);
_1d.appendChild(_1e);
};
dojo.dom.removeNode=function(_1f){
if(_1f&&_1f.parentNode){
return _1f.parentNode.removeChild(_1f);
}
};
dojo.dom.getAncestors=function(_20,_21,_22){
var _23=[];
var _24=dojo.lang.isFunction(_21);
while(_20){
if(!_24||_21(_20)){
_23.push(_20);
}
if(_22&&_23.length>0){
return _23[0];
}
_20=_20.parentNode;
}
if(_22){
return null;
}
return _23;
};
dojo.dom.getAncestorsByTag=function(_25,tag,_27){
tag=tag.toLowerCase();
return dojo.dom.getAncestors(_25,function(el){
return ((el.tagName)&&(el.tagName.toLowerCase()==tag));
},_27);
};
dojo.dom.getFirstAncestorByTag=function(_29,tag){
return dojo.dom.getAncestorsByTag(_29,tag,true);
};
dojo.dom.isDescendantOf=function(_2b,_2c,_2d){
if(_2d&&_2b){
_2b=_2b.parentNode;
}
while(_2b){
if(_2b==_2c){
return true;
}
_2b=_2b.parentNode;
}
return false;
};
dojo.dom.innerXML=function(_2e){
if(_2e.innerXML){
return _2e.innerXML;
}else{
if(typeof XMLSerializer!="undefined"){
return (new XMLSerializer()).serializeToString(_2e);
}
}
};
dojo.dom.createDocumentFromText=function(str,_30){
if(!_30){
_30="text/xml";
}
if(typeof DOMParser!="undefined"){
var _31=new DOMParser();
return _31.parseFromString(str,_30);
}else{
if(typeof ActiveXObject!="undefined"){
var _32=new ActiveXObject("Microsoft.XMLDOM");
if(_32){
_32.async=false;
_32.loadXML(str);
return _32;
}else{
dojo.debug("toXml didn't work?");
}
}else{
if(document.createElement){
var tmp=document.createElement("xml");
tmp.innerHTML=str;
if(document.implementation&&document.implementation.createDocument){
var _34=document.implementation.createDocument("foo","",null);
for(var i=0;i<tmp.childNodes.length;i++){
_34.importNode(tmp.childNodes.item(i),true);
}
return _34;
}
return tmp.document&&tmp.document.firstChild?tmp.document.firstChild:tmp;
}
}
}
return null;
};
dojo.dom.prependChild=function(_36,_37){
if(_37.firstChild){
_37.insertBefore(_36,_37.firstChild);
}else{
_37.appendChild(_36);
}
return true;
};
dojo.dom.insertBefore=function(_38,ref,_3a){
if(_3a!=true&&(_38===ref||_38.nextSibling===ref)){
return false;
}
var _3b=ref.parentNode;
_3b.insertBefore(_38,ref);
return true;
};
dojo.dom.insertAfter=function(_3c,ref,_3e){
var pn=ref.parentNode;
if(ref==pn.lastChild){
if((_3e!=true)&&(_3c===ref)){
return false;
}
pn.appendChild(_3c);
}else{
return this.insertBefore(_3c,ref.nextSibling,_3e);
}
return true;
};
dojo.dom.insertAtPosition=function(_40,ref,_42){
if((!_40)||(!ref)||(!_42)){
return false;
}
switch(_42.toLowerCase()){
case "before":
return dojo.dom.insertBefore(_40,ref);
case "after":
return dojo.dom.insertAfter(_40,ref);
case "first":
if(ref.firstChild){
return dojo.dom.insertBefore(_40,ref.firstChild);
}else{
ref.appendChild(_40);
return true;
}
break;
default:
ref.appendChild(_40);
return true;
}
};
dojo.dom.insertAtIndex=function(_43,_44,_45){
var _46=_44.childNodes;
if(!_46.length){
_44.appendChild(_43);
return true;
}
var _47=null;
for(var i=0;i<_46.length;i++){
var _49=_46.item(i)["getAttribute"]?parseInt(_46.item(i).getAttribute("dojoinsertionindex")):-1;
if(_49<_45){
_47=_46.item(i);
}
}
if(_47){
return dojo.dom.insertAfter(_43,_47);
}else{
return dojo.dom.insertBefore(_43,_46.item(0));
}
};
dojo.dom.textContent=function(_4a,_4b){
if(_4b){
dojo.dom.replaceChildren(_4a,document.createTextNode(_4b));
return _4b;
}else{
var _4c="";
if(_4a==null){
return _4c;
}
for(var i=0;i<_4a.childNodes.length;i++){
switch(_4a.childNodes[i].nodeType){
case 1:
case 5:
_4c+=dojo.dom.textContent(_4a.childNodes[i]);
break;
case 3:
case 2:
case 4:
_4c+=_4a.childNodes[i].nodeValue;
break;
default:
break;
}
}
return _4c;
}
};
dojo.dom.collectionToArray=function(_4e){
dojo.deprecated("dojo.dom.collectionToArray","use dojo.lang.toArray instead");
return dojo.lang.toArray(_4e);
};
dojo.dom.hasParent=function(_4f){
if(!_4f||!_4f.parentNode||(_4f.parentNode&&!_4f.parentNode.tagName)){
return false;
}
return true;
};
dojo.dom.isTag=function(_50){
if(_50&&_50.tagName){
var arr=dojo.lang.toArray(arguments,1);
return arr[dojo.lang.find(_50.tagName,arr)]||"";
}
return "";
};


dojo.provide("dojo.graphics.color");
dojo.graphics.color.Color=function(r,g,b,a){
if(dojo.lang.isArray(r)){
this.r=r[0];
this.g=r[1];
this.b=r[2];
this.a=r[3]||1;
}else{
if(dojo.lang.isString(r)){
var _5=dojo.graphics.color.extractRGB(r);
this.r=_5[0];
this.g=_5[1];
this.b=_5[2];
this.a=g||1;
}else{
if(r instanceof dojo.graphics.color.Color){
this.r=r.r;
this.b=r.b;
this.g=r.g;
this.a=r.a;
}else{
this.r=r;
this.g=g;
this.b=b;
this.a=a;
}
}
}
};
dojo.graphics.color.Color.fromArray=function(_6){
return new dojo.graphics.color.Color(_6[0],_6[1],_6[2],_6[3]);
};
dojo.lang.extend(dojo.graphics.color.Color,{toRgb:function(_7){
if(_7){
return this.toRgba();
}else{
return [this.r,this.g,this.b];
}
},toRgba:function(){
return [this.r,this.g,this.b,this.a];
},toHex:function(){
return dojo.graphics.color.rgb2hex(this.toRgb());
},toCss:function(){
return "rgb("+this.toRgb().join()+")";
},toString:function(){
return this.toHex();
},toHsv:function(){
return dojo.graphics.color.rgb2hsv(this.toRgb());
},toHsl:function(){
return dojo.graphics.color.rgb2hsl(this.toRgb());
},blend:function(_8,_9){
return dojo.graphics.color.blend(this.toRgb(),new Color(_8).toRgb(),_9);
}});
dojo.graphics.color.named={white:[255,255,255],black:[0,0,0],red:[255,0,0],green:[0,255,0],blue:[0,0,255],navy:[0,0,128],gray:[128,128,128],silver:[192,192,192]};
dojo.graphics.color.blend=function(a,b,_c){
if(typeof a=="string"){
return dojo.graphics.color.blendHex(a,b,_c);
}
if(!_c){
_c=0;
}else{
if(_c>1){
_c=1;
}else{
if(_c<-1){
_c=-1;
}
}
}
var c=new Array(3);
for(var i=0;i<3;i++){
var _f=Math.abs(a[i]-b[i])/2;
c[i]=Math.floor(Math.min(a[i],b[i])+_f+(_f*_c));
}
return c;
};
dojo.graphics.color.blendHex=function(a,b,_12){
return dojo.graphics.color.rgb2hex(dojo.graphics.color.blend(dojo.graphics.color.hex2rgb(a),dojo.graphics.color.hex2rgb(b),_12));
};
dojo.graphics.color.extractRGB=function(_13){
var hex="0123456789abcdef";
_13=_13.toLowerCase();
if(_13.indexOf("rgb")==0){
var _15=_13.match(/rgba*\((\d+), *(\d+), *(\d+)/i);
var ret=_15.splice(1,3);
return ret;
}else{
var _17=dojo.graphics.color.hex2rgb(_13);
if(_17){
return _17;
}else{
return dojo.graphics.color.named[_13]||[255,255,255];
}
}
};
dojo.graphics.color.hex2rgb=function(hex){
var _19="0123456789ABCDEF";
var rgb=new Array(3);
if(hex.indexOf("#")==0){
hex=hex.substring(1);
}
hex=hex.toUpperCase();
if(hex.replace(new RegExp("["+_19+"]","g"),"")!=""){
return null;
}
if(hex.length==3){
rgb[0]=hex.charAt(0)+hex.charAt(0);
rgb[1]=hex.charAt(1)+hex.charAt(1);
rgb[2]=hex.charAt(2)+hex.charAt(2);
}else{
rgb[0]=hex.substring(0,2);
rgb[1]=hex.substring(2,4);
rgb[2]=hex.substring(4);
}
for(var i=0;i<rgb.length;i++){
rgb[i]=_19.indexOf(rgb[i].charAt(0))*16+_19.indexOf(rgb[i].charAt(1));
}
return rgb;
};
dojo.graphics.color.rgb2hex=function(r,g,b){
if(dojo.lang.isArray(r)){
g=r[1]||0;
b=r[2]||0;
r=r[0]||0;
}
function pad(x){
while(x.length<2){
x="0"+x;
}
return x;
}
var ret=dojo.lang.map([r,g,b],function(x){
var s=x.toString(16);
while(s.length<2){
s="0"+s;
}
return s;
});
ret.unshift("#");
return ret.join("");
};
dojo.graphics.color.rgb2hsv=function(r,g,b){
if(dojo.lang.isArray(r)){
b=r[2]||0;
g=r[1]||0;
r=r[0]||0;
}
var h=null;
var s=null;
var v=null;
var min=Math.min(r,g,b);
v=Math.max(r,g,b);
var _2a=v-min;
s=(v==0)?0:_2a/v;
if(s==0){
h=0;
}else{
if(r==v){
h=60*(g-b)/_2a;
}else{
if(g==v){
h=120+60*(b-r)/_2a;
}else{
if(b==v){
h=240+60*(r-g)/_2a;
}
}
}
if(h<0){
h+=360;
}
}
h=(h==0)?360:Math.ceil((h/360)*255);
s=Math.ceil(s*255);
return [h,s,v];
};
dojo.graphics.color.hsv2rgb=function(h,s,v){
if(dojo.lang.isArray(h)){
v=h[2]||0;
s=h[1]||0;
h=h[0]||0;
}
h=(h/255)*360;
if(h==360){
h=0;
}
s=s/255;
v=v/255;
var r=null;
var g=null;
var b=null;
if(s==0){
r=v;
g=v;
b=v;
}else{
var _31=h/60;
var i=Math.floor(_31);
var f=_31-i;
var p=v*(1-s);
var q=v*(1-(s*f));
var t=v*(1-(s*(1-f)));
switch(i){
case 0:
r=v;
g=t;
b=p;
break;
case 1:
r=q;
g=v;
b=p;
break;
case 2:
r=p;
g=v;
b=t;
break;
case 3:
r=p;
g=q;
b=v;
break;
case 4:
r=t;
g=p;
b=v;
break;
case 5:
r=v;
g=p;
b=q;
break;
}
}
r=Math.ceil(r*255);
g=Math.ceil(g*255);
b=Math.ceil(b*255);
return [r,g,b];
};
dojo.graphics.color.rgb2hsl=function(r,g,b){
if(dojo.lang.isArray(r)){
b=r[2]||0;
g=r[1]||0;
r=r[0]||0;
}
r/=255;
g/=255;
b/=255;
var h=null;
var s=null;
var l=null;
var min=Math.min(r,g,b);
var max=Math.max(r,g,b);
var _3f=max-min;
l=(min+max)/2;
s=0;
if((l>0)&&(l<1)){
s=_3f/((l<0.5)?(2*l):(2-2*l));
}
h=0;
if(_3f>0){
if((max==r)&&(max!=g)){
h+=(g-b)/_3f;
}
if((max==g)&&(max!=b)){
h+=(2+(b-r)/_3f);
}
if((max==b)&&(max!=r)){
h+=(4+(r-g)/_3f);
}
h*=60;
}
h=(h==0)?360:Math.ceil((h/360)*255);
s=Math.ceil(s*255);
l=Math.ceil(l*255);
return [h,s,l];
};
dojo.graphics.color.hsl2rgb=function(h,s,l){
if(dojo.lang.isArray(h)){
l=h[2]||0;
s=h[1]||0;
h=h[0]||0;
}
h=(h/255)*360;
if(h==360){
h=0;
}
s=s/255;
l=l/255;
while(h<0){
h+=360;
}
while(h>360){
h-=360;
}
if(h<120){
r=(120-h)/60;
g=h/60;
b=0;
}else{
if(h<240){
r=0;
g=(240-h)/60;
b=(h-120)/60;
}else{
r=(h-240)/60;
g=0;
b=(360-h)/60;
}
}
r=Math.min(r,1);
g=Math.min(g,1);
b=Math.min(b,1);
r=2*s*r+(1-s);
g=2*s*g+(1-s);
b=2*s*b+(1-s);
if(l<0.5){
r=l*r;
g=l*g;
b=l*b;
}else{
r=(1-l)*r+2*l-1;
g=(1-l)*g+2*l-1;
b=(1-l)*b+2*l-1;
}
r=Math.ceil(r*255);
g=Math.ceil(g*255);
b=Math.ceil(b*255);
return [r,g,b];
};
dojo.graphics.color.hsl2hex=function(h,s,l){
var rgb=dojo.graphics.color.hsl2rgb(h,s,l);
return dojo.graphics.color.rgb2hex(rgb[0],rgb[1],rgb[2]);
};
dojo.graphics.color.hex2hsl=function(hex){
var rgb=dojo.graphics.color.hex2rgb(hex);
return dojo.graphics.color.rgb2hsl(rgb[0],rgb[1],rgb[2]);
};


dojo.provide("dojo.style");
dojo.style.boxSizing={marginBox:"margin-box",borderBox:"border-box",paddingBox:"padding-box",contentBox:"content-box"};
dojo.style.getBoxSizing=function(_1){
_1=dojo.byId(_1);
if(dojo.render.html.ie||dojo.render.html.opera){
var cm=document["compatMode"];
if(cm=="BackCompat"||cm=="QuirksMode"){
return dojo.style.boxSizing.borderBox;
}else{
return dojo.style.boxSizing.contentBox;
}
}else{
if(arguments.length==0){
_1=document.documentElement;
}
var _3=dojo.style.getStyle(_1,"-moz-box-sizing");
if(!_3){
_3=dojo.style.getStyle(_1,"box-sizing");
}
return (_3?_3:dojo.style.boxSizing.contentBox);
}
};
dojo.style.isBorderBox=function(_4){
return (dojo.style.getBoxSizing(_4)==dojo.style.boxSizing.borderBox);
};
dojo.style.getUnitValue=function(_5,_6,_7){
_5=dojo.byId(_5);
var _8={value:0,units:"px"};
var s=dojo.style.getComputedStyle(_5,_6);
if(s==""||(s=="auto"&&_7)){
return _8;
}
if(dojo.lang.isUndefined(s)){
_8.value=NaN;
}else{
var _a=s.match(/(\-?[\d.]+)([a-z%]*)/i);
if(!_a){
_8.value=NaN;
}else{
_8.value=Number(_a[1]);
_8.units=_a[2].toLowerCase();
}
}
return _8;
};
dojo.style.getPixelValue=function(_b,_c,_d){
_b=dojo.byId(_b);
var _e=dojo.style.getUnitValue(_b,_c,_d);
if(isNaN(_e.value)){
return 0;
}
if((_e.value)&&(_e.units!="px")){
return NaN;
}
return _e.value;
};
dojo.style.getNumericStyle=dojo.style.getPixelValue;
dojo.style.isPositionAbsolute=function(_f){
_f=dojo.byId(_f);
return (dojo.style.getComputedStyle(_f,"position")=="absolute");
};
dojo.style.getMarginWidth=function(_10){
_10=dojo.byId(_10);
var _11=dojo.style.isPositionAbsolute(_10);
var _12=dojo.style.getPixelValue(_10,"margin-left",_11);
var _13=dojo.style.getPixelValue(_10,"margin-right",_11);
return _12+_13;
};
dojo.style.getBorderWidth=function(_14){
_14=dojo.byId(_14);
var _15=(dojo.style.getStyle(_14,"border-left-style")=="none"?0:dojo.style.getPixelValue(_14,"border-left-width"));
var _16=(dojo.style.getStyle(_14,"border-right-style")=="none"?0:dojo.style.getPixelValue(_14,"border-right-width"));
return _15+_16;
};
dojo.style.getPaddingWidth=function(_17){
_17=dojo.byId(_17);
var _18=dojo.style.getPixelValue(_17,"padding-left",true);
var _19=dojo.style.getPixelValue(_17,"padding-right",true);
return _18+_19;
};
dojo.style.getContentWidth=function(_1a){
_1a=dojo.byId(_1a);
return _1a.offsetWidth-dojo.style.getPaddingWidth(_1a)-dojo.style.getBorderWidth(_1a);
};
dojo.style.getInnerWidth=function(_1b){
_1b=dojo.byId(_1b);
return _1b.offsetWidth;
};
dojo.style.getOuterWidth=function(_1c){
_1c=dojo.byId(_1c);
return dojo.style.getInnerWidth(_1c)+dojo.style.getMarginWidth(_1c);
};
dojo.style.setOuterWidth=function(_1d,_1e){
_1d=dojo.byId(_1d);
if(!dojo.style.isBorderBox(_1d)){
_1e-=dojo.style.getPaddingWidth(_1d)+dojo.style.getBorderWidth(_1d);
}
_1e-=dojo.style.getMarginWidth(_1d);
if(!isNaN(_1e)&&_1e>0){
_1d.style.width=_1e+"px";
return true;
}else{
return false;
}
};
dojo.style.getContentBoxWidth=dojo.style.getContentWidth;
dojo.style.getBorderBoxWidth=dojo.style.getInnerWidth;
dojo.style.getMarginBoxWidth=dojo.style.getOuterWidth;
dojo.style.setMarginBoxWidth=dojo.style.setOuterWidth;
dojo.style.getMarginHeight=function(_1f){
_1f=dojo.byId(_1f);
var _20=dojo.style.isPositionAbsolute(_1f);
var top=dojo.style.getPixelValue(_1f,"margin-top",_20);
var _22=dojo.style.getPixelValue(_1f,"margin-bottom",_20);
return top+_22;
};
dojo.style.getBorderHeight=function(_23){
_23=dojo.byId(_23);
var top=(dojo.style.getStyle(_23,"border-top-style")=="none"?0:dojo.style.getPixelValue(_23,"border-top-width"));
var _25=(dojo.style.getStyle(_23,"border-bottom-style")=="none"?0:dojo.style.getPixelValue(_23,"border-bottom-width"));
return top+_25;
};
dojo.style.getPaddingHeight=function(_26){
_26=dojo.byId(_26);
var top=dojo.style.getPixelValue(_26,"padding-top",true);
var _28=dojo.style.getPixelValue(_26,"padding-bottom",true);
return top+_28;
};
dojo.style.getContentHeight=function(_29){
_29=dojo.byId(_29);
return _29.offsetHeight-dojo.style.getPaddingHeight(_29)-dojo.style.getBorderHeight(_29);
};
dojo.style.getInnerHeight=function(_2a){
_2a=dojo.byId(_2a);
return _2a.offsetHeight;
};
dojo.style.getOuterHeight=function(_2b){
_2b=dojo.byId(_2b);
return dojo.style.getInnerHeight(_2b)+dojo.style.getMarginHeight(_2b);
};
dojo.style.setOuterHeight=function(_2c,_2d){
_2c=dojo.byId(_2c);
if(!dojo.style.isBorderBox(_2c)){
_2d-=dojo.style.getPaddingHeight(_2c)+dojo.style.getBorderHeight(_2c);
}
_2d-=dojo.style.getMarginHeight(_2c);
if(!isNaN(_2d)&&_2d>0){
_2c.style.height=_2d+"px";
return true;
}else{
return false;
}
};
dojo.style.setContentWidth=function(_2e,_2f){
_2e=dojo.byId(_2e);
if(dojo.style.isBorderBox(_2e)){
_2f+=dojo.style.getPaddingWidth(_2e)+dojo.style.getBorderWidth(_2e);
}
if(!isNaN(_2f)&&_2f>0){
_2e.style.width=_2f+"px";
return true;
}else{
return false;
}
};
dojo.style.setContentHeight=function(_30,_31){
_30=dojo.byId(_30);
if(dojo.style.isBorderBox(_30)){
_31+=dojo.style.getPaddingHeight(_30)+dojo.style.getBorderHeight(_30);
}
if(!isNaN(_31)&&_31>0){
_30.style.height=_31+"px";
return true;
}else{
return false;
}
};
dojo.style.getContentBoxHeight=dojo.style.getContentHeight;
dojo.style.getBorderBoxHeight=dojo.style.getInnerHeight;
dojo.style.getMarginBoxHeight=dojo.style.getOuterHeight;
dojo.style.setMarginBoxHeight=dojo.style.setOuterHeight;
dojo.style.getTotalOffset=function(_32,_33,_34){
_32=dojo.byId(_32);
var _35=(_33=="top")?"offsetTop":"offsetLeft";
var _36=(_33=="top")?"scrollTop":"scrollLeft";
var _37=(_33=="top")?"y":"x";
var _38=0;
if(_32["offsetParent"]){
if(dojo.render.html.safari&&_32.style.getPropertyValue("position")=="absolute"&&_32.parentNode==document.body){
var _39=document.body;
}else{
var _39=document.body.parentNode;
}
if(_34&&_32.parentNode!=document.body){
_38-=dojo.style.sumAncestorProperties(_32,_36);
}
do{
var n=_32[_35];
_38+=isNaN(n)?0:n;
_32=_32.offsetParent;
}while(_32!=_39&&_32!=null);
}else{
if(_32[_37]){
var n=_32[_37];
_38+=isNaN(n)?0:n;
}
}
return _38;
};
dojo.style.sumAncestorProperties=function(_3b,_3c){
_3b=dojo.byId(_3b);
if(!_3b){
return 0;
}
var _3d=0;
while(_3b){
var val=_3b[_3c];
if(val){
_3d+=val-0;
}
_3b=_3b.parentNode;
}
return _3d;
};
dojo.style.totalOffsetLeft=function(_3f,_40){
_3f=dojo.byId(_3f);
return dojo.style.getTotalOffset(_3f,"left",_40);
};
dojo.style.getAbsoluteX=dojo.style.totalOffsetLeft;
dojo.style.totalOffsetTop=function(_41,_42){
_41=dojo.byId(_41);
return dojo.style.getTotalOffset(_41,"top",_42);
};
dojo.style.getAbsoluteY=dojo.style.totalOffsetTop;
dojo.style.getAbsolutePosition=function(_43,_44){
_43=dojo.byId(_43);
var _45=[dojo.style.getAbsoluteX(_43,_44),dojo.style.getAbsoluteY(_43,_44)];
_45.x=_45[0];
_45.y=_45[1];
return _45;
};
dojo.style.styleSheet=null;
dojo.style.insertCssRule=function(_46,_47,_48){
if(!dojo.style.styleSheet){
if(document.createStyleSheet){
dojo.style.styleSheet=document.createStyleSheet();
}else{
if(document.styleSheets[0]){
dojo.style.styleSheet=document.styleSheets[0];
}else{
return null;
}
}
}
if(arguments.length<3){
if(dojo.style.styleSheet.cssRules){
_48=dojo.style.styleSheet.cssRules.length;
}else{
if(dojo.style.styleSheet.rules){
_48=dojo.style.styleSheet.rules.length;
}else{
return null;
}
}
}
if(dojo.style.styleSheet.insertRule){
var _49=_46+" { "+_47+" }";
return dojo.style.styleSheet.insertRule(_49,_48);
}else{
if(dojo.style.styleSheet.addRule){
return dojo.style.styleSheet.addRule(_46,_47,_48);
}else{
return null;
}
}
};
dojo.style.removeCssRule=function(_4a){
if(!dojo.style.styleSheet){
dojo.debug("no stylesheet defined for removing rules");
return false;
}
if(dojo.render.html.ie){
if(!_4a){
_4a=dojo.style.styleSheet.rules.length;
dojo.style.styleSheet.removeRule(_4a);
}
}else{
if(document.styleSheets[0]){
if(!_4a){
_4a=dojo.style.styleSheet.cssRules.length;
}
dojo.style.styleSheet.deleteRule(_4a);
}
}
return true;
};
dojo.style.insertCssFile=function(URI,doc,_4d){
if(!URI){
return;
}
if(!doc){
doc=document;
}
var _4e=dojo.hostenv.getText(URI);
var _4e=dojo.style.fixPathsInCssText(_4e,URI);
if(_4d){
var _4f=doc.getElementsByTagName("style");
var _50="";
for(var i=0;i<_4f.length;i++){
_50=(_4f[i].styleSheet&&_4f[i].styleSheet.cssText)?_4f[i].styleSheet.cssText:_4f[i].innerHTML;
if(_4e==_50){
return;
}
}
}
var _52=dojo.style.insertCssText(_4e);
if(_52&&djConfig.isDebug){
_52.setAttribute("dbgHref",URI);
}
return _52;
};
dojo.style.insertCssText=function(_53,doc,URI){
if(!_53){
return;
}
if(!doc){
doc=document;
}
if(URI){
_53=dojo.style.fixPathsInCssText(_53,URI);
}
var _56=doc.createElement("style");
_56.setAttribute("type","text/css");
if(_56.styleSheet){
_56.styleSheet.cssText=_53;
}else{
var _57=doc.createTextNode(_53);
_56.appendChild(_57);
}
var _58=doc.getElementsByTagName("head")[0];
if(_58){
_58.appendChild(_56);
}
return _56;
};
dojo.style.fixPathsInCssText=function(_59,URI){
if(!_59||!URI){
return;
}
var pos=0;
var str="";
var url="";
while(pos!=-1){
pos=0;
url="";
pos=_59.indexOf("url(",pos);
if(pos<0){
break;
}
str+=_59.slice(0,pos+4);
_59=_59.substring(pos+4,_59.length);
url+=_59.match(/^[\t\s\w()\/.\\'"-:#=&?]*\)/)[0];
_59=_59.substring(url.length-1,_59.length);
url=url.replace(/^[\s\t]*(['"]?)([\w()\/.\\'"-:#=&?]*)\1[\s\t]*?\)/,"$2");
if(url.search(/(file|https?|ftps?):\/\//)==-1){
url=(new dojo.uri.Uri(URI,url).toString());
}
str+=url;
}
return str+_59;
};
dojo.style.getBackgroundColor=function(_5e){
_5e=dojo.byId(_5e);
var _5f;
do{
_5f=dojo.style.getStyle(_5e,"background-color");
if(_5f.toLowerCase()=="rgba(0, 0, 0, 0)"){
_5f="transparent";
}
if(_5e==document.getElementsByTagName("body")[0]){
_5e=null;
break;
}
_5e=_5e.parentNode;
}while(_5e&&dojo.lang.inArray(_5f,["transparent",""]));
if(_5f=="transparent"){
_5f=[255,255,255,0];
}else{
_5f=dojo.graphics.color.extractRGB(_5f);
}
return _5f;
};
dojo.style.getComputedStyle=function(_60,_61,_62){
_60=dojo.byId(_60);
if(document.defaultView){
try{
var cs=document.defaultView.getComputedStyle(_60,"");
if(cs){
return cs.getPropertyValue(_61);
}
}
catch(e){
if(_60.style.getPropertyValue){
return _60.style.getPropertyValue(_61);
}else{
return _62;
}
}
}else{
if(_60.currentStyle){
return _60.currentStyle[dojo.style.toCamelCase(_61)];
}
}
if(_60.style.getPropertyValue){
return _60.style.getPropertyValue(_61);
}else{
return _62;
}
};
dojo.style.getStyle=function(_64,_65){
_64=dojo.byId(_64);
var _66=dojo.style.toCamelCase(_65);
var _67=_64.style[_66];
return (_67?_67:dojo.style.getComputedStyle(_64,_65));
};
dojo.style.toCamelCase=function(_68){
var arr=_68.split("-"),cc=arr[0];
for(var i=1;i<arr.length;i++){
cc+=arr[i].charAt(0).toUpperCase()+arr[i].substring(1);
}
return cc;
};
dojo.style.toSelectorCase=function(_6b){
return _6b.replace(/([A-Z])/g,"-$1").toLowerCase();
};
dojo.style.setOpacity=function setOpacity(_6c,_6d,_6e){
_6c=dojo.byId(_6c);
var h=dojo.render.html;
if(!_6e){
if(_6d>=1){
if(h.ie){
dojo.style.clearOpacity(_6c);
return;
}else{
_6d=0.999999;
}
}else{
if(_6d<0){
_6d=0;
}
}
}
if(h.ie){
if(_6c.nodeName.toLowerCase()=="tr"){
var tds=_6c.getElementsByTagName("td");
for(var x=0;x<tds.length;x++){
tds[x].style.filter="Alpha(Opacity="+_6d*100+")";
}
}
_6c.style.filter="Alpha(Opacity="+_6d*100+")";
}else{
if(h.moz){
_6c.style.opacity=_6d;
_6c.style.MozOpacity=_6d;
}else{
if(h.safari){
_6c.style.opacity=_6d;
_6c.style.KhtmlOpacity=_6d;
}else{
_6c.style.opacity=_6d;
}
}
}
};
dojo.style.getOpacity=function getOpacity(_72){
_72=dojo.byId(_72);
if(dojo.render.html.ie){
var _73=(_72.filters&&_72.filters.alpha&&typeof _72.filters.alpha.opacity=="number"?_72.filters.alpha.opacity:100)/100;
}else{
var _73=_72.style.opacity||_72.style.MozOpacity||_72.style.KhtmlOpacity||1;
}
return _73>=0.999999?1:Number(_73);
};
dojo.style.clearOpacity=function clearOpacity(_74){
_74=dojo.byId(_74);
var h=dojo.render.html;
if(h.ie){
if(_74.filters&&_74.filters.alpha){
_74.style.filter="";
}
}else{
if(h.moz){
_74.style.opacity=1;
_74.style.MozOpacity=1;
}else{
if(h.safari){
_74.style.opacity=1;
_74.style.KhtmlOpacity=1;
}else{
_74.style.opacity=1;
}
}
}
};
dojo.style.show=function(_76){
_76=dojo.byId(_76);
if(_76.style){
_76.style.display="";
}
};
dojo.style.hide=function(_77){
_77=dojo.byId(_77);
if(_77.style){
_77.style.display="none";
}
};
dojo.style.isShowing=function(_78){
_78=dojo.byId(_78);
return Boolean(_78.style&&_78.style.display!="none");
};
dojo.style.toggleShowing=function(_79){
var _7a=dojo.style.isShowing(_79);
dojo.style[(_7a?"hide":"show")](_79);
return _7a;
};
dojo.style.displayMap={tr:"",td:"",th:"",img:"inline",span:"inline",input:"inline",button:"inline"};
dojo.style.suggestDisplayForTagName=function(_7b){
_7b=dojo.byId(_7b);
if(_7b&&_7b.tagName){
var tag=_7b.tagName.toLowerCase();
return (tag in dojo.style.displayMap?dojo.style.displayMap[tag]:"block");
}
};
dojo.style.setDisplay=function(_7d,_7e){
_7d=dojo.byId(_7d);
if(_7d.style){
_7d.style.display=(dojo.lang.isString(_7e)?_7e:(_7e?dojo.style.suggestDisplayForTagName(_7d):"none"));
}
};
dojo.style.isDisplayed=function(_7f){
return (dojo.style.getComputedStyle(_7f,"display")!="none");
};
dojo.style.setVisibility=function(_80,_81){
_80=dojo.byId(_80);
if(_80.style){
_80.style.visibility=(dojo.lang.isString(_81)?_81:(_81?"visible":"hidden"));
}
};
dojo.style.isVisible=function(_82){
return (dojo.style.getComputedStyle(_82,"visibility")!="hidden");
};
dojo.style.toCoordinateArray=function(_83,_84){
if(dojo.lang.isArray(_83)){
while(_83.length<4){
_83.push(0);
}
while(_83.length>4){
_83.pop();
}
var ret=_83;
}else{
var _86=dojo.byId(_83);
var ret=[dojo.style.getAbsoluteX(_86,_84),dojo.style.getAbsoluteY(_86,_84),dojo.style.getInnerWidth(_86),dojo.style.getInnerHeight(_86)];
}
ret.x=ret[0];
ret.y=ret[1];
ret.w=ret[2];
ret.h=ret[3];
return ret;
};


dojo.provide("dojo.string.extras");
dojo.string.paramString=function(_1,_2,_3){
for(var _4 in _2){
var re=new RegExp("\\%\\{"+_4+"\\}","g");
_1=_1.replace(re,_2[_4]);
}
if(_3){
_1=_1.replace(/%\{([^\}\s]+)\}/g,"");
}
return _1;
};
dojo.string.capitalize=function(_6){
if(!dojo.lang.isString(_6)){
return "";
}
if(arguments.length==0){
_6=this;
}
var _7=_6.split(" ");
var _8="";
var _9=_7.length;
for(var i=0;i<_9;i++){
var _b=_7[i];
_b=_b.charAt(0).toUpperCase()+_b.substring(1,_b.length);
_8+=_b;
if(i<_9-1){
_8+=" ";
}
}
return new String(_8);
};
dojo.string.isBlank=function(_c){
if(!dojo.lang.isString(_c)){
return true;
}
return (dojo.string.trim(_c).length==0);
};
dojo.string.encodeAscii=function(_d){
if(!dojo.lang.isString(_d)){
return _d;
}
var _e="";
var _f=escape(_d);
var _10,re=/%u([0-9A-F]{4})/i;
while((_10=_f.match(re))){
var num=Number("0x"+_10[1]);
var _12=escape("&#"+num+";");
_e+=_f.substring(0,_10.index)+_12;
_f=_f.substring(_10.index+_10[0].length);
}
_e+=_f.replace(/\+/g,"%2B");
return _e;
};
dojo.string.escape=function(_13,str){
var _15=[];
for(var i=1;i<arguments.length;i++){
_15.push(arguments[i]);
}
switch(_13.toLowerCase()){
case "xml":
case "html":
case "xhtml":
return dojo.string.escapeXml.apply(this,_15);
case "sql":
return dojo.string.escapeSql.apply(this,_15);
case "regexp":
case "regex":
return dojo.string.escapeRegExp.apply(this,_15);
case "javascript":
case "jscript":
case "js":
return dojo.string.escapeJavaScript.apply(this,_15);
case "ascii":
return dojo.string.encodeAscii.apply(this,_15);
default:
return str;
}
};
dojo.string.escapeXml=function(str,_18){
str=str.replace(/&/gm,"&amp;").replace(/</gm,"&lt;").replace(/>/gm,"&gt;").replace(/"/gm,"&quot;");
if(!_18){
str=str.replace(/'/gm,"&#39;");
}
return str;
};
dojo.string.escapeSql=function(str){
return str.replace(/'/gm,"''");
};
dojo.string.escapeRegExp=function(str){
return str.replace(/\\/gm,"\\\\").replace(/([\f\b\n\t\r])/gm,"\\$1");
};
dojo.string.escapeJavaScript=function(str){
return str.replace(/(["'\f\b\n\t\r])/gm,"\\$1");
};
dojo.string.summary=function(str,len){
if(!len||str.length<=len){
return str;
}else{
return str.substring(0,len).replace(/\.+$/,"")+"...";
}
};
dojo.string.endsWith=function(str,end,_20){
if(_20){
str=str.toLowerCase();
end=end.toLowerCase();
}
if((str.length-end.length)<0){
return false;
}
return str.lastIndexOf(end)==str.length-end.length;
};
dojo.string.endsWithAny=function(str){
for(var i=1;i<arguments.length;i++){
if(dojo.string.endsWith(str,arguments[i])){
return true;
}
}
return false;
};
dojo.string.startsWith=function(str,_24,_25){
if(_25){
str=str.toLowerCase();
_24=_24.toLowerCase();
}
return str.indexOf(_24)==0;
};
dojo.string.startsWithAny=function(str){
for(var i=1;i<arguments.length;i++){
if(dojo.string.startsWith(str,arguments[i])){
return true;
}
}
return false;
};
dojo.string.has=function(str){
for(var i=1;i<arguments.length;i++){
if(str.indexOf(arguments[i])>-1){
return true;
}
}
return false;
};
dojo.string.normalizeNewlines=function(_2a,_2b){
if(_2b=="\n"){
_2a=_2a.replace(/\r\n/g,"\n");
_2a=_2a.replace(/\r/g,"\n");
}else{
if(_2b=="\r"){
_2a=_2a.replace(/\r\n/g,"\r");
_2a=_2a.replace(/\n/g,"\r");
}else{
_2a=_2a.replace(/([^\r])\n/g,"$1\r\n");
_2a=_2a.replace(/\r([^\n])/g,"\r\n$1");
}
}
return _2a;
};
dojo.string.splitEscaped=function(str,_2d){
var _2e=[];
for(var i=0,prevcomma=0;i<str.length;i++){
if(str.charAt(i)=="\\"){
i++;
continue;
}
if(str.charAt(i)==_2d){
_2e.push(str.substring(prevcomma,i));
prevcomma=i+1;
}
}
_2e.push(str.substr(prevcomma));
return _2e;
};


dojo.provide("dojo.uri.Uri");
dojo.uri=new function(){
this.joinPath=function(){
var _1=[];
for(var i=0;i<arguments.length;i++){
_1.push(arguments[i]);
}
return _1.join("/").replace(/\/{2,}/g,"/").replace(/((https*|ftps*):)/i,"$1/");
};
this.dojoUri=function(_3){
return new dojo.uri.Uri(dojo.hostenv.getBaseScriptUri(),_3);
};
this.Uri=function(){
var _4=arguments[0];
for(var i=1;i<arguments.length;i++){
if(!arguments[i]){
continue;
}
var _6=new dojo.uri.Uri(arguments[i].toString());
var _7=new dojo.uri.Uri(_4.toString());
if(_6.path==""&&_6.scheme==null&&_6.authority==null&&_6.query==null){
if(_6.fragment!=null){
_7.fragment=_6.fragment;
}
_6=_7;
}else{
if(_6.scheme==null){
_6.scheme=_7.scheme;
if(_6.authority==null){
_6.authority=_7.authority;
if(_6.path.charAt(0)!="/"){
var _8=_7.path.substring(0,_7.path.lastIndexOf("/")+1)+_6.path;
var _9=_8.split("/");
for(var j=0;j<_9.length;j++){
if(_9[j]=="."){
if(j==_9.length-1){
_9[j]="";
}else{
_9.splice(j,1);
j--;
}
}else{
if(j>0&&!(j==1&&_9[0]=="")&&_9[j]==".."&&_9[j-1]!=".."){
if(j==_9.length-1){
_9.splice(j,1);
_9[j-1]="";
}else{
_9.splice(j-1,2);
j-=2;
}
}
}
}
_6.path=_9.join("/");
}
}
}
}
_4="";
if(_6.scheme!=null){
_4+=_6.scheme+":";
}
if(_6.authority!=null){
_4+="//"+_6.authority;
}
_4+=_6.path;
if(_6.query!=null){
_4+="?"+_6.query;
}
if(_6.fragment!=null){
_4+="#"+_6.fragment;
}
}
this.uri=_4.toString();
var _b="^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?$";
var r=this.uri.match(new RegExp(_b));
this.scheme=r[2]||(r[1]?"":null);
this.authority=r[4]||(r[3]?"":null);
this.path=r[5];
this.query=r[7]||(r[6]?"":null);
this.fragment=r[9]||(r[8]?"":null);
if(this.authority!=null){
_b="^((([^:]+:)?([^@]+))@)?([^:]*)(:([0-9]+))?$";
r=this.authority.match(new RegExp(_b));
this.user=r[3]||null;
this.password=r[4]||null;
this.host=r[5];
this.port=r[7]||null;
}
this.toString=function(){
return this.uri;
};
};
};


dojo.provide("dojo.html");
dojo.lang.mixin(dojo.html,dojo.dom);
dojo.lang.mixin(dojo.html,dojo.style);
dojo.html.clearSelection=function(){
try{
if(window["getSelection"]){
if(dojo.render.html.safari){
window.getSelection().collapse();
}else{
window.getSelection().removeAllRanges();
}
}else{
if(document.selection){
if(document.selection.empty){
document.selection.empty();
}else{
if(document.selection.clear){
document.selection.clear();
}
}
}
}
return true;
}
catch(e){
dojo.debug(e);
return false;
}
};
dojo.html.disableSelection=function(_1){
_1=dojo.byId(_1)||document.body;
var h=dojo.render.html;
if(h.mozilla){
_1.style.MozUserSelect="none";
}else{
if(h.safari){
_1.style.KhtmlUserSelect="none";
}else{
if(h.ie){
_1.unselectable="on";
}else{
return false;
}
}
}
return true;
};
dojo.html.enableSelection=function(_3){
_3=dojo.byId(_3)||document.body;
var h=dojo.render.html;
if(h.mozilla){
_3.style.MozUserSelect="";
}else{
if(h.safari){
_3.style.KhtmlUserSelect="";
}else{
if(h.ie){
_3.unselectable="off";
}else{
return false;
}
}
}
return true;
};
dojo.html.selectElement=function(_5){
_5=dojo.byId(_5);
if(document.selection&&document.body.createTextRange){
var _6=document.body.createTextRange();
_6.moveToElementText(_5);
_6.select();
}else{
if(window["getSelection"]){
var _7=window.getSelection();
if(_7["selectAllChildren"]){
_7.selectAllChildren(_5);
}
}
}
};
dojo.html.selectInputText=function(_8){
_8=dojo.byId(_8);
if(document.selection&&document.body.createTextRange){
var _9=_8.createTextRange();
_9.moveStart("character",0);
_9.moveEnd("character",_8.value.length);
_9.select();
}else{
if(window["getSelection"]){
var _a=window.getSelection();
_8.setSelectionRange(0,_8.value.length);
}
}
_8.focus();
};
dojo.html.isSelectionCollapsed=function(){
if(document["selection"]){
return document.selection.createRange().text=="";
}else{
if(window["getSelection"]){
var _b=window.getSelection();
if(dojo.lang.isString(_b)){
return _b=="";
}else{
return _b.isCollapsed;
}
}
}
};
dojo.html.getEventTarget=function(_c){
if(!_c){
_c=window.event||{};
}
if(_c.srcElement){
return _c.srcElement;
}else{
if(_c.target){
return _c.target;
}
}
return null;
};
dojo.html.getScrollTop=function(){
return document.documentElement.scrollTop||document.body.scrollTop||0;
};
dojo.html.getScrollLeft=function(){
return document.documentElement.scrollLeft||document.body.scrollLeft||0;
};
dojo.html.getDocumentWidth=function(){
dojo.deprecated("dojo.html.getDocument* has been deprecated in favor of dojo.html.getViewport*");
return dojo.html.getViewportWidth();
};
dojo.html.getDocumentHeight=function(){
dojo.deprecated("dojo.html.getDocument* has been deprecated in favor of dojo.html.getViewport*");
return dojo.html.getViewportHeight();
};
dojo.html.getDocumentSize=function(){
dojo.deprecated("dojo.html.getDocument* has been deprecated in favor of dojo.html.getViewport*");
return dojo.html.getViewportSize();
};
dojo.html.getViewportWidth=function(){
var w=0;
if(window.innerWidth){
w=window.innerWidth;
}
if(dojo.exists(document,"documentElement.clientWidth")){
var w2=document.documentElement.clientWidth;
if(!w||w2&&w2<w){
w=w2;
}
return w;
}
if(document.body){
return document.body.clientWidth;
}
return 0;
};
dojo.html.getViewportHeight=function(){
if(window.innerHeight){
return window.innerHeight;
}
if(dojo.exists(document,"documentElement.clientHeight")){
return document.documentElement.clientHeight;
}
if(document.body){
return document.body.clientHeight;
}
return 0;
};
dojo.html.getViewportSize=function(){
var _f=[dojo.html.getViewportWidth(),dojo.html.getViewportHeight()];
_f.w=_f[0];
_f.h=_f[1];
return _f;
};
dojo.html.getScrollOffset=function(){
var ret=[0,0];
if(window.pageXOffset||window.pageYOffset){
ret=[window.pageXOffset,window.pageYOffset];
}else{
if(dojo.exists(document,"documentElement.scrollTop")){
ret=[document.documentElement.scrollLeft,document.documentElement.scrollTop];
}else{
if(document.body){
ret=[document.body.scrollLeft,document.body.scrollTop];
}
}
}
ret.x=ret[0];
ret.y=ret[1];
return ret;
};
dojo.html.getParentOfType=function(_11,_12){
dojo.deprecated("dojo.html.getParentOfType has been deprecated in favor of dojo.html.getParentByType*");
return dojo.html.getParentByType(_11,_12);
};
dojo.html.getParentByType=function(_13,_14){
var _15=dojo.byId(_13);
_14=_14.toLowerCase();
while((_15)&&(_15.nodeName.toLowerCase()!=_14)){
if(_15==(document["body"]||document["documentElement"])){
return null;
}
_15=_15.parentNode;
}
return _15;
};
dojo.html.getAttribute=function(_16,_17){
_16=dojo.byId(_16);
if((!_16)||(!_16.getAttribute)){
return null;
}
var ta=typeof _17=="string"?_17:new String(_17);
var v=_16.getAttribute(ta.toUpperCase());
if((v)&&(typeof v=="string")&&(v!="")){
return v;
}
if(v&&v.value){
return v.value;
}
if((_16.getAttributeNode)&&(_16.getAttributeNode(ta))){
return (_16.getAttributeNode(ta)).value;
}else{
if(_16.getAttribute(ta)){
return _16.getAttribute(ta);
}else{
if(_16.getAttribute(ta.toLowerCase())){
return _16.getAttribute(ta.toLowerCase());
}
}
}
return null;
};
dojo.html.hasAttribute=function(_1a,_1b){
_1a=dojo.byId(_1a);
return dojo.html.getAttribute(_1a,_1b)?true:false;
};
dojo.html.getClass=function(_1c){
_1c=dojo.byId(_1c);
if(!_1c){
return "";
}
var cs="";
if(_1c.className){
cs=_1c.className;
}else{
if(dojo.html.hasAttribute(_1c,"class")){
cs=dojo.html.getAttribute(_1c,"class");
}
}
return dojo.string.trim(cs);
};
dojo.html.getClasses=function(_1e){
_1e=dojo.byId(_1e);
var c=dojo.html.getClass(_1e);
return (c=="")?[]:c.split(/\s+/g);
};
dojo.html.hasClass=function(_20,_21){
_20=dojo.byId(_20);
return dojo.lang.inArray(dojo.html.getClasses(_20),_21);
};
dojo.html.prependClass=function(_22,_23){
_22=dojo.byId(_22);
if(!_22){
return false;
}
_23+=" "+dojo.html.getClass(_22);
return dojo.html.setClass(_22,_23);
};
dojo.html.addClass=function(_24,_25){
_24=dojo.byId(_24);
if(!_24){
return false;
}
if(dojo.html.hasClass(_24,_25)){
return false;
}
_25=dojo.string.trim(dojo.html.getClass(_24)+" "+_25);
return dojo.html.setClass(_24,_25);
};
dojo.html.setClass=function(_26,_27){
_26=dojo.byId(_26);
if(!_26){
return false;
}
var cs=new String(_27);
try{
if(typeof _26.className=="string"){
_26.className=cs;
}else{
if(_26.setAttribute){
_26.setAttribute("class",_27);
_26.className=cs;
}else{
return false;
}
}
}
catch(e){
dojo.debug("dojo.html.setClass() failed",e);
}
return true;
};
dojo.html.removeClass=function(_29,_2a,_2b){
_29=dojo.byId(_29);
if(!_29){
return false;
}
var _2a=dojo.string.trim(new String(_2a));
try{
var cs=dojo.html.getClasses(_29);
var nca=[];
if(_2b){
for(var i=0;i<cs.length;i++){
if(cs[i].indexOf(_2a)==-1){
nca.push(cs[i]);
}
}
}else{
for(var i=0;i<cs.length;i++){
if(cs[i]!=_2a){
nca.push(cs[i]);
}
}
}
dojo.html.setClass(_29,nca.join(" "));
}
catch(e){
dojo.debug("dojo.html.removeClass() failed",e);
}
return true;
};
dojo.html.replaceClass=function(_2f,_30,_31){
_2f=dojo.byId(_2f);
dojo.html.removeClass(_2f,_31);
dojo.html.addClass(_2f,_30);
};
dojo.html.classMatchType={ContainsAll:0,ContainsAny:1,IsOnly:2};
dojo.html.getElementsByClass=function(_32,_33,_34,_35){
_33=dojo.byId(_33);
if(!_33){
_33=document;
}
var _36=_32.split(/\s+/g);
var _37=[];
if(_35!=1&&_35!=2){
_35=0;
}
var _38=new RegExp("(\\s|^)(("+_36.join(")|(")+"))(\\s|$)");
if(!_34){
_34="*";
}
var _39=_33.getElementsByTagName(_34);
var _3a,i=0;
outer:
while(_3a=_39[i++]){
var _3b=dojo.html.getClasses(_3a);
if(_3b.length==0){
continue outer;
}
var _3c=0;
for(var j=0;j<_3b.length;j++){
if(_38.test(_3b[j])){
if(_35==dojo.html.classMatchType.ContainsAny){
_37.push(_3a);
continue outer;
}else{
_3c++;
}
}else{
if(_35==dojo.html.classMatchType.IsOnly){
continue outer;
}
}
}
if(_3c==_36.length){
if(_35==dojo.html.classMatchType.IsOnly&&_3c==_3b.length){
_37.push(_3a);
}else{
if(_35==dojo.html.classMatchType.ContainsAll){
_37.push(_3a);
}
}
}
}
return _37;
};
dojo.html.getElementsByClassName=dojo.html.getElementsByClass;
dojo.html.gravity=function(_3e,e){
_3e=dojo.byId(_3e);
var _40=e.pageX||e.clientX+document.body.scrollLeft;
var _41=e.pageY||e.clientY+document.body.scrollTop;
with(dojo.html){
var _42=getAbsoluteX(_3e)+(getInnerWidth(_3e)/2);
var _43=getAbsoluteY(_3e)+(getInnerHeight(_3e)/2);
}
with(dojo.html.gravity){
return ((_40<_42?WEST:EAST)|(_41<_43?NORTH:SOUTH));
}
};
dojo.html.gravity.NORTH=1;
dojo.html.gravity.SOUTH=1<<1;
dojo.html.gravity.EAST=1<<2;
dojo.html.gravity.WEST=1<<3;
dojo.html.overElement=function(_44,e){
_44=dojo.byId(_44);
var _46=e.pageX||e.clientX+document.body.scrollLeft;
var _47=e.pageY||e.clientY+document.body.scrollTop;
with(dojo.html){
var top=getAbsoluteY(_44);
var _49=top+getInnerHeight(_44);
var _4a=getAbsoluteX(_44);
var _4b=_4a+getInnerWidth(_44);
}
return (_46>=_4a&&_46<=_4b&&_47>=top&&_47<=_49);
};
dojo.html.renderedTextContent=function(_4c){
_4c=dojo.byId(_4c);
var _4d="";
if(_4c==null){
return _4d;
}
for(var i=0;i<_4c.childNodes.length;i++){
switch(_4c.childNodes[i].nodeType){
case 1:
case 5:
var _4f="unknown";
try{
_4f=dojo.style.getStyle(_4c.childNodes[i],"display");
}
catch(E){
}
switch(_4f){
case "block":
case "list-item":
case "run-in":
case "table":
case "table-row-group":
case "table-header-group":
case "table-footer-group":
case "table-row":
case "table-column-group":
case "table-column":
case "table-cell":
case "table-caption":
_4d+="\n";
_4d+=dojo.html.renderedTextContent(_4c.childNodes[i]);
_4d+="\n";
break;
case "none":
break;
default:
if(_4c.childNodes[i].tagName&&_4c.childNodes[i].tagName.toLowerCase()=="br"){
_4d+="\n";
}else{
_4d+=dojo.html.renderedTextContent(_4c.childNodes[i]);
}
break;
}
break;
case 3:
case 2:
case 4:
var _50=_4c.childNodes[i].nodeValue;
var _51="unknown";
try{
_51=dojo.style.getStyle(_4c,"text-transform");
}
catch(E){
}
switch(_51){
case "capitalize":
_50=dojo.string.capitalize(_50);
break;
case "uppercase":
_50=_50.toUpperCase();
break;
case "lowercase":
_50=_50.toLowerCase();
break;
default:
break;
}
switch(_51){
case "nowrap":
break;
case "pre-wrap":
break;
case "pre-line":
break;
case "pre":
break;
default:
_50=_50.replace(/\s+/," ");
if(/\s$/.test(_4d)){
_50.replace(/^\s/,"");
}
break;
}
_4d+=_50;
break;
default:
break;
}
}
return _4d;
};
dojo.html.setActiveStyleSheet=function(_52){
var i=0,a,els=document.getElementsByTagName("link");
while(a=els[i++]){
if(a.getAttribute("rel").indexOf("style")!=-1&&a.getAttribute("title")){
a.disabled=true;
if(a.getAttribute("title")==_52){
a.disabled=false;
}
}
}
};
dojo.html.getActiveStyleSheet=function(){
var i=0,a,els=document.getElementsByTagName("link");
while(a=els[i++]){
if(a.getAttribute("rel").indexOf("style")!=-1&&a.getAttribute("title")&&!a.disabled){
return a.getAttribute("title");
}
}
return null;
};
dojo.html.getPreferredStyleSheet=function(){
var i=0,a,els=document.getElementsByTagName("link");
while(a=els[i++]){
if(a.getAttribute("rel").indexOf("style")!=-1&&a.getAttribute("rel").indexOf("alt")==-1&&a.getAttribute("title")){
return a.getAttribute("title");
}
}
return null;
};
dojo.html.body=function(){
dojo.deprecated("dojo.html.body","use document.body instead");
return document.body||document.getElementsByTagName("body")[0];
};
dojo.html.createNodesFromText=function(txt,_57){
if(_57){
txt=dojo.string.trim(txt);
}
var tn=document.createElement("div");
tn.style.visibility="hidden";
document.body.appendChild(tn);
var _59="none";
if((/^<t[dh][\s\r\n>]/i).test(dojo.string.trimStart(txt))){
txt="<table><tbody><tr>"+txt+"</tr></tbody></table>";
_59="cell";
}else{
if((/^<tr[\s\r\n>]/i).test(dojo.string.trimStart(txt))){
txt="<table><tbody>"+txt+"</tbody></table>";
_59="row";
}else{
if((/^<(thead|tbody|tfoot)[\s\r\n>]/i).test(dojo.string.trimStart(txt))){
txt="<table>"+txt+"</table>";
_59="section";
}
}
}
tn.innerHTML=txt;
tn.normalize();
var _5a=null;
switch(_59){
case "cell":
_5a=tn.getElementsByTagName("tr")[0];
break;
case "row":
_5a=tn.getElementsByTagName("tbody")[0];
break;
case "section":
_5a=tn.getElementsByTagName("table")[0];
break;
default:
_5a=tn;
break;
}
var _5b=[];
for(var x=0;x<_5a.childNodes.length;x++){
_5b.push(_5a.childNodes[x].cloneNode(true));
}
tn.style.display="none";
document.body.removeChild(tn);
return _5b;
};
if(!dojo.evalObjPath("dojo.dom.createNodesFromText")){
dojo.dom.createNodesFromText=function(){
dojo.deprecated("dojo.dom.createNodesFromText","use dojo.html.createNodesFromText instead");
return dojo.html.createNodesFromText.apply(dojo.html,arguments);
};
}
dojo.html.isTag=function(_5d){
_5d=dojo.byId(_5d);
if(_5d&&_5d.tagName){
var arr=dojo.lang.map(dojo.lang.toArray(arguments,1),function(a){
return String(a).toLowerCase();
});
return arr[dojo.lang.find(_5d.tagName.toLowerCase(),arr)]||"";
}
return "";
};
dojo.html.placeOnScreen=function(_60,_61,_62,_63,_64){
if(dojo.lang.isArray(_61)){
_64=_63;
_63=_62;
_62=_61[1];
_61=_61[0];
}
if(!isNaN(_63)){
_63=[Number(_63),Number(_63)];
}else{
if(!dojo.lang.isArray(_63)){
_63=[0,0];
}
}
var _65=dojo.html.getScrollOffset();
var _66=dojo.html.getViewportSize();
_60=dojo.byId(_60);
var w=_60.offsetWidth+_63[0];
var h=_60.offsetHeight+_63[1];
if(_64){
_61-=_65.x;
_62-=_65.y;
}
var x=_61+w;
if(x>_66.w){
x=_66.w-w;
}else{
x=_61;
}
x=Math.max(_63[0],x)+_65.x;
var y=_62+h;
if(y>_66.h){
y=_66.h-h;
}else{
y=_62;
}
y=Math.max(_63[1],y)+_65.y;
_60.style.left=x+"px";
_60.style.top=y+"px";
var ret=[x,y];
ret.x=x;
ret.y=y;
return ret;
};
dojo.html.placeOnScreenPoint=function(_6c,_6d,_6e,_6f,_70){
if(dojo.lang.isArray(_6d)){
_70=_6f;
_6f=_6e;
_6e=_6d[1];
_6d=_6d[0];
}
if(!isNaN(_6f)){
_6f=[Number(_6f),Number(_6f)];
}else{
if(!dojo.lang.isArray(_6f)){
_6f=[0,0];
}
}
var _71=dojo.html.getScrollOffset();
var _72=dojo.html.getViewportSize();
_6c=dojo.byId(_6c);
var _73=_6c.style.display;
_6c.style.display="";
var w=dojo.style.getInnerWidth(_6c);
var h=dojo.style.getInnerHeight(_6c);
_6c.style.display=_73;
if(_70){
_6d-=_71.x;
_6e-=_71.y;
}
var x=-1,y=-1;
if((_6d+_6f[0])+w<=_72.w&&(_6e+_6f[1])+h<=_72.h){
x=(_6d+_6f[0]);
y=(_6e+_6f[1]);
}
if((x<0||y<0)&&(_6d-_6f[0])<=_72.w&&(_6e+_6f[1])+h<=_72.h){
x=(_6d-_6f[0])-w;
y=(_6e+_6f[1]);
}
if((x<0||y<0)&&(_6d+_6f[0])+w<=_72.w&&(_6e-_6f[1])<=_72.h){
x=(_6d+_6f[0]);
y=(_6e-_6f[1])-h;
}
if((x<0||y<0)&&(_6d-_6f[0])<=_72.w&&(_6e-_6f[1])<=_72.h){
x=(_6d-_6f[0])-w;
y=(_6e-_6f[1])-h;
}
if(x<0||y<0||(x+w>_72.w)||(y+h>_72.h)){
return dojo.html.placeOnScreen(_6c,_6d,_6e,_6f,_70);
}
x+=_71.x;
y+=_71.y;
_6c.style.left=x+"px";
_6c.style.top=y+"px";
var ret=[x,y];
ret.x=x;
ret.y=y;
return ret;
};
dojo.html.BackgroundIframe=function(_78){
if(dojo.render.html.ie){
var _79="<iframe "+"style='position: absolute; left: 0px; top: 0px; width: 100%; height: 100%;"+"z-index: -1; filter:Alpha(Opacity=\"0\");' "+">";
this.iframe=document.createElement(_79);
if(_78){
_78.appendChild(this.iframe);
this.domNode=_78;
}else{
document.body.appendChild(this.iframe);
this.iframe.style.display="none";
}
}
};
dojo.lang.extend(dojo.html.BackgroundIframe,{iframe:null,onResized:function(){
if(this.iframe&&this.domNode){
var w=dojo.style.getOuterWidth(this.domNode);
var h=dojo.style.getOuterHeight(this.domNode);
if(w==0||h==0){
dojo.lang.setTimeout(this,this.onResized,50);
return;
}
var s=this.iframe.style;
s.width=w+"px";
s.height=h+"px";
}
},size:function(_7d){
if(!this.iframe){
return;
}
coords=dojo.html.toCoordinateArray(_7d,true);
var s=this.iframe.style;
s.width=coords.w+"px";
s.height=coords.h+"px";
s.left=coords.x+"px";
s.top=coords.y+"px";
},setZIndex:function(_7f){
if(!this.iframe){
return;
}
if(dojo.dom.isNode(_7f)){
this.iframe.style.zIndex=dojo.html.getStyle(_7f,"z-index")-1;
}else{
if(!isNaN(_7f)){
this.iframe.style.zIndex=_7f;
}
}
},show:function(){
if(!this.iframe){
return;
}
this.iframe.style.display="block";
},hide:function(){
if(!this.ie){
return;
}
var s=this.iframe.style;
s.display="none";
},remove:function(){
dojo.dom.removeNode(this.iframe);
}});


dojo.provide("dojo.math.curves");
dojo.math.curves={Line:function(_1,_2){
this.start=_1;
this.end=_2;
this.dimensions=_1.length;
for(var i=0;i<_1.length;i++){
_1[i]=Number(_1[i]);
}
for(var i=0;i<_2.length;i++){
_2[i]=Number(_2[i]);
}
this.getValue=function(n){
var _5=new Array(this.dimensions);
for(var i=0;i<this.dimensions;i++){
_5[i]=((this.end[i]-this.start[i])*n)+this.start[i];
}
return _5;
};
return this;
},Bezier:function(_7){
this.getValue=function(_8){
if(_8>=1){
return this.p[this.p.length-1];
}
if(_8<=0){
return this.p[0];
}
var _9=new Array(this.p[0].length);
for(var k=0;j<this.p[0].length;k++){
_9[k]=0;
}
for(var j=0;j<this.p[0].length;j++){
var C=0;
var D=0;
for(var i=0;i<this.p.length;i++){
C+=this.p[i][j]*this.p[this.p.length-1][0]*dojo.math.bernstein(_8,this.p.length,i);
}
for(var l=0;l<this.p.length;l++){
D+=this.p[this.p.length-1][0]*dojo.math.bernstein(_8,this.p.length,l);
}
_9[j]=C/D;
}
return _9;
};
this.p=_7;
return this;
},CatmullRom:function(_10,c){
this.getValue=function(_12){
var _13=_12*(this.p.length-1);
var _14=Math.floor(_13);
var _15=_13-_14;
var i0=_14-1;
if(i0<0){
i0=0;
}
var i=_14;
var i1=_14+1;
if(i1>=this.p.length){
i1=this.p.length-1;
}
var i2=_14+2;
if(i2>=this.p.length){
i2=this.p.length-1;
}
var u=_15;
var u2=_15*_15;
var u3=_15*_15*_15;
var _1d=new Array(this.p[0].length);
for(var k=0;k<this.p[0].length;k++){
var x1=(-this.c*this.p[i0][k])+((2-this.c)*this.p[i][k])+((this.c-2)*this.p[i1][k])+(this.c*this.p[i2][k]);
var x2=(2*this.c*this.p[i0][k])+((this.c-3)*this.p[i][k])+((3-2*this.c)*this.p[i1][k])+(-this.c*this.p[i2][k]);
var x3=(-this.c*this.p[i0][k])+(this.c*this.p[i1][k]);
var x4=this.p[i][k];
_1d[k]=x1*u3+x2*u2+x3*u+x4;
}
return _1d;
};
if(!c){
this.c=0.7;
}else{
this.c=c;
}
this.p=_10;
return this;
},Arc:function(_23,end,ccw){
var _26=dojo.math.points.midpoint(_23,end);
var _27=dojo.math.points.translate(dojo.math.points.invert(_26),_23);
var rad=Math.sqrt(Math.pow(_27[0],2)+Math.pow(_27[1],2));
var _29=dojo.math.radToDeg(Math.atan(_27[1]/_27[0]));
if(_27[0]<0){
_29-=90;
}else{
_29+=90;
}
dojo.math.curves.CenteredArc.call(this,_26,rad,_29,_29+(ccw?-180:180));
},CenteredArc:function(_2a,_2b,_2c,end){
this.center=_2a;
this.radius=_2b;
this.start=_2c||0;
this.end=end;
this.getValue=function(n){
var _2f=new Array(2);
var _30=dojo.math.degToRad(this.start+((this.end-this.start)*n));
_2f[0]=this.center[0]+this.radius*Math.sin(_30);
_2f[1]=this.center[1]-this.radius*Math.cos(_30);
return _2f;
};
return this;
},Circle:function(_31,_32){
dojo.math.curves.CenteredArc.call(this,_31,_32,0,360);
return this;
},Path:function(){
var _33=[];
var _34=[];
var _35=[];
var _36=0;
this.add=function(_37,_38){
if(_38<0){
dojo.raise("dojo.math.curves.Path.add: weight cannot be less than 0");
}
_33.push(_37);
_34.push(_38);
_36+=_38;
computeRanges();
};
this.remove=function(_39){
for(var i=0;i<_33.length;i++){
if(_33[i]==_39){
_33.splice(i,1);
_36-=_34.splice(i,1)[0];
break;
}
}
computeRanges();
};
this.removeAll=function(){
_33=[];
_34=[];
_36=0;
};
this.getValue=function(n){
var _3c=false,value=0;
for(var i=0;i<_35.length;i++){
var r=_35[i];
if(n>=r[0]&&n<r[1]){
var _3f=(n-r[0])/r[2];
value=_33[i].getValue(_3f);
_3c=true;
break;
}
}
if(!_3c){
value=_33[_33.length-1].getValue(1);
}
for(j=0;j<i;j++){
value=dojo.math.points.translate(value,_33[j].getValue(1));
}
return value;
};
function computeRanges(){
var _40=0;
for(var i=0;i<_34.length;i++){
var end=_40+_34[i]/_36;
var len=end-_40;
_35[i]=[_40,end,len];
_40=end;
}
}
return this;
}};


dojo.provide("dojo.animation.AnimationEvent");
dojo.animation.AnimationEvent=function(_1,_2,_3,_4,_5,_6,_7,_8,_9){
this.type=_2;
this.animation=_1;
this.coords=_3;
this.x=_3[0];
this.y=_3[1];
this.z=_3[2];
this.startTime=_4;
this.currentTime=_5;
this.endTime=_6;
this.duration=_7;
this.percent=_8;
this.fps=_9;
};
dojo.lang.extend(dojo.animation.AnimationEvent,{coordsAsInts:function(){
var _a=new Array(this.coords.length);
for(var i=0;i<this.coords.length;i++){
_a[i]=Math.round(this.coords[i]);
}
return _a;
}});


dojo.provide("dojo.animation.Animation");
dojo.animation.Animation=function(_1,_2,_3,_4,_5){
if(dojo.lang.isArray(_1)){
_1=new dojo.math.curves.Line(_1[0],_1[1]);
}
this.curve=_1;
this.duration=_2;
this.repeatCount=_4||0;
this.rate=_5||25;
if(_3){
if(dojo.lang.isFunction(_3.getValue)){
this.accel=_3;
}else{
var i=0.35*_3+0.5;
this.accel=new dojo.math.curves.CatmullRom([[0],[i],[1]],0.45);
}
}
};
dojo.lang.extend(dojo.animation.Animation,{curve:null,duration:0,repeatCount:0,accel:null,onBegin:null,onAnimate:null,onEnd:null,onPlay:null,onPause:null,onStop:null,handler:null,_animSequence:null,_startTime:null,_endTime:null,_lastFrame:null,_timer:null,_percent:0,_active:false,_paused:false,_startRepeatCount:0,play:function(_7){
if(_7){
clearTimeout(this._timer);
this._active=false;
this._paused=false;
this._percent=0;
}else{
if(this._active&&!this._paused){
return;
}
}
this._startTime=new Date().valueOf();
if(this._paused){
this._startTime-=(this.duration*this._percent/100);
}
this._endTime=this._startTime+this.duration;
this._lastFrame=this._startTime;
var e=new dojo.animation.AnimationEvent(this,null,this.curve.getValue(this._percent),this._startTime,this._startTime,this._endTime,this.duration,this._percent,0);
this._active=true;
this._paused=false;
if(this._percent==0){
if(!this._startRepeatCount){
this._startRepeatCount=this.repeatCount;
}
e.type="begin";
if(typeof this.handler=="function"){
this.handler(e);
}
if(typeof this.onBegin=="function"){
this.onBegin(e);
}
}
e.type="play";
if(typeof this.handler=="function"){
this.handler(e);
}
if(typeof this.onPlay=="function"){
this.onPlay(e);
}
if(this._animSequence){
this._animSequence._setCurrent(this);
}
this._cycle();
},pause:function(){
clearTimeout(this._timer);
if(!this._active){
return;
}
this._paused=true;
var e=new dojo.animation.AnimationEvent(this,"pause",this.curve.getValue(this._percent),this._startTime,new Date().valueOf(),this._endTime,this.duration,this._percent,0);
if(typeof this.handler=="function"){
this.handler(e);
}
if(typeof this.onPause=="function"){
this.onPause(e);
}
},playPause:function(){
if(!this._active||this._paused){
this.play();
}else{
this.pause();
}
},gotoPercent:function(_a,_b){
clearTimeout(this._timer);
this._active=true;
this._paused=true;
this._percent=_a;
if(_b){
this.play();
}
},stop:function(_c){
clearTimeout(this._timer);
var _d=this._percent/100;
if(_c){
_d=1;
}
var e=new dojo.animation.AnimationEvent(this,"stop",this.curve.getValue(_d),this._startTime,new Date().valueOf(),this._endTime,this.duration,this._percent,Math.round(fps));
if(typeof this.handler=="function"){
this.handler(e);
}
if(typeof this.onStop=="function"){
this.onStop(e);
}
this._active=false;
this._paused=false;
},status:function(){
if(this._active){
return this._paused?"paused":"playing";
}else{
return "stopped";
}
},_cycle:function(){
clearTimeout(this._timer);
if(this._active){
var _f=new Date().valueOf();
var _10=(_f-this._startTime)/(this._endTime-this._startTime);
fps=1000/(_f-this._lastFrame);
this._lastFrame=_f;
if(_10>=1){
_10=1;
this._percent=100;
}else{
this._percent=_10*100;
}
if(this.accel&&this.accel.getValue){
_10=this.accel.getValue(_10);
}
var e=new dojo.animation.AnimationEvent(this,"animate",this.curve.getValue(_10),this._startTime,_f,this._endTime,this.duration,this._percent,Math.round(fps));
if(typeof this.handler=="function"){
this.handler(e);
}
if(typeof this.onAnimate=="function"){
this.onAnimate(e);
}
if(_10<1){
this._timer=setTimeout(dojo.lang.hitch(this,"_cycle"),this.rate);
}else{
e.type="end";
this._active=false;
if(typeof this.handler=="function"){
this.handler(e);
}
if(typeof this.onEnd=="function"){
this.onEnd(e);
}
if(this.repeatCount>0){
this.repeatCount--;
this.play(true);
}else{
if(this.repeatCount==-1){
this.play(true);
}else{
if(this._startRepeatCount){
this.repeatCount=this._startRepeatCount;
this._startRepeatCount=0;
}
if(this._animSequence){
this._animSequence._playNext();
}
}
}
}
}
}});


dojo.provide("dojo.animation");


dojo.provide("dojo.lang.extras");
dojo.lang.setTimeout=function(_1,_2){
var _3=window,argsStart=2;
if(!dojo.lang.isFunction(_1)){
_3=_1;
_1=_2;
_2=arguments[2];
argsStart++;
}
if(dojo.lang.isString(_1)){
_1=_3[_1];
}
var _4=[];
for(var i=argsStart;i<arguments.length;i++){
_4.push(arguments[i]);
}
return setTimeout(function(){
_1.apply(_3,_4);
},_2);
};
dojo.lang.getNameInObj=function(ns,_7){
if(!ns){
ns=dj_global;
}
for(var x in ns){
if(ns[x]===_7){
return new String(x);
}
}
return null;
};
dojo.lang.shallowCopy=function(_9){
var _a={},key;
for(key in _9){
if(dojo.lang.isUndefined(_a[key])){
_a[key]=_9[key];
}
}
return _a;
};
dojo.lang.firstValued=function(){
for(var i=0;i<arguments.length;i++){
if(typeof arguments[i]!="undefined"){
return arguments[i];
}
}
return undefined;
};
dojo.lang.evalDescriptor=function(_c,_d,_e){
var _f=(_d?_d:dj_global);
var _10=_c.split(".");
var _11=_10.pop();
var _12="";
while(_10.length&&_f){
_12=_10.shift();
_f=(_12 in _f?_f[_12]:(_e?_f[_12]={}:null));
}
return {obj:_f,prop:_11};
};
dojo.lang.getObjPathValue=function(_13,_14,_15){
with(dojo.lang.evalDescriptor(_13,_14,_15)){
return (obj&&(prop in obj)?obj[prop]:(_15?obj[prop]=undefined:undefined));
}
};
dojo.lang.setObjPathValue=function(_16,_17,_18,_19){
with(dojo.lang.evalDescriptor(_16,_18,!_19)){
if(obj&&(!_19||(prop in obj))){
obj[prop]=_17;
}
}
};


dojo.provide("dojo.event");
dojo.event=new function(){
this.canTimeout=true;
function interpolateArgs(_1){
var dl=dojo.lang;
var ao={srcObj:dj_global,srcFunc:null,adviceObj:dj_global,adviceFunc:null,aroundObj:null,aroundFunc:null,adviceType:(_1.length>2)?_1[0]:"after",precedence:"last",once:false,delay:null,rate:0,adviceMsg:false};
switch(_1.length){
case 0:
return;
case 1:
return;
case 2:
ao.srcFunc=_1[0];
ao.adviceFunc=_1[1];
break;
case 3:
if((dl.isObject(_1[0]))&&(dl.isString(_1[1]))&&(dl.isString(_1[2]))){
ao.adviceType="after";
ao.srcObj=_1[0];
ao.srcFunc=_1[1];
ao.adviceFunc=_1[2];
}else{
if((dl.isString(_1[1]))&&(dl.isString(_1[2]))){
ao.srcFunc=_1[1];
ao.adviceFunc=_1[2];
}else{
if((dl.isObject(_1[0]))&&(dl.isString(_1[1]))&&(dl.isFunction(_1[2]))){
ao.adviceType="after";
ao.srcObj=_1[0];
ao.srcFunc=_1[1];
var _4=dojo.lang.nameAnonFunc(_1[2],ao.adviceObj);
ao.adviceFunc=_4;
}else{
if((dl.isFunction(_1[0]))&&(dl.isObject(_1[1]))&&(dl.isString(_1[2]))){
ao.adviceType="after";
ao.srcObj=dj_global;
var _4=dojo.lang.nameAnonFunc(_1[0],ao.srcObj);
ao.srcFunc=_4;
ao.adviceObj=_1[1];
ao.adviceFunc=_1[2];
}
}
}
}
break;
case 4:
if((dl.isObject(_1[0]))&&(dl.isObject(_1[2]))){
ao.adviceType="after";
ao.srcObj=_1[0];
ao.srcFunc=_1[1];
ao.adviceObj=_1[2];
ao.adviceFunc=_1[3];
}else{
if((dl.isString(_1[0]))&&(dl.isString(_1[1]))&&(dl.isObject(_1[2]))){
ao.adviceType=_1[0];
ao.srcObj=dj_global;
ao.srcFunc=_1[1];
ao.adviceObj=_1[2];
ao.adviceFunc=_1[3];
}else{
if((dl.isString(_1[0]))&&(dl.isFunction(_1[1]))&&(dl.isObject(_1[2]))){
ao.adviceType=_1[0];
ao.srcObj=dj_global;
var _4=dojo.lang.nameAnonFunc(_1[1],dj_global);
ao.srcFunc=_4;
ao.adviceObj=_1[2];
ao.adviceFunc=_1[3];
}else{
if(dl.isObject(_1[1])){
ao.srcObj=_1[1];
ao.srcFunc=_1[2];
ao.adviceObj=dj_global;
ao.adviceFunc=_1[3];
}else{
if(dl.isObject(_1[2])){
ao.srcObj=dj_global;
ao.srcFunc=_1[1];
ao.adviceObj=_1[2];
ao.adviceFunc=_1[3];
}else{
ao.srcObj=ao.adviceObj=ao.aroundObj=dj_global;
ao.srcFunc=_1[1];
ao.adviceFunc=_1[2];
ao.aroundFunc=_1[3];
}
}
}
}
}
break;
case 6:
ao.srcObj=_1[1];
ao.srcFunc=_1[2];
ao.adviceObj=_1[3];
ao.adviceFunc=_1[4];
ao.aroundFunc=_1[5];
ao.aroundObj=dj_global;
break;
default:
ao.srcObj=_1[1];
ao.srcFunc=_1[2];
ao.adviceObj=_1[3];
ao.adviceFunc=_1[4];
ao.aroundObj=_1[5];
ao.aroundFunc=_1[6];
ao.once=_1[7];
ao.delay=_1[8];
ao.rate=_1[9];
ao.adviceMsg=_1[10];
break;
}
if((typeof ao.srcFunc).toLowerCase()!="string"){
ao.srcFunc=dojo.lang.getNameInObj(ao.srcObj,ao.srcFunc);
}
if((typeof ao.adviceFunc).toLowerCase()!="string"){
ao.adviceFunc=dojo.lang.getNameInObj(ao.adviceObj,ao.adviceFunc);
}
if((ao.aroundObj)&&((typeof ao.aroundFunc).toLowerCase()!="string")){
ao.aroundFunc=dojo.lang.getNameInObj(ao.aroundObj,ao.aroundFunc);
}
if(!ao.srcObj){
dojo.raise("bad srcObj for srcFunc: "+ao.srcFunc);
}
if(!ao.adviceObj){
dojo.raise("bad adviceObj for adviceFunc: "+ao.adviceFunc);
}
return ao;
}
this.connect=function(){
if(arguments.length==1){
var ao=arguments[0];
}else{
var ao=interpolateArgs(arguments);
}
if(dojo.lang.isArray(ao.srcObj)&&ao.srcObj!=""){
var _6={};
for(var x in ao){
_6[x]=ao[x];
}
var _8=[];
dojo.lang.forEach(ao.srcObj,function(_9){
if((dojo.render.html.capable)&&(dojo.lang.isString(_9))){
_9=dojo.byId(_9);
}
_6.srcObj=_9;
_8.push(dojo.event.connect.call(dojo.event,_6));
});
return _8;
}
var _a=dojo.event.MethodJoinPoint.getForMethod(ao.srcObj,ao.srcFunc);
if(ao.adviceFunc){
var _b=dojo.event.MethodJoinPoint.getForMethod(ao.adviceObj,ao.adviceFunc);
}
_a.kwAddAdvice(ao);
return _a;
};
this.connectBefore=function(){
var _c=["before"];
for(var i=0;i<arguments.length;i++){
_c.push(arguments[i]);
}
return this.connect.apply(this,_c);
};
this.connectAround=function(){
var _e=["around"];
for(var i=0;i<arguments.length;i++){
_e.push(arguments[i]);
}
return this.connect.apply(this,_e);
};
this._kwConnectImpl=function(_10,_11){
var fn=(_11)?"disconnect":"connect";
if(typeof _10["srcFunc"]=="function"){
_10.srcObj=_10["srcObj"]||dj_global;
var _13=dojo.lang.nameAnonFunc(_10.srcFunc,_10.srcObj);
_10.srcFunc=_13;
}
if(typeof _10["adviceFunc"]=="function"){
_10.adviceObj=_10["adviceObj"]||dj_global;
var _13=dojo.lang.nameAnonFunc(_10.adviceFunc,_10.adviceObj);
_10.adviceFunc=_13;
}
return dojo.event[fn]((_10["type"]||_10["adviceType"]||"after"),_10["srcObj"]||dj_global,_10["srcFunc"],_10["adviceObj"]||_10["targetObj"]||dj_global,_10["adviceFunc"]||_10["targetFunc"],_10["aroundObj"],_10["aroundFunc"],_10["once"],_10["delay"],_10["rate"],_10["adviceMsg"]||false);
};
this.kwConnect=function(_14){
return this._kwConnectImpl(_14,false);
};
this.disconnect=function(){
var ao=interpolateArgs(arguments);
if(!ao.adviceFunc){
return;
}
var mjp=dojo.event.MethodJoinPoint.getForMethod(ao.srcObj,ao.srcFunc);
return mjp.removeAdvice(ao.adviceObj,ao.adviceFunc,ao.adviceType,ao.once);
};
this.kwDisconnect=function(_17){
return this._kwConnectImpl(_17,true);
};
};
dojo.event.MethodInvocation=function(_18,obj,_1a){
this.jp_=_18;
this.object=obj;
this.args=[];
for(var x=0;x<_1a.length;x++){
this.args[x]=_1a[x];
}
this.around_index=-1;
};
dojo.event.MethodInvocation.prototype.proceed=function(){
this.around_index++;
if(this.around_index>=this.jp_.around.length){
return this.jp_.object[this.jp_.methodname].apply(this.jp_.object,this.args);
}else{
var ti=this.jp_.around[this.around_index];
var _1d=ti[0]||dj_global;
var _1e=ti[1];
return _1d[_1e].call(_1d,this);
}
};
dojo.event.MethodJoinPoint=function(obj,_20){
this.object=obj||dj_global;
this.methodname=_20;
this.methodfunc=this.object[_20];
this.before=[];
this.after=[];
this.around=[];
};
dojo.event.MethodJoinPoint.getForMethod=function(obj,_22){
if(!obj){
obj=dj_global;
}
if(!obj[_22]){
obj[_22]=function(){
};
}else{
if((!dojo.lang.isFunction(obj[_22]))&&(!dojo.lang.isAlien(obj[_22]))){
return null;
}
}
var _23=_22+"$joinpoint";
var _24=_22+"$joinpoint$method";
var _25=obj[_23];
if(!_25){
var _26=false;
if(dojo.event["browser"]){
if((obj["attachEvent"])||(obj["nodeType"])||(obj["addEventListener"])){
_26=true;
dojo.event.browser.addClobberNodeAttrs(obj,[_23,_24,_22]);
}
}
obj[_24]=obj[_22];
_25=obj[_23]=new dojo.event.MethodJoinPoint(obj,_24);
obj[_22]=function(){
var _27=[];
if((_26)&&(!arguments.length)){
var evt=null;
try{
if(obj.ownerDocument){
evt=obj.ownerDocument.parentWindow.event;
}else{
if(obj.documentElement){
evt=obj.documentElement.ownerDocument.parentWindow.event;
}else{
evt=window.event;
}
}
}
catch(e){
evt=window.event;
}
if(evt){
_27.push(dojo.event.browser.fixEvent(evt,this));
}
}else{
for(var x=0;x<arguments.length;x++){
if((x==0)&&(_26)&&(dojo.event.browser.isEvent(arguments[x]))){
_27.push(dojo.event.browser.fixEvent(arguments[x],this));
}else{
_27.push(arguments[x]);
}
}
}
return _25.run.apply(_25,_27);
};
}
return _25;
};
dojo.lang.extend(dojo.event.MethodJoinPoint,{unintercept:function(){
this.object[this.methodname]=this.methodfunc;
},run:function(){
var obj=this.object||dj_global;
var _2b=arguments;
var _2c=[];
for(var x=0;x<_2b.length;x++){
_2c[x]=_2b[x];
}
var _2e=function(_2f){
if(!_2f){
dojo.debug("Null argument to unrollAdvice()");
return;
}
var _30=_2f[0]||dj_global;
var _31=_2f[1];
if(!_30[_31]){
dojo.raise("function \""+_31+"\" does not exist on \""+_30+"\"");
}
var _32=_2f[2]||dj_global;
var _33=_2f[3];
var msg=_2f[6];
var _35;
var to={args:[],jp_:this,object:obj,proceed:function(){
return _30[_31].apply(_30,to.args);
}};
to.args=_2c;
var _37=parseInt(_2f[4]);
var _38=((!isNaN(_37))&&(_2f[4]!==null)&&(typeof _2f[4]!="undefined"));
if(_2f[5]){
var _39=parseInt(_2f[5]);
var cur=new Date();
var _3b=false;
if((_2f["last"])&&((cur-_2f.last)<=_39)){
if(dojo.event.canTimeout){
if(_2f["delayTimer"]){
clearTimeout(_2f.delayTimer);
}
var tod=parseInt(_39*2);
var _3d=dojo.lang.shallowCopy(_2f);
_2f.delayTimer=setTimeout(function(){
_3d[5]=0;
_2e(_3d);
},tod);
}
return;
}else{
_2f.last=cur;
}
}
if(_33){
_32[_33].call(_32,to);
}else{
if((_38)&&((dojo.render.html)||(dojo.render.svg))){
dj_global["setTimeout"](function(){
if(msg){
_30[_31].call(_30,to);
}else{
_30[_31].apply(_30,_2b);
}
},_37);
}else{
if(msg){
_30[_31].call(_30,to);
}else{
_30[_31].apply(_30,_2b);
}
}
}
};
if(this.before.length>0){
dojo.lang.forEach(this.before,_2e,true);
}
var _3e;
if(this.around.length>0){
var mi=new dojo.event.MethodInvocation(this,obj,_2b);
_3e=mi.proceed();
}else{
if(this.methodfunc){
_3e=this.object[this.methodname].apply(this.object,_2b);
}
}
if(this.after.length>0){
dojo.lang.forEach(this.after,_2e,true);
}
return (this.methodfunc)?_3e:null;
},getArr:function(_40){
var arr=this.after;
if((typeof _40=="string")&&(_40.indexOf("before")!=-1)){
arr=this.before;
}else{
if(_40=="around"){
arr=this.around;
}
}
return arr;
},kwAddAdvice:function(_42){
this.addAdvice(_42["adviceObj"],_42["adviceFunc"],_42["aroundObj"],_42["aroundFunc"],_42["adviceType"],_42["precedence"],_42["once"],_42["delay"],_42["rate"],_42["adviceMsg"]);
},addAdvice:function(_43,_44,_45,_46,_47,_48,_49,_4a,_4b,_4c){
var arr=this.getArr(_47);
if(!arr){
dojo.raise("bad this: "+this);
}
var ao=[_43,_44,_45,_46,_4a,_4b,_4c];
if(_49){
if(this.hasAdvice(_43,_44,_47,arr)>=0){
return;
}
}
if(_48=="first"){
arr.unshift(ao);
}else{
arr.push(ao);
}
},hasAdvice:function(_4f,_50,_51,arr){
if(!arr){
arr=this.getArr(_51);
}
var ind=-1;
for(var x=0;x<arr.length;x++){
if((arr[x][0]==_4f)&&(arr[x][1]==_50)){
ind=x;
}
}
return ind;
},removeAdvice:function(_55,_56,_57,_58){
var arr=this.getArr(_57);
var ind=this.hasAdvice(_55,_56,_57,arr);
if(ind==-1){
return false;
}
while(ind!=-1){
arr.splice(ind,1);
if(_58){
break;
}
ind=this.hasAdvice(_55,_56,_57,arr);
}
return true;
}});


dojo.provide("dojo.event.topic");
dojo.event.topic=new function(){
this.topics={};
this.getTopic=function(_1){
if(!this.topics[_1]){
this.topics[_1]=new this.TopicImpl(_1);
}
return this.topics[_1];
};
this.registerPublisher=function(_2,_3,_4){
var _2=this.getTopic(_2);
_2.registerPublisher(_3,_4);
};
this.subscribe=function(_5,_6,_7){
var _5=this.getTopic(_5);
_5.subscribe(_6,_7);
};
this.unsubscribe=function(_8,_9,_a){
var _8=this.getTopic(_8);
_8.unsubscribe(_9,_a);
};
this.publish=function(_b,_c){
var _b=this.getTopic(_b);
var _d=[];
if(arguments.length==2&&(dojo.lang.isArray(_c)||_c.callee)){
_d=_c;
}else{
var _d=[];
for(var x=1;x<arguments.length;x++){
_d.push(arguments[x]);
}
}
_b.sendMessage.apply(_b,_d);
};
};
dojo.event.topic.TopicImpl=function(_f){
this.topicName=_f;
var _10=this;
_10.subscribe=function(_11,_12){
var tf=_12||_11;
var to=(!_12)?dj_global:_11;
dojo.event.kwConnect({srcObj:_10,srcFunc:"sendMessage",adviceObj:to,adviceFunc:tf});
};
_10.unsubscribe=function(_15,_16){
var tf=(!_16)?_15:_16;
var to=(!_16)?null:_15;
dojo.event.kwDisconnect({srcObj:_10,srcFunc:"sendMessage",adviceObj:to,adviceFunc:tf});
};
_10.registerPublisher=function(_19,_1a){
dojo.event.connect(_19,_1a,_10,"sendMessage");
};
_10.sendMessage=function(_1b){
};
};


dojo.provide("dojo.event.browser");
dojo_ie_clobber=new function(){
this.clobberNodes=[];
function nukeProp(_1,_2){
try{
_1[_2]=null;
}
catch(e){
}
try{
delete _1[_2];
}
catch(e){
}
try{
_1.removeAttribute(_2);
}
catch(e){
}
}
this.clobber=function(_3){
var na;
var _5;
if(_3){
_5=_3.all||_3.getElementsByTagName("*");
na=[_3];
for(var x=0;x<_5.length;x++){
if(_5[x]["__doClobber__"]){
na.push(_5[x]);
}
}
}else{
try{
window.onload=null;
}
catch(e){
}
na=(this.clobberNodes.length)?this.clobberNodes:document.all;
}
_5=null;
var _7={};
for(var i=na.length-1;i>=0;i=i-1){
var el=na[i];
if(el["__clobberAttrs__"]){
for(var j=0;j<el.__clobberAttrs__.length;j++){
nukeProp(el,el.__clobberAttrs__[j]);
}
nukeProp(el,"__clobberAttrs__");
nukeProp(el,"__doClobber__");
}
}
na=null;
};
};
if(dojo.render.html.ie){
window.onunload=function(){
dojo_ie_clobber.clobber();
try{
if((dojo["widget"])&&(dojo.widget["manager"])){
dojo.widget.manager.destroyAll();
}
}
catch(e){
}
try{
window.onload=null;
}
catch(e){
}
try{
window.onunload=null;
}
catch(e){
}
dojo_ie_clobber.clobberNodes=[];
};
}
dojo.event.browser=new function(){
var _b=0;
this.clean=function(_c){
if(dojo.render.html.ie){
dojo_ie_clobber.clobber(_c);
}
};
this.addClobberNode=function(_d){
if(!_d["__doClobber__"]){
_d.__doClobber__=true;
dojo_ie_clobber.clobberNodes.push(_d);
_d.__clobberAttrs__=[];
}
};
this.addClobberNodeAttrs=function(_e,_f){
this.addClobberNode(_e);
for(var x=0;x<_f.length;x++){
_e.__clobberAttrs__.push(_f[x]);
}
};
this.removeListener=function(_11,_12,fp,_14){
if(!_14){
var _14=false;
}
_12=_12.toLowerCase();
if(_12.substr(0,2)=="on"){
_12=_12.substr(2);
}
if(_11.removeEventListener){
_11.removeEventListener(_12,fp,_14);
}
};
this.addListener=function(_15,_16,fp,_18,_19){
if(!_15){
return;
}
if(!_18){
var _18=false;
}
_16=_16.toLowerCase();
if(_16.substr(0,2)!="on"){
_16="on"+_16;
}
if(!_19){
var _1a=function(evt){
if(!evt){
evt=window.event;
}
var ret=fp(dojo.event.browser.fixEvent(evt,this));
if(_18){
dojo.event.browser.stopEvent(evt);
}
return ret;
};
}else{
_1a=fp;
}
if(_15.addEventListener){
_15.addEventListener(_16.substr(2),_1a,_18);
return _1a;
}else{
if(typeof _15[_16]=="function"){
var _1d=_15[_16];
_15[_16]=function(e){
_1d(e);
return _1a(e);
};
}else{
_15[_16]=_1a;
}
if(dojo.render.html.ie){
this.addClobberNodeAttrs(_15,[_16]);
}
return _1a;
}
};
this.isEvent=function(obj){
return (typeof obj!="undefined")&&(typeof Event!="undefined")&&(obj.eventPhase);
};
this.currentEvent=null;
this.callListener=function(_20,_21){
if(typeof _20!="function"){
dojo.raise("listener not a function: "+_20);
}
dojo.event.browser.currentEvent.currentTarget=_21;
return _20.call(_21,dojo.event.browser.currentEvent);
};
this.stopPropagation=function(){
dojo.event.browser.currentEvent.cancelBubble=true;
};
this.preventDefault=function(){
dojo.event.browser.currentEvent.returnValue=false;
};
this.keys={KEY_BACKSPACE:8,KEY_TAB:9,KEY_ENTER:13,KEY_SHIFT:16,KEY_CTRL:17,KEY_ALT:18,KEY_PAUSE:19,KEY_CAPS_LOCK:20,KEY_ESCAPE:27,KEY_SPACE:32,KEY_PAGE_UP:33,KEY_PAGE_DOWN:34,KEY_END:35,KEY_HOME:36,KEY_LEFT_ARROW:37,KEY_UP_ARROW:38,KEY_RIGHT_ARROW:39,KEY_DOWN_ARROW:40,KEY_INSERT:45,KEY_DELETE:46,KEY_LEFT_WINDOW:91,KEY_RIGHT_WINDOW:92,KEY_SELECT:93,KEY_F1:112,KEY_F2:113,KEY_F3:114,KEY_F4:115,KEY_F5:116,KEY_F6:117,KEY_F7:118,KEY_F8:119,KEY_F9:120,KEY_F10:121,KEY_F11:122,KEY_F12:123,KEY_NUM_LOCK:144,KEY_SCROLL_LOCK:145};
this.revKeys=[];
for(var key in this.keys){
this.revKeys[this.keys[key]]=key;
}
this.fixEvent=function(evt,_24){
if((!evt)&&(window["event"])){
var evt=window.event;
}
if((evt["type"])&&(evt["type"].indexOf("key")==0)){
evt.keys=this.revKeys;
for(var key in this.keys){
evt[key]=this.keys[key];
}
if((dojo.render.html.ie)&&(evt["type"]=="keypress")){
evt.charCode=evt.keyCode;
}
}
if(dojo.render.html.ie){
if(!evt.target){
evt.target=evt.srcElement;
}
if(!evt.currentTarget){
evt.currentTarget=(_24?_24:evt.srcElement);
}
if(!evt.layerX){
evt.layerX=evt.offsetX;
}
if(!evt.layerY){
evt.layerY=evt.offsetY;
}
if(evt.fromElement){
evt.relatedTarget=evt.fromElement;
}
if(evt.toElement){
evt.relatedTarget=evt.toElement;
}
this.currentEvent=evt;
evt.callListener=this.callListener;
evt.stopPropagation=this.stopPropagation;
evt.preventDefault=this.preventDefault;
}
return evt;
};
this.stopEvent=function(ev){
if(window.event){
ev.returnValue=false;
ev.cancelBubble=true;
}else{
ev.preventDefault();
ev.stopPropagation();
}
};
};


dojo.hostenv.conditionalLoadModule({common:["dojo.event","dojo.event.topic"],browser:["dojo.event.browser"],dashboard:["dojo.event.browser"]});
dojo.hostenv.moduleLoaded("dojo.event.*");


dojo.provide("dojo.fx.html");
dojo.fx.duration=300;
dojo.fx.html._makeFadeable=function(_1){
if(dojo.render.html.ie){
if((_1.style.zoom.length==0)&&(dojo.style.getStyle(_1,"zoom")=="normal")){
_1.style.zoom="1";
}
if((_1.style.width.length==0)&&(dojo.style.getStyle(_1,"width")=="auto")){
_1.style.width="auto";
}
}
};
dojo.fx.html.fadeOut=function(_2,_3,_4,_5){
return dojo.fx.html.fade(_2,_3,dojo.style.getOpacity(_2),0,_4,_5);
};
dojo.fx.html.fadeIn=function(_6,_7,_8,_9){
return dojo.fx.html.fade(_6,_7,dojo.style.getOpacity(_6),1,_8,_9);
};
dojo.fx.html.fadeHide=function(_a,_b,_c,_d){
_a=dojo.byId(_a);
if(!_b){
_b=150;
}
return dojo.fx.html.fadeOut(_a,_b,function(_e){
_e.style.display="none";
if(typeof _c=="function"){
_c(_e);
}
});
};
dojo.fx.html.fadeShow=function(_f,_10,_11,_12){
_f=dojo.byId(_f);
if(!_10){
_10=150;
}
_f.style.display="block";
return dojo.fx.html.fade(_f,_10,0,1,_11,_12);
};
dojo.fx.html.fade=function(_13,_14,_15,_16,_17,_18){
_13=dojo.byId(_13);
dojo.fx.html._makeFadeable(_13);
var _19=new dojo.animation.Animation(new dojo.math.curves.Line([_15],[_16]),_14||dojo.fx.duration,0);
dojo.event.connect(_19,"onAnimate",function(e){
dojo.style.setOpacity(_13,e.x);
});
if(_17){
dojo.event.connect(_19,"onEnd",function(e){
_17(_13,_19);
});
}
if(!_18){
_19.play(true);
}
return _19;
};
dojo.fx.html.slideTo=function(_1c,_1d,_1e,_1f,_20){
if(!dojo.lang.isNumber(_1d)){
var tmp=_1d;
_1d=_1e;
_1e=tmp;
}
_1c=dojo.byId(_1c);
var top=_1c.offsetTop;
var _23=_1c.offsetLeft;
var pos=dojo.style.getComputedStyle(_1c,"position");
if(pos=="relative"||pos=="static"){
top=parseInt(dojo.style.getComputedStyle(_1c,"top"))||0;
_23=parseInt(dojo.style.getComputedStyle(_1c,"left"))||0;
}
return dojo.fx.html.slide(_1c,_1d,[_23,top],_1e,_1f,_20);
};
dojo.fx.html.slideBy=function(_25,_26,_27,_28,_29){
if(!dojo.lang.isNumber(_26)){
var tmp=_26;
_26=_27;
_27=tmp;
}
_25=dojo.byId(_25);
var top=_25.offsetTop;
var _2c=_25.offsetLeft;
var pos=dojo.style.getComputedStyle(_25,"position");
if(pos=="relative"||pos=="static"){
top=parseInt(dojo.style.getComputedStyle(_25,"top"))||0;
_2c=parseInt(dojo.style.getComputedStyle(_25,"left"))||0;
}
return dojo.fx.html.slideTo(_25,_26,[_2c+_27[0],top+_27[1]],_28,_29);
};
dojo.fx.html.slide=function(_2e,_2f,_30,_31,_32,_33){
if(!dojo.lang.isNumber(_2f)){
var tmp=_2f;
_2f=_31;
_31=_30;
_30=tmp;
}
_2e=dojo.byId(_2e);
if(dojo.style.getComputedStyle(_2e,"position")=="static"){
_2e.style.position="relative";
}
var _35=new dojo.animation.Animation(new dojo.math.curves.Line(_30,_31),_2f||dojo.fx.duration,0);
dojo.event.connect(_35,"onAnimate",function(e){
with(_2e.style){
left=e.x+"px";
top=e.y+"px";
}
});
if(_32){
dojo.event.connect(_35,"onEnd",function(e){
_32(_2e,_35);
});
}
if(!_33){
_35.play(true);
}
return _35;
};
dojo.fx.html.colorFadeIn=function(_38,_39,_3a,_3b,_3c,_3d){
if(!dojo.lang.isNumber(_39)){
var tmp=_39;
_39=_3a;
_3a=tmp;
}
_38=dojo.byId(_38);
var _3f=dojo.style.getBackgroundColor(_38);
var bg=dojo.style.getStyle(_38,"background-color").toLowerCase();
var _41=bg=="transparent"||bg=="rgba(0, 0, 0, 0)";
while(_3f.length>3){
_3f.pop();
}
var rgb=new dojo.graphics.color.Color(_3a).toRgb();
var _43=dojo.fx.html.colorFade(_38,_39||dojo.fx.duration,_3a,_3f,_3c,true);
dojo.event.connect(_43,"onEnd",function(e){
if(_41){
_38.style.backgroundColor="transparent";
}
});
if(_3b>0){
_38.style.backgroundColor="rgb("+rgb.join(",")+")";
if(!_3d){
setTimeout(function(){
_43.play(true);
},_3b);
}
}else{
if(!_3d){
_43.play(true);
}
}
return _43;
};
dojo.fx.html.highlight=dojo.fx.html.colorFadeIn;
dojo.fx.html.colorFadeFrom=dojo.fx.html.colorFadeIn;
dojo.fx.html.colorFadeOut=function(_45,_46,_47,_48,_49,_4a){
if(!dojo.lang.isNumber(_46)){
var tmp=_46;
_46=_47;
_47=tmp;
}
_45=dojo.byId(_45);
var _4c=new dojo.graphics.color.Color(dojo.style.getBackgroundColor(_45)).toRgb();
var rgb=new dojo.graphics.color.Color(_47).toRgb();
var _4e=dojo.fx.html.colorFade(_45,_46||dojo.fx.duration,_4c,rgb,_49,_48>0||_4a);
if(_48>0){
_45.style.backgroundColor="rgb("+_4c.join(",")+")";
if(!_4a){
setTimeout(function(){
_4e.play(true);
},_48);
}
}
return _4e;
};
dojo.fx.html.unhighlight=dojo.fx.html.colorFadeOut;
dojo.fx.html.colorFadeTo=dojo.fx.html.colorFadeOut;
dojo.fx.html.colorFade=function(_4f,_50,_51,_52,_53,_54){
if(!dojo.lang.isNumber(_50)){
var tmp=_50;
_50=_52;
_52=_51;
_51=tmp;
}
_4f=dojo.byId(_4f);
var _56=new dojo.graphics.color.Color(_51).toRgb();
var _57=new dojo.graphics.color.Color(_52).toRgb();
var _58=new dojo.animation.Animation(new dojo.math.curves.Line(_56,_57),_50||dojo.fx.duration,0);
dojo.event.connect(_58,"onAnimate",function(e){
_4f.style.backgroundColor="rgb("+e.coordsAsInts().join(",")+")";
});
if(_53){
dojo.event.connect(_58,"onEnd",function(e){
_53(_4f,_58);
});
}
if(!_54){
_58.play(true);
}
return _58;
};
dojo.fx.html.wipeIn=function(_5b,_5c,_5d,_5e){
_5b=dojo.byId(_5b);
var _5f=dojo.style.getStyle(_5b,"overflow");
if(_5f=="visible"){
_5b.style.overflow="hidden";
}
_5b.style.height=0;
dojo.style.show(_5b);
var _60=dojo.fx.html.wipe(_5b,_5c,0,_5b.scrollHeight,null,true);
dojo.event.connect(_60,"onEnd",function(){
_5b.style.overflow=_5f;
_5b.style.height="auto";
if(_5d){
_5d(_5b,_60);
}
});
if(!_5e){
_60.play();
}
return _60;
};
dojo.fx.html.wipeOut=function(_61,_62,_63,_64){
_61=dojo.byId(_61);
var _65=dojo.style.getStyle(_61,"overflow");
if(_65=="visible"){
_61.style.overflow="hidden";
}
var _66=dojo.fx.html.wipe(_61,_62,_61.offsetHeight,0,null,true);
dojo.event.connect(_66,"onEnd",function(){
dojo.style.hide(_61);
_61.style.overflow=_65;
if(_63){
_63(_61,_66);
}
});
if(!_64){
_66.play();
}
return _66;
};
dojo.fx.html.wipe=function(_67,_68,_69,_6a,_6b,_6c){
_67=dojo.byId(_67);
var _6d=new dojo.animation.Animation([[_69],[_6a]],_68||dojo.fx.duration,0);
dojo.event.connect(_6d,"onAnimate",function(e){
_67.style.height=e.x+"px";
});
dojo.event.connect(_6d,"onEnd",function(){
if(_6b){
_6b(_67,_6d);
}
});
if(!_6c){
_6d.play();
}
return _6d;
};
dojo.fx.html.wiper=function(_6f,_70){
this.node=dojo.byId(_6f);
if(_70){
dojo.event.connect(dojo.byId(_70),"onclick",this,"toggle");
}
};
dojo.lang.extend(dojo.fx.html.wiper,{duration:dojo.fx.duration,_anim:null,toggle:function(){
if(!this._anim){
var _71="wipe"+(dojo.style.isVisible(this.node)?"Hide":"Show");
this._anim=dojo.fx[_71](this.node,this.duration,dojo.lang.hitch(this,"_callback"));
}
},_callback:function(){
this._anim=null;
}});
dojo.fx.html.explode=function(_72,_73,_74,_75,_76){
var _77=dojo.style.toCoordinateArray(_72);
var _78=document.createElement("div");
with(_78.style){
position="absolute";
border="1px solid black";
display="none";
}
document.body.appendChild(_78);
_73=dojo.byId(_73);
with(_73.style){
visibility="hidden";
display="block";
}
var _79=dojo.style.toCoordinateArray(_73);
with(_73.style){
display="none";
visibility="visible";
}
var _7a=new dojo.animation.Animation(new dojo.math.curves.Line(_77,_79),_74||dojo.fx.duration,0);
dojo.event.connect(_7a,"onBegin",function(e){
_78.style.display="block";
});
dojo.event.connect(_7a,"onAnimate",function(e){
with(_78.style){
left=e.x+"px";
top=e.y+"px";
width=e.coords[2]+"px";
height=e.coords[3]+"px";
}
});
dojo.event.connect(_7a,"onEnd",function(){
_73.style.display="block";
_78.parentNode.removeChild(_78);
if(_75){
_75(_73,_7a);
}
});
if(!_76){
_7a.play();
}
return _7a;
};
dojo.fx.html.implode=function(_7d,end,_7f,_80,_81){
var _82=dojo.style.toCoordinateArray(_7d);
var _83=dojo.style.toCoordinateArray(end);
_7d=dojo.byId(_7d);
var _84=document.createElement("div");
with(_84.style){
position="absolute";
border="1px solid black";
display="none";
}
document.body.appendChild(_84);
var _85=new dojo.animation.Animation(new dojo.math.curves.Line(_82,_83),_7f||dojo.fx.duration,0);
dojo.event.connect(_85,"onBegin",function(e){
_7d.style.display="none";
_84.style.display="block";
});
dojo.event.connect(_85,"onAnimate",function(e){
with(_84.style){
left=e.x+"px";
top=e.y+"px";
width=e.coords[2]+"px";
height=e.coords[3]+"px";
}
});
dojo.event.connect(_85,"onEnd",function(){
_84.parentNode.removeChild(_84);
if(_80){
_80(_7d,_85);
}
});
if(!_81){
_85.play();
}
return _85;
};
dojo.fx.html.Exploder=function(_88,_89){
_88=dojo.byId(_88);
_89=dojo.byId(_89);
var _8a=this;
this.waitToHide=500;
this.timeToShow=100;
this.waitToShow=200;
this.timeToHide=70;
this.autoShow=false;
this.autoHide=false;
var _8b=null;
var _8c=null;
var _8d=null;
var _8e=null;
var _8f=null;
var _90=null;
this.showing=false;
this.onBeforeExplode=null;
this.onAfterExplode=null;
this.onBeforeImplode=null;
this.onAfterImplode=null;
this.onExploding=null;
this.onImploding=null;
this.timeShow=function(){
clearTimeout(_8d);
_8d=setTimeout(_8a.show,_8a.waitToShow);
};
this.show=function(){
clearTimeout(_8d);
clearTimeout(_8e);
if((_8c&&_8c.status()=="playing")||(_8b&&_8b.status()=="playing")||_8a.showing){
return;
}
if(typeof _8a.onBeforeExplode=="function"){
_8a.onBeforeExplode(_88,_89);
}
_8b=dojo.fx.html.explode(_88,_89,_8a.timeToShow,function(e){
_8a.showing=true;
if(typeof _8a.onAfterExplode=="function"){
_8a.onAfterExplode(_88,_89);
}
});
if(typeof _8a.onExploding=="function"){
dojo.event.connect(_8b,"onAnimate",this,"onExploding");
}
};
this.timeHide=function(){
clearTimeout(_8d);
clearTimeout(_8e);
if(_8a.showing){
_8e=setTimeout(_8a.hide,_8a.waitToHide);
}
};
this.hide=function(){
clearTimeout(_8d);
clearTimeout(_8e);
if(_8b&&_8b.status()=="playing"){
return;
}
_8a.showing=false;
if(typeof _8a.onBeforeImplode=="function"){
_8a.onBeforeImplode(_88,_89);
}
_8c=dojo.fx.html.implode(_89,_88,_8a.timeToHide,function(e){
if(typeof _8a.onAfterImplode=="function"){
_8a.onAfterImplode(_88,_89);
}
});
if(typeof _8a.onImploding=="function"){
dojo.event.connect(_8c,"onAnimate",this,"onImploding");
}
};
dojo.event.connect(_88,"onclick",function(e){
if(_8a.showing){
_8a.hide();
}else{
_8a.show();
}
});
dojo.event.connect(_88,"onmouseover",function(e){
if(_8a.autoShow){
_8a.timeShow();
}
});
dojo.event.connect(_88,"onmouseout",function(e){
if(_8a.autoHide){
_8a.timeHide();
}
});
dojo.event.connect(_89,"onmouseover",function(e){
clearTimeout(_8e);
});
dojo.event.connect(_89,"onmouseout",function(e){
if(_8a.autoHide){
_8a.timeHide();
}
});
dojo.event.connect(document.documentElement||document.body,"onclick",function(e){
function isDesc(_99,_9a){
while(_99){
if(_99==_9a){
return true;
}
_99=_99.parentNode;
}
return false;
}
if(_8a.autoHide&&_8a.showing&&!isDesc(e.target,_89)&&!isDesc(e.target,_88)){
_8a.hide();
}
});
return this;
};
dojo.fx.html.toggle={};
dojo.fx.html.toggle.plain={show:function(_9b,_9c,_9d,_9e){
dojo.style.show(_9b);
if(dojo.lang.isFunction(_9e)){
_9e();
}
},hide:function(_9f,_a0,_a1,_a2){
dojo.style.hide(_9f);
if(dojo.lang.isFunction(_a2)){
_a2();
}
}};
dojo.fx.html.toggle.fade={show:function(_a3,_a4,_a5,_a6){
dojo.fx.html.fadeShow(_a3,_a4,_a6);
},hide:function(_a7,_a8,_a9,_aa){
dojo.fx.html.fadeHide(_a7,_a8,_aa);
}};
dojo.fx.html.toggle.wipe={show:function(_ab,_ac,_ad,_ae){
dojo.fx.html.wipeIn(_ab,_ac,_ae);
},hide:function(_af,_b0,_b1,_b2){
dojo.fx.html.wipeOut(_af,_b0,_b2);
}};
dojo.fx.html.toggle.explode={show:function(_b3,_b4,_b5,_b6){
dojo.fx.html.explode(_b5||[0,0,0,0],_b3,_b4,_b6);
},hide:function(_b7,_b8,_b9,_ba){
dojo.fx.html.implode(_b7,_b9||[0,0,0,0],_b8,_ba);
}};
dojo.lang.mixin(dojo.fx,dojo.fx.html);


dojo.provide("dojo.io.IO");
dojo.io.transports=[];
dojo.io.hdlrFuncNames=["load","error","timeout"];
dojo.io.Request=function(_1,_2,_3,_4){
if((arguments.length==1)&&(arguments[0].constructor==Object)){
this.fromKwArgs(arguments[0]);
}else{
this.url=_1;
if(_2){
this.mimetype=_2;
}
if(_3){
this.transport=_3;
}
if(arguments.length>=4){
this.changeUrl=_4;
}
}
};
dojo.lang.extend(dojo.io.Request,{url:"",mimetype:"text/plain",method:"GET",content:undefined,transport:undefined,changeUrl:undefined,formNode:undefined,sync:false,bindSuccess:false,useCache:false,preventCache:false,load:function(_5,_6,_7){
},error:function(_8,_9){
},timeout:function(_a){
},handle:function(){
},timeoutSeconds:0,abort:function(){
},fromKwArgs:function(_b){
if(_b["url"]){
_b.url=_b.url.toString();
}
if(_b["formNode"]){
_b.formNode=dojo.byId(_b.formNode);
}
if(!_b["method"]&&_b["formNode"]&&_b["formNode"].method){
_b.method=_b["formNode"].method;
}
if(!_b["handle"]&&_b["handler"]){
_b.handle=_b.handler;
}
if(!_b["load"]&&_b["loaded"]){
_b.load=_b.loaded;
}
if(!_b["changeUrl"]&&_b["changeURL"]){
_b.changeUrl=_b.changeURL;
}
_b.encoding=dojo.lang.firstValued(_b["encoding"],djConfig["bindEncoding"],"");
_b.sendTransport=dojo.lang.firstValued(_b["sendTransport"],djConfig["ioSendTransport"],false);
var _c=dojo.lang.isFunction;
for(var x=0;x<dojo.io.hdlrFuncNames.length;x++){
var fn=dojo.io.hdlrFuncNames[x];
if(_c(_b[fn])){
continue;
}
if(_c(_b["handle"])){
_b[fn]=_b.handle;
}
}
dojo.lang.mixin(this,_b);
}});
dojo.io.Error=function(_f,_10,num){
this.message=_f;
this.type=_10||"unknown";
this.number=num||0;
};
dojo.io.transports.addTransport=function(_12){
this.push(_12);
this[_12]=dojo.io[_12];
};
dojo.io.bind=function(_13){
if(!(_13 instanceof dojo.io.Request)){
try{
_13=new dojo.io.Request(_13);
}
catch(e){
dojo.debug(e);
}
}
var _14="";
if(_13["transport"]){
_14=_13["transport"];
if(!this[_14]){
return _13;
}
}else{
for(var x=0;x<dojo.io.transports.length;x++){
var tmp=dojo.io.transports[x];
if((this[tmp])&&(this[tmp].canHandle(_13))){
_14=tmp;
}
}
if(_14==""){
return _13;
}
}
this[_14].bind(_13);
_13.bindSuccess=true;
return _13;
};
dojo.io.queueBind=function(_17){
if(!(_17 instanceof dojo.io.Request)){
try{
_17=new dojo.io.Request(_17);
}
catch(e){
dojo.debug(e);
}
}
var _18=_17.load;
_17.load=function(){
dojo.io._queueBindInFlight=false;
var ret=_18.apply(this,arguments);
dojo.io._dispatchNextQueueBind();
return ret;
};
var _1a=_17.error;
_17.error=function(){
dojo.io._queueBindInFlight=false;
var ret=_1a.apply(this,arguments);
dojo.io._dispatchNextQueueBind();
return ret;
};
dojo.io._bindQueue.push(_17);
dojo.io._dispatchNextQueueBind();
return _17;
};
dojo.io._dispatchNextQueueBind=function(){
if(!dojo.io._queueBindInFlight){
dojo.io._queueBindInFlight=true;
if(dojo.io._bindQueue.length>0){
dojo.io.bind(dojo.io._bindQueue.shift());
}else{
dojo.io._queueBindInFlight=false;
}
}
};
dojo.io._bindQueue=[];
dojo.io._queueBindInFlight=false;
dojo.io.argsFromMap=function(map,_1d){
var _1e=new Object();
var _1f="";
var enc=/utf/i.test(_1d||"")?encodeURIComponent:dojo.string.encodeAscii;
for(var x in map){
if(!_1e[x]){
_1f+=enc(x)+"="+enc(map[x])+"&";
}
}
return _1f;
};
dojo.io.setIFrameSrc=function(_22,src,_24){
try{
var r=dojo.render.html;
if(!_24){
if(r.safari){
_22.location=src;
}else{
frames[_22.name].location=src;
}
}else{
var _26;
if(r.ie){
_26=_22.contentWindow.document;
}else{
if(r.moz){
_26=_22.contentWindow;
}else{
if(r.safari){
_26=_22.document;
}
}
}
_26.location.replace(src);
}
}
catch(e){
dojo.debug(e);
dojo.debug("setIFrameSrc: "+e);
}
};


dojo.provide("dojo.undo.browser");
try{
if((!djConfig["preventBackButtonFix"])&&(!dojo.hostenv.post_load_)){
document.write("<iframe style='border: 0px; width: 1px; height: 1px; position: absolute; bottom: 0px; right: 0px; visibility: visible;' name='djhistory' id='djhistory' src='"+(dojo.hostenv.getBaseScriptUri()+"iframe_history.html")+"'></iframe>");
}
}
catch(e){
}
dojo.undo.browser={initialHref:function(){
try{
return window.location.href;
}
catch(e){
return "";
}
}(),initialHash:function(){
try{
return window.location.hash;
}
catch(e){
return "";
}
}(),moveForward:false,historyStack:[],forwardStack:[],historyIframe:null,bookmarkAnchor:null,locationTimer:null,setInitialState:function(_1){
this.initialState={"url":this.initialHref,"kwArgs":_1,"urlHash":this.initialHash};
},addToHistory:function(_2){
var _3=null;
if(!this.historyIframe){
this.historyIframe=window.frames["djhistory"];
}
if(!this.bookmarkAnchor){
this.bookmarkAnchor=document.createElement("a");
(document.body||document.getElementsByTagName("body")[0]).appendChild(this.bookmarkAnchor);
this.bookmarkAnchor.style.display="none";
}
if((!_2["changeUrl"])||(dojo.render.html.ie)){
var _4=dojo.hostenv.getBaseScriptUri()+"iframe_history.html?"+(new Date()).getTime();
this.moveForward=true;
dojo.io.setIFrameSrc(this.historyIframe,_4,false);
}
if(_2["changeUrl"]){
this.changingUrl=true;
_3="#"+((_2["changeUrl"]!==true)?_2["changeUrl"]:(new Date()).getTime());
setTimeout("window.location.href = '"+_3+"'; dojo.undo.browser.changingUrl = false;",1);
this.bookmarkAnchor.href=_3;
if(dojo.render.html.ie){
var _5=_2["back"]||_2["backButton"]||_2["handle"];
var _6=function(_7){
if(window.location.hash!=""){
setTimeout("window.location.href = '"+_3+"';",1);
}
_5.apply(this,[_7]);
};
if(_2["back"]){
_2.back=_6;
}else{
if(_2["backButton"]){
_2.backButton=_6;
}else{
if(_2["handle"]){
_2.handle=_6;
}
}
}
this.forwardStack=[];
var _8=_2["forward"]||_2["forwardButton"]||_2["handle"];
var _9=function(_a){
if(window.location.hash!=""){
window.location.href=_3;
}
if(_8){
_8.apply(this,[_a]);
}
};
if(_2["forward"]){
_2.forward=_9;
}else{
if(_2["forwardButton"]){
_2.forwardButton=_9;
}else{
if(_2["handle"]){
_2.handle=_9;
}
}
}
}else{
if(dojo.render.html.moz){
if(!this.locationTimer){
this.locationTimer=setInterval("dojo.undo.browser.checkLocation();",200);
}
}
}
}
this.historyStack.push({"url":_4,"kwArgs":_2,"urlHash":_3});
},checkLocation:function(){
if(!this.changingUrl){
var _b=this.historyStack.length;
if((window.location.hash==this.initialHash)||(window.location.href==this.initialHref)&&(_b==1)){
this.handleBackButton();
return;
}
if(this.forwardStack.length>0){
if(this.forwardStack[this.forwardStack.length-1].urlHash==window.location.hash){
this.handleForwardButton();
return;
}
}
if((_b>=2)&&(this.historyStack[_b-2])){
if(this.historyStack[_b-2].urlHash==window.location.hash){
this.handleBackButton();
return;
}
}
}
},iframeLoaded:function(_c,_d){
var _e=this._getUrlQuery(_d.href);
if(_e==null){
if(this.historyStack.length==1){
this.handleBackButton();
}
return;
}
if(this.moveForward){
this.moveForward=false;
return;
}
if(this.historyStack.length>=2&&_e==this._getUrlQuery(this.historyStack[this.historyStack.length-2].url)){
this.handleBackButton();
}else{
if(this.forwardStack.length>0&&_e==this._getUrlQuery(this.forwardStack[this.forwardStack.length-1].url)){
this.handleForwardButton();
}
}
},handleBackButton:function(){
var _f=this.historyStack.pop();
if(!_f){
return;
}
var _10=this.historyStack[this.historyStack.length-1];
if(!_10&&this.historyStack.length==0){
_10=this.initialState;
}
if(_10){
if(_10.kwArgs["back"]){
_10.kwArgs["back"]();
}else{
if(_10.kwArgs["backButton"]){
_10.kwArgs["backButton"]();
}else{
if(_10.kwArgs["handle"]){
_10.kwArgs.handle("back");
}
}
}
}
this.forwardStack.push(_f);
},handleForwardButton:function(){
var _11=this.forwardStack.pop();
if(!_11){
return;
}
if(_11.kwArgs["forward"]){
_11.kwArgs.forward();
}else{
if(_11.kwArgs["forwardButton"]){
_11.kwArgs.forwardButton();
}else{
if(_11.kwArgs["handle"]){
_11.kwArgs.handle("forward");
}
}
}
this.historyStack.push(_11);
},_getUrlQuery:function(url){
var _13=url.split("?");
if(_13.length<2){
return null;
}else{
return _13[1];
}
}};


dojo.provide("dojo.io.BrowserIO");
dojo.io.checkChildrenForFile=function(_1){
var _2=false;
var _3=_1.getElementsByTagName("input");
dojo.lang.forEach(_3,function(_4){
if(_2){
return;
}
if(_4.getAttribute("type")=="file"){
_2=true;
}
});
return _2;
};
dojo.io.formHasFile=function(_5){
return dojo.io.checkChildrenForFile(_5);
};
dojo.io.updateNode=function(_6,_7){
_6=dojo.byId(_6);
var _8=_7;
if(dojo.lang.isString(_7)){
_8={url:_7};
}
_8.mimetype="text/html";
_8.load=function(t,d,e){
while(_6.firstChild){
if(dojo["event"]){
try{
dojo.event.browser.clean(_6.firstChild);
}
catch(e){
}
}
_6.removeChild(_6.firstChild);
}
_6.innerHTML=d;
};
dojo.io.bind(_8);
};
dojo.io.formFilter=function(_c){
var _d=(_c.type||"").toLowerCase();
return !_c.disabled&&_c.name&&!dojo.lang.inArray(_d,["file","submit","image","reset","button"]);
};
dojo.io.encodeForm=function(_e,_f,_10){
if((!_e)||(!_e.tagName)||(!_e.tagName.toLowerCase()=="form")){
dojo.raise("Attempted to encode a non-form element.");
}
if(!_10){
_10=dojo.io.formFilter;
}
var enc=/utf/i.test(_f||"")?encodeURIComponent:dojo.string.encodeAscii;
var _12=[];
for(var i=0;i<_e.elements.length;i++){
var elm=_e.elements[i];
if(!elm||elm.tagName.toLowerCase()=="fieldset"||!_10(elm)){
continue;
}
var _15=enc(elm.name);
var _16=elm.type.toLowerCase();
if(_16=="select-multiple"){
for(var j=0;j<elm.options.length;j++){
if(elm.options[j].selected){
_12.push(_15+"="+enc(elm.options[j].value));
}
}
}else{
if(dojo.lang.inArray(_16,["radio","checkbox"])){
if(elm.checked){
_12.push(_15+"="+enc(elm.value));
}
}else{
_12.push(_15+"="+enc(elm.value));
}
}
}
var _18=_e.getElementsByTagName("input");
for(var i=0;i<_18.length;i++){
var _19=_18[i];
if(_19.type.toLowerCase()=="image"&&_19.form==_e&&_10(_19)){
var _15=enc(_19.name);
_12.push(_15+"="+enc(_19.value));
_12.push(_15+".x=0");
_12.push(_15+".y=0");
}
}
return _12.join("&")+"&";
};
dojo.io.FormBind=function(_1a){
this.bindArgs={};
if(_1a&&_1a.formNode){
this.init(_1a);
}else{
if(_1a){
this.init({formNode:_1a});
}
}
};
dojo.lang.extend(dojo.io.FormBind,{form:null,bindArgs:null,clickedButton:null,init:function(_1b){
var _1c=dojo.byId(_1b.formNode);
if(!_1c||!_1c.tagName||_1c.tagName.toLowerCase()!="form"){
throw new Error("FormBind: Couldn't apply, invalid form");
}else{
if(this.form==_1c){
return;
}else{
if(this.form){
throw new Error("FormBind: Already applied to a form");
}
}
}
dojo.lang.mixin(this.bindArgs,_1b);
this.form=_1c;
this.connect(_1c,"onsubmit","submit");
for(var i=0;i<_1c.elements.length;i++){
var _1e=_1c.elements[i];
if(_1e&&_1e.type&&dojo.lang.inArray(_1e.type.toLowerCase(),["submit","button"])){
this.connect(_1e,"onclick","click");
}
}
var _1f=_1c.getElementsByTagName("input");
for(var i=0;i<_1f.length;i++){
var _20=_1f[i];
if(_20.type.toLowerCase()=="image"&&_20.form==_1c){
this.connect(_20,"onclick","click");
}
}
},onSubmit:function(_21){
return true;
},submit:function(e){
e.preventDefault();
if(this.onSubmit(this.form)){
dojo.io.bind(dojo.lang.mixin(this.bindArgs,{formFilter:dojo.lang.hitch(this,"formFilter")}));
}
},click:function(e){
var _24=e.currentTarget;
if(_24.disabled){
return;
}
this.clickedButton=_24;
},formFilter:function(_25){
var _26=(_25.type||"").toLowerCase();
var _27=false;
if(_25.disabled||!_25.name){
_27=false;
}else{
if(dojo.lang.inArray(_26,["submit","button","image"])){
if(!this.clickedButton){
this.clickedButton=_25;
}
_27=_25==this.clickedButton;
}else{
_27=!dojo.lang.inArray(_26,["file","submit","reset","button"]);
}
}
return _27;
},connect:function(_28,_29,_2a){
if(dojo.evalObjPath("dojo.event.connect")){
dojo.event.connect(_28,_29,this,_2a);
}else{
var fcn=dojo.lang.hitch(this,_2a);
_28[_29]=function(e){
if(!e){
e=window.event;
}
if(!e.currentTarget){
e.currentTarget=e.srcElement;
}
if(!e.preventDefault){
e.preventDefault=function(){
window.event.returnValue=false;
};
}
fcn(e);
};
}
}});
dojo.io.XMLHTTPTransport=new function(){
var _2d=this;
var _2e={};
this.useCache=false;
this.preventCache=false;
function getCacheKey(url,_30,_31){
return url+"|"+_30+"|"+_31.toLowerCase();
}
function addToCache(url,_33,_34,_35){
_2e[getCacheKey(url,_33,_34)]=_35;
}
function getFromCache(url,_37,_38){
return _2e[getCacheKey(url,_37,_38)];
}
this.clearCache=function(){
_2e={};
};
function doLoad(_39,_3a,url,_3c,_3d){
try{
if((_3a.status==200)||(_3a.status==304)||(location.protocol=="file:"&&(_3a.status==0||_3a.status==undefined))||(location.protocol=="chrome:"&&(_3a.status==0||_3a.status==undefined))){
var ret;
if(_39.method.toLowerCase()=="head"){
var _3f=_3a.getAllResponseHeaders();
ret={};
ret.toString=function(){
return _3f;
};
var _40=_3f.split(/[\r\n]+/g);
for(var i=0;i<_40.length;i++){
var _42=_40[i].match(/^([^:]+)\s*:\s*(.+)$/i);
if(_42){
ret[_42[1]]=_42[2];
}
}
}else{
if(_39.mimetype=="text/javascript"){
try{
ret=dj_eval(_3a.responseText);
}
catch(e){
dojo.debug(e);
dojo.debug(_3a.responseText);
ret=null;
}
}else{
if(_39.mimetype=="text/json"){
try{
ret=dj_eval("("+_3a.responseText+")");
}
catch(e){
dojo.debug(e);
dojo.debug(_3a.responseText);
ret=false;
}
}else{
if((_39.mimetype=="application/xml")||(_39.mimetype=="text/xml")){
ret=_3a.responseXML;
if(!ret||typeof ret=="string"){
ret=dojo.dom.createDocumentFromText(_3a.responseText);
}
}else{
ret=_3a.responseText;
}
}
}
}
if(_3d){
addToCache(url,_3c,_39.method,_3a);
}
_39[(typeof _39.load=="function")?"load":"handle"]("load",ret,_3a,_39);
}else{
var _43=new dojo.io.Error("XMLHttpTransport Error: "+_3a.status+" "+_3a.statusText);
_39[(typeof _39.error=="function")?"error":"handle"]("error",_43,_3a,_39);
}
}
catch(e){
dojo.debug(e);
dojo.debug(_3a.responseText);
ret=null;
if(typeof (_39.error)=="function"){
_39.error();
}
}
}
function setHeaders(_44,_45){
if(_45["headers"]){
for(var _46 in _45["headers"]){
if(_46.toLowerCase()=="content-type"&&!_45["contentType"]){
_45["contentType"]=_45["headers"][_46];
}else{
_44.setRequestHeader(_46,_45["headers"][_46]);
}
}
}
}
this.inFlight=[];
this.inFlightTimer=null;
this.startWatchingInFlight=function(){
if(!this.inFlightTimer){
this.inFlightTimer=setInterval("dojo.io.XMLHTTPTransport.watchInFlight();",10);
}
};
this.watchInFlight=function(){
var now=null;
for(var x=this.inFlight.length-1;x>=0;x--){
var tif=this.inFlight[x];
if(!tif){
this.inFlight.splice(x,1);
continue;
}
if(4==tif.http.readyState){
this.inFlight.splice(x,1);
doLoad(tif.req,tif.http,tif.url,tif.query,tif.useCache);
}else{
if(tif.startTime){
if(!now){
now=(new Date()).getTime();
}
if(tif.startTime+(tif.req.timeoutSeconds*1000)<now){
if(typeof tif.http.abort=="function"){
tif.http.abort();
}
this.inFlight.splice(x,1);
tif.req[(typeof tif.req.timeout=="function")?"timeout":"handle"]("timeout",null,tif.http,tif.req);
}
}
}
}
if(this.inFlight.length==0){
clearInterval(this.inFlightTimer);
this.inFlightTimer=null;
}
};
var _4a=dojo.hostenv.getXmlhttpObject()?true:false;
this.canHandle=function(_4b){
return _4a&&dojo.lang.inArray((_4b["mimetype"].toLowerCase()||""),["text/plain","text/html","application/xml","text/xml","text/javascript","text/json"])&&dojo.lang.inArray(_4b["method"].toLowerCase(),["post","get","head"])&&!(_4b["formNode"]&&dojo.io.formHasFile(_4b["formNode"]));
};
this.multipartBoundary="45309FFF-BD65-4d50-99C9-36986896A96F";
this.bind=function(_4c){
if(!_4c["url"]){
if(!_4c["formNode"]&&(_4c["backButton"]||_4c["back"]||_4c["changeUrl"]||_4c["watchForURL"])&&(!djConfig.preventBackButtonFix)){
dj_deprecated("Using dojo.io.XMLHTTPTransport.bind() to add to browser history without doing an IO request is deprecated. Use dojo.undo.browser.addToHistory() instead.");
dojo.undo.browser.addToHistory(_4c);
return true;
}
}
var url=_4c.url;
var _4e="";
if(_4c["formNode"]){
var ta=_4c.formNode.getAttribute("action");
if((ta)&&(!_4c["url"])){
url=ta;
}
var tp=_4c.formNode.getAttribute("method");
if((tp)&&(!_4c["method"])){
_4c.method=tp;
}
_4e+=dojo.io.encodeForm(_4c.formNode,_4c.encoding,_4c["formFilter"]);
}
if(url.indexOf("#")>-1){
dojo.debug("Warning: dojo.io.bind: stripping hash values from url:",url);
url=url.split("#")[0];
}
if(_4c["file"]){
_4c.method="post";
}
if(!_4c["method"]){
_4c.method="get";
}
if(_4c.method.toLowerCase()=="get"){
_4c.multipart=false;
}else{
if(_4c["file"]){
_4c.multipart=true;
}else{
if(!_4c["multipart"]){
_4c.multipart=false;
}
}
}
if(_4c["backButton"]||_4c["back"]||_4c["changeUrl"]){
dojo.undo.browser.addToHistory(_4c);
}
var _51=_4c["content"]||{};
if(_4c.sendTransport){
_51["dojo.transport"]="xmlhttp";
}
do{
if(_4c.postContent){
_4e=_4c.postContent;
break;
}
if(_51){
_4e+=dojo.io.argsFromMap(_51,_4c.encoding);
}
if(_4c.method.toLowerCase()=="get"||!_4c.multipart){
break;
}
var t=[];
if(_4e.length){
var q=_4e.split("&");
for(var i=0;i<q.length;++i){
if(q[i].length){
var p=q[i].split("=");
t.push("--"+this.multipartBoundary,"Content-Disposition: form-data; name=\""+p[0]+"\"","",p[1]);
}
}
}
if(_4c.file){
if(dojo.lang.isArray(_4c.file)){
for(var i=0;i<_4c.file.length;++i){
var o=_4c.file[i];
t.push("--"+this.multipartBoundary,"Content-Disposition: form-data; name=\""+o.name+"\"; filename=\""+("fileName" in o?o.fileName:o.name)+"\"","Content-Type: "+("contentType" in o?o.contentType:"application/octet-stream"),"",o.content);
}
}else{
var o=_4c.file;
t.push("--"+this.multipartBoundary,"Content-Disposition: form-data; name=\""+o.name+"\"; filename=\""+("fileName" in o?o.fileName:o.name)+"\"","Content-Type: "+("contentType" in o?o.contentType:"application/octet-stream"),"",o.content);
}
}
if(t.length){
t.push("--"+this.multipartBoundary+"--","");
_4e=t.join("\r\n");
}
}while(false);
var _57=_4c["sync"]?false:true;
var _58=_4c["preventCache"]||(this.preventCache==true&&_4c["preventCache"]!=false);
var _59=_4c["useCache"]==true||(this.useCache==true&&_4c["useCache"]!=false);
if(!_58&&_59){
var _5a=getFromCache(url,_4e,_4c.method);
if(_5a){
doLoad(_4c,_5a,url,_4e,false);
return;
}
}
var _5b=dojo.hostenv.getXmlhttpObject(_4c);
var _5c=false;
if(_57){
var _5d=this.inFlight.push({"req":_4c,"http":_5b,"url":url,"query":_4e,"useCache":_59,"startTime":_4c.timeoutSeconds?(new Date()).getTime():0});
this.startWatchingInFlight();
}
if(_4c.method.toLowerCase()=="post"){
_5b.open("POST",url,_57);
setHeaders(_5b,_4c);
_5b.setRequestHeader("Content-Type",_4c.multipart?("multipart/form-data; boundary="+this.multipartBoundary):(_4c.contentType||"application/x-www-form-urlencoded"));
try{
_5b.send(_4e);
}
catch(e){
if(typeof _5b.abort=="function"){
_5b.abort();
}
doLoad(_4c,{status:404},url,_4e,_59);
}
}else{
var _5e=url;
if(_4e!=""){
_5e+=(_5e.indexOf("?")>-1?"&":"?")+_4e;
}
if(_58){
_5e+=(dojo.string.endsWithAny(_5e,"?","&")?"":(_5e.indexOf("?")>-1?"&":"?"))+"dojo.preventCache="+new Date().valueOf();
}
_5b.open(_4c.method.toUpperCase(),_5e,_57);
setHeaders(_5b,_4c);
try{
_5b.send(null);
}
catch(e){
if(typeof _5b.abort=="function"){
_5b.abort();
}
doLoad(_4c,{status:404},url,_4e,_59);
}
}
if(!_57){
doLoad(_4c,_5b,url,_4e,_59);
}
_4c.abort=function(){
return _5b.abort();
};
return;
};
dojo.io.transports.addTransport("XMLHTTPTransport");
};


dojo.provide("dojo.io.cookie");
dojo.io.cookie.setCookie=function(_1,_2,_3,_4,_5,_6){
var _7=-1;
if(typeof _3=="number"&&_3>=0){
var d=new Date();
d.setTime(d.getTime()+(_3*24*60*60*1000));
_7=d.toGMTString();
}
_2=escape(_2);
document.cookie=_1+"="+_2+";"+(_7!=-1?" expires="+_7+";":"")+(_4?"path="+_4:"")+(_5?"; domain="+_5:"")+(_6?"; secure":"");
};
dojo.io.cookie.set=dojo.io.cookie.setCookie;
dojo.io.cookie.getCookie=function(_9){
var _a=document.cookie.lastIndexOf(_9+"=");
if(_a==-1){
return null;
}
value=document.cookie.substring(_a+_9.length+1);
var _b=value.indexOf(";");
if(_b==-1){
_b=value.length;
}
value=value.substring(0,_b);
value=unescape(value);
return value;
};
dojo.io.cookie.get=dojo.io.cookie.getCookie;
dojo.io.cookie.deleteCookie=function(_c){
dojo.io.cookie.setCookie(_c,"-",0);
};
dojo.io.cookie.setObjectCookie=function(_d,_e,_f,_10,_11,_12,_13){
if(arguments.length==5){
_13=_11;
_11=null;
_12=null;
}
var _14=[],cookie,value="";
if(!_13){
cookie=dojo.io.cookie.getObjectCookie(_d);
}
if(_f>=0){
if(!cookie){
cookie={};
}
for(var _15 in _e){
if(_15==null){
delete cookie[_15];
}else{
if(typeof _e[_15]=="string"||typeof _e[_15]=="number"){
cookie[_15]=_e[_15];
}
}
}
_15=null;
for(var _15 in cookie){
_14.push(escape(_15)+"="+escape(cookie[_15]));
}
value=_14.join("&");
}
dojo.io.cookie.setCookie(_d,value,_f,_10,_11,_12);
};
dojo.io.cookie.getObjectCookie=function(_16){
var _17=null,cookie=dojo.io.cookie.getCookie(_16);
if(cookie){
_17={};
var _18=cookie.split("&");
for(var i=0;i<_18.length;i++){
var _1a=_18[i].split("=");
var _1b=_1a[1];
if(isNaN(_1b)){
_1b=unescape(_1a[1]);
}
_17[unescape(_1a[0])]=_1b;
}
}
return _17;
};
dojo.io.cookie.isSupported=function(){
if(typeof navigator.cookieEnabled!="boolean"){
dojo.io.cookie.setCookie("__TestingYourBrowserForCookieSupport__","CookiesAllowed",90,null);
var _1c=dojo.io.cookie.getCookie("__TestingYourBrowserForCookieSupport__");
navigator.cookieEnabled=(_1c=="CookiesAllowed");
if(navigator.cookieEnabled){
this.deleteCookie("__TestingYourBrowserForCookieSupport__");
}
}
return navigator.cookieEnabled;
};
if(!dojo.io.cookies){
dojo.io.cookies=dojo.io.cookie;
}


dojo.hostenv.conditionalLoadModule({common:["dojo.io"],rhino:["dojo.io.RhinoIO"],browser:["dojo.io.BrowserIO","dojo.io.cookie"],dashboard:["dojo.io.BrowserIO","dojo.io.cookie"]});
dojo.hostenv.moduleLoaded("dojo.io.*");


dojo.hostenv.conditionalLoadModule({common:["dojo.uri.Uri",false,false]});
dojo.hostenv.moduleLoaded("dojo.uri.*");


dojo.provide("dojo.io.IframeIO");
dojo.io.createIFrame=function(_1,_2){
if(window[_1]){
return window[_1];
}
if(window.frames[_1]){
return window.frames[_1];
}
var r=dojo.render.html;
var _4=null;
var _5=dojo.uri.dojoUri("iframe_history.html?noInit=true");
var _6=((r.ie)&&(dojo.render.os.win))?"<iframe name='"+_1+"' src='"+_5+"' onload='"+_2+"'>":"iframe";
_4=document.createElement(_6);
with(_4){
name=_1;
setAttribute("name",_1);
id=_1;
}
(document.body||document.getElementsByTagName("body")[0]).appendChild(_4);
window[_1]=_4;
with(_4.style){
position="absolute";
left=top="0px";
height=width="1px";
visibility="hidden";
}
if(!r.ie){
dojo.io.setIFrameSrc(_4,_5,true);
_4.onload=new Function(_2);
}
return _4;
};
dojo.io.iframeContentWindow=function(_7){
var _8=_7.contentWindow||dojo.io.iframeContentDocument(_7).defaultView||dojo.io.iframeContentDocument(_7).__parent__||(_7.name&&document.frames[_7.name])||null;
return _8;
};
dojo.io.iframeContentDocument=function(_9){
var _a=_9.contentDocument||((_9.contentWindow)&&(_9.contentWindow.document))||((_9.name)&&(document.frames[_9.name])&&(document.frames[_9.name].document))||null;
return _a;
};
dojo.io.IframeTransport=new function(){
var _b=this;
this.currentRequest=null;
this.requestQueue=[];
this.iframeName="dojoIoIframe";
this.fireNextRequest=function(){
if((this.currentRequest)||(this.requestQueue.length==0)){
return;
}
var cr=this.currentRequest=this.requestQueue.shift();
cr._contentToClean=[];
var fn=cr["formNode"];
var _e=cr["content"]||{};
if(cr.sendTransport){
_e["dojo.transport"]="iframe";
}
if(fn){
if(_e){
for(var x in _e){
if(!fn[x]){
var tn;
if(dojo.render.html.ie){
tn=document.createElement("<input type='hidden' name='"+x+"' value='"+_e[x]+"'>");
fn.appendChild(tn);
}else{
tn=document.createElement("input");
fn.appendChild(tn);
tn.type="hidden";
tn.name=x;
tn.value=_e[x];
}
cr._contentToClean.push(x);
}else{
fn[x].value=_e[x];
}
}
}
if(cr["url"]){
cr._originalAction=fn.getAttribute("action");
fn.setAttribute("action",cr.url);
}
if(!fn.getAttribute("method")){
fn.setAttribute("method",(cr["method"])?cr["method"]:"post");
}
cr._originalTarget=fn.getAttribute("target");
fn.setAttribute("target",this.iframeName);
fn.target=this.iframeName;
fn.submit();
}else{
var _11=dojo.io.argsFromMap(this.currentRequest.content);
var _12=(cr.url.indexOf("?")>-1?"&":"?")+_11;
dojo.io.setIFrameSrc(this.iframe,_12,true);
}
};
this.canHandle=function(_13){
return ((dojo.lang.inArray(_13["mimetype"],["text/plain","text/html","text/javascript","text/json"]))&&((_13["formNode"])&&(dojo.io.checkChildrenForFile(_13["formNode"])))&&(dojo.lang.inArray(_13["method"].toLowerCase(),["post","get"]))&&(!((_13["sync"])&&(_13["sync"]==true))));
};
this.bind=function(_14){
if(!this["iframe"]){
this.setUpIframe();
}
this.requestQueue.push(_14);
this.fireNextRequest();
return;
};
this.setUpIframe=function(){
this.iframe=dojo.io.createIFrame(this.iframeName,"dojo.io.IframeTransport.iframeOnload();");
};
this.iframeOnload=function(){
if(!_b.currentRequest){
_b.fireNextRequest();
return;
}
var req=_b.currentRequest;
var _16=req._contentToClean;
for(var i=0;i<_16.length;i++){
var key=_16[i];
if(dojo.render.html.safari){
var _19=req.formNode;
for(var j=0;j<_19.childNodes.length;j++){
var _1b=_19.childNodes[j];
if(_1b.name==key){
var _1c=_1b.parentNode;
_1c.removeChild(_1b);
break;
}
}
}else{
var _1d=req.formNode[key];
req.formNode.removeChild(_1d);
req.formNode[key]=null;
}
}
if(req["_originalAction"]){
req.formNode.setAttribute("action",req._originalAction);
}
req.formNode.setAttribute("target",req._originalTarget);
req.formNode.target=req._originalTarget;
var ifd=dojo.io.iframeContentDocument(_b.iframe);
var _1f;
var _20=false;
try{
var cmt=req.mimetype;
if((cmt=="text/javascript")||(cmt=="text/json")){
var js=ifd.getElementsByTagName("textarea")[0].value;
if(cmt=="text/json"){
js="("+js+")";
}
_1f=dj_eval(js);
}else{
if(cmt=="text/html"){
_1f=ifd;
}else{
_1f=ifd.getElementsByTagName("textarea")[0].value;
}
}
_20=true;
}
catch(e){
var _23=new dojo.io.Error("IframeTransport Error");
if(dojo.lang.isFunction(req["error"])){
req.error("error",_23,req);
}
}
try{
if(_20&&dojo.lang.isFunction(req["load"])){
req.load("load",_1f,req);
}
}
catch(e){
throw e;
}
finally{
_b.currentRequest=null;
_b.fireNextRequest();
}
};
dojo.io.transports.addTransport("IframeTransport");
};


dojo.provide("dojo.regexp");
dojo.provide("dojo.regexp.us");
dojo.regexp.tld=function(_1){
_1=(typeof _1=="object")?_1:{};
if(typeof _1.allowCC!="boolean"){
_1.allowCC=true;
}
if(typeof _1.allowInfra!="boolean"){
_1.allowInfra=true;
}
if(typeof _1.allowGeneric!="boolean"){
_1.allowGeneric=true;
}
var _2="arpa";
var _3="aero|biz|com|coop|edu|gov|info|int|mil|museum|name|net|org|pro|travel|xxx|jobs|mobi|post";
var _4="ac|ad|ae|af|ag|ai|al|am|an|ao|aq|ar|as|at|au|aw|az|ba|bb|bd|be|bf|bg|bh|bi|bj|bm|bn|bo|br|"+"bs|bt|bv|bw|by|bz|ca|cc|cd|cf|cg|ch|ci|ck|cl|cm|cn|co|cr|cu|cv|cx|cy|cz|de|dj|dk|dm|do|dz|"+"ec|ee|eg|er|es|et|fi|fj|fk|fm|fo|fr|ga|gd|ge|gf|gg|gh|gi|gl|gm|gn|gp|gq|gr|gs|gt|gu|gw|gy|"+"hk|hm|hn|hr|ht|hu|id|ie|il|im|in|io|ir|is|it|je|jm|jo|jp|ke|kg|kh|ki|km|kn|kr|kw|ky|kz|la|"+"lb|lc|li|lk|lr|ls|lt|lu|lv|ly|ma|mc|md|mg|mh|mk|ml|mm|mn|mo|mp|mq|mr|ms|mt|mu|mv|mw|mx|my|"+"mz|na|nc|ne|nf|ng|ni|nl|no|np|nr|nu|nz|om|pa|pe|pf|pg|ph|pk|pl|pm|pn|pr|ps|pt|pw|py|qa|re|"+"ro|ru|rw|sa|sb|sc|sd|se|sg|sh|si|sk|sl|sm|sn|sr|st|su|sv|sy|sz|tc|td|tf|tg|th|tj|tk|tm|tn|"+"to|tr|tt|tv|tw|tz|ua|ug|uk|us|uy|uz|va|vc|ve|vg|vi|vn|vu|wf|ws|ye|yt|yu|za|zm|zw";
var a=[];
if(_1.allowInfra){
a.push(_2);
}
if(_1.allowGeneric){
a.push(_3);
}
if(_1.allowCC){
a.push(_4);
}
var _6="";
if(a.length>0){
_6="("+a.join("|")+")";
}
return _6;
};
dojo.regexp.ipAddress=function(_7){
_7=(typeof _7=="object")?_7:{};
if(typeof _7.allowDottedDecimal!="boolean"){
_7.allowDottedDecimal=true;
}
if(typeof _7.allowDottedHex!="boolean"){
_7.allowDottedHex=true;
}
if(typeof _7.allowDottedOctal!="boolean"){
_7.allowDottedOctal=true;
}
if(typeof _7.allowDecimal!="boolean"){
_7.allowDecimal=true;
}
if(typeof _7.allowHex!="boolean"){
_7.allowHex=true;
}
if(typeof _7.allowIPv6!="boolean"){
_7.allowIPv6=true;
}
if(typeof _7.allowHybrid!="boolean"){
_7.allowHybrid=true;
}
var _8="((\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])\\.){3}(\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])";
var _9="(0[xX]0*[\\da-fA-F]?[\\da-fA-F]\\.){3}0[xX]0*[\\da-fA-F]?[\\da-fA-F]";
var _a="(0+[0-3][0-7][0-7]\\.){3}0+[0-3][0-7][0-7]";
var _b="(0|[1-9]\\d{0,8}|[1-3]\\d{9}|4[01]\\d{8}|42[0-8]\\d{7}|429[0-3]\\d{6}|"+"4294[0-8]\\d{5}|42949[0-5]\\d{4}|429496[0-6]\\d{3}|4294967[01]\\d{2}|42949672[0-8]\\d|429496729[0-5])";
var _c="0[xX]0*[\\da-fA-F]{1,8}";
var _d="([\\da-fA-F]{1,4}\\:){7}[\\da-fA-F]{1,4}";
var _e="([\\da-fA-F]{1,4}\\:){6}"+"((\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])\\.){3}(\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])";
var a=[];
if(_7.allowDottedDecimal){
a.push(_8);
}
if(_7.allowDottedHex){
a.push(_9);
}
if(_7.allowDottedOctal){
a.push(_a);
}
if(_7.allowDecimal){
a.push(_b);
}
if(_7.allowHex){
a.push(_c);
}
if(_7.allowIPv6){
a.push(_d);
}
if(_7.allowHybrid){
a.push(_e);
}
var _10="";
if(a.length>0){
_10="("+a.join("|")+")";
}
return _10;
};
dojo.regexp.host=function(_11){
_11=(typeof _11=="object")?_11:{};
if(typeof _11.allowIP!="boolean"){
_11.allowIP=true;
}
if(typeof _11.allowLocal!="boolean"){
_11.allowLocal=false;
}
if(typeof _11.allowPort!="boolean"){
_11.allowPort=true;
}
var _12="([0-9a-zA-Z]([-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?\\.)+"+dojo.regexp.tld(_11);
portRE=(_11.allowPort)?"(\\:"+dojo.regexp.integer({signed:false})+")?":"";
var _13=_12;
if(_11.allowIP){
_13+="|"+dojo.regexp.ipAddress(_11);
}
if(_11.allowLocal){
_13+="|localhost";
}
return "("+_13+")"+portRE;
};
dojo.regexp.url=function(_14){
_14=(typeof _14=="object")?_14:{};
if(typeof _14.scheme=="undefined"){
_14.scheme=[true,false];
}
var _15=dojo.regexp.buildGroupRE(_14.scheme,function(q){
if(q){
return "(https?|ftps?)\\://";
}
return "";
});
var _17="(/([^?#\\s/]+/)*)?([^?#\\s/]+(\\?[^?#\\s/]*)?(#[A-Za-z][\\w.:-]*)?)?";
return (_15+dojo.regexp.host(_14)+_17);
};
dojo.regexp.emailAddress=function(_18){
_18=(typeof _18=="object")?_18:{};
if(typeof _18.allowCruft!="boolean"){
_18.allowCruft=false;
}
_18.allowPort=false;
var _19="[a-zA-Z0-9_.]+";
var _1a=_19+"@"+dojo.regexp.host(_18);
if(_18.allowCruft){
_1a="<?(mailto\\:)?"+_1a+">?";
}
return _1a;
};
dojo.regexp.emailAddressList=function(_1b){
_1b=(typeof _1b=="object")?_1b:{};
if(typeof _1b.listSeparator!="string"){
_1b.listSeparator="\\s;,";
}
var _1c=dojo.regexp.emailAddress(_1b);
var _1d="("+_1c+"\\s*["+_1b.listSeparator+"]\\s*)*"+_1c+"\\s*["+_1b.listSeparator+"]?\\s*";
return _1d;
};
dojo.regexp.integer=function(_1e){
_1e=(typeof _1e=="object")?_1e:{};
if(typeof _1e.signed=="undefined"){
_1e.signed=[true,false];
}
if(typeof _1e.separator=="undefined"){
_1e.separator="";
}
var _1f=dojo.regexp.buildGroupRE(_1e.signed,function(q){
if(q){
return "[-+]";
}
return "";
});
var _21=dojo.regexp.buildGroupRE(_1e.separator,function(sep){
if(sep==""){
return "(0|[1-9]\\d*)";
}
return "(0|[1-9]\\d{0,2}(["+sep+"]\\d{3})*)";
});
var _21;
return (_1f+_21);
};
dojo.regexp.realNumber=function(_23){
_23=(typeof _23=="object")?_23:{};
if(typeof _23.places!="number"){
_23.places=Infinity;
}
if(typeof _23.decimal!="string"){
_23.decimal=".";
}
if(typeof _23.exponent=="undefined"){
_23.exponent=[true,false];
}
if(typeof _23.eSigned=="undefined"){
_23.eSigned=[true,false];
}
var _24=dojo.regexp.integer(_23);
var _25="";
if(_23.places==Infinity){
_25="(\\"+_23.decimal+"\\d+)?";
}else{
if(_23.places>0){
_25="\\"+_23.decimal+"\\d{"+_23.places+"}";
}
}
var _26=dojo.regexp.buildGroupRE(_23.exponent,function(q){
if(q){
return "([eE]"+dojo.regexp.integer({signed:_23.eSigned})+")";
}
return "";
});
return (_24+_25+_26);
};
dojo.regexp.currency=function(_28){
_28=(typeof _28=="object")?_28:{};
if(typeof _28.signed=="undefined"){
_28.signed=[true,false];
}
if(typeof _28.symbol=="undefined"){
_28.symbol="$";
}
if(typeof _28.placement!="string"){
_28.placement="before";
}
if(typeof _28.separator!="string"){
_28.separator=",";
}
if(typeof _28.cents=="undefined"){
_28.cents=[true,false];
}
if(typeof _28.decimal!="string"){
_28.decimal=".";
}
var _29=dojo.regexp.buildGroupRE(_28.signed,function(q){
if(q){
return "[-+]";
}
return "";
});
var _2b=dojo.regexp.buildGroupRE(_28.symbol,function(_2c){
return "\\s?"+_2c.replace(/([.$?*!=:|\\\/^])/g,"\\$1")+"\\s?";
});
var _2d=dojo.regexp.integer({signed:false,separator:_28.separator});
var _2e=dojo.regexp.buildGroupRE(_28.cents,function(q){
if(q){
return "(\\"+_28.decimal+"\\d\\d)";
}
return "";
});
var _30;
if(_28.placement=="before"){
_30=_29+_2b+_2d+_2e;
}else{
_30=_29+_2d+_2e+_2b;
}
return _30;
};
dojo.regexp.us.state=function(_31){
_31=(typeof _31=="object")?_31:{};
if(typeof _31.allowTerritories!="boolean"){
_31.allowTerritories=true;
}
if(typeof _31.allowMilitary!="boolean"){
_31.allowMilitary=true;
}
var _32="AL|AK|AZ|AR|CA|CO|CT|DE|DC|FL|GA|HI|ID|IL|IN|IA|KS|KY|LA|ME|MD|MA|MI|MN|MS|MO|MT|"+"NE|NV|NH|NJ|NM|NY|NC|ND|OH|OK|OR|PA|RI|SC|SD|TN|TX|UT|VT|VA|WA|WV|WI|WY";
var _33="AS|FM|GU|MH|MP|PW|PR|VI";
var _34="AA|AE|AP";
if(_31.allowTerritories){
_32+="|"+_33;
}
if(_31.allowMilitary){
_32+="|"+_34;
}
return "("+_32+")";
};
dojo.regexp.time=function(_35){
_35=(typeof _35=="object")?_35:{};
if(typeof _35.format=="undefined"){
_35.format="h:mm:ss t";
}
if(typeof _35.amSymbol!="string"){
_35.amSymbol="AM";
}
if(typeof _35.pmSymbol!="string"){
_35.pmSymbol="PM";
}
var _36=function(_37){
_37=_37.replace(/([.$?*!=:|{}\(\)\[\]\\\/^])/g,"\\$1");
var _38=_35.amSymbol.replace(/([.$?*!=:|{}\(\)\[\]\\\/^])/g,"\\$1");
var _39=_35.pmSymbol.replace(/([.$?*!=:|{}\(\)\[\]\\\/^])/g,"\\$1");
_37=_37.replace("hh","(0[1-9]|1[0-2])");
_37=_37.replace("h","([1-9]|1[0-2])");
_37=_37.replace("HH","([01][0-9]|2[0-3])");
_37=_37.replace("H","([0-9]|1[0-9]|2[0-3])");
_37=_37.replace("mm","([0-5][0-9])");
_37=_37.replace("m","([1-5][0-9]|[0-9])");
_37=_37.replace("ss","([0-5][0-9])");
_37=_37.replace("s","([1-5][0-9]|[0-9])");
_37=_37.replace("t","\\s?("+_38+"|"+_39+")\\s?");
return _37;
};
return dojo.regexp.buildGroupRE(_35.format,_36);
};
dojo.regexp.numberFormat=function(_3a){
_3a=(typeof _3a=="object")?_3a:{};
if(typeof _3a.format=="undefined"){
_3a.format="###-###-####";
}
var _3b=function(_3c){
_3c=_3c.replace(/([.$*!=:|{}\(\)\[\]\\\/^])/g,"\\$1");
_3c=_3c.replace(/\?/g,"\\d?");
_3c=_3c.replace(/#/g,"\\d");
return _3c;
};
return dojo.regexp.buildGroupRE(_3a.format,_3b);
};
dojo.regexp.buildGroupRE=function(a,re){
if(!(a instanceof Array)){
return re(a);
}
var b=[];
for(var i=0;i<a.length;i++){
b.push(re(a[i]));
}
return "("+b.join("|")+")";
};


dojo.provide("dojo.validate");
dojo.provide("dojo.validate.us");
dojo.validate.isText=function(_1,_2){
_2=(typeof _2=="object")?_2:{};
if(/^\s*$/.test(_1)){
return false;
}
if(typeof _2.length=="number"&&_2.length!=_1.length){
return false;
}
if(typeof _2.minlength=="number"&&_2.minlength>_1.length){
return false;
}
if(typeof _2.maxlength=="number"&&_2.maxlength<_1.length){
return false;
}
return true;
};
dojo.validate.isIpAddress=function(_3,_4){
var re=new RegExp("^"+dojo.regexp.ipAddress(_4)+"$","i");
return re.test(_3);
};
dojo.validate.isUrl=function(_6,_7){
var re=new RegExp("^"+dojo.regexp.url(_7)+"$","i");
return re.test(_6);
};
dojo.validate.isEmailAddress=function(_9,_a){
var re=new RegExp("^"+dojo.regexp.emailAddress(_a)+"$","i");
return re.test(_9);
};
dojo.validate.isEmailAddressList=function(_c,_d){
var re=new RegExp("^"+dojo.regexp.emailAddressList(_d)+"$","i");
return re.test(_c);
};
dojo.validate.getEmailAddressList=function(_f,_10){
if(!_10){
_10={};
}
if(!_10.listSeparator){
_10.listSeparator="\\s;,";
}
if(dojo.validate.isEmailAddressList(_f,_10)){
return _f.split(new RegExp("\\s*["+_10.listSeparator+"]\\s*"));
}
return [];
};
dojo.validate.isInteger=function(_11,_12){
var re=new RegExp("^"+dojo.regexp.integer(_12)+"$");
return re.test(_11);
};
dojo.validate.isRealNumber=function(_14,_15){
var re=new RegExp("^"+dojo.regexp.realNumber(_15)+"$");
return re.test(_14);
};
dojo.validate.isCurrency=function(_17,_18){
var re=new RegExp("^"+dojo.regexp.currency(_18)+"$");
return re.test(_17);
};
dojo.validate.us.isCurrency=function(_1a,_1b){
return dojo.validate.isCurrency(_1a,_1b);
};
dojo.validate.isGermanCurrency=function(_1c){
flags={symbol:"\ufffd",placement:"after",decimal:",",separator:"."};
return dojo.validate.isCurrency(_1c,flags);
};
dojo.validate.isJapaneseCurrency=function(_1d){
flags={symbol:"\ufffd",cents:false};
return dojo.validate.isCurrency(_1d,flags);
};
dojo.validate.isInRange=function(_1e,_1f){
_1f=(typeof _1f=="object")?_1f:{};
var max=(typeof _1f.max=="number")?_1f.max:Infinity;
var min=(typeof _1f.min=="number")?_1f.min:-Infinity;
var dec=(typeof _1f.decimal=="string")?_1f.decimal:".";
var _23="[^"+dec+"\\deE+-]";
_1e=_1e.replace(RegExp(_23,"g"),"");
_1e=_1e.replace(/^([+-]?)(\D*)/,"$1");
_1e=_1e.replace(/(\D*)$/,"");
_23="(\\d)["+dec+"](\\d)";
_1e=_1e.replace(RegExp(_23,"g"),"$1.$2");
_1e=Number(_1e);
if(_1e<min||_1e>max){
return false;
}
return true;
};
dojo.validate.isValidTime=function(_24,_25){
var re=new RegExp("^"+dojo.regexp.time(_25)+"$","i");
return re.test(_24);
};
dojo.validate.is12HourTime=function(_27){
return dojo.validate.isValidTime(_27,{format:["h:mm:ss t","h:mm t"]});
};
dojo.validate.is24HourTime=function(_28){
return dojo.validate.isValidTime(_28,{format:["HH:mm:ss","HH:mm"]});
};
dojo.validate.isValidDate=function(_29,_2a){
if(typeof _2a!="string"){
_2a="MM/DD/YYYY";
}
var _2b=_2a.replace(/([$^.*+?=!:|\/\\\(\)\[\]\{\}])/g,"\\$1");
_2b=_2b.replace("YYYY","([0-9]{4})");
_2b=_2b.replace("MM","(0[1-9]|10|11|12)");
_2b=_2b.replace("M","([1-9]|10|11|12)");
_2b=_2b.replace("DDD","(00[1-9]|0[1-9][0-9]|[12][0-9][0-9]|3[0-5][0-9]|36[0-6])");
_2b=_2b.replace("DD","(0[1-9]|[12][0-9]|30|31)");
_2b=_2b.replace("D","([1-9]|[12][0-9]|30|31)");
_2b=_2b.replace("ww","(0[1-9]|[1-4][0-9]|5[0-3])");
_2b=_2b.replace("d","([1-7])");
_2b="^"+_2b+"$";
var re=new RegExp(_2b);
if(!re.test(_29)){
return false;
}
var _2d=0,month=1,date=1,dayofyear=1,week=1,day=1;
var _2e=_2a.match(/(YYYY|MM|M|DDD|DD|D|ww|d)/g);
var _2f=re.exec(_29);
for(var i=0;i<_2e.length;i++){
switch(_2e[i]){
case "YYYY":
_2d=Number(_2f[i+1]);
break;
case "M":
case "MM":
month=Number(_2f[i+1]);
break;
case "D":
case "DD":
date=Number(_2f[i+1]);
break;
case "DDD":
dayofyear=Number(_2f[i+1]);
break;
case "ww":
week=Number(_2f[i+1]);
break;
case "d":
day=Number(_2f[i+1]);
break;
}
}
var _31=(_2d%4==0&&(_2d%100!=0||_2d%400==0));
if(date==31&&(month==4||month==6||month==9||month==11)){
return false;
}
if(date>=30&&month==2){
return false;
}
if(date==29&&month==2&&!_31){
return false;
}
if(dayofyear==366&&!_31){
return false;
}
return true;
};
dojo.validate.us.isState=function(_32,_33){
var re=new RegExp("^"+dojo.regexp.us.state(_33)+"$","i");
return re.test(_32);
};
dojo.validate.isNumberFormat=function(_35,_36){
var re=new RegExp("^"+dojo.regexp.numberFormat(_36)+"$","i");
return re.test(_35);
};
dojo.validate.us.isPhoneNumber=function(_38){
flags={format:["###-###-####","(###) ###-####","(###) ### ####","###.###.####","###/###-####","### ### ####","###-###-#### x#???","(###) ###-#### x#???","(###) ### #### x#???","###.###.#### x#???","###/###-#### x#???","### ### #### x#???"]};
return dojo.validate.isNumberFormat(_38,flags);
};
dojo.validate.us.isSocialSecurityNumber=function(_39){
flags={format:["###-##-####","### ## ####","#########"]};
return dojo.validate.isNumberFormat(_39,flags);
};
dojo.validate.us.isZipCode=function(_3a){
flags={format:["#####-####","##### ####","#########","#####"]};
return dojo.validate.isNumberFormat(_3a,flags);
};
dojo.validate.check=function(_3b,_3c){
var _3d=[];
var _3e=[];
var _3f={isSuccessful:function(){
return (!this.hasInvalid()&&!this.hasMissing());
},hasMissing:function(){
return (_3d.length>0);
},getMissing:function(){
return _3d;
},isMissing:function(_40){
for(var i=0;i<_3d.length;i++){
if(_40==_3d[i]){
return true;
}
}
return false;
},hasInvalid:function(){
return (_3e.length>0);
},getInvalid:function(){
return _3e;
},isInvalid:function(_42){
for(var i=0;i<_3e.length;i++){
if(_42==_3e[i]){
return true;
}
}
return false;
}};
if(_3c.trim instanceof Array){
for(var i=0;i<_3c.trim.length;i++){
var _45=_3b[_3c.trim[i]];
if(_45.type!="text"&&_45.type!="textarea"&&_45.type!="password"){
continue;
}
_45.value=_45.value.replace(/(^\s*|\s*$)/g,"");
}
}
if(_3c.uppercase instanceof Array){
for(var i=0;i<_3c.uppercase.length;i++){
var _45=_3b[_3c.uppercase[i]];
if(_45.type!="text"&&_45.type!="textarea"&&_45.type!="password"){
continue;
}
_45.value=_45.value.toUpperCase();
}
}
if(_3c.lowercase instanceof Array){
for(var i=0;i<_3c.lowercase.length;i++){
var _45=_3b[_3c.lowercase[i]];
if(_45.type!="text"&&_45.type!="textarea"&&_45.type!="password"){
continue;
}
_45.value=_45.value.toLowerCase();
}
}
if(_3c.ucfirst instanceof Array){
for(var i=0;i<_3c.ucfirst.length;i++){
var _45=_3b[_3c.ucfirst[i]];
if(_45.type!="text"&&_45.type!="textarea"&&_45.type!="password"){
continue;
}
_45.value=_45.value.replace(/\b\w+\b/g,function(_46){
return _46.substring(0,1).toUpperCase()+_46.substring(1).toLowerCase();
});
}
}
if(_3c.digit instanceof Array){
for(var i=0;i<_3c.digit.length;i++){
var _45=_3b[_3c.digit[i]];
if(_45.type!="text"&&_45.type!="textarea"&&_45.type!="password"){
continue;
}
_45.value=_45.value.replace(/\D/g,"");
}
}
if(_3c.required instanceof Array){
for(var i=0;i<_3c.required.length;i++){
if(typeof _3c.required[i]!="string"){
continue;
}
var _45=_3b[_3c.required[i]];
if((_45.type=="text"||_45.type=="textarea"||_45.type=="password")&&/^\s*$/.test(_45.value)){
_3d[_3d.length]=_45.name;
}else{
if((_45.type=="select-one"||_45.type=="select-multiple")&&_45.selectedIndex==-1){
_3d[_3d.length]=_45.name;
}else{
if(_45 instanceof Array){
var _47=false;
for(var j=0;j<_45.length;j++){
if(_45[j].checked){
_47=true;
}
}
if(!_47){
_3d[_3d.length]=_45[0].name;
}
}
}
}
}
}
if(_3c.required instanceof Array){
for(var i=0;i<_3c.required.length;i++){
if(typeof _3c.required[i]!="object"){
continue;
}
var _45,numRequired;
for(var _49 in _3c.required[i]){
_45=_3b[_49];
numRequired=_3c.required[i][_49];
}
if(_45 instanceof Array){
var _47=0;
for(var j=0;j<_45.length;j++){
if(_45[j].checked){
_47++;
}
}
if(_47<numRequired){
_3d[_3d.length]=_45[0].name;
}
}else{
if(_45.type=="select-multiple"){
var _4a=0;
for(var j=0;j<_45.options.length;j++){
if(_45.options[j].selected){
_4a++;
}
}
if(_4a<numRequired){
_3d[_3d.length]=_45.name;
}
}
}
}
}
if(typeof _3c.dependancies=="object"){
for(_49 in _3c.dependancies){
var _45=_3b[_49];
if(_45.type!="text"&&_45.type!="textarea"&&_45.type!="password"){
continue;
}
if(/\S+/.test(_45.value)){
continue;
}
if(_3f.isMissing(_45.name)){
continue;
}
var _4b=_3b[_3c.dependancies[_49]];
if(_4b.type!="text"&&_4b.type!="textarea"&&_4b.type!="password"){
continue;
}
if(/^\s*$/.test(_4b.value)){
continue;
}
_3d[_3d.length]=_45.name;
}
}
if(typeof _3c.constraints=="object"){
for(_49 in _3c.constraints){
var _45=_3b[_49];
if(_45.type!="text"&&_45.type!="textarea"&&_45.type!="password"){
continue;
}
if(/^\s*$/.test(_45.value)){
continue;
}
var _4c=true;
if(typeof _3c.constraints[_49]=="function"){
_4c=_3c.constraints[_49](_45.value);
}else{
if(_3c.constraints[_49] instanceof Array){
var _4d=_3c.constraints[_49][0];
var _4e=_3c.constraints[_49].slice(1);
_4e.unshift(_45.value);
_4c=_4d.apply(null,_4e);
}
}
if(!_4c){
_3e[_3e.length]=_45.name;
}
}
}
if(typeof _3c.confirm=="object"){
for(_49 in _3c.confirm){
var _45=_3b[_49];
var _4b=_3b[_3c.confirm[_49]];
if((_45.type!="text"&&_45.type!="textarea"&&_45.type!="password")||_4b.type!=_45.type||_4b.value==_45.value||_3f.isInvalid(_45.name)||/^\s*$/.test(_4b.value)){
continue;
}
_3e[_3e.length]=_45.name;
}
}
return _3f;
};


dojo.provide("dojo.dnd.DragSource");
dojo.provide("dojo.dnd.DropTarget");
dojo.provide("dojo.dnd.DragObject");
dojo.provide("dojo.dnd.DragAndDrop");
dojo.dnd.DragSource=function(){
var dm=dojo.dnd.dragManager;
if(dm["registerDragSource"]){
dm.registerDragSource(this);
}
};
dojo.lang.extend(dojo.dnd.DragSource,{type:"",onDragEnd:function(){
},onDragStart:function(){
},unregister:function(){
dojo.dnd.dragManager.unregisterDragSource(this);
},reregister:function(){
dojo.dnd.dragManager.registerDragSource(this);
}});
dojo.dnd.DragObject=function(){
var dm=dojo.dnd.dragManager;
if(dm["registerDragObject"]){
dm.registerDragObject(this);
}
};
dojo.lang.extend(dojo.dnd.DragObject,{type:"",onDragStart:function(){
},onDragMove:function(){
},onDragOver:function(){
},onDragOut:function(){
},onDragEnd:function(){
},onDragLeave:this.onDragOut,onDragEnter:this.onDragOver,ondragout:this.onDragOut,ondragover:this.onDragOver});
dojo.dnd.DropTarget=function(){
if(this.constructor==dojo.dnd.DropTarget){
return;
}
this.acceptedTypes=[];
dojo.dnd.dragManager.registerDropTarget(this);
};
dojo.lang.extend(dojo.dnd.DropTarget,{acceptsType:function(_3){
if(!dojo.lang.inArray(this.acceptedTypes,"*")){
if(!dojo.lang.inArray(this.acceptedTypes,_3)){
return false;
}
}
return true;
},accepts:function(_4){
if(!dojo.lang.inArray(this.acceptedTypes,"*")){
for(var i=0;i<_4.length;i++){
if(!dojo.lang.inArray(this.acceptedTypes,_4[i].type)){
return false;
}
}
}
return true;
},onDragOver:function(){
},onDragOut:function(){
},onDragMove:function(){
},onDropStart:function(){
},onDrop:function(){
},onDropEnd:function(){
}});
dojo.dnd.DragEvent=function(){
this.dragSource=null;
this.dragObject=null;
this.target=null;
this.eventStatus="success";
};
dojo.dnd.DragManager=function(){
};
dojo.lang.extend(dojo.dnd.DragManager,{selectedSources:[],dragObjects:[],dragSources:[],registerDragSource:function(){
},dropTargets:[],registerDropTarget:function(){
},lastDragTarget:null,currentDragTarget:null,onKeyDown:function(){
},onMouseOut:function(){
},onMouseMove:function(){
},onMouseUp:function(){
}});


dojo.provide("dojo.dnd.HtmlDragManager");
dojo.dnd.HtmlDragManager=function(){
};
dojo.inherits(dojo.dnd.HtmlDragManager,dojo.dnd.DragManager);
dojo.lang.extend(dojo.dnd.HtmlDragManager,{disabled:false,nestedTargets:false,mouseDownTimer:null,dsCounter:0,dsPrefix:"dojoDragSource",dropTargetDimensions:[],currentDropTarget:null,previousDropTarget:null,_dragTriggered:false,selectedSources:[],dragObjects:[],currentX:null,currentY:null,lastX:null,lastY:null,mouseDownX:null,mouseDownY:null,threshold:7,dropAcceptable:false,cancelEvent:function(e){
e.stopPropagation();
e.preventDefault();
},registerDragSource:function(ds){
if(ds["domNode"]){
var dp=this.dsPrefix;
var _4=dp+"Idx_"+(this.dsCounter++);
ds.dragSourceId=_4;
this.dragSources[_4]=ds;
ds.domNode.setAttribute(dp,_4);
if(dojo.render.html.ie){
dojo.event.connect(ds.domNode,"ondragstart",this.cancelEvent);
}
}
},unregisterDragSource:function(ds){
if(ds["domNode"]){
var dp=this.dsPrefix;
var _7=ds.dragSourceId;
delete ds.dragSourceId;
delete this.dragSources[_7];
ds.domNode.setAttribute(dp,null);
}
if(dojo.render.html.ie){
dojo.event.disconnect(ds.domNode,"ondragstart",this.cancelEvent);
}
},registerDropTarget:function(dt){
this.dropTargets.push(dt);
},unregisterDropTarget:function(dt){
var _a=dojo.lang.find(this.dropTargets,dt,true);
if(_a>=0){
this.dropTargets.splice(_a,1);
}
},getDragSource:function(e){
var tn=e.target;
if(tn===document.body){
return;
}
var ta=dojo.html.getAttribute(tn,this.dsPrefix);
while((!ta)&&(tn)){
tn=tn.parentNode;
if((!tn)||(tn===document.body)){
return;
}
ta=dojo.html.getAttribute(tn,this.dsPrefix);
}
return this.dragSources[ta];
},onKeyDown:function(e){
},onMouseDown:function(e){
if(this.disabled){
return;
}
if(dojo.render.html.ie){
if(e.button!=1){
return;
}
}else{
if(e.which!=1){
return;
}
}
var _10=e.target.nodeType==dojo.dom.TEXT_NODE?e.target.parentNode:e.target;
if(dojo.html.isTag(_10,"button","textarea","input")){
return;
}
var ds=this.getDragSource(e);
if(!ds){
return;
}
if(!dojo.lang.inArray(this.selectedSources,ds)){
this.selectedSources.push(ds);
}
this.mouseDownX=e.clientX;
this.mouseDownY=e.clientY;
e.preventDefault();
dojo.event.connect(document,"onmousemove",this,"onMouseMove");
},onMouseUp:function(e,_13){
if(this.selectedSources.length==0){
return;
}
this.mouseDownX=null;
this.mouseDownY=null;
this._dragTriggered=false;
var _14=this;
e.preventDefault();
e.dragSource=this.dragSource;
if((!e.shiftKey)&&(!e.ctrlKey)){
if(_14.currentDropTarget){
_14.currentDropTarget.onDropStart();
}
dojo.lang.forEach(this.dragObjects,function(_15){
var ret=null;
if(!_15){
return;
}
if(_14.currentDropTarget){
e.dragObject=_15;
var ce=_14.currentDropTarget.domNode.childNodes;
if(ce.length>0){
e.dropTarget=ce[0];
while(e.dropTarget==_15.domNode){
e.dropTarget=e.dropTarget.nextSibling;
}
}else{
e.dropTarget=_14.currentDropTarget.domNode;
}
if(_14.dropAcceptable){
ret=_14.currentDropTarget.onDrop(e);
}else{
_14.currentDropTarget.onDragOut(e);
}
}
e.dragStatus=_14.dropAcceptable&&ret?"dropSuccess":"dropFailure";
_15.dragSource.onDragEnd(e);
_15.onDragEnd(e);
});
this.selectedSources=[];
this.dragObjects=[];
this.dragSource=null;
if(_14.currentDropTarget){
_14.currentDropTarget.onDropEnd();
}
}
dojo.event.disconnect(document,"onmousemove",this,"onMouseMove");
this.currentDropTarget=null;
},onScroll:function(){
for(var i=0;i<this.dragObjects.length;i++){
if(this.dragObjects[i].updateDragOffset){
this.dragObjects[i].updateDragOffset();
}
}
this.cacheTargetLocations();
},_dragStartDistance:function(x,y){
if((!this.mouseDownX)||(!this.mouseDownX)){
return;
}
var dx=Math.abs(x-this.mouseDownX);
var dx2=dx*dx;
var dy=Math.abs(y-this.mouseDownY);
var dy2=dy*dy;
return parseInt(Math.sqrt(dx2+dy2),10);
},cacheTargetLocations:function(){
var _1f=this;
this.dropTargetDimensions=[];
dojo.lang.forEach(this.dropTargets,function(_20){
var tn=_20.domNode;
if(!tn){
return;
}
var ttx=dojo.style.getAbsoluteX(tn,true);
var tty=dojo.style.getAbsoluteY(tn,true);
_1f.dropTargetDimensions.push([[ttx,tty],[ttx+dojo.style.getInnerWidth(tn),tty+dojo.style.getInnerHeight(tn)],_20]);
});
},onMouseMove:function(e){
var _25=this;
if(dojo.render.html.ie&&e.button!=1){
this.currentDropTarget=null;
this.onMouseUp(e,true);
return;
}
if((this.selectedSources.length)&&(!this.dragObjects.length)){
var dx;
var dy;
if(!this._dragTriggered){
this._dragTriggered=(this._dragStartDistance(e.clientX,e.clientY)>this.threshold);
if(!this._dragTriggered){
return;
}
dx=e.clientX-this.mouseDownX;
dy=e.clientY-this.mouseDownY;
}
if(this.selectedSources.length==1){
this.dragSource=this.selectedSources[0];
}
dojo.lang.forEach(this.selectedSources,function(_28){
if(!_28){
return;
}
var tdo=_28.onDragStart(e);
if(tdo){
tdo.onDragStart(e);
tdo.dragOffset.top+=dy;
tdo.dragOffset.left+=dx;
tdo.dragSource=_28;
_25.dragObjects.push(tdo);
}
});
this.previousDropTarget=null;
this.cacheTargetLocations();
}
for(var i=0;i<this.dragObjects.length;i++){
if(this.dragObjects[i]){
this.dragObjects[i].onDragMove(e);
}
}
if(this.currentDropTarget){
var c=dojo.html.toCoordinateArray(this.currentDropTarget.domNode);
var dtp=[[c[0],c[1]],[c[0]+c[2],c[1]+c[3]]];
}
if((!this.nestedTargets)&&(dtp)&&(this.isInsideBox(e,dtp))){
if(this.dropAcceptable){
this.currentDropTarget.onDragMove(e,this.dragObjects);
}
}else{
var _2d=this.findBestTarget(e);
if(_2d.target===null){
if(this.currentDropTarget){
this.currentDropTarget.onDragOut(e);
this.previousDropTarget=this.currentDropTarget;
this.currentDropTarget=null;
}
this.dropAcceptable=false;
return;
}
if(this.currentDropTarget!==_2d.target){
if(this.currentDropTarget){
this.previousDropTarget=this.currentDropTarget;
this.currentDropTarget.onDragOut(e);
}
this.currentDropTarget=_2d.target;
e.dragObjects=this.dragObjects;
this.dropAcceptable=this.currentDropTarget.onDragOver(e);
}else{
if(this.dropAcceptable){
this.currentDropTarget.onDragMove(e,this.dragObjects);
}
}
}
},findBestTarget:function(e){
var _2f=this;
var _30=new Object();
_30.target=null;
_30.points=null;
dojo.lang.forEach(this.dropTargetDimensions,function(_31){
if(_2f.isInsideBox(e,_31)){
_30.target=_31[2];
_30.points=_31;
if(!_2f.nestedTargets){
return "break";
}
}
});
return _30;
},isInsideBox:function(e,_33){
if((e.clientX>_33[0][0])&&(e.clientX<_33[1][0])&&(e.clientY>_33[0][1])&&(e.clientY<_33[1][1])){
return true;
}
return false;
},onMouseOver:function(e){
},onMouseOut:function(e){
}});
dojo.dnd.dragManager=new dojo.dnd.HtmlDragManager();
(function(){
var d=document;
var dm=dojo.dnd.dragManager;
dojo.event.connect(d,"onkeydown",dm,"onKeyDown");
dojo.event.connect(d,"onmouseover",dm,"onMouseOver");
dojo.event.connect(d,"onmouseout",dm,"onMouseOut");
dojo.event.connect(d,"onmousedown",dm,"onMouseDown");
dojo.event.connect(d,"onmouseup",dm,"onMouseUp");
dojo.event.connect(window,"onscroll",dm,"onScroll");
})();


dojo.provide("dojo.animation.AnimationSequence");
dojo.animation.AnimationSequence=function(_1){
this._anims=[];
this.repeatCount=_1||0;
};
dojo.lang.extend(dojo.animation.AnimationSequence,{repeateCount:0,_anims:[],_currAnim:-1,onBegin:null,onEnd:null,onNext:null,handler:null,add:function(){
for(var i=0;i<arguments.length;i++){
this._anims.push(arguments[i]);
arguments[i]._animSequence=this;
}
},remove:function(_3){
for(var i=0;i<this._anims.length;i++){
if(this._anims[i]==_3){
this._anims[i]._animSequence=null;
this._anims.splice(i,1);
break;
}
}
},removeAll:function(){
for(var i=0;i<this._anims.length;i++){
this._anims[i]._animSequence=null;
}
this._anims=[];
this._currAnim=-1;
},clear:function(){
this.removeAll();
},play:function(_6){
if(this._anims.length==0){
return;
}
if(_6||!this._anims[this._currAnim]){
this._currAnim=0;
}
if(this._anims[this._currAnim]){
if(this._currAnim==0){
var e={type:"begin",animation:this._anims[this._currAnim]};
if(typeof this.handler=="function"){
this.handler(e);
}
if(typeof this.onBegin=="function"){
this.onBegin(e);
}
}
this._anims[this._currAnim].play(_6);
}
},pause:function(){
if(this._anims[this._currAnim]){
this._anims[this._currAnim].pause();
}
},playPause:function(){
if(this._anims.length==0){
return;
}
if(this._currAnim==-1){
this._currAnim=0;
}
if(this._anims[this._currAnim]){
this._anims[this._currAnim].playPause();
}
},stop:function(){
if(this._anims[this._currAnim]){
this._anims[this._currAnim].stop();
}
},status:function(){
if(this._anims[this._currAnim]){
return this._anims[this._currAnim].status();
}else{
return "stopped";
}
},_setCurrent:function(_8){
for(var i=0;i<this._anims.length;i++){
if(this._anims[i]==_8){
this._currAnim=i;
break;
}
}
},_playNext:function(){
if(this._currAnim==-1||this._anims.length==0){
return;
}
this._currAnim++;
if(this._anims[this._currAnim]){
var e={type:"next",animation:this._anims[this._currAnim]};
if(typeof this.handler=="function"){
this.handler(e);
}
if(typeof this.onNext=="function"){
this.onNext(e);
}
this._anims[this._currAnim].play(true);
}else{
var e={type:"end",animation:this._anims[this._anims.length-1]};
if(typeof this.handler=="function"){
this.handler(e);
}
if(typeof this.onEnd=="function"){
this.onEnd(e);
}
if(this.repeatCount>0){
this._currAnim=0;
this.repeatCount--;
this._anims[this._currAnim].play(true);
}else{
if(this.repeatCount==-1){
this._currAnim=0;
this._anims[this._currAnim].play(true);
}else{
this._currAnim=-1;
}
}
}
}});


dojo.hostenv.conditionalLoadModule({common:["dojo.animation.AnimationEvent","dojo.animation.Animation","dojo.animation.AnimationSequence"]});
dojo.hostenv.moduleLoaded("dojo.animation.*");


dojo.provide("dojo.dnd.HtmlDragAndDrop");
dojo.provide("dojo.dnd.HtmlDragSource");
dojo.provide("dojo.dnd.HtmlDropTarget");
dojo.provide("dojo.dnd.HtmlDragObject");
dojo.dnd.HtmlDragSource=function(_1,_2){
_1=dojo.byId(_1);
this.constrainToContainer=false;
if(_1){
this.domNode=_1;
this.dragObject=_1;
dojo.dnd.DragSource.call(this);
this.type=_2||this.domNode.nodeName.toLowerCase();
}
};
dojo.inherits(dojo.dnd.HtmlDragSource,dojo.dnd.DragSource);
dojo.lang.extend(dojo.dnd.HtmlDragSource,{dragClass:"",onDragStart:function(){
var _3=new dojo.dnd.HtmlDragObject(this.dragObject,this.type);
if(this.dragClass){
_3.dragClass=this.dragClass;
}
if(this.constrainToContainer){
_3.constrainTo(this.constrainingContainer||this.domNode.parentNode);
}
return _3;
},setDragHandle:function(_4){
_4=dojo.byId(_4);
dojo.dnd.dragManager.unregisterDragSource(this);
this.domNode=_4;
dojo.dnd.dragManager.registerDragSource(this);
},setDragTarget:function(_5){
this.dragObject=_5;
},constrainTo:function(_6){
this.constrainToContainer=true;
if(_6){
this.constrainingContainer=_6;
}
}});
dojo.dnd.HtmlDragObject=function(_7,_8){
this.domNode=dojo.byId(_7);
this.type=_8;
this.constrainToContainer=false;
this.dragSource=null;
};
dojo.inherits(dojo.dnd.HtmlDragObject,dojo.dnd.DragObject);
dojo.lang.extend(dojo.dnd.HtmlDragObject,{dragClass:"",opacity:0.5,createIframe:true,disableX:false,disableY:false,createDragNode:function(){
var _9=this.domNode.cloneNode(true);
if(this.dragClass){
dojo.html.addClass(_9,this.dragClass);
}
if(this.opacity<1){
dojo.style.setOpacity(_9,this.opacity);
}
if(dojo.render.html.ie&&this.createIframe){
var _a=document.createElement("div");
_a.appendChild(_9);
this.bgIframe=new dojo.html.BackgroundIframe(_a);
_a.appendChild(this.bgIframe.iframe);
_9=_a;
}
_9.style.zIndex=500;
return _9;
},onDragStart:function(e){
dojo.html.clearSelection();
this.scrollOffset={top:dojo.html.getScrollTop(),left:dojo.html.getScrollLeft()};
this.dragStartPosition={top:dojo.style.getAbsoluteY(this.domNode,true)+this.scrollOffset.top,left:dojo.style.getAbsoluteX(this.domNode,true)+this.scrollOffset.left};
this.dragOffset={top:this.dragStartPosition.top-e.clientY,left:this.dragStartPosition.left-e.clientX};
this.dragClone=this.createDragNode();
if((this.domNode.parentNode.nodeName.toLowerCase()=="body")||(dojo.style.getComputedStyle(this.domNode.parentNode,"position")=="static")){
this.parentPosition={top:0,left:0};
}else{
this.parentPosition={top:dojo.style.getAbsoluteY(this.domNode.parentNode,true),left:dojo.style.getAbsoluteX(this.domNode.parentNode,true)};
}
if(this.constrainToContainer){
this.constraints=this.getConstraints();
}
with(this.dragClone.style){
position="absolute";
top=this.dragOffset.top+e.clientY+"px";
left=this.dragOffset.left+e.clientX+"px";
}
document.body.appendChild(this.dragClone);
},getConstraints:function(){
if(this.constrainingContainer.nodeName.toLowerCase()=="body"){
width=dojo.html.getViewportWidth();
height=dojo.html.getViewportHeight();
padLeft=0;
padTop=0;
}else{
width=dojo.style.getContentWidth(this.constrainingContainer);
height=dojo.style.getContentHeight(this.constrainingContainer);
padLeft=dojo.style.getPixelValue(this.constrainingContainer,"padding-left",true);
padTop=dojo.style.getPixelValue(this.constrainingContainer,"padding-top",true);
}
return {minX:padLeft,minY:padTop,maxX:padLeft+width-dojo.style.getOuterWidth(this.domNode),maxY:padTop+height-dojo.style.getOuterHeight(this.domNode)};
},updateDragOffset:function(){
var _c=dojo.html.getScrollTop();
var _d=dojo.html.getScrollLeft();
if(_c!=this.scrollOffset.top){
var _e=_c-this.scrollOffset.top;
this.dragOffset.top+=_e;
this.scrollOffset.top=_c;
}
},onDragMove:function(e){
this.updateDragOffset();
var x=this.dragOffset.left+e.clientX-this.parentPosition.left;
var y=this.dragOffset.top+e.clientY-this.parentPosition.top;
if(this.constrainToContainer){
if(x<this.constraints.minX){
x=this.constraints.minX;
}
if(y<this.constraints.minY){
y=this.constraints.minY;
}
if(x>this.constraints.maxX){
x=this.constraints.maxX;
}
if(y>this.constraints.maxY){
y=this.constraints.maxY;
}
}
if(!this.disableY){
this.dragClone.style.top=y+"px";
}
if(!this.disableX){
this.dragClone.style.left=x+"px";
}
},onDragEnd:function(e){
switch(e.dragStatus){
case "dropSuccess":
dojo.dom.removeNode(this.dragClone);
this.dragClone=null;
break;
case "dropFailure":
var _13=[dojo.style.getAbsoluteX(this.dragClone),dojo.style.getAbsoluteY(this.dragClone)];
var _14=[this.dragStartPosition.left+1,this.dragStartPosition.top+1];
var _15=new dojo.math.curves.Line(_13,_14);
var _16=new dojo.animation.Animation(_15,300,0,0);
var _17=this;
dojo.event.connect(_16,"onAnimate",function(e){
_17.dragClone.style.left=e.x+"px";
_17.dragClone.style.top=e.y+"px";
});
dojo.event.connect(_16,"onEnd",function(e){
dojo.lang.setTimeout(dojo.dom.removeNode,200,_17.dragClone);
});
_16.play();
break;
}
dojo.event.connect(this.domNode,"onclick",this,"squelchOnClick");
},squelchOnClick:function(e){
e.preventDefault();
dojo.event.disconnect(this.domNode,"onclick",this,"squelchOnClick");
},constrainTo:function(_1b){
this.constrainToContainer=true;
if(_1b){
this.constrainingContainer=_1b;
}else{
this.constrainingContainer=this.domNode.parentNode;
}
}});
dojo.dnd.HtmlDropTarget=function(_1c,_1d){
if(arguments.length==0){
return;
}
this.domNode=dojo.byId(_1c);
dojo.dnd.DropTarget.call(this);
if(_1d&&dojo.lang.isString(_1d)){
_1d=[_1d];
}
this.acceptedTypes=_1d||[];
};
dojo.inherits(dojo.dnd.HtmlDropTarget,dojo.dnd.DropTarget);
dojo.lang.extend(dojo.dnd.HtmlDropTarget,{onDragOver:function(e){
if(!this.accepts(e.dragObjects)){
return false;
}
this.childBoxes=[];
for(var i=0,child;i<this.domNode.childNodes.length;i++){
child=this.domNode.childNodes[i];
if(child.nodeType!=dojo.dom.ELEMENT_NODE){
continue;
}
var top=dojo.style.getAbsoluteY(child);
var _21=top+dojo.style.getInnerHeight(child);
var _22=dojo.style.getAbsoluteX(child);
var _23=_22+dojo.style.getInnerWidth(child);
this.childBoxes.push({top:top,bottom:_21,left:_22,right:_23,node:child});
}
return true;
},_getNodeUnderMouse:function(e){
var _25=e.pageX||e.clientX+document.body.scrollLeft;
var _26=e.pageY||e.clientY+document.body.scrollTop;
for(var i=0,child;i<this.childBoxes.length;i++){
with(this.childBoxes[i]){
if(_25>=left&&_25<=right&&_26>=top&&_26<=bottom){
return i;
}
}
}
return -1;
},createDropIndicator:function(){
this.dropIndicator=document.createElement("div");
with(this.dropIndicator.style){
position="absolute";
zIndex=1;
borderTopWidth="1px";
borderTopColor="black";
borderTopStyle="solid";
width=dojo.style.getInnerWidth(this.domNode)+"px";
left=dojo.style.getAbsoluteX(this.domNode)+"px";
}
},onDragMove:function(e,_29){
var i=this._getNodeUnderMouse(e);
if(!this.dropIndicator){
this.createDropIndicator();
}
if(i<0){
if(this.childBoxes.length){
var _2b=(dojo.html.gravity(this.childBoxes[0].node,e)&dojo.html.gravity.NORTH);
}else{
var _2b=true;
}
}else{
var _2c=this.childBoxes[i];
var _2b=(dojo.html.gravity(_2c.node,e)&dojo.html.gravity.NORTH);
}
this.placeIndicator(e,_29,i,_2b);
if(!dojo.html.hasParent(this.dropIndicator)){
document.body.appendChild(this.dropIndicator);
}
},placeIndicator:function(e,_2e,_2f,_30){
with(this.dropIndicator.style){
if(_2f<0){
if(this.childBoxes.length){
top=(_30?this.childBoxes[0].top:this.childBoxes[this.childBoxes.length-1].bottom)+"px";
}else{
top=dojo.style.getAbsoluteY(this.domNode)+"px";
}
}else{
var _31=this.childBoxes[_2f];
top=(_30?_31.top:_31.bottom)+"px";
}
}
},onDragOut:function(e){
if(this.dropIndicator){
dojo.dom.removeNode(this.dropIndicator);
delete this.dropIndicator;
}
},onDrop:function(e){
this.onDragOut(e);
var i=this._getNodeUnderMouse(e);
if(i<0){
if(this.childBoxes.length){
if(dojo.html.gravity(this.childBoxes[0].node,e)&dojo.html.gravity.NORTH){
return this.insert(e,this.childBoxes[0].node,"before");
}else{
return this.insert(e,this.childBoxes[this.childBoxes.length-1].node,"after");
}
}
return this.insert(e,this.domNode,"append");
}
var _35=this.childBoxes[i];
if(dojo.html.gravity(_35.node,e)&dojo.html.gravity.NORTH){
return this.insert(e,_35.node,"before");
}else{
return this.insert(e,_35.node,"after");
}
},insert:function(e,_37,_38){
var _39=e.dragObject.domNode;
if(_38=="before"){
return dojo.html.insertBefore(_39,_37);
}else{
if(_38=="after"){
return dojo.html.insertAfter(_39,_37);
}else{
if(_38=="append"){
_37.appendChild(_39);
return true;
}
}
}
return false;
}});


dojo.hostenv.conditionalLoadModule({common:["dojo.dnd.DragAndDrop"],browser:["dojo.dnd.HtmlDragAndDrop"],dashboard:["dojo.dnd.HtmlDragAndDrop"]});
dojo.hostenv.moduleLoaded("dojo.dnd.*");


dojo.provide("dojo.dnd.HtmlDragMove");
dojo.provide("dojo.dnd.HtmlDragMoveSource");
dojo.provide("dojo.dnd.HtmlDragMoveObject");
dojo.dnd.HtmlDragMoveSource=function(_1,_2){
dojo.dnd.HtmlDragSource.call(this,_1,_2);
};
dojo.inherits(dojo.dnd.HtmlDragMoveSource,dojo.dnd.HtmlDragSource);
dojo.lang.extend(dojo.dnd.HtmlDragMoveSource,{onDragStart:function(){
var _3=new dojo.dnd.HtmlDragMoveObject(this.dragObject,this.type);
if(this.constrainToContainer){
_3.constrainTo(this.constrainingContainer);
}
return _3;
}});
dojo.dnd.HtmlDragMoveObject=function(_4,_5){
dojo.dnd.HtmlDragObject.call(this,_4,_5);
};
dojo.inherits(dojo.dnd.HtmlDragMoveObject,dojo.dnd.HtmlDragObject);
dojo.lang.extend(dojo.dnd.HtmlDragMoveObject,{onDragEnd:function(e){
dojo.event.connect(this.domNode,"onclick",this,"squelchOnClick");
},onDragStart:function(e){
dojo.html.clearSelection();
this.dragClone=this.domNode;
this.scrollOffset={top:dojo.html.getScrollTop(),left:dojo.html.getScrollLeft()};
this.dragStartPosition={top:dojo.style.getAbsoluteY(this.domNode),left:dojo.style.getAbsoluteX(this.domNode)};
this.dragOffset={top:this.dragStartPosition.top-e.clientY,left:this.dragStartPosition.left-e.clientX};
if(this.domNode.parentNode.nodeName.toLowerCase()=="body"){
this.parentPosition={top:0,left:0};
}else{
this.parentPosition={top:dojo.style.getAbsoluteY(this.domNode.parentNode,true),left:dojo.style.getAbsoluteX(this.domNode.parentNode,true)};
}
this.dragClone.style.position="absolute";
if(this.constrainToContainer){
this.constraints=this.getConstraints();
}
}});


if(!this["dojo"]){
document.write("<scr"+"ipt type=\"text/javascript\" src=\"/dojo0/dojo.js\"></scr"+"ipt>");
}
function startRadius(){
dojo.provide("radius");
radius.loaded=false;
dojo.setModulePrefix("radius",GLOBAL_CONFIG.radiusPrefix);
}


dojo.provide("radius.fixes");
debug_indent=0;
dojo.hostenv.indentString=function(){
var _1="";
for(var n=0;n<debug_indent;n++){
_1+="    ";
}
return _1;
};
dojo.hostenv.println=function(_3){
if(!dojo.hostenv._println_safe){
dojo.hostenv._println_buffer.push(_3);
}else{
try{
var _4=document.getElementById(djConfig.debugContainerId?djConfig.debugContainerId:dojo.hostenv.defaultDebugContainerId);
if(!_4){
_4=document.getElementsByTagName("body")[0]||document.body;
}
var _5=document.createElement("pre");
if(debug_indent){
_5.style.marginLeft=(debug_indent*30)+"px";
}
_5.style.display="inline";
if(dojo.render.html.ie){
_3=_3.replace(/\n/g,"<br>");
_5.innerHTML=_3;
}else{
_5.appendChild(document.createTextNode(_3));
}
if(_4.firstChild){
_4.insertBefore(document.createElement("br"),_4.firstChild);
_4.insertBefore(_5,_4.firstChild);
}else{
_4.appendChild(_5);
_4.appendChild(document.createElement("br"));
}
}
catch(e){
try{
document.write("<div>"+_3+"</div>");
}
catch(e2){
window.status=_3;
}
}
}
};
dojo.io.cookie.isSupported=function(){
dojo.io.cookie.setCookie("__TestingYourBrowserForCookieSupport__","CookiesAllowed",90,null);
var _6=dojo.io.cookie.getCookie("__TestingYourBrowserForCookieSupport__");
var _7=(_6=="CookiesAllowed");
if(_7){
this.deleteCookie("__TestingYourBrowserForCookieSupport__");
}
return _7;
};
dojo.style.getUnitValue=function(_8,_9,_a){
_8=dojo.byId(_8);
var _b={value:0,units:"px"};
var s=dojo.style.getComputedStyle(_8,_9);
if(!(s)||(s=="auto"&&_a)){
return _b;
}
if(dojo.lang.isUndefined(s)){
_b.value=NaN;
}else{
var _d=s.match(/(\-?[\d.]+)([a-z%]*)/i);
if(!_d){
_b.value=NaN;
}else{
_b.value=Number(_d[1]);
_b.units=_d[2].toLowerCase();
}
}
return _b;
};


dojo.provide("radius.config");
radius.config=new function(){
this.locals={usersPerGrid:72,recentsPerGrid:10,maxFavors:100,maxRecents:20};
};


dojo.provide("dojo.collections.Collections");
dojo.collections={Collections:true};
dojo.collections.DictionaryEntry=function(k,v){
this.key=k;
this.value=v;
this.valueOf=function(){
return this.value;
};
this.toString=function(){
return this.value;
};
};
dojo.collections.Iterator=function(a){
var _4=a;
var _5=0;
this.atEnd=(_5>=_4.length-1);
this.current=_4[_5];
this.moveNext=function(){
if(++_5>=_4.length){
this.atEnd=true;
}
if(this.atEnd){
return false;
}
this.current=_4[_5];
return true;
};
this.reset=function(){
_5=0;
this.atEnd=false;
this.current=_4[_5];
};
};
dojo.collections.DictionaryIterator=function(_6){
var _7=[];
for(var p in _6){
_7.push(_6[p]);
}
var _9=0;
this.atEnd=(_9>=_7.length-1);
this.current=_7[_9]||null;
this.entry=this.current||null;
this.key=(this.entry)?this.entry.key:null;
this.value=(this.entry)?this.entry.value:null;
this.moveNext=function(){
if(++_9>=_7.length){
this.atEnd=true;
}
if(this.atEnd){
return false;
}
this.entry=this.current=_7[_9];
if(this.entry){
this.key=this.entry.key;
this.value=this.entry.value;
}
return true;
};
this.reset=function(){
_9=0;
this.atEnd=false;
this.current=_7[_9]||null;
this.entry=this.current||null;
this.key=(this.entry)?this.entry.key:null;
this.value=(this.entry)?this.entry.value:null;
};
};


dojo.provide("dojo.collections.Queue");
dojo.collections.Queue=function(_1){
var q=[];
if(_1){
q=q.concat(_1);
}
this.count=q.length;
this.clear=function(){
q=[];
this.count=q.length;
};
this.clone=function(){
return new dojo.collections.Queue(q);
};
this.contains=function(o){
for(var i=0;i<q.length;i++){
if(q[i]==o){
return true;
}
}
return false;
};
this.copyTo=function(_5,i){
_5.splice(i,0,q);
};
this.dequeue=function(){
var r=q.shift();
this.count=q.length;
return r;
};
this.enqueue=function(o){
this.count=q.push(o);
};
this.getIterator=function(){
return new dojo.collections.Iterator(q);
};
this.peek=function(){
return q[0];
};
this.toArray=function(){
return [].concat(q);
};
};


dojo.require("dojo.collections.Queue");
dojo.provide("radius.utils");
dojo.provide("radius.utils.DisconnectHandler");
dojo.provide("radius.utils.LoadingBar");
radius.insertCssFile=dojo.style.insertCssFile;
radius.byId=function(_1){
return document.getElementById(_1);
};
radius.handleError=function(_2,_3,_4,_5){
radius.debug("Error in application at - "+_4+" - Detail: "+_3);
var _6=(_2=="default"?"An error has occurred in the system.  Please try again.":_2);
if(_5!="default"){
radius.windows.openModalSimpleWindow({width:300,height:140,closeAction:_5,caption:"radiusIM Alert",body:_2});
}else{
radius.windows.openModalSimpleWindow({width:300,height:140,caption:"radiusIM Alert",body:_2});
}
};
radius.prepareText=function(_7,_8){
var _9=_7.match(/\$\{([^\}]+)\}/g);
if(_9){
for(var i=0;i<_9.length;i++){
var _b=_9[i];
var _c=_b.substring(2,_b.length-1);
_7=_7.replace(_b,_8[_c]);
}
}
return _7;
};
radius.prepareHTML=function(_d,_e){
return radius.prepareText(dojo.byId(_d).innerHTML,_e);
};
radius.CloneObject=function(_f){
for(i in _f){
if(typeof _f[i]=="object"){
this[i]=new radius.CloneObject(_f[i]);
}else{
this[i]=_f[i];
}
}
};
radius.clone=function(_10){
return new radius.CloneObject(_10);
};
radius.mixin=function(obj,_12){
for(var x in _12){
obj[x]=_12[x];
}
};
radius.extend=function(_14,_15){
radius.mixin(_14.prototype,_15);
};
radius.inherits=function(_16,_17){
if(typeof _17!="function"){
dojo.raise("superclass: "+_17+" broken");
}
_16.prototype={};
radius.extend(_16,_17.prototype);
_16.prototype.constructor=_16;
_16.superclass=_17.prototype;
};
radius.isNull=function(val){
return val==undefined||val==null;
};
radius.isNotNull=function(val){
return val!=undefined&&val!=null;
};
radius.isEmptyStr=function(str){
return str==null||str==undefined||dojo.string.trim(str).length==0;
};
radius.isNotEmptyStr=function(str){
return str!=null&&str!=undefined&&dojo.string.trim(str).length>0;
};
radius.obj2str=function(o,_1d,_1e){
if(!_1e){
_1e=1;
}
if(_1d&&_1e>_1d){
return "<LIMIT>";
}
if(o==null){
return "null";
}else{
if(o.constructor==String){
return escapeJSONString(o);
}else{
if(o.constructor==Number){
return o.toString();
}else{
if(o.constructor==Boolean){
return o.toString();
}else{
if(o.constructor==Date){
return "{toString: \""+o.toString()+"\", time: "+o.valueOf()+"}";
}else{
if(o.constructor==Array){
if(_1d&&_1e==_1d){
return "ARRAY<length = "+o.length+">";
}else{
var v=[];
for(var i=0;i<o.length;i++){
v.push(radius.obj2str(o[i],_1d,_1e+1));
}
return "["+v.join(", ")+"]";
}
}else{
var v=[];
for(attr in o){
if(o[attr]==null){
v.push("\""+attr+"\": null");
}else{
if(typeof o[attr]=="function"){
}else{
v.push(escapeJSONString(attr)+": "+radius.obj2str(o[attr],_1d,_1e+1));
}
}
}
return "{"+v.join(", ")+"}";
}
}
}
}
}
}
};
radius.obj2txt=radius.obj2str;
radius.windowAlert=window.alert;
radius.alert=function(_21){
if(dojo.render.html.ie||dojo.render.html.safari){
radius.windowAlert("radiusIM Alert:\n"+_21);
}else{
radius.windowAlert.call(window,"radiusIM Alert:\n"+_21);
}
};
window.alert=radius.alert;
radius.debug=function(p){
if(!GLOBAL_CONFIG.debug){
return;
}
var d=new Date();
var t=d.getHours()+":"+d.getMinutes()+":"+d.getSeconds()+"."+d.getMilliseconds();
dojo.debug.call(dojo,"["+t+"]"+p);
};
radius.debugException=function(msg,ex,_27){
var _28=msg+":\n";
if(ex.code){
var _29="";
if(ex.code){
switch(ex.code){
case JSONRpcClient.Exception.CODE_ERR_PARSE:
_29="CODE_ERR_PARSE";
break;
case JSONRpcClient.Exception.CODE_ERR_NOMETHOD:
_29="CODE_ERR_NOMETHOD";
break;
case JSONRpcClient.Exception.CODE_ERR_UNMARSHALL:
_29="CODE_ERR_UNMARSHALL";
break;
case JSONRpcClient.Exception.CODE_ERR_MARSHALL:
_29="CODE_ERR_MARSHALL";
break;
case JSONRpcClient.Exception.CODE_REMOTE_EXCEPTION:
_29="CODE_REMOTE_EXCEPTION";
break;
}
_28=_28+_29+"["+ex.code+"]: ";
}
_28=_28+ex.name+"\n"+ex.message;
if(ex.name!="JSONRpcClientException"){
_28=_28+"\nStack trace:\n"+ex.javaStack;
}
}else{
_28=ex.name+": "+ex.message;
}
radius.debug(_28);
if(!_27){
window.alert(_28);
}
};
radius.radiusUri=function(uri){
return new dojo.uri.Uri(dojo.hostenv.getBaseScriptUri()+GLOBAL_CONFIG.radiusPrefix+"/",uri);
};
radius.cssUri=function(uri){
return new dojo.uri.Uri(dojo.hostenv.getBaseScriptUri()+"../css/",uri);
};
radius.imageUri=function(uri){
return new dojo.uri.Uri(dojo.hostenv.getBaseScriptUri()+"../images/",uri);
};
radius.setTimeout=function(_2d,_2e){
if(dojo.lang.isString(_2d)){
_2d=window[_2d];
}
if(arguments.length>2){
var _2f;
if(arguments.slice){
_2f=arguments.slice(2);
}else{
_2f=[];
for(var n=2;n<arguments.length;n++){
_2f.push(arguments[n]);
}
}
return setTimeout(function(){
_2d.apply(_2d,_2f);
_2d=_2e=_2f=undefined;
},_2e);
}else{
return setTimeout(_2d,_2e);
}
};
radius.setTimeoutM=function(obj,_32,_33){
if(dojo.lang.isString(_32)){
_32=obj[_32];
}
if(arguments.length>3){
var _34;
if(arguments.slice){
_34=arguments.slice(3);
}else{
_34=[];
for(var n=3;n<arguments.length;n++){
_34.push(arguments[n]);
}
}
return setTimeout(function(){
_32.apply(obj,_34);
obj=_32=_33=_34=undefined;
},_33);
}else{
return setTimeout(function(){
_32.call(obj);
obj=_32=_33=undefined;
},_33);
}
};
radius.setInterval=function(_36,_37){
if(dojo.lang.isString(_36)){
_36=window[_36];
}
if(arguments.length>2){
var _38;
if(arguments.slice){
_38=arguments.slice(2);
}else{
_38=[];
for(var n=2;n<arguments.length;n++){
_38.push(arguments[n]);
}
}
return setInterval(function(){
_36.apply(_36,_38);
_37=undefined;
},_37);
}else{
return setInterval(_36,_37);
}
};
radius.setIntervalM=function(obj,_3b,_3c){
if(dojo.lang.isString(_3b)){
_3b=obj[_3b];
}
if(arguments.length>3){
var _3d;
if(arguments.slice){
_3d=arguments.slice(3);
}else{
_3d=[];
for(var n=3;n<arguments.length;n++){
_3d.push(arguments[n]);
}
}
return setInterval(function(){
_3b.apply(obj,_3d);
_3c=undefined;
},_3c);
}else{
return setInterval(function(){
_3b.call(obj);
_3c=undefined;
},_3c);
}
};
JSONRpcClient.toplevel_ex_handler=function(ex){
radius.debugException("JSON RPC EXCEPTION:",ex);
};
JSONRpcClient.max_req_active=10;
radius.getParams=function(){
var idx=document.URL.indexOf("?");
var _41=new Array();
if(idx!=-1){
var _42=document.URL.substring(idx+1,document.URL.length).split("&");
for(var i=0;i<_42.length;i++){
nameVal=_42[i].split("=");
_41[unescape(nameVal[0])]=unescape(nameVal[1]);
}
}
return _41;
};
function _proxyAsyncCallback_callback(_44,_45){
if(_45!=null&&this.handler.isDisconnectedError(_45)){
radius.debug("Got disconnect exception in async call");
this.handler.errorOccured=true;
this.handler.savedAsyncCalls.enqueue({proxyCall:this.proxyCall,args_:this.sourceArgs});
this.handler.handleDisconnect();
}else{
this.sourceHandler(_44,_45);
}
}
function _ping_load(_46,_47,evt){
if(_47.result=="success"){
radius.debug("ping success.");
this.pingNumber=0;
radius.setTimeoutM(this.dhandler,"connectionRestored",10);
}else{
radius.debug("ping error: "+_47);
this.dhandler.onPingError();
}
this.dhandler=undefined;
}
function _ping_error(){
radius.debug("ping error.");
this.dhandler.onPingError();
this.dhandler=undefined;
}
radius.utils.DisconnectHandler=function(_49){
this.jsonrpc=_49;
this.connected=false;
this.inHandling=false;
this.errorOccured=false;
this.savedAsyncCalls=new dojo.collections.Queue();
this.pingNumber=0;
this.createReconnectOrCancelWindow();
};
radius.extend(radius.utils.DisconnectHandler,{constants:{NUM_OF_RETRIES:3,DELAY_SECONDS:3,PING_URL:"/ping.js"},loggedIn:function(){
},loggedOut:function(){
},doProxyCall:function(_4a,_4b){
if(_4b.length>0&&dojo.lang.isFunction(_4b[0])){
if(this.errorOccured==true){
radius.debug("Storing async call for re-exec");
this.savedAsyncCalls.enqueue({proxyCall:_4a,args_:_4b});
}else{
try{
var _4c={handler:this,sourceHandler:_4b[0],sourceArgs:_4b,proxyCall:_4a,callback:_proxyAsyncCallback_callback};
var _4d=[dojo.lang.hitch(_4c,"callback")];
for(i=1;i<_4b.length;i++){
_4d[i]=_4b[i];
}
return _4a.what.apply(_4a.obj,_4d);
}
catch(e){
if(this.isDisconnectedError(e)){
this.errorOccured=true;
this.savedAsyncCalls.enqueue({proxyCall:_4a,args_:_4b});
this.handleDisconnect();
}else{
throw e;
}
}
}
}else{
if(this.errorOccured==true){
throw "Program ERROR. MUST check for error if doing SYNC JSONRPC call";
}
try{
return _4a.what.apply(_4a.obj,_4b);
}
catch(e){
if(this.isDisconnectedError(e)){
this.errorOccured=true;
this.handleDisconnect();
}
throw e;
}
}
},createProxy:function(){
var _4e=this.jsonrpc;
var _4f=this;
var _50={};
for(i in {"logic":true,"security":true,"profile":true,"photo":true,"signup":true,"roster":true,"locals":true,"roster":true,"location":true,"IM":true,"lookups":true}){
var obj=_4e[i];
var _52={_proxy:_50,_name:i,_sourceObj:obj};
_50[i]=_52;
for(j in obj){
var _53=obj[j];
if(dojo.lang.isFunction(_53)){
var _54=j;
var _55={what:_53,obj:obj,doCall:function(){
return _4f.doProxyCall(this,arguments);
}};
_52[j]=dojo.lang.hitch(_55,_55.doCall);
}
}
}
return _50;
},isDisconnectedError:function(e){
return (e.code==JSONRpcClient.Exception.CODE_ERR_CLIENT)||(e.code>=500);
},handleDisconnect:function(ex){
if(this.inHandling){
return;
}
this.inHandling=true;
try{
this.win=radius.windows.getInfoWindow();
this.win.open();
}
catch(e){
alert("Cannot create window !"+e);
}
this.startPing();
},connectionRestored:function(){
try{
try{
this.jsonrpc.logic.ping();
}
catch(e){
this.errorOccured=true;
this.completelyDisconnected("You are disconnected from the system.");
return;
}
}
catch(e){
}
this.errorOccured=false;
this.inHandling=false;
if(this.win){
this.win.close();
this.win=null;
}
var _58=this.savedAsyncCalls;
radius.debug("Re-executing stored async calls");
while((this.errorOccured==false)&&(_58.count>0)){
var _59=_58.dequeue();
this.doProxyCall(_59.proxyCall,_59.args_);
}
},startPing:function(){
radius.setTimeoutM(this,"ping",this.constants.DELAY_SECONDS*1000);
},ping:function(){
this.pingNumber++;
var _5a={dhandler:this,mimetype:"text/javascript",url:(this.constants.PING_URL+"?t="+new Date().valueOf()+"-"+Math.random()),transport:"XMLHTTPTransport",method:"get",load:_ping_load,error:_ping_error};
dojo.io.bind(_5a);
},onPingError:function(){
if(this.pingNumber>=this.constants.NUM_OF_RETRIES){
this.reconnectOrCancelWindow.open();
}else{
this.startPing();
}
},completelyDisconnected:function(msg){
radius.windows.openModalSimpleWindow({width:300,height:140,closeAction:dojo.lang.hitch(this,"onDismissCompletelyDisconnected"),caption:"radiusIM Alert",body:msg});
},onDismissCompletelyDisconnected:function(){
window.location.replace("/");
},createReconnectOrCancelWindow:function(){
var _5c=this;
this.reconnectOrCancelWindow=radius.windows.createModalSimpleWindow({width:225,height:128,align:"right",caption:"Warning",body:"<span class='defWinMessageClass'>Connection to the radiusIM server has been lost.</span>",btns:[{name:"reconnect72x21",width:72,height:18,styles:{marginRight:2},onClick:function(win){
win.close();
_5c.pingNumber=0;
_5c.startPing();
}},{name:"cancelTiny48x18",width:48,height:18,onClick:function(win){
win.close();
_5c.completelyDisconnected("You are disconnected from the system.");
}}]});
this.reconnectOrCancelWindow.close();
}});
radius.utils.LoadingBar=function(ID,_60){
this.ID=ID;
this.counter=1;
};
radius.extend(radius.utils.LoadingBar,{constants:{SHOW_BAR_DELAY:0,CALL_FUNCTION_DELAY:100},showBar:function(){
if(this.counter++==0){
this.doShowBar();
}
},hideBar:function(){
if(this.counter>0&&--this.counter==0){
this.doHideBar();
}
},doShowBar:function(){
this.setStyle(this.ID,"");
},doHideBar:function(){
this.setStyle(this.ID,"none");
},setStyle:function(ID,_62){
radius.byId(ID).style.display=_62;
},callWithBar:function(_63,_64,_65,_66,_67,_68){
if(this.counter){
this.showBar();
var ex=null;
try{
_63(_64,_65,_66,_67,_68);
}
catch(e){
ex=e;
}
this.hideBar();
if(ex){
throw ex;
}
}else{
setTimeout(new Function("if(radius.loadingBar) radius.loadingBar.showBar()"),this.constants.SHOW_BAR_DELAY);
setTimeout(function(){
var ex=null;
try{
_63(_64,_65,_66,_67,_68);
}
catch(e){
ex=e;
}
if(radius.loadingBar){
radius.loadingBar.hideBar();
}
_63=_64=_65=_66=_67=_68=undefined;
if(ex){
throw ex;
}
},this.constants.CALL_FUNCTION_DELAY);
}
}});
radius.utils.TimeCounter=function(){
};
radius.extend(radius.utils.TimeCounter,{stime:0,etime:0,start:function(){
this.stime=new Date().valueOf();
return this;
},end:function(){
this.etime=new Date().valueOf();
return this;
},res:function(){
var d=this.etime-this.stime;
return d+"msec = "+(d/1000)+"sec";
}});
radius.utils.testm=function(msg,_6d){
var c=new radius.utils.TimeCounter();
dojo.hostenv.println(msg+" {");
debug_indent++;
c.start();
_6d();
c.end();
debug_indent--;
dojo.hostenv.println("} => "+c.res());
return c;
};
radius.encodeURL=function(url,_70){
if(radius.sessionid){
var _71=url+";jsessionid="+radius.sessionid;
if(_70){
var _72="?";
for(i in _70){
_72=_72+"&"+i+"="+_70[i];
}
_71=_71+_72;
}
return _71;
}else{
radius.handleError({userMsg:"default",detailMsg:"ERROR: No session initialized yet !",applicationOrigin:"radius.encodeURL",onDialogDismissAction:"default"});
}
};
radius.encrypt=function(s){
if(s==undefined||!s||!radius.rsaPublicKey){
return null;
}
var enc;
if(s.length>radius.rsaMaxLength){
enc=[];
var l=s.length;
for(var i=0;i<l;i+=radius.rsaMaxLength){
var end=i+radius.rsaMaxLength;
if(i+radius.rsaMaxLength>=l){
end=l;
}
enc.push(radius.rsaPublicKey.encrypt(s.substring(i,end)));
}
}else{
enc=[radius.rsaPublicKey.encrypt(s)];
}
return enc;
};
radius.array2string=function(a){
if((a instanceof Array)||(typeof (a)=="array")){
var s="";
var l=a.length;
for(var i=0;i<l;++i){
s+=a[i]+"_";
}
return s;
}
};
radius.string2array=function(s){
if(!s){
return null;
}
var a=[];
var i=0;
var l=s.length;
while(true){
var _80=s.indexOf("_",i);
if(_80!=-1){
a.push(s.substring(i,_80));
if(_80+1<l){
i=_80+1;
}else{
break;
}
}else{
a.push(s);
break;
}
}
return a;
};
radius.getLastLocation=function(_81){
var p=_81+"_"+radius.data.Const.LocationsCookie;
var _83=null;
if(radius.generalSettings&&radius.generalSettings.saveLocation==true){
var c=radius.string2array(dojo.io.cookie.getCookie(p+"_last_enc"));
if(c){
var dec=radius.jsonrpc.security.decrypt(c);
if(dec){
_83=eval("data = "+dec);
}
}
}else{
_83=radius.lastLocation;
}
if(!_83){
var l=radius.jsonrpc.location.getOfflineUserLocation(_81);
_83={latitude:l.latitude,longitude:l.longitude};
}
return _83;
};
radius.saveLastLocation=function(_87,_88){
if(radius.generalSettings&&radius.generalSettings.saveLocation==true){
var p=_87+"_"+radius.data.Const.LocationsCookie;
dojo.io.cookie.setCookie(p+"_last_enc",radius.array2string(radius.encrypt(toJSON(_88))),radius.data.Const.CookiesStoreDays,null,null,null,true);
}else{
radius.lastLocation=_88;
}
};
radius.saveShowOnStartup=function(_8a,_8b){
};
radius.getLocations=function(_8c){
var p=_8c+"_"+radius.data.Const.LocationsCookie;
var _8e=[];
var c=radius.string2array(dojo.io.cookie.getCookie(p+"_loc_enc"));
if(c){
var dec=radius.jsonrpc.security.decrypt(c);
if(dec){
_8e=eval("data = "+dec);
}
}
var _91=null;
if(radius.generalSettings&&radius.generalSettings.saveLocation==true){
c=radius.string2array(dojo.io.cookie.getCookie(p+"_last_enc"));
if(c){
var dec=radius.jsonrpc.security.decrypt(c);
if(dec){
_91=eval("data = "+dec);
}
}
}
var _92=false;
if(!_91){
var l=radius.jsonrpc.location.getOfflineUserLocation(_8c);
_91={latitude:l.latitude,longitude:l.longitude};
_92=(_91.latitude!=null&&_91.longitude!=null)?true:false;
}
var _94=dojo.io.cookie.getObjectCookie(p+"_show");
if(_94==null||_94==""||_94==undefined){
_94=radius.jsonrpc.location.isShowMyLocationOnStartup();
}
return {locs:_8e,last:_91,show:_94,store:_92};
};
radius.saveLocations=function(_95,_96){
var p=_95+"_"+radius.data.Const.LocationsCookie;
var l=_96.locs.length;
dojo.io.cookie.setCookie(p+"_loc_enc",radius.array2string(radius.encrypt(toJSON(_96.locs))),radius.data.Const.CookiesStoreDays,null,null,null,true);
if(radius.generalSettings&&radius.generalSettings.saveLocation==true){
if(_96.last){
dojo.io.cookie.setCookie(p+"_last_enc",radius.array2string(radius.encrypt(toJSON(_96.last))),radius.data.Const.CookiesStoreDays,null,null,null,true);
}
}else{
radius.lastLocation=_96.last;
}
};
radius.deleteLocations=function(_99){
var p=_99+"_"+radius.data.Const.LocationsCookie;
dojo.io.cookie.deleteCookie(p+"_loc_enc");
};
radius._createSession=function(_9b,_9c){
radius.debug("radius._createSession: "+_9b);
_9c();
};
radius._sessionValidate=function(_9d,_9e){
radius.debug("radius.sessionValidate: "+_9d);
if(!_9d){
radius.onLoad(false,radius._createSession,_9e);
}else{
_9e();
}
};
function _validateSession_load(_9f,_a0,evt){
if(_a0.result==false){
radius.debug("radius.validateSession.bindParams.load: session invalid");
}else{
radius.debug("radius.validateSession.bindParams.load: session valid");
}
radius._sessionValidate(_a0.result,this.funcParam);
this.funcParam=undefined;
}
function _validateSession_error(_a2,_a3){
radius.debug("radius.validateSession.bindParams.error: "+_a3);
radius._sessionValidate(false,this.funcParam);
this.funcParam=undefined;
}
function _validateSession_handler(_a4,_a5,evt){
}
radius.validateSession=function(_a7){
var _a8={funcParam:_a7,url:radius.encodeURL("/validatesession"),mimetype:"text/javascript",transport:"XMLHTTPTransport",method:"post",content:{},load:_validateSession_load,error:_validateSession_error,handler:_validateSession_handler};
dojo.io.bind(_a8);
};
radius.getWindow=function(e){
if(e.contentWindow!=undefined){
return e.contentWindow;
}else{
if(e.window!=undefined){
return e.window;
}
}
return null;
};


dojo.provide("radius.lang");
radius.lang.mixinProps=function(_1,_2,_3){
var p={};
for(var i=0;i<_3.length;i++){
var _6=_3[i];
if(_2[_6]!=undefined){
p[_6]=_2[_6];
}
}
dojo.lang.mixin(_1,p);
};


dojo.provide("radius.anim");
dojo.provide("radius.anim.Anim");
radius.anim.Anim=function(_1,_2){
if(_1){
this.duration=_1;
}
if(_2){
this.rate=_2;
}
this._cycleFunc=dojo.lang.hitch(this,"_cycle");
};
radius.extend(radius.anim.Anim,{duration:500,rate:25,percent:0,cource:0,_startTime:0,_endTime:0,_timerid:null,goForward:function(_3){
this.go(1,_3);
},goBack:function(_4){
this.go(-1,_4);
},stop:function(){
if(this._timerid!=null){
clearTimeout(this._timerid);
this._timerid=null;
}
},resume:function(){
this.go(this.cource);
},complete:function(_5){
this.stop();
this.percent=_5;
if(this.onEnd){
if(!this.onEnd(_5)){
return;
}
}
},go:function(_6,_7){
if(this._timerid!=null){
clearTimeout(this._timerid);
this._timerid=null;
}
if(_7!=undefined){
if(_7<0){
_7=0;
}else{
if(_7>1){
_7=1;
}
}
this.percent=_7;
}
this.cource=0;
if(_6>0){
if(this.percent<1){
var _8=new Date().valueOf();
this._startTime=_8-this.duration*this.percent;
this._endTime=this._startTime+this.duration;
var _9=this._endTime-_8;
if(_9>0){
this.cource=1;
if(this.onStart&&this.percent==0){
if(!this.onStart(0)){
return;
}
}
if(this.onAnim){
if(!this.onAnim(this.percent)){
return;
}
}
this._timerid=setTimeout(this._cycleFunc,Math.min(this.rate,_9));
return;
}
}
this.percent=1;
if(this.onAnim){
if(!this.onAnim(1)){
return;
}
}
if(this.onEnd){
if(!this.onEnd(1)){
return;
}
}
}else{
if(_6<0){
if(this.percent>0){
var _8=new Date().valueOf();
var _a=1-this.percent;
this._startTime=_8-this.duration*_a;
this._endTime=this._startTime+this.duration;
var _9=this._endTime-_8;
if(_9>0){
this.cource=-1;
if(this.onStart&&_a==0){
if(!this.onStart(1)){
return;
}
}
if(this.onAnim){
if(!this.onAnim(this.percent)){
return;
}
}
this._timerid=setTimeout(this._cycleFunc,Math.min(this.rate,_9));
return;
}
}
this.percent=0;
if(this.onAnim){
if(!this.onAnim(0)){
return;
}
}
if(this.onEnd){
if(!this.onEnd(0)){
return;
}
}
}else{
}
}
},_cycle:function(){
if(this._timerid!=null&&this.cource!=0){
clearTimeout(this._timerid);
this._timerid=null;
}
if(this.cource>0){
var _b=new Date().valueOf();
var _c=this._endTime-_b;
if(_c>0){
this.percent=(_b-this._startTime)/this.duration;
if(this.percent<1){
if(this.onAnim){
if(!this.onAnim(this.percent)){
return;
}
}
this._timerid=setTimeout(this._cycleFunc,Math.min(this.rate,_c));
return;
}
}
this.cource=0;
this.percent=1;
if(this.onAnim){
if(!this.onAnim(1)){
return;
}
}
if(this.onEnd){
if(!this.onEnd(1)){
return;
}
}
}else{
if(this.cource<0){
var _b=new Date().valueOf();
var _c=this._endTime-_b;
if(_c>0){
this.percent=1-(_b-this._startTime)/this.duration;
if(this.percent>0){
if(this.onAnim){
if(!this.onAnim(this.percent)){
return;
}
}
this._timerid=setTimeout(this._cycleFunc,Math.min(this.rate,_c));
return;
}
}
this.cource=0;
this.percent=0;
if(this.onAnim){
if(!this.onAnim(0)){
return;
}
}
if(this.onEnd){
if(!this.onEnd(0)){
return;
}
}
}else{
}
}
}});


dojo.provide("radius.io.cookie");
radius.io.cookie.getCookie=function(_1){
var _2=_1+"=";
var _3=_2.length;
var _4=document.cookie.length;
var i=0;
while(i<_4){
var j=i+_3;
if(document.cookie.substring(i,j)==_2){
var _7=document.cookie.indexOf(";",j);
if(_7==-1){
_7=document.cookie.length;
}
return unescape(document.cookie.substring(j,_7));
}
i=document.cookie.indexOf(" ",i)+1;
if(i==0){
break;
}
}
return null;
};


dojo.provide("radius.data");
radius.data.taskBar={winWidth:150,winHeight:23,effectDuration:300};
radius.data.Const={CurrentFormCookie:"currentForm",CookiesStoreDays:15,SignUpEmailValue:"valid e-mail is required for activation",SignUpBirthMonth:"Month",SignUpBirthDay:"Day",SignUpBirthYear:"Year",UsernameCookie:"radiusim.username",LocationsCookie:"radiusim.locations"};
radius.data.RSAKey={RSAPubKey_N:"b3f80a6b220fdaa6c08dc4dbccf1c76fdb0acfd3e5fee420797838c1c8a76849e69acdb0ebb55318f488a968335dbe0e0730f8e927ff0212c8715a5aef5bffa722b17902100e12c40b2cf65e15ea603063630887acccb9ba841fb4809b6bfbb5f61a001b7307b7fc528c51bd111e7be4082999e61fef165c4ad1503ece7d566b",RSAPubKey_E:"10001"};
radius.data.HeardFrom=["Friend/Word of Mouth","News","Search","Advertisement"];
radius.data.Month={"01":"January","02":"February","03":"March","04":"April","05":"May","06":"June","07":"July","08":"August","09":"September","10":"October","11":"November","12":"December"};
radius.data.BirthYear={older:1926,newer:1996};
radius.data.defaultGroupNames={"radius":"radiusIM Friends","aol":"AOL Friends","msn":"MSN Friends","yahoo":"Yahoo Friends","gtalk":"Google Friends"};
radius.data.legacyTypeNames={"radius":"radiusIM","aol":"AOL","msn":"MSN","yahoo":"Yahoo","gtalk":"Google Talk"};
radius.data.legacyTypes={aol:{icon:"images/logo/aol.gif?version=RELEASE_0_27&build=200608281106",caption:"AOL",forgotPass:"https://opr.my.screenname.aol.com/_cqr/opr/opr.psp"},msn:{icon:"images/logo/msn.gif?version=RELEASE_0_27&build=200608281106",caption:"MSN",forgotPass:"https://accountservices.msn.com/uiresetpw.srf"},yahoo:{icon:"images/logo/yahoo.gif?version=RELEASE_0_27&build=200608281106",caption:"Yahoo",forgotPass:"http://edit.yahoo.com/config/eval_forgot_pw"},jabber:{icon:"images/logo/google.gif?version=RELEASE_0_27&build=200608281106",caption:"Google Talk",forgotPass:"https://www.google.com/accounts/ForgotPasswd"}};
radius.data.getCountries=function(){
if(radius.data.Country==undefined){
radius.data.Country=radius.jsonrpc.lookups.getCountries();
}
return radius.data.Country;
};


dojo.provide("dojo.collections.Dictionary");
dojo.collections.Dictionary=function(_1){
var _2={};
this.count=0;
this.add=function(k,v){
_2[k]=new dojo.collections.DictionaryEntry(k,v);
this.count++;
};
this.clear=function(){
_2={};
this.count=0;
};
this.clone=function(){
return new dojo.collections.Dictionary(this);
};
this.contains=this.containsKey=function(k){
return (_2[k]!=null);
};
this.containsValue=function(v){
var e=this.getIterator();
while(!e.atEnd){
if(e.value==v){
return true;
}
e.moveNext();
}
return false;
};
this.getKeyList=function(){
var _8=[];
var e=this.getIterator();
while(!e.atEnd){
_8.push(e.key);
e.moveNext();
}
return _8;
};
this.getValueList=function(){
var _a=[];
var e=this.getIterator();
while(!e.atEnd){
_a.push(e.value);
e.moveNext();
}
return _a;
};
this.item=function(k){
return _2[k];
};
this.getIterator=function(){
return new dojo.collections.DictionaryIterator(_2);
};
this.remove=function(k){
delete _2[k];
this.count--;
};
if(_1){
var e=_1.getIterator();
while(!e.atEnd){
this.add(e.key,e.value);
e.moveNext();
}
}
};


dojo.provide("radius.image");
dojo.provide("radius.image.ImagesPool");
radius.image.ImagesPool=function(_1){
this.maxImages=_1>0?_1:65536;
this.order=new dojo.collections.Queue();
this.pool=new dojo.collections.Dictionary();
};
radius.extend(radius.image.ImagesPool,{addImage:function(_2){
var _3=this.pool.item(_2);
if(!_3){
var _4=dojo.render.html.safari?document.createElement("img"):new Image();
_4.src=_2;
_4.imageSrc=_2;
return this.addImageObj(_4);
}
return _3.value;
},addImageObj:function(_5){
var _6=_5.imageSrc?_5.imageSrc:_5.src;
if(this.order.count>this.maxImages){
var _7=this.order.dequeue();
this.pool.remove(_7);
}
this.order.enqueue(_6);
this.pool.add(_6,_5);
return _5;
},getImage:function(_8){
var _9=this.pool.item(_8);
return _9?_9.value:this.addImage(_8);
},getSize:function(){
return this.order.count;
},isLoaded:function(_a){
var _b=this.pool.item(_a);
return _b?_b.value.complete:false;
},clear:function(){
this.order.clear();
this.pool.clear();
}});
radius.image.pool=new radius.image.ImagesPool();
radius.image.blankUrl="/images/x.gif?version=RELEASE_0_27&build=200608281106";
radius.image.blankImage=radius.image.pool.getImage(radius.image.blankUrl);
radius.image.loadImage=function(_c){
return radius.image.pool.addImage(_c);
};
radius.image.createImageNode=function(){
return dojo.render.html.safari?document.createElement("img"):new Image();
};
radius.image.setImage=function(_d,_e){
var _f=_d?_d.src:null;
var _10=radius.image.pool.getImage(_e);
var _11=_10.src;
if((!_d.imageSrc||!_10.imageSrc||_d.imageSrc!=_10.imageSrc)){
_d.src=_11;
_d.imageSrc=_10.imageSrc;
}
};
radius.image.makeNode=function(_12){
var _13=radius.image.pool.getImage(_12);
return _13.cloneNode(false);
};
radius.image.makeBlankNode=function(){
return radius.image.blankImage.cloneNode(false);
};
radius.image.makePngNode=function(_14,_15,_16){
if(_14==radius.image.blankUrl){
return radius.image.makeBlankNode();
}
if(dojo.render.html.ie){
radius.image.loadImage(_14);
var _17=radius.image.makeBlankNode();
if(_16){
this.setSize(_17,_16);
}
if(!_15){
_17.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+_14+"')";
}else{
_17.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+_14+"', sizingMethod='"+_15+"')";
}
return _17;
}else{
return radius.image.makeNode(_14);
}
};
radius.image.makeOnePiece=function(_18,_19,pos,_1b){
var url=_19.url||_19.imageUrl;
if(!pos){
pos={};
}
if(!dojo.lang.has(pos,"width")&&dojo.lang.has(_19,"w")){
pos.width=_19.w;
}
if(!dojo.lang.has(pos,"height")&&dojo.lang.has(_19,"h")){
pos.height=_19.h;
}
var _1d=radius.image.makePngNode(url,_1b);
radius.style.setStyles(_1d,pos);
_18.appendChild(_1d);
_19.node=_1d;
return _1d;
};
radius.image.makePiece=function(_1e,_1f,pos,_21){
var _22={};
var _23=_1f.urls;
if(_23){
if(!pos){
pos={};
}
if(!dojo.lang.has(pos,"width")&&dojo.lang.has(_1f,"w")){
pos.width=_1f.w;
}
if(!dojo.lang.has(pos,"height")&&dojo.lang.has(_1f,"h")){
pos.height=_1f.h;
}
for(var _24 in _23){
var _25=radius.image.makePngNode(_23[_24],_21);
radius.style.setStyles(_25,pos);
_1e.appendChild(_25);
_22[_24]=_25;
}
}
_1f.nodes=_22;
return _22;
};
radius.image.showOne=function(_26,_27){
for(var n in _26.nodes){
var _29=_26.nodes[n];
if(n==_27){
dojo.html.show(_29);
}else{
dojo.html.hide(_29);
}
}
};
radius.image.createX=function(src,_2b,_2c,_2d){
var _2e=document.createElement("img");
if(_2d){
_2e.style.cssText=_2d;
}
_2b.appendChild(_2e);
if(dojo.render.html.ie&&src.lastIndexOf(".png")){
_2e.src=this.blankUrl;
_2e.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+src+"'"+(_2c?(", sizingMethod='"+_2c+"')"):")");
return _2e;
}
_2e.src=src;
return _2e;
};
radius.image.setSrcX=function(_2f,src,_31){
if(dojo.render.html.ie){
var f=_2f.filters["DXImageTransform.Microsoft.AlphaImageLoader"];
if(src.lastIndexOf(".png")>0){
if(f){
try{
f.src=src;
if(!f.Enabled){
_2f.src=this.blankUrl;
f.Enabled=true;
}
if(_31){
f.sizingMethod=_31;
}
}
catch(e){
radius.debug("<b>Exeption!</b>");
}
}else{
_2f.src=this.blankUrl;
_2f.style.filter+=" progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+src+"'"+(_31?(", sizingMethod='"+_31+"')"):")");
}
return;
}else{
if(f){
f.Enabled=false;
}
}
}
_2f.src=src;
};
radius.image.setSize=function(_33,_34){
_33.width=_34.width;
_33.height=_34.height;
};


dojo.provide("radius.style");
radius.style.setStyles=function(_1,_2){
for(var _3 in _2){
var _4=_2[_3];
_4=isNaN(_4)?_4:(_4+"px");
_1.style[_3]=_4;
}
};
radius.style.getTotalOffset=function(_5,_6,_7){
var _8,coord;
if(_7=="top"){
_8="offsetTop";
coord="x";
}else{
_8="offsetLeft";
coord="y";
}
var _9=0;
if(_5["offsetParent"]){
var _a=document.body;
if(dojo.render.html.safari&&_5.style.getPropertyValue("position")=="absolute"&&_5.parentNode==_a){
}else{
_a=_a.parentNode;
}
do{
_9+=_5[_8];
_5=_5.offsetParent;
}while(_5!=_6&&_5!=_a&&_5!=null);
}else{
if(_5[coord]){
_9+=_5[coord];
}
}
return _9;
};
radius.style.totalOffsetLeft=function(_b,_c){
return radius.style.getTotalOffset(_b,_c,"left");
};
radius.style.getAbsoluteX=radius.style.totalOffsetLeft;
radius.style.totalOffsetTop=function(_d,_e){
return radius.style.getTotalOffset(_d,_e,"top");
};
radius.style.getAbsoluteY=radius.style.totalOffsetTop;
radius.style.getAbsolutePosition=function(_f,_10){
var p=[radius.style.getAbsoluteX(_f,_10),radius.style.getAbsoluteY(_f,_10)];
p.x=p[0];
p.y=p[1];
return p;
};
radius.style.getCursorPos=function(e,_13){
if(!e){
return null;
}
var x=e.pageX||e.clientX;
if(!x){
return null;
}
var y=e.pageY||e.clientY;
if(!y){
return null;
}
if(_13){
x-=radius.style.getAbsoluteX(_13,null);
y-=radius.style.getAbsoluteY(_13,null);
}
return {"x":x,"y":y};
};


dojo.provide("radius.html");
radius.html.handleSelectionState=function(_1,_2){
var _3=_2;
if(_1.nodeType==dojo.dom.ELEMENT_NODE){
var _4=dojo.html.getAttribute(_1,"allowSelect");
if(_4){
if(_4.toLowerCase()=="yesfortree"){
_2=true;
_3=true;
}else{
if(_4.toLowerCase()=="yes"){
_2=true;
}else{
if(_4.toLowerCase()=="nofortree"){
_2=false;
_3=false;
}else{
if(_4.toLowerCase()=="no"){
_2=false;
}
}
}
}
}
if(_2){
dojo.html.enableSelection(_1);
}else{
dojo.html.disableSelection(_1);
}
}
var _5=_1.childNodes;
if(_5){
for(var i=0;i<_5.length;i++){
var _7=_5[i];
radius.html.handleSelectionState(_7,_3);
}
}
};
radius.html.setAttributes=function(_8,_9){
for(var _a in _9){
var _b=_9[_a];
_8.setAttribute(_a,_b);
}
};
if(true){
radius.html.updateAbsPos=function(_c,x,y){
};
radius.html.hideAbs=function(_f){
_f.style.display="none";
};
radius.html.showAbs=function(_10){
_10.style.display="";
};
radius.html.isAbsVisible=function(_11){
return _11.style.display!="none";
};
radius.html.isVisible=function(_12){
return _12.style.display!="none";
};
radius.html.show=function(_13){
radius.html.showAbs(_13);
};
radius.html.hide=radius.html.hideAbs;
}else{
radius.html.updateAbsPos=function(_14){
if(_14._abspos){
_14._abspos={x:_14.offsetLeft,y:_14.offsetTop};
_14.style.left="-9999px";
_14.style.top="-9999px";
}
};
radius.html.hideAbs=function(_15){
if(!_15._abspos){
_15._abspos={x:_15.offsetLeft,y:_15.offsetTop};
_15.style.left="-9999px";
_15.style.top="-9999px";
}
};
radius.html.showAbs=function(_16){
if(_16._abspos){
_16.style.left=_16._abspos.x+"px";
_16.style.top=_16._abspos.y+"px";
_16._abspos=undefined;
}
};
radius.html.isAbsVisible=function(_17){
return !_17._abspos;
};
radius.html.isVisible=function(_18){
return !_18._abspos&&_18.style.display!="none";
};
radius.html.show=function(_19){
if(_19.style.display=="none"){
dojo.html.show(_19);
}
radius.html.showAbs(_19);
};
radius.html.hide=radius.html.hideAbs;
}
radius.html.StyleSheet=function(_1a){
if(!document.styleSheets){
throw new Error("Browser don't support the style sheets collection");
}
if(_1a!=null&&_1a!=undefined){
this.styleSheet=document.styleSheets[_1a];
}else{
if(document.createStyleSheet){
this.styleSheet=document.createStyleSheet();
}else{
if(!document.styleSheets.length){
throw new Error("You must define at least one style sheet");
}
this.styleSheet=document.styleSheets[document.styleSheets.length-1];
}
}
if(this.styleSheet.cssRules){
this.rules=this.styleSheet.cssRules;
}else{
if(this.styleSheet.rules){
this.rules=this.styleSheet.rules;
}else{
throw new Error("Browser don't support the style sheet rules collection");
}
}
if(this.styleSheet.addRule){
this.insertRule=function(_1b,_1c,_1d){
if(!(_1d>=0)){
_1d=this.rules.length;
}
var ni=this.styleSheet.addRule(_1b,_1c,_1d);
return ni>=0?ni:_1d;
};
}else{
if(this.styleSheet.insertRule){
this.insertRule=function(_1f,_20,_21){
return this.styleSheet.insertRule(_1f+" { "+_20+" }",_21>=0?_21:this.rules.length);
};
}
}
if(this.styleSheet.removeRule){
this.deleteRule=function(_22){
if(!(_22>=0)){
return false;
}
this.styleSheet.removeRule(_22);
return true;
};
}else{
if(this.styleSheet.deleteRule){
this.deleteRule=function(_23){
if(!(_23>=0)){
return false;
}
this.styleSheet.deleteRule(_23);
return true;
};
}
}
};
radius.extend(radius.html.StyleSheet,{getRule:function(_24){
return this.rules[_24];
},insertRule:function(){
return null;
},deleteRule:function(_25){
return false;
}});
radius.html.commonStyleSheet=new radius.html.StyleSheet();
radius.html.overElement=function(_26,e){
try{
return dojo.html.overElement(_26,e);
}
catch(ex){
return false;
}
};
radius.html.overNode=radius.html.overElement;
radius.html.contains=function(_28,_29){
if(!_29){
return false;
}
if(_28.contains){
return _28.contains(_29);
}
while(_29){
if(_29==_28){
return true;
}
_29=_29.parentNode;
}
return false;
};
dojo.dom.isDescendantOf=function(_2a,_2b){
return radius.html.contains(_2b,_2a);
};
radius.html.mergeNodeData=function(_2c,_2d,_2e){
var _2f=dojo.html.getClass(_2c);
if(_2f){
dojo.html.addClass(_2d,_2f);
}
_2d.style.cssText=_2c.style.cssText;
if(!_2e){
var _30=_2c.getAttribute("id");
if(_30){
_2d.id=_30;
}
}
};
radius.html.fixEvent=function(e,_32){
return dojo.event.browser.fixEvent(e?e:window.event,_32);
};
radius.html.detachNode=function(_33){
if(_33.parentNode){
_33.parentNode.removeChild(_33);
}
};
radius.html.detachChildren=function(_34){
var _35=_34.childNodes.length;
if(_35){
while(_34.hasChildNodes()){
_34.removeChild(_34.firstChild);
}
}
return _35;
};
radius.html.moveChildren=function(_36,_37){
var _38=_36.childNodes.length;
while(_36.hasChildNodes()){
var _39=_36.firstChild;
radius.html.detachNode(_39);
_37.appendChild(_39);
}
return _38;
};
if(dojo.render.html.ie){
radius.html.setInnerText=function(_3a,_3b){
_3a.innerText=_3b;
};
radius.html.fixw=function(w){
return w-(w&1);
};
radius.html.fixh=function(h){
return (h&1)?h:(h-1);
};
radius.html.setOpacity=function(_3e,_3f){
var f=_3e.filters["DXImageTransform.Microsoft.Alpha"];
if(_3f>=1){
if(f){
f.Enabled=false;
}
return;
}
if(_3f>1){
_3f=1;
}else{
if(_3f<0){
_3f=0;
}else{
_3f=new Number(_3f).toFixed(2);
}
}
_3f=_3f*100;
if(!f){
_3e.style.filter="progid:DXImageTransform.Microsoft.Alpha(opacity="+_3f+") "+_3e.style.filter;
}else{
f.Enabled=true;
f.Opacity=_3f;
}
};
radius.html.hitchEvent=function(obj,_42,_43,_44){
if(_43){
if(obj[_42+"$hitch"]){
obj[_42+"$hitch$counter"]++;
return obj[_42+"$hitch"];
}else{
obj[_42+"$hitch$counter"]=1;
return obj[_42+"$hitch"]=function(e){
return obj[_42](e);
};
}
}else{
if(obj[_42+"$hitchfix"]){
var _46=obj[_42+"$$hitchfix$counter"]++;
obj[_42+"$$hitchfix"+_46+"$node"]=_44;
return obj[_42+"$hitchfix"]=function(e){
return obj[_42](radius.html.fixEvent(e,obj[_42+"$$hitchfix"+_46+"$node"]));
};
}else{
obj[_42+"$$hitchfix$counter"]=1;
obj[_42+"$$hitchfix$node"]=_44;
return obj[_42+"$hitchfix"]=function(e){
return obj[_42](radius.html.fixEvent(e,obj[_42+"$$hitchfix$node"]));
};
}
}
};
radius.html.dehitchEvent=function(obj,_4a,_4b){
var _4c=_4a+(_4b?"$hitch":"$hitchfix");
var _4d=_4c+"$counter";
var _4e=obj[_4c];
if(obj[_4d]&&obj[_4d]>1){
obj[_4d]--;
}else{
delete obj[_4c];
delete obj[_4d];
}
return _4e;
};
radius.html.attachEventM=function(_4f,_50,obj,_52,_53){
_4f.attachEvent(_50,radius.html.hitchEvent(obj,_52,_53,_53?null:_4f));
if(radius.html.eventsManager){
radius.html.eventsManager.attach(arguments);
}
};
radius.html.detachEventM=function(_54,_55,obj,_57,_58){
var _59=radius.html.dehitchEvent(obj,_57,_58);
if(_59){
try{
_54.detachEvent(_55,_59);
}
catch(ex){
}
}
if(radius.html.eventsManager){
radius.html.eventsManager.detach(arguments);
}
};
radius.html.getGarbageBin=function(){
var _5a=document.getElementById("IELeakGarbageBinDomId");
if(!_5a){
_5a=document.createElement("div");
_5a.id="IELeakGarbageBinDomId";
_5a.style.display="none";
document.body.appendChild(_5a);
}
return _5a;
};
radius.html.discardNode=function(_5b){
var _5c=radius.html.getGarbageBin();
_5c.appendChild(_5b);
_5c.innerHTML="";
};
radius.html.discardNodes=function(_5d){
var _5e=radius.html.getGarbageBin();
for(var n=0;n<_5d.length;n++){
_5e.appendChild(_5d[n]);
}
_5e.innerHTML="";
};
radius.html.discardChildren=function(_60){
var _61=_60.childNodes.length;
if(_61){
var _62=radius.html.getGarbageBin();
while(_60.hasChildNodes()){
_62.appendChild(_60.firstChild);
}
_62.innerHTML="";
}
return _61;
};
}else{
radius.html.setInnerText=function(_63,_64){
if(_63.firstChild){
_63.replaceChild(document.createTextNode(_64),_63.firstChild);
}else{
_63.appendChild(document.createTextNode(_64));
}
};
radius.html.fixw=function(w){
return w;
};
radius.html.fixh=function(h){
return h;
};
radius.html.setOpacity=function(_67,_68){
if(_68>1){
_68=1;
}else{
if(_68<0){
_68=0;
}else{
_68=new Number(_68).toFixed(2);
}
}
_67.style.opacity=_68;
if(dojo.render.html.moz){
_67.style.MozOpacity=_68;
}else{
if(dojo.render.html.safari){
_67.style.KhtmlOpacity=_68;
}
}
};
radius.html.attachEventM=function(_69,_6a,obj,_6c,_6d){
dojo.event.connect("before",_69,_6a,obj,_6c);
if(radius.html.eventsManager){
radius.html.eventsManager.attach(arguments);
}
};
radius.html.detachEventM=function(_6e,_6f,obj,_71,_72){
dojo.event.disconnect("before",_6e,_6f,obj,_71);
if(radius.html.eventsManager){
radius.html.eventsManager.detach(arguments);
}
};
radius.html.discardNode=radius.html.detachNode;
radius.html.discardNodes=function(_73){
for(var n=0;n<_73.length;n++){
var _75=_73[n];
if(_75.parentNode){
_75.parentNode.removeChild(_75);
}
}
};
radius.html.discardChildren=radius.html.detachChildren;
}
radius.html.eventsManager=new function(){
this.lock=false;
this.storage={};
if(dojo.render.html.ie){
this.key=function(_76){
return _76[1]+"$"+_76[3]+(_76[4]?"":"$fix");
};
}else{
this.key=function(_77){
return _77[1]+"$"+_77[3];
};
}
this.attach=function(_78){
if(this.lock){
return false;
}
var k=this.key(_78);
var _7a=this.storage[k];
if(!_7a){
_7a=this.storage[k]=[];
}
_7a.push(_78);
return true;
};
this.detach=function(_7b){
if(this.lock){
return false;
}
var k=this.key(_7b);
var _7d=this.storage[k];
if(_7d&&_7d.length){
for(var n=_7d.length-1;n;n--){
var a=_7d[n];
if(a[0]==_7b[0]&&a[2]==_7b[2]){
_7d.splice(n,1);
if(!_7d.length){
delete this.storage[k];
}
return true;
}
}
}
return false;
};
this.detachAll=function(){
var _80=this.lock;
this.lock=true;
for(var k in this.storage){
var _82=this.storage[k];
this.storage[k]=null;
if(_82&&_82.length){
for(var n=0;n<_82.length;n++){
var _84=_82[n];
_82[n]=null;
radius.html.detachEventM.apply(radius.html,_84);
_84[0]=_84[1]=_84[2]=_84[3]=_84[4]=null;
_84=null;
}
}
_82=null;
}
this.storage={};
this.lock=_80;
};
radius.html.attachEventM(window,"onunload",this,"detachAll",true);
};
radius.html.setHandCursor=function(_85){
if(dojo.render.html.ie){
_85.style.cursor="url('/images/cursors/drag.cur')";
}else{
if(dojo.render.html.moz){
_85.style.cursor="-moz-grab";
}
}
};


dojo.provide("radius.fx.html");
radius.fx.duration=500;
radius.fx.html.go=function(_1,_2,_3,_4,_5){
var _6=new radius.anim.Anim(_2);
_6.onAnim=function(p){
_3(p,_1);
};
if(_4){
_6.onEnd=function(p){
_4(_1,_6);
};
}
if(!_5){
_6.goForward();
}
return _6;
};
radius.fx.html.wipeHeight=function(_9,_a,_b,_c,_d,_e){
var _f=_c-_b;
return radius.fx.html.go(_9,_a,function(p,n){
n.style.height=(_b+_f*p)+"px";
},_d,_e);
};
radius.fx.html.explode=function(_12,_13,_14,_15,_16,_17){
var _18=dojo.style.toCoordinateArray(_12);
var _19=document.createElement("div");
_19.style.zIndex=dojo.style.getComputedStyle(_13,"z-index");
_19.style.position="absolute";
_19.style.border="1px solid black";
_19.style.display="none";
document.body.appendChild(_19);
if(!_17){
_13.style.visibility="hidden";
_13.style.display="block";
}
var _1a=dojo.style.toCoordinateArray(_13);
if(!_17){
_13.style.display="none";
_13.style.visibility="visible";
}
var _1b=new dojo.animation.Animation(new dojo.math.curves.Line(_18,_1a),_14||radius.fx.duration,0);
dojo.event.connect(_1b,"onBegin",function(e){
_19.style.display="block";
});
dojo.event.connect(_1b,"onAnimate",function(e){
_19.style.left=e.x+"px";
_19.style.top=e.y+"px";
_19.style.width=e.coords[2]+"px";
_19.style.height=e.coords[3]+"px";
});
dojo.event.connect(_1b,"onEnd",function(){
if(!_17){
_13.style.display="block";
}
radius.html.discardNode(_19);
if(_15){
_15(_13,_1b);
}
});
if(!_16){
_1b.play();
}
return _1b;
};
radius.fx.html.implode=function(_1e,end,_20,_21,_22,_23){
var _24=dojo.style.toCoordinateArray(_1e);
var _25=dojo.style.toCoordinateArray(end);
var _26=document.createElement("div");
_26.style.zIndex=dojo.style.getComputedStyle(_1e,"z-index");
_26.style.position="absolute";
_26.style.border="1px solid black";
_26.style.display="none";
document.body.appendChild(_26);
var _27=new dojo.animation.Animation(new dojo.math.curves.Line(_24,_25),_20||radius.fx.duration,0);
dojo.event.connect(_27,"onBegin",function(e){
if(!_23){
_1e.style.display="none";
}
_26.style.display="block";
});
dojo.event.connect(_27,"onAnimate",function(e){
_26.style.left=e.x+"px";
_26.style.top=e.y+"px";
_26.style.width=e.coords[2]+"px";
_26.style.height=e.coords[3]+"px";
});
dojo.event.connect(_27,"onEnd",function(){
radius.html.discardNode(_26);
if(_21){
_21(_1e,_27);
}
});
if(!_22){
_27.play();
}
return _27;
};
dojo.fx.html.toggle.plain={show:function(_2a,_2b,_2c,_2d){
radius.html.show(_2a);
if(dojo.lang.isFunction(_2d)){
_2d();
}
},hide:function(_2e,_2f,_30,_31){
radius.html.hide(_2e);
if(dojo.lang.isFunction(_31)){
_31();
}
}};


dojo.provide("radius.ServerRequest");
radius.ServerRequest=function(_1,_2,_3){
this.remoteMethodName=_1;
this.isAsync=_2;
this.onResultCallback=_3;
this.jsonrpc=radius.jsonrpc;
this.async_requests={};
};
radius.extend(radius.ServerRequest,{send:function(){
this.result=null;
var _4=this.remoteMethodName.split(".");
var _5=this.jsonrpc;
var _6=null;
for(var i=0;i<_4.length;i++){
_6=_5;
_5=_5[_4[i]];
if(!_5){
throw Error("No the remote method found: "+this.remoteMethodName);
}
}
if(!this.onStart(arguments)){
return;
}
if(this.isAsync){
var _8=null;
try{
var _9=new Array();
_9.push(dojo.lang.hitch(this,"_cb"));
for(var i=0;i<arguments.length;i++){
_9.push(arguments[i]);
}
_8=_5.apply(_6,_9);
this.async_requests[_8]=true;
}
catch(ex){
this._handleException(ex);
this.onEnd(ex);
}
return _8;
}else{
var _a=null;
try{
_a=_5.apply(_6,arguments);
}
catch(ex){
this._handleException(ex);
this.onEnd(ex);
return null;
}
this.result=_a;
this.onResult(_a);
this.onEnd(null);
return _a;
}
},onStart:function(_b){
return true;
},onResult:function(_c){
if(GLOBAL_CONFIG.debug){
radius.debug("Received request["+this.remoteMethodName+"] result: "+radius.obj2str(_c));
}
if(this.onResultCallback){
this.onResultCallback(_c);
}
},onEnd:function(ex){
},onConnectionProblem:function(ex){
radius.debug("Connection problem for request["+this.remoteMethodName+"]: "+dojo.errorToString(ex));
},onServerProblem:function(ex){
radius.debug("Server problem for request["+this.remoteMethodName+"]: "+dojo.errorToString(ex));
},_handleException:function(ex){
return ex.name=="JSONRpcClientException"?this.onConnectionProblem(ex):this.onServerProblem(ex);
},_cb:function(_11,ex){
if(ex){
this._handleException(ex);
this.onEnd(ex);
return;
}
this.result=_11;
this.onResult(_11);
this.onEnd(null);
},cancel:function(_13){
if(_13){
if(this.async_requests[_13]){
delete this.async_requests[_13];
JSONRpcClient.cancelRequest(_13);
}
}else{
this.cancelAll();
}
},cancelAll:function(){
for(var _14 in this.async_requests){
JSONRpcClient.cancelRequest(_14);
}
this.async_requests={};
}});


dojo.provide("radius.requests");
dojo.provide("radius.LocalsRequest");
radius.LocalsRequest=function(_1,_2,_3){
this.logicMethodName=_1;
radius.ServerRequest.call(this,"locals."+_1,!_2,_3);
};
radius.inherits(radius.LocalsRequest,radius.ServerRequest);
radius.extend(radius.LocalsRequest,{});
radius.RosterRequest=function(_4,_5,_6){
this.logicMethodName=_4;
radius.ServerRequest.call(this,"roster."+_4,!_5,_6);
};
radius.inherits(radius.RosterRequest,radius.ServerRequest);
radius.extend(radius.RosterRequest,{});


dojo.provide("radius.widget.manager");
radius.widget.manager=new function(){
this.lock=false;
this.wins=[];
this.winIds={};
this.winTypeCtr={};
this.getUniqueId=function(_1){
return _1+"_"+(this.winTypeCtr[_1]!=undefined?++this.winTypeCtr[_1]:this.winTypeCtr[_1]=0);
};
this.add=function(_2){
this.wins.push(_2);
if(!_2.widgetId){
_2.widgetId=this.getUniqueId(_2.widgetType);
}
if(this.winIds[_2.widgetId]){
radius.debug("window ID collision on ID: "+_2.widgetId);
}
this.winIds[_2.widgetId]=_2;
};
this.destroyAll=function(){
while(this.wins.length){
var w=this.wins[0];
delete this.winIds[w.widgetId];
this.wins.splice(0,1);
w.destroy(true);
try{
delete w;
}
catch(e){
}
w=null;
}
this.wins=[];
this.winIds={};
};
this.remove=function(_4){
var id=this.wins[_4].widgetId;
delete this.winIds[id];
this.wins.splice(_4,1);
};
this.removeById=function(id){
if(!id||!this.winIds[id]){
return false;
}
for(var i=0;i<this.wins.length;i++){
if(this.wins[i].widgetId==id){
this.remove(i);
return true;
}
}
return false;
};
this.byId=function(id){
return this.winIds[id];
};
this.byType=function(_9){
var _a=[];
for(var n=0;n<this.wins.length;n++){
var w=this.wins[n];
if(w.widgetType==_9){
_a.push(w);
}
}
return _a;
};
this.byFilter=function(_d){
var _e=[];
for(var n=0;n<this.wins.length;n++){
var w=this.wins[n];
if(_d(w)){
_e.push(w);
}
}
return _e;
};
this.all=function(){
return this.wins.concat();
};
};
radius.widget.byId=function(id){
return this.manager.byId(id);
};
radius.widget.byType=function(_12){
return this.manager.byType(_12);
};
radius.widget.byFilter=function(_13){
return this.manager.byFilter(_13);
};
radius.widget.all=function(){
return this.manager.all();
};
radius.widget.classes={};
radius.widget.addClass=function(_14,_15){
this.classes[_14]=_15;
};
radius.widget.getClass=function(_16){
return this.classes[_16];
};


dojo.provide("radius.templates");
radius.templates.byWidgetType={ImageButton:"ImageButton.html",CheckBox:"CheckBox.html",DefaultWindow:"DefaultWindow.html",DebugWindow:"DebugWindow.html",LoginWindow:"LoginWindow.html",ContentArea:"ContentArea.html",RadioButton:"RadioButton.html",ContentAreaVScroll:"ScrollBar.html",ContentAreaHScroll:"ScrollBar.html",LocalsScrollBar:"ScrollBar.html",PZoomerScrollBar:"ScrollBar.html",LoginLegacyWindow:"LoginLegacyWindow.html",LoginCheckWindow:"LoginCheckWindow.html",SignUpWindow:"SignUpWindow.html",ForgotPasswordWindow:"ForgotPasswordWindow.html",VerificationEmailWindow:"VerificationEmailWindow.html",RegistrationWindow:"RegistrationWindow.html",SettingsWindow:"SettingsWindow.html",LocationWindow:"LocationWindow.html",RosterWindow:"RosterWindow.html",MapWindow:"MapWindow.html",LocalsFilterWindow:"LocalsFilterWindow.html",ProfileWindow:"ProfileWindow.html",AboutWhatIsWindow:"AboutWhatIsWindow.html",MessagingWindow:"MessagingWindow.html",AddRadiusFriendWindow:"AddRadiusFriendWindow.html",AddFriendWindow:"AddFriendWindow.html",AddInviteFriendWindow:"AddInviteFriendWindow.html",EditFriendWindow:"EditFriendWindow.html",SimpleWindow:"SimpleWindow.html",ResizableSimpleWindow:"ResizableSimpleWindow.html",AddGroupWindow:"AddGroupWindow.html",InfoWindow:"InfoWindow.html",LogViewWindow:"LogViewWindow.html",SysMessagesAdminWindow:"SysMessagesAdminWindow.html",FindAddressWindow:"FindAddressWindow.html",InviteFriendWindow:"InviteFriendWindow.html",DownForMaintenance:"DownForMaintenance.html",_:0};
radius.templates.loaded={};
radius.templates.widgetTypeURLPrefix="/templates/";
radius.templates.byWidgetTypeLoaded={};
radius.templates.require=function(_1){
if(this.loaded[_1]){
return false;
}
var _2=dojo.hostenv.getText(_1);
var c=radius.byId("templatesContainerDomId");
radius.html.discardChildren(c);
c.innerHTML=_2;
radius.html.moveChildren(c,document.body);
radius.templates.loaded[_1]=true;
return true;
};
radius.templates.versionBuildPostfix="?version="+GLOBAL_CONFIG.version+"&build="+GLOBAL_CONFIG.build;
radius.templates.requireByWidgetType=function(_4,_5){
if(this.byWidgetTypeLoaded[_4]){
return false;
}
if(_5&&_5.superclass&&_5.superclass.widgetType){
this.requireByWidgetType(_5.superclass.widgetType,_5.superclass);
}
var _6=this.byWidgetType[_4];
if(!_6){
return false;
}
var _7=_6.split(/\s*,\s*/);
for(var n=0;n<_7.length;n++){
radius.templates.require(this.widgetTypeURLPrefix+_7[0]+this.versionBuildPostfix);
}
this.byWidgetTypeLoaded[_4]=true;
return true;
};


dojo.provide("radius.widget.Window");
radius.widget.Window=function(){
};
radius.extend(radius.widget.Window,{widgetType:"Window",hideOnStartup:true,autoOnload:true,create:function(_1,_2){
radius.mixin(this,_1);
if(this.isControl){
this.srcNode=_2;
}else{
this.srcNode=this._create(_1,_2);
}
this.preLoading();
if(!this.isControl){
radius.widget.manager.add(this);
}
this.preCreate();
this.doCreate();
this.postCreate();
if(radius.loaded){
this.onLoaded();
}
},destroy:function(_3){
this.preDestroy();
radius.widget.manager.removeById(this.widgetId);
this.doDestroy(_3);
},preLoading:function(){
},preCreate:function(){
if(this.hideOnStartup){
radius.html.hideAbs(this.domNode);
}else{
radius.html.showAbs(this.domNode);
}
},doCreate:function(){
if(this.fillInTemplate){
this.fillInTemplate();
}
},preDestroy:function(){
},doDestroy:function(_4){
var _5=radius.widget.cache[this.widgetType];
if(_5&&_5[this.uname()]==this){
return false;
}
if(!_4){
dojo.event.browser.clean(this.domNode);
}
radius.html.discardNode(this.domNode);
try{
delete this.domNode;
}
catch(e){
}
return true;
},postCreate:function(){
},onLoaded:function(){
},show:function(){
radius.html.show(this.domNode);
},hide:function(){
radius.html.hide(this.domNode);
},setPos:function(_6){
var _7={};
if(dojo.lang.has(_6,"x")){
_7.left=_6.x;
}
if(dojo.lang.has(_6,"y")){
_7.top=_6.y;
}
if(dojo.lang.has(_6,"left")){
_7.left=_6.left;
}
if(dojo.lang.has(_6,"top")){
_7.top=_6.top;
}
if(dojo.lang.has(_6,"right")){
_7.right=_6.right;
}
if(dojo.lang.has(_6,"bottom")){
_7.bottom=_6.bottom;
}
if(dojo.lang.has(_6,"width")){
_7.width=_6.width;
}
if(dojo.lang.has(_6,"height")){
_7.height=_6.height;
}
radius.style.setStyles(this.domNode,_7);
radius.html.updateAbsPos(this.domNode);
},makeImgPiece:function(_8,_9,_a,_b,_c){
if(!_b){
_b=this.domNode;
}
var _d,node0=null;
var _e=_8.imgUrl?_8.imgUrl:radius.image.blankUrl;
var _f=_8.imgUrl0;
if(dojo.render.html.ie){
if(_a!="png"){
_d=radius.image.makeBlankNode();
_d.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+_e+"'"+(_a?", sizingMethod='"+_a+"'":"")+")";
if(_f){
node0=radius.image.makeBlankNode();
node0.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+_f+"'"+(_a?", sizingMethod='"+_a+"'":"")+")";
}
}else{
_d=radius.image.makeNode(_e);
dojo.html.setClass(_d,"png");
if(_f){
node0=radius.image.makeNode(_e);
dojo.html.setClass(node0,"png");
}
}
}else{
_d=radius.image.makeNode(_e);
if(_f){
node0=radius.image.makeNode(_f);
}
}
if(!dojo.lang.has(_9,"width")&&dojo.lang.has(_8,"w")){
_9.width=_8.w;
}
if(!dojo.lang.has(_9,"height")&&dojo.lang.has(_8,"h")){
_9.height=_8.h;
}
if(!_c){
_d.style.position="absolute";
}
radius.style.setStyles(_d,_9);
if(node0){
if(!_c){
node0.style.position="absolute";
}
radius.style.setStyles(node0,_9);
_8.node0=node0;
_b.appendChild(node0);
}
_8.node=_d;
_b.appendChild(_d);
return _d;
},makePiece:function(_10,_11,pos,_13){
if(!_13){
_13=this.domNode;
}
var _14=document.createElement("div");
_14.style.position="absolute";
if(_10){
if(!dojo.lang.has(pos,"width")&&dojo.lang.has(_10,"w")){
pos.width=_10.w;
}
if(!dojo.lang.has(pos,"height")&&dojo.lang.has(_10,"h")){
pos.height=_10.h;
}
}
radius.style.setStyles(_14,pos);
if(_10){
_10.node=_14;
}
_13.appendChild(_14);
return _14;
},attachNode:function(id,_16){
this[_16]=radius.byId(id);
},attachNodes:function(_17){
for(var id in _17){
this[_17[id]]=radius.byId(id);
}
},attachTemplateNodes:function(_19){
radius.widget.attachTemplateNodes(_19||this.domNode,this);
},getCursorPos:function(e,_1b){
return radius.style.getCursorPos(e,_1b);
},_create:function(_1c,_1d){
var _1e=this.templateNode;
this.templateNode=null;
if(!_1e){
var _1f=this.templateString;
if(_1f){
var div=document.createElement("div");
document.body.appendChild(div);
div.innerHTML=_1f;
div.normalize();
if(div.childNodes.length){
_1e=div.childNodes[0];
radius.html.detachNode(_1e);
}
radius.html.discardNode(div);
}
}else{
_1e=dojo.byId(_1e).cloneNode(true);
}
if(!_1e){
_1e=_1d||document.createElement("div");
_1d=null;
}else{
this.attachTemplateNodes(_1e);
if(this.isContainer&&this.containerNode&&_1d){
dojo.dom.moveChildren(_1d,this.containerNode);
}
if(_1d&&_1d.parentNode&&_1d.parentNode.nodeType==dojo.dom.ELEMENT_NODE){
_1d.parentNode.replaceChild(_1e,_1d);
}
}
if(!_1e.parentNode||_1e.parentNode.nodeType==dojo.dom.DOCUMENT_FRAGMENT_NODE){
document.body.appendChild(_1e);
}
this.domNode=_1e;
return _1d;
}});
radius.widget.attachTemplateNodes=function(_21,_22){
var _23=_21.getElementsByTagName("*");
for(var n=-1;n<_23.length;n++){
var _25=(n==-1)?_21:_23[n];
var id=_25.getAttribute("id");
if(id){
_22[id]=_25;
_25.removeAttribute("id");
}
id=_25.getAttribute("dojoAttachPoint");
if(id){
_22[id]=_25;
}
}
};
radius.widget.fireOnLoaded=function(){
var _27=radius.widget.manager.wins;
for(var n=0;n<_27.length;n++){
var w=_27[n];
if(w.onLoaded){
w.onLoaded();
}
}
};
radius.widget.windowResized=function(){
var vpw=dojo.html.getViewportWidth();
var vph=dojo.html.getViewportHeight();
var _2c=radius.widget.manager.wins;
for(var n=0;n<_2c.length;n++){
var w=_2c[n];
if(w.isFloatingWindow&&w.windowState!="minimized"&&w.windowResized){
w.windowResized(vpw,vph);
}
}
};
radius.widget._postLoaded=function(){
radius.widget.windowResized();
radius.html.attachEventM(window,"onresize",radius.widget,"windowResized",true);
if(radius.widget.initTooltips){
radius.widget.initTooltips();
}
};
radius.widget.postLoaded=function(){
setTimeout(radius.widget._postLoaded,10);
};
radius.widget.cache={"ImageButton":{}};
radius.widget.cloneNode=function(_2f){
var _30=dojo.byId(_2f);
if(_30==undefined||_30==null){
throw new Error("Unable to clone node with id "+_2f+".  Node with that id does not exist.");
}
var _31=_30.cloneNode(true);
_31.removeAttribute("id");
_30.parentNode.appendChild(_31);
return _31;
};
radius.widget.create=function(_32,_33,_34,_35){
var _36=this.cache[_32];
if(_36){
var _37=_33.prefixPath?(_33.prefixPath+_33.name):_33.name;
var w=_36[_37];
if(w){
if(_34&&dojo.lang.isString(_34)){
_34=radius.byId(_34);
}
return w.clone(_34,_33);
}
}
var _39=this.getClass(_32);
if(!_39){
throw new Error("Cannot find \""+_32+"\" window");
}
radius.templates.requireByWidgetType(_32,_39);
if(_34&&dojo.lang.isString(_34)){
_34=radius.byId(_34);
}
if(_35){
_34=this.cloneNode(_34);
}
var w=new _39();
w.create(_33,_34);
if(_36){
_36[w.uname()]=w;
}
return w;
};


dojo.provide("radius.widget.FloatingWindow");
radius.widget.FloatingWindow=function(){
radius.widget.Window.call(this);
this.dragBars=new Array();
};
radius.inherits(radius.widget.FloatingWindow,radius.widget.Window);
radius.extend(radius.widget.FloatingWindow,{widgetType:"FloatingWindow",isFloatingWindow:true,isContainer:true,isActive:false,allowMoving:true,allowResize:true,allowTopping:true,resizeOnStartup:true,constrainToContainer:true,dragBars:null,minWidth:0,minHeight:0,width:320,height:200,contentNode:null,isOpen:undefined,centerOnOpen:true,isModal:false,toggle:null,toggleDuration:150,toggleObj:null,preCreate:function(){
if(this.toggle){
var t=(dojo.fx&&dojo.fx.html&&dojo.fx.html.toggle[this.toggle.toLowerCase()]);
if(t){
this.toggleObj=t;
if(t.init){
t.init(this);
}
}
}
dojo.event.connect(this,"open",this,"completeOpen");
dojo.event.connect(this,"close",this,"completeClose");
radius.widget.FloatingWindow.superclass.preCreate.call(this);
},doCreate:function(){
radius.widget.FloatingWindow.superclass.doCreate.call(this);
this.domNode.style.position="absolute";
},makeMoveSource:function(){
return new radius.widget.FloatingWindow.DragMoveSource(this.domNode);
},postCreate:function(){
if(this.allowMoving&&this.dragBars&&this.dragBars.length){
var _2=this.dragBars;
for(var i=0;i<_2.length;i++){
var _4=this.makeMoveSource();
if(this.constrainToContainer){
_4.constrainTo();
}
_4.setDragHandle(_2[i]);
_2[i].dragger=_4;
}
}
if(this.allowTopping){
radius.html.attachEventM(this.domNode,"onmousedown",this,"onMouseDown",true);
}
if(this.isModal){
var m=this.modal={};
m.bgColor=radius.isNull(this.modalBgColor)?"white":this.modalBgColor;
m.bgOpacity=radius.isNull(this.modalBgOpacity)?0:this.modalBgOpacity;
m.bg=document.createElement("div");
m.bg.className="floatingWinModalBgClass";
m.bg.style.backgroundColor=m.bgColor;
dojo.style.setOpacity(m.bg,m.bgOpacity);
dojo.dom.insertBefore(m.bg,this.domNode);
}
radius.widget.FloatingWindow.superclass.postCreate.call(this);
},onMouseDown:function(){
this.bringToTop();
},center:function(){
var b=document.body;
if(b){
var w=this.width||dojo.style.getOuterWidth(this.domNode);
var h=this.height||dojo.style.getOuterHeight(this.domNode);
var _9=b.clientWidth/2-w/2;
var _a=b.clientHeight/2-h/2;
this.setPos({left:_9,top:_a});
}
},isVisible:function(){
var v=radius.html.isVisible(this.domNode);
return v;
},show:function(){
if(this.allowTopping){
this.bringToTop();
}else{
this.activate();
}
if(this.toggleObj){
this.animationInProgress=true;
this.toggleObj.show(this.domNode,this.toggleDuration,this.explodeSrc,new Function("radius.widget.byId(\""+this.widgetId+"\").onShow()"));
}else{
radius.html.show(this.domNode);
}
if(this.modal){
dojo.html.show(this.modal.bg);
}
},onShow:function(){
this.animationInProgress=false;
},hide:function(){
this.disactivate();
if(this.modal){
dojo.html.hide(this.modal.bg);
}
if(this.toggleObj){
this.animationInProgress=true;
this.toggleObj.hide(this.domNode,this.toggleDuration,this.explodeSrc,new Function("radius.widget.byId(\""+this.widgetId+"\").onHide()"));
}else{
radius.html.hide(this.domNode);
}
},doActivate:function(_c){
if(this.modal){
this.modal.bg.style.zIndex=dojo.html.getStyle(this.domNode,"z-index")-1;
}
return true;
},doDisactivate:function(_d){
if(this.modal){
this.modal.bg.style.zIndex=dojo.html.getStyle(this.domNode,"z-index")-1;
}
return true;
},activate:function(_e){
if(this.isActive){
return false;
}else{
this.isActive=this.doActivate(_e);
return this.isActive;
}
},disactivate:function(_f){
if(this.isActive){
var _10=this.doDisactivate(_f);
this.isActive=!_10;
return _10;
}else{
return false;
}
},focus:function(){
this.bringToTop();
},blur:function(){
this.disactivate(true);
},_filterWinFunc:function(w){
return (w.isFloatingWindow&&w.allowTopping)?true:false;
},_sortWinFunc:function(a,b){
return a.domNode.style.zIndex-b.domNode.style.zIndex;
},bringToTop:function(){
if(!this.allowTopping){
return;
}
var _14=100;
var _15=1000;
var _16=radius.widget.manager.byFilter(this._filterWinFunc);
var _17=[];
for(var x=0;x<_16.length;x++){
if(this.widgetId!=_16[x].widgetId){
_17.push(_16[x]);
}
}
_17.sort(this._sortWinFunc);
for(x=0;x<_17.length;x++){
var w=_17[x];
w.domNode.style.zIndex=(w.isModal?_15:_14)+5*x;
w.disactivate(true);
}
this.domNode.style.zIndex=(this.isModal?_15:_14)+5*x;
this.activate(true);
},resizeTo:function(w,h){
w=Math.max(w,this.getMinWidth());
h=Math.max(h,this.getMinHeight());
this.width=w;
this.height=h;
this.domNode.style.width=w+"px";
this.domNode.style.height=h+"px";
this.doResize(w,h);
},doResize:function(w,h){
},onLoaded:function(){
radius.widget.FloatingWindow.superclass.onLoaded.call(this);
if(this.resizeOnStartup&&this.width&&this.height){
this.resizeTo(this.width,this.height);
}
},setMinWidth:function(_1e){
if(this.minWidth<_1e){
this.minWidth=_1e;
}
},setMinHeight:function(_1f){
if(this.minHeight<_1f){
this.minHeight=_1f;
}
},getMinWidth:function(){
return this.minWidth;
},getMinHeight:function(){
return this.minHeight;
},open:function(_20){
var _21=(_20||_20==undefined)&&this.isOpen;
if(!_21&&this.centerOnOpen&&dojo.html.isDisplayed(this.domNode)){
this.center();
_21=true;
}
if(_20||_20==undefined){
this.show(_20);
}
if(!_21&&this.centerOnOpen){
this.center();
}
if(_20||_20==undefined){
if(this.windowState!="minimized"&&this.windowResized){
var vpw=dojo.html.getViewportWidth();
var vph=dojo.html.getViewportHeight();
this.windowResized(vpw,vph);
}
}
},completeOpen:function(){
this.isOpen=true;
},close:function(){
this.hide();
},destroy:function(_24){
this.close();
radius.widget.FloatingWindow.superclass.destroy.call(this,_24);
},doDestroy:function(_25){
var r=radius.widget.FloatingWindow.superclass.doDestroy.call(this,_25);
if(r&&this.modal){
if(!_25){
dojo.event.browser.clean(this.modal.bg);
}
radius.html.discardNode(this.modal.bg);
try{
delete this.modal.bg;
}
catch(e){
}
try{
delete this.modal;
}
catch(e){
}
}
},completeClose:function(){
this.isOpen=false;
},windowResized:function(vpw,vph){
var mp=false,mr=false;
var x1=this.domNode.offsetLeft;
if(x1<0){
x1=0;
mp=true;
}
var y1=this.domNode.offsetTop;
if(y1<0){
y1=0;
mp=true;
}
var w=this.width;
var h=this.height;
var x2=x1+w;
var y2=y1+h;
if(x2>vpw){
x1=vpw-w;
if(x1<0){
x1=0;
}
x2=x1+w;
mp=true;
}
if(y2>vph){
y1=vph-h;
if(y1<0){
y1=0;
}
y2=y1+h;
mp=true;
}
if(this.allowResize){
if(x1==0&&x2>vpw){
x1=0;
w=vpw;
x2=x1+w;
mr=true;
}
if(y1==0&&y2>vph){
y1=0;
h=vph;
y2=y1+h;
mr=true;
}
}
if(mp){
this.setPos({left:x1,top:y1});
}
if(mr){
this.prepareResizeTo?this.prepareResizeTo(w,h):this.resizeTo(w,h);
}
},_:0});
radius.widget.addClass("FloatingWindow",radius.widget.FloatingWindow);
radius.widget.FloatingWindow.DragMoveSource=function(_30,_31){
dojo.dnd.HtmlDragMoveSource.call(this,_30,_31);
};
radius.inherits(radius.widget.FloatingWindow.DragMoveSource,dojo.dnd.HtmlDragMoveSource);
radius.extend(radius.widget.FloatingWindow.DragMoveSource,{onDragStart:function(){
var _32=new radius.widget.FloatingWindow.DragMoveObject(this.dragObject,this.type);
if(this.constrainToContainer){
_32.constrainTo(this.constrainingContainer);
}
return _32;
}});
radius.widget.FloatingWindow.DragMoveObject=function(_33,_34){
dojo.dnd.HtmlDragMoveObject.call(this,_33,_34);
};
dojo.inherits(radius.widget.FloatingWindow.DragMoveObject,dojo.dnd.HtmlDragMoveObject);
dojo.lang.extend(radius.widget.FloatingWindow.DragMoveObject,{onDragMove:function(e){
this.updateDragOffset();
var x=this.dragOffset.left+e.clientX-this.parentPosition.left;
var y=this.dragOffset.top+e.clientY-this.parentPosition.top;
if(this.constrainToContainer){
if(x>this.constraints.maxX){
x=this.constraints.maxX;
}
if(y>this.constraints.maxY){
y=this.constraints.maxY;
}
if(x<this.constraints.minX){
x=this.constraints.minX;
}
if(y<this.constraints.minY){
y=this.constraints.minY;
}
}
if(!this.disableY){
this.dragClone.style.top=y+"px";
}
if(!this.disableX){
this.dragClone.style.left=x+"px";
}
}});


dojo.provide("radius.widget.ResizeHandle");
radius.widget.ResizeHandle=function(_1,_2){
this.targetWidget=_1;
this.controlNode=dojo.byId(_2);
if(this.targetWidget&&this.controlNode){
radius.html.attachEventM(this.controlNode,"onmousedown",this,"_beginSizing");
}
};
radius.extend(radius.widget.ResizeHandle,{isSizing:false,startPoint:null,startSize:null,_beginSizing:function(e){
if(this.isSizing){
return false;
}
this.isSizing=true;
this.startPoint={x:e.clientX,y:e.clientY};
this.beginSizing(e);
radius.html.attachEventM(document.body,"onmousemove",this,"_changeSizing");
radius.html.attachEventM(document.body,"onmouseup",this,"_endSizing");
if(dojo.render.html.ie){
radius.html.attachEventM(this.controlNode,"ondragstart",this,"_endSizing");
}
e.preventDefault();
},beginSizing:function(e){
this.startSize={w:dojo.style.getOuterWidth(this.targetWidget.domNode),h:dojo.style.getOuterHeight(this.targetWidget.domNode)};
},_changeSizing:function(e){
if(!e||!e.clientX||!e.clientY){
return;
}
var dx=e.clientX-this.startPoint.x;
var dy=e.clientY-this.startPoint.y;
this.changeSizing(e,dx,dy);
e.preventDefault();
},changeSizing:function(e,dx,dy){
this.targetWidget.resizeTo(this.startSize.w+dx,this.startSize.h+dy);
},_endSizing:function(e){
radius.html.detachEventM(document.body,"onmousemove",this,"_changeSizing");
radius.html.detachEventM(document.body,"onmouseup",this,"_endSizing");
if(dojo.render.html.ie){
radius.html.detachEventM(this.controlNode,"ondragstart",this,"_endSizing");
}
this.isSizing=false;
this.endSizing();
},endSizing:function(e){
}});


dojo.provide("radius.widget.BaseWindow");
radius.widget.BaseWindow=function(){
radius.widget.Window.call(this);
};
radius.inherits(radius.widget.BaseWindow,radius.widget.Window);
radius.extend(radius.widget.BaseWindow,{widgetType:"BaseWindow",hideOnStartup:false,fillInTemplate:function(){
},show:function(){
dojo.style.show(this.domNode);
},hide:function(){
dojo.style.hide(this.domNode);
}});


dojo.provide("radius.widget.ImageButton");
radius.widget.ImageButton=function(){
radius.widget.BaseWindow.call(this);
};
radius.inherits(radius.widget.ImageButton,radius.widget.BaseWindow);
radius.extend(radius.widget.ImageButton,{widgetType:"ImageButton",isControl:true,prefixPath:"/images/btns/",disabled:false,buildPostfix:"?version="+GLOBAL_CONFIG.version+"&build="+GLOBAL_CONFIG.build,reg:"png",over:"png",pres:"png",dis:false,_isover:false,_isdown:false,uname:function(){
return (this.prefixPath==this.constructor.prototype.prefixPath)?this.name:(this.prefixPath+this.name);
},clone:function(_1,_2){
var b=new radius.widget.ImageButton();
b.reg=this.reg;
b.over=this.over;
b.pres=this.pres;
b.dis=this.dis;
b.name=this.name;
b.width=this.width;
b.height=this.height;
b.prefixPath=this.prefixPath;
if(_2){
radius.mixin(b,_2);
}
b.domNode=b.imgNode=b.eventNode=document.createElement("img");
b.domNode.className=this.domNode.className;
b.domNode.style.cssText=this.domNode.style.cssText;
b.domNode.src=this.domNode.src;
if(b.srcIsParent){
_1.appendChild(b.domNode);
}else{
radius.html.mergeNodeData(_1,b.domNode);
_1.parentNode.replaceChild(b.domNode,_1);
}
b.postCreate();
return b;
},preCreate:function(){
this.domNode=this.imgNode=this.eventNode=document.createElement("img");
this.domNode.className="imgBtnClass";
if(this.srcIsParent){
this.srcNode.appendChild(this.domNode);
delete this.srcNode;
}else{
this.srcNode.parentNode.replaceChild(this.domNode,this.srcNode);
}
radius.widget.ImageButton.superclass.preCreate.call(this);
},fillInTemplate:function(){
radius.widget.ImageButton.superclass.fillInTemplate.call(this);
if(!this.name){
throw new Error("The button name is not specified");
}
if(!this.srcIsParent){
radius.html.mergeNodeData(this.srcNode,this.domNode);
delete this.srcNode;
}
radius.html.handleSelectionState(this.domNode,false);
},postCreate:function(){
if(this.disabled){
var _4=this.disabled;
this.disabled=undefined;
this.disable(_4);
}else{
this._setState("reg");
}
radius.html.attachEventM(this.eventNode,"onmouseover",this,"onMouseOver",true);
radius.html.attachEventM(this.eventNode,"onmouseout",this,"onMouseOut",true);
radius.html.attachEventM(this.eventNode,"onmousedown",this,"onMouseDown",true);
radius.html.attachEventM(this.eventNode,"onmouseup",this,"onMouseUp",true);
radius.html.attachEventM(this.eventNode,"onclick",this,"buttonClick",true);
radius.widget.ImageButton.superclass.postCreate.call(this);
},onLoaded:function(){
radius.widget.ImageButton.superclass.onLoaded.call(this);
if(this.domNode!=this.imgNode){
this.domNode.style.width=this.width+"px";
this.domNode.style.height=this.height+"px";
}
},destroy:function(_5){
radius.html.detachEventM(this.eventNode,"onmouseover",this,"onMouseOver",true);
radius.html.detachEventM(this.eventNode,"onmouseout",this,"onMouseOut",true);
radius.html.detachEventM(this.eventNode,"onmousedown",this,"onMouseDown",true);
radius.html.detachEventM(this.eventNode,"onmouseup",this,"onMouseUp",true);
radius.html.detachEventM(this.eventNode,"onclick",this,"buttonClick",true);
radius.widget.ImageButton.superclass.destroy.call(this,_5);
},_setState:function(_6){
if(this[_6]){
radius.image.setSrcX(this.imgNode,this.prefixPath+this.name+"/"+_6+"."+this[_6]+this.buildPostfix,"scale");
this.imgNode.width=this.width;
this.imgNode.height=this.height;
}
},disable:function(_7){
if(_7==undefined){
_7=true;
}
if(this.disabled==_7){
return;
}
if(_7&&this._isdown){
this.onMouseUp();
}
this.disabled=_7;
if(_7){
this._setState(this.dis?"dis":"reg");
}else{
this._setState(this._isover?"over":"reg");
}
},enable:function(_8){
this.disable(_8==undefined?false:!_8);
},onMouseOver:function(){
this._isover=true;
if(!this.disabled){
this._setState("over");
}
},onMouseOut:function(){
this._isover=false;
if(this._isdown){
this.onMouseUp();
}
if(!this.disabled){
this._setState("reg");
}
},onMouseDown:function(e){
this._isdown=true;
if(!this.disabled){
this._setState("pres");
if(this.onDown){
this.onDown();
}
}
},onMouseUp:function(e){
this._isdown=false;
if(!this.disabled){
this._setState("over");
if(this.onUp){
this.onUp();
}
}
},buttonClick:function(e){
if(!this.disabled){
if(this.onClick){
this.onClick(e);
}
}
}});
radius.widget.addClass("ImageButton",radius.widget.ImageButton);


dojo.provide("radius.widget.DefaultWindow");
radius.widget.DefaultWindow=function(){
radius.widget.FloatingWindow.call(this);
};
radius.inherits(radius.widget.DefaultWindow,radius.widget.FloatingWindow);
radius.extend(radius.widget.DefaultWindow,{widgetType:"DefaultWindow",caption:"DefaultWindow",windowState:"normal",prevWindowState:"normal",d_ul:{style:"width:6px; height:23px; position:absolute; left:0px; top:0px",src:"/images/wins/bb_ul_6x23.png?version=RELEASE_0_27&build=200608281106",src0:"/images/wins/bb_ul_6x23_out.png?version=RELEASE_0_27&build=200608281106"},d_u:{dsize:12,style:"width:1px; height:23px; position:absolute; left:6px; top:0px",src:"/images/wins/bb_u_1x23.png?version=RELEASE_0_27&build=200608281106",src0:"/images/wins/bb_u_1x23_out.png?version=RELEASE_0_27&build=200608281106"},d_ur:{style:"width:6px; height:23px; position:absolute; right:0px; top:0px",src:"/images/wins/bb_ur_6x23.png?version=RELEASE_0_27&build=200608281106",src0:"/images/wins/bb_ur_6x23_out.png?version=RELEASE_0_27&build=200608281106"},d_l:{dsize:29,style:"width:6px; height:1px; position:absolute; left:0px; top:23px",src:"/images/wins/bb_l_6x1cyan.png?version=RELEASE_0_27&build=200608281106",src0:"/images/wins/bb_l_6x1cyan_out.png?version=RELEASE_0_27&build=200608281106"},d_r:{dsize:29,style:"width:6px; height:1px; position:absolute; right:0px; top:23px",src:"/images/wins/bb_r_6x1cyan.png?version=RELEASE_0_27&build=200608281106",src0:"/images/wins/bb_r_6x1cyan_out.png?version=RELEASE_0_27&build=200608281106"},d_dl:{style:"width:6px; height:6px; position:absolute; left:0px; bottom:0px",src:"/images/wins/bb_dl_6x6cyan.png?version=RELEASE_0_27&build=200608281106",src0:"/images/wins/bb_dl_6x6cyan_out.png?version=RELEASE_0_27&build=200608281106"},d_d:{dsize:12,style:"width:1px; height:6px; position:absolute; left:6px; bottom:0px",src:"/images/wins/bb_d_1x6cyan.png?version=RELEASE_0_27&build=200608281106",src0:"/images/wins/bb_d_1x6cyan_out.png?version=RELEASE_0_27&build=200608281106"},d_dr:{style:"width:6px; height:6px; position:absolute; right:0px; bottom:0px",src:"/images/wins/bb_dr_6x6cyan.png?version=RELEASE_0_27&build=200608281106",src0:"/images/wins/bb_dr_6x6cyan_out.png?version=RELEASE_0_27&build=200608281106"},d_c_height:23,d_c_loffset:24,d_c_roffset:5,d_c_logo:{style:"width:16px; height:15px; position:absolute; left:5px; top:3px",src:"/images/wins/logo16x15.png?version=RELEASE_0_27&build=200608281106"},d_c_btnsy:5,d_c_closeb:{p:{prefixPath:"/images/wins/btns/",name:"close14x14",width:14,height:14,srcIsParent:true}},d_c_maxb:{p:{prefixPath:"/images/wins/btns/",name:"maximize14x14",width:14,height:14,srcIsParent:true},p0:{prefixPath:"/images/wins/btns/",name:"restore14x14",width:14,height:14,srcIsParent:true}},d_c_minb:{p:{prefixPath:"/images/wins/btns/",name:"minimize14x14",width:14,height:14,srcIsParent:true},p0:{prefixPath:"/images/wins/btns/",name:"restore14x14",width:14,height:14,srcIsParent:true}},d_scale:{style:"width:9px; height:9px; position:absolute; right:3px; bottom:3px",src:"/images/wins/scale9x9.png?version=RELEASE_0_27&build=200608281106"},d_minWidth:13,d_minHeight:30,sd_ur:{style:"width:10px; height:23px; position:absolute; right:-10px; top:0px",src:"/images/wins/sh_ur_10x23.png?version=RELEASE_0_27&build=200608281106"},sd_r:{dsize:23,style:"width:10px; height:1px; position:absolute; right:-10px; top:23px",src:"/images/wins/sh_r_10x1.png?version=RELEASE_0_27&build=200608281106"},sd_dl:{style:"width:18px; height:12px; position:absolute; left:0px; bottom:-12px",src:"/images/wins/sh_dl_18x12.png?version=RELEASE_0_27&build=200608281106"},sd_d:{dsize:18,style:"width:1px; height:12px; position:absolute; left:18px; bottom:-12px",src:"/images/wins/sh_d_1x12.png?version=RELEASE_0_27&build=200608281106"},sd_dr:{style:"width:14px; height:18px; position:absolute; right:-14px; bottom:-18px",src:"/images/wins/sh_dr_14x18.png?version=RELEASE_0_27&build=200608281106"},sd_minWidth:19,sd_minHeight:24,templateNode:"defWinTemplateDomId",fillInTemplate:function(){
if(this.caption=="none"){
this.caption=null;
}
var b=this.backbone={};
this.shadow={};
this.captionHeight=(this.d_c_height&&this.caption)?this.d_c_height:0;
if(!this.containerNode){
throw new Error("Content is not found");
}
this.contentNode=this.containerNode;
radius.html.detachNode(this.contentNode);
radius.html.mergeNodeData(this.srcNode,this.contentNode);
this._makeShadow();
if(this.afterShadowBeforeBackbone){
this.afterShadowBeforeBackbone();
}
this._makeBackbone();
this.contentNode.style.top=this.captionHeight+"px";
this.domNode.appendChild(this.contentNode);
if(this.allowResize&&this.d_scale){
if(this.d_scale.node){
this.domNode.appendChild(b.scale=this.d_scale.node.cloneNode(false));
}else{
b.scale=this._cx(this.d_scale);
}
b.scale.className="defWinScaleClass";
}
},postCreate:function(){
if(this.backbone.scale){
this.resizeHandle=this.makeResizeHandle(this.backbone.scale);
}
this.contentNode.style.display="";
this.setWindowState(this.windowState);
radius.widget.DefaultWindow.superclass.postCreate.call(this);
},destroy:function(_2){
this._destroyBackbone(_2);
this._destroyShadow(_2);
radius.widget.DefaultWindow.superclass.destroy.call(this,_2);
},_dragger_onDragStart:function(_3){
if(_3.windowState=="minimized"){
return null;
}
var _4=new radius.widget.FloatingWindow.DragMoveObject(this.dragObject,this.type);
if(this.constrainToContainer){
_4.constrainTo(this.constrainingContainer);
}
return _4;
},makeMoveSource:function(){
var _5=new radius.widget.FloatingWindow.DragMoveSource(this.domNode);
_5.onDragStart=new Function("var w = radius.widget.byId(\""+this.widgetId+"\"); return w._dragger_onDragStart.call(this, w)");
return _5;
},makeResizeHandle:function(_6){
return new radius.widget.ResizeHandle(this,_6);
},_cx:function(p){
return radius.image.createX(p.src,this.domNode,"scale",p.style);
},_makeBackbone:function(){
var b=this.backbone;
if(this.d_ul){
if(this.d_ul.node){
this.domNode.appendChild(b.ul=this.d_ul.node.cloneNode(false));
}else{
b.ul=this._cx(this.d_ul);
}
}
if(this.d_u){
if(this.d_u.node){
this.domNode.appendChild(b.u=this.d_u.node.cloneNode(false));
}else{
b.u=this._cx(this.d_u);
}
}
if(this.d_ur){
if(this.d_ur.node){
this.domNode.appendChild(b.ur=this.d_ur.node.cloneNode(false));
}else{
b.ur=this._cx(this.d_ur);
}
}
if(this.d_l){
if(this.d_l.node){
this.domNode.appendChild(b.l=this.d_l.node.cloneNode(false));
}else{
b.l=this._cx(this.d_l);
}
}
if(this.d_r){
if(this.d_r.node){
this.domNode.appendChild(b.r=this.d_r.node.cloneNode(false));
}else{
b.r=this._cx(this.d_r);
}
}
if(this.d_dl){
if(this.d_dl.node){
this.domNode.appendChild(b.dl=this.d_dl.node.cloneNode(false));
}else{
b.dl=this._cx(this.d_dl);
}
}
if(this.d_d){
if(this.d_d.node){
this.domNode.appendChild(b.d=this.d_d.node.cloneNode(false));
}else{
b.d=this._cx(this.d_d);
}
}
if(this.d_dr){
if(this.d_dr.node){
this.domNode.appendChild(b.dr=this.d_dr.node.cloneNode(false));
}else{
b.dr=this._cx(this.d_dr);
}
}
if(this.caption){
if(this.d_c_node){
this.domNode.appendChild(b.logo=this.d_c_logo.node.cloneNode(false));
this.domNode.appendChild(b.cnode=this.d_c_node.cloneNode(true));
b.ctnode=b.cnode.firstChild;
radius.html.setInnerText(b.ctnode,this.caption);
}else{
b.logo=this._cx(this.d_c_logo);
var cn=document.createElement("div");
this.domNode.appendChild(cn);
cn.className="defWinCaptionBarClass";
cn.style.height=this.d_c_height+"px";
cn.style.lineHeight=(this.d_c_height-1)+"px";
cn.style.paddingLeft=this.d_c_loffset+"px";
b.cnode=this.d_c_node=cn;
var _a=document.createElement("span");
cn.appendChild(_a);
_a.appendChild(document.createTextNode(this.caption));
_a.className="defWinCaptionTextClass";
b.ctnode=_a;
}
if(this.allowMoving){
this.dragBars.push(b.cnode);
}
var x=this.d_c_roffset;
var bc;
if(bc=this.d_c_closeb){
if(bc.b){
b.closeb=bc.b.clone(this.domNode,{srcIsParent:true});
}else{
b.closeb=bc.b=radius.widget.create("ImageButton",bc.p,this.domNode);
bc.b.domNode.style.position="absolute";
bc.b.domNode.style.top=this.d_c_btnsy+"px";
}
b.closeb.domNode.style.right=x+"px";
b.closeb.onClick=new Function("radius.widget.byId(\""+this.widgetId+"\").closeWindow()");
x+=b.closeb.width;
}
if(bc=this.d_c_maxb){
if(bc.b){
b.maxb=bc.b.clone(this.domNode,{srcIsParent:true});
b.maxb0=bc.b0.clone(this.domNode,{srcIsParent:true});
}else{
b.maxb=bc.b=radius.widget.create("ImageButton",bc.p,this.domNode);
bc.b.domNode.style.position="absolute";
bc.b.domNode.style.top=this.d_c_btnsy+"px";
b.maxb0=bc.b0=radius.widget.create("ImageButton",bc.p0,this.domNode);
bc.b0.domNode.style.position="absolute";
bc.b0.domNode.style.top=this.d_c_btnsy+"px";
}
b.maxb.domNode.style.right=x+"px";
b.maxb.onClick=new Function("radius.widget.byId(\""+this.widgetId+"\").maximizeWindow()");
b.maxb0.domNode.style.right=x+"px";
b.maxb0.onClick=new Function("radius.widget.byId(\""+this.widgetId+"\").restoreWindow()");
x+=b.maxb.width;
}
if(bc=this.d_c_minb){
if(bc.b){
b.minb=bc.b.clone(this.domNode,{srcIsParent:true});
b.minb0=bc.b0.clone(this.domNode,{srcIsParent:true});
}else{
b.minb=bc.b=radius.widget.create("ImageButton",bc.p,this.domNode);
bc.b.domNode.style.position="absolute";
bc.b.domNode.style.top=this.d_c_btnsy+"px";
b.minb0=bc.b0=radius.widget.create("ImageButton",bc.p0,this.domNode);
bc.b0.domNode.style.position="absolute";
bc.b0.domNode.style.top=this.d_c_btnsy+"px";
}
b.minb.domNode.style.right=x+"px";
b.minb.onClick=new Function("radius.widget.byId(\""+this.widgetId+"\").minimizeWindow()");
b.minb0.domNode.style.right=x+"px";
b.minb0.onClick=new Function("radius.widget.byId(\""+this.widgetId+"\").restoreWindow()");
x+=b.minb.width;
}
b.btnWidth=x;
b.captionWidth=this.d_c_loffset+b.btnWidth+2;
this.setMinWidth(b.captionWidth);
this.setMinWidth(radius.data.taskBar.winWidth);
this.setMinHeight(radius.data.taskBar.winHeight);
}
this.setMinWidth(this.d_minWidth);
this.setMinHeight(this.d_minHeight);
},_destroyBackbone:function(_d){
var b=this.backbone;
if(b.closeb&&b.closeb!=this.d_c_closeb.b){
b.closeb.destroy(_d);
}
if(b.maxb&&b.maxb!=this.d_c_maxb.b){
b.maxb.destroy(_d);
b.maxb0.destroy(_d);
}
if(b.minb&&b.minb!=this.d_c_minb.b){
b.minb.destroy(_d);
b.minb0.destroy(_d);
}
},_makeShadow:function(){
var s=this.shadow;
if(this.sd_ur){
if(this.sd_ur.node){
this.domNode.appendChild(s.ur=this.sd_ur.node.cloneNode(false));
}else{
s.ur=this._cx(this.sd_ur);
}
}
if(this.sd_r){
if(this.sd_r.node){
this.domNode.appendChild(s.r=this.sd_r.node.cloneNode(false));
}else{
s.r=this._cx(this.sd_r);
}
}
if(this.sd_dl){
if(this.sd_dl.node){
this.domNode.appendChild(s.dl=this.sd_dl.node.cloneNode(false));
}else{
s.dl=this._cx(this.sd_dl);
}
}
if(this.sd_d){
if(this.sd_d.node){
this.domNode.appendChild(s.d=this.sd_d.node.cloneNode(false));
}else{
s.d=this._cx(this.sd_d);
}
}
if(this.sd_dr){
if(this.sd_dr.node){
this.domNode.appendChild(s.dr=this.sd_dr.node.cloneNode(false));
}else{
s.dr=this._cx(this.sd_dr);
}
}
this.setMinWidth(this.sd_minWidth);
this.setMinHeight(this.sd_minHeight);
},_destroyShadow:function(_10){
},_sizeBackbone:function(w,h){
var b=this.backbone;
if(b.u){
b.u.style.width=(w-this.d_u.dsize)+"px";
}
if(this.windowState!="minimized"){
if(b.l){
b.l.style.height=(h-this.d_l.dsize)+"px";
}
if(b.r){
b.r.style.height=(h-this.d_r.dsize)+"px";
}
if(b.d){
b.d.style.width=(w-this.d_d.dsize)+"px";
}
}
if(this.caption){
dojo.style.setOuterWidth(b.cnode,w);
this._sizeCaption(w);
}
},_sizeCaption:function(w,_15){
var b=this.backbone;
var tn=b.ctnode;
var txt=_15||this.caption;
if(txt&&txt.length>0){
var _19=(w||this.width)-b.captionWidth;
var e="";
while(1){
radius.html.setInnerText(tn,txt+e);
if(tn.offsetWidth<=_19||!txt.length){
break;
}
e="...";
txt=txt.substring(0,txt.length-1);
}
if(!txt.length){
radius.html.setInnerText(tn,"");
}
}else{
radius.html.setInnerText(tn,"");
}
},_sizeShadow:function(w,h){
if(this.windowState=="minimized"){
return;
}
var s=this.shadow;
if(s.r){
s.r.style.height=radius.html.fixh(h-this.sd_r.dsize)+"px";
}
if(s.d){
s.d.style.width=radius.html.fixw(w-this.sd_d.dsize)+"px";
}
},doResize:function(_1e,_1f){
if(!radius.loaded){
return false;
}
var w=this.domNode.offsetWidth||_1e;
var h=this.domNode.offsetHeight||_1f;
var rw=dojo.style.setOuterWidth(this.contentNode,radius.html.fixw(w));
var rh=dojo.style.setOuterHeight(this.contentNode,radius.html.fixh(h-this.captionHeight));
this._sizeBackbone(w,h);
this._sizeShadow(w,h);
return true;
},doActivate:function(_24){
var isa=radius.widget.DefaultWindow.superclass.doActivate.call(this,_24);
if(isa){
var b=this.backbone;
if(this.d_ul&&this.d_ul.src0){
radius.image.setSrcX(b.ul,this.d_ul.src);
}
if(this.d_u&&this.d_u.src0){
radius.image.setSrcX(b.u,this.d_u.src);
}
if(this.d_ur&&this.d_ur.src0){
radius.image.setSrcX(b.ur,this.d_ur.src);
}
if(this.d_l&&this.d_l.src0){
radius.image.setSrcX(b.l,this.d_l.src);
}
if(this.d_r&&this.d_r.src0){
radius.image.setSrcX(b.r,this.d_r.src);
}
if(this.d_dl&&this.d_dl.src0){
radius.image.setSrcX(b.dl,this.d_dl.src);
}
if(this.d_d&&this.d_d.src0){
radius.image.setSrcX(b.d,this.d_d.src);
}
if(this.d_dr&&this.d_dr.src0){
radius.image.setSrcX(b.dr,this.d_dr.src);
}
}
return isa;
},doDisactivate:function(_27){
var _28=radius.widget.DefaultWindow.superclass.doDisactivate.call(this,_27);
if(_28){
var b=this.backbone;
if(this.d_ul&&this.d_ul.src0){
radius.image.setSrcX(b.ul,this.d_ul.src0);
}
if(this.d_u&&this.d_u.src0){
radius.image.setSrcX(b.u,this.d_u.src0);
}
if(this.d_ur&&this.d_ur.src0){
radius.image.setSrcX(b.ur,this.d_ur.src0);
}
if(this.d_l&&this.d_l.src0){
radius.image.setSrcX(b.l,this.d_l.src0);
}
if(this.d_r&&this.d_r.src0){
radius.image.setSrcX(b.r,this.d_r.src0);
}
if(this.d_dl&&this.d_dl.src0){
radius.image.setSrcX(b.dl,this.d_dl.src0);
}
if(this.d_d&&this.d_d.src0){
radius.image.setSrcX(b.d,this.d_d.src0);
}
if(this.d_dr&&this.d_dr.src0){
radius.image.setSrcX(b.dr,this.d_dr.src0);
}
this.doRemoveFocusFromElements();
}
return _28;
},doRemoveFocusFromElements:function(){
var _2a=this.domNode.getElementsByTagName("input");
for(var i=0;i<_2a.length;i++){
_2a[i].blur();
}
var _2c=this.domNode.getElementsByTagName("a");
for(var i=0;i<_2c.length;i++){
_2c[i].blur();
}
var _2d=this.domNode.getElementsByTagName("textarea");
for(var i=0;i<_2d.length;i++){
_2d[i].blur();
}
var _2e=this.domNode.getElementsByTagName("img");
for(var i=0;i<_2e.length;i++){
_2e[i].blur();
}
},setWindowState:function(_2f,_30){
var b=this.backbone;
if(_2f=="normal"){
if(!_30){
if(b.maxb){
b.maxb.show();
b.maxb0.hide();
}
if(b.minb){
b.minb.show();
b.minb0.hide();
}
}
}else{
if(_2f=="maximized"){
if(!_30){
if(b.maxb){
b.maxb.hide();
b.maxb0.show();
}
if(b.minb){
b.minb.show();
b.minb0.hide();
}
}
}else{
if(_2f=="minimized"){
if(!_30){
if(b.maxb){
b.maxb.show();
b.maxb0.hide();
}
if(b.minb){
b.minb.hide();
b.minb0.show();
}
}
}else{
throw new Error("Invalid window state");
}
}
}
if(this.windowState!="minimized"&&this.windowState!=_2f){
this.prevWindowState=this.windowState;
}
this.windowState=_2f;
},closeWindow:function(){
},storeWinLocation:function(){
return dojo.style.toCoordinateArray([this.domNode.offsetLeft,this.domNode.offsetTop,this.width,this.height]);
},restoreWinLocation:function(_32){
this.setPos({x:_32.x,y:_32.y});
this.resizeTo(_32.w,_32.h);
},getMaximizeCoords:function(){
return [0,0,dojo.html.getViewportWidth(),dojo.html.getViewportHeight()];
},focus:function(){
radius.widget.DefaultWindow.superclass.focus.call(this);
if(this.windowState=="minimized"){
this.restoreWindow();
}
},_endMaximizeWindow:function(ism){
if(ism){
radius.widget.TaskBar.remove(this);
this.doUnminimize();
}
this.restoreWinLocation(this.maximizeWindow_maxCoords);
this.maximizeWindow_maxCoords=undefined;
this.setWindowState("maximized");
},maximizeWindow:function(){
if(this.windowState=="maximized"){
return;
}
var ism=this.windowState=="minimized";
if(this.windowState=="normal"){
this.normalLoc=this.storeWinLocation();
}
this.setWindowState("maximized",true);
var _35=dojo.style.toCoordinateArray(this.getMaximizeCoords());
var _36=dojo.style.toCoordinateArray(this.domNode);
this.maximizeWindow_maxCoords=_35;
var _37=radius.fx.html.implode(this.domNode,_35,radius.data.taskBar.effectDuration,new Function("radius.widget.byId(\""+this.widgetId+"\")._endMaximizeWindow("+ism+")"),true,true);
_37.play();
},_endMinimizeWindow:function(){
radius.widget.TaskBar.add(this);
this.domNode.style.display="block";
},minimizeWindow:function(){
if(this.windowState=="minimized"){
return;
}
if(this.windowState=="normal"){
this.normalLoc=this.storeWinLocation();
}
this.setWindowState("minimized");
var _38=radius.fx.html.implode(this.domNode,radius.widget.TaskBar.getNewCoords(),radius.data.taskBar.effectDuration,new Function("radius.widget.byId(\""+this.widgetId+"\")._endMinimizeWindow()"),true);
this.doMinimize();
_38.play();
},_endRestoreWindow:function(ism){
if(ism){
radius.widget.TaskBar.remove(this);
this.doUnminimize();
}
this.restoreWinLocation(this.normalLoc);
this.setWindowState("normal");
},restoreWindow:function(){
if(this.windowState=="normal"){
return;
}
var ism=this.windowState=="minimized";
this.setWindowState("normal",true);
var _3b=this;
var _3c=radius.fx.html.implode(this.domNode,this.normalLoc,radius.data.taskBar.effectDuration,new Function("radius.widget.byId(\""+this.widgetId+"\")._endRestoreWindow("+ism+")"),true,true);
_3c.play();
},restoreWindowNow:function(){
if(this.windowState=="normal"){
return;
}
var ism=this.windowState=="minimized";
this.setWindowState("normal",true);
if(ism){
radius.widget.TaskBar.remove(this);
this.doUnminimize();
}
this.restoreWinLocation(this.normalLoc);
this.setWindowState("normal");
},doMinimize:function(){
var s=this.shadow;
if(s.ur){
s.ur.style.display="none";
}
if(s.r){
s.r.style.display="none";
}
if(s.dl){
s.dl.style.display="none";
}
if(s.d){
s.d.style.display="none";
}
if(s.dr){
s.dr.style.display="none";
}
var b=this.backbone;
if(b.l){
b.l.style.display="none";
}
if(b.r){
b.r.style.display="none";
}
if(b.dl){
b.dl.style.display="none";
}
if(b.d){
b.d.style.display="none";
}
if(b.dr){
b.dr.style.display="none";
}
if(b.scale){
b.scale.style.display="none";
}
this.contentNode.style.display="none";
this.resizeTo(radius.data.taskBar.winWidth,radius.data.taskBar.winHeight);
},doUnminimize:function(){
var s=this.shadow;
if(s.ur){
s.ur.style.display="";
}
if(s.r){
s.r.style.display="";
}
if(s.dl){
s.dl.style.display="";
}
if(s.d){
s.d.style.display="";
}
if(s.dr){
s.dr.style.display="";
}
var b=this.backbone;
if(b.l){
b.l.style.display="";
}
if(b.r){
b.r.style.display="";
}
if(b.dl){
b.dl.style.display="";
}
if(b.d){
b.d.style.display="";
}
if(b.dr){
b.dr.style.display="";
}
if(b.scale){
b.scale.style.display="";
}
this.contentNode.style.display="";
},doMaximize:function(_42){
this.setPos(_42.x,_42.y);
this.resizeTo(_42.w,_42.h);
},getMinWidth:function(){
return this.windowState!="minimized"?radius.widget.DefaultWindow.superclass.getMinWidth.call(this):radius.data.taskBar.winWidth;
},getMinHeight:function(){
return this.windowState!="minimized"?radius.widget.DefaultWindow.superclass.getMinHeight.call(this):radius.data.taskBar.winHeight;
},setCaptionLazy:function(_43){
radius.html.setInnerText(this.backbone.ctnode,_43);
this._sizeCaption(null,_43);
},setCaption:function(_44){
this.caption=_44;
this.setCaptionLazy(_44);
},open:function(_45){
if(this.windowState!="normal"){
this.restoreWindow();
}
radius.widget.DefaultWindow.superclass.open.call(this,_45);
if(this.caption){
this._sizeCaption();
}
},close:function(){
radius.widget.TaskBar.remove(this);
radius.widget.DefaultWindow.superclass.close.call(this);
},_:0});
radius.widget.addClass("DefaultWindow",radius.widget.DefaultWindow);
radius.widget.TaskBar=new function(){
this.wins=[];
this.hwins={};
this.getNewCoords=function(){
var _46=dojo.html.getViewportSize();
var _47=radius.data.taskBar.winHeight;
var c;
if(this.wins.length){
var _49=radius.data.taskBar.winWidth;
c=dojo.style.toCoordinateArray(this.wins[this.wins.length-1].domNode);
c.x+=_49;
if(c.x+_49>=_46.w){
c.x=0;
c.y-=_47;
c[1]=c.y;
}
c[0]=c.x;
}else{
c=dojo.style.toCoordinateArray([0,_46.h-_47,radius.data.taskBar.winWidth,radius.data.taskBar.winHeight]);
}
return c;
},this.add=function(win,_4b){
if(this.hwins[win.widgetId]){
return;
}
this.wins.push(win);
this.hwins[win.widgetId]=win;
if(!_4b){
this.reorder();
}
};
this.remove=function(win,_4d){
if(!this.hwins[win.widgetId]){
return;
}
delete this.hwins[win.widgetId];
for(var n=0;n<this.wins.length;n++){
if(this.wins[n].widgetId==win.widgetId){
this.wins.splice(n,1);
break;
}
}
if(!_4d){
this.reorder();
}
};
this.reorder=function(){
var _4f=radius.data.taskBar.winWidth;
var _50=radius.data.taskBar.winHeight;
var _51=dojo.html.getViewportSize();
var x=0;
var y=_51.h-_50;
for(var n=0;n<this.wins.length;n++){
var win=this.wins[n];
win.setPos({x:x,y:y});
x+=_4f;
if(x+_4f>=_51.w){
x=0;
y-=_50;
}
}
};
radius.html.attachEventM(window,"onresize",this,"reorder",true);
};


dojo.provide("radius.widget.DebugWindow");
radius.widget.DebugWindow=function(){
radius.widget.DefaultWindow.call(this);
};
radius.inherits(radius.widget.DebugWindow,radius.widget.DefaultWindow);
radius.extend(radius.widget.DebugWindow,{widgetType:"DebugWindow",widgetId:"debugWin",caption:"Debug console",width:640,height:480,fillInTemplate:function(){
radius.widget.DebugWindow.superclass.fillInTemplate.call(this);
this.consoleNode=this.contentNode;
},onLoaded:function(){
radius.widget.DebugWindow.superclass.onLoaded.call(this);
var _1=radius.byId("dojoDebug");
if(_1){
radius.html.moveChildren(_1,this.contentNode);
radius.html.discardNode(_1);
}
this.contentNode.id="dojoDebug";
},closeWindow:function(){
this.contentNode.innerHTML="";
}});
radius.widget.addClass("DebugWindow",radius.widget.DebugWindow);


dojo.provide("radius.widget.SimpleControl");
radius.widget.SimpleControl=function(){
radius.widget.DefaultWindow.call(this);
};
radius.inherits(radius.widget.SimpleControl,radius.widget.DefaultWindow);
radius.extend(radius.widget.SimpleControl,{constrainToContainer:false,allowResize:false,allowTopping:false,hideOnStartup:true,resizeOnStartup:false,centerOnOpen:false,d_ul:{style:"width:5px; height:5px; position:absolute; left:0px; top:0px",src:"/images/wins/bb_ul_5x5lblueop.png?version=RELEASE_0_27&build=200608281106"},d_u:{dsize:10,style:"width:1px; height:5px; position:absolute; left:5px; top:0px",src:"/images/wins/bb_1x1lblueop.png?version=RELEASE_0_27&build=200608281106"},d_ur:{style:"width:6px; height:5px; position:absolute; right:0px; top:0px",src:"/images/wins/bb_ur_5x5lblueop.png?version=RELEASE_0_27&build=200608281106"},d_l:{dsize:10,style:"width:5px; height:1px; position:absolute; left:0px; top:5px",src:"/images/wins/bb_1x1lblueop.png?version=RELEASE_0_27&build=200608281106"},d_r:{dsize:10,style:"width:5px; height:1px; position:absolute; right:0px; top:5px",src:"/images/wins/bb_1x1lblueop.png?version=RELEASE_0_27&build=200608281106"},d_dl:{style:"width:5px; height:5px; position:absolute; left:0px; bottom:0px",src:"/images/wins/bb_dl_5x5lblueop.png?version=RELEASE_0_27&build=200608281106"},d_d:{dsize:10,style:"width:1px; height:5px; position:absolute; left:5px; bottom:0px",src:"/images/wins/bb_1x1lblueop.png?version=RELEASE_0_27&build=200608281106"},d_dr:{style:"width:5px; height:5px; position:absolute; right:0px; bottom:0px",src:"/images/wins/bb_dr_5x5lblueop.png?version=RELEASE_0_27&build=200608281106"},caption:null,d_c_closeb:null,d_c_maxb:null,d_c_minb:null});


dojo.provide("radius.widget.SimpleMenu");
radius.widget.SimpleMenu=function(){
radius.widget.SimpleControl.call(this);
this.entriesList=[];
this.entries={};
};
radius.inherits(radius.widget.SimpleMenu,radius.widget.SimpleControl);
radius.extend(radius.widget.SimpleMenu,{widgetType:"SimpleMenu",calcSizes:true,closeMenuAfterItemClick:true,sepImg:"/images/menus/sep1x1blueop.png?version=RELEASE_0_27&build=200608281106",isIcons:false,_ismaked:false,_isresize:false,needResize:true,preLoading:function(){
radius.widget.SimpleMenu.superclass.preLoading.call(this);
if(this.sepImg){
radius.image.loadImage(this.sepImg);
}
},fillInTemplate:function(){
dojo.html.prependClass(this.containerNode,"simpleMenuContentClass");
radius.widget.SimpleMenu.superclass.fillInTemplate.call(this);
var _1=dojo.dom.firstElement(this.contentNode);
while(_1){
var _2=dojo.html.getAttribute(_1,"type");
if(_2=="item"){
var _3=dojo.dom.firstElement(_1,"img");
var _4=dojo.dom.textContent(_1);
var _5=dojo.html.getAttribute(_1,"itemId");
this.addItem(_3,_4,_5);
}else{
if(_2=="separator"||_2=="sep"){
this.addSep();
}
}
var _6=_1;
_1=dojo.dom.nextElement(_1);
radius.html.discardNode(_6);
}
},addItem:function(_7,_8,_9){
if(!_9){
_9=dojo.dom.getUniqueId();
}
if(_7){
this.isIcons=true;
}
var _a={menu:this,icon:_7,text:_8,id:_9};
this.entriesList.push(_a);
this.entries[_9]=_a;
},addSep:function(){
var _b={issep:true};
this.entriesList.push(_b);
},addSeparator:function(){
this.addSep();
},getItem:function(_c){
return this.entries[_c];
},itemShow:function(_d,_e){
var _f=this.entries[_d];
return (_e==undefined||_e)?_f.show():_f.hide();
},itemHide:function(_10,_11){
var _12=this.entries[_10];
return (_11==undefined||_11)?_12.hide():_12.show();
},isItemVisible:function(_13){
return this.entries[_13].isVisible();
},show:function(){
radius.widget.SimpleMenu.superclass.show.call(this);
this.render();
this._resize();
},open:function(){
this.show();
},close:function(){
this.hide();
},_resize:function(){
if(this.calcSizes){
if(!this.needResize){
return;
}
var tw=dojo.style.getOuterWidth(this.tableNode);
var th=dojo.style.getOuterHeight(this.tableNode);
if(tw&&th){
this.width=tw;
this.height=th;
this.resizeTo(tw,th);
this.needResize=false;
}
}else{
if(this._isresize){
return;
}
dojo.style.setOuterWidth(this.tableNode,this.width);
this._isresize=true;
}
},render:function(){
if(!this._ismaked){
this._makeMenu();
}
},makeCaller:function(_16,_17){
var _18=function(_19,_1a){
this.menu=_19;
this.item=_1a;
this.over=function(e){
_19.onItemOver(e,this.item);
};
this.out=function(e){
_19.onItemOut(e,this.item);
};
this.click=function(e){
_19.onItemClick(e,this.item);
if(_19.closeMenuAfterItemClick){
_19.close();
}
};
};
return new _18(_16,_17);
},_makeMenu:function(){
var _1e=this;
var _1f=document.createElement("table");
_1f.className="simpleMenuTableClass";
_1f.cellPadding=0;
_1f.cellSpacing=0;
var _20=document.createElement("tbody");
for(var i=0;i<this.entriesList.length;i++){
var e=this.entriesList[i];
var tr=document.createElement("tr");
var td;
if(!e.issep){
tr.className="simpleMenuItemClass";
e.node=tr;
td=document.createElement("td");
td.className="simpleMenuLIndentClass";
if(this.isIcons){
td.align="right";
td.vAlign="middle";
if(e.icon){
dojo.html.prependClass(e.icon,"simpleMenuIconClass");
td.appendChild(e.icon);
}
tr.appendChild(td);
td=document.createElement("td");
}
dojo.html.addClass(td,"simpleMenuTextClass");
dojo.html.addClass(td,"simpleMenuRIndentClass");
e.tnode=td;
td.align="left";
td.vAlign="middle";
dojo.dom.textContent(td,e.text);
tr.appendChild(td);
var c=this.makeCaller(this,e);
if(c.over){
radius.html.attachEventM(e.node,"onmouseover",c,"over",true);
}
if(c.out){
radius.html.attachEventM(e.node,"onmouseout",c,"out",true);
}
if(c.click){
radius.html.attachEventM(e.node,"onclick",c,"click",true);
}
e.hide=function(){
if(dojo.html.isDisplayed(this.node)){
dojo.html.hide(this.node);
this.menu.needResize=true;
}
};
e.show=function(){
if(!dojo.html.isDisplayed(this.node)){
dojo.html.show(this.node);
this.menu.needResize=true;
}
};
e.isVisible=function(){
return dojo.html.isDisplayed(this.node);
};
}else{
td=document.createElement("td");
if(this.isIcons){
td.colSpan=2;
}
var _26=radius.image.makePngNode(this.sepImg,"scale");
_26.className="simpleMenuSepClass";
td.appendChild(_26);
tr.appendChild(td);
}
_20.appendChild(tr);
}
_1f.appendChild(_20);
this.domNode.appendChild(_1f);
this.tableNode=_1f;
radius.html.handleSelectionState(this.domNode,false);
this._ismaked=true;
},onItemOver:function(e,_28){
_28.tnode.style.color="#ffffff";
},onItemOut:function(e,_2a){
_2a.node.style.backgroundColor="transparent";
_2a.tnode.style.color="#013374";
},onItemClick:function(e,_2c){
},isPointInMenu:function(x,y){
var mx=radius.style.getAbsoluteX(this.domNode,this.domNode);
if(x<mx||x>mx+this.width){
return false;
}
var my=radius.style.getAbsoluteY(this.domNode,this.domNode);
if(y<my||y>my+this.height){
return false;
}
return true;
}});
radius.widget.addClass("SimpleMenu",radius.widget.SimpleMenu);


dojo.provide("radius.widget.PopupMenu");
radius.widget.PopupMenu=function(){
radius.widget.SimpleMenu.call(this);
};
radius.inherits(radius.widget.PopupMenu,radius.widget.SimpleMenu);
radius.extend(radius.widget.PopupMenu,{widgetType:"PopupMenu",menuIndex:99999,x:0,y:0,param:undefined,isUsePopupMenuManager:true,bindAsContextMenuForNode:function(_1,_2){
var _3=this;
dojo.event.connect(_1,"oncontextmenu",function(e){
_3.onOpen(e,_2);
});
},bindAsContextMenuForWindow:function(){
this.bindAsContextMenuForNode(document.documentElement||document.body);
},unbindAsContextMenuForNode:function(_5){
dojo.event.kwDisconnect({srcObj:_5,srcFunc:"oncontextmenu",targetObj:this,targetFunc:"onOpen",once:true});
},unbindAsContextMenuForWindow:function(){
this.unbindAsContextMenuForNode(document.documentElement||document.body);
},makeCaller:function(_6,_7){
var _8=function(_9,_a){
this.menu=_9;
this.item=_a;
this.over=function(e){
_9.onItemOver(e,this.item,_9.param);
};
this.out=function(e){
_9.onItemOut(e,this.item,_9.param);
};
this.click=function(e){
_9.onItemClick(e,this.item,_9.param);
if(_9.closeMenuAfterItemClick){
_9.close();
}
};
};
return new _8(_6,_7);
},open:function(x,y,_10){
this.param=_10;
if(this.isUsePopupMenuManager){
radius.widget.PopupMenuManager.opened(this);
}
var _11=dojo.html.getViewportSize();
var _12=dojo.html.getScrollOffset();
var _13={left:_12[0],right:_12[0]+_11[0],top:_12[1],bottom:_12[1]+_11[1]};
x+=_12[0];
y+=_12[1];
radius.widget.PopupMenu.superclass.open.call(this);
if(x<_13.left){
x=_13.left;
}
if(x+this.width>_13.right){
x=_13.right-this.width;
}
if(y<_13.top){
y=_13.top;
}
if(y+this.height>_13.bottom){
y=_13.bottom-this.height;
}
this.domNode.style.zIndex=this.menuIndex;
this.setPos({x:x,y:y});
this.x=x;
this.y=y;
},close:function(){
this.param=undefined;
radius.widget.PopupMenu.superclass.close.call(this);
if(this.isUsePopupMenuManager){
radius.widget.PopupMenuManager.closed(this);
}
},isPointInMenu:function(x,y){
if(x<this.x||x>this.x+this.width){
return false;
}
if(y<this.y||y>this.y+this.height){
return false;
}
return true;
},onOpen:function(e,_17){
if(!e){
return;
}
this.open(e.clientX,e.clientY,_17);
if(e["preventDefault"]){
e.preventDefault();
}else{
e.returnValue=false;
}
}});
radius.widget.addClass("PopupMenu",radius.widget.PopupMenu);
radius.widget.PopupMenuManager=new function(){
this.currentMenu=null;
radius.html.attachEventM(document,"onmousedown",this,"onClick",true);
radius.html.attachEventM(window,"onscroll",this,"onClick",true);
this.closed=function(_18){
if(this.currentMenu==_18){
this.currentMenu=null;
}
};
this.opened=function(_19,_1a){
if(_19==this.currentMenu){
return;
}
if(this.currentMenu){
this.currentMenu.close();
}
this.currentMenu=_19;
};
this.onClick=function(e){
if(!this.currentMenu){
return;
}
var _1c=dojo.html.getScrollOffset();
var x=e.clientX+_1c[0];
var y=e.clientY+_1c[1];
if(this.currentMenu.isPointInMenu(x,y)){
return;
}
this.currentMenu.close();
};
};


dojo.provide("radius.widget.MapWindow");
radius.widget.MapWindow=function(){
radius.widget.DefaultWindow.call(this);
};
radius.inherits(radius.widget.MapWindow,radius.widget.DefaultWindow);
radius.extend(radius.widget.MapWindow,{widgetType:"MapWindow",widgetId:"mapWin",caption:"MapWindow",resizeOnStartup:false,iwidthMin:Math.round(322/11),iwidthMax:Math.round(772/11),d_c_maxb:null,pageNumber:1,gmapPos:{javaClass:"com.datanaut.radiusim.data.GMapBoundPos",longitude1:50,latitude1:-130,longitude2:30,latitude2:-70,longitude:40,latitude:-100},updateLocalsGMapRespondTimeout:700,updateLocalsSBarRespondTimeout:700,updateLocalsTimeoutId:null,filter:null,userSelf:null,localsReqCount:0,afterShadowBeforeBackbone:function(){
this.scrollNode=dojo.byId("mscrollWinDomId");
radius.html.detachNode(this.scrollNode);
this.domNode.appendChild(this.scrollNode);
this.recentNode=dojo.byId("recentWinDomId");
radius.html.detachNode(this.recentNode);
this.domNode.appendChild(this.recentNode);
},fillInTemplate:function(){
radius.widget.MapWindow.superclass.fillInTemplate.call(this);
this.attachNodes({mapWinGridBoxNodeDomId:"gridBoxNode",mapWinGMapBoxDomId:"gmapBoxNode"});
this.localContextMenu=radius.widget.create("PopupMenu",{},"mapWinLocalContextMenuDomId");
this.localContextMenu.render();
dojo.event.connectBefore(this.localContextMenu,"onOpen",this,"onLocalContextMenuOpen");
dojo.event.connect(this.localContextMenu,"onItemClick",this,"onLocalContextMenuClick");
this.userSelfContextMenu=radius.widget.create("PopupMenu",{},"mapWinUserSelfContextMenuDomId");
this.userSelfContextMenu.render();
dojo.event.connect(this.userSelfContextMenu,"onItemClick",this,"onUserSelfContextMenuClick");
if(this.backbone.scale){
radius.html.detachNode(this.backbone.scale);
this.domNode.appendChild(this.backbone.scale);
}
this._makeGrid();
this._makeIBar();
radius.html.handleSelectionState(this.domNode,false);
},_makeGrid:function(){
var _1=this.gridBoxNode.getElementsByTagName("img");
this.photoNodes=[];
this.photoHash={};
for(var n=0;n<_1.length;n++){
var pn=_1[n];
if(pn.className!="mapWinPhotoClass"){
continue;
}
pn.islocal=true;
pn.gx=parseInt(pn.getAttribute("x"));
pn.gy=parseInt(pn.getAttribute("y"));
this.photoNodes.push(pn);
this.photoHash[pn.gx+"_"+pn.gy]=pn;
}
this.photoNodes.sort(function(){
return Math.random()*2-1;
});
radius.html.detachNode(this.gridBoxNode);
this.domNode.appendChild(this.gridBoxNode);
},_makeIBar:function(){
var _4=dojo.byId("mapWinIBarDomId");
dojo.style.setOpacity(_4.childNodes[0],0.25,true);
dojo.style.setOpacity(_4.childNodes[1],0.7,true);
radius.html.handleSelectionState(_4,false);
},postCreate:function(){
this.filterBtn=radius.widget.create("ImageButton",{name:"map/filter39x19",width:39,height:19,onClick:dojo.lang.hitch(this,"filterClick")},"mapWinFilterBtnDomId");
this.favorBtn=radius.widget.create("ImageButton",{name:"map/favorites60x19",width:60,height:19,onClick:dojo.lang.hitch(this,"favoritesClick")},"mapWinFavorBtnDomId");
this.myprofileBtn=radius.widget.create("ImageButton",{name:"map/myprofile60x19",width:60,height:19,onClick:dojo.lang.hitch(this,"myprofileClick")},"mapWinMyprofileBtnDomId");
this.mylocBtn=radius.widget.create("ImageButton",{name:"map/myloc67x19",width:67,height:19,onClick:dojo.lang.hitch(this,"mylocClick")},"mapWinMylocBtnDomId");
this.helpBtn=radius.widget.create("ImageButton",{name:"map/help41x19",width:41,height:19,onClick:dojo.lang.hitch(this,"helpClick")},"mapWinHelpBtnDomId");
var o=this;
this.friendTooltip=radius.widget.create("SimpleTooltip",{width:65,opacity:0.85},"mapWinFriendTooltipDomId",true);
radius.widget.MapWindow.superclass.postCreate.call(this);
},onLoaded:function(){
this.prepareGMap();
radius.widget.MapWindow.superclass.onLoaded.call(this);
},prepareGMap:function(){
var _6="/gmap.html?version="+GLOBAL_CONFIG.version+"&build="+GLOBAL_CONFIG.build+"&mapWindowMap";
if(dojo.render.html.safari){
dojo.byId("mapWinGMapBoxDomId").src=_6;
}else{
top.frames["mapWinMapViewDomId"].location.replace(_6);
}
},makeResizeHandle:function(_7){
return new radius.widget.MapWindow.ResizeHandle(this,_7);
},onGridMouseMove:function(e){
var gw=this.gridBoxNode.offsetWidth;
var gh=this.gridBoxNode.offsetHeight;
var _b=this.iwidth+1;
var _c=this.iheight+1;
var p,g;
if(dojo.render.html.ie){
p=this.getCursorPos(window.event,this.gridBoxNode);
g=p.x>5&&p.y>5&&p.x<(gw-2)&&p.y<(gh-2)&&((p.x-6)%_b)!=this.iwidth&&((p.y-6)%_c)!=this.iheight;
p.x-=6;
p.y-=6;
}else{
p=this.getCursorPos(e,this.gridBoxNode);
g=p.x>3&&p.y>3&&p.x<(gw-4)&&p.y<(gh-4)&&((p.x-4)%_b)!=this.iwidth&&((p.y-4)%_c)!=this.iheight;
p.x-=4;
p.y-=4;
}
if(g){
var gx=Math.floor(p.x/_b);
var gy=Math.floor(p.y/_c);
var _10=this.photoHash[gx+"_"+gy];
if(_10&&_10.pdata){
if(this.currentPNode!=_10){
this.onCellHandle(this.currentPNode,_10);
this.currentPNode=_10;
}
return;
}
}
if(this.currentPNode){
this.onCellHandle(this.currentPNode,null);
this.currentPNode=null;
}
},isover:false,otid:null,onGridMouseOver:function(){
if(this.otid){
clearTimeout(this.otid);
this.otid=null;
}
if(this.isover){
return;
}
this.isover=true;
},onGridMouseOut:function(e){
if(this.otid){
clearTimeout(this.otid);
this.otid=null;
}
if(radius.html.contains(this.gridBoxNode,e?e.relatedTarget:window.event.toElement)){
this.otid=radius.setTimeoutM(this,this.onGridMouseOver,150,{});
return;
}
this.isover=false;
if(this.currentPNode!=null){
this.onCellHandle(this.currentPNode,null);
this.currentPNode=null;
}
},onCellHandle:function(_12,_13){
if(_12&&_12.pdata&&_12.pdata.rover){
_12.pdata.rover.goBack();
}
if(_13&&_13.pdata){
(_13.pdata.rover?_13.pdata.rover:new radius.widget.MapWindow.RolloverAnim(_13)).goForward();
}
},storeWinLocation:function(){
var _14=radius.widget.MapWindow.superclass.storeWinLocation.call(this);
_14.isMapWin=true;
_14.iw=this.iwidth;
_14.ih=this.iheight;
return _14;
},restoreWinLocation:function(_15){
if(!_15.isMapWin){
return radius.widget.MapWindow.superclass.restoreWinLocation.call(this,_15);
}
this.setPos({x:_15.x,y:_15.y});
this.resizeTo(_15.iw,_15.ih,true);
},resizeTo:function(iw,_ih,_18){
if(this.windowState=="minimized"){
return radius.widget.MapWindow.superclass.resizeTo.apply(this,arguments);
}
if(iw==this.iwidth&&!_18){
return;
}
var ih=Math.round(iw*3/4);
this.iwidth=iw;
this.iheight=ih;
var bw=iw*11+10;
var bh=ih*11+10;
this.domNode.style.visibility="hidden";
dojo.style.setOuterWidth(this.gridBoxNode,bw+8);
dojo.style.setOuterHeight(this.gridBoxNode,bh+8);
this.gmapBoxNode.style.left=(iw*2+5)+"px";
this.gmapBoxNode.style.top=(ih*2+5)+"px";
dojo.style.setOuterWidth(this.gmapBoxNode,iw*7+6);
dojo.style.setOuterHeight(this.gmapBoxNode,ih*7+6);
var _1c=iw+1;
var _1d=ih+1;
var _1e=iw+"px";
var _1f=ih+"px";
for(var n=0;n<this.photoNodes.length;n++){
var pn=this.photoNodes[n];
if(pn.pdata&&pn.pdata.rover){
pn.pdata.rover.complete(0);
}
pn.style.left=(pn.px=3+pn.gx*_1c)+"px";
pn.style.top=(pn.py=3+pn.gy*_1d)+"px";
pn.style.width=_1e;
pn.style.height=_1f;
}
if(dojo.render.html.ie){
var ww=bw+21;
var wh=bh+63;
radius.widget.MapWindow.superclass.resizeTo.call(this,ww+(ww&1),wh);
}else{
radius.widget.MapWindow.superclass.resizeTo.call(this,bw+21,bh+63);
}
this.domNode.style.visibility="visible";
var _24=radius.windows.getScrollWindow();
if(_24.isVisible()){
_24.autoPos();
}
var _25=radius.windows.getRecentWindow();
if(_25.isVisible()){
_25.autoPos();
}
},prepareResizeTo:function(w,h){
var iw=Math.floor((w-20)/11-1);
var ih=Math.floor((h-62)/11-1);
if(Math.abs(iw-this.iwidth)<Math.abs(ih-this.iheight)){
iw=Math.floor(ih*4/3);
}
if(iw<this.iwidthMin){
iw=this.iwidthMin;
}else{
if(iw>this.iwidthMax){
iw=this.iwidthMax;
}
}
this.resizeTo(iw);
},doMinimize:function(){
radius.widget.MapWindow.superclass.doMinimize.call(this);
this.gridBoxNode.style.display="none";
var _2a=radius.windows.getRecentWindow();
radius.html.hideAbs(_2a.domNode);
var _2b=radius.windows.getScrollWindow();
radius.html.hideAbs(_2b.domNode);
},doUnminimize:function(){
radius.widget.MapWindow.superclass.doUnminimize.call(this);
this.gridBoxNode.style.display="";
var _2c=radius.windows.getRecentWindow();
if(_2c.domNode.isshow){
radius.html.showAbs(_2c.domNode);
}else{
radius.html.hideAbs(_2c.domNode);
}
var _2d=radius.windows.getScrollWindow();
if(_2d.domNode.isshow){
radius.html.showAbs(_2d.domNode);
}else{
radius.html.hideAbs(_2d.domNode);
}
},closeWindow:function(){
radius.widget.MapWindow.superclass.closeWindow.call(this);
radius.windows.getLoginWindow().logout(true);
},onLocalContextMenuOpen:function(e,_2f){
var _30;
if(_2f.islocal){
var r=radius.windows.getRecentWindow().getUser(_2f.pdata.user.username);
_30=(r&&r.favorite)?"rff":"atf";
}else{
_30=_2f.pdata.user.favorite?"rff":"rfr";
}
this.localContextMenu.itemShow("addToFavor",_30=="atf");
this.localContextMenu.itemShow("removeFromFavor",_30=="rff");
this.localContextMenu.itemShow("removeFromRecent",_30=="rfr");
},onLocalContextMenuClick:function(e,_33,_34){
var pd=_34.pdata;
switch(_33.id){
case "profile":
radius.getRoster().showRadiusProfile(pd.user.username);
radius.windows.getRecentWindow().addRecent(pd.user);
break;
case "addToFavor":
radius.windows.getRecentWindow().addFavor(pd.user);
break;
case "removeFromRecent":
case "removeFromFavor":
radius.windows.getRecentWindow().removeUser(pd.user.username);
break;
case "sendMessage":
radius.getRoster().sendMessage("radius",pd.user.username);
radius.windows.getRecentWindow().addRecent(pd.user);
break;
case "addFriend":
radius.getRoster().addRadiusFriend(pd.user.username);
break;
}
return true;
},onUserSelfContextMenuClick:function(e,_37){
switch(_37.id){
case "settings":
this.settingsClick();
break;
case "profile":
this.showYourProfile();
break;
case "location":
this.mylocClick();
break;
}
return true;
},settingsClick:function(){
radius.loadingBar.callWithBar(function(){
var win=radius.windows.getSettingsWindow();
win.restoreFocus=radius.windows.rosterWin;
win.open(true);
});
},showYourProfile:function(){
radius.loadingBar.callWithBar(dojo.lang.hitch(this,this._showYourProfile));
},_showYourProfile:function(){
var win=radius.windows.getProfileWindow();
if(win.isVisible()&&win.username==null){
win.focus();
}else{
win.clear();
win.restoreFocus=this;
win.open();
}
},startUpdateLocals:function(_3a,_3b){
this.pageNumber=_3a;
if(this.updateLocalsTimeoutId!=null){
clearTimeout(this.updateLocalsTimeoutId);
this.updateLocalsTimeoutId=null;
}
if(!_3b){
this.updateLocalsTimeoutId=setTimeout(new Function("radius.windows.mapWin.updateLocals()"),this.updateLocalsSBarRespondTimeout);
}else{
this.updateLocals();
}
},updateLocals:function(_3c){
this.localContextMenu.close();
if(this.updateLocalsTimeoutId!=null){
clearTimeout(this.updateLocalsTimeoutId);
this.updateLocalsTimeoutId=null;
}
if(this.localsRequest){
this.localsRequest.cancel();
this.localsRequest=null;
}
var r=new radius.LocalsRequest("getLocals",_3c,new Function("radius.windows.mapWin.localsRequest = null; radius.windows.mapWin.updateLocalsGrid.apply(radius.windows.mapWin, arguments)"));
if(!_3c){
this.localsRequest=r;
}
r.onEnd=function(ex){
var w=radius.windows.mapWin;
if(w.localsLoadingBar){
w.localsLoadingBar=false;
radius.loadingBar.hideBar();
}
};
this.localsReqCount++;
r.send(this.pageNumber,this.gmapPos,this.filter);
},updateLocalsGrid:function(_40){
this.localsReqCount--;
this.localContextMenu.close();
if(dojo.render.html.moz){
this.img_prefix=radius.encodeURL("/images/img")+"?t="+new Date().valueOf()+"&";
}else{
this.img_prefix=radius.encodeURL("/images/img")+"?";
}
if(_40.filter){
this.filter=_40.filter;
}
var _41=Math.ceil(_40.totalNumber/this.photoNodes.length);
var _42=radius.windows.getScrollWindow();
if(_41>1){
this.pageNumber=_41;
var _43=_42.scrollBar;
_43.maxSliderPos=_41-1;
_43.sliderPos=_40.pageNumber-1;
if(!_42.isVisible()){
_42.show();
}else{
_43.updateState();
}
}else{
this.pageNumber=1;
if(_42.isVisible()){
_42.hide();
}
}
var n;
var _45=_40.locals.list;
this.gridBoxNode.style.visibility="hidden";
for(n=0;n<_45.length;n++){
var l=_45[n];
var pn=this.photoNodes[n];
var p=l.photoid?l.photoid:(l.gender=="M"?"nophotom":"nophotof");
pn.onload=null;
if(pn.pdata){
var pd=pn.pdata;
pd.user=l;
pd.pname=p;
if(pd.rover){
if(pd.rover.ibar){
radius.widget.MapWindow.updateIBar(l,pd.rover.ibar);
}
pn.onload=radius.widget.MapWindow.onloadfn;
}
}else{
pn.pdata={user:l,pname:p};
}
pn.src=this.img_prefix+"uname="+l.username+"&p="+p+"&size=48";
pn.style.cursor="pointer";
}
for(;n<this.photoNodes.length;n++){
var pn=this.photoNodes[n];
pn.onload=null;
if(pn.pdata){
var pd=pn.pdata;
if(pd.rover){
if(pd.rover.ibar){
radius.html.discardNode(pd.rover.ibar);
pd.rover.ibar=undefined;
}
pd.rover.complete(0);
}
}
pn.pdata=undefined;
pn.src="/images/emptycell_48.gif?version=RELEASE_0_27&build=200608281106";
pn.style.cursor="default";
}
this.gridBoxNode.style.visibility="visible";
},requestUpdateFriends:function(_4a){
if(this.gmap){
if(this.friendsRequest){
this.friendsRequest.cancel();
this.friendsRequest=null;
}
var r=new radius.LocalsRequest("getFriends",_4a,new Function("radius.windows.mapWin.friendsRequest = null; radius.windows.mapWin.updateFriends.apply(radius.windows.mapWin, arguments)"));
if(!_4a){
this.friendsRequest=r;
}
r.onEnd=function(ex){
var w=radius.windows.mapWin;
if(w.friendsLoadingBar){
w.friendsLoadingBar=false;
radius.loadingBar.hideBar();
}
};
r.send(this.gmapPos,this.gmap.ZoomTransitional_new2old(this.gmap.getZooming()));
}
},isBlocked:function(_4e){
var b=radius.IM.Ctx().getBuddyList().blocked["radius"];
return b?(b[_4e.toLowerCase()]?true:false):false;
},updateFriends:function(_50){
if(_50){
this.lastFriendsData=_50;
}else{
_50=this.lastFriendsData;
}
if(dojo.render.html.moz){
this.img_prefixf=radius.encodeURL("/images/img")+"?t="+new Date().valueOf()+"&";
}else{
this.img_prefixf=radius.encodeURL("/images/img")+"?";
}
if(this.friends!=undefined&&this.friends){
for(f in this.friends){
var m=this.friends[f];
this.gmap.removeFriend(m);
}
}
if(this.zoomOuts!=undefined&&this.zoomOuts){
for(z in this.zoomOuts){
var m=this.zoomOuts[z];
this.gmap.removeZoomOut(m);
}
}
var _52=_50.list;
var l=_52.length;
this.friends={};
this.zoomOuts={};
for(var i=0;i<l;++i){
var f=_52[i];
if(f.friends==undefined){
if(this.isBlocked(f.username)){
continue;
}
var fm=this.gmap.addFriend({id:f.username,imgSrc:this.img_prefixf+"uname="+f.username+"&p="+f.photoid+"&size=48"+(f.username.toLowerCase()==radius.loginedUsername?("&m="+radius.mymagicNumber):""),latitude:f.latitude,longitude:f.longitude,online:f.online});
this.friends[f.username]=[f,fm];
}else{
var nf={set:{}};
var c=0;
var ff;
for(p in f.friends.set){
if(!this.isBlocked(p)){
++c;
if(!ff){
ff=f.friends.set[p];
}
nf.set[p]=f.friends.set[p];
}
}
if(c==0){
continue;
}else{
if(c==1){
var fm=this.gmap.addFriend({id:ff.username,imgSrc:this.img_prefixf+"uname="+ff.username+"&p="+ff.photoid+"&size=48"+(ff.username.toLowerCase()==radius.loginedUsername?("&m="+radius.mymagicNumber):""),latitude:ff.latitude,longitude:ff.longitude,online:ff.online});
this.friends[ff.username]=[ff,fm];
}else{
var zm=this.gmap.addZoomOut({id:f.id,friends:nf,latitude:f.latitude,longitude:f.longitude});
this.zoomOuts[f.id]=[f,zm];
}
}
}
}
},removeUser:function(_5b){
radius.windows.getRecentWindow().removeUser(_5b);
this.removeUserFromGrid(_5b);
},removeUserFromGrid:function(_5c){
_5c=_5c.toLowerCase();
for(var n=0;n<this.photoNodes.length;n++){
var pn=this.photoNodes[n];
if(pn.pdata&&pn.pdata.user.username.toLowerCase()==_5c){
pn.onload=null;
var pd=pn.pdata;
if(pd.rover){
if(pd.rover.ibar){
radius.html.discardNode(pd.rover.ibar);
pd.rover.ibar=undefined;
}
pd.rover.complete(0);
}
pn.pdata=undefined;
pn.src="/images/emptycell_48.gif?version=RELEASE_0_27&build=200608281106";
break;
}
}
},onUpdateGMapPos:function(e){
var p=this.gmapPos;
p.longitude=e.longitude;
p.latitude=e.latitude;
p.longitude1=e.bounds.minX;
p.latitude1=e.bounds.minY;
p.longitude2=e.bounds.maxX;
p.latitude2=e.bounds.maxY;
this.startUpdateLocals(1);
this.requestUpdateFriends();
},onUpdateLocalsPage:function(_62){
this.startUpdateLocals(_62);
},filterClick:function(){
radius.loadingBar.callWithBar(new Function("radius.windows.mapWin._filterClick()"));
},_filterClick:function(){
if(this.filter){
radius.windows.getFilterWindow().open();
}
},favoritesClick:function(){
var _63=radius.windows.getRecentWindow();
if(_63.isVisible()){
_63.hide();
}else{
_63.show();
}
},myprofileClick:function(){
radius.loadingBar.callWithBar(function(){
var win=radius.windows.getSettingsWindow();
win.restoreFocus=this;
win.openPanel({tab:"profile"});
});
},_myprofileClick:function(){
radius.debug("opening settings window");
var win=radius.windows.getSettingsWindow().openPanel({tab:"profile"});
win.restoreFocus=this;
win.open(true);
},mylocClick:function(){
radius.loadingBar.callWithBar(new Function("radius.windows.mapWin._mylocClick()"));
},_mylocClick:function(){
var win=radius.windows.getLocationWindow();
win.restoreFocus=this;
win.open(true);
},addressClick:function(){
radius.loadingBar.callWithBar(new Function("radius.windows.mapWin._addressClick()"));
},_addressClick:function(){
var win=radius.windows.getFindAddressWindow();
win.restoreFocus=this;
win.open(true);
},recenterClick:function(){
if(this.userSelf&&this.userSelf[0]){
var u=this.userSelf[0];
var _69=u.latitude,longitude=u.longitude;
if(_69!=null&&longitude!=null){
if(this.gmap){
this.gmap.recenter(longitude,_69);
}
}
}
},helpClick:function(){
radius.loadingBar.callWithBar(new Function("radius.windows.mapWin._helpClick()"));
},_helpClick:function(){
radius.windows.getAboutWhatIsWindow().showFaq();
},onGMapLoaded:function(ge){
if(!this.localsLoadingBar){
this.localsLoadingBar=true;
radius.loadingBar.showBar();
}
if(!this.friendsLoadingBar){
this.friendsLoadingBar=true;
radius.loadingBar.showBar();
}
this.onUpdateGMapPos(ge);
if(this.gmapIsLoading){
this.gmapIsLoading=false;
radius.loadingBar.hideBar();
}
var t=this;
if(this.showMyLocationWin){
if(this.showMyLocationWin.win=="loc"){
setTimeout(function(){
var w=radius.windows.getLocationWindow();
w.formOnClose=t.showMyLocationWin.formOnClose;
w.open();
},radius.data.MyLocationWindowStartupDelay*1000);
}
}
},onGMapMoved:function(ge){
this.onUpdateGMapPos(ge);
},onGMapResized:function(ge){
},onGMapFriendClicked:function(m,ge){
},onGMapZoomOutClicked:function(m,ge){
},prepareLocation:function(){
var _73=new radius.LocalsRequest("findDefaultGMapCond",true).send(this.iwidth);
if(!_73){
_73={latitude:40.720472,longitude:-74.008381,zoomLevel:3};
}
var u=new radius.LocalsRequest("getUserInfo",true).send();
var _75;
try{
_75=radius.getLastLocation(u.username);
}
catch(e){
radius.debug("mapWindow.openGMap(): exception "+e.message);
}
if(_75&&_75.latitude!=null&&_75.longitude!=null){
_73.latitude=_75.latitude;
_73.longitude=_75.longitude;
try{
radius.saveLastLocation(u.username,_75);
radius.jsonrpc.location.saveLocationAndShowOnStartup(_75.latitude,_75.longitude,null,null);
}
catch(e){
radius.debug("mapWindow.openGMap(): exception "+e.message);
}
}
return _73;
},openGMap:function(_76){
if(!this.gmapIsLoading){
radius.loadingBar.showBar();
this.gmapIsLoading=true;
}
if(!mapWindowMap_isLoaded){
radius.setTimeoutM(this,"openGMap",50,_76);
return;
}
radius.loadingBar.callWithBar(new Function("gmapCond","radius.windows.mapWin._openGMap(gmapCond)"),_76);
},_openGMap:function(_77){
if(this.gmap==null){
this.gmap=new mapWindowMap_MapWidget(dojo.byId("mapWinGMapBoxDomId"),this.friendTooltip,this.userSelfContextMenu,radius.getRoster);
}
this.gmap.init(_77.longitude,_77.latitude,_77.zoomLevel,"GMapNestDomId",dojo.lang.hitch(this,"onGMapLoaded"));
this.gmap.initIcons({width:48,height:36},{width:82,height:40,src:"/images/people/friend_shadow.png?version=RELEASE_0_27&build=200608281106"},{width:50,height:38,src:"/images/friend_border.png?version=RELEASE_0_27&build=200608281106"},{width:1,height:1,src:"/images/x.png?version=RELEASE_0_27&build=200608281106"});
this.gmap.initUserIcons({width:52,height:40,src:"/images/user_border.png?version=RELEASE_0_27&build=200608281106"});
this.gmap.initZoomOutIcons({width:23,height:30,src:"/images/zoomout.png?version=RELEASE_0_27&build=200608281106"},{width:33,height:29,src:"/images/zoomout_shadow.png?version=RELEASE_0_27&build=200608281106"});
if(!this.gmapIsLoading){
this.gmapIsLoading=true;
radius.loadingBar.showBar();
}
this.gmap.load();
this.putUserOnMap();
if(this.userSelf){
this.gmap.recenter(this.userSelf[0].longitude,this.userSelf[0].latitude);
}
this.gmap.setActionCallback({onMove:dojo.lang.hitch(this,"onGMapMoved"),onResize:dojo.lang.hitch(this,"onGMapResized"),onFriendClick:dojo.lang.hitch(this,"onGMapFriendClicked"),onZoomOutClick:dojo.lang.hitch(this,"onGMapZoomOutClicked")});
this.gmap.addControlSet();
radius.html.attachEventM(this.gmap.buttons.address,"onclick",this,"addressClick",true);
radius.html.attachEventM(this.gmap.buttons.recenter,"onclick",this,"recenterClick",true);
},putUserOnMap:function(){
try{
var u=new radius.LocalsRequest("getUserInfo",true).send();
this.userSelf=[u,null];
}
catch(e){
radius.debug("mapWindow.putUserOnMap(): exception "+e.message);
}
},open:function(_79){
radius.loadingBar.callWithBar(new Function("show","radius.windows.mapWin._open(show)"),_79);
},_open:function(_7a){
this.img_prefix=radius.encodeURL("/images/img")+"?";
this.resizeTo(48);
this.iwidth=48;
radius.widget.MapWindow.superclass.open.call(this,_7a);
radius.windows.getScrollWindow().open(false);
radius.windows.getRecentWindow().open(false);
var _7b=this.prepareLocation();
this.openGMap(_7b);
},closeGMap:function(){
if(this.gmapIsLoading){
this.gmapIsLoading=false;
radius.loadingBar.hideBar();
}
if(this.gmap){
radius.html.detachEventM(this.gmap.buttons.address,"onclick",this,"addressClick",true);
radius.html.detachEventM(this.gmap.buttons.recenter,"onclick",this,"recenterClick",true);
this.gmap.kill();
}
},close:function(){
if(!this.isOpen){
return;
}
if(this.updateLocalsTimeoutId!=null){
clearTimeout(this.updateLocalsTimeoutId);
this.updateLocalsTimeoutId=null;
}
if(this.friendsRequest){
this.friendsRequest.cancel();
this.friendsRequest=null;
}
if(this.friendsLoadingBar){
this.friendsLoadingBar=false;
radius.loadingBar.hideBar();
}
if(this.localsRequest){
this.localsRequest.cancel();
this.localsRequest=null;
}
if(this.localsLoadingBar){
this.localsLoadingBar=false;
radius.loadingBar.hideBar();
}
this.lastFriendsData=undefined;
this.localsReqCount=1;
this.updateLocalsGrid({pageNumber:0,totalNumber:0,realTotalNumber:0,locals:{list:[]},filter:null});
this.userSelf=null;
this.filter=null;
this.localsReqCount=0;
this.iwidth=undefined;
this.closeGMap();
if(radius.windows.filterWin){
radius.windows.filterWin.close();
}
if(radius.windows.scrollWin){
radius.windows.scrollWin.close();
}
if(radius.windows.recentWin){
radius.windows.recentWin.close();
}
radius.widget.MapWindow.superclass.close.call(this);
},doActivate:function(_7c){
var isa=radius.widget.MapWindow.superclass.doActivate.call(this,_7c);
if(radius.windows.scrollWin){
radius.windows.recentWin.doActivate(_7c);
}
if(radius.windows.recentWin){
radius.windows.recentWin.doActivate(_7c);
}
return isa;
},doDisactivate:function(_7e){
var isa=radius.widget.MapWindow.superclass.doDisactivate.call(this,_7e);
if(radius.windows.scrollWin){
radius.windows.recentWin.doDisactivate(_7e);
}
if(radius.windows.recentWin){
radius.windows.recentWin.doDisactivate(_7e);
}
return isa;
},_:0});
radius.widget.addClass("MapWindow",radius.widget.MapWindow);
radius.widget.MapWindow.ResizeHandle=function(_80,_81){
radius.widget.ResizeHandle.call(this,_80,_81);
};
radius.inherits(radius.widget.MapWindow.ResizeHandle,radius.widget.ResizeHandle);
radius.extend(radius.widget.MapWindow.ResizeHandle,{beginSizing:function(e){
this.iwidthStart=this.targetWidget.iwidth;
},changeSizing:function(e,dx,dy){
var m=this.targetWidget;
m.gridBoxNode.style.visibility="hidden";
var iw=dx>=dy?Math.round(this.iwidthStart+dx/11):Math.round((this.iwidthStart*3/4+dy/11)*4/3);
if(iw<m.iwidthMin){
iw=m.iwidthMin;
}else{
if(iw>m.iwidthMax){
iw=m.iwidthMax;
}
}
m.resizeTo(iw);
m.gridBoxNode.style.visibility="visible";
}});
radius.widget.MapWindow.onloadfn=function(){
this.onload=null;
if(this.pdata){
this.src=radius.windows.mapWin.img_prefix+"uname="+this.pdata.user.username+"&p="+this.pdata.pname+"&size=96";
}
};
radius.widget.MapWindow.oncontextmenufn=function(e){
if(this.pdata){
radius.windows.mapWin.localContextMenu.onOpen(e?e:window.event,this);
}
return false;
};
radius.widget.MapWindow.updateIBar=function(u,_8a){
var t=_8a.childNodes[1];
var r=t.rows[0];
radius.html.setInnerText(r.cells[1],u.online?"[online]":"[offline]");
var tn=r.cells[0];
var _8e=u.username;
if(_8e&&_8e.length>0){
var _8f=t.parentNode.offsetWidth;
var e="";
while(1){
radius.html.setInnerText(tn,_8e+e);
if(t.offsetWidth<=_8f||!_8e.length){
break;
}
e="..";
_8e=_8e.substring(0,_8e.length-1);
}
if(!_8e.length){
radius.html.setInnerText(tn,"");
}
}else{
radius.html.setInnerText(tn,"");
}
};
radius.widget.MapWindow.showProfile=function(_91,go){
if(_91.clickto){
clearTimeout(_91.clickto);
}
if(!_91.pdata){
return;
}
if(go){
_91.clickto=undefined;
radius.windows.getRecentWindow().addRecent(_91.pdata.user);
radius.getRoster().showRadiusProfile(_91.pdata.user.username);
}else{
_91.clickto=radius.setTimeoutM(this,this.showProfile,300,_91,true);
}
};
radius.widget.MapWindow.sendMessage=function(_93){
if(_93.clickto){
clearTimeout(_93.clickto);
_93.clickto=undefined;
}
if(!_93.pdata){
return;
}
radius.windows.getRecentWindow().addRecent(_93.pdata.user);
radius.getRoster().sendMessage("radius",_93.pdata.user.username);
};
radius.widget.MapWindow.RolloverAnim=function(_94){
this.pnode=_94;
_94.pdata.rover=this;
radius.anim.Anim.call(this);
};
radius.inherits(radius.widget.MapWindow.RolloverAnim,radius.anim.Anim);
radius.extend(radius.widget.MapWindow.RolloverAnim,{duration:500,onAnim:function(_95){
var p=1-(1-_95)*(1-_95);
var pp=1+p;
var iw=radius.windows.mapWin.iwidth;
var ih=radius.windows.mapWin.iheight;
var s=this.pnode.style;
s.left=(this.pnode.px-iw*p/2)+"px";
s.top=(this.pnode.py-ih*p/2)+"px";
s.width=(iw*pp)+"px";
s.height=(ih*pp)+"px";
s.zIndex=Math.round(p*100);
return true;
},onStart:function(p){
var pd=this.pnode.pdata;
if(this.ibar){
radius.html.discardNode(this.ibar);
this.ibar=undefined;
}
if(p==0){
this.pnode.onload=null;
this.pnode.src=radius.windows.mapWin.img_prefix+"uname="+pd.user.username+"&p="+pd.pname+"&size=96";
this.pnode.style.border="1px solid #114588";
}else{
if(p==1){
}
}
return true;
},onEnd:function(p){
var pd=this.pnode.pdata;
if(this.ibar){
radius.html.discardNode(this.ibar);
this.ibar=undefined;
}
if(p==0){
this.pnode.onload=null;
this.pnode.src=radius.windows.mapWin.img_prefix+"uname="+pd.user.username+"&p="+pd.pname+"&size=48";
var s=this.pnode.style;
s.border="0px";
s.left=this.pnode.px+"px";
s.top=this.pnode.py+"px";
s.width=radius.windows.mapWin.iwidth+"px";
s.height=radius.windows.mapWin.iheight+"px";
s.zIndex="";
pd.rover=undefined;
this.pnode=undefined;
}else{
if(p==1){
var _a0=dojo.byId("mapWinIBarDomId").cloneNode(true);
_a0.style.width=(this.pnode.offsetWidth-2)+"px";
_a0.style.left=(this.pnode.offsetLeft+1)+"px";
_a0.style.top=(this.pnode.offsetTop+this.pnode.offsetHeight-13)+"px";
_a0.style.zIndex=this.pnode.style.zIndex;
this.pnode.parentNode.insertBefore(_a0,this.pnode.nextSibling);
this.ibar=_a0;
radius.widget.MapWindow.updateIBar(pd.user,_a0);
}
}
return true;
}});


dojo.provide("radius.widget.CheckBox");
radius.widget.CheckBox=function(){
radius.widget.BaseWindow.call(this);
};
radius.inherits(radius.widget.CheckBox,radius.widget.BaseWindow);
radius.extend(radius.widget.CheckBox,{widgetType:"CheckBox",isContainer:true,hideOnStartup:false,width:11,height:11,checked:false,prefixPath:"/images/cboxs/",over:false,pres:false,templateNode:"checkBoxTemplateDomId",fillInTemplate:function(){
radius.widget.CheckBox.superclass.fillInTemplate.call(this);
this.textNode=this.containerNode;
if(!this.name){
throw new Error("The checkbox name is not specified");
}
radius.html.mergeNodeData(this.srcNode,this.domNode);
if(dojo.lang.has(this.srcNode,"checked")){
this.checked=this.srcNode.checked;
}
if(this.textClass){
dojo.html.addClass(this.textNode,this.textClass);
}
if(this.textStyle){
this.textNode.style.cssText=this.textStyle;
}
},postCreate:function(){
var p={srcIsParent:true,prefixPath:this.prefixPath+this.name+"/",name:"on",width:this.width,height:this.height,over:this.over,pres:this.pres};
var _2=this;
this.onBtn=radius.widget.create("ImageButton",p,this.btnContainerNode);
this.onBtn.checkBox=this;
this.onBtn.onClick=this.onBtnClick;
p.name="off";
this.offBtn=radius.widget.create("ImageButton",p,this.btnContainerNode);
this.offBtn.checkBox=this;
this.offBtn.onClick=this.offBtnClick;
radius.widget.CheckBox.superclass.postCreate.call(this);
},onLoaded:function(){
var _3=this.checked;
this.domNode.checked=_3;
this.checked=null;
this.setState(_3);
},onBtnClick:function(){
this.checkBox.setState(false);
if(this.checkBox.onChange){
this.checkBox.onChange(false);
}
},offBtnClick:function(){
this.checkBox.setState(true);
if(this.checkBox.onChange){
this.checkBox.onChange(true);
}
},setState:function(_4){
if(this.checked!=_4){
if(_4){
this.offBtn.hide();
this.onBtn.show();
}else{
this.onBtn.hide();
this.offBtn.show();
}
this.checked=_4;
this.domNode.checked=_4;
}
}});
radius.widget.addClass("CheckBox",radius.widget.CheckBox);


dojo.provide("radius.widget.LocalsFilterWindow");
radius.widget.LocalsFilterWindow=function(){
radius.widget.DefaultWindow.call(this);
};
radius.inherits(radius.widget.LocalsFilterWindow,radius.widget.DefaultWindow);
radius.extend(radius.widget.LocalsFilterWindow,{widgetType:"LocalsFilterWindow",widgetId:"filterWin",caption:"filter locals",allowResize:false,width:dojo.render.html.ie?266:268,height:172,containTextInputs:true,d_c_maxb:null,d_c_minb:null,fillInTemplate:function(){
radius.widget.LocalsFilterWindow.superclass.fillInTemplate.call(this);
this.attachNodes({locFilterWinAgeMinDomId:"ageMinNode",locFilterWinAgeMaxDomId:"ageMaxNode"});
},postCreate:function(){
this.showMen=radius.widget.create("CheckBox",{name:"cbox11x11blue",textStyle:"font-size:11px;"},"locFilterWinShowMenDomId");
this.showWomen=radius.widget.create("CheckBox",{name:"cbox11x11blue",textStyle:"font-size:11px;"},"locFilterWinShowWomenDomId");
this.showOffline=radius.widget.create("CheckBox",{name:"cbox11x11blue",textStyle:"font-size:11px;"},"locFilterWinShowOfflineDomId");
this.showOnlyWithPics=radius.widget.create("CheckBox",{name:"cbox11x11blue",textStyle:"font-size:11px;"},"locFilterWinShowOnlyWithPicsDomId");
this.saveBtn=radius.widget.create("ImageButton",{name:"save72x21",width:72,height:21,onClick:function(){
radius.windows.filterWin.saveClick();
}},"locFilterWinSaveBtnDomId");
this.cancelBtn=radius.widget.create("ImageButton",{name:"cancel72x21",width:72,height:21,onClick:function(){
radius.windows.filterWin.closeWindow();
}},"locFilterWinCancelBtnDomId");
radius.widget.LocalsFilterWindow.superclass.postCreate.call(this);
},updateFilter:function(f){
this.ageMinNode.value=f.ageMin;
this.ageMaxNode.value=f.ageMax;
this.showMen.setState(f.showMen);
this.showWomen.setState(f.showWomen);
this.showOffline.setState(f.showOffline);
this.showOnlyWithPics.setState(f.showOnlyWithPics);
},saveClick:function(){
var f=radius.windows.mapWin.filter;
if(f.ageMin!=this.ageMinNode.value||f.ageMax!=this.ageMaxNode.value||f.showMen!=this.showMen.checked||f.showWomen!=this.showWomen.checked||f.showOffline!=this.showOffline.checked||f.showOnlyWithPics!=this.showOnlyWithPics.checked){
f.ageMin=parseInt(this.ageMinNode.value);
f.ageMax=parseInt(this.ageMaxNode.value);
f.showMen=this.showMen.checked;
f.showWomen=this.showWomen.checked;
f.showOffline=this.showOffline.checked;
f.showOnlyWithPics=this.showOnlyWithPics.checked;
radius.windows.mapWin.startUpdateLocals(1,true);
new radius.LocalsRequest("updateLocalsFilter").send(f);
}
this.closeWindow();
},closeWindow:function(){
radius.widget.LocalsFilterWindow.superclass.closeWindow.call(this);
this.close();
},open:function(_3){
var f=radius.windows.mapWin.filter;
if(!f){
return;
}
radius.widget.LocalsFilterWindow.superclass.open.call(this,_3);
this.updateFilter(f);
}});
radius.widget.addClass("LocalsFilterWindow",radius.widget.LocalsFilterWindow);


dojo.provide("radius.widget.ScrollBar");
dojo.provide("radius.widget.VScrollBar");
radius.widget.ScrollBar=function(){
radius.widget.BaseWindow.call(this);
};
radius.inherits(radius.widget.ScrollBar,radius.widget.BaseWindow);
radius.extend(radius.widget.ScrollBar,{prefixPath:"/images/sbars/",templateCssPath:null,width:0,height:0,autoResizeSlider:true,maxSliderPos:100,sliderPos:0,sliderSize:1,clickIncrement:1,clickTimeout:300,repeatTimeout:10,_clickTimeoutId:null,_repeatIntervalId:null,fillInTemplate:function(){
radius.widget.ScrollBar.superclass.fillInTemplate.call(this);
if(!this.name){
throw new Error("The scroll bar name is not specified");
}
radius.html.mergeNodeData(this.srcNode,this.domNode);
},preLoading:function(){
radius.widget.ScrollBar.superclass.preLoading.call(this);
var _1=this.prefixPath+this.name+"/";
var c=this.config;
if(c.track){
if(c.track.img1){
radius.image.loadImage(_1+"track/img2.png?version=RELEASE_0_27&build=200608281106");
}
radius.image.loadImage(_1+"track/imgc.png?version=RELEASE_0_27&build=200608281106");
if(c.track.img2){
radius.image.loadImage(_1+"track/img1.png?version=RELEASE_0_27&build=200608281106");
}
}
if(c.slider.img1){
radius.image.loadImage(_1+"slider/img2.png?version=RELEASE_0_27&build=200608281106");
}
radius.image.loadImage(_1+"slider/imgc.png?version=RELEASE_0_27&build=200608281106");
if(c.slider.img2){
radius.image.loadImage(_1+"slider/img1.png?version=RELEASE_0_27&build=200608281106");
}
if(c.slider.imgcc){
radius.image.loadImage(_1+"slider/imgcc.png?version=RELEASE_0_27&build=200608281106");
}
},postCreate:function(){
var _3=this.prefixPath+this.name+"/";
var c=this.config;
var p={prefixPath:_3+"btns/",name:"btn1",width:c.btns.width,height:c.btns.height,over:c.btns.over,pres:c.btns.pres,onDown:dojo.lang.hitch(this,"_downBtn1"),onUp:dojo.lang.hitch(this,"_upBtns")};
this.btn1=radius.widget.create("ImageButton",p,this.btn1Node);
p.name="btn2";
p.onDown=dojo.lang.hitch(this,"_downBtn2");
this.btn2=radius.widget.create("ImageButton",p,this.btn2Node);
if(c.track){
if(c.track.img1){
var _6=radius.image.makePngNode(_3+"track/img1.png?version=RELEASE_0_27&build=200608281106",null,c.track.img1);
radius.style.setStyles(_6,c.track.img1);
this.track1Node.appendChild(_6);
}else{
radius.html.discardNode(this.track1Node);
}
this.trackImgcNode=radius.image.makePngNode(_3+"track/imgc.png?version=RELEASE_0_27&build=200608281106","scale",c.track.imgc);
radius.style.setStyles(this.trackImgcNode,c.track.imgc);
radius.style.setStyles(this.trackImgcNode,this.sizingStyles);
this.trackcNode.appendChild(this.trackImgcNode);
if(c.track.img2){
var _7=radius.image.makePngNode(_3+"track/img2.png?version=RELEASE_0_27&build=200608281106",c.track.img2);
radius.style.setStyles(_7,c.track.img2);
this.track2Node.appendChild(_7);
}else{
radius.html.discardNode(this.track2Node);
}
}else{
radius.html.discardNode(this.trackNode);
}
if(c.slider.img1){
var _6=radius.image.makePngNode(_3+"slider/img1.png?version=RELEASE_0_27&build=200608281106",c.slider.img1);
radius.style.setStyles(_6,c.slider.img1);
this.slider1Node.appendChild(_6);
}else{
radius.html.discardNode(this.slider1Node);
}
this.sliderImgcNode=radius.image.makePngNode(_3+"slider/imgc.png?version=RELEASE_0_27&build=200608281106","scale",c.slider.imgc);
radius.style.setStyles(this.sliderImgcNode,c.slider.imgc);
radius.style.setStyles(this.sliderImgcNode,this.sizingStyles);
this.slidercNode.appendChild(this.sliderImgcNode);
if(c.slider.img2){
var _7=radius.image.makePngNode(_3+"slider/img2.png?version=RELEASE_0_27&build=200608281106",c.slider.img2);
radius.style.setStyles(_7,c.slider.img2);
this.slider2Node.appendChild(_7);
}else{
radius.html.discardNode(this.slider2Node);
}
if(c.slider.imgcc){
var _8=radius.image.makePngNode(_3+"slider/imgcc.png?version=RELEASE_0_27&build=200608281106",c.slider.imgcc);
radius.style.setStyles(_8,c.slider.imgcc);
radius.style.setStyles(_8,{position:"absolute",left:"50%",top:"50%",marginLeft:(-c.slider.imgcc.width/2),marginTop:(-c.slider.imgcc.height/2)});
this.sliderNode.appendChild(_8);
}
this.sliderZoneNode=this.sliderNode;
this._doInitialize(c);
radius.widget.ScrollBar.superclass.postCreate.call(this);
},onLoaded:function(){
radius.widget.ScrollBar.superclass.onLoaded.call(this);
this.updateState();
radius.html.attachEventM(this.sliderZoneNode,"onmousedown",this,"_startSliding");
},_downBtn1:function(){
this._goClick(-this.clickIncrement);
},_downBtn2:function(){
this._goClick(this.clickIncrement);
},_upBtns:function(){
if(this._repeatIntervalId!=null){
clearInterval(this._repeatIntervalId);
this._repeatIntervalId=null;
}
if(this._clickTimeoutId!=null){
clearTimeout(this._clickTimeoutId);
this._clickTimeoutId=null;
}
},_goClick:function(ds){
this.setSliderPos(this.sliderPos+ds);
var _a=this;
if(this._repeatIntervalId!=null){
clearInterval(this._repeatIntervalId);
this._repeatIntervalId=null;
}
if(this._clickTimeoutId!=null){
clearTimeout(this._clickTimeoutId);
}
this._clickTimeoutId=setTimeout(function(){
_a._firstClick(ds);
},this.clickTimeout);
},_firstClick:function(ds){
this._clickTimeoutId=null;
var _c=this;
if(this._repeatIntervalId!=null){
clearInterval(this._repeatIntervalId);
}
this._repeatIntervalId=setInterval(function(){
_c._repeatClick(ds);
},this.repeatTimeout);
},_repeatClick:function(ds){
this.setSliderPos(this.sliderPos+ds);
},_startSliding:function(e){
if(this.isSliding){
return false;
}
this.isSliding=true;
this.startPosition={x:this.sliderNode.offsetLeft,y:this.sliderNode.offsetTop};
this.startPoint={x:e.clientX,y:e.clientY};
radius.html.attachEventM(document.body,"onmousemove",this,"_processSliding");
radius.html.attachEventM(document.body,"onmouseup",this,"_endSliding",true);
if(dojo.render.html.ie){
radius.html.attachEventM(this.sliderZoneNode,"ondragstart",this,"_endSliding",true);
}
e.preventDefault();
},_processSliding:function(e){
if(!e||!e.clientX||!e.clientY){
return;
}
var ds=this._pxDSize(e);
var _11=this._pxMaxSliderPos();
var _12=this._startpxSliderPos();
var _13=this._pxSliderSize();
var _14=_12+ds;
var _15=this._pxSliderPos();
if(_14<0){
_14=0;
}else{
var _16=_11-_13;
if(_14>_16){
_14=_16;
}
}
if(_14!=_15){
var _17=this.maxSliderPos*_14/(_11-_13);
var _18=this.onSliding(_17);
if(_18!=null){
if(_18!=_17){
_14=_18*(_11-_13)/this.maxSliderPos;
}
this.sliderPos=_18;
this._setpxSliderPos(_14);
}
}
e.preventDefault();
},_endSliding:function(){
radius.html.detachEventM(document.body,"onmousemove",this,"_processSliding");
radius.html.detachEventM(document.body,"onmouseup",this,"_endSliding",true);
if(dojo.render.html.ie){
radius.html.detachEventM(this.sliderZoneNode,"ondragstart",this,"_endSliding",true);
}
this.isSliding=false;
},onSliding:function(_19){
return _19;
},updateState:function(){
if(this.isSliding){
this._endSliding();
}
if(this.sliderPos<0){
this.sliderPos=0;
}else{
if(this.sliderPos>this.maxSliderPos){
this.sliderPos=this.maxSliderPos;
}
}
var _1a=this._pxMaxSliderPos();
var _1b;
if(this.autoResizeSlider){
_1b=this.sliderSize*_1a/(this.maxSliderPos+this.sliderSize);
}else{
_1b=this.sliderSize;
}
_1b=Math.max(_1b,this.sliderMinSize);
var _1c=(this.maxSliderPos!=0)?(this.sliderPos*(_1a-_1b)/this.maxSliderPos):0;
this._setpxSliderPos(_1c);
this._setpxSlideSize(_1b);
},setSliderPos:function(_1d){
if(this.isSliding){
this._endSliding();
}
var _1e=this.sliderPos;
if(_1d<0){
_1d=0;
}else{
if(_1d>this.maxSliderPos){
_1d=this.maxSliderPos;
}
}
if(_1d!=_1e){
_1e=_1d;
_1d=this.onSliding(_1d);
if(_1d!=null){
var _1f=_1d*(this._pxMaxSliderPos()-this._pxSliderSize())/this.maxSliderPos;
this.sliderPos=_1d;
this._setpxSliderPos(_1f);
}
}
},_:0});
radius.widget.VScrollBar=function(){
radius.widget.ScrollBar.call(this);
};
radius.inherits(radius.widget.VScrollBar,radius.widget.ScrollBar);
radius.extend(radius.widget.VScrollBar,{sizingStyles:{height:"100%"},allowDrag:{disableX:true,disableY:false},templateNode:"vscrollBarTemplateDomId",_doInitialize:function(c){
this.sliderNode.style.marginLeft=-c.slider.imgc.width/2;
this.sliderMinSize=c.slider.imgcc?Math.max(c.slider.imgc.height,c.slider.imgcc.height):c.slider.imgc.height;
if(c.slider.img1){
this.sliderMinSize+=c.slider.img1.height;
}
if(c.slider.img2){
this.sliderMinSize+=c.slider.img2.height;
}
},_pxDSize:function(e){
return e.clientY-this.startPoint.y;
},_pxMaxSliderPos:function(){
return dojo.style.getOuterHeight(this.sliderContainerNode);
},_pxSliderSize:function(){
return dojo.style.getOuterHeight(this.sliderNode);
},_pxSliderPos:function(){
return this.sliderNode.offsetTop;
},_startpxSliderPos:function(){
return this.startPosition.y;
},_setpxSliderPos:function(_22){
this.sliderNode.style.top=_22+"px";
},_setpxSlideSize:function(_23){
dojo.style.setOuterHeight(this.sliderNode,_23);
}});
radius.widget.HScrollBar=function(){
radius.widget.ScrollBar.call(this);
};
radius.inherits(radius.widget.HScrollBar,radius.widget.ScrollBar);
radius.extend(radius.widget.HScrollBar,{sizingStyles:{width:"100%"},allowDrag:{disableX:false,disableY:true},templateNode:"hscrollBarTemplateDomId",_doInitialize:function(c){
this.sliderNode.style.marginTop=-c.slider.imgc.height/2;
this.sliderMinSize=c.slider.imgcc?Math.max(c.slider.imgc.width,c.slider.imgcc.width):c.slider.imgc.width;
if(c.slider.img1){
this.sliderMinSize+=c.slider.img1.width;
}
if(c.slider.img2){
this.sliderMinSize+=c.slider.img2.width;
}
},_pxDSize:function(e){
return e.clientX-this.startPoint.x;
},_pxMaxSliderPos:function(){
return dojo.style.getOuterWidth(this.sliderContainerNode);
},_pxSliderSize:function(){
return dojo.style.getOuterWidth(this.sliderNode);
},_pxSliderPos:function(){
return this.sliderNode.offsetLeft;
},_startpxSliderPos:function(){
return this.startPosition.x;
},_setpxSliderPos:function(_26){
this.sliderNode.style.left=_26+"px";
},_setpxSlideSize:function(_27){
dojo.style.setOuterWidth(this.sliderNode,_27);
}});


dojo.provide("radius.widget.LocalsScrollBar");
radius.widget.LocalsScrollBar=function(){
radius.widget.VScrollBar.call(this);
};
radius.inherits(radius.widget.LocalsScrollBar,radius.widget.VScrollBar);
radius.extend(radius.widget.LocalsScrollBar,{widgetType:"LocalsScrollBar",name:"locals",config:{btns:{over:false,pres:false,width:16,height:16},track:{img1:{width:10,height:5},imgc:{width:10,height:4},img2:{width:10,height:5}},slider:{img1:{width:19,height:5},imgc:{width:19,height:1},img2:{width:19,height:6},imgcc:{width:19,height:6}}},autoResizeSlider:true,maxSliderPos:5,sliderPos:0,sliderSize:1,clickIncrement:1,onSliding:function(_1){
_1=Math.round(_1);
if(_1==this.sliderPos){
return null;
}
radius.windows.mapWin.onUpdateLocalsPage(_1+1);
return _1;
}});
radius.widget.addClass("LocalsScrollBar",radius.widget.LocalsScrollBar);


dojo.provide("radius.widget.MScrollWindow");
dojo.fx.html.toggle.mscroll_win_effect={init:function(_1){
_1.domNode.isshow=false;
this.win=_1;
this.anim=new radius.anim.Anim(_1.toggleDuration);
this.anim.onAnim=new Function("p","return dojo.fx.html.toggle.mscroll_win_effect.onAnim(p)");
this.anim.onStart=new Function("p","return dojo.fx.html.toggle.mscroll_win_effect.onStart(p)");
this.anim.onEnd=new Function("p","return dojo.fx.html.toggle.mscroll_win_effect.onEnd(p)");
},onAnim:function(p){
if(!this.win.posLeft){
this.anim.complete(0);
return false;
}
this.win.domNode.style.left=(this.win.posLeft-dojo.style.getInnerWidth(this.win.domNode)*(1-p))+"px";
return true;
},onStart:function(p){
if(p==0){
if(radius.windows.mapWin.windowState!="minimized"){
radius.html.showAbs(this.win.domNode);
}
this.win.domNode.isshow=true;
}
return true;
},onEnd:function(p){
if(p==0){
if(radius.windows.mapWin.windowState!="minimized"){
radius.html.hideAbs(this.win.domNode);
}
this.win.domNode.isshow=false;
}
return true;
},show:function(_5,_6,_7,_8){
this.anim.goForward();
},hide:function(_9,_a,_b,_c){
this.anim.goBack();
}};
radius.widget.MScrollWindow=function(){
radius.widget.DefaultWindow.call(this);
};
radius.inherits(radius.widget.MScrollWindow,radius.widget.DefaultWindow);
radius.extend(radius.widget.MScrollWindow,{widgetType:"MScrollWindow",widgetId:"scrollWin",constrainToContainer:false,allowResize:false,allowTopping:false,hideOnStartup:true,resizeOnStartup:false,width:25,height:263,toggleDuration:500,toggle:"mscroll_win_effect",windowResized:null,d_ul:null,d_u:{dsize:8,style:"width:1px; height:9px; position:absolute; left:0px; top:0px",src:"/images/wins/bb_u_1x9mscroll.png?version=RELEASE_0_27&build=200608281106"},d_ur:{style:"width:14px; height:9px; position:absolute; right:0px; top:0px",src:"/images/wins/bb_ur_14x9mscroll.png?version=RELEASE_0_27&build=200608281106"},d_l:null,d_r:{dsize:18,style:"width:14px; height:1px; position:absolute; right:0px; top:9px",src:"/images/wins/bb_r_8x1mscroll.png?version=RELEASE_0_27&build=200608281106"},d_dl:null,d_d:{dsize:8,style:"width:1px; height:9px; position:absolute; left:0px; bottom:0px",src:"/images/wins/bb_d_1x9mscroll.png?version=RELEASE_0_27&build=200608281106"},d_dr:{style:"width:14px; height:9px; position:absolute; right:0px; bottom:0px",src:"/images/wins/bb_dr_14x8mscroll.png?version=RELEASE_0_27&build=200608281106"},caption:null,d_c_closeb:null,d_c_maxb:null,d_c_minb:null,sd_dl:null,sd_d:{dsize:0,style:"width:1px; height:18px; position:absolute; left:0px; bottom:-18px",src:"/images/wins/sh_d_1x18.png?version=RELEASE_0_27&build=200608281106"},sd_minWidth:1,postCreate:function(){
this.scrollBar=radius.widget.create("LocalsScrollBar",{},"mscrollWinLocalsScrollBarDomId");
this.scrollBar.scrollWin=this;
radius.widget.MScrollWindow.superclass.postCreate.call(this);
},onLoaded:function(){
radius.widget.MScrollWindow.superclass.onLoaded.call(this);
this.open(false);
},isVisible:function(){
return this.toggleObj.anim?this.toggleObj.anim.percent!=0:false;
},autoPos:function(){
this.posLeft=radius.windows.mapWin.width-4;
this.setPos({left:this.posLeft,top:(radius.windows.mapWin.captionHeight+(radius.windows.mapWin.height-radius.windows.mapWin.captionHeight)/2-this.height/2)});
},show:function(){
if(radius.windows.mapWin){
this.resizeTo(this.width,this.height);
this.autoPos();
}
radius.widget.MScrollWindow.superclass.show.call(this);
this.scrollBar.updateState();
},close:function(){
radius.widget.MScrollWindow.superclass.close.call(this);
this.domNode.style.display="none";
}});
radius.widget.addClass("MScrollWindow",radius.widget.MScrollWindow);


dojo.provide("radius.widget.RecentWindow");
dojo.fx.html.toggle.recent_win_effect={init:function(_1){
_1.domNode.isshow=false;
this.win=_1;
this.anim=new radius.anim.Anim(_1.toggleDuration);
this.anim.onAnim=new Function("p","return dojo.fx.html.toggle.recent_win_effect.onAnim(p)");
this.anim.onStart=new Function("p","return dojo.fx.html.toggle.recent_win_effect.onStart(p)");
this.anim.onEnd=new Function("p","return dojo.fx.html.toggle.recent_win_effect.onEnd(p)");
},onAnim:function(p){
if(!this.win.posTop){
this.anim.complete(0);
return false;
}
this.win.domNode.style.top=(this.win.posTop-dojo.style.getInnerHeight(this.win.domNode)*(1-p))+"px";
return true;
},onStart:function(p){
if(p==0){
if(radius.windows.mapWin.windowState!="minimized"){
radius.html.showAbs(this.win.domNode);
}
this.win.domNode.isshow=true;
}
return true;
},onEnd:function(p){
if(p==0){
if(radius.windows.mapWin.windowState!="minimized"){
radius.html.hideAbs(this.win.domNode);
}
this.win.domNode.isshow=false;
}
return true;
},show:function(_5,_6,_7,_8){
this.anim.goForward();
},hide:function(_9,_a,_b,_c){
this.anim.goBack();
}};
radius.widget.RecentWindow=function(){
radius.widget.DefaultWindow.call(this);
};
radius.inherits(radius.widget.RecentWindow,radius.widget.DefaultWindow);
radius.extend(radius.widget.RecentWindow,{widgetType:"RecentWindow",widgetId:"recentWin",constrainToContainer:false,allowResize:false,allowTopping:false,hideOnStartup:true,resizeOnStartup:false,toggleDuration:300,toggle:"recent_win_effect",windowResized:null,d_ul:null,d_u:null,d_ur:null,d_l:{dsize:6,style:"width:6px; height:1px; position:absolute; left:0px; top:0px",src:"/images/wins/bb_l_6x1cyan.png?version=RELEASE_0_27&build=200608281106",src0:"/images/wins/bb_l_6x1cyan_out.png?version=RELEASE_0_27&build=200608281106"},d_r:{dsize:6,style:"width:6px; height:1px; position:absolute; right:0px; top:0px",src:"/images/wins/bb_r_6x1cyan.png?version=RELEASE_0_27&build=200608281106",src0:"/images/wins/bb_r_6x1cyan_out.png?version=RELEASE_0_27&build=200608281106"},caption:null,d_c_closeb:null,d_c_maxb:null,d_c_minb:null,sd_ur:null,sd_r:{dsize:0,style:"width:14px; height:1px; position:absolute; right:-14px; top:0px",src:"/images/wins/sh_r_14x1.png?version=RELEASE_0_27&build=200608281106"},sd_minHeight:1,fillInTemplate:function(){
radius.widget.RecentWindow.superclass.fillInTemplate.call(this);
this.attachNodes({recentWinGridBoxNodeDomId:"gridBoxNode",recentWinUpBarTextDomId:"upBarTextNode",recentWinNavDomId:"navNode",recentWinNavMoreDomId:"navMoreNode",recentWinNavBackDomId:"navBackNode"});
this._makeGrid();
radius.html.handleSelectionState(this.domNode,false);
},_makeGrid:function(){
this._makeIBar();
var _d=this.gridBoxNode.getElementsByTagName("img");
this.photoNodes=[];
this.ibars=[];
var _e=dojo.byId(radius.widget.RecentWindow.ibarDomId);
for(var n=0;n<_d.length;n++){
var pn=_d[n];
if(pn.className!="recentWinPhotoClass"){
continue;
}
pn.gx=parseInt(pn.getAttribute("x"));
pn.py=24;
this.photoNodes.push(pn);
var _11=_e.cloneNode(true);
pn.parentNode.insertBefore(_11,pn.nextSibling);
this.ibars.push(_11);
pn.oncontextmenu=radius.widget.MapWindow.oncontextmenufn;
}
radius.html.detachNode(this.gridBoxNode);
this.domNode.appendChild(this.gridBoxNode);
},_makeIBar:function(){
var _12=dojo.byId(radius.widget.RecentWindow.ibarDomId);
dojo.style.setOpacity(_12.childNodes[0],0.25,true);
dojo.style.setOpacity(_12.childNodes[1],0.7,true);
radius.html.handleSelectionState(_12,false);
},postCreate:function(){
this.showFavors=radius.widget.create("CheckBox",{name:"cbox11x11black",onChange:dojo.lang.hitch(this,this.showFavorsChange)},"recentWinFavorChkboxDomId");
this.showRecents=radius.widget.create("CheckBox",{name:"cbox11x11black",onChange:dojo.lang.hitch(this,this.showRecentChange)},"recentWinRecentChkboxDomId");
this.closeBtn=radius.widget.create("ImageButton",{prefixPath:"/images/wins/btns/",name:"close14x14",width:14,height:14,onClick:dojo.lang.hitch(this,this.hide)},"recentWinCloseBtnDomId");
radius.widget.RecentWindow.superclass.postCreate.call(this);
},onGridMouseMove:function(e){
var gw=this.gridBoxNode.offsetWidth;
var gh=this.gridBoxNode.offsetHeight;
var _16=this.iwidth+1;
var _17=this.iheight+1;
var p,g;
if(dojo.render.html.ie){
p=this.getCursorPos(window.event,this.gridBoxNode);
g=p.x>5&&p.y>26&&p.x<(gw-2)&&p.y<(gh-2)&&((p.x-6)%_16)!=this.iwidth&&((p.y-27)%_17)!=this.iheight;
p.x-=6;
p.y-=27;
}else{
p=this.getCursorPos(e,this.gridBoxNode);
g=p.x>3&&p.y>24&&p.x<(gw-4)&&p.y<(gh-4)&&((p.x-4)%_16)!=this.iwidth&&((p.y-25)%_17)!=this.iheight;
p.x-=4;
p.y-=25;
}
if(g){
var gx=Math.floor(p.x/_16);
var _1a=this.photoNodes[gx];
if(_1a&&_1a.pdata){
if(this.currentPNode!=_1a){
this.onCellHandle(this.currentPNode,_1a);
this.currentPNode=_1a;
}
return;
}
}
if(this.currentPNode){
this.onCellHandle(this.currentPNode,null);
this.currentPNode=null;
}
},isover:false,otid:null,onGridMouseOver:function(){
if(this.otid){
clearTimeout(this.otid);
this.otid=null;
}
if(this.isover){
return;
}
this.isover=true;
},onGridMouseOut:function(e){
if(this.otid){
clearTimeout(this.otid);
this.otid=null;
}
if(radius.html.contains(this.gridBoxNode,e?e.relatedTarget:window.event.toElement)){
this.otid=radius.setTimeoutM(this,this.onGridMouseOver,150,{});
return;
}
this.isover=false;
if(this.currentPNode!=null){
this.onCellHandle(this.currentPNode,null);
this.currentPNode=null;
}
},onCellHandle:function(_1c,_1d){
if(_1c&&_1c.pdata&&_1c.pdata.rover){
_1c.pdata.rover.goBack();
}
if(_1d&&_1d.pdata&&_1d.style.display!="none"){
(_1d.pdata.rover?_1d.pdata.rover:new radius.widget.MapWindow.RolloverAnim(_1d)).goForward();
}
},isVisible:function(){
return this.toggleObj.anim?this.toggleObj.anim.percent!=0:false;
},autoPos:function(){
var _1e=radius.windows.mapWin;
this.resizeTo(_1e.iwidth,_1e.iheight);
this.posTop=_1e.height-(dojo.render.html.ie?2:1);
this.setPos({left:(_1e.width/2-this.width/2),top:this.posTop});
},show:function(){
if(radius.windows.mapWin){
this.domNode.style.visibility="hidden";
this.domNode.style.display="";
this.autoPos();
this.domNode.style.display="none";
this.domNode.style.visibility="visible";
}
radius.widget.RecentWindow.superclass.show.call(this);
},resizeNav:function(iw,ih){
this.navNode.style.left=(3+9*(iw+1))+"px";
var _21=this.mapWin.iwidthMin;
this.navMoreNode.style.fontSize=this.navBackNode.style.fontSize=Math.round(8+(iw-_21)/(48-_21))+"px";
if(dojo.render.html.ie){
dojo.style.setOuterWidth(this.navNode,iw);
dojo.style.setOuterHeight(this.navNode,ih);
}else{
this.navNode.style.width=iw+"px";
this.navNode.style.height=ih+"px";
}
},resizeTo:function(iw,ih){
if(iw==this.iwidth){
return;
}
if(!ih){
ih=Math.round(iw*3/4);
}
this.iwidth=iw;
this.iheight=ih;
var bw=iw*10+9;
var bh=ih;
this.domNode.style.visibility="hidden";
dojo.style.setOuterWidth(this.gridBoxNode,bw+8);
dojo.style.setOuterHeight(this.gridBoxNode,bh+28);
var _26=iw+1;
var _27=iw+"px";
var _28=ih+"px";
var _29=(ih+11)+"px";
if(dojo.render.html.ie){
for(var n=0;n<this.photoNodes.length;n++){
var pn=this.photoNodes[n];
var _2c=this.ibars[n];
if(pn.pdata&&pn.pdata.rover){
pn.pdata.rover.complete(0);
}
pn.style.left=_2c.style.left=(pn.px=3+pn.gx*_26)+"px";
_2c.style.top=_29;
pn.style.width=_2c.style.width=_27;
pn.style.height=_28;
}
}else{
for(var n=0;n<this.photoNodes.length;n++){
var pn=this.photoNodes[n];
var _2c=this.ibars[n];
pn.style.left=_2c.style.left=(pn.px=3+pn.gx*_26)+"px";
_2c.style.top=_29;
pn.style.width=_2c.style.width=_27;
pn.style.height=_28;
if(pn.pdata){
if(pn.pdata.rover){
pn.pdata.rover.complete(0);
}
radius.widget.RecentWindow.updateIBar(pn.pdata.user,_2c,iw);
}
}
}
this.resizeNav(iw,ih);
this.upBarTextNode.style.fontSize=(iw<48?(8+iw*3/48):11)+"px";
if(dojo.render.html.ie){
var ww=bw+20;
var wh=bh+35;
radius.widget.RecentWindow.superclass.resizeTo.call(this,ww+(ww&1),wh);
}else{
radius.widget.RecentWindow.superclass.resizeTo.call(this,bw+20,bh+35);
}
this.domNode.style.visibility="visible";
},getUser:function(_2f){
return this.hrecents[_2f.toLowerCase()];
},_addUser:function(_30,_31,_32){
var _33=_30.username.toLowerCase();
var u=this.hrecents[_33];
if(u){
for(var n=0;n<this.recents.length;n++){
if(this.recents[n]==u){
this.recents.splice(n,1);
break;
}
}
this.recents.splice(0,0,_30);
this.hrecents[_33]=_30;
if(!u.favorive&&_31){
this.recentsCount--;
this.favorsCount++;
}
if(!_30.favorite){
_30.favorite=_31;
}
}else{
if(!_31&&this.recentsCount>=radius.config.locals.maxRecents){
return null;
}
if(_31&&this.favorsCount>=radius.config.locals.maxFavors){
return null;
}
_30.favorite=_31;
this.recents.splice(0,0,_30);
this.hrecents[_33]=_30;
if(_31){
this.favorsCount++;
}else{
this.recentsCount++;
}
}
if(!_32&&((_31&&this.filter.showFavors)||(!_31&&this.filter.showRecents))){
this.refreshGrid();
}
return _30;
},addFavor:function(_36){
this._addUser(_36,true);
new radius.LocalsRequest("addRecent").send(_36.username,true);
},addRecent:function(_37){
this._addUser(_37,false);
new radius.LocalsRequest("addRecent").send(_37.username,false);
},removeUser:function(_38,_39){
var _3a=_38.toLowerCase();
var _3b=this.hrecents[_3a];
if(_3b){
delete this.hrecents[_3a];
for(var n=0;n<this.recents.length;n++){
if(this.recents[n]==_3b){
this.recents.splice(n,1);
break;
}
}
if(_3b.favorite){
this.favorsCount--;
}else{
this.recentsCount--;
}
if(!_39&&((_3b.favorite&&this.filter.showFavors)||(!_3b.favorite&&this.filter.showRecents))){
this.refreshGrid();
}
new radius.LocalsRequest("removeRecent").send(_3a);
return _3b;
}else{
return null;
}
},updateFilter:function(_3d){
this.filter=_3d;
this.showFavors.setState(_3d.showFavors);
this.showRecents.setState(_3d.showRecents);
},updateRecents:function(_3e){
if(_3e.filter){
this.updateFilter(_3e.filter);
}
this.recents=[];
this.hrecents={};
this.favorsCount=this.recentsCount=0;
var _3f=_3e.recents.list;
for(var n=_3f.length;n;){
var r=_3f[--n];
this.recents.push(r);
this.hrecents[r.username.toLowerCase()]=r;
if(r.favorite){
this.favorsCount++;
}else{
this.recentsCount++;
}
}
this.refreshGrid();
},refreshGrid:function(){
var f=this.filter;
if(!f){
return;
}
var len=this.recents.length;
var _44=0;
if(f.showFavors){
_44+=this.favorsCount;
}
if(f.showRecents){
_44+=this.recentsCount;
}
var _45;
var _46;
if(_44<=10){
this.pageNumber=0;
_45=0;
_46=false;
}else{
var _47=Math.ceil(_44/9);
if(this.pageNumber>=_47){
this.pageNumber=_47-1;
}
_45=this.pageNumber*9;
_46=this.pageNumber<(_47-1);
}
var _48=this.pageNumber>0;
var _49=_46||_48;
var _4a=0;
if(f.showFavors&&f.showRecents){
_4a=_45;
_44-=_45;
}else{
if(f.showFavors){
for(;_4a<len&&_45;_4a++){
if(this.recents[_4a].favorite){
_45--;
_44--;
}
}
}else{
if(f.showRecents){
for(;_4a<len&&_45;_4a++){
if(!this.recents[_4a].favorite){
_45--;
_44--;
}
}
}
}
}
var _4b;
if(_49){
_4b=9;
this.navMoreNode.style.display=_46?"":"none";
this.navBackNode.style.display=_48?"":"none";
this.photoNodes[9].style.display=this.ibars[9].style.display="none";
this.navNode.style.display="";
}else{
_4b=10;
this.navNode.style.display="none";
this.photoNodes[9].style.display=this.ibars[9].style.display="";
}
var _44=Math.min(_4b,_44);
var n=0;
for(var i=_4a;i<len&&_44;i++){
var r=this.recents[i];
if(!((f.showFavors&&r.favorite)||(f.showRecents&&!r.favorite))){
continue;
}
var pn=this.photoNodes[n];
var _50=this.ibars[n];
n++;
_44--;
var p=r.photoid?r.photoid:(r.gender=="M"?"nophotom":"nophotof");
pn.onload=null;
if(pn.pdata){
var pd=pn.pdata;
pd.user=r;
pd.pname=p;
if(pd.rover){
if(pd.rover.ibar){
radius.widget.MapWindow.updateIBar(r,pd.rover.ibar);
}
pn.onload=radius.widget.MapWindow.onloadfn;
}
}else{
pn.pdata={user:r,pname:p};
}
pn.src=radius.windows.mapWin.img_prefix+"uname="+r.username+"&p="+p+"&size=48";
pn.style.cursor="pointer";
_50.style.display="";
if(dojo.render.html.ie){
radius.html.setInnerText(_50.childNodes[1],pn.pdata.user.username);
}else{
radius.widget.RecentWindow.updateIBar(r,_50,this.iwidth);
}
}
for(;n<_4b;n++){
var pn=this.photoNodes[n];
var _50=this.ibars[n];
pn.onload=null;
if(pn.pdata){
var pd=pn.pdata;
if(pd.rover){
if(pd.rover.ibar){
radius.html.discardNode(pd.rover.ibar);
pd.rover.ibar=undefined;
}
pd.rover.complete(0);
}
}
pn.pdata=undefined;
pn.src="/images/emptycell_48.gif?version=RELEASE_0_27&build=200608281106";
pn.style.cursor="default";
_50.style.display="none";
}
},showFavorsChange:function(_53){
this.filter.showFavors=_53;
this.refreshGrid();
new radius.LocalsRequest("updateRecentsFilter").send(this.filter);
},showRecentChange:function(_54){
this.filter.showRecents=_54;
this.refreshGrid();
new radius.LocalsRequest("updateRecentsFilter").send(this.filter);
},moreClick:function(){
this.pageNumber++;
this.refreshGrid();
},backClick:function(){
this.pageNumber--;
this.refreshGrid();
},open:function(_55){
radius.widget.RecentWindow.superclass.open.call(this,_55);
this.filter=0;
this.pageNumber=0;
new radius.LocalsRequest("getRecents",false,dojo.lang.hitch(this,this.updateRecents)).send(true);
},close:function(){
radius.widget.RecentWindow.superclass.close.call(this);
this.updateRecents({recents:{list:[]}});
this.pageNumber=0;
this.filter=null;
this.iwidth=undefined;
this.domNode.style.display="none";
},_:0});
radius.widget.addClass("RecentWindow",radius.widget.RecentWindow);
radius.widget.RecentWindow.ibarDomId=dojo.render.html.ie?"recentWinIBarIEDomId":"recentWinIBarDomId";
radius.widget.RecentWindow.updateIBar=function(r,_57,_58){
var tn=_57.childNodes[1].firstChild;
var _5a=r.username;
if(_5a&&_5a.length>0){
var e="";
while(1){
radius.html.setInnerText(tn,_5a+e);
if(tn.offsetWidth<=_58||!_5a.length){
break;
}
e="..";
_5a=_5a.substring(0,_5a.length-1);
}
if(!_5a.length){
radius.html.setInnerText(tn,"");
}
}else{
radius.html.setInnerText(tn,"");
}
};


dojo.provide("radius.widget.LoginWindow");
radius.widget.LoginWindow=function(){
radius.widget.DefaultWindow.call(this);
};
radius.inherits(radius.widget.LoginWindow,radius.widget.DefaultWindow);
radius.extend(radius.widget.LoginWindow,{widgetType:"LoginWindow",caption:"login to radiusIM",allowResize:false,width:262,height:dojo.render.html.ie?198:192,firstPos:true,centerOnOpen:false,passwordInputArchive:null,containTextInputs:true,d_c_closeb:null,d_c_maxb:null,d_c_minb:null,LoginForm:{UsernameId:"logWinUsernameDomId",SaveUsernameId:"logWinSaveUsernameDomId",PasswordId:"logWinPasswordDomId",UsernameCookie:"logWinUsernameDomId",storedUsername:null},SecurityError:{LogUsernameAlreadyLogin:1,LogUsernameNotStandard:2,LogPasswordNotStandard:4,LogWrongUsernamePassword:8,LogUsernameDoesNotActivated:16,LogNeedRegistration:32,LogShowMyLocation:64},splash:GLOBAL_CONFIG.splash,fillInTemplate:function(){
radius.widget.LoginWindow.superclass.fillInTemplate.call(this);
this.attachNodes({logWinLoginBtnDomId:"loginBtnNode",logWinSignUpBtnDomId:"signUpBtnNode"});
},postCreate:function(){
this.loginBtnWidget=radius.widget.create("ImageButton",{widgetId:"logWindLoginBtnId",name:"login72x21",width:72,height:21},this.loginBtnNode);
this.signUpBtnWidget=radius.widget.create("ImageButton",{widgetId:"logWindSignUpBtnId",name:"signup85x53",width:85,height:53,onClick:new Function("radius.windows.logWin.signUpBtnClick()")},this.signUpBtnNode);
this.loginBtnWidget.onClick=this.splash?new Function("radius.windows.logWin.showLoginCheck()"):new Function("radius.windows.logWin.loginBtnClick()");
this.usernameInput=radius.byId(this.LoginForm.UsernameId);
this.passwordInput=radius.byId(this.LoginForm.PasswordId);
if(!this.splash){
radius.html.attachEventM(this.usernameInput,"onkeyup",this,"onInputKeyUp",true);
radius.html.attachEventM(this.passwordInput,"onkeyup",this,"onInputKeyUp",true);
}
this.saveUsername=radius.widget.create("CheckBox",{name:"cbox11x11blue",checked:false,textStyle:"font-size:11px;"},"logWinSaveUsernameDomId");
if(!this.splash){
radius.html.attachEventM(radius.byId("logWinForgotPassDomId"),"onclick",this,"forgotPass",true);
}
radius.html.attachEventM(radius.byId("logWinLearnMoreDomId"),"onclick",this,"learnMore",true);
radius.widget.LoginWindow.superclass.postCreate.call(this);
},onLoaded:function(){
radius.widget.LoginWindow.superclass.onLoaded.call(this);
this.init();
},onInputKeyUp:function(e){
if(e.keyCode==13){
this.loginBtnClick();
}
},loginBtnClick:function(){
this.login();
},showLoginCheck:function(){
radius.loadingBar.callWithBar(new Function("radius.windows.logWin._showLoginCheck()"));
},_showLoginCheck:function(){
radius.windows.getLoginCheckWindow().show();
},learnMore:function(){
radius.loadingBar.callWithBar(new Function("radius.windows.logWin._learnMore()"));
},_learnMore:function(){
radius.windows.getAboutWhatIsWindow().showWhatIs();
},showAboutUs:function(){
radius.loadingBar.callWithBar(new Function("radius.windows.logWin._showAboutUs()"));
},_showAboutUs:function(){
radius.windows.getAboutWhatIsWindow().showAboutUs();
},forgotPass:function(_2){
radius.loadingBar.callWithBar(new Function("dlg","radius.windows.logWin._forgotPass(dlg)"),_2);
},_forgotPass:function(_3){
if(_3!=undefined&&_3){
radius.windows.getModalSimpleWindow().close();
}
var w=radius.windows.getForgotWindow();
w.open();
},signUpBtnClick:function(){
radius.loadingBar.callWithBar(new Function("radius.windows.logWin._signUpBtnClick()"));
},_signUpBtnClick:function(){
if(!this.splash){
radius.windows.getSignUpWindow().open();
}else{
this.showLoginCheck();
}
},wrongLogin:function(){
radius.windows.openModalSimpleWindow({width:260,height:140,caption:"wrong login",body:radius.byId("logWinWrongLoginMessageDomId").innerHTML});
},alreadyLogin:function(){
radius.windows.openModalSimpleWindow({width:260,height:140,caption:"already login",body:radius.byId("logWinAlreadyLoginMessageDomId").innerHTML});
},notVerifiedEmail:function(){
},successLogout:function(_5){
if(_5!=undefined&&_5){
radius.windows.openModalSimpleWindow({width:260,height:140,caption:"logout success",body:radius.byId("logWinSuccessLogoutMessageDomId").innerHTML,closeAction:new Function("radius.windows.logWin.logoutEnd()")});
}else{
this.logoutEnd();
}
},failedLogout:function(_6){
if(_6!=undefined&&_6){
radius.windows.openModalSimpleWindow({width:260,height:140,caption:"logout failed",body:radius.byId("logWinFailedLogoutMessageDomId").innerHTML});
}
},logoutEnd:function(){
radius.im.changeTopNav(false);
radius.im.showWindows("logWin",true);
},init:function(){
this.LoginForm.storedUsername=radius.io.cookie.getCookie(radius.data.Const.UsernameCookie);
if(this.LoginForm.storedUsername!=null){
radius.byId(this.LoginForm.UsernameId).value=this.LoginForm.storedUsername;
this.saveUsername.setState(true);
}
},show:function(){
radius.widget.LoginWindow.superclass.show.apply(this,arguments);
if(this.firstPos){
this.firstPos=false;
var b=document.body;
var e=dojo.byId("splashLoginPosDomId");
if(e){
this.setPos({left:dojo.style.getAbsoluteX(e,true),top:dojo.style.getAbsoluteY(e,true)});
}
}
this.showBrowserDisclaimers();
},login:function(){
radius.validateSession(new Function("radius.windows.logWin._login()"));
},_login:function(){
radius.loadingBar.callWithBar(new Function("radius.windows.logWin._login2()"));
},_login2:function(){
try{
document.body.focus();
var _9=0;
flags={minlength:6,maxlength:16};
var _a=radius.byId(this.LoginForm.UsernameId).value;
if(!dojo.validate.isText(_a,flags)){
_9|=this.SecurityError.LogUsernameNotStandard;
}
var _b=this.saveUsername.checked;
var _c=radius.byId(this.LoginForm.PasswordId).value;
if(!dojo.validate.isText(_c)){
_9|=this.SecurityError.LogPasswordNotStandard;
}
if(_9==0){
if(_c==this.LoginForm.FillPassword){
_c=this.LoginForm.storedPassword;
}else{
_c=this.encrypt(_c);
}
var _d=radius.jsonrpc.security.login(_a,_c);
var r=_d[0];
if(r!=0&&!(r&this.SecurityError.LogUsernameDoesNotActivated||r&this.SecurityError.LogNeedRegistration||r&this.SecurityError.LogShowMyLocation)){
if(r&this.SecurityError.LogUsernameAlreadyLogin){
this.alreadyLogin();
}else{
dojo.io.cookie.deleteCookie(radius.data.Const.UsernameCookie);
this.wrongLogin();
}
}else{
if(r&this.SecurityError.LogUsernameDoesNotActivated){
radius.im.showWindows("verEmailWin",false);
radius.im.changeTopNav(true);
}else{
radius.disconnectHandler.loggedIn();
radius.generalSettings=radius.jsonrpc.profile.getGenSettings();
radius.lastLocation=null;
radius.rsaKey=radius.jsonrpc.security.getPublicKey();
if(radius.rsaKey){
var _f=new RSAKey();
_f.setPublic(radius.rsaKey.n,radius.rsaKey.e);
radius.rsaPublicKey=_f;
radius.rsaMaxLength=((parseBigInt(radius.rsaKey.n,16).bitLength()+7)>>3)-12;
}
radius.mymagicNumber=new Date().valueOf();
radius.loginedUsername=_d[1].toLowerCase();
radius.loginedUsernameDisp=_d[1];
radius.im.changeTopNav(true);
if(_b){
dojo.io.cookie.setCookie(radius.data.Const.UsernameCookie,_a,radius.data.Const.CookiesStoreDays);
}else{
dojo.io.cookie.deleteCookie(radius.data.Const.UsernameCookie);
}
radius.im.showWindows();
radius.openIMSession(r);
}
}
}else{
this.wrongLogin();
}
}
catch(e){
radius.debugException("loginWindow.login()",e);
}
},showBrowserDisclaimers:function(){
if(this.isSupportedBrowser()==false){
var msg="<span class='browserDisclaimersClass'>"+"<p><b>D'oh! It looks like we haven't tested the browser version you are using.</b></p>  "+"<p>That sucks, we're really sorry and we're working on it.  We love all the browsers in "+"the world equally.  <p>In the meantime, try us out with the latest IE or "+" <span class=\"defWinLinkClass\" onclick=\"window.open('http://getfirefox.com', "+"'_self');\">FireFox</span>.</p>"+"<p>Let us know what you think:  "+"<span class=\"defWinLinkClass\" onclick=\"window.open('mailto:feedback@radiusIM.com', "+"'_self');\">feedback@radiusIM.com</span>.</p>"+"<p>peace</p>";
radius.windows.createModalSimpleWindow({width:330,height:210,caption:"D'oh!",body:msg});
}
},isSupportedBrowser:function(){
radius.debug("checking browser support");
var _11=((AjxEnv.isIE6up||AjxEnv.isFirefox1_5up));
return _11;
},logout:function(shw){
radius.im.logout(shw);
},encrypt:function(s){
if(s==undefined||!s){
return null;
}
var rsa=new RSAKey();
rsa.setPublic(radius.data.RSAKey.RSAPubKey_N,radius.data.RSAKey.RSAPubKey_E);
return rsa.encrypt(s);
},open:function(){
if(this.isOpen){
this.focus();
}else{
radius.widget.LoginWindow.superclass.open.apply(this,arguments);
this.centerOnOpen=false;
}
},close:function(){
this.clear();
radius.widget.LoginWindow.superclass.hide.apply(this,arguments);
},clear:function(){
this.passwordInput.value="";
},_:0});
radius.widget.addClass("LoginWindow",radius.widget.LoginWindow);


dojo.provide("radius.widget.RadioGroup");
dojo.provide("radius.widget.RadioButton");
radius.widget.RadioGroup=function(){
};
radius.extend(radius.widget.RadioGroup,{seqId:0,checkedButton:null,add:function(_1,_2){
var r=radius.widget.create("RadioButton",_2!=undefined?_2:{radioName:this.seqId++,name:"radio13x13",checked:false,textStyle:"font-size:11px;"},dojo.byId(_1));
r.show();
r.group=this;
return r;
},change:function(_4,_5,_6,_7){
if((_5&&this.checkedButton!=_4)||_7){
if(this.checkedButton){
this.checkedButton.setState(false);
if(_6==undefined||(_6!=undefined&&_6)){
if(this.onChange){
this.onChange(this.checkedButton,false);
}
}
}
this.checkedButton=_4;
_4.setState(true);
if(_6==undefined||(_6!=undefined&&_6)){
if(this.onChange){
this.onChange(_4,_5);
}
}
}
},getChecked:function(){
return this.checkedButton?this.checkedButton.radioName:null;
}});
radius.widget.RadioButton=function(){
radius.widget.BaseWindow.call(this);
};
radius.inherits(radius.widget.RadioButton,radius.widget.BaseWindow);
radius.extend(radius.widget.RadioButton,{widgetType:"RadioButton",isContainer:true,hideOnStartup:false,width:11,height:11,checked:false,group:null,prefixPath:"/images/cboxs/",disabled:false,over:false,pres:false,dis:"png",templateNode:"radioButtonTemplateDomId",fillInTemplate:function(){
radius.widget.RadioButton.superclass.fillInTemplate.call(this);
this.textNode=this.containerNode;
if(!this.name){
throw new Error("The radiobutton name is not specified");
}
radius.html.mergeNodeData(this.srcNode,this.domNode);
if(dojo.lang.has(this.srcNode,"checked")){
this.checked=this.srcNode.checked;
}
if(this.textClass){
dojo.html.addClass(this.textNode,this.textClass);
}
if(this.textStyle){
this.textNode.style.cssText=this.textStyle;
}
this.onNode=document.createElement("div");
dojo.html.setClass(this.onNode,"radioButtonBtnClass");
this.btnContainerNode.appendChild(this.onNode);
this.offNode=document.createElement("div");
dojo.html.setClass(this.offNode,"radioButtonBtnClass");
this.btnContainerNode.appendChild(this.offNode);
},postCreate:function(_8,_9){
var p={prefixPath:this.prefixPath+this.name+"/",name:"on",width:this.width,height:this.height,over:this.over,pres:this.pres};
var _b=this;
this.onBtn=radius.widget.create("ImageButton",p,this.onNode);
p.name="off";
p.dis=this.dis;
this.offBtn=radius.widget.create("ImageButton",p,this.offNode);
this.offBtn.onClick=function(){
_b.setState(true);
if(_b.onChange){
_b.onChange(true);
}
};
radius.widget.RadioButton.superclass.postCreate.call(this);
},onLoaded:function(){
var _c=this.checked;
this.domNode.checked=_c;
this.checked=null;
this.setState(_c);
if(this.disabled){
this.disabled=false;
this.disable();
}
},setState:function(_d){
if(this.checked!=_d){
if(_d){
this.offBtn.hide();
this.onBtn.show();
}else{
this.onBtn.hide();
this.offBtn.show();
}
this.checked=_d;
this.domNode.checked=_d;
}
},disable:function(_e){
if(_e==undefined){
_e=true;
}
if(this.disabled==_e){
return;
}
if(_e){
this.offBtn.disable();
this.offBtn.show();
this.onBtn.hide();
this.checked=false;
this.domNode.checked=false;
}else{
this.offBtn.enable();
this.offBtn.show();
this.onBtn.hide();
this.checked=false;
this.domNode.checked=false;
}
this.disabled=_e;
},enable:function(_f){
this.disable(_f==undefined?false:!_f);
},change:function(_10,_11){
this.group.change(this,_10,null,_11);
},onChange:function(_12){
if(this.group!=null){
this.group.change(this,_12);
}
}});
radius.widget.addClass("RadioButton",radius.widget.RadioButton);


dojo.provide("radius.widget.ContentArea");
radius.widget.ContentArea=function(){
radius.widget.BaseWindow.call(this);
};
radius.inherits(radius.widget.ContentArea,radius.widget.BaseWindow);
radius.extend(radius.widget.ContentArea,{widgetType:"ContentArea",isContainer:true,autoHideSBars:true,vscroll:"ContentAreaVScroll",hscroll:"ContentAreaHScroll",templateNode:"contentAreaTemplateDomId",fillInTemplate:function(){
radius.widget.ContentArea.superclass.fillInTemplate.call(this);
radius.html.mergeNodeData(this.srcNode,this.domNode);
this.contentNode=this.containerNode;
},postCreate:function(){
this.buildLayout();
if(this.vscroll&&this.vscrollContainer){
this.buildVScroll();
}
if(this.hscroll&&this.hscrollContainer){
this.buildHScroll();
}
radius.widget.ContentArea.superclass.postCreate.call(this);
},onLoaded:function(){
radius.widget.ContentArea.superclass.onLoaded.call(this);
this.update();
},buildLayout:function(){
if(this.vscroll||this.hscroll){
radius.html.detachNode(this.contentNode);
var _1=document.createElement("table");
_1.cellSpacing=_1.cellPadding=0;
radius.style.setStyles(_1,{width:"100%",height:"100%"});
this.domNode.appendChild(_1);
var _2=document.createElement("tbody");
_1.appendChild(_2);
var tr=document.createElement("tr");
_2.appendChild(tr);
var td=document.createElement("td");
radius.style.setStyles(td,{width:"100%",height:"100%"});
tr.appendChild(td);
var _5=document.createElement("div");
radius.style.setStyles(_5,{position:"relative",width:"100%",height:"100%"});
td.appendChild(_5);
radius.style.setStyles(this.contentNode,{overflow:"hidden",position:"absolute",width:"100%",height:"100%"});
_5.appendChild(this.contentNode);
if(this.vscroll){
this.vscrollContainer=td=document.createElement("td");
radius.style.setStyles(td,{height:"100%"});
tr.appendChild(td);
}
if(this.hscroll){
this.hscrollRow=tr=document.createElement("tr");
_2.appendChild(tr);
this.hscrollContainer=td=document.createElement("td");
radius.style.setStyles(td,{width:"100%"});
tr.appendChild(td);
if(this.vscroll){
this.scrollsCell=td=document.createElement("td");
tr.appendChild(td);
}
}
}else{
radius.style.setStyles(this.contentNode,{overflow:"hidden",width:"100%",height:"100%"});
}
},buildVScroll:function(){
var _6=document.createElement("div");
radius.style.setStyles(_6,{height:"100%"});
this.vscrollContainer.appendChild(_6);
this.vscroll=radius.widget.create(this.vscroll,{carea:this},_6);
},buildHScroll:function(){
var _7=document.createElement("div");
radius.style.setStyles(_7,{width:"100%"});
this.hscrollContainer.appendChild(_7);
this.hscroll=radius.widget.create(this.hscroll,{carea:this},_7);
},update:function(){
this.updateVert();
this.updateHoriz();
this.updateVert(true);
this.updateHoriz(true);
},updateVert:function(_8){
var vs=this.vscroll;
if(!vs){
return;
}
var _a=this.contentNode.scrollHeight;
var _b=dojo.style.getInnerHeight(this.contentNode);
var _c=_a-_b;
if(_c<0){
_c=0;
}
vs.maxSliderPos=_c;
vs.updateState();
if(_8){
this.contentNode.scrollTop=vs.sliderPos;
}
if(this.autoHideSBars){
if(_c){
this.showVScroll();
}else{
this.hideVScroll();
}
}
},updateHoriz:function(_d){
var hs=this.hscroll;
if(!hs){
return;
}
var _f=this.contentNode.scrollWidth;
var _10=dojo.style.getInnerWidth(this.contentNode);
var _11=_f-_10;
if(_11<0){
_11=0;
}
hs.maxSliderPos=_11;
hs.updateState();
if(_d){
this.contentNode.scrollLeft=hs.sliderPos;
}
if(this.autoHideSBars){
if(_11){
this.showHScroll();
}else{
this.hideHScroll();
}
}
},showVScroll:function(){
if(!this.vscrollContainer){
return;
}
dojo.html.show(this.vscrollContainer);
if(this.scrollsCell&&dojo.html.isShowing(this.hscrollContainer)){
dojo.html.show(this.scrollsCell);
}
},hideVScroll:function(){
if(!this.vscrollContainer){
return;
}
dojo.html.hide(this.vscrollContainer);
if(this.scrollsCell){
dojo.html.hide(this.scrollsCell);
}
},showHScroll:function(){
if(!this.hscrollContainer){
return;
}
dojo.html.show(this.hscrollContainer);
if(this.scrollsCell&&dojo.html.isShowing(this.vscrollContainer)){
dojo.html.show(this.scrollsCell);
}
},hideHScroll:function(){
if(!this.hscrollContainer){
return;
}
dojo.html.hide(this.hscrollContainer);
if(this.scrollsCell){
dojo.html.hide(this.scrollsCell);
}
},onVSliding:function(pos){
this.contentNode.scrollTop=pos;
},onHSliding:function(pos){
this.contentNode.scrollLeft=pos;
}});
radius.widget.addClass("ContentArea",radius.widget.ContentArea);
radius.widget.ContentAreaVScroll=function(){
radius.widget.VScrollBar.call(this);
};
radius.inherits(radius.widget.ContentAreaVScroll,radius.widget.VScrollBar);
radius.extend(radius.widget.ContentAreaVScroll,{widgetType:"ContentAreaVScroll",name:"careav",config:{btns:{over:false,pres:false,width:16,height:16},track:{img1:{width:10,height:5},imgc:{width:10,height:4},img2:{width:10,height:5}},slider:{img1:{width:19,height:5},imgc:{width:19,height:1},img2:{width:19,height:6},imgcc:{width:19,height:6}}},autoResizeSlider:true,maxSliderPos:100,sliderPos:0,sliderSize:100,clickIncrement:5,onSliding:function(_14){
_14=Math.round(_14);
if(_14==this.sliderPos){
return null;
}
this.carea.onVSliding(_14);
return _14;
}});
radius.widget.addClass("ContentAreaVScroll",radius.widget.ContentAreaVScroll);
radius.widget.ContentAreaHScroll=function(){
radius.widget.HScrollBar.call(this);
};
radius.inherits(radius.widget.ContentAreaHScroll,radius.widget.HScrollBar);
radius.extend(radius.widget.ContentAreaHScroll,{widgetType:"ContentAreaHScroll",name:"careah",config:{btns:{over:false,pres:false,width:14,height:15},track:{img1:{width:4,height:6},imgc:{width:1,height:6},img2:{width:5,height:6}},slider:{img1:{width:3,height:11},imgc:{width:1,height:11},img2:{width:4,height:11},imgcc:{width:9,height:11}}},autoResizeSlider:true,maxSliderPos:100,sliderPos:0,sliderSize:100,clickIncrement:5,onSliding:function(_15){
_15=Math.round(_15);
if(_15==this.sliderPos){
return null;
}
this.carea.onHSliding(_15);
return _15;
}});
radius.widget.addClass("ContentAreaHScroll",radius.widget.ContentAreaHScroll);


dojo.provide("radius.widget.PullDown");
dojo.provide("radius.widget.SimpleSelectBox");
radius.widget.PullDown=function(){
radius.widget.BaseWindow.call(this);
this.selected={obj:null};
this.entries={};
this.convOptions=[];
this.selectBox={obj:null};
this._firstOpened=false;
};
radius.inherits(radius.widget.PullDown,radius.widget.BaseWindow);
radius.extend(radius.widget.PullDown,{widgetType:"PullDown",isControl:true,preCreate:function(){
this.domNode=document.createElement("div");
this.domNode.className="pullDownClass";
this.domNode.innerHTML="<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"width:100%;\"><tbody><tr>"+"<td style=\"padding-left:2px; padding-right:1px;\"><div class=\"pullDownTextClass\" style=\"width:100%; height:100%; overflow:hidden;\">&nbsp;</div></td>"+"<td style=\"padding:1px; width:12px;\"><div></div></td>"+"</tr></tbody></table>";
var tr=this.domNode.firstChild.firstChild.firstChild;
this.selectTextNode=tr.childNodes.item(0).firstChild;
this.dropBtnNode=tr.childNodes.item(1).firstChild;
this.srcNode.parentNode.replaceChild(this.domNode,this.srcNode);
radius.widget.PullDown.superclass.preCreate.call(this);
},fillInTemplate:function(){
radius.widget.PullDown.superclass.fillInTemplate.call(this);
radius.html.mergeNodeData(this.srcNode,this.domNode);
radius.html.handleSelectionState(this.domNode,false);
},postCreate:function(){
this.dropBtn=radius.widget.create("ImageButton",{prefixPath:"/images/sboxs/",pres:null,over:null,name:"simple",width:12,height:14},this.dropBtnNode);
this.dropBtn.onClick=dojo.lang.hitch(this,"dropSelectBox");
this.selectTextNode.onclick=dojo.lang.hitch(this,"dropSelectBox");
this.converOptions();
radius.widget.PullDown.superclass.postCreate.call(this);
},converOptions:function(){
if((this.options instanceof Array)||(typeof (this.options)=="array")){
var l=this.options.length;
for(var i=0;i<l;++i){
var t=this.convert(this.options[i]);
this.convOptions.push(t);
var _5=t.id!=undefined?t.id:t.value;
this.entries[_5]=t;
if(t.selected){
this.selected.obj=t;
this.selectTextNode.innerHTML=t.text;
}
}
}else{
for(var i in this.options){
var t=this.convert(i,this.options[i]);
this.convOptions.push(t);
var _5=t.id!=undefined?t.id:t.value;
this.entries[_5]=t;
if(t.selected){
this.selected.obj=t;
this.selectTextNode.innerHTML=t.text;
}
}
}
},dropSelectBox:function(){
if(!(this.convOptions.length>0)){
return;
}
if(!this.selectBox.obj){
var d=document.createElement("div");
document.body.appendChild(d);
this.selectBox.obj=radius.widget.create("SimpleSelectBox",{width:this.width,height:this.pullDownHeight},d);
this.selectBox.obj.onClick=dojo.lang.hitch(this,"onItemClick");
this.selectBox.obj.options=this.convOptions;
}
if(!this._firstOpened){
this._firstOpened=true;
this.selectBox.obj.open(0,0);
}
var _7=dojo.html.getViewportSize();
var _8=dojo.html.getScrollOffset();
var h=dojo.style.getOuterHeight(this.domNode);
var _a=this.selectBox.obj.height;
var _b=dojo.style.getAbsoluteX(this.domNode,true),pdy=dojo.style.getAbsoluteY(this.domNode,true)+(dojo.render.html.safari?0:h);
var _c={top:_8[1],bottom:_8[1]+_7[1]};
x=_b+_8[0];
y=pdy+_8[1];
if(y+_a>_c.bottom){
y-=h+_a;
}
if(y<_c.top){
y=pdy;
}
this.selectBox.obj.open(x,y);
},onLoaded:function(){
radius.widget.PullDown.superclass.onLoaded.call(this);
this.domNode.style.width=this.width+"px";
this.domNode.style.height=this.height+"px";
var w=dojo.style.getOuterWidth(this.selectTextNode);
this.selectTextNode.style.width=w+"px";
dojo.style.setContentWidth(this.selectTextNode,this.width-this.dropBtn.width-5);
},onItemClick:function(_e,_f){
if(_e!=this.selected.obj){
this.selectTextNode.innerHTML=_e.text;
this.selected.obj=_e;
if(this.onChanged){
this.onChanged(this.selected.obj,_f);
}
}
},setSelectedText:function(_10){
this.selectTextNode.innerHTML=_10;
},_clear:function(){
this.selectTextNode.innerHTML="&nbsp;";
this.selected.obj=null;
},change:function(val,_12){
if(this.selectBox.obj){
var i=this.selectBox.obj.change(val,_12);
if(val!=null){
if(!_12&&i){
this.selectTextNode.innerHTML=i.text;
this.selected.obj=i;
}
}else{
this._clear();
}
}else{
if(val!=null){
var i=this.entries[val];
i.selected=true;
this.selectTextNode.innerHTML=i.text;
this.selected.obj=i;
}else{
this._clear();
}
}
},storeState:function(_14){
var r={selectBox:this.selectBox,entries:this.entries,convOptions:this.convOptions,text:this.selectTextNode.innerHTML,selected:this.selected};
this.selected={obj:null};
this.selectBox={obj:null};
this.entries={};
this.convOptions=[];
this._firstOpened=false;
this._clear();
if(_14){
this.options=_14;
this.converOptions();
}
return r;
},restoreState:function(r){
var old={selectBox:this.selectBox,entries:this.entries,convOptions:this.convOptions,text:this.selectTextNode.innerHTML,selected:this.selected};
if(r){
this.selectBox=r.selectBox;
this.entries=r.entries;
this.convOptions=r.convOptions;
this.selected=r.selected;
this.selectTextNode.innerHTML=r.text;
}
this._firstOpened=false;
return old;
}});
radius.widget.addClass("PullDown",radius.widget.PullDown);
radius.widget.SimpleSelectBox=function(){
radius.widget.SimpleControl.call(this);
this.entries={};
this.selected=null;
};
radius.inherits(radius.widget.SimpleSelectBox,radius.widget.SimpleControl);
radius.extend(radius.widget.SimpleSelectBox,{widgetType:"SimpleSelectBox",selectBoxIndex:99999,_ismaked:false,_isresized:false,preLoading:function(){
radius.widget.SimpleSelectBox.superclass.preLoading.call(this);
},fillInTemplate:function(_18,_19){
dojo.html.prependClass(this.containerNode,"simpleSelectBoxContentClass");
radius.widget.SimpleSelectBox.superclass.fillInTemplate.apply(this,arguments);
},postCreate:function(_1a,_1b,_1c){
this.containerNode.innerHTML="<div style=\"width:100%; height:100%; overflow:hidden;\"></div>";
radius.widget.SimpleSelectBox.superclass.postCreate.apply(this,arguments);
},show:function(){
radius.widget.SimpleSelectBox.superclass.show.call(this);
this.render();
},open:function(x,y){
radius.widget.SimpleSelectBoxManager.opened(this);
if(!this._isresized){
this.resizeTo(this.width,this.height);
}
this.show();
if(!this._isresized){
this.resizeTo(this.width,this.height);
this._isresized=true;
}
this.domNode.style.zIndex=this.selectBoxIndex;
this.setPos({x:x,y:y});
this.x=x;
this.y=y;
if(this.contentArea){
this.contentArea.update();
}
},close:function(){
this.hide();
radius.widget.SimpleSelectBoxManager.closed(this);
},render:function(){
if(!this._ismaked){
this._makeSelectBox();
}
},_makeSelectBox:function(){
var _1f="<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"width:100%;\"><tbody>";
var l=this.options.length;
var _21=null;
for(var i=0;i<l;++i){
var t=this.options[i];
var val=t.id!=undefined?t.id:t.value;
_1f+="<tr><td class=\"simpleSelectBoxTextClass "+(t.selected?"simpleSelectBoxItemSelClass":"simpleSelectBoxItemClass")+"\" "+"onclick=\"this.parentNode.parentNode.parentNode.onItemClick(this);\" "+"onmouseover=\"this.parentNode.parentNode.parentNode.onItemOver(this);\" "+"onmouseout=\"this.parentNode.parentNode.parentNode.onItemOut(this);\" "+"val=\""+val+"\">"+t.text+"</td></tr>";
this.entries[val]=[t,i];
if(t.selected){
_21=i;
}
}
_1f+="</tbody></table>";
this.containerNode.firstChild.innerHTML=_1f;
var _25=this;
var _26=this.containerNode.firstChild.firstChild;
_26.onItemClick=function(_27){
_25.onItemClick(_27);
};
_26.onItemOver=function(_28){
_25.onItemOver(_28);
};
_26.onItemOut=function(_29){
_25.onItemOut(_29);
};
if(_21!=null){
this.selected=_26.rows.item(_21).firstChild;
}
this.itemsTable=_26;
var _2a=dojo.style.getOuterHeight(this.containerNode.firstChild.firstChild);
if(_2a<this.height){
this.height=_2a+4;
}else{
this.contentArea=radius.widget.create("ContentArea",{hscroll:null},this.containerNode.firstChild);
this.contentArea.update();
}
radius.html.handleSelectionState(this.domNode,false);
this._ismaked=true;
},change:function(val,_2c){
if(val){
var i=this.entries[val];
if(i&&i[1]!=this.selected){
if(this.selected){
this.selected.className="simpleSelectBoxTextClass simpleSelectBoxItemClass";
var e=this.entries[this.selected.getAttribute("val")][0];
e.selected=false;
}
this.selected=this.itemsTable.rows.item(i[1]).firstChild;
this.selected.className="simpleSelectBoxTextClass simpleSelectBoxItemSelClass";
i[0].selected=true;
if(_2c&&this.onClick){
this.onClick(i[0]);
}
return i[0];
}
}else{
if(this.selected){
this.selected.className="simpleSelectBoxTextClass simpleSelectBoxItemClass";
var e=this.entries[this.selected.getAttribute("val")][0];
e.selected=false;
}
this.selected=null;
}
return null;
},onItemOver:function(_2f){
_2f.className="simpleSelectBoxTextClass simpleSelectBoxItemOverClass";
},onItemOut:function(_30){
if(this.selected==_30){
this.selected.className="simpleSelectBoxTextClass simpleSelectBoxItemSelClass";
}else{
_30.className="simpleSelectBoxTextClass simpleSelectBoxItemClass";
}
},onItemClick:function(_31){
if(this.selected!=_31){
var _32=null;
if(this.selected){
this.selected.className="simpleSelectBoxTextClass simpleSelectBoxItemClass";
var i=this.entries[this.selected.getAttribute("val")][0];
i.selected=false;
_32=i;
}
this.selected=_31;
this.selected.className="simpleSelectBoxTextClass simpleSelectBoxItemSelClass";
var i=this.entries[_31.getAttribute("val")][0];
i.selected=true;
if(this.onClick){
this.onClick(i,_32);
}
}
this.close();
},isPointInSelectBox:function(x,y){
var mx=radius.style.getAbsoluteX(this.domNode,this.domNode);
if(x<mx||x>mx+this.width){
return false;
}
var my=radius.style.getAbsoluteY(this.domNode,this.domNode);
if(y<my||y>my+this.height){
return false;
}
return true;
}});
radius.widget.addClass("SimpleSelectBox",radius.widget.SimpleSelectBox);
radius.widget.SimpleSelectBoxManager=new function(){
this.currentSelectBox=null;
radius.html.attachEventM(document,"onmousedown",this,"onClick",true);
radius.html.attachEventM(window,"onscroll",this,"onClick",true);
this.closed=function(_38){
if(this.currentSelectBox==_38){
this.currentSelectBox=null;
}
};
this.opened=function(_39,_3a){
if(_39==this.currentSelectBox){
return;
}
if(this.currentSelectBox){
this.currentSelectBox.close();
}
this.currentSelectBox=_39;
};
this.onClick=function(e){
if(!this.currentSelectBox){
return;
}
var _3c=dojo.html.getScrollOffset();
var x=e.clientX+_3c[0];
var y=e.clientY+_3c[1];
if(this.currentSelectBox.isPointInSelectBox(x,y)){
return;
}
this.currentSelectBox.close();
};
};


dojo.provide("radius.widget.SimpleTooltip");
radius.widget.SimpleTooltip=function(_1){
radius.widget.SimpleControl.call(this);
if(_1!=undefined){
this.defFrame=_1;
}
this.count=0;
this.hoverObjs={};
this.manager=new radius.widget.SimpleTooltipManager();
};
radius.inherits(radius.widget.SimpleTooltip,radius.widget.SimpleControl);
radius.extend(radius.widget.SimpleTooltip,{widgetType:"SimpleTooltip",width:60,height:16,tooltipIndex:99999,timeout:50,delay:500,hoverObj:null,needResize:true,defFrame:false,opacity:0.85,_initDomNode:false,fillInTemplate:function(){
if(!this.defFrame){
this.d_ul=null;
this.d_u=null;
this.d_ur=null;
this.d_l=null;
this.d_r=null;
this.d_dl=null;
this.d_d=null;
this.d_dr=null;
this.sd_ur=null;
this.sd_r=null;
this.sd_dl=null;
this.sd_d=null;
this.sd_dr=null;
}
this.attachTemplateNodes();
radius.html.handleSelectionState(this.domNode,false);
dojo.html.prependClass(this.containerNode,"simpleTooltipContentClass");
if(!this.defFrame){
dojo.style.setOpacity(this.containerNode,this.opacity);
dojo.style.setOpacity(this.domNode,this.opacity);
}
radius.widget.SimpleTooltip.superclass.fillInTemplate.apply(this,arguments);
},postCreate:function(_2,_3,_4){
radius.widget.SimpleTooltip.superclass.postCreate.apply(this,arguments);
},onLoaded:function(){
this.initWidth=this.width;
radius.widget.SimpleTooltip.superclass.onLoaded.call(this);
},init:function(_5,_6){
if(_5&&_6){
this.hoverObjs[this.count]=[_5,_6];
_5.simpleTooltipId=this.count;
this.needResize=true;
this.count+=1;
radius.html.attachEventM(_5,"onmouseover",this,"tooltipObjOver");
radius.html.attachEventM(_5,"onmouseout",this,"tooltipObjOut");
if(!this._initDomNode){
this._initDomNode=true;
radius.html.attachEventM(this.domNode,"onmouseover",this,"tooltipOver");
radius.html.attachEventM(this.domNode,"onmouseout",this,"tooltipOut");
radius.html.attachEventM(this.domNode,"onmousemove",this,"tooltipMove");
}
}
},removeHoverObj:function(_7){
if(_7.simpleTooltipId){
radius.html.detachEventM(_7,"onmouseover",this,"tooltipObjOver");
radius.html.detachEventM(_7,"onmouseout",this,"tooltipObjOut");
this.hoverObjs[_7.simpleTooltipId]=undefined;
}
},changeTooltip:function(_8,_9){
var id=_9==undefined?0:_9.simpleTooltipId;
var _b=this.hoverObjs[id];
if(_b){
_b[1]=_8?_8:"";
this.needResize=true;
}
},_resize:function(){
if(!this.needResize){
return;
}
dojo.style.setOuterWidth(this.bodyNode,this.initWidth);
var tw=dojo.style.getOuterWidth(this.bodyNode);
var th=dojo.style.getOuterHeight(this.bodyNode);
if(tw&&th){
this.width=tw+8;
this.height=th+8;
}
this.resizeTo(this.width,this.height);
this.needResize=false;
},tooltipOver:function(e){
var _f=dojo.html.getScrollOffset();
var x=e.clientX+_f[0];
var y=e.clientY+_f[1];
if(this.timeoutId&&this.isPointIn(this.hoverObj,x,y)){
clearTimeout(this.timeoutId);
this.timeoutId=null;
}
},tooltipOut:function(e){
var o=this;
this.timeoutId=setTimeout(function(){
o.hideTooltip();
},this.timeout);
},tooltipMove:function(e){
var _15=dojo.html.getScrollOffset();
var x=e.clientX+_15[0];
var y=e.clientY+_15[1];
if(!this.isPointIn(this.hoverObj,x,y)){
this.hideTooltip();
}
},tooltipObjOver:function(e){
if(this.timeoutId){
clearTimeout(this.timeoutId);
this.timeoutId=null;
if(this.hoverObj==e.currentTarget){
return;
}
}
if(this.hoverObj){
this.hideTooltip();
}
this.hoverObj=e.currentTarget;
this.showTooltip();
},tooltipObjOut:function(e){
var o=this;
this.timeoutId=setTimeout(function(){
o.hideTooltip();
},this.timeout);
},showTooltip:function(){
setTimeout(dojo.lang.hitch(this,"doShowTooltip"),this.delay);
},doShowTooltip:function(){
if(!this.hoverObj){
return;
}
var e=this.hoverObj;
var _1c=this.hoverObjs[this.hoverObj.simpleTooltipId];
if(!_1c){
return;
}
this.bodyNode.innerHTML=_1c[1];
this.needResize=true;
this.show();
this._resize();
var _1d=dojo.style.getAbsoluteX(e,true)+dojo.style.getOuterWidth(e),top=dojo.style.getAbsoluteY(e,true)-dojo.style.getOuterHeight(e);
this.open(_1d,top);
this.timeoutId=null;
},changeBodyNode:function(_1e){
this.bodyNode.innerHTML=_1e;
this.needResize=true;
},hideTooltip:function(){
this.hoverObj=null;
if(this.timeoutId){
clearTimeout(this.timeoutId);
this.timeoutId=null;
}
this.close();
},open:function(x,y){
this.manager.opened(this);
var _21=dojo.html.getViewportSize();
var _22=dojo.html.getScrollOffset();
var _23={left:_22[0],right:_22[0]+_21[0],top:_22[1],bottom:_22[1]+_21[1]};
x+=_22[0];
y+=_22[1];
radius.widget.SimpleTooltip.superclass.open.apply(this,arguments);
if(x<_23.left){
x=_23.left;
}
if(x+this.width>_23.right){
x=_23.right-this.width;
}
if(y<_23.top){
y=_23.top;
}
if(y+this.height>_23.bottom){
y=_23.bottom-this.height;
}
this.domNode.style.zIndex=this.tooltipIndex;
this.setPos({x:x,y:y});
this.x=x;
this.y=y;
this._resize();
},close:function(){
this.hide();
this.manager.closed(this);
},isPointIn:function(obj,x,y){
if(!obj){
return false;
}
var mx=radius.style.getAbsoluteX(obj,true);
if(x<mx||x>mx+dojo.style.getOuterWidth(obj)){
return false;
}
var my=radius.style.getAbsoluteY(obj,true);
if(y<my||y>my+dojo.style.getOuterHeight(obj)){
return false;
}
return true;
}});
radius.widget.addClass("SimpleTooltip",radius.widget.SimpleTooltip);
radius.widget.SimpleTooltipManager=function(){
radius.html.attachEventM(document,"onmousedown",this,"onClick",true);
radius.html.attachEventM(window,"onscroll",this,"onClick",true);
};
radius.extend(radius.widget.SimpleTooltipManager,{currentTooltip:null,closed:function(_29){
if(this.currentTooltip==_29){
this.currentTooltip=null;
}
},opened:function(_2a,_2b){
if(_2a==this.currentTooltip){
return;
}
if(this.currentTooltip){
this.currentTooltip.close();
}
this.currentTooltip=_2a;
},onClick:function(e){
if(!this.currentTooltip){
return;
}
this.currentTooltip.close();
}});
radius.widget.getTooltip=function(){
if(!this.gTooltip){
this.gTooltip=radius.widget.create("SimpleTooltip",{width:160},"gTooltipDomId");
}
return this.gTooltip;
};
radius.widget.showTooltip=function(_2d,_2e){
var tp=this.getTooltip();
};
radius.widget.hideTooltip=function(_30){
var tp=this.getTooltip();
};
radius.widget.attachTooltip=function(_32,_33){
var tp=this.getTooltip();
if(_32.tpattached){
tp.changeTooltip(_33,_32);
}else{
tp.init(_32,_33);
_32.tpattached=true;
}
};
radius.widget.detachTooltip=function(_35){
if(!_35.tpattached){
return;
}
var tp=this.getTooltip();
tp.removeHoverObj(_35);
_35.tpattached=false;
};


dojo.provide("radius.widget.SignUpWindow");
radius.widget.SignUpWindow=function(){
radius.widget.DefaultWindow.call(this);
};
dojo.inherits(radius.widget.SignUpWindow,radius.widget.DefaultWindow);
radius.extend(radius.widget.SignUpWindow,{widgetType:"SignUpWindow",caption:"sign up for radiusIM",allowResize:false,width:568,height:420,containTextInputs:true,d_c_maxb:null,d_c_minb:null,captchaLoaded:false,captchaRetry:0,captchaTimeout:null,SignUpError:{RegUsernameNotStandard:1,RegPasswordNotStandard:2,RegUsernameExists:4,RegPasswordDoesNotMatch:8,RegEmailNotStandard:16,RegEmailAlreadyUsed:32,RegFirstNameNotStandard:64,RegGenderNotStandard:128,RegBirthdayNotStandard:256,RegCountryNotStandard:512,RegZipcodeNotStandard:1024,RegCaptchaNotStandard:2048,RegCaptchaDoesNotMatch:4096,RegHeardFromNotStandard:8192,RegTOSNotChecked:16384,RegOver16AgeNotMartch:32768,RegUsernameNotAlpha:65536,RegFirstNameNotAlpha:131072,RegIPLimitPerHour:262144,RegPasswordNotAlpha:524288},SignUpForm:{UsernameId:"signWinUsernameDomId",PasswordId:"signWinPasswordDomId",ConfirmPasswordId:"signWinConfirmPasswordDomId",EmailId:"signWinEmailDomId",FirstNameId:"signWinFirstNameDomId",GenderFemaleId:"signWinGenderFemaleDomId",GenderMaleId:"signWinGenderMaleDomId",BirthMonthId:"signWinBirthMonthDomId",BirthDayId:"signWinBirthDayDomId",BirthYearId:"signWinBirthYearDomId",CountryId:"signWinCountryDomId",ZipcodeId:"signWinZipcodeDomId",CaptchaImageId:"signWinCaptchaImageDomId",CaptchaId:"signWinCaptchaDomId",HeardFromId:"signWinHeardFromDomId",TermsAgreedId:"signWinTermsAgreedDomId",SignUpContextHelpId:"signWinContextHelpDivDomId"},firstPos:true,invite:null,fillInTemplate:function(_1,_2){
radius.widget.SignUpWindow.superclass.fillInTemplate.apply(this,arguments);
this.attachNode("signWinSignUpBtnDomId","signUpBtnNode");
this.SignUpAsteriskForm={FirstNameAsteriskId:["signWinFirstNameAsteriskAllDomId","signWinFirstNameAsteriskDomId",this.SignUpError.RegFirstNameNotStandard,"First Name"],GenderAsteriskId:["signWinGenderAsteriskAllDomId","signWinGenderAsteriskDomId",this.SignUpError.RegGenderNotStandard,"Gender"],BirthAsteriskId:["signWinBirthAsteriskAllDomId","signWinBirthAsteriskDomId",this.SignUpError.RegBirthdayNotStandard,"Date of Birth"],CountryAsteriskId:["signWinCountryAsteriskAllDomId","signWinCountryAsteriskDomId",this.SignUpError.RegCountryNotStandard,"Country"],ZipcodeAsteriskId:["signWinZipcodeAsteriskAllDomId","signWinZipcodeAsteriskDomId",this.SignUpError.RegZipcodeNotStandard,"Zip Code"],HeardFromAsteriskId:["signWinHeardFromAsteriskAllDomId","signWinHeardFromAsteriskDomId",this.SignUpError.RegHeardFromNotStandard,"'How did you hear about us'"]};
},postCreate:function(_3,_4,_5){
this.showNativeSelectBoxes();
this.genderFemale=dojo.byId("signWinGenderFemaleDomId");
this.genderMale=dojo.byId("signWinGenderMaleDomId");
this.termsAgreed=dojo.byId("signWinTermsAgreedDomId");
dojo.event.connect(this.termsAgreed,"onblur",this,"focus2Email");
this.signUpBtnWidget=radius.widget.create("ImageButton",{widgetId:"signUpNowBtnId",name:"signup72x21blue",width:72,height:21},this.signUpBtnNode);
this.signUpBtnWidget.onClick=dojo.lang.hitch(this,"signUpBtnClick");
this.captchaImage=dojo.byId(this.SignUpForm.CaptchaImageId);
this.captchaImage.onload=dojo.lang.hitch(this,"onLoadCaptcha");
if(!dojo.render.html.ie){
dojo.byId("signWinLeftColumnDomId").style.paddingBottom="2px";
dojo.byId("signWinLeftColumnDomId").style.paddingRight="2px";
dojo.byId("signWinRightColumnDomId").style.paddingBottom="2px";
dojo.byId("signWinRightColumnDomId").style.paddingRight="2px";
dojo.byId("signImgRBDomId").style.right="-1px";
dojo.byId("signImgRTDomId").style.right="-1px";
}
radius.html.attachEventM(dojo.byId("signWinEmailDomId"),"onkeyup",this,"onInputKeyUp",true);
var _6=dojo.byId(this.SignUpForm.UsernameId);
radius.html.attachEventM(_6,"onfocus",this,"onFocusUsername",true);
radius.html.attachEventM(_6,"onblur",this,"onBlurUsername",true);
radius.widget.SignUpWindow.superclass.postCreate.apply(this,arguments);
},onLoaded:function(){
this.setupForm();
radius.widget.SignUpWindow.superclass.onLoaded.apply(this,arguments);
},focus2Email:function(){
dojo.byId(this.SignUpForm.EmailId).focus();
},open:function(){
if(this.isOpen){
this.focus();
}else{
this.getCaptcha();
radius.widget.SignUpWindow.superclass.open.apply(this,arguments);
this.centerOnOpen=false;
}
},close:function(){
this.clear();
radius.widget.SignUpWindow.superclass.close.apply(this,arguments);
},clear:function(){
this.showNativeSelectBoxes();
this.clearAsterisks();
for(i in this.SignUpForm){
var e=dojo.byId(this.SignUpForm[i]);
e.value="";
}
this.birthMonth.selectedIndex=-1;
this.birthDay.selectedIndex=-1;
this.birthYear.selectedIndex=-1;
this.country.selectedIndex=0;
this.heardFrom.selectedIndex=-1;
var e=dojo.byId(this.SignUpForm.EmailId);
e.value=radius.data.Const.SignUpEmailValue;
e.first=false;
this.genderFemale.checked=false;
this.genderMale.checked=false;
this.termsAgreed.checked=false;
this.invite=null;
},closeWindow:function(){
this.close();
radius.widget.SignUpWindow.superclass.closeWindow.apply(this,arguments);
},signUpBtnClick:function(){
this.signUp();
},onInputKeyUp:function(e){
if(e.keyCode==13){
this.signUp();
}
},show:function(){
radius.widget.SignUpWindow.superclass.show.apply(this,arguments);
if(this.firstPos){
this.firstPos=false;
this.center();
this.birthMonth.selectedIndex=-1;
this.birthDay.selectedIndex=-1;
this.birthYear.selectedIndex=-1;
this.country.selectedIndex=0;
this.heardFrom.selectedIndex=-1;
}
},onChangeEmail:function(){
if(!dojo.validate.isText(this.value)){
this.value=radius.data.Const.SignUpEmailValue;
this.chg=false;
this.blur();
}
},onFocusEmail:function(){
if(!this.first){
this.first=true;
this.value="";
}
},onBlurEmail:function(){
if(!dojo.validate.isText(this.value)){
this.value=radius.data.Const.SignUpEmailValue;
this.first=false;
}
},onFocusUsername:function(){
var _9=dojo.byId(this.SignUpForm.SignUpContextHelpId);
var _a="tip: Use a nickname for your username. Keep your real name on the dl.";
radius.debug("setting text content");
var _b="/images/tooltip/username_tip_81x69.gif?version=RELEASE_0_27&build=200608281106";
if(this.usernameTipImg==undefined){
this.usernameTipImg=radius.image.createImageNode();
dojo.dom.insertAfter(this.usernameTipImg,_9);
}
this.usernameTipImg.src=_b;
this.usernameTipImg.imageSrc=_b;
},onBlurUsername:function(){
if(this.usernameTipImg){
radius.image.setImage(this.usernameTipImg,radius.image.blankUrl);
radius.debug("removing node "+this.usernameTipImg);
dojo.dom.removeNode(this.img);
}
},createOptionElement:function(_c,_d){
var o=document.createElement("option");
o.value=_c;
o.text=_d;
return o;
},setupForm:function(){
this.showNativeSelectBoxes();
var e=dojo.byId(this.SignUpForm.EmailId);
e.value=radius.data.Const.SignUpEmailValue;
e.first=false;
e.onchange=this.onChangeEmail;
e.onfocus=this.onFocusEmail;
e.onblur=this.onBlurEmail;
this.birthMonth=dojo.byId("signWinBirthMonthDomId");
this.birthMonth.style.width="90px";
var j=0;
for(i in radius.data.Month){
this.birthMonth.options[j++]=this.createOptionElement(i,radius.data.Month[i]);
}
this.birthDay=dojo.byId("signWinBirthDayDomId");
this.birthDay.style.width="45px";
j=0;
for(var i=1;i<=31;++i){
this.birthDay.options[j++]=this.createOptionElement(i<10?"0"+i:i,i);
}
this.birthYear=dojo.byId("signWinBirthYearDomId");
this.birthYear.style.width="55px";
j=0;
for(var i=radius.data.BirthYear.newer;i>radius.data.BirthYear.older;--i){
this.birthYear.options[j++]=this.createOptionElement(i,i);
}
this.country=dojo.byId("signWinCountryDomId");
this.country.style.width="160px";
j=0;
var _12=radius.data.getCountries().list;
for(i in _12){
this.country.options[j++]=this.createOptionElement(_12[i].code,_12[i].country);
}
this.heardFrom=dojo.byId("signWinHeardFromDomId");
this.heardFrom.style.width="160px";
j=0;
for(i in radius.data.HeardFrom){
this.heardFrom.options[j++]=this.createOptionElement(radius.data.HeardFrom[i],radius.data.HeardFrom[i]);
}
},hideNativeSelectBoxes:function(){
var _13="hidden";
this.birthMonth.style.visibility=_13;
this.birthDay.style.visibility=_13;
this.birthYear.style.visibility=_13;
this.country.style.visibility=_13;
},showNativeSelectBoxes:function(){
var _14="visible";
this.birthMonth=dojo.byId("signWinBirthMonthDomId");
this.birthMonth.style.visibility=_14;
this.birthDay=dojo.byId("signWinBirthDayDomId");
this.birthDay.style.visibility=_14;
this.birthYear=dojo.byId("signWinBirthYearDomId");
this.birthYear.style.visibility=_14;
this.country=dojo.byId("signWinCountryDomId");
this.country.style.visibility=_14;
},dropCountrySelectBox:function(){
var o=this;
radius.loadingBar.callWithBar(dojo.lang.hitch(o.country,o.country.dropSelectBox));
this.country.dropBtn.onClick=dojo.lang.hitch(o.country,"dropSelectBox");
this.country.selectTextNode.onclick=dojo.lang.hitch(o.country,"dropSelectBox");
},signUp:function(){
var _16="_signUp2";
radius.validateSession(dojo.lang.hitch(this,_16));
},_signUp:function(){
radius.loadingBar.callWithBar(dojo.lang.hitch(this,this._signUp2));
},_signUp2:function(){
try{
document.body.focus();
this.clearAsterisks();
var _17=0;
var _18=radius.jsonrpc.logic.getSignUp().getSignUpData();
_18.username=dojo.byId(this.SignUpForm.UsernameId).value;
if(!dojo.validate.isText(_18.username,{minlength:6,maxlength:16})){
_17|=this.SignUpError.RegUsernameNotStandard;
}
_18.password=dojo.byId(this.SignUpForm.PasswordId).value;
if(!dojo.validate.isText(_18.password,{minlength:6,maxlength:16})){
_17|=this.SignUpError.RegPasswordNotStandard;
}
_18.confirmPassword=dojo.byId(this.SignUpForm.ConfirmPasswordId).value;
if(_18.password!=_18.confirmPassword){
_17|=this.SignUpError.RegPasswordDoesNotMatch;
}
_18.email=dojo.byId(this.SignUpForm.EmailId).value;
if(!dojo.validate.isEmailAddress(_18.email)){
_17|=this.SignUpError.RegEmailNotStandard;
}
_18.firstName=dojo.byId(this.SignUpForm.FirstNameId).value;
if(!dojo.validate.isText(_18.firstName,{minlength:1,maxlength:32})){
_17|=this.SignUpError.RegFirstNameNotStandard;
}
var _19=this.genderFemale.checked?"female":(this.genderMale.checked?"male":null);
if(_19==null){
_17|=this.SignUpError.RegGenderNotStandard;
}else{
_18.gender=_19=="female"?"F":"M";
}
var _1a=this.birthMonth.value;
var day=this.birthDay.value;
var _1c=this.birthYear.value;
_18.birthday=_1c+_1a+day;
if(!dojo.validate.isValidDate(_18.birthday,"YYYYMMDD")){
_17|=this.SignUpError.RegBirthdayNotStandard;
}
_18.countryCode=this.country.value;
if(dojo.validate.isText(_18.countryCode,{minlength:2,maxlength:8})){
_18.country=this.country.options[this.country.selectedIndex].text;
if(!dojo.validate.isText(_18.country,{minlength:2,maxlength:64})){
_17|=this.SignUpError.RegCountryNotStandard;
}
}else{
_17|=this.SignUpError.RegCountryNotStandard;
}
_18.zipcode=dojo.byId(this.SignUpForm.ZipcodeId).value;
var _1d=_18.countryCode=="US";
if(!((_1d&&dojo.validate.us.isZipCode(_18.zipcode))||(!_1d&&!_18.zipcode))){
_17|=this.SignUpError.RegZipcodeNotStandard;
}
_18.captcha=dojo.byId(this.SignUpForm.CaptchaId).value;
if(!dojo.validate.isText(_18.captcha)){
_17|=this.SignUpError.RegCaptchaNotStandard;
}
_18.heardFrom=this.heardFrom.value;
if(!dojo.validate.isText(_18.heardFrom,{minlength:2,maxlength:200})){
_17|=this.SignUpError.RegHeardFromNotStandard;
}
_18.termsAgreed=this.termsAgreed.checked;
if(_18.termsAgreed==false){
_17|=this.SignUpError.RegTOSNotChecked;
}
if(_17==0){
if(this.invite&&this.invite.username&&this.invite.code&&this.invite.date){
_18.inviter=this.invite.username;
_18.inviteCode=this.invite.code;
_18.inviteDate=this.invite.date;
}
_18.password=this.encrypt(_18.password);
_18.confirmPassword=this.encrypt(_18.confirmPassword);
var r=radius.jsonrpc.logic.getSignUp().signUp(_18);
if(r!=0){
this.signUpFailed(r);
}else{
this.successSubmit();
}
}else{
this.signUpFailed(_17);
}
}
catch(e){
radius.debug("signUpWindow.signUp(): exception "+e.message);
this.hideNativeSelectBoxes();
radius.windows.openModalSimpleWindow({width:300,height:140,closeAction:dojo.lang.hitch(this,"showNativeSelectBoxes"),caption:"sign up failed",body:"Server internal exception."});
}
},clearAsterisks:function(){
for(i in this.SignUpAsteriskForm){
var e=dojo.byId(this.SignUpAsteriskForm[i][0]);
e.className="defWinLabelClass";
e=dojo.byId(this.SignUpAsteriskForm[i][1]);
e.style.visibility="hidden";
}
},fillAsterisks:function(r){
for(i in this.SignUpAsteriskForm){
if(r&this.SignUpAsteriskForm[i][2]){
var e=dojo.byId(this.SignUpAsteriskForm[i][0]);
e.className="defWinLabelClass signWinRequiredLabelClass";
e=dojo.byId(this.SignUpAsteriskForm[i][1]);
e.style.visibility="visible";
}
}
},getErrorNames:function(r){
var s="";
var _24=true;
for(i in this.SignUpAsteriskForm){
if(r&this.SignUpAsteriskForm[i][2]){
if(_24){
_24=false;
}else{
s+=", ";
}
s+=this.SignUpAsteriskForm[i][3];
}
}
return s;
},signUpFailed:function(r){
this.getCaptcha();
if(r&this.SignUpError.RegEmailNotStandard){
this.showErrorDialog({message:"The email address you entered appears to be invalid. Please enter a valid email in the form username@domain.com."});
}else{
if(r&this.SignUpError.RegEmailAlreadyUsed){
this.showErrorDialog({message:"This email is already in use by a radiusIM user. Please choose another."});
}else{
if(r&this.SignUpError.RegUsernameNotStandard){
this.showErrorDialog({message:"Your username must contain at least 6 characters. Please choose another username."});
}else{
if(r&this.SignUpError.RegUsernameNotAlpha){
this.showErrorDialog({message:"Please use only letters and numbers in your username."});
}else{
if(r&this.SignUpError.RegUsernameExists){
this.showErrorDialog({message:"The username you have chosen is already taken. Please select a different username and remember that it must be at least 6 characters long."});
}else{
if(r&this.SignUpError.RegPasswordNotStandard){
this.showErrorDialog({message:"Your password must contain at least 6 characters. Please choose another password."});
}else{
if(r&this.SignUpError.RegPasswordNotAlpha){
this.showErrorDialog({message:"Please use only letters and numbers in your password."});
}else{
if(r&this.SignUpError.RegPasswordDoesNotMatch){
this.showErrorDialog({message:"The passwords you entered do not match. Please re-enter them and remember to make them at least 6 characters."});
}else{
if(r&this.SignUpError.RegFirstNameNotAlpha){
this.showErrorDialog({message:"Please use only letters, numbers, underscore and space characters in your first name."});
}else{
if(r&this.SignUpError.RegCaptchaNotStandard||r&this.SignUpError.RegCaptchaDoesNotMatch){
this.showErrorDialog({message:"The text you entered does not match that in the image. Please try again."});
}else{
if(r&this.SignUpError.RegTOSNotChecked){
this.showErrorDialog({message:"You have not clicked through agreeing to radiusIM's Terms of Service. Please do so to continue."});
}else{
if(r&this.SignUpError.RegFirstNameNotStandard||r&this.SignUpError.RegGenderNotStandard||r&this.SignUpError.RegBirthdayNotStandard||r&this.SignUpError.RegCountryNotStandard||r&this.SignUpError.RegZipcodeNotStandard||r&this.SignUpError.RegHeardFromNotStandard){
this.fillAsterisks(r);
this.showErrorDialog({message:"Please enter "+this.getErrorNames(r)+" to finish signing up."});
}else{
if(r&this.SignUpError.RegOver16AgeNotMartch){
this.showErrorDialog({message:"You must be at least 16 years of age to use radiusIM."});
}else{
if(r&this.SignUpError.RegIPLimitPerHour){
this.showErrorDialog({message:"We are unable to complete your sign up request at this time. Please try again later."});
}else{
if(r&this.SignUpError.RegPasswordNotAlpha){
this.showErrorDialog({message:"Please use only letters and numbers in your password."});
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
},successSubmit:function(){
this.hideNativeSelectBoxes();
radius.windows.openModalSimpleWindow({width:280,height:151,closeAction:dojo.lang.hitch(this,this.successSubmitEnd),caption:"E-mail sent",body:"Please check your email for a message from radiusIM with a link to verify your account.  Don't forget to look in your bulk email folders too."});
},successSubmitEnd:function(){
this.showNativeSelectBoxes();
this.close();
},showErrorDialog:function(msg){
var s=msg.caption!=undefined?"<p>"+msg.caption+":</p><p>"+msg.message+"</p>":"<p>"+msg.message+"</p>";
this.hideNativeSelectBoxes();
radius.windows.openModalSimpleWindow({width:msg.width?msg.width:300,height:msg.height?msg.height:140,closeAction:dojo.lang.hitch(this,"showNativeSelectBoxes"),caption:"sign up failed",body:s});
},getCaptcha:function(){
radius.validateSession(dojo.lang.hitch(this,"_getCaptcha"));
},_getCaptcha:function(){
this.captchaImage.src=radius.encodeURL("/captcha")+"?uid="+new Date().getTime();
this.captchaLoaded=false;
var o=this;
this.captchaTimeout=setTimeout(function(){
radius.debug("captcha not loaded:"+o.captchaImage.src);
radius.debug("captchaRetry:"+o.captchaRetry);
radius.debug("captchaLoaded:"+o.captchaLoaded);
if(o.captchaRetry<3){
o.captchaRetry+=1;
if(!o.captchaLoaded){
o.getCaptcha();
}
}else{
o.captchaRetry=0;
o.captchaTimeout=null;
}
},2000);
},onLoadCaptcha:function(){
radius.debug("captcha loaded:"+this.captchaImage.src);
this.captchaLoaded=true;
this.captchaRetry=0;
if(this.captchaTimeout){
clearTimeout(this.captchaTimeout);
this.captchaTimeout=null;
}
},encrypt:function(s){
if(s==undefined||!s){
return null;
}
var rsa=new RSAKey();
rsa.setPublic(radius.data.RSAKey.RSAPubKey_N,radius.data.RSAKey.RSAPubKey_E);
return rsa.encrypt(s);
},_:0});
radius.widget.addClass("SignUpWindow",radius.widget.SignUpWindow);


dojo.provide("radius.widget.ForgotPasswordWindow");
radius.widget.ForgotPasswordWindow=function(){
radius.widget.DefaultWindow.call(this);
};
radius.inherits(radius.widget.ForgotPasswordWindow,radius.widget.DefaultWindow);
radius.extend(radius.widget.ForgotPasswordWindow,{widgetType:"ForgotPasswordWindow",caption:"forgot password",allowResize:false,width:340,height:dojo.render.html.ie?149:140,firstPos:true,containTextInputs:true,d_c_maxb:null,d_c_minb:null,ForgotForm:{UsernameId:"fogotWinUsernameDomId"},fillInTemplate:function(_1,_2){
radius.widget.ForgotPasswordWindow.superclass.fillInTemplate.apply(this,arguments);
this.attachNode("forgotWinSubmitBtnDomId","submitBtnNode");
},postCreate:function(_3,_4,_5){
this.submitBtnWidget=radius.widget.create("ImageButton",{widgetId:"forgotWinSubmitBtnId",name:"submit72x21",width:72,height:21},this.submitBtnNode);
this.submitBtnWidget.onClick=dojo.lang.hitch(this,"submitBtnClick");
radius.widget.ForgotPasswordWindow.superclass.postCreate.apply(this,arguments);
},onLoaded:function(){
radius.widget.ForgotPasswordWindow.superclass.onLoaded.apply(this,arguments);
},errorSubmit:function(){
radius.windows.openModalSimpleWindow({width:260,height:140,caption:"forgot password failed",body:"The username or email you entered is invalid. Please try again."});
},successSubmit:function(){
radius.windows.openModalSimpleWindow({width:260,height:140,caption:"forgot password success",body:"A new password will be emailed to you shortly.<br/><br/>You can always change your password in the Account tab of the Settings window.",closeAction:dojo.lang.hitch(this,this.successSubmitEnd)});
},successSubmitEnd:function(){
this.close();
},submitBtnClick:function(){
radius.validateSession(dojo.lang.hitch(this,"_submitBtnClick"));
},_submitBtnClick:function(){
try{
document.body.focus();
flags={minlength:6,maxlength:16};
var _6=true;
var _7=dojo.byId(this.ForgotForm.UsernameId).value;
if(!(dojo.validate.isText(_7,flags)||dojo.validate.isEmailAddress(_7))){
_6=false;
}
if(_6){
_6=radius.jsonrpc.logic.getSecurity().forgot(_7);
if(_6){
this.successSubmit();
}else{
this.errorSubmit();
}
}else{
this.errorSubmit();
}
}
catch(e){
radius.debug("forgotWindow.forgot(): exception "+e.message);
}
},show:function(){
radius.widget.ForgotPasswordWindow.superclass.show.apply(this,arguments);
if(this.firstPos){
this.firstPos=false;
this.center();
}
},closeWindow:function(){
this.close();
radius.widget.ForgotPasswordWindow.superclass.closeWindow.apply(this,arguments);
},open:function(){
if(this.isOpen){
this.focus();
}else{
radius.widget.ForgotPasswordWindow.superclass.open.apply(this,arguments);
this.centerOnOpen=false;
}
},close:function(){
this.clear();
radius.widget.ForgotPasswordWindow.superclass.close.apply(this,arguments);
},clear:function(){
dojo.byId(this.ForgotForm.UsernameId).value="";
},_:0});
radius.widget.addClass("ForgotPasswordWindow",radius.widget.ForgotPasswordWindow);


dojo.provide("radius.widget.VerificationEmailWindow");
radius.widget.VerificationEmailWindow=function(){
radius.widget.DefaultWindow.call(this);
};
radius.inherits(radius.widget.VerificationEmailWindow,radius.widget.DefaultWindow);
radius.extend(radius.widget.VerificationEmailWindow,{widgetType:"VerificationEmailWindow",caption:"verification email",allowResize:false,width:340,height:200,firstPos:true,containTextInputs:true,isModal:true,d_c_maxb:null,d_c_minb:null,VerEmailForm:{EmailId:"verEmailWinEmailDomId"},fillInTemplate:function(){
radius.widget.VerificationEmailWindow.superclass.fillInTemplate.call(this);
this.attachNode("verEmailWinSubmitBtnDomId","submitBtnNode");
},postCreate:function(){
this.submitBtnWidget=radius.widget.create("ImageButton",{widgetId:"verEmailWinSubmitBtnId",name:"submit72x21",width:72,height:21},this.submitBtnNode);
this.submitBtnWidget.onClick=dojo.lang.hitch(this,"submitBtnClick");
radius.widget.VerificationEmailWindow.superclass.postCreate.call(this);
},errorSubmit:function(){
radius.windows.openModalSimpleWindow({caption:"verification email failed",width:260,height:140,body:"The email address you entered appears to be invalid. Please enter a valid email in the form username@domain.com."});
},successSubmit:function(){
radius.windows.openModalSimpleWindow({width:280,height:151,caption:"E-mail sent",body:"Please check your email for a message from radiusIM with a link to verify your account.  Don't forget to look in your bulk email folders too.",closeAction:dojo.lang.hitch(this,this.successSubmitEnd)});
},submitBtnClick:function(){
try{
document.body.focus();
var _1=true;
var _2=dojo.byId(this.VerEmailForm.EmailId).value;
if(!(dojo.validate.isEmailAddress(_2))){
_1=false;
}
if(_1){
_1=radius.jsonrpc.logic.getSignUp().sendVerificationToNewEmail(_2);
if(_1){
this.successSubmit();
}else{
this.errorSubmit();
}
}else{
this.errorSubmit();
}
}
catch(e){
radius.debug("verEmailWindow.submit(): exception "+e.message);
radius.windows.openModalSimpleWindow({width:300,height:140,caption:"verification email failed",body:"Session timeout or server internal exception.",btns:[{name:"ok48x18",width:48,height:18,styles:{marginRight:3},onClick:function(){
document.location.reload();
}}]});
}
},successSubmitEnd:function(){
radius.windows.getLoginWindow().logout(false);
},sendVerificationEmail:function(){
try{
document.body.focus();
var _3=radius.jsonrpc.logic.getSignUp().sendVerificationEmail();
if(_3){
this.successSubmit();
}else{
this.errorSubmit();
}
}
catch(e){
radius.debug("verEmailWindow.sendVerificationEmail(): exception "+e.message);
}
},show:function(){
radius.widget.VerificationEmailWindow.superclass.show.call(this);
if(this.firstPos){
this.firstPos=false;
this.center();
}
},closeWindow:function(){
radius.windows.getLoginWindow().logout(false);
},_:0});
radius.widget.addClass("VerificationEmailWindow",radius.widget.VerificationEmailWindow);


dojo.provide("radius.widget.RegistrationWindow");
radius.widget.RegistrationWindow=function(){
radius.widget.DefaultWindow.call(this);
};
radius.inherits(radius.widget.RegistrationWindow,radius.widget.DefaultWindow);
radius.extend(radius.widget.RegistrationWindow,{widgetType:"RegistrationWindow",caption:"Welcome to radiusIM",allowResize:false,width:330,height:345,firstPos:true,d_c_maxb:null,fillInTemplate:function(_1,_2){
radius.widget.RegistrationWindow.superclass.fillInTemplate.apply(this,arguments);
this.attachNodes({regWinBut1DomId:"regBtn1Node",regWinBut2DomId:"regBtn2Node",regWinBut3DomId:"regBtn3Node",regWinBut4DomId:"regBtn4Node"});
},postCreate:function(_3,_4,_5){
this.regBtnWidget1=radius.widget.create("ImageButton",{widgetId:"regWinBut1DomId",name:"reg/bt1",width:182,height:27},this.regBtn1Node);
this.regBtnWidget2=radius.widget.create("ImageButton",{widgetId:"regWinBut2DomId",name:"reg/bt2",width:182,height:27},this.regBtn2Node);
this.regBtnWidget3=radius.widget.create("ImageButton",{widgetId:"regWinBut3DomId",name:"reg/bt3",width:182,height:27},this.regBtn3Node);
this.regBtnWidget4=radius.widget.create("ImageButton",{widgetId:"regWinBut4DomId",name:"reg/bt4",width:182,height:27},this.regBtn4Node);
this.regBtnWidget1.onClick=dojo.lang.hitch(this,"photoBtnClick");
this.regBtnWidget2.onClick=dojo.lang.hitch(this,"legacyBtnClick");
this.regBtnWidget3.onClick=dojo.lang.hitch(this,"locationBtnClick");
this.regBtnWidget4.onClick=dojo.lang.hitch(this,"profileBtnClick");
radius.html.attachEventM(dojo.byId("regWinRemindLaterDomId"),"onclick",this,"close",true);
radius.widget.RegistrationWindow.superclass.postCreate.apply(this,arguments);
},onLoaded:function(){
radius.widget.RegistrationWindow.superclass.onLoaded.apply(this,arguments);
this.show();
this.center();
},show:function(){
radius.widget.RegistrationWindow.superclass.show.apply(this,arguments);
if(this.firstPos){
this.firstPos=false;
this.center();
}
},closeWindow:function(){
try{
radius.jsonrpc.profile.registrationComplete();
}
catch(e){
radius.debug("registrationWindow.closeWindow(): exception "+e.message);
}
this.close();
radius.widget.RegistrationWindow.superclass.closeWindow.apply(this,arguments);
},photoBtnClick:function(){
try{
radius.jsonrpc.profile.registrationComplete();
}
catch(e){
radius.debug("registrationWindow.photoBtnClick(): exception "+e.message);
}
radius.windows.getSettingsWindow().openPanel({tab:"photos"});
},legacyBtnClick:function(){
try{
radius.jsonrpc.profile.registrationComplete();
}
catch(e){
radius.debug("registrationWindow.legacyBtnClick(): exception "+e.message);
}
radius.windows.getSettingsWindow().openPanel({tab:"legacy"});
},locationBtnClick:function(){
try{
radius.jsonrpc.profile.registrationComplete();
}
catch(e){
radius.debug("registrationWindow.locationBtnClick(): exception "+e.message);
}
radius.windows.getLocationWindow().open(true);
},profileBtnClick:function(){
try{
radius.jsonrpc.profile.registrationComplete();
}
catch(e){
radius.debug("registrationWindow.profileBtnClick(): exception "+e.message);
}
radius.windows.getSettingsWindow().openPanel({tab:"profile"});
},_:0});
radius.widget.addClass("RegistrationWindow",radius.widget.RegistrationWindow);


dojo.provide("radius.widget.PZoomerScrollBar");
radius.widget.PZoomerScrollBar=function(){
radius.widget.VScrollBar.call(this);
};
radius.inherits(radius.widget.PZoomerScrollBar,radius.widget.HScrollBar);
radius.extend(radius.widget.PZoomerScrollBar,{widgetType:"PZoomerScrollBar",name:"pzoomer",config:{btns:{over:false,pres:false,width:12,height:12},track:{img1:{width:7,height:6},imgc:{width:1,height:6},img2:{width:9,height:6}},slider:{imgc:{width:12,height:12}}},autoResizeSlider:false,maxSliderPos:100,sliderPos:0,sliderSize:1,clickIncrement:1,onSliding:function(_1){
_1=Math.round(_1);
return radius.widget.PZoomerScrollBar.superclass.onSliding.call(this,_1);
}});
radius.widget.addClass("PZoomerScrollBar",radius.widget.PZoomerScrollBar);


dojo.provide("radius.widget.SettingsWindow");
radius.widget.PhotoDragMoveSource=function(_1,_2){
dojo.dnd.HtmlDragSource.call(this,_1,_2);
};
radius.inherits(radius.widget.PhotoDragMoveSource,dojo.dnd.HtmlDragSource);
radius.extend(radius.widget.PhotoDragMoveSource,{onDragStart:function(){
var _3=new radius.widget.PhotoDragMoveObject(this.dragObject,this.type,this.domNode);
if(this.profileWindow!=undefined&&this.profileWindow){
_3.profileWindow=this.profileWindow;
}
if(this.constrainToContainer){
_3.constrainTo(this.constrainingContainer);
}
return _3;
}});
radius.widget.PhotoDragMoveObject=function(_4,_5,_6){
dojo.dnd.HtmlDragObject.call(this,_4,_5);
this.handlerNode=_6;
};
radius.widget.showErrorCodeMsg=function(_7,_8,_9,_a,_b){
radius.debug("showing dialog for msg "+_b+"("+_9[_b]+").  size="+_a);
radius.debug("showErrorCodeMsg: panel="+_7);
if(_b<(_a-1)){
radius.debug("popping up win for msg "+_b);
radius.windows.openModalSimpleWindow({width:260,height:140,caption:"Unable to Save Profile",body:_9[_b],closeAction:dojo.lang.hitch(this,function(){
radius.debug("calling this.showErrorCodeMsg( "+_a+","+(_b+1)+" );");
setTimeout(function(){
radius.widget.showErrorCodeMsg(_7,_8,_9,_a,_b+1);
},100);
})});
}else{
radius.windows.openModalSimpleWindow({width:260,height:140,caption:"Unable to Save Profile",body:_9[_b],closeAction:dojo.lang.hitch(this,function(){
radius.debug("calling fillAsterisks("+_7.failedAsterisks+", "+_8+")");
radius.debug("panel="+_7);
radius.widget.fillAsterisks(_7.failedAsterisks,_8);
})});
}
};
radius.widget.fillAsterisks=function(_c,r){
var l=_c.length;
for(var i=0;i<l;++i){
if(r&_c[i][2]){
_c[i][0].className="setWinCaptTextClass setWinRequiredLabelClass";
_c[i][1].style.visibility="visible";
}
}
};
radius.inherits(radius.widget.PhotoDragMoveObject,dojo.dnd.HtmlDragObject);
radius.extend(radius.widget.PhotoDragMoveObject,{onDragEnd:function(e){
delete this.dragClone;
},onDragStart:function(e){
dojo.html.clearSelection();
this.dragClone=this.domNode;
this.dragCloneSize={width:dojo.style.getInnerWidth(this.dragClone),height:dojo.style.getInnerHeight(this.dragClone)};
this.handlerSize={width:dojo.style.getInnerWidth(this.handlerNode),height:dojo.style.getInnerHeight(this.handlerNode)};
this.scrollOffset={top:dojo.html.getScrollTop(),left:dojo.html.getScrollLeft()};
this.dragStartPosition={top:dojo.style.getAbsoluteY(this.domNode),left:dojo.style.getAbsoluteX(this.domNode)};
this.dragOffset={top:this.dragStartPosition.top-e.clientY,left:this.dragStartPosition.left-e.clientX};
if(this.domNode.parentNode.nodeName.toLowerCase()=="body"){
this.parentPosition={top:0,left:0};
}else{
this.parentPosition={top:dojo.style.getAbsoluteY(this.domNode.parentNode,true),left:dojo.style.getAbsoluteX(this.domNode.parentNode,true)};
}
this.dragClone.style.position="absolute";
if(this.constrainToContainer){
this.constraints=this.getConstraints();
}
},onDragMove:function(e){
this.updateDragOffset();
var x=this.dragOffset.left+e.clientX-this.parentPosition.left;
var y=this.dragOffset.top+e.clientY-this.parentPosition.top;
if(this.constrainToContainer){
if(x<this.constraints.minX){
x=this.constraints.minX;
}
if(y<this.constraints.minY){
y=this.constraints.minY;
}
if(x>this.constraints.maxX){
x=this.constraints.maxX;
}
if(y>this.constraints.maxY){
y=this.constraints.maxY;
}
}
if(!this.disableY){
this.dragClone.style.top=y+"px";
}
if(!this.disableX){
this.dragClone.style.left=x+"px";
}
var _15=10;
if(x<_15-this.dragCloneSize.width){
x=_15-this.dragCloneSize.width;
}
if(y<_15-this.dragCloneSize.height){
y=_15-this.dragCloneSize.height;
}
if(x>this.handlerSize.width-_15){
x=this.handlerSize.width-_15;
}
if(y>this.handlerSize.height-_15){
y=this.handlerSize.height-_15;
}
if(this.profileWindow!=undefined&&this.profileWindow){
var pan=this.profileWindow.panels.photos;
var i=pan.selectedPhoto[0].index;
var p=pan.photos[i];
pan.selectedPhoto[0].changed=true;
pan.selectedPhoto[0].style.left=parseInt(x/pan.xz+1)+"px";
pan.selectedPhoto[0].style.top=parseInt(y/pan.yz+1)+"px";
p.leftOffset=x;
p.topOffset=y;
pan.mainPhotoNode.style.left=x;
pan.mainPhotoNode.style.top=y;
if(pan.myicon.index==pan.selectedPhoto[0].index){
pan.myicon.style.left=parseInt(p.leftOffset/2-pan.xz2)+"px";
pan.myicon.style.top=parseInt(p.topOffset/2-pan.yz2)+"px";
}
this.profileWindow.enableApplyBtn();
}
}});
radius.widget.SimpleButton=function(_19,_1a,_1b,_1c){
this.node=_19;
this.id=_19.id;
this.pathToFace=_1a;
this.faceImgType=_1b;
this.onClickHandler=_1c;
this.disabled=false;
this.dis=radius.image.createImageNode();
this.over=radius.image.createImageNode();
this.pressed=radius.image.createImageNode();
this.regular=radius.image.createImageNode();
this.dis.src=this.pathToFace+"/dis."+this.faceImgType;
this.over.src=this.pathToFace+"/over."+this.faceImgType;
this.pressed.src=this.pathToFace+"/pres."+this.faceImgType;
this.regular.src=this.pathToFace+"/reg."+this.faceImgType;
};
dojo.lang.extend(radius.widget.SimpleButton,{mouseover:function(){
if(!this.disabled){
this.node.src=this.over.src;
}
},mouseout:function(){
if(!this.disabled){
this.node.src=this.regular.src;
}
},mousedown:function(){
if(!this.disabled){
this.node.src=this.pressed.src;
}
},disable:function(){
if(!this.disabled){
this.disabled=true;
this.node.src=this.dis.src;
}
},enable:function(){
if(this.disabled){
this.disabled=false;
this.node.src=this.regular.src;
}
}});
radius.widget.SettingsWindow=function(){
radius.widget.DefaultWindow.call(this);
};
radius.inherits(radius.widget.SettingsWindow,radius.widget.DefaultWindow);
radius.extend(radius.widget.SettingsWindow,{widgetType:"SettingsWindow",caption:"Settings",allowResize:false,width:540,height:370,firstPos:true,selectedTab:null,tabClasNames:{},againFirstAction:false,panelParams:null,restoreFocus:null,containTextInputs:true,d_l:{dsize:29,style:"width:6px; height:1px; position:absolute; left:0px; top:23px",src:"/images/wins/bb_l_6x1blue.png?version=RELEASE_0_27&build=200608281106",src0:"/images/wins/bb_l_6x1blue_out.png?version=RELEASE_0_27&build=200608281106"},d_dl:{style:"width:6px; height:6px; position:absolute; left:0px; bottom:0px",src:"/images/wins/bb_dl_6x6blue.png?version=RELEASE_0_27&build=200608281106",src0:"/images/wins/bb_dl_6x6blue_out.png?version=RELEASE_0_27&build=200608281106"},d_c_maxb:null,panels:{general:{},photos:{},profile:{collegesCache:{}},legacy:{},account:{}},PasswordAsterisks:"**********",SettingsError:{PhotoProfileNotSession:1,PhotoProfileNotLogic:2,PhotoProfileNotAuthorized:4,PhotoProfileNotMultipartContent:8,PhotoProfileNotStandardImage:16,PhotoProfileImageTooBig:32,PhotoProfileCountLimit:64,PhotoProfileImageNotFound:128,PhotoProfileSizeLimitExceeded:256,PhotoProfileServerInternalError:512,ProfileTownNotStandard:1,ProfileHeadlineNotStandard:2,ProfileCollegeStateDoesNotMatch:4,ProfileCollegeDoesNotMatch:8,ProfileHighSchoolNotStandard:16,ProfilePlacesNotStandard:32,ProfileMusicNotStandard:64,ProfileMoviesNotStandard:128,ProfileBooksNotStandard:256,ProfileLinksNotStandard:512,LegacyAOLUsernameNotStandard:1,LegacyAOLPasswordNotStandard:2,LegacyAOLPasswordDoesNotMatch:4,LegacyAOLVerificationFailed:8,LegacyMSNUsernameNotStandard:16,LegacyMSNPasswordNotStandard:32,LegacyMSNPasswordDoesNotMatch:64,LegacyMSNVerificationFailed:128,LegacyYahooUsernameNotStandard:256,LegacyYahooPasswordNotStandard:512,LegacyYahooPasswordDoesNotMatch:1024,LegacyYahooVerificationFailed:2048,LegacyGoogleUsernameNotStandard:4096,LegacyGooglePasswordNotStandard:8192,LegacyGooglePasswordDoesNotMatch:16384,LegacyGoogleVerificationFailed:32768,AccountPasswordNotStandard:1,AccountPasswordDoesNotMatch:2,AccountFirstNameNotStandard:4,AccountGenderNotStandard:8,AccountBirthdayNotStandard:16,AccountCountryNotStandard:32,AccountZipcodeNotStandard:64,AccountOver16AgeNotMartch:128},PhotoBuildFlags:{Init:1,Add:2,Delete:3},PhotoURL:"/images/img",fillInTemplate:function(_1d,_1e){
radius.widget.SettingsWindow.superclass.fillInTemplate.apply(this,arguments);
this.attachNodes({settWinSaveBtnDomId:"saveBtnNode",settWinApplyBtnDomId:"applyBtnNode",settWinCancelBtnDomId:"cancelBtnNode",settWinPhotoPanRemoveBtnDomId:"photoPanRemoveBtnNode",settWinAccountPanSubmitBtnDomId:"accountPanSubmitBtnNode"});
},postCreate:function(_1f,_20,_21){
this.createGeneralPanel();
this.createPhotosPanel();
this.createProfilePanel();
this.createLegacyPanel();
this.createAccountPanel();
this.topLeftUserIconImg=dojo.byId("settWinLeftTopUserIconDomId");
this.saveBtnWidget=radius.widget.create("ImageButton",{widgetId:"settWinSaveBtnId",name:"save48x18",width:48,height:18},this.saveBtnNode);
this.applyBtnWidget=radius.widget.create("ImageButton",{widgetId:"settWinApplyBtnId",name:"apply48x18",dis:"png",width:48,height:18},this.applyBtnNode);
this.applyBtnWidget.disable();
this.cancelBtnWidget=radius.widget.create("ImageButton",{widgetId:"settWinCancelBtnId",name:"cancelTiny48x18",width:48,height:18},this.cancelBtnNode);
this.saveBtnWidget.onClick=dojo.lang.hitch(this,"clickSaveBtn");
this.applyBtnWidget.onClick=dojo.lang.hitch(this,"clickApplyBtn");
this.cancelBtnWidget.onClick=dojo.lang.hitch(this,"clickCancelBtn");
this.panels.photos.removePhotoBtnWidget=radius.widget.create("ImageButton",{widgetId:"settWinRemovePhotoBtnId",name:"remove_red48x18",dis:"png",width:48,height:18},this.photoPanRemoveBtnNode);
this.panels.photos.removePhotoBtnWidget.onClick=dojo.lang.hitch(this,"removePhoto");
this.panels.account.submitBtnWidget=radius.widget.create("ImageButton",{widgetId:"settWinSubmitBtnId",name:"submit72x21",width:72,height:21},this.accountPanSubmitBtnNode);
this.panels.account.submitBtnWidget.onClick=dojo.lang.hitch(this,"submitAccount");
var o=this;
this.panelParams={general:{name:"general",pan:this.panels.general,tab:dojo.byId("settWinGeneralTabDomId"),panel:dojo.byId("settWinGeneralPanelDomId"),firstAction:function(){
if(o.panelParams.general.first==undefined||o.panelParams.general.first){
o.panelParams.general.first=false;
o.fillGeneral();
}
},apply:function(){
return o.applyGeneral();
},failed:function(r){
return o.failedGeneral(r);
}},photos:{name:"photos",pan:this.panels.photos,tab:dojo.byId("settWinPhotosTabDomId"),panel:dojo.byId("settWinPhotosPanelDomId"),firstAction:function(){
if(o.panelParams.photos.first==undefined||o.panelParams.photos.first){
o.panelParams.photos.first=false;
o.fillPhotos();
}
},hideAction:function(){
o.showDetailsBody();
},showAction:function(){
o.hideDetailsBody();
},apply:function(){
return o.applyPhotos();
},failed:function(r){
return o.failedPhotos(r);
}},profile:{name:"profile",pan:this.panels.profile,tab:dojo.byId("settWinProfileTabDomId"),panel:dojo.byId("settWinProfilePanelDomId"),firstAction:function(){
if(o.panelParams.profile.first==undefined||o.panelParams.profile.first){
o.panelParams.profile.first=false;
o.fillProfile();
}
},apply:function(){
return o.applyProfile();
},failed:function(r){
return o.failedProfile(r);
}},legacy:{name:"legacy",pan:this.panels.legacy,tab:dojo.byId("settWinLegacyTabDomId"),panel:dojo.byId("settWinLegacyPanelDomId"),firstAction:function(){
if(o.panelParams.legacy.first==undefined||o.panelParams.legacy.first){
o.panelParams.legacy.first=false;
o.fillLegacy();
}
},hideAction:function(){
o.showDetailsBody();
},showAction:function(){
o.hideDetailsBody();
},apply:function(){
return o.applyLegacy();
},failed:function(r){
return o.failedLegacy(r);
}},account:{name:"account",pan:this.panels.account,tab:dojo.byId("settWinAccountTabDomId"),panel:dojo.byId("settWinAccountPanelDomId"),firstAction:function(){
if(o.panelParams.account.first==undefined||o.panelParams.account.first){
o.panelParams.account.first=false;
o.fillAccount();
}
},apply:function(){
return o.applyAccount();
},failed:function(r){
return o.failedAccount(r);
}}};
dojo.event.connect(this.panelParams.general.tab,"onclick",function(){
o.showPanel(o.panelParams.general);
});
dojo.event.connect(this.panelParams.photos.tab,"onclick",function(){
o.showPanel(o.panelParams.photos);
});
dojo.event.connect(this.panelParams.profile.tab,"onclick",function(){
o.showPanel(o.panelParams.profile);
});
dojo.event.connect(this.panelParams.legacy.tab,"onclick",function(){
o.showPanel(o.panelParams.legacy);
});
dojo.event.connect(this.panelParams.account.tab,"onclick",function(){
o.showPanel(o.panelParams.account);
});
radius.widget.SettingsWindow.superclass.postCreate.apply(this,arguments);
},onLoaded:function(){
this.showPanel(this.panelParams.general);
radius.widget.SettingsWindow.superclass.onLoaded.apply(this,arguments);
},closeWindow:function(){
this.clickCancelBtn(false);
this.close();
radius.widget.SettingsWindow.superclass.closeWindow.apply(this,arguments);
},openPanel:function(_28){
if(this.isOpen){
this.focus();
}else{
this.open();
}
if(_28!=undefined){
if(_28.tab!=undefined){
var o=this;
setTimeout(function(){
o.showPanel(o.panelParams[_28.tab]);
},0);
}
}
},cutString:function(s,_2b,end){
if(s!=undefined&&s&&_2b!=undefined&&_2b){
var ls=s.length;
if(ls>_2b){
return (end==undefined||end)?s.substring(0,_2b)+"...":"..."+s.substring(ls-_2b,ls);
}
}
return s;
},show:function(){
radius.widget.SettingsWindow.superclass.show.apply(this,arguments);
var p=this.selectedTab;
if(this.againFirstAction&&p){
dojo.html.show(p.panel);
p.firstAction();
}
if(this.firstPos){
this.firstPos=false;
this.center();
}
},enableApplyBtn:function(){
if(this.selectedTab){
this.selectedTab.applyButton=true;
this.applyBtnWidget.enable();
}
},clear:function(){
this.againFirstAction=true;
var pan=this.panels.photos;
pan.defPhoto=null;
pan.myicon.style.left="0px";
pan.myicon.style.top="0px";
pan.myicon.width=48;
pan.myicon.height=36;
for(i in this.panelParams){
var p=this.panelParams[i];
p.first=true;
p.applyButton=false;
}
this.applyBtnWidget.disable();
this.showPanel(this.panelParams.general);
},clickApplyBtn:function(){
document.body.focus();
if(this.selectedTab!=null){
var r=this.selectedTab.apply();
if(r==0){
var p=this.selectedTab;
p.first=true;
dojo.html.show(p.panel);
p.firstAction();
p.applyButton=false;
this.applyBtnWidget.disable();
}else{
this.selectedTab.failed(r);
}
}
},clickSaveBtn:function(){
document.body.focus();
try{
var _33=radius.jsonrpc.profile.getSettingsData();
var _34=false,savePhotos=false,saveLegacy=false,updateProfile=false;
if(this.applyGeneral(true)&&this.panelParams.general.applyButton){
_33.general=this.panels.general.data;
_34=true;
}else{
_33.general=null;
}
if(this.applyPhotos(true)){
savePhotos=true;
updateProfile=true;
}
radius.debug("this.panelParams.profile.applyButton="+this.panelParams.profile.applyButton);
if(this.applyProfile(true)&&this.panelParams.profile.applyButton){
radius.debug("applyProfile(true) = not null");
_33.profile=this.panels.profile.data;
_34=true;
updateProfile=true;
}else{
_33.profile=null;
}
if(this.applyLegacy(true)&&this.panelParams.legacy.applyButton){
_33.legacy=this.panels.legacy.data;
_34=true;
saveLegacy=true;
}else{
_33.legacy=null;
}
if(this.applyAccount(true)&&this.panelParams.account.applyButton){
_33.account=this.panels.account.data;
_34=true;
updateProfile=true;
}else{
_33.account=null;
}
if(_34||savePhotos){
var _35=false;
var _36=null;
var _37=0;
if(_34){
_36=radius.jsonrpc.profile.saveProfile(_33);
radius.generalSettings=radius.jsonrpc.profile.getGenSettings();
var l=_36.length;
for(var i=0;i<l;++i){
if(_36[i]!=0){
_35=true;
break;
}
}
}
if(savePhotos){
_37=this.applyPhotos();
if(_37!=0){
_35=true;
}
}
if(updateProfile){
this.updateYourProfile();
}
if(_35){
this.failedSave(_36[0],_37,_36[1],_36[2],_36[3]);
}else{
if(saveLegacy){
this.changeLegacy(_33.legacy);
}
this.successSave();
}
}else{
this.saveEnd();
}
}
catch(e){
radius.debug("settingsWindow.clickSaveBtn(): exception "+e.message);
}
},successSave:function(){
radius.windows.openModalSimpleWindow({width:260,height:140,caption:"Save Successful",body:"Your settings have been saved",closeAction:dojo.lang.hitch(this,this.saveEnd)});
radius.IM.MessageWindowManager.applyNewSettings();
},errorCodeToMsgArray:function(_3a){
var _3b=new Array();
if(_3a==0){
return _3b;
}
if(_3a&this.SettingsError.ProfileTownNotStandard){
_3b.push(this.lengthTooLongMsg("city or town",255));
}
if(_3a&this.SettingsError.ProfileHeadlineNotStandard){
_3b.push(this.lengthTooLongMsg("headline",150));
}
if(_3a&this.SettingsError.ProfileCollegeStateDoesNotMatch){
_3b.push("The college that you selected is does not match the college state");
}
if(_3a&this.SettingsError.ProfileCollegeDoesNotMatch){
_3b.push(this.lengthTooLongMsg("college name",200));
}
if(_3a&this.SettingsError.ProfileHighSchoolNotStandard){
_3b.push(this.lengthTooLongMsg("high school",255));
}
if(_3a&this.SettingsError.ProfilePlacesNotStandard){
_3b.push(this.lengthTooLongMsg("places",5000));
}
if(_3a&this.SettingsError.ProfileMusicNotStandard){
_3b.push(this.lengthTooLongMsg("music",5000));
}
if(_3a&this.SettingsError.ProfileMoviesNotStandard){
_3b.push(this.lengthTooLongMsg("movies",5000));
}
if(_3a&this.SettingsError.ProfileBooksNotStandard){
_3b.push(this.lengthTooLongMsg("books",5000));
}
if(_3a&this.SettingsError.ProfileLinksNotStandard){
_3b.push(this.lengthTooLongMsg("links",5000));
}
if(_3b.length==0){
_3b.push("We were unable to validate your profile at this time.  Error code: "+_3a);
}
return _3b;
},lengthTooLongMsg:function(_3c,_3d){
return "The "+_3c+" entered is longer then the maximum allowed length ("+_3d+") characters.";
},failedSave:function(_3e,_3f,_40,_41,_42){
if(_3e!=0){
this.showPanelAndErrors(this.panelParams.general,_3e);
}else{
if(_3f!=0){
this.showPanelAndErrors(this.panelParams.photos,_3f);
}else{
if(_40!=0){
this.showPanelAndErrors(this.panelParams.profile,_40);
}else{
if(_41!=0){
this.showPanelAndErrors(this.panelParams.legacy,_41);
}else{
if(_42!=0){
this.showPanelAndErrors(this.panelParams.account,_42);
}else{
radius.windows.openModalSimpleWindow({width:260,height:140,caption:"Save Failed",body:"Unable to save changes",closeAction:dojo.lang.hitch(this,this.saveEnd)});
}
}
}
}
}
},showPanelAndErrors:function(_43,_44,_45){
this.openPanel({tab:_43.name});
this.showErrorCodeMsgs(_44,_43.pan);
},saveEnd:function(){
this.clickCancelBtn();
},clickCancelBtn:function(_46){
this.againFirstAction=true;
dojo.html.hide(this.selectedTab.panel);
for(i in this.panelParams){
var p=this.panelParams[i];
p.first=true;
p.applyButton=false;
}
this.applyBtnWidget.disable();
if(_46==undefined||_46){
this.closeWindow();
}
},clearAsterisks:function(_48){
var l=_48.length;
for(var i=0;i<l;++i){
_48[i][0].className="setWinCaptTextClass";
_48[i][1].style.visibility="hidden";
}
},updateYourProfile:function(){
var pw=radius.windows.profileWin;
if(pw&&(pw.username==radius.loginedUsername||pw.username==null)&&pw.isVisible()){
pw.username=null;
pw.open();
this.focus();
}
},showYourProfile:function(){
radius.loadingBar.callWithBar(dojo.lang.hitch(this,this._showYourProfile));
},_showYourProfile:function(){
var win=radius.windows.getProfileWindow();
if(win.isVisible()&&win.username==null){
win.focus();
}else{
win.clear();
win.restoreFocus=this;
win.open();
}
},fillWindow:function(){
this.showMyIcon();
},applyGeneral:function(_4d){
var pan=this.panels.general;
if(_4d&&pan.data==undefined){
return false;
}
try{
var l=pan.props.length;
for(var i=0;i<l;++i){
var p=pan.props[i];
pan.data[p.prop]=p.checked;
}
if(_4d){
return true;
}
var r=radius.jsonrpc.profile.applyGeneralSettings(pan.data);
radius.generalSettings=radius.jsonrpc.profile.getGenSettings();
radius.IM.MessageWindowManager.applyNewSettings();
return r;
}
catch(e){
radius.debug("settingsWindow.applyGeneral(): exception "+e.message);
}
},failedGeneral:function(r){
var pan=this.panels.general;
},fillGeneral:function(){
var pan=this.panels.general;
try{
pan.data=radius.generalSettings;
var l=pan.props.length;
for(var i=0;i<l;++i){
var p=pan.props[i];
p.setState(pan.data[p.prop]);
}
}
catch(e){
radius.debug("settingsWindow.fillGeneral(): exception "+e.message);
}
},createGeneralPanel:function(){
var pan=this.panels.general;
pan.props=new Array();
pan.props.push(radius.widget.create("CheckBox",{prop:"showMeAtZipOffline",name:"cbox11x11blue",checked:false,textStyle:"font-size:11px;"},dojo.byId("signWinGeneralPanProp1DomId")));
pan.props.push(radius.widget.create("CheckBox",{prop:"enableFoF",name:"cbox11x11blue",checked:false,textStyle:"font-size:11px;"},dojo.byId("signWinGeneralPanProp2DomId")));
pan.props.push(radius.widget.create("CheckBox",{prop:"confirmLogout",name:"cbox11x11blue",checked:false,textStyle:"font-size:11px;"},dojo.byId("signWinGeneralPanProp3DomId")));
pan.props.push(radius.widget.create("CheckBox",{prop:"displayTimeOnMessages",name:"cbox11x11blue",checked:false,textStyle:"font-size:11px;"},dojo.byId("signWinGeneralPanProp4DomId")));
pan.props.push(radius.widget.create("CheckBox",{prop:"saveLocation",name:"cbox11x11blue",checked:false,textStyle:"font-size:11px;"},dojo.byId("signWinGeneralPanProp5DomId")));
pan.props.push(radius.widget.create("CheckBox",{prop:"keepConversation",name:"cbox11x11blue",checked:false,textStyle:"font-size:11px;"},dojo.byId("signWinGeneralPanProp7DomId")));
pan.props.push(radius.widget.create("CheckBox",{prop:"playSounds",name:"cbox11x11blue",checked:false,textStyle:"font-size:11px;"},dojo.byId("signWinGeneralPanProp8DomId")));
pan.props.push(radius.widget.create("CheckBox",{prop:"logAll",name:"cbox11x11blue",checked:false,textStyle:"font-size:11px;"},dojo.byId("signWinGeneralPanProp9DomId")));
pan.deleteMsgLogsBtn=dojo.byId("signWinGeneralPanDeleteMsgLogsDomId");
dojo.event.connect(pan.deleteMsgLogsBtn,"onclick",this.deleteMsgLogs);
var l=pan.props.length;
for(var i=0;i<l;++i){
var p=pan.props[i];
p.onChange=dojo.lang.hitch(this,"enableApplyBtn");
}
},deleteMsgLogs:function(){
radius.windows.openModalSimpleWindow({width:210,height:130,caption:"delete messages log",align:"center",body:"Do you want to permanently delete all your message logs?",btns:[{name:"yes48x18",width:48,height:18,styles:{marginRight:3},onClick:function(win){
try{
radius.jsonrpc.profile.deleteMessages();
}
catch(e){
radius.debug("settingsWindow.deleteMsgLogs(): exception "+e.message);
}
win.close();
}},{name:"no48x18",width:48,height:18,styles:{marginRight:3}},]});
},applyPhotos:function(_5e){
var pan=this.panels.photos;
if(_5e&&pan.data==undefined){
return false;
}
try{
var l=pan.photos.length;
var _61={list:new Array(),javaClass:"java.util.ArrayList"};
for(var i=0;i<l;++i){
var p=pan.photoNodes[i];
if(p[0].changed){
_61.list.push(pan.photos[i]);
}
}
if(_5e){
var b=_61.list.length>0?true:false;
if(pan.defPhoto){
var _65=radius.jsonrpc.photo.getDefPhoto();
if(_65){
return _65.id!=pan.defPhoto||b;
}
}
return b;
}
var r=radius.jsonrpc.photo.applyPhotos(_61,pan.defPhoto);
radius.mymagicNumber=new Date().valueOf();
if(radius.windows.mapWin&&radius.windows.mapWin.gmap){
radius.windows.mapWin.requestUpdateFriends();
}
this.updateYourProfile();
return r;
}
catch(e){
radius.debug("settingsWindow.applyPhotos(): exception "+e.message);
}
},failedPhotos:function(r){
var pan=this.panels.photos;
},fillPhotos:function(){
var pan=this.panels.photos;
if(pan.skipFillZoomer==undefined||!pan.skipFillZoomer){
pan.skipFillZoomer=true;
pan.zoomer=radius.widget.create("PZoomerScrollBar",{sliderPos:100,sizingStyles:{}},"settWinPhotoPanZoomDomId");
var _6a=pan.zoomer.trackImgcNode;
var _6b=radius.image.makeNode(pan.zoomer.prefixPath+pan.zoomer.name+"/track/imgc.jpg?version=RELEASE_0_27&build=200608281106");
radius.style.setStyles(_6b,pan.zoomer.config.track.imgc);
radius.style.setStyles(_6b,{width:"100%"});
pan.zoomer.trackcNode.replaceChild(_6b,_6a);
pan.zoomer.trackImgcNode=_6b;
pan.zoomer.onSliding=dojo.lang.hitch(this,"zoomerSliding");
}
try{
pan.data=radius.jsonrpc.photo.getPhotos();
pan.defPhoto=pan.data[1];
var l=pan.data[0].list.length;
pan.photos=new Array();
for(var i=0;i<l;++i){
var p=pan.data[0].list[i];
pan.photos.push(p);
if(p.id==pan.defPhoto){
pan.defPhotoIndex=i;
}
if(pan.selectedPhotoId&&pan.selectedPhotoId==p.id){
pan.selectedPhotoIndex=i;
}
}
if(l>=pan.photoNodes.length){
pan.browserButtonWidget.disable();
pan.browserInput.disabled=true;
}else{
pan.browserButtonWidget.enable();
pan.browserInput.disabled=false;
}
if(l<=1){
pan.removePhotoBtnWidget.disable();
}else{
pan.removePhotoBtnWidget.enable();
}
setTimeout(dojo.lang.hitch(this,"postSelectPhoto"),0);
}
catch(e){
radius.debug("settingsWindow.fillPhotos: failed - "+e.message);
}
pan.photoUploadForm.reset();
pan.uploadButtonWidget.disable();
pan.filePath.innerHTML="";
},postSelectPhoto:function(){
var pan=this.panels.photos;
this.incFilledPhotos();
this.buildPhotos();
if(pan.selectedPhotoIndex!=undefined){
this.selectPhoto(pan.photoNodes[pan.selectedPhotoIndex]);
}else{
this.selectPhoto(pan.photoNodes[0]);
}
delete pan.selectedPhotoIndex;
if(pan.defPhotoIndex!=undefined){
pan.photoButton.change(pan.photoNodes[pan.defPhotoIndex][4],true,true,true);
}else{
pan.photoButton.change(pan.photoNodes[0][4],true,true,true);
}
delete pan.defPhotoIndex;
this.decFilledPhotos();
},incFilledPhotos:function(){
var pan=this.panels.photos;
if(pan.filledPhotos!=undefined){
++pan.filledPhotos;
}else{
pan.filledPhotos=1;
}
},decFilledPhotos:function(){
var pan=this.panels.photos;
if(pan.filledPhotos!=undefined){
if(pan.filledPhotos>1){
--pan.filledPhotos;
}else{
delete pan.filledPhotos;
}
}
},isFilledPhotos:function(){
var pan=this.panels.photos;
return pan.filledPhotos!=undefined?true:false;
},createPhotosPanel:function(){
var pan=this.panels.photos;
pan.photoButton=new radius.widget.RadioGroup();
pan.photoButtons={};
pan.photoButtons.photo1=pan.photoButton.add("settWinPhotoPanSel1DomId",{radioName:0,name:"radio13x13",checked:false,width:13,height:13,disabled:true,textStyle:"font-size:9px;"});
pan.photoButtons.photo2=pan.photoButton.add("settWinPhotoPanSel2DomId",{radioName:1,name:"radio13x13",checked:false,width:13,height:13,disabled:true,textStyle:"font-size:9px;"});
pan.photoButtons.photo3=pan.photoButton.add("settWinPhotoPanSel3DomId",{radioName:2,name:"radio13x13",checked:false,width:13,height:13,disabled:true,textStyle:"font-size:9px;"});
pan.photoButtons.photo4=pan.photoButton.add("settWinPhotoPanSel4DomId",{radioName:3,name:"radio13x13",checked:false,width:13,height:13,disabled:true,textStyle:"font-size:9px;"});
pan.photoButtons.photo5=pan.photoButton.add("settWinPhotoPanSel5DomId",{radioName:4,name:"radio13x13",checked:false,width:13,height:13,disabled:true,textStyle:"font-size:9px;"});
pan.photoButton.onChange=dojo.lang.hitch(this,"changeMyIcon");
pan.browserButton=dojo.byId("settWinPhotoPanBrowseDomId");
pan.uploadButton=dojo.byId("settWinPhotoPanUploadDomId");
pan.browserInput=dojo.byId("settWinPhotoPanInputBrowseDomId");
pan.uploadInput=dojo.byId("settWinPhotoPanInputUploadDomId");
pan.filePath=dojo.byId("settWinPhotoPanFilePathDomId");
if(dojo.render.html.safari){
pan.browserInput.style.top="0px";
pan.browserInput.style.right="-15px";
}
var d=dojo.byId("settWinPhotosPanUploadDivDomId");
if(dojo.render.html.ie){
d.style.left="-15px";
}
pan.yourProfile=dojo.byId("settWinPhotosPanYourProfileDomId");
dojo.event.connect(pan.yourProfile,"onclick",this,"showYourProfile");
pan.browserButtonWidget=new radius.widget.SimpleButton(pan.browserButton,"images/btns/browse48x18","gif",null);
pan.uploadButtonWidget=new radius.widget.SimpleButton(pan.uploadButton,"images/btns/upload48x18","gif",null);
pan.uploadButtonWidget.disable();
pan.photoUploadForm=dojo.byId("settWinPhotosPanUploadForm");
dojo.event.connect(pan.browserInput,"onmouseover",pan.browserButtonWidget,"mouseover");
dojo.event.connect(pan.browserInput,"onmouseout",pan.browserButtonWidget,"mouseout");
dojo.event.connect(pan.browserInput,"onmousedown",pan.browserButtonWidget,"mousedown");
dojo.event.connect(pan.browserInput,"onmouseup",pan.browserButtonWidget,"mouseout");
var o=this;
dojo.event.connect(pan.browserInput,"onchange",function(){
o.showFilePath();
});
dojo.event.connect(pan.uploadInput,"onmouseover",pan.uploadButtonWidget,"mouseover");
dojo.event.connect(pan.uploadInput,"onmouseout",pan.uploadButtonWidget,"mouseout");
dojo.event.connect(pan.uploadInput,"onmousedown",pan.uploadButtonWidget,"mousedown");
dojo.event.connect(pan.uploadInput,"onmouseup",pan.uploadButtonWidget,"mouseout");
dojo.event.connect(pan.uploadInput,"onclick",this,"photoUpload");
pan.ioFrame=dojo.byId("dojoIoIframe");
pan.photos=new Array();
pan.mainPhotoNode=dojo.byId("settWinPhotoPanMainPhotoDomId");
pan.photoNodes=[[dojo.byId("settWinPhotoPanPhoto1DomId"),dojo.byId("settWinPhotoPanCanvasPhoto1DomId"),dojo.byId("settWinPhotoPanEmptyPhoto1DomId"),dojo.byId("settWinPhotoPanBorderPhoto1DomId"),pan.photoButtons.photo1,dojo.byId("settWinPhotoPanBorder2Photo1DomId")],[dojo.byId("settWinPhotoPanPhoto2DomId"),dojo.byId("settWinPhotoPanCanvasPhoto2DomId"),dojo.byId("settWinPhotoPanEmptyPhoto2DomId"),dojo.byId("settWinPhotoPanBorderPhoto2DomId"),pan.photoButtons.photo2,dojo.byId("settWinPhotoPanBorder2Photo2DomId")],[dojo.byId("settWinPhotoPanPhoto3DomId"),dojo.byId("settWinPhotoPanCanvasPhoto3DomId"),dojo.byId("settWinPhotoPanEmptyPhoto3DomId"),dojo.byId("settWinPhotoPanBorderPhoto3DomId"),pan.photoButtons.photo3,dojo.byId("settWinPhotoPanBorder2Photo3DomId")],[dojo.byId("settWinPhotoPanPhoto4DomId"),dojo.byId("settWinPhotoPanCanvasPhoto4DomId"),dojo.byId("settWinPhotoPanEmptyPhoto4DomId"),dojo.byId("settWinPhotoPanBorderPhoto4DomId"),pan.photoButtons.photo4,dojo.byId("settWinPhotoPanBorder2Photo4DomId")],[dojo.byId("settWinPhotoPanPhoto5DomId"),dojo.byId("settWinPhotoPanCanvasPhoto5DomId"),dojo.byId("settWinPhotoPanEmptyPhoto5DomId"),dojo.byId("settWinPhotoPanBorderPhoto5DomId"),pan.photoButtons.photo5,dojo.byId("settWinPhotoPanBorder2Photo5DomId")]];
var l=pan.photoNodes.length;
for(var i=0;i<l;++i){
var e=pan.photoNodes[i][5];
e.index=i;
dojo.event.connect(e,"onclick",this,"changePhoto");
}
pan.selectedPhoto=null;
pan.xz=242/48;
pan.yz=182/36;
pan.xz2=242/4-48/2;
pan.yz2=182/4-36/2;
var _79=new radius.widget.PhotoDragMoveSource(pan.mainPhotoNode);
_79.profileWindow=this;
pan.photoPanDragNode=dojo.byId("settWinPhotoPanDragMainPhotoDomId");
_79.setDragHandle(pan.photoPanDragNode);
radius.html.setHandCursor(pan.photoPanDragNode);
pan.myicon=dojo.byId("settWinMyIconDomId");
this.showMyIcon();
},showMyIcon:function(){
var pan=this.panels.photos;
try{
var r=radius.jsonrpc.photo.getDefPhoto();
pan.defPhoto=r.id;
if(pan.defPhoto){
pan.myicon.src=this.photoURLPrefix+"uname="+radius.loginedUsername+"&p="+pan.defPhoto+"&size=48&m="+radius.mymagicNumber;
dojo.html.show(pan.myicon);
}
}
catch(e){
radius.debug("settingsWindow.createPhotosPanel(): exception "+e.message);
}
},removePhoto:function(){
var o=this;
radius.windows.openModalSimpleWindow({caption:"remove picture",width:220,height:130,align:"right",body:"Are you sure you wish to remove the selected picture?",btns:[{name:"remove48x18",width:48,height:18,styles:{marginRight:3},onClick:function(win){
o._removePhoto();
win.close();
}},{name:"cancel48x18",width:48,height:18,styles:{marginRight:3}}]});
},_removePhoto:function(){
var pan=this.panels.photos;
try{
if((!pan.selectedPhoto&&pan.selectedPhoto==null)||pan.photos.length<=1){
throw new Error("don't remove");
return;
}
var i=pan.selectedPhoto[0].index;
var d=radius.jsonrpc.photo.removePhoto(pan.photos[i].id);
pan.defPhoto=d[1];
pan.photos.splice(i,1);
this.buildPhotos(i,this.PhotoBuildFlags.Delete);
if(pan.photos.length>=pan.photoNodes.length){
pan.browserButtonWidget.disable();
pan.browserInput.disabled=true;
}else{
pan.browserButtonWidget.enable();
pan.browserInput.disabled=false;
}
if(pan.photos.length<=1){
pan.removePhotoBtnWidget.disable();
}else{
pan.removePhotoBtnWidget.enable();
}
var l=pan.photos.length;
for(var i=0;i<l;++i){
if(pan.photos[i].id==pan.defPhoto){
pan.defPhotoIndex=i;
break;
}
}
if(pan.defPhotoIndex==undefined){
pan.defPhotoIndex=0;
}
if(pan.selectedPhoto){
var i=pan.selectedPhoto[0].index;
this.deselectPhoto(pan.photoNodes[i]);
}
this.selectPhoto(pan.photoNodes[pan.defPhotoIndex]);
this.incFilledPhotos();
pan.photoButton.change(pan.photoNodes[pan.defPhotoIndex][4],true,true,true);
delete pan.defPhotoIndex;
this.decFilledPhotos();
if(radius.windows.mapWin&&radius.windows.mapWin.gmap){
radius.windows.mapWin.putUserOnMap();
}
this.updateYourProfile();
}
catch(e){
radius.debug("settingsWindow.removePhoto: failed - "+e.message);
}
},showFilePath:function(){
var pan=this.panels.photos;
pan.uploadButtonWidget.enable();
pan.filePath.innerHTML=this.cutString(pan.browserInput.value,42,false);
pan.filePath.title=pan.browserInput.value;
},changeOverlayIcon:function(_83,_84){
var pan=this.panels.photos;
var n;
if(_83!=undefined){
n=pan.photoNodes[_83];
dojo.html.hide(n[3]);
}
if(_84!=undefined){
n=pan.photoNodes[_84];
dojo.html.show(n[3]);
}
},changeOverlayMainPhoto:function(){
var pan=this.panels.photos;
var s;
if(pan.myicon.index==pan.selectedPhoto[0].index){
s="/images/labels/drag_n_move.png?version=RELEASE_0_27&build=200608281106";
}else{
s="/images/labels/drag_n_move_without_icon.png?version=RELEASE_0_27&build=200608281106";
}
if(pan.photoPanDragNode.src!=s){
radius.image.setSrcX(pan.photoPanDragNode,s);
}
},changeMyIcon:function(_89,_8a){
if(!_8a){
return;
}
var pan=this.panels.photos;
var n=pan.photoNodes[_89.radioName];
this.changeOverlayIcon(pan.myicon.index,n[0].index);
var i=n[0].index;
var p=pan.photos[i];
pan.defPhoto=p.id;
pan.myicon.index=n[0].index;
pan.myicon.src=n[0].src;
pan.myicon.width=parseInt(p.width*p.zoom/2);
pan.myicon.height=parseInt(p.height*p.zoom/2);
pan.myicon.style.left=parseInt(p.leftOffset/2-pan.xz2)+"px";
pan.myicon.style.top=parseInt(p.topOffset/2-pan.yz2)+"px";
this.changeOverlayMainPhoto();
if(!this.isFilledPhotos()){
this.enableApplyBtn();
}
},changePhoto:function(e){
var pan=this.panels.photos;
if(pan.selectedPhoto){
var i=pan.selectedPhoto[0].index;
this.deselectPhoto(pan.photoNodes[i]);
}
this.selectPhoto(pan.photoNodes[e.target.index]);
},zoomerSliding:function(_92){
var pan=this.panels.photos;
var img=pan.selectedPhoto[0];
var i=img.index;
var p=pan.photos[i];
if(p.width*_92/100<48||p.height*_92/100<36){
return null;
}
var _97=p.zoom;
p.zoom=_92/100;
var w=p.width*p.zoom/pan.xz,h=p.height*p.zoom/pan.yz;
var _99=p.width*_97/pan.xz,oldH=p.height*_97/pan.yz;
var x=(p.leftOffset-(w-_99)/2)/pan.xz+1,y=(p.topOffset-(h-oldH)/2)/pan.yz+1;
img.width=parseInt(w);
img.height=parseInt(h);
img.style.left=parseInt(x)+"px";
img.style.top=parseInt(y)+"px";
w=p.width*p.zoom,h=p.height*p.zoom;
_99=p.width*_97,oldH=p.height*_97;
x=p.leftOffset-(w-_99)/2,y=p.topOffset-(h-oldH)/2;
pan.mainPhotoNode.width=parseInt(w);
pan.mainPhotoNode.height=parseInt(h);
pan.mainPhotoNode.style.left=parseInt(x)+"px";
pan.mainPhotoNode.style.top=parseInt(y)+"px";
p.leftOffset=x;
p.topOffset=y;
if(pan.myicon.index==pan.selectedPhoto[0].index){
w=p.width*p.zoom/2,h=p.height*p.zoom/2;
pan.myicon.width=parseInt(w);
pan.myicon.height=parseInt(h);
pan.myicon.style.left=parseInt(x/2-pan.xz2)+"px";
pan.myicon.style.top=parseInt(y/2-pan.yz2)+"px";
}
if(!this.isFilledPhotos()){
img.changed=true;
this.enableApplyBtn();
}
return radius.widget.PZoomerScrollBar.superclass.onSliding.call(this,_92);
},deselectPhoto:function(n){
var pan=this.panels.photos;
dojo.html.hide(pan.mainPhotoNode);
n[5].style.borderColor="#cecece";
pan.selectedPhoto=null;
pan.selectedPhotoId=null;
},selectPhoto:function(n){
var pan=this.panels.photos;
n[5].style.borderColor="#0058cc";
pan.selectedPhoto=n;
var i=n[0].index;
var p=pan.photos[i];
pan.selectedPhotoId=p.id;
this.incFilledPhotos();
pan.zoomer.setSliderPos(p.zoom*100);
this.decFilledPhotos();
pan.mainPhotoNode.width=parseInt(p.width*p.zoom);
pan.mainPhotoNode.height=parseInt(p.height*p.zoom);
pan.mainPhotoNode.style.left=parseInt(p.leftOffset)+"px";
pan.mainPhotoNode.style.top=parseInt(p.topOffset)+"px";
pan.mainPhotoNode.src=n[0].src;
dojo.html.show(pan.mainPhotoNode);
this.changeOverlayMainPhoto();
},buildPhotos:function(_a1,_a2){
var pan=this.panels.photos;
_a1=_a1==undefined?0:_a1;
_a2=_a2==undefined?this.PhotoBuildFlags.Init:_a2;
var l=pan.photos.length,ll=pan.photoNodes.length;
for(var i=_a1;i<ll;++i){
var img=pan.photoNodes[i];
img[3].style.borderColor="#cecece";
var _a7=false;
if(i<l){
var p=pan.photos[i];
var _a9=this.photoURLPrefix+"uname="+radius.loginedUsername+"&p="+p.id+"&m="+radius.mymagicNumber;
img[0].changed=false;
img[0].width=parseInt(p.width*p.zoom/pan.xz);
img[0].height=parseInt(p.height*p.zoom/pan.yz);
img[0].style.left=parseInt(p.leftOffset/pan.xz+1)+"px";
img[0].style.top=parseInt(p.topOffset/pan.yz+1)+"px";
img[0].src=_a9;
dojo.html.hide(img[2]);
dojo.html.show(img[1]);
img[4].enable();
img[0].index=i;
if(_a2!=this.PhotoBuildFlags.Init){
if((pan.selectedPhoto&&i==pan.selectedPhoto[0].index)||l==0){
this.selectPhoto(img);
}
}
}else{
dojo.html.hide(img[1]);
dojo.html.show(img[2]);
img[4].disable();
img[0].src="";
img[0].index=i;
}
}
},getWindow:function(e){
if(e.contentWindow!=undefined){
return e.contentWindow;
}else{
if(e.window!=undefined){
return e.window;
}
}
return null;
},photoIframeOnload:function(){
dojo.io.IframeTransport.iframeOnload();
},photoUpload:function(){
var pan=this.panels.photos;
if(pan.uploadButtonWidget.disabled){
return;
}
radius.loadingBar.showBar();
try{
var _ac={formNode:dojo.byId("settWinPhotosPanUploadForm"),url:radius.encodeURL("/photoupload"),mimetype:"text/html",transport:"IframeTransport",panel:pan,win:this,content:{fileFields:"photo"},load:function(_ad,_ae,evt){
radius.loadingBar.hideBar();
var pan=this.panel;
var d=this.win.getWindow(pan.ioFrame);
var r=d.photoUploadResult;
if(r=="success"){
var t=d.photoUpload;
var _b4=d.photoUploadRemoveDefPhoto!=undefined&&d.photoUploadRemoveDefPhoto?true:false;
var _b5={};
for(attr in t){
_b5[attr]=t[attr];
}
var l=pan.photos.length,ll=pan.photoNodes.length;
if(_b4){
pan.photos=new Array();
pan.photos.push(_b5);
this.win.incFilledPhotos();
this.win.buildPhotos(0,this.win.PhotoBuildFlags.Init);
this.win.selectPhoto(pan.photoNodes[0]);
pan.photoButton.change(pan.photoNodes[0][4],true,true,true);
this.win.decFilledPhotos();
}else{
if(l>=ll){
var _b7=pan.selectedPhoto?pan.selectedPhoto[0].index:0;
pan.photos.splice(_b7,0,_b5);
this.win.buildPhotos(_b7,this.win.PhotoBuildFlags.Add);
}else{
pan.photos.push(_b5);
var img=pan.photoNodes[l];
img[0].src="";
img[0].src=this.win.photoURLPrefix+"uname="+radius.loginedUsername+"&p="+_b5.id+"&m="+radius.mymagicNumber;
var p=pan.photos[l];
img[0].changed=true;
img[0].width=parseInt(p.width*p.zoom/pan.xz);
img[0].height=parseInt(p.height*p.zoom/pan.yz);
img[0].style.left=parseInt(p.leftOffset/pan.xz+1)+"px";
img[0].style.top=parseInt(p.topOffset/pan.yz+1)+"px";
img[0].index=l;
img[4].enable();
dojo.html.hide(img[2]);
dojo.html.show(img[1]);
if(l==0){
this.win.selectPhoto(img);
}
if(pan.photos.length>=ll){
pan.browserButtonWidget.disable();
pan.browserInput.disabled="disabled";
}
if(l<=0){
pan.removePhotoBtnWidget.disable();
}else{
pan.removePhotoBtnWidget.enable();
}
}
}
radius.debug("settingsWindow.bindParams.load: success load image[id='"+_b5.id+"', ext='"+_b5.photo+"']");
}else{
var _ba=d.photoUploadCode;
var _bb=d.photoUploadMessage;
if(_ba&this.win.SettingsError.PhotoProfileImageTooBig||_ba&this.win.SettingsError.PhotoProfileSizeLimitExceeded||_ba&this.win.SettingsError.PhotoProfileNotStandardImage){
_bb="File is corrupt or over 500kb. Please try uploading a different picture";
}
radius.windows.createModalSimpleWindow({body:"<div class=\"defWinLabelSmallClass\" style=\"white-space:normal\">"+_bb+"</div>",caption:"photo upload failed",width:260,height:140},"white",0);
radius.debug("settingsWindow.bindParams.load: failed load error "+_ba+" - "+_bb);
}
},error:function(_bc,_bd){
radius.loadingBar.hideBar();
radius.debug("settingsWindow.bindParams.error:"+_bd);
},handler:function(_be,_bf,evt){
radius.debug("settingsWindow.bindParams.handler");
},abort:function(){
radius.loadingBar.hideBar();
},timeout:function(_c1){
radius.loadingBar.hideBar();
}};
dojo.event.connect(pan.ioFrame,"onload",this,"photoIframeOnload");
dojo.io.bind(_ac);
pan.photoUploadForm.reset();
pan.uploadButtonWidget.disable();
pan.filePath.innerHTML="";
radius.debug("settingsWindow.photoUpload: success send");
}
catch(e){
radius.loadingBar.hideBar();
radius.debug("settingsWindow.photoUpload: failed"+e.message);
}
},getStates:function(){
try{
return radius.jsonrpc.profile.getStates();
}
catch(e){
radius.debug("settingsWindowProfilePanel.getStates(): exception "+e.message);
}
},getColleges:function(_c2){
try{
return radius.jsonrpc.profile.getColleges(_c2);
}
catch(e){
radius.debug("settingsWindowProfilePanel.getColleges(): exception "+e.message);
}
},rebuildCollegesMenu:function(_c3){
var pan=this.panels.profile;
if(pan.collegesCache[_c3]==undefined){
pan.college.storeState(this.getColleges(_c3));
pan.collegesCache[_c3]=pan.college.restoreState();
}else{
pan.college.restoreState(pan.collegesCache[_c3]);
pan.college.change(null);
}
},applyProfile:function(_c5){
var pan=this.panels.profile;
if(_c5&&pan.data==undefined){
return false;
}
this.clearAsterisks(pan.failedAsterisks);
try{
for(i in pan.props){
var p=pan.props[i];
pan.data[i]=p.value?p.value:null;
}
if(_c5){
return true;
}
var r=radius.jsonrpc.profile.applyUserProfile(pan.data);
this.updateYourProfile();
radius.debug("returning from applyProfile with result: "+r);
return r;
}
catch(e){
radius.debug("settingsWindow.applyProfile(): exception "+e.message);
}
},failedProfile:function(r){
radius.debug("error ("+r+") while saving profile");
var pan=this.panels.profile;
this.showErrorCodeMsgs(r,pan);
},showErrorCodeMsgs:function(_cb,_cc){
var _cd=this.errorCodeToMsgArray(_cb);
radius.debug("showing dialogs for "+_cd.length+" msgs");
radius.widget.showErrorCodeMsg(_cc,_cb,_cd,_cd.length,0);
},fillProfile:function(){
var pan=this.panels.profile;
this.clearAsterisks(pan.failedAsterisks);
try{
pan.data=radius.jsonrpc.profile.getUserProfile();
for(p in pan.props){
var e=pan.props[p];
var v=pan.data[p];
e.value=v?v:"";
}
var _d1=pan.props.collegeState.value;
pan.props.collegeState.value=null;
pan.collegeState.change(null);
pan.props.college.value=null;
pan.college.change(null);
pan.college.storeState();
if(pan.data.collegeState){
pan.collegeState.change(pan.data.collegeState);
pan.props.collegeState.value=pan.data.collegeState;
if(pan.collegesCache[pan.data.collegeState]==undefined){
pan.college.storeState(this.getColleges(pan.data.collegeState));
pan.collegesCache[pan.data.collegeState]=pan.college.restoreState();
}else{
pan.college.restoreState(pan.collegesCache[pan.data.collegeState]);
pan.college.change(null);
}
if(pan.data.college){
pan.college.change(pan.data.college);
pan.props.college.value=pan.data.college;
}
}
}
catch(e){
radius.debug("settingsWindow.fillProfile(): exception "+e.message);
}
},createProfilePanel:function(){
var pan=this.panels.profile;
pan.props={};
pan.props.town=dojo.byId("settWinProfilePanTownDomId");
pan.props.headline=dojo.byId("settWinProfilePanHeadlineDomId");
pan.props.highschool=dojo.byId("settWinProfilePanHighSchoolDomId");
pan.props.places=dojo.byId("settWinProfilePanPlacesDomId");
pan.props.music=dojo.byId("settWinProfilePanMusicDomId");
pan.props.movies=dojo.byId("settWinProfilePanMoviesDomId");
pan.props.books=dojo.byId("settWinProfilePanBooksDomId");
pan.props.links=dojo.byId("settWinProfilePanLinksDomId");
pan.props.collegeState={};
pan.props.college={};
for(i in pan.props){
pan.props[i].onchange=dojo.lang.hitch(this,"enableApplyBtn");
}
pan.yourProfile=dojo.byId("settWinProfilePanYourProfileDomId");
dojo.event.connect(pan.yourProfile,"onclick",this,"showYourProfile");
pan.failedAsterisks=[[dojo.byId("settWinProfilePanTownAsteriskAllDomId"),dojo.byId("settWinProfilePanTownAsteriskDomId"),this.SettingsError.ProfileTownNotStandard],[dojo.byId("settWinProfilePanHeadlineAsteriskAllDomId"),dojo.byId("settWinProfilePanHeadlineAsteriskDomId"),this.SettingsError.ProfileHeadlineNotStandard],[dojo.byId("settWinProfilePanCollegeAsteriskAllDomId"),dojo.byId("settWinProfilePanCollegeAsteriskDomId"),this.SettingsError.ProfileCollegeStateDoesNotMatch],[dojo.byId("settWinProfilePanCollegeAsteriskAllDomId"),dojo.byId("settWinProfilePanCollegeAsteriskDomId"),this.SettingsError.ProfileCollegeDoesNotMatch],[dojo.byId("settWinProfilePanHighSchoolAsteriskAllDomId"),dojo.byId("settWinProfilePanHighSchoolAsteriskDomId"),this.SettingsError.ProfileHighSchoolNotStandard],[dojo.byId("settWinProfilePanPlacesAsteriskAllDomId"),dojo.byId("settWinProfilePanPlacesAsteriskDomId"),this.SettingsError.ProfilePlacesNotStandard],[dojo.byId("settWinProfilePanMusicAsteriskAllDomId"),dojo.byId("settWinProfilePanMusicAsteriskDomId"),this.SettingsError.ProfileMusicNotStandard],[dojo.byId("settWinProfilePanMoviesAsteriskAllDomId"),dojo.byId("settWinProfilePanMoviesAsteriskDomId"),this.SettingsError.ProfileMoviesNotStandard],[dojo.byId("settWinProfilePanBooksAsteriskAllDomId"),dojo.byId("settWinProfilePanBooksAsteriskDomId"),this.SettingsError.ProfileBooksNotStandard],[dojo.byId("settWinProfilePanLinksAsteriskAllDomId"),dojo.byId("settWinProfilePanLinksAsteriskDomId"),this.SettingsError.ProfileLinksNotStandard]];
var o=this;
var _d4=this.getStates();
pan.collegeState=radius.widget.create("PullDown",{width:100,height:16,pullDownHeight:220,options:_d4,convert:function(_d5){
return {text:_d5,value:_d5,selected:false};
}},dojo.byId("settWinProfilePanCollegeStateDomId"));
pan.collegeState.onChanged=dojo.lang.hitch(this,function(_d6,_d7){
o.enableApplyBtn();
o.rebuildCollegesMenu(_d6.value);
pan.props.collegeState.value=_d6.value;
});
pan.college=radius.widget.create("PullDown",{width:200,height:16,pullDownHeight:220,options:[],convert:function(_d8){
return {text:_d8,value:_d8,selected:false};
}},dojo.byId("settWinProfilePanCollegeDomId"));
pan.college.onChanged=dojo.lang.hitch(this,function(_d9){
o.enableApplyBtn();
pan.props.college.value=_d9.value;
});
},applyLegacy:function(_da){
var pan=this.panels.legacy;
if(_da&&pan.data==undefined){
return false;
}
this.clearAsterisks(pan.failedAsterisks);
try{
for(i in pan.inputProps){
var p=pan.inputProps[i];
var _dd=p.type!=undefined?p.type.toLowerCase():"";
if(_dd=="password"){
if(p.value==this.PasswordAsterisks){
pan.data[i]=p.value;
}else{
pan.data[i]=p.value?this.encrypt(p.value):null;
}
}else{
pan.data[i]=p.value?p.value:null;
}
}
for(i in pan.checkboxProps){
var p=pan.checkboxProps[i];
pan.data[i]=p.checked;
}
if(_da){
return true;
}
var _de=radius.jsonrpc.profile.applyUserLegacy(pan.data);
if(_de==0){
this.changeLegacy(pan.data);
}
return _de;
}
catch(e){
radius.debug("settingsWindow.applyLegacy(): exception "+e.message);
}
},changeLegacy:function(_df){
var ctx=radius.IM.Ctx();
if(!ctx){
return;
}
var con=ctx.findConnection("aol");
if(_df.usernameAOL!=null){
if(_df.passwordAOL!=this.PasswordAsterisks){
con.connect(_df.usernameAOL,_df.passwordAOL,this,"fillLegacy");
}
}else{
if(con.isConnected()){
con.disconnect();
}
}
con=ctx.findConnection("msn");
if(_df.usernameMSN!=null){
if(_df.passwordMSN!=this.PasswordAsterisks){
con.connect(_df.usernameMSN,_df.passwordMSN,this,"fillLegacy");
}
}else{
if(con.isConnected()){
con.disconnect();
}
}
con=ctx.findConnection("yahoo");
if(_df.usernameYahoo!=null){
if(_df.passwordYahoo!=this.PasswordAsterisks){
con.connect(_df.usernameYahoo,_df.passwordYahoo,this,"fillLegacy");
}
}else{
if(con.isConnected()){
con.disconnect();
}
}
con=ctx.findConnection("jabber");
if(_df.usernameGoogle!=null){
if(_df.passwordGoogle!=this.PasswordAsterisks){
con.connect(_df.usernameGoogle,_df.passwordGoogle,this,"fillLegacy");
}
}else{
if(con.isConnected()){
con.disconnect();
}
}
},getLegacySession:function(_e2){
var ctx=radius.IM.Ctx();
if(!ctx){
return _e2;
}
var con=ctx.findConnection("aol");
if(!_e2.usernameAOL&&con.userid&&con.isConnected()){
_e2.usernameAOL=con.userid;
_e2.passwordAOL=this.PasswordAsterisks;
_e2.confirmPasswordAOL=this.PasswordAsterisks;
}
con=ctx.findConnection("msn");
if(!_e2.usernameMSN&&con.userid&&con.isConnected()){
_e2.usernameMSN=con.userid;
_e2.passwordMSN=this.PasswordAsterisks;
_e2.confirmPasswordAOL=this.PasswordAsterisks;
}
con=ctx.findConnection("yahoo");
if(!_e2.usernameYahoo&&con.userid&&con.isConnected()){
_e2.usernameYahoo=con.userid;
_e2.passwordYahoo=this.PasswordAsterisks;
_e2.confirmPasswordYahoo=this.PasswordAsterisks;
}
con=ctx.findConnection("jabber");
if(!_e2.usernameGoogle&&con.userid&&con.isConnected()){
_e2.usernameGoogle=con.userid;
_e2.passwordGoogle=this.PasswordAsterisks;
_e2.confirmPasswordGoogle=this.PasswordAsterisks;
}
return _e2;
},failedLegacy:function(r){
var pan=this.panels.legacy;
radius.widget.fillAsterisks(pan.failedAsterisks,r);
},fillLegacy:function(){
var pan=this.panels.legacy;
this.clearAsterisks(pan.failedAsterisks);
try{
pan.data=radius.jsonrpc.profile.getUserLegacy();
pan.data=this.getLegacySession(pan.data);
for(p in pan.inputProps){
var e=pan.inputProps[p];
var v=pan.data[p];
e.value=v?v:"";
}
for(p in pan.checkboxProps){
var e=pan.checkboxProps[p];
var v=pan.data[p];
e.setState(v);
}
}
catch(e){
radius.debug("settingsWindow.fillLegacy(): exception "+e.message);
}
},createLegacyPanel:function(){
var pan=this.panels.legacy;
pan.inputProps={};
pan.inputProps.usernameAOL=dojo.byId("settWinLegacyPanAOLUsernameDomId");
pan.inputProps.passwordAOL=dojo.byId("settWinLegacyPanAOLPasswordDomId");
pan.inputProps.confirmPasswordAOL=dojo.byId("settWinLegacyPanAOLConfirmDomId");
pan.inputProps.usernameMSN=dojo.byId("settWinLegacyPanMSNUsernameDomId");
pan.inputProps.passwordMSN=dojo.byId("settWinLegacyPanMSNPasswordDomId");
pan.inputProps.confirmPasswordMSN=dojo.byId("settWinLegacyPanMSNConfirmDomId");
pan.inputProps.usernameYahoo=dojo.byId("settWinLegacyPanYahooUsernameDomId");
pan.inputProps.passwordYahoo=dojo.byId("settWinLegacyPanYahooPasswordDomId");
pan.inputProps.confirmPasswordYahoo=dojo.byId("settWinLegacyPanYahooConfirmDomId");
pan.inputProps.usernameGoogle=dojo.byId("settWinLegacyPanGoogleUsernameDomId");
pan.inputProps.passwordGoogle=dojo.byId("settWinLegacyPanGooglePasswordDomId");
pan.inputProps.confirmPasswordGoogle=dojo.byId("settWinLegacyPanGoogleConfirmDomId");
for(i in pan.inputProps){
pan.inputProps[i].onchange=dojo.lang.hitch(this,"enableApplyBtn");
}
pan.failedAsterisks=[[dojo.byId("settWinLegacyPanUsernameAOLAsteriskAllDomId"),dojo.byId("settWinLegacyPanUsernameAOLAsteriskDomId"),this.SettingsError.LegacyAOLUsernameNotStandard],[dojo.byId("settWinLegacyPanPasswordAOLAsteriskAllDomId"),dojo.byId("settWinLegacyPanPasswordAOLAsteriskDomId"),this.SettingsError.LegacyAOLPasswordNotStandard],[dojo.byId("settWinLegacyPanConfirmAOLAsteriskAllDomId"),dojo.byId("settWinLegacyPanConfirmAOLAsteriskDomId"),this.SettingsError.LegacyAOLPasswordDoesNotMatch],[dojo.byId("settWinLegacyPanUsernameMSNAsteriskAllDomId"),dojo.byId("settWinLegacyPanUsernameMSNAsteriskDomId"),this.SettingsError.LegacyMSNUsernameNotStandard],[dojo.byId("settWinLegacyPanPasswordMSNAsteriskAllDomId"),dojo.byId("settWinLegacyPanPasswordMSNAsteriskDomId"),this.SettingsError.LegacyMSNPasswordNotStandard],[dojo.byId("settWinLegacyPanConfirmMSNAsteriskAllDomId"),dojo.byId("settWinLegacyPanConfirmMSNAsteriskDomId"),this.SettingsError.LegacyMSNPasswordDoesNotMatch],[dojo.byId("settWinLegacyPanUsernameYahooAsteriskAllDomId"),dojo.byId("settWinLegacyPanUsernameYahooAsteriskDomId"),this.SettingsError.LegacyYahooUsernameNotStandard],[dojo.byId("settWinLegacyPanPasswordYahooAsteriskAllDomId"),dojo.byId("settWinLegacyPanPasswordYahooAsteriskDomId"),this.SettingsError.LegacyYahooPasswordNotStandard],[dojo.byId("settWinLegacyPanConfirmYahooAsteriskAllDomId"),dojo.byId("settWinLegacyPanConfirmYahooAsteriskDomId"),this.SettingsError.LegacyYahooPasswordDoesNotMatch],[dojo.byId("settWinLegacyPanUsernameGoogleAsteriskAllDomId"),dojo.byId("settWinLegacyPanUsernameGoogleAsteriskDomId"),this.SettingsError.LegacyGoogleUsernameNotStandard],[dojo.byId("settWinLegacyPanPasswordGoogleAsteriskAllDomId"),dojo.byId("settWinLegacyPanPasswordGoogleAsteriskDomId"),this.SettingsError.LegacyGooglePasswordNotStandard],[dojo.byId("settWinLegacyPanConfirmGoogleAsteriskAllDomId"),dojo.byId("settWinLegacyPanConfirmGoogleAsteriskDomId"),this.SettingsError.LegacyGooglePasswordDoesNotMatch]];
pan.helpTooltip=radius.widget.create("SimpleTooltip",{width:150},"settWinTooltipDomId",true);
pan.helpTooltip.init(dojo.byId("settWinLegacyPanHelpDomId"),"<p style=\"text-align:left; margin:1px;\">You can login to your<br/>existing IM accounts and<br/>use radiusIM to<br/>message friends on<br/>those services.</p>");
pan.privacyPolicy=dojo.byId("settWinLegacyPanPrivacyPolicyDomId");
pan.privacyPolicy.onclick=dojo.lang.hitch(this,function(){
var w=window.open("/privacypolicy.html?version="+GLOBAL_CONFIG.version+"&build="+GLOBAL_CONFIG.build,"privacypolicy","menubar=0,location=0,status=0,scrollbars=1,width=700,height=680");
w.focus();
});
pan.forgotPassAOL=dojo.byId("settWinLegacyPanAOLForgotPassDomId");
pan.forgotPassMSN=dojo.byId("settWinLegacyPanMSNForgotPassDomId");
pan.forgotPassYahoo=dojo.byId("settWinLegacyPanYahooForgotPassDomId");
pan.forgotPassGoogle=dojo.byId("settWinLegacyPanGoogleForgotPassDomId");
var o=this;
pan.forgotPassAOL.onclick=dojo.lang.hitch(this,function(){
o.forgotPass("aol");
});
pan.forgotPassMSN.onclick=dojo.lang.hitch(this,function(){
o.forgotPass("msn");
});
pan.forgotPassYahoo.onclick=dojo.lang.hitch(this,function(){
o.forgotPass("yahoo");
});
pan.forgotPassGoogle.onclick=dojo.lang.hitch(this,function(){
o.forgotPass("jabber");
});
pan.checkboxProps={};
pan.checkboxProps.loginOnStartupAOL=radius.widget.create("CheckBox",{name:"cbox11x11blue",checked:false,textStyle:"font-size:11px;"},"settWinLegacyPanAOLLoginOnDomId");
pan.checkboxProps.loginOnStartupMSN=radius.widget.create("CheckBox",{name:"cbox11x11blue",checked:false,textStyle:"font-size:11px;"},"settWinLegacyPanMSNLoginOnDomId");
pan.checkboxProps.loginOnStartupYahoo=radius.widget.create("CheckBox",{name:"cbox11x11blue",checked:false,textStyle:"font-size:11px;"},"settWinLegacyPanYahooLoginOnDomId");
pan.checkboxProps.loginOnStartupGoogle=radius.widget.create("CheckBox",{name:"cbox11x11blue",checked:false,textStyle:"font-size:11px;"},"settWinLegacyPanGoogleLoginOnDomId");
for(i in pan.checkboxProps){
pan.checkboxProps[i].onChange=dojo.lang.hitch(this,"enableApplyBtn");
}
pan.ForgotNetwork={aol:"AOL",msn:"MSN",yahoo:"Yahoo",gtalk:"Google"};
},forgotPass:function(_ed){
if(_ed!="radius"){
var _ee=radius.data.legacyTypes[_ed];
var w=window.open(_ee.forgotPass,"_blank");
w.focus();
return;
}else{
var pan=this.panels.legacy;
var d=pan.data;
var p=pan.ForgotNetwork[_ed];
if(!(_ed=="radius"||(p&&d["username"+p]&&d["password"+p]&&d["loginOnStartup"+p]))){
return;
}
var _f3=_ed=="radius"?true:false;
radius.windows.openModalSimpleWindow({caption:"forgot password",width:270,height:130,align:"center",body:_f3?"Forgot your password? Don't worry, we can reset it for you. Your new password will be emailed to you.":" ",btns:[{name:"submit72x21",width:72,height:21,styles:{marginRight:3},onClick:function(win){
try{
var r=radius.jsonrpc.security.forgotPass(_ed);
var _f6=r?"A new password will be emailed to you shortly.<br/><br/>You can always change your password in the Account tab of the Settings window.":" Failed to mailed password.",caption="forgot password "+(r?"success":"failed");
radius.windows.openModalSimpleWindow({width:260,height:140,caption:caption,body:_f6});
}
catch(e){
radius.debug("settingsWindow.forgotPass(): exception "+e.message);
}
}},{name:"cancel72x21",width:72,height:21,styles:{marginRight:3}}]});
}
},submitAccount:function(){
var pan=this.panels.account;
this.clearAsterisks(pan.failedAsterisks);
try{
var _f8=0;
flags={minlength:6,maxlength:16};
pan.data.password=pan.password.value;
if(!dojo.validate.isText(pan.data.password,flags)){
_f8|=this.SettingsError.AccountPasswordNotStandard;
}
pan.data.confirmPassword=pan.confirmPassword.value;
if(pan.data.password!=pan.data.confirmPassword){
_f8|=this.SettingsError.AccountPasswordDoesNotMatch;
}
if(_f8==0){
pan.data.password=this.encrypt(pan.data.password);
pan.data.confirmPassword=this.encrypt(pan.data.confirmPassword);
_f8=radius.jsonrpc.profile.submitUserSecurity(pan.data);
if(_f8==0){
pan.password.value="";
pan.confirmPassword.value="";
radius.windows.createModalSimpleWindow({caption:"password change",width:270,height:130,align:"center",body:"Your password was successfully changed."});
return;
}
}
radius.widget.fillAsterisks(pan.failedAsterisks,_f8);
}
catch(e){
radius.debug("settingsWindow.submitAccount(): exception "+e.message);
}
},applyAccount:function(_f9){
var pan=this.panels.account;
if(_f9&&pan.data==undefined){
return false;
}
this.clearAsterisks(pan.failedAsterisks);
try{
var _fb=0;
pan.data.firstName=pan.inputProps.firstName.value;
if(!dojo.validate.isText(pan.data.firstName,{minlength:1,maxlength:32})){
_fb|=this.SettingsError.AccountFirstNameNotStandard;
}
var _fc=pan.gender.getChecked();
if(_fc==null){
_fb|=this.SettingsError.AccountGenderNotStandard;
}else{
pan.data.gender=_fc=="female"?"F":"M";
}
var _fd=pan.birthMonth.selected.obj?pan.birthMonth.selected.obj.value:"";
var day=pan.birthDay.selected.obj?pan.birthDay.selected.obj.value:"";
var _ff=pan.birthYear.selected.obj?pan.birthYear.selected.obj.value:"";
pan.data.birthday=_ff+_fd+day;
if(!dojo.validate.isValidDate(pan.data.birthday,"YYYYMMDD")){
_fb|=this.SettingsError.AccountBirthdayNotStandard;
}
var c=pan.country.selected.obj;
pan.data.countryCode=c?c.value:"";
if(dojo.validate.isText(pan.data.countryCode,{minlength:2,maxlength:8})){
pan.data.country=c.text;
if(!dojo.validate.isText(pan.data.country,{minlength:2,maxlength:64})){
_fb|=this.SettingsError.AccountCountryNotStandard;
}
}else{
_fb|=this.SettingsError.AccountCountryNotStandard;
}
pan.data.zipcode=pan.inputProps.zipcode.value?pan.inputProps.zipcode.value:null;
var _101=pan.data.countryCode=="US";
if(!((_101&&dojo.validate.us.isZipCode(pan.data.zipcode))||(!_101&&!pan.data.zipcode))){
_fb|=this.SettingsError.AccountZipcodeNotStandard;
}
if(_f9){
if(_fb==0){
return true;
}else{
return false;
}
}
if(_fb==0){
var r=radius.jsonrpc.profile.applyUserInfo(pan.data);
this.updateYourProfile();
return r;
}
return _fb;
}
catch(e){
radius.debug("settingsWindow.applyAccount(): exception "+e.message);
}
},failedAccount:function(r){
var pan=this.panels.account;
this.fillAsterisks(pan.failedAsterisks,r);
},fillAccount:function(){
var pan=this.panels.account;
this.clearAsterisks(pan.failedAsterisks);
try{
pan.data=radius.jsonrpc.profile.getUserInfo();
for(p in pan.inputProps){
var e=pan.inputProps[p];
var v=pan.data[p];
e.value=v?v:"";
}
for(p in pan.props){
var e=pan.props[p];
var v=pan.data[p];
e.value=v?v:"";
}
if(pan.data.gender=="F"){
pan.gender.change(pan.genderFemale,true,false);
}else{
if(pan.data.gender=="M"){
pan.gender.change(pan.genderMale,true,false);
}
}
pan.birthMonth.change(pan.data.birthMonth);
pan.birthDay.change(pan.data.birthDay);
pan.birthYear.change(pan.data.birthYear);
pan.country.change(pan.data.countryCode);
pan.password.value="";
pan.confirmPassword.value="";
}
catch(e){
radius.debug("settingsWindow.fillAccount(): exception "+e.message);
}
},createAccountPanel:function(){
var pan=this.panels.account;
pan.inputProps={};
pan.inputProps.firstName=dojo.byId("settWinAccountPanFirstNameDomId");
pan.inputProps.zipcode=dojo.byId("settWinAccountPanZipcodeDomId");
for(i in pan.inputProps){
pan.inputProps[i].onchange=dojo.lang.hitch(this,"enableApplyBtn");
}
pan.gender=new radius.widget.RadioGroup();
pan.genderFemale=pan.gender.add("settWinAccountPanGenderFemaleDomId",{radioName:"female",name:"radio13x13",width:13,height:13,checked:false,textStyle:"font-size:9px;"});
pan.genderMale=pan.gender.add("settWinAccountPanGenderMaleDomId",{radioName:"male",name:"radio13x13",width:13,height:13,checked:false,textStyle:"font-size:9px;"});
pan.gender.onChange=dojo.lang.hitch(this,"enableApplyBtn");
pan.password=dojo.byId("settWinAccountPanPasswordDomId");
pan.confirmPassword=dojo.byId("settWinAccountPanConfirmDomId");
pan.forgotPass=dojo.byId("settWinAccountPanForgotPassDomId");
var o=this;
pan.forgotPass.onclick=dojo.lang.hitch(this,function(){
o.forgotPass("radius");
});
pan.failedAsterisks=[[dojo.byId("settWinAccountPanPasswordAsteriskAllDomId"),dojo.byId("settWinAccountPanPasswordAsteriskDomId"),this.SettingsError.AccountPasswordNotStandard],[dojo.byId("settWinAccountPanConfirmAsteriskAllDomId"),dojo.byId("settWinAccountPanConfirmAsteriskDomId"),this.SettingsError.AccountPasswordDoesNotMatch],[dojo.byId("settWinAccountPanFirstNameAsteriskAllDomId"),dojo.byId("settWinAccountPanFirstNameAsteriskDomId"),this.SettingsError.AccountFirstNameNotStandard],[dojo.byId("settWinAccountPanGenderAsteriskAllDomId"),dojo.byId("settWinAccountPanGenderAsteriskDomId"),this.SettingsError.AccountGenderNotStandard],[dojo.byId("settWinAccountPanBirthdayAsteriskAllDomId"),dojo.byId("settWinAccountPanBirthdayAsteriskDomId"),this.SettingsError.AccountBirthdayNotStandard],[dojo.byId("settWinAccountPanBirthdayAsteriskAllDomId"),dojo.byId("settWinAccountPanBirthdayAsteriskDomId"),this.SettingsError.AccountOver16AgeNotMartch],[dojo.byId("settWinAccountPanCountryAsteriskAllDomId"),dojo.byId("settWinAccountPanCountryAsteriskDomId"),this.SettingsError.AccountCountryNotStandard],[dojo.byId("settWinAccountPanZipcodeAsteriskAllDomId"),dojo.byId("settWinAccountPanZipcodeAsteriskDomId"),this.SettingsError.AccountZipcodeNotStandard]];
pan.helpTooltip=radius.widget.create("SimpleTooltip",{width:150},"settWinTooltipDomId",true);
pan.helpTooltip.init(dojo.byId("settWinAccountPanBirthHelpDomId"),"<p style=\"text-align:left; margin:1px;\">We do not share your<br/>birth date with anyone,<br/>we only display your<br/>age.</p>");
pan.birthMonth=radius.widget.create("PullDown",{width:80,height:16,pullDownHeight:220,options:radius.data.Month,convert:function(val,item){
return {text:item,value:val,selected:false};
}},dojo.byId("settWinAccountPanBirthMonthDomId"));
pan.birthMonth.onChanged=dojo.lang.hitch(this,function(){
o.enableApplyBtn();
});
var days=new Array();
for(var i=1;i<=31;++i){
days.push({text:i,value:i<10?"0"+i:i});
}
pan.birthDay=radius.widget.create("PullDown",{width:40,height:16,pullDownHeight:220,options:days,convert:function(item){
return {text:item.text,value:item.value,selected:false};
}},dojo.byId("settWinAccountPanBirthDayDomId"));
pan.birthDay.onChanged=dojo.lang.hitch(this,function(){
o.enableApplyBtn();
});
var _10f=new Array();
for(var i=radius.data.BirthYear.newer;i>radius.data.BirthYear.older;--i){
_10f.push({text:i,value:i});
}
pan.birthYear=radius.widget.create("PullDown",{width:56,height:16,pullDownHeight:220,options:_10f,convert:function(item){
return {text:item.text,value:item.value,selected:false};
}},dojo.byId("settWinAccountPanBirthYearDomId"));
pan.birthYear.onChanged=dojo.lang.hitch(this,function(){
o.enableApplyBtn();
});
pan.country=radius.widget.create("PullDown",{width:150,height:16,pullDownHeight:220,options:radius.data.getCountries().list,convert:function(item){
return {text:item.country,value:item.code,selected:false};
}},dojo.byId("settWinAccountPanCountryDomId"));
pan.country.onChanged=dojo.lang.hitch(this,function(){
o.enableApplyBtn();
});
pan.country.dropBtn.onClick=dojo.lang.hitch(this,"dropCountrySelectBox");
pan.country.selectTextNode.onclick=dojo.lang.hitch(this,"dropCountrySelectBox");
},dropCountrySelectBox:function(){
var pan=this.panels.account;
radius.loadingBar.callWithBar(dojo.lang.hitch(pan.country,pan.country.dropSelectBox));
pan.country.dropBtn.onClick=dojo.lang.hitch(pan.country,"dropSelectBox");
pan.country.selectTextNode.onclick=dojo.lang.hitch(pan.country,"dropSelectBox");
},showPanel:function(p){
radius.loadingBar.callWithBar(dojo.lang.hitch(this,this._showPanel),p);
},_showPanel:function(p){
if(this.selectedTab){
if(this.selectedTab.tab.id==p.tab.id){
return;
}
this.deselectTab(this.selectedTab.tab);
if(this.selectedTab.hideAction!=undefined){
this.selectedTab.hideAction();
}
dojo.html.hide(this.selectedTab.panel);
}
this.selectTab(p.tab);
if(p.showAction!=undefined){
p.showAction();
}
dojo.html.show(p.panel);
p.firstAction();
if(p.applyButton!=undefined&&p.applyButton){
this.applyBtnWidget.enable();
}else{
this.applyBtnWidget.disable();
}
this.selectedTab=p;
},showDetailsBody:function(){
dojo.html.show("setWinCornersBlock");
var e=dojo.byId("setWinDetailsBody");
e.style.border="1px solid #CECECE";
e.style.backgroundColor="#FFF";
e.style.height="312px";
},hideDetailsBody:function(){
dojo.html.hide("setWinCornersBlock");
var e=dojo.byId("setWinDetailsBody");
e.style.border="none";
e.style.backgroundColor="#e3e9f2";
e.style.height="305px";
},selectTab:function(tab){
this.tabClasNames[tab.id]={parent:tab.className,child:tab.getElementsByTagName("div")[0].className};
tab.className="defWinLabelSmallClass setWinLeftTabButPresClass";
tab.getElementsByTagName("div")[0].className="setWinLeftTabDivPresClass";
},deselectTab:function(tab){
tab.className=this.tabClasNames[tab.id].parent;
tab.getElementsByTagName("div")[0].className=this.tabClasNames[tab.id].child;
},encrypt:function(s){
if(s==undefined||!s){
return null;
}
var rsa=new RSAKey();
rsa.setPublic(radius.data.RSAKey.RSAPubKey_N,radius.data.RSAKey.RSAPubKey_E);
return rsa.encrypt(s);
},open:function(show){
if(this.isOpen){
this.focus();
}else{
radius.widget.SettingsWindow.superclass.open.call(this,show);
this.centerOnOpen=false;
}
if(dojo.render.html.moz){
this.photoURLPrefix=radius.encodeURL(this.PhotoURL)+"?t="+new Date().valueOf()+"&";
}else{
this.photoURLPrefix=radius.encodeURL(this.PhotoURL)+"?";
}
this.fillWindow();
},close:function(){
this.clear();
radius.widget.SettingsWindow.superclass.close.call(this);
if(this.restoreFocus!=null){
this.restoreFocus.focus();
this.restoreFocus=null;
}
},cancelMyAccount:function(_11c){
radius.windows.createModalSimpleWindow({width:325,height:170,align:"right",caption:"Confirm Cancel Account",body:radius.byId("settWinConfirmCancelAccountMessage").innerHTML,btns:[{name:"yes48x18",width:48,height:18,styles:{marginRight:2},onClick:function(win){
radius.loadingBar.callWithBar(new Function("radius.windows.settWin._cancelMyAccount.apply(radius.windows.settWin, arguments)"),win);
if(_11c){
_11c();
}
}},{name:"no48x18",width:48,height:18,styles:{marginRight:2}},{name:"cancelTiny48x18",width:48,height:18}]});
},_cancelMyAccount:function(win){
radius.im.logoutNow(false,false,true);
win.destroy();
},_:0});
radius.widget.addClass("SettingsWindow",radius.widget.SettingsWindow);


dojo.provide("radius.widget.LocationWindow");
radius.widget.LocationWindow=function(){
radius.widget.DefaultWindow.call(this);
};
radius.inherits(radius.widget.LocationWindow,radius.widget.DefaultWindow);
radius.extend(radius.widget.LocationWindow,{widgetType:"LocationWindow",caption:"my location",allowResize:false,width:624,height:dojo.render.html.ie?462:458,firstPos:true,restoreFocus:null,mapView:{},formOnClose:null,needStore:null,containTextInputs:true,d_c_maxb:null,fillInTemplate:function(_1,_2){
radius.widget.LocationWindow.superclass.fillInTemplate.apply(this,arguments);
this.attachNodes({locationWinDoneBtnDomId:"doneBtnNode",locationWinGoToAddrBtnDomId:"goToAddrBtnNode"});
},postCreate:function(_3,_4,_5){
this.doneBtnWidget=radius.widget.create("ImageButton",{widgetId:"locationWinDoneBtnDomId",name:"done142x28",width:142,height:28},this.doneBtnNode);
this.goToAddrBtnWidget=radius.widget.create("ImageButton",{widgetId:"locationWinGoToAddrBtnDomId",dis:"png",name:"goToAddress94x21",width:93,height:20},this.goToAddrBtnNode);
this.goToAddrBtnWidget.disable();
this.doneBtnWidget.onClick=dojo.lang.hitch(this,"doneBtnClick");
this.goToAddrBtnWidget.onClick=dojo.lang.hitch(this,"goToAddrBtnClick");
this.whyINode=dojo.byId("locationWinWhyIDomId");
this.whyINode.onclick=dojo.lang.hitch(this,"whyIClick");
this.createWindowPane();
radius.widget.LocationWindow.superclass.postCreate.apply(this,arguments);
},prepareGMap:function(){
var _6="/gmap.html?version="+GLOBAL_CONFIG.version+"&build="+GLOBAL_CONFIG.build+"&locationMap";
if(dojo.render.html.safari){
dojo.byId("locationWinGMapBoxDomId").src=_6;
}else{
top.frames["locationWinMapViewBtnDomId"].location.replace(_6);
}
},onLoaded:function(){
this.prepareGMap();
radius.widget.LocationWindow.superclass.onLoaded.apply(this,arguments);
},show:function(){
radius.widget.LocationWindow.superclass.show.apply(this,arguments);
if(this.firstPos){
this.firstPos=false;
this.center();
}
},clear:function(){
this.skipFillComboBox=false;
},closeWindow:function(_7){
if((_7==undefined||_7)&&this.needStore){
this.doneBtnClick(false);
}
if(this.formOnClose){
if(this.formOnClose=="regWin"){
var _8=radius.windows.getWindow(this.formOnClose);
this.close();
_8.open();
}
}else{
this.close();
}
radius.widget.LocationWindow.superclass.closeWindow.apply(this,arguments);
},open:function(_9){
radius.widget.LocationWindow.superclass.open.call(this,_9);
this.centerOnOpen=false;
this.fillWindow();
},close:function(){
this.clear();
radius.widget.LocationWindow.superclass.close.call(this);
if(this.restoreFocus!=null){
this.restoreFocus.focus();
this.restoreFocus=null;
}
this.formOnClose=null;
this.needStore=null;
},whyIClick:function(){
this.whyIWnd=radius.windows.createModalSimpleWindow({width:280,height:200,align:"center",caption:"Why was I placed here?",body:"<div style=\"text-align:left;\">This map allows you to select your location.<br/><br/>"+"Upon your first login the map places you at the ZIP code you entered during registration.<br/><br/>"+"After you choose a location, the map always places you at your last reported location which is saved in a local cookie on your computer.<br/><br/>"+"You can choose not to save your last location by un-checking that option in the "+"<span class=\"defWinLinkClass\" onclick=\"radius.windows.getLocationWindow().showSettingWindow();\">General Settings</span> tab.</div>"});
},showSettingWindow:function(){
radius.loadingBar.callWithBar(dojo.lang.hitch(this,this._showSettingWindow));
},_showSettingWindow:function(){
if(this.whyIWnd){
this.whyIWnd.destroy();
this.whyIWnd=null;
}
radius.windows.getSettingsWindow().openPanel({tab:"general"});
},enableAddressBtn:function(){
this.goToAddrBtnWidget.enable();
},getAddress:function(_a){
var r="";
if(_a.number!=undefined){
r=(_a.number?_a.number+" ":"")+(_a.prefix?_a.prefix+" ":"")+_a.street+(_a.suffix?" "+_a.suffix:"")+(_a.type?" "+_a.type:"");
}else{
if(_a.street1!=undefined&&_a.street2!=undefined){
r=(_a.prefix1?_a.prefix1+" ":"")+_a.street1+(_a.suffix1?" "+_a.suffix1:"")+(_a.type1?" "+_a.type1:"")+" & "+(_a.prefix2?_a.prefix2+" ":"")+_a.street2+(_a.suffix2?" "+_a.suffix2:"")+(_a.type2?" "+_a.type2:"");
}
}
return r;
},clearLocationsBtn:function(_c,_d){
var o=this;
radius.windows.openModalSimpleWindow({width:210,height:130,align:"center",caption:"clear saved locations",body:"Are you sure?",btns:[{name:"clear48x18",width:48,height:18,styles:{marginRight:3},onClick:function(_f){
o.clearLocations();
_f.close();
}},{name:"cancel48x18",width:48,height:18,styles:{marginRight:3},onClick:function(win){
o.savedLocations.change(null);
win.close();
}}]});
},getUser:function(){
var u;
if(radius.windows.mapWin&&radius.windows.mapWin.userSelf&&radius.windows.mapWin.userSelf[0]){
u=radius.windows.mapWin.userSelf[0];
}else{
u=new radius.LocalsRequest("getUserInfo",true).send();
}
return u;
},deleteLocations:function(){
var u=this.getUser();
radius.deleteLocations(u.username);
},saveLocation:function(loc,_14){
var u=this.getUser();
var _16=this.data.locs;
if(this.data.locs.length>0){
_16.splice(0,0,{latitude:loc.latitude,longitude:loc.longitude,name:loc.name});
}else{
_16.push({latitude:loc.latitude,longitude:loc.longitude,name:loc.name});
}
var i=this.data.locs.length;
if(i>5){
_16.pop();
}
this.data.last={latitude:loc.latitude,longitude:loc.longitude};
radius.saveLocations(u.username,this.data);
radius.jsonrpc.location.saveLocationAndShowOnStartup(loc.latitude,loc.longitude,null,_14);
},saveLocationAndShowOnStartup:function(_18,_19,_1a,_1b){
var u=this.getUser();
radius.saveLastLocation(u.username,{latitude:_18,longitude:_19});
radius.saveShowOnStartup(u.username,_1b);
radius.jsonrpc.location.saveLocationAndShowOnStartup(_18,_19,_1a,_1b);
},clearLocations:function(){
try{
this.last=null;
this.deleteLocations();
var s=this.savedLocations.storeState([]);
if(s.selectBox.obj){
s.selectBox.obj.destroy();
}
}
catch(e){
radius.debug("locationWindow.clearLocations(): exception "+e.message);
}
},doneBtnClick:function(_1e){
try{
var pnt=this.mapView.myLocation.marker.getPoint();
var _20=pnt.lat(),longitude=pnt.lng();
if(this.saveLocationAs.checked){
this.skipFillComboBox=false;
var _21=this.saveLocAsText.value;
var loc;
if(_21&&this.geodata&&this.geodata.latitude==_20&&this.geodata.longitude==longitude){
loc={javaClass:"com.datanaut.radiusim.mappings.Location",name:_21,country:null,state:this.geodata.state,city:this.geodata.city,street:this.getAddress(this.geodata),zip:this.geodata.zip,latitude:this.geodata.latitude,longitude:this.geodata.longitude};
}else{
loc={javaClass:"com.datanaut.radiusim.mappings.Location",name:_21,country:null,state:null,city:null,street:null,zip:null,latitude:_20,longitude:longitude};
}
this.saveLocation(loc,this.showOnStartup.checked);
}else{
var _23=null;
this.saveLocationAndShowOnStartup(_20,longitude,_23,this.showOnStartup.checked);
}
var m=radius.windows.mapWin;
if(m&&m.gmap){
m.putUserOnMap();
if(m.userSelf){
m.gmap.recenter(m.userSelf[0].longitude,m.userSelf[0].latitude);
}
}
if(_1e==undefined||_1e){
this.closeWindow(false);
}
this.needStore=null;
}
catch(e){
radius.debug("locationWindow.doneBtnClick(): exception "+e.message);
}
},fillAdressBox:function(loc,_26){
if(_26){
var _27=this.getAddress(loc);
this.address.address.value=_27?_27:"";
}else{
this.address.address.value=loc.street?loc.street:"";
}
this.address.city.value=loc.city?loc.city:"";
this.address.state.value=loc.state?loc.state:"";
this.address.zip.value=loc.zip?loc.zip:"";
},recenterClick:function(){
if(this.mapView){
this.mapView.restoreCenter();
}
},goToAddrBtnClick:function(){
dojo.dom.textContent(this.errorAddress," ");
radius.loadingBar.callWithBar(dojo.lang.hitch(this,this.getGeoAddress));
},getGeoAddress:function(){
try{
var _28=radius.jsonrpc.location.geocode(this.address.address.value,this.address.city.value,this.address.state.value,this.address.zip.value);
this.resultGeoAddress(_28);
}
catch(e){
radius.debug("locationWindow.goToAddrBtnClick(): exception "+e.message);
}
},resultGeoAddress:function(_29){
if(!_29||(_29&&_29.length==0)){
this.geodata=null;
dojo.dom.textContent(this.errorAddress,"couldn't find this address");
}else{
this.geodata=_29[0];
this.fillAdressBox(this.geodata,true);
dojo.dom.textContent(this.errorAddress," ");
this.goToAddrBtnWidget.disable();
this.mapView.reSetMyLocation(this.geodata.longitude,this.geodata.latitude);
this.mapView.restoreCenter();
}
},focusToAddressBox:function(){
if(this.isVisible()&&this.address.address){
var _2a=dojo.html.getViewportSize();
var _2b=dojo.html.getScrollOffset();
var _2c={left:_2b[0],right:_2b[0]+_2a[0],top:_2b[1],bottom:_2b[1]+_2a[1]};
var _2d=false;
if(this.width>=_2c.bottom){
_2d=true;
}
if(_2d){
if(!dojo.render.html.mozilla){
this.address.address.focus();
setTimeout(function(){
document.body.scrollTop=0;
},0);
}
}else{
this.address.address.focus();
}
}
},fillWindow:function(){
try{
var u=this.getUser();
this.data=radius.getLocations(u.username);
this.last=this.data.last;
this.needStore=this.data.store;
}
catch(e){
radius.debug("locationWindow.fillWindow(): exception "+e.message);
}
var o=this;
window.setTimeout(function(){
o.buildWindow();
},0);
},buildWindow:function(){
var o=this;
if(locationMap_isLoaded==false){
window.setTimeout(function(){
o.buildWindow();
},100);
return;
}
if(this.skipFillMapView==undefined||!this.skipFillMapView){
this.skipFillMapView=true;
var loc;
if(this.last){
loc=this.last;
}else{
loc={latitude:40.720472,longitude:-74.008381};
this.last=loc;
}
this.mapView=new locationMap_MapWidget(dojo.byId("locationWinGMapBoxDomId"));
this.mapView.init(loc.longitude,loc.latitude,5,"GMapNestDomId",undefined,function(){
});
this.mapView.initIcons({width:68,height:55},{width:12,height:12});
this.mapView.load();
var o=this;
this.mapView.setActionCallback({onMove:function(){
},onResize:function(){
},onFriendClick:function(){
},onLocationChange:function(){
}});
this.mapView.initMyLocation(loc.longitude,loc.latitude);
this.mapView.myLocationMode.on();
this.mapView.addControlSet();
}
radius.html.attachEventM(this.mapView.buttons.address,"onclick",this,"focusToAddressBox",true);
radius.html.attachEventM(this.mapView.buttons.recenter,"onclick",this,"recenterClick",true);
if(this.skipFillComboBox==undefined||!this.skipFillComboBox){
this.skipFillComboBox=true;
var _32=this.data.locs;
var l=_32.length;
var _34=[];
for(var i=0;i<l;++i){
var loc=_32[i];
_34.push({name:loc.name,id:i,value:loc});
}
if(l>0){
_34.push({text:"<i>clear saved locations</i>",id:"_clear_id_",value:"clear"});
}
var s=this.savedLocations.storeState(_34);
if(s.selectBox.obj){
s.selectBox.obj.destroy();
}
if(this.last){
this.mapView.reSetMyLocation(this.last.longitude,this.last.latitude);
this.mapView.restoreCenter();
}
}
this.fillAdressBox(this.last.id?this.last:{},false);
this.focusToAddressBox();
this.goToAddrBtnWidget.disable();
dojo.dom.textContent(this.errorAddress," ");
this.saveLocationAs.setState(true);
this.saveLocationAs.setState(false);
this.saveLocAsText.value="";
if(this.data.show){
this.showOnStartup.setState(true);
}else{
this.showOnStartup.setState(false);
}
},changeSavedLocation:function(_37,_38){
if(_37.value=="clear"){
this.clearLocationsBtn(_37,_38);
}else{
this.last=_37.value;
this.skipFillComboBox=false;
this.fillAdressBox(_37.value,false);
this.goToAddrBtnWidget.disable();
this.focusToAddressBox();
dojo.dom.textContent(this.errorAddress," ");
this.savedLocations.change(null);
this.mapView.reSetMyLocation(_37.value.longitude,_37.value.latitude);
this.mapView.restoreCenter();
}
},createWindowPane:function(){
this.showOnStartup=radius.widget.create("CheckBox",{name:"cbox11x11blue",checked:false,textStyle:"font-size:9px;"},"locationWinShowOnStartupDomId");
this.address={};
this.address.address=dojo.byId("locationWinAddressDomId");
this.address.city=dojo.byId("locationWinCityDomId");
this.address.state=dojo.byId("locationWinStateDomId");
this.address.zip=dojo.byId("locationWinZipDomId");
for(i in this.address){
this.address[i].onchange=dojo.lang.hitch(this,"enableAddressBtn");
this.address[i].onfocus=dojo.lang.hitch(this,"enableAddressBtn");
}
this.saveLocationAs=radius.widget.create("CheckBox",{name:"cbox11x11blue",checked:false,textStyle:"font-size:9px;"},"locationWinSaveLocationAsDomId");
this.saveLocAsText=dojo.byId("locationWinSaveLocAsTextDomId");
this.errorAddress=dojo.byId("locationWinAddresBoxErrorDomId");
this.savedLocations=radius.widget.create("PullDown",{width:162,height:16,pullDownHeight:220,options:[],convert:function(_39){
return _39.name==undefined?{text:_39.text,id:_39.id,value:_39.value,selected:false}:{text:_39.name,id:_39.id,value:_39.value,selected:false};
}},dojo.byId("locationWinSavedLocationsDomId"));
this.savedLocations.onChanged=dojo.lang.hitch(this,"changeSavedLocation");
},_:0});
radius.widget.addClass("LocationWindow",radius.widget.LocationWindow);


dojo.provide("radius.widget.LegacyIcon");
radius.widget.LegacyIcon=function(){
radius.widget.BaseWindow.call(this);
};
radius.inherits(radius.widget.LegacyIcon,radius.widget.ImageButton);
radius.extend(radius.widget.LegacyIcon,{widgetType:"LegacyIcon",width:37,height:33,name:"legacy37x33",connected:false,reg:"gif",ConTooltipTimeout:5000,DisTooltipTimeout:5000,preCreate:function(){
this.domNode=this.srcNode;
this.imgNode=document.createElement("img");
this.imgNode.className="legacyIconAbsClass";
this.domNode.appendChild(this.imgNode);
this.eventNode=this.iconNode=radius.image.makeBlankNode();
this.iconNode.className="legacyIconAbsClass imgBtnClass";
this.domNode.appendChild(this.iconNode);
this.srcNode.parentNode.replaceChild(this.domNode,this.srcNode);
radius.widget.ImageButton.superclass.preCreate.call(this);
},onLoaded:function(){
radius.widget.LegacyIcon.superclass.onLoaded.call(this);
this.updateState(this.connected);
},updateState:function(_1){
this.connected=_1;
radius.image.setSrcX(this.iconNode,this.prefixPath+this.name+"/"+this.type+(_1?"/coloricon.png?version=RELEASE_0_27&build=200608281106":"/grayicon.png?version=RELEASE_0_27&build=200608281106")+this.buildPostfix,"scale");
this.iconNode.width=this.width;
this.iconNode.height=this.height;
},connectedTooltip:function(){
if(!this.conTooltip){
this.conTooltip=radius.widget.create("SimpleTooltip",{width:125},"rosterWinLegacySignInSuccDomId",true);
}
var e=this.domNode;
var _3=dojo.style.getAbsoluteX(e,true)+this.width/2,top=dojo.style.getAbsoluteY(e,true)-this.conTooltip.height;
this.conTooltip.open(_3,top);
var o=this;
this.conTooltipTimeoutId=setTimeout(function(){
o.conTooltip.close();
o.conTooltipTimeoutId=null;
},this.ConTooltipTimeout);
},disconnectedTooltip:function(){
if(!this.disTooltip){
this.disTooltip=radius.widget.create("SimpleTooltip",{width:125},"rosterWinLegacySignOutSuccDomId",true);
}
var e=this.domNode;
var _6=dojo.style.getAbsoluteX(e,true)+this.width/2,top=dojo.style.getAbsoluteY(e,true)-this.disTooltip.height;
this.disTooltip.open(_6,top);
var o=this;
this.disTooltipTimeoutId=setTimeout(function(){
o.disTooltip.close();
o.disTooltipTimeoutId=null;
},this.DisTooltipTimeout);
}});
radius.widget.addClass("LegacyIcon",radius.widget.LegacyIcon);


dojo.provide("radius.widget.RosterTree");
radius.widget.RosterTree=function(){
radius.widget.rosterTree=this;
this.area={radius:radius.byId("rosterWinRadiusAreaDomId"),aol:radius.byId("rosterWinAOLAreaDomId"),yahoo:radius.byId("rosterWinYahooAreaDomId"),msn:radius.byId("rosterWinMSNAreaDomId"),gtalk:radius.byId("rosterWinGTalkAreaDomId"),offline:radius.byId("rosterWinOfflineAreaDomId")};
for(var _1 in this.area){
this.area[_1].gcount=0;
}
this.origChildAreaNode=radius.byId("rosterTreeChildAreaDomId");
radius.html.handleSelectionState(this.origChildAreaNode,false);
this.origGroupNode=radius.byId("rosterTreeGroupDomId");
radius.html.handleSelectionState(this.origGroupNode,false);
this.origRadiusUserNode=radius.byId("rosterTreeRadiusUserDomId");
radius.html.handleSelectionState(this.origRadiusUserNode,false);
this.origFOFNode=radius.byId("rosterTreeFOFDomId");
radius.html.handleSelectionState(this.origFOFNode,false);
this.origLegacyUserNode=radius.byId("rosterTreeLegacyUserDomId");
radius.html.handleSelectionState(this.origLegacyUserNode,false);
this.origOfflineUserNode=radius.byId("rosterTreeOfflineUserDomId");
radius.html.handleSelectionState(this.origOfflineUserNode,false);
this.init();
this.offlineGroup=this.addGroup("offline","Offline");
this.offlineGroup.offline=true;
this._toggleGroup(null,this.offlineGroup,true);
this.radiusGroupCM=radius.widget.create("PopupMenu",{},"rosterTreeRadiusGroupContextMenuDomId");
this.radiusGroupCM.render();
dojo.event.connectBefore(this.radiusGroupCM,"onOpen",this,"_onRadiusGroupCMOpen");
dojo.event.connect(this.radiusGroupCM,"onItemClick",this,"_onRadiusGroupCMClick");
this.legacyGroupCM=radius.widget.create("PopupMenu",{},"rosterTreeLegacyGroupContextMenuDomId");
this.legacyGroupCM.render();
dojo.event.connectBefore(this.legacyGroupCM,"onOpen",this,"_onLegacyGroupCMOpen");
dojo.event.connect(this.legacyGroupCM,"onItemClick",this,"_onLegacyGroupCMClick");
this.radiusUserCM=radius.widget.create("PopupMenu",{},"rosterTreeRadiusFriendContextMenuDomId");
if(GLOBAL_CONFIG.debug){
this.radiusUserCM.addSep();
this.radiusUserCM.addItem(null,"DEBUG: print buddy","debug_printBuddy");
}
this.radiusUserCM.render();
dojo.event.connectBefore(this.radiusUserCM,"onOpen",this,"_onRadiusUserCMOpen");
dojo.event.connect(this.radiusUserCM,"onItemClick",this,"_onRadiusUserCMClick");
this.legacyUserCM=radius.widget.create("PopupMenu",{},"rosterTreeLegacyFriendContextMenuDomId");
if(GLOBAL_CONFIG.debug){
this.legacyUserCM.addSep();
this.legacyUserCM.addItem(null,"DEBUG: print buddy","debug_printBuddy");
}
this.legacyUserCM.render();
dojo.event.connectBefore(this.legacyUserCM,"onOpen",this,"_onLegacyUserCMOpen");
dojo.event.connect(this.legacyUserCM,"onItemClick",this,"_onLegacyUserCMClick");
this.fofCM=radius.widget.create("PopupMenu",{},"rosterTreeFOFContextMenuDomId");
this.fofCM.render();
dojo.event.connectBefore(this.fofCM,"onOpen",this,"_onFOFCMOpen");
dojo.event.connect(this.fofCM,"onItemClick",this,"_onFOFCMClick");
if(dojo.render.html.ie){
this.BlinkBuddyFilter="progid:DXImageTransform.Microsoft.Fade(duration="+(this.BlinkBuddyPeriodTimeout/1000)+", overlap=1.0)";
}
this.BlinkBuddyCycleTimeout=this.BlinkBuddyPeriodTimeout/this.BlinkBuddyCycleCount;
this.BlinkBuddyOpacityIncrement=1/this.BlinkBuddyCycleCount;
};
radius.extend(radius.widget.RosterTree,{BoldBuddyTimeout:5000,BlinkBuddyTimeout:5000,BlinkBuddyPeriodTimeout:1000,BlinkBuddyCycleCount:10,BlinkTextDefaultColor:"#001736",BlinkTextColors:{normal:["#334252","#334252","#334252","#465462","#64707c","#858e98","#abb1b8","#ced1d5","#e9ebed","#ffffff"],over:["#334252","#334252","#455362","#455362","#5f6c7a","#818c99","#a1abb6","#c1cad4","#dee5ee","#f1f7ff"],sel:["#3a495a","#3a4959","#495561","#4a5661","#636c6e","#84877f","#a7a491","#cbc3a3","#e7dab2","#fcecbd"]},ExpandedArrowIcon:"/images/trees/roster/arrow_down16x20.png?version=RELEASE_0_27&build=200608281106",CollapsedArrowIcon:"/images/trees/roster/arrow_right16x20.png?version=RELEASE_0_27&build=200608281106",TypeOnIcons:{"radius":"/images/trees/roster/radius_on16x16.png?version=RELEASE_0_27&build=200608281106","aol":"/images/trees/roster/aol_on16x16.png?version=RELEASE_0_27&build=200608281106","yahoo":"/images/trees/roster/yahoo_on16x16.png?version=RELEASE_0_27&build=200608281106","msn":"/images/trees/roster/msn_on16x16.png?version=RELEASE_0_27&build=200608281106","gtalk":"/images/trees/roster/gtalk_on16x16.png?version=RELEASE_0_27&build=200608281106"},TypeOffIcons:{"radius":"/images/trees/roster/radius_off16x16.png?version=RELEASE_0_27&build=200608281106","aol":"/images/trees/roster/aol_off16x16.png?version=RELEASE_0_27&build=200608281106","yahoo":"/images/trees/roster/yahoo_off16x16.png?version=RELEASE_0_27&build=200608281106","msn":"/images/trees/roster/msn_off16x16.png?version=RELEASE_0_27&build=200608281106","gtalk":"/images/trees/roster/gtalk_off16x16.png?version=RELEASE_0_27&build=200608281106"},TypeBlockOnIcons:{"radius":"/images/trees/roster/radius_blockon16x16.png?version=RELEASE_0_27&build=200608281106","aol":"/images/trees/roster/aol_blockon16x16.png?version=RELEASE_0_27&build=200608281106","yahoo":"/images/trees/roster/yahoo_blockon16x16.png?version=RELEASE_0_27&build=200608281106","msn":"/images/trees/roster/msn_blockon16x16.png?version=RELEASE_0_27&build=200608281106","gtalk":"/images/trees/roster/gtalk_blockon16x16.png?version=RELEASE_0_27&build=200608281106"},TypeBlockOffIcons:{"radius":"/images/trees/roster/radius_block16x16.png?version=RELEASE_0_27&build=200608281106","aol":"/images/trees/roster/aol_block16x16.png?version=RELEASE_0_27&build=200608281106","yahoo":"/images/trees/roster/yahoo_block16x16.png?version=RELEASE_0_27&build=200608281106","msn":"/images/trees/roster/msn_block16x16.png?version=RELEASE_0_27&build=200608281106","gtalk":"/images/trees/roster/gtalk_block16x16.png?version=RELEASE_0_27&build=200608281106"},LocBlockIcon:"/images/trees/roster/na16x16.png?version=RELEASE_0_27&build=200608281106",AwayIcon:"/images/trees/roster/away16x16.png?version=RELEASE_0_27&build=200608281106",PlusIcon:"/images/trees/roster/plus9x9.png?version=RELEASE_0_27&build=200608281106",PlusGreyIcon:"/images/trees/roster/plus_grey9x9.png?version=RELEASE_0_27&build=200608281106",MinusIcon:"/images/trees/roster/minus9x9.png?version=RELEASE_0_27&build=200608281106",SizeWithPlusIcon:{margin:"2px",tdWidth:"18px"},SizeWithoutPlusIcon:{margin:"12px",tdWidth:"28px"},NormalClasses:{"group":"rosterTreeGroupClass","user":"rosterTreeUserClass","fof":"rosterTreeUserClass"},OverClasses:{"group":"rosterTreeGroupOverClass","user":"rosterTreeUserOverClass","fof":"rosterTreeUserOverClass"},SelClasses:{"group":"rosterTreeGroupSelClass","user":"rosterTreeUserSelClass","fof":"rosterTreeUserSelClass"},init:function(){
this.invalidateTreeArea=true;
this.curOverRow=null;
this.curSelRow=null;
},clear:function(){
this.removeEntriesTypeOf("radius",true);
this.removeEntriesTypeOf("aol",true);
this.removeEntriesTypeOf("yahoo",true);
this.removeEntriesTypeOf("msn",true);
this.removeEntriesTypeOf("gtalk",true);
this.updateOfflineGroupInfo();
this.updateTreeArea();
},_buildGroupId:function(_2,_3){
return "rosterTreeGroup_"+_2+"_"+(_3?_3:"");
},_buildUserId:function(_4,_5){
return "rosterTreeUser_"+_4+"_"+_5;
},_buildBuddyId:function(_6){
return this._buildUserId(_6.getType(),_6.getNormUid());
},_buildFOFIdByUid:function(_7,_8){
return "rosterTreeFOF_"+_7+"_"+_8;
},_buildFOFId:function(_9,_a){
return this._buildFOFIdByUid(_9.getNormUid(),_a);
},_getChildAreaId:function(_b){
return _b.careaId?_b.careaId:("childs_for_"+_b.id);
},_getChildArea:function(_c){
var _d=this._getChildAreaId(_c);
var _e=radius.byId(_d);
if(!_e){
_e=this.origChildAreaNode.cloneNode(true);
_e.id=_c.careaId=_d;
if(!_c.expanded){
_e.style.display="none";
}
if(_c.nextSibling){
_c.parentNode.insertBefore(_e,_c.nextSibling);
}else{
_c.parentNode.appendChild(_e);
}
}
return _e;
},_insertElement:function(_f,_10,_11){
var _12=_f.childNodes;
_10.order=_11;
for(var n=0;n<_12.length;n++){
var _14=_12[n];
if(_14.order&&_14.order>=_11){
_f.insertBefore(_10,_14);
return;
}
}
_f.appendChild(_10);
},getGroupsCount:function(_15){
return this.area[_15].gcount;
},findGroup:function(_16,_17){
return radius.byId(this._buildGroupId(_16,_17?_17:""));
},getGroups:function(_18){
var _19=[];
var _1a=this.area[_18].childNodes;
for(var n=0;n<_1a.length;n++){
var _1c=_1a[n];
if(_1c.order){
_19.push({name:_1c.text,value:_1c.group});
}
}
return _19;
},addGroup:function(_1d,_1e,_1f,_20){
var _21,gname;
if(_1e){
_21=this._buildGroupId(_1d,gname=_1e);
}else{
_21=this._buildGroupId(_1d,"");
gname=radius.data.defaultGroupNames[_1d];
}
if(!_1f){
_1f=gname.toLowerCase();
}else{
_1f=dojo.lang.isNumber(_1f)?_1f:_1f.toLowerCase();
}
var _22=radius.byId(_21);
if(!_22){
_22=this.origGroupNode.cloneNode(true);
_22.id=_21;
radius.html.setInnerText(_22.childNodes[2],_22.text=gname);
if(_20){
_22.order=_1f;
this.area[_1d].appendChild(_22);
}else{
this._insertElement(this.area[_1d],_22,_1f);
}
this.area[_1d].gcount++;
this.invalidateTreeArea=true;
_22.rtype="group";
_22.type=_1d;
_22.group=_1e;
_22.tcount=_22.ccount=0;
_22.expanded=true;
radius.image.setSrcX(_22.firstChild,this.ExpandedArrowIcon);
var _23=this.TypeOnIcons[_1d];
if(_23){
radius.image.setSrcX(_22.childNodes[1],this.TypeOnIcons[_1d]);
}else{
_22.childNodes[1].style.display="none";
}
}else{
if(_22.text!=gname){
radius.html.setInnerText(_22.childNodes[2],_22.text=gname);
}
if(_22.order!=_1f){
radius.html.detachNode(_22);
if(_20){
_22.order=_1f;
this.area[_1d].appendChild(_22);
}else{
this._insertElement(this.area[_1d],_22,_1f);
}
this.invalidateTreeArea=true;
}
}
return _22;
},removeEmptyGNode:function(_24){
if(_24.offline||_24.ccount||_24.tcount){
return;
}
var _25=_24.parentNode;
radius.html.discardNode(_24);
_25.gcount--;
this.invalidateTreeArea=true;
},removeEmptyGroup:function(_26,_27){
var _28=this.findGroup(_26,_27);
if(_28){
this.removeEmptyGNode(_28);
}
},renameGroup:function(_29,_2a,_2b){
var _2c=this.findGroup(_29,_2a);
if(!_2c){
return false;
}
var _2d=this.findGroup(_29,_2b);
if(_2c==_2d){
return false;
}
if(_2d){
var _2e=false;
if(_2c.ccount>0){
var _2f=radius.byId(_2c.careaId);
var _30=this._getChildArea(_2d);
var _31;
while(_31=_2f.firstChild){
radius.html.detachNode(_31);
this._insertElement(_30,_31,_31.order);
_2d.ccount++;
_2d.tcount++;
_31.gnodeId=_31.gnodeRealId=_2d.id;
_2c.tcount--;
}
radius.html.discardNode(_2f);
_2c.ccount=0;
_2e=true;
}
if(_2c.tcount>0){
var _32=_2c.id;
var _33=radius.byId(this.offlineGroup.careaId);
var _34=_33.childNodes;
for(var n=0;n<_34.length;n++){
var _31=_34[n];
if(_31.order&&_31.gnodeRealId==_32){
_31.gnodeRealId=_2d.id;
_2c.tcount--;
_2d.tcount++;
}
}
_2e=true;
this.updateOfflineGroupInfo();
}
if(_2e){
this.updateGNodeInfo(_2d);
}
this.removeEmptyGNode(_2c);
}else{
var _32=_2c.id;
var _36,gname;
if(_2b){
_36=this._buildGroupId(_29,gname=_2b);
}else{
_36=this._buildGroupId(_29,"");
gname=radius.data.defaultGroupNames[_29];
}
var _37=_2c;
_37.id=_36;
radius.html.setInnerText(_37.childNodes[2],_37.text=gname);
_37.group=_2b;
if(_37.ccount>0){
var _38=_37.careaId;
_37.careaId=undefined;
var _39=radius.byId(_38);
var _3a=this._getChildAreaId(_37);
_37.careaId=_39.id=_3a;
var _34=_37.childNodes;
for(var n=0;n<_34.length;n++){
var _31=_34[n];
if(_31.order){
if(_31.gnodeId==_32){
_31.gnodeId=_36;
}
if(_31.gnodeRealId==_32){
_31.gnodeRealId=_36;
}
}
}
}
if(_37.tcount>0){
var _33=radius.byId(this.offlineGroup.careaId);
var _34=_33.childNodes;
for(var n=0;n<_34.length;n++){
var _31=_34[n];
if(_31.order&&_31.gnodeRealId==_32){
_31.gnodeRealId=_36;
}
}
this.updateOfflineGroupInfo();
}
this.updateGNodeInfo(_37);
}
},updateGNodeInfo:function(_3b){
radius.html.setInnerText(_3b.childNodes[3],"("+_3b.ccount+"/"+_3b.tcount+")");
},updateGroupInfo:function(_3c,_3d){
var _3e=this.findGroup(_3c,_3d);
if(_3e){
this.updateGNodeInfo(_3e);
}
},updateOfflineGroupInfo:function(){
this.updateGNodeInfo(this.offlineGroup);
},getUsersCount:function(_3f,_40){
return radius.byId(this._buildGroupId(_3f,_40?_40:"")).ccount;
},getUsersTotalCount:function(_41,_42){
return this.findGroup(_41,_42).tcount;
},getAllUsersCount:function(){
return this.offlineGroup.tcount;
},findUNode:function(_43){
return radius.byId(this._buildUserId(_43.getType(),_43.getNormUid()));
},addBuddy:function(_44,_45,_46,_47){
var _48=_44.getType();
var _49=this._buildUserId(_48,_44.getNormUid());
var _4a=radius.byId(_49);
if(_4a){
this.removeBuddy(_44,_46);
_4a=undefined;
}
var _4b=this.addGroup(_48,_44.group,null,_45);
var _4c=_4b;
if(!_44.isOnline()){
_4c=this.offlineGroup;
}
var _4d=this._getChildArea(_4c);
var _4e=_44.getName();
if(!_4a){
if(_44.isOnline()){
if(_48=="radius"){
_4a=this.origRadiusUserNode.cloneNode(true);
radius.html.setInnerText(_4a.rows[0].cells[2],_4a.text=_4e);
radius.html.setInnerText(_4a.rows[0].cells[3],_44.getDistanceString());
_4a.ccount=0;
_4a.expanded=_47;
}else{
_4a=this.origLegacyUserNode.cloneNode(true);
radius.html.setInnerText(_4a.childNodes[2],_4a.text=_4e);
}
}else{
_4a=this.origOfflineUserNode.cloneNode(true);
radius.html.setInnerText(_4a.childNodes[2],_4a.text=_4e);
_4a.offline=true;
}
_4a.id=_49;
if(_45){
_4a.order=_4e.toLowerCase();
_4d.appendChild(_4a);
}else{
this._insertElement(_4d,_4a,_4e.toLowerCase());
}
this.invalidateTreeArea=true;
_4c.ccount++;
_4b.tcount++;
this.offlineGroup.tcount++;
_4a.rtype="user";
_4a.rowState="normal";
_4a.type=_48;
_4a.uid=_44.uid;
_4a.gnodeId=_4c.id;
_4a.gnodeRealId=_4b.id;
if(!_46){
this.updateGNodeInfo(_4b);
this.updateOfflineGroupInfo();
}else{
_46[_4b.id]=_4b;
}
this.updateUNodeIcons(_4a,_44);
}else{
window.alert("UNODE IS ALREADY EXIST");
}
if(_48=="radius"){
var _4f=_44.getFOFs();
if(_4f!=null&&_4f.length){
this.setFOFs(_44,_4f);
}
}
},removeBuddy:function(_50,_51,_52){
var _53=_50.getType();
var _54=this._buildUserId(_53,_50.getNormUid());
var _55=radius.byId(_54);
if(_55){
if(_55.boldTimerId){
clearTimeout(_55.boldTimerId);
}
if(_55.blinkTimerId){
clearTimeout(_55.blinkTimerId);
}
if(_55.blinkCycleId){
clearInterval(_55.blinkCycleId);
}
if(_55.ccount>0&&_55.careaId){
var _56=radius.byId(_55.careaId);
if(_56){
radius.html.discardNode(_56);
if(this.curOverRow&&this.curOverRow.parentNode==_56){
this.curOverRow=null;
}
if(this.curSelRow&&this.curSelRow.parentNode==_56){
this.curSelRow=null;
}
}
}
radius.html.discardNode(_55);
this.invalidateTreeArea=true;
if(this.curOverRow==_55){
this.curOverRow=null;
}
if(this.curSelRow==_55){
this.curSelRow=null;
}
this.offlineGroup.tcount--;
var _57;
if(_55.gnodeId&&(_57=radius.byId(_55.gnodeId))){
_57.ccount--;
if(!_57.ccount&&_57.careaId){
var _56=radius.byId(_57.careaId);
if(_56){
radius.html.discardNode(_56);
}
_57.careaId=undefined;
}
var _58;
if(_57.offline){
if(_55.gnodeRealId&&(_58=radius.byId(_55.gnodeRealId))){
_58.tcount--;
}
}else{
_58=_57;
_57.tcount--;
}
if(!_58.tcount&&(_58.type!="radius"||!_58.group)){
if(_52){
_52[_58.id]=_58;
}else{
this.removeEmptyGNode(_58);
}
_58=null;
}
if(!_51){
if(_58){
this.updateGNodeInfo(_58);
}
this.updateOfflineGroupInfo();
}else{
if(_58){
_51[_58.id]=_58;
}
}
}else{
if(!_51){
this.updateOfflineGroupInfo();
}
}
}
},setFOFs:function(_59,_5a){
if(_59.getType()!="radius"){
throw new Error("Invalid buddy");
}
var _5b=this._buildUserId("radius",_59.getNormUid());
var _5c=radius.byId(_5b);
if(!_5c||_5c.offline){
return false;
}
var _5d=!_5a||!_5a.length;
this.removeFOFs(_5c,!_5a,_5d,_59);
if(_5d){
return true;
}
var _5e=this._getChildArea(_5c);
if(_5e.style.display!="none"){
this.invalidateTreeArea=true;
}
var _5f=_59.getNormUid();
for(var n=0;n<_5a.length;n++){
var fof=_5a[n];
var _62=fof.getName();
var _63=this._buildFOFIdByUid(_5f,fof.uname);
var _64=radius.byId(_63);
if(!_64){
_64=this.origFOFNode.cloneNode(true);
radius.html.setInnerText(_64.firstChild,_64.text=_62);
_64.id=_63;
_64.rtype="fof";
_64.uname=fof.uname;
_64.dispName=_62;
_64.uid=_59.uid;
_64.unodeId=_5c.id;
_64.order=_62.toLowerCase();
_5e.appendChild(_64);
_5c.ccount++;
}else{
window.alert("FOF \""+fof.uname+"\" is already exist");
}
}
return true;
},removeFOFs:function(_65,_66,_67,_68){
var _69=this._getChildAreaId(_65);
var _6a=radius.byId(_69);
if(_6a){
if(_6a.style.display!="none"){
this.invalidateTreeArea=true;
}
if(this.curOverRow&&this.curOverRow.parentNode==_6a){
this.curOverRow=null;
}
if(this.curSelRow&&this.curSelRow.parentNode==_6a){
this.curSelRow=null;
}
if(_66||_67){
radius.html.discardNode(_6a);
_65.careaId=undefined;
}else{
radius.html.discardChildren(_6a);
}
}
_65.ccount=0;
var std=_65.rows[0].cells[0];
if(_66){
_65.rows[0].cells[1].style.display="none";
std.firstChild.style.marginLeft=this.SizeWithoutPlusIcon.margin;
std.style.width=this.SizeWithoutPlusIcon.tdWidth;
this._removeFoFIcon(_65);
}else{
this._renderFoFIcon(_65,_68);
std.firstChild.style.marginLeft=this.SizeWithPlusIcon.margin;
std.style.width=this.SizeWithPlusIcon.tdWidth;
}
},updateUNodeIcons:function(_6c,_6d){
var _6e=_6d.getType();
if(_6d.isOnline()){
if(_6e=="radius"){
var _6f=_6c.rows[0].cells[0].firstChild;
if(_6d.isBlocked()){
radius.image.setSrcX(_6f,"/images/x.gif?version=RELEASE_0_27&build=200608281106");
radius.widget.detachTooltip(_6f);
}else{
if(!_6d.isShareMyLoc()){
radius.image.setSrcX(_6f,this.LocBlockIcon);
radius.widget.detachTooltip(_6f);
}else{
if(_6d.isAway()){
radius.image.setSrcX(_6f,this.AwayIcon);
if(_6d.awayText){
radius.widget.attachTooltip(_6f,_6d.awayText);
}else{
radius.widget.detachTooltip(_6f);
}
}else{
radius.image.setSrcX(_6f,"/images/x.gif?version=RELEASE_0_27&build=200608281106");
radius.widget.detachTooltip(_6f);
}
}
}
}else{
var _6f=_6c.firstChild;
if(_6d.isBlocked()){
radius.image.setSrcX(_6f,"/images/x.gif?version=RELEASE_0_27&build=200608281106");
var _70=_6c.childNodes[1];
_70.style.display="";
radius.image.setSrcX(_70,this.TypeBlockOnIcons[_6e]);
radius.widget.detachTooltip(_6f);
}else{
if(_6d.isAway()){
radius.image.setSrcX(_6f,this.AwayIcon);
_6c.childNodes[1].style.display="none";
if(_6d.awayText){
radius.widget.attachTooltip(_6f,_6d.awayText);
}else{
radius.widget.detachTooltip(_6f);
}
}else{
radius.image.setSrcX(_6f,"/images/x.gif?version=RELEASE_0_27&build=200608281106");
_6c.childNodes[1].style.display="none";
radius.widget.detachTooltip(_6f);
}
}
}
}else{
if(_6d.isBlocked()){
radius.image.setSrcX(_6c.firstChild,"/images/x.gif?version=RELEASE_0_27&build=200608281106");
radius.image.setSrcX(_6c.childNodes[1],this.TypeBlockOffIcons[_6e]);
}else{
if(_6e=="radius"&&!_6d.isShareMyLoc()){
radius.image.setSrcX(_6c.firstChild,this.LocBlockIcon);
radius.image.setSrcX(_6c.childNodes[1],this.TypeOffIcons[_6e]);
}else{
radius.image.setSrcX(_6c.firstChild,"/images/x.gif?version=RELEASE_0_27&build=200608281106");
radius.image.setSrcX(_6c.childNodes[1],this.TypeOffIcons[_6e]);
}
}
}
},updateBuddyIcons:function(_71){
var _72=this.findUNode(_71);
if(_72){
this.updateUNodeIcons(_72,_71);
}
},updateBuddyDistance:function(_73){
var _74=this.findUNode(_73);
if(_74&&_74.type=="radius"&&!_74.offline){
radius.html.setInnerText(_74.rows[0].cells[3],_73.getDistanceString());
}
},updateBuddyGroup:function(_75,_76){
var _77=_76?_76:{};
var _78={};
var _79=_75.getType();
if(_79=="radius"&&_75.isOnline()){
var _7a=this._buildUserId(_79,_75.getNormUid());
var _7b=radius.byId(_7a);
var _7c=_7b?_7b.expanded:false;
this.removeBuddy(_75,_77,_78);
this.addBuddy(_75,null,_77,_7c);
}else{
this.removeBuddy(_75,_77,_78);
this.addBuddy(_75,null,_77);
}
if(!_76){
for(var id in _77){
this.updateGNodeInfo(_77[id]);
}
this.updateOfflineGroupInfo();
}
for(var id in _78){
this.removeEmptyGNode(_78[id]);
}
},updateBuddyOfflineStatus:function(_7e,_7f){
this.updateBuddyGroup(_7e,_7f);
},startBoldBuddy:function(_80,_81){
var _82=this.findUNode(_80);
if(_82){
if(_82.boldTimerId){
clearTimeout(_82.boldTimerId);
_82.boldTimerId=undefined;
}
if(!_82.boldRef){
(_82.type=="radius"?_82.rows[0].cells[2]:_82.childNodes[2]).style.fontWeight="bold";
_82.boldRef=1;
}else{
_82.boldRef++;
}
if(_81!=0){
_82.boldTimerId=radius.setTimeoutM(this,this.stopBoldBuddyById,_81||this.BoldBuddyTimeout,_82.id);
}
}
},_stopBoldUNode:function(_83){
if(_83.boldTimerId){
clearTimeout(_83.boldTimerId);
_83.boldTimerId=undefined;
}
if(_83.boldRef){
_83.boldRef--;
}
if(!_83.boldRef){
(_83.type=="radius"?_83.rows[0].cells[2]:_83.childNodes[2]).style.fontWeight="normal";
}
},stopBoldBuddyById:function(_84){
var _85=radius.byId(_84);
if(_85){
this._stopBoldUNode(_85);
}
},stopBoldBuddy:function(_86){
var _87=this.findUNode(_86);
if(_87){
this._stopBoldUNode(_87);
}
},_cycleBlinkUNode:function(_88,_89){
var _8a=radius.byId(_88);
if(!_8a||_8a.offline){
return;
}
var _8b=_8a.type=="radius"?_8a.rows[0].cells[2]:_8a.childNodes[2];
if(_89){
_8b.style.color=this.BlinkTextDefaultColor;
}else{
var z=Math.floor(_8a.blinkState/this.BlinkBuddyCycleCount);
var x=(z%2)?(_8a.blinkState%this.BlinkBuddyCycleCount):(this.BlinkBuddyCycleCount-_8a.blinkState%this.BlinkBuddyCycleCount);
_8b.style.color=this.BlinkTextColors[_8a.rowState][x];
_8a.blinkState++;
}
},_setUNodeBlinkStatus:function(_8e,_8f){
if(!_8e||_8e.offline){
return;
}
if(_8f){
_8e.blinkState=0;
if(_8e.blinkCycleId){
clearInterval(_8e.blinkCycleId);
}
this._cycleBlinkUNode(_8e.id);
_8e.blinkCycleId=radius.setIntervalM(this,this._cycleBlinkUNode,this.BlinkBuddyCycleTimeout,_8e.id);
}else{
_8e.blinkState=undefined;
if(_8e.blinkCycleId){
clearInterval(_8e.blinkCycleId);
_8e.blinkCycleId=undefined;
}
this._cycleBlinkUNode(_8e.id,true);
}
},startBlinkBuddy:function(_90,_91){
var _92=this.findUNode(_90);
if(!_92||_92.offline){
return;
}
if(_92){
this.startBoldBuddy(_90,_91);
if(_92.blinkTimerId){
clearTimeout(_92.blinkTimerId);
_92.blinkTimerId=undefined;
}
this._setUNodeBlinkStatus(_92,true);
if(_91!=0){
_92.blinkTimerId=radius.setTimeoutM(this,this.stopBlinkBuddyById,_91||this.BlinkBuddyTimeout,_92.id);
}
}
},_stopBlinkUNode:function(_93){
if(!_93||_93.offline){
return;
}
this._stopBoldUNode(_93);
if(_93.blinkTimerId){
clearTimeout(_93.blinkTimerId);
_93.blinkTimerId=undefined;
}
this._setUNodeBlinkStatus(_93,false);
},stopBlinkBuddyById:function(_94){
var _95=radius.byId(_94);
if(_95){
this._stopBlinkUNode(_95);
}
},stopBlinkBuddy:function(_96){
var _97=this.findUNode(_96);
if(_97){
this._stopBlinkUNode(_97);
}
},removeEntriesTypeOf:function(_98,_99){
var _9a=this.area[_98];
if(_9a){
this.invalidateTreeArea=true;
var n;
var _9c=_9a.getElementsByTagName("*");
for(n=0;n<_9c.length;n++){
var _9d=_9c[n];
if(_9d.tpattached){
radius.widget.detachTooltip(_9d);
}
}
_9c=_9a.childNodes;
for(n=0;n<_9c.length;n++){
var _9d=_9c[n];
if(_9d.order&&_9d.tcount){
this.offlineGroup.tcount-=_9d.tcount;
}
}
radius.html.discardChildren(_9a);
if(this.offlineGroup.ccount){
var _9e=radius.byId(this.offlineGroup.careaId);
var _9f=[];
_9c=_9e.childNodes;
for(n=0;n<_9c.length;n++){
var _9d=_9c[n];
if(_9d.order&&_9d.type==_98){
_9f.push(_9d);
this.offlineGroup.ccount--;
}
}
if(!this.offlineGroup.ccount){
radius.html.discardNode(_9e);
this.offlineGroup.careaId=undefined;
}else{
radius.html.discardNodes(_9f);
}
}
if(!_99){
this.updateOfflineGroupInfo();
}
}
},_rowOver:function(e,row){
if(row.otid){
clearTimeout(row.otid);
row.otid=null;
}
if(row==this.curOverRow){
return;
}
if(this.curOverRow){
this._rowOut({},this.curOverRow);
}
this.curOverRow=row;
if(row!=this.curSelRow){
row.className=this.OverClasses[row.rtype];
row.rowState="over";
}
},_rowOut:function(e,row){
if(!e){
e=window.event;
}
if(row.otid){
clearTimeout(row.otid);
row.otid=null;
}
if(radius.html.contains(row,e.fromElement?e.fromElement:e.relatedTarget)){
row.otid=radius.setTimeoutM(this,this._rowOut,80,{},row);
return;
}
this.curOverRow=null;
if(row!=this.curSelRow){
row.className=this.NormalClasses[row.rtype];
row.rowState="normal";
}
},_rowDown:function(e,row){
if(row==this.curSelRow){
return;
}
if(this.curSelRow){
this.curSelRow.className=this.NormalClasses[this.curSelRow.rtype];
this.curSelRow.rowState="normal";
}
this.curSelRow=row;
row.className=this.SelClasses[row.rtype];
row.rowState="sel";
},_toggleGroup:function(e,row,_a8){
if(row.expanded){
if(row.ccount>0){
radius.byId(row.careaId).style.display="none";
if(!_a8){
this.updateTreeArea(true);
}
}
row.expanded=false;
radius.image.setSrcX(row.firstChild,this.CollapsedArrowIcon);
}else{
if(row.ccount>0){
radius.byId(row.careaId).style.display="";
if(!_a8){
this.updateTreeArea(true);
}
}
row.expanded=true;
radius.image.setSrcX(row.firstChild,this.ExpandedArrowIcon);
}
},_renderFoFIcon:function(_a9,_aa){
var td=_a9.rows[0].cells[1];
td.style.display="";
if(_a9.expanded){
radius.image.setSrcX(td.firstChild,this.MinusIcon);
radius.widget.attachTooltip(td,"Hide "+_aa.getNormUid()+"'s friends");
}else{
radius.image.setSrcX(td.firstChild,this.PlusIcon);
radius.widget.attachTooltip(td,"Show "+_aa.getNormUid()+"'s friends");
}
},_removeFoFIcon:function(_ac){
var td=_ac.rows[0].cells[1];
radius.widget.detachTooltip(td);
},_toggleRadiusUser:function(e,_af,_b0){
var _b1=radius.getRoster().findBuddy(_af.type,_af.uid);
if(_af.expanded){
if(_af.ccount>0){
radius.byId(_af.careaId).style.display="none";
if(!_b0){
this.updateTreeArea(true);
}
}
_af.expanded=false;
}else{
if(_af.ccount>0){
radius.byId(_af.careaId).style.display="";
if(!_b0){
this.updateTreeArea(true);
}
}
_af.expanded=true;
}
this._renderFoFIcon(_af,_b1);
},_userClick:function(e,row){
},_userDblClick:function(e,row){
var _b6=radius.getRoster().findBuddy(row.type,row.uid);
if(_b6){
radius.getRoster().sendMessageToBuddy(_b6);
}
},_fofClick:function(e,row){
},_fofDblClick:function(e,row){
radius.getRoster().sendMessage("radius",row.uname);
},_cmenuOpen:function(e,row){
if(window.event){
e=window.event;
}
if(row.rtype=="group"){
if(row.type=="radius"){
this.radiusGroupCM.onOpen(e,row);
}else{
if(!row.offline){
this.legacyGroupCM.onOpen(e,row);
}
}
}else{
if(row.rtype=="user"){
if(row.type=="radius"){
this.radiusUserCM.onOpen(e,row);
}else{
this.legacyUserCM.onOpen(e,row);
}
}else{
if(row.rtype=="fof"){
this.fofCM.onOpen(e,row);
}
}
}
},_onRadiusGroupCMOpen:function(e,row){
},_onRadiusGroupCMClick:function(e,_c0,row){
switch(_c0.id){
case "addFriend":
radius.getRoster().addFriend("radius",null,row.group);
break;
case "addGroup":
radius.getRoster().addGroup();
break;
case "edit":
radius.getRoster().editGroup(row.group);
break;
case "delete":
radius.getRoster().removeGroup(row.group);
break;
}
return true;
},_onLegacyGroupCMOpen:function(e,row){
},_onLegacyGroupCMClick:function(e,_c5,row){
switch(_c5.id){
case "addFriend":
radius.getRoster().addFriend(row.type,null,row.group);
break;
}
return true;
},_onRadiusUserCMOpen:function(e,row){
var _c9=radius.getRoster().findBuddy(row.type,row.uid);
var _ca=radius.generalSettings.logAll&&(new radius.RosterRequest("getMessages",true).send({jid:_c9.uid,system:_c9.conn.getSystem(),limit:0},0))[0];
this.radiusUserCM.itemShow("showLog",_ca);
var _cb=_c9.isBlocked();
this.radiusUserCM.itemShow("block",!_cb);
this.radiusUserCM.itemShow("unblock",_cb);
var _cc=_c9.isShareMyLoc();
this.radiusUserCM.itemShow("hideMyLoc",!_cb&&_cc);
this.radiusUserCM.itemShow("shareMyLoc",!_cb&&!_cc);
},_onRadiusUserCMClick:function(e,_ce,row){
var _d0=radius.getRoster().findBuddy(row.type,row.uid);
switch(_ce.id){
case "showOnMap":
radius.getRoster().showOnMap(row.uid);
break;
case "profile":
radius.getRoster().showRadiusProfile(row.uid);
break;
case "edit":
radius.getRoster().editBuddy(_d0);
break;
case "delete":
radius.getRoster().removeBuddy(_d0);
break;
case "block":
radius.getRoster().blockBuddy(_d0);
break;
case "unblock":
radius.getRoster().unblockBuddy(_d0);
break;
case "hideMyLoc":
radius.getRoster().hideMyLocBuddy(_d0);
break;
case "shareMyLoc":
radius.getRoster().shareMyLocBuddy(_d0);
break;
case "showLog":
radius.getRoster().showLog(row.uid,row.type);
break;
case "addFriend":
radius.getRoster().addFriend("radius",null,_d0.group);
break;
case "addGroup":
radius.getRoster().addGroup();
break;
case "debug_printBuddy":
window.alert(radius.obj2str(_d0,2));
break;
}
return true;
},_onLegacyUserCMOpen:function(e,row){
var _d3=radius.getRoster().findBuddy(row.type,row.uid);
var _d4=radius.generalSettings.logAll&&(new radius.RosterRequest("getMessages",true).send({jid:_d3.uid,system:_d3.conn.getSystem(),limit:0},0))[0];
this.legacyUserCM.itemShow("showLog",_d4);
var _d5=_d3.isBlocked();
this.legacyUserCM.itemShow("block",!_d5);
this.legacyUserCM.itemShow("unblock",_d5);
},_onLegacyUserCMClick:function(e,_d7,row){
var _d9=radius.getRoster().findBuddy(row.type,row.uid);
switch(_d7.id){
case "profile":
window.alert("Not implemented.");
break;
case "addFriend":
radius.getRoster().addFriend(row.type,null,_d9.group);
break;
case "delete":
radius.getRoster().removeBuddy(_d9);
break;
case "showLog":
radius.getRoster().showLog(row.uid,row.type);
break;
case "sendMessage":
radius.getRoster().sendMessageToBuddy(_d9);
break;
case "block":
radius.getRoster().blockBuddy(_d9);
break;
case "unblock":
radius.getRoster().unblockBuddy(_d9);
break;
case "debug_printBuddy":
window.alert(radius.obj2str(_d9,2));
break;
}
return true;
},_onFOFCMOpen:function(e,row){
var _dc=radius.generalSettings.logAll&&(new radius.RosterRequest("getMessages",true).send({jid:row.uname,system:"radius",limit:0},0))[0];
this.fofCM.itemShow("showLog",_dc);
},_onFOFCMClick:function(e,_de,row){
switch(_de.id){
case "profile":
radius.getRoster().showRadiusProfile(row.dispName);
break;
case "showLog":
radius.getRoster().showLog(row.dispName,"radius");
break;
case "sendMessage":
radius.getRoster().sendMessage("radius",row.dispName);
break;
case "addAsFriend":
radius.getRoster().addRadiusFriend(row.dispName);
break;
}
return true;
},updateTreeArea:function(now){
if(radius.windows.rosterWin&&(this.invalidateTreeArea||now)){
radius.windows.rosterWin.treeArea.update();
this.invalidateTreeArea=false;
}
},_:0});


dojo.provide("radius.widget.RosterWindow");
radius.widget.RosterWindow=function(){
radius.widget.DefaultWindow.call(this);
};
radius.inherits(radius.widget.RosterWindow,radius.widget.DefaultWindow);
radius.extend(radius.widget.RosterWindow,{widgetType:"RosterWindow",caption:"Friends List",allowResize:true,width:202,height:550,minWidth:202,minHeight:200,centerOnOpen:false,firstPos:true,DefaultAwayMessage:"Set status message here",MaxCountAwayMessage:3,containTextInputs:true,fillInTemplate:function(){
radius.widget.RosterWindow.superclass.fillInTemplate.call(this);
this.setMinWidth(this.minWidth);
this.setMinHeight(this.minHeight);
this.attachNodes({rosterWinCanvasDomId:"canvasNode",rosterWinAwayMessageInputDomId:"awayMessageInput",rosterWinAwayMessageLabelDomId:"awayMessageLabel",rosterWinAwayMessageBtnDomId:"awayMessageBtn"});
radius.html.handleSelectionState(this.contentNode,false);
},postCreate:function(){
this.addFriendBtn=radius.widget.create("ImageButton",{name:"roster/addFriend70x18",width:70,height:18,onClick:dojo.lang.hitch(this,this.addFriendClick)},"rosterWinAddFriendBtnDomId");
this.settingsBtn=radius.widget.create("ImageButton",{name:"roster/mysettings68x18",width:68,height:18,onClick:dojo.lang.hitch(this,this.settingsClick)},"rosterWinSettingsBtnDomId");
this.helpBtn=radius.widget.create("ImageButton",{name:"roster/help41x18",width:41,height:18,onClick:dojo.lang.hitch(this,this.helpClick)},"rosterWinHelpBtnDomId");
this.treeArea=radius.widget.create("ContentArea",{hscroll:null},"rosterWinTreeAreaDomId");
this.tree=new radius.widget.RosterTree();
this.createLegacyIcons();
this.createWindowPane();
radius.widget.RosterWindow.superclass.postCreate.call(this);
},createLegacyIcons1:function(){
this.legacyIcons={"aol":radius.widget.create("LegacyIcon",{type:"aol"},radius.byId("rosterWinAOLIconDomId")),"yahoo":radius.widget.create("LegacyIcon",{type:"yahoo"},radius.byId("rosterWinYahooIconDomId")),"msn":radius.widget.create("LegacyIcon",{type:"msn"},radius.byId("rosterWinMSNIconDomId")),"gtalk":radius.widget.create("LegacyIcon",{type:"gtalk"},radius.byId("rosterWinGTalkIconDomId"))};
},createWindowPane:function(){
this.awayMessageCM=radius.widget.create("PopupMenu",{},"rosterWinAwayMessageContextMenuDomId");
this.awayMessageCM.render();
dojo.event.connectBefore(this.awayMessageCM,"onOpen",this,"onAwayMessageCMOpen");
dojo.event.connect(this.awayMessageCM,"onItemClick",this,"onAwayMessageCMClick");
this.presetMessagesMI={available:this.awayMessageCM.getItem("available"),invisible:this.awayMessageCM.getItem("invisible"),away:this.awayMessageCM.getItem("away"),busy:this.awayMessageCM.getItem("busy")};
this.customMessagesMI={custom1:this.awayMessageCM.getItem("custom1"),custom2:this.awayMessageCM.getItem("custom2"),custom3:this.awayMessageCM.getItem("custom3")};
this.addCustomMsgMI=this.awayMessageCM.getItem("add");
this.addCustomMsgMI.tnode.style.fontStyle="italic";
this.presetAwayMessagesMI={away:this.awayMessageCM.getItem("away"),busy:this.awayMessageCM.getItem("busy")};
radius.html.attachEventM(document,"onmousedown",this,"onOuterClick");
radius.html.attachEventM(window,"onscroll",this,"onOuterClick");
},clear:function(){
this.tree.clear();
this.updateLegacyIconState("aol",false);
this.updateLegacyIconState("yahoo",false);
this.updateLegacyIconState("msn",false);
this.updateLegacyIconState("gtalk",false);
},fillWindow:function(){
var _1=this.getCustomAwayMessages();
var _2=null;
this.customAwayMessages=_1[1];
if(!_2){
this.selectedStatus=this.presetMessagesMI.available;
}else{
if(this.customMessagesMI[_2]){
this.selectedStatus=this.customMessagesMI[_2];
}else{
this.selectedStatus=this.presetMessagesMI[_2];
}
}
this.selectingStatus=null;
var l=this.customAwayMessages.list.length;
this.customMessageItems={size:l};
for(var i=0;i<l;++i){
var _5=this.customAwayMessages.list[i];
this.customMessageItems[_5.id]=_5;
}
var p=0;
this.customMessagesMIByNumber={};
for(i in this.customMessagesMI){
var _5=this.customMessagesMI[i];
this.customMessagesMIByNumber[p++]=_5;
if(this.customMessageItems[_5.id]){
this.changeMenuItem(_5,this.customMessageItems[_5.id].text,true);
}else{
this.changeMenuItem(_5,"",false);
}
}
this.awayMessageCM.needResize=true;
this.changeAwayMessage(this.selectedStatus.text);
this.setCustomAwayMessages();
if(l==this.MaxCountAwayMessage){
this.awayMessageCM.itemHide(this.addCustomMsgMI.id);
}else{
this.awayMessageCM.itemShow(this.addCustomMsgMI.id);
}
this.setCustomAwayMessages();
this.tree.init();
},onAwayMessageLabelClick:function(){
if(this.presetMessagesMI[this.selectedStatus.id]&&this.customMessageItems.size==this.MaxCountAwayMessage){
return;
}
if(this.customMessageItems[this.selectedStatus.id]){
this.selectingStatus=this.selectedStatus;
this.addNewAwayMessage=false;
}else{
this.selectingStatus=this.customMessagesMIByNumber[this.customMessageItems.size];
this.awayMessageInput.value=this.DefaultAwayMessage;
this.addNewAwayMessage=true;
}
this.showInputAwayMessageBox();
},onAwayMessageInputBlur:function(){
this.inputFocus=false;
if((!this.addNewAwayMessage&&this.selectedStatus.text!=this.awayMessageInput.value)||(this.addNewAwayMessage&&this.awayMessageInput.value!=this.DefaultAwayMessage)){
this.onAwayMessageInputChange();
}else{
this.awayMessageInput.value=this.selectedStatus.text;
this.selectingStatus=null;
this.hideInputAwayMessageBox();
}
},onAwayMessageInputChange:function(){
if(this.selectingStatus==null){
return;
}
this.selectingStatus.text=this.awayMessageInput.value;
if(this.addNewAwayMessage){
this.customMessageItems.size+=1;
this.customMessageItems[this.selectingStatus.id]={id:this.selectingStatus.id,text:this.selectingStatus.text};
if(this.customMessageItems.size==this.MaxCountAwayMessage){
this.awayMessageCM.itemHide(this.addCustomMsgMI.id);
}
}else{
this.customMessageItems[this.selectingStatus.id].text=this.selectingStatus.text;
}
this.selectedStatus=this.selectingStatus;
this.changeAwayMessage(this.selectedStatus.text);
this.changeMenuItem(this.selectedStatus,this.selectedStatus.text,true);
this.selectingStatus=null;
this.setCustomAwayMessages();
this.hideInputAwayMessageBox();
this.awayMessageCM.needResize=true;
},onAwayMessageInputKeyUp:function(e){
if(!e){
e=window.event;
}
if(e.keyCode==13){
this.awayMessageInput.blur();
}
},onAwayMessageBtnClick:function(){
var n=this.awayMessageLabel;
if(!dojo.style.isShowing(n)){
n=this.awayMessageInput;
}
this.awayMessageCM.open(dojo.style.getAbsoluteX(n,true),dojo.style.getAbsoluteY(n,true)+(dojo.render.html.safari?0:dojo.style.getOuterHeight(n)));
},onOuterClick:function(e){
if(e.target==this.awayMessageInput){
return;
}
if(this.inputFocus){
this.onAwayMessageInputBlur();
}
},onAwayMessageCMOpen:function(e){
},onAwayMessageCMClick:function(e,_c){
if(_c.id==this.addCustomMsgMI.id){
this.awayMessageInput.value=this.DefaultAwayMessage;
this.selectingStatus=this.customMessagesMIByNumber[this.customMessageItems.size];
this.addNewAwayMessage=true;
this.showInputAwayMessageBox();
}else{
if(this.selectedStatus.id!=_c.id){
this.selectedStatus=_c;
this.changeAwayMessage(this.selectedS