/*
	Copyright (c) 2004-2008, The Dojo Foundation All Rights Reserved.
	Available via Academic Free License >= 2.1 OR the modified BSD license.
	see: http://dojotoolkit.org/license for details
*/

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

		http://dojotoolkit.org

	for documentation and information on getting the source.
*/

if(!dojo._hasResource["dojo.date.stamp"]){dojo._hasResource["dojo.date.stamp"]=true;dojo.provide("dojo.date.stamp");dojo.date.stamp.fromISOString=function(_1,_2){if(!dojo.date.stamp._isoRegExp){dojo.date.stamp._isoRegExp=/^(?:(\d{4})(?:-(\d{2})(?:-(\d{2}))?)?)?(?:T(\d{2}):(\d{2})(?::(\d{2})(.\d+)?)?((?:[+-](\d{2}):(\d{2}))|Z)?)?$/;}var _3=dojo.date.stamp._isoRegExp.exec(_1);var _4=null;if(_3){_3.shift();if(_3[1]){_3[1]--;}if(_3[6]){_3[6]*=1000;}if(_2){_2=new Date(_2);dojo.map(["FullYear","Month","Date","Hours","Minutes","Seconds","Milliseconds"],function(_5){return _2["get"+_5]();}).forEach(function(_6,_7){if(_3[_7]===undefined){_3[_7]=_6;}});}_4=new Date(_3[0]||1970,_3[1]||0,_3[2]||1,_3[3]||0,_3[4]||0,_3[5]||0,_3[6]||0);var _8=0;var _9=_3[7]&&_3[7].charAt(0);if(_9!="Z"){_8=((_3[8]||0)*60)+(Number(_3[9])||0);if(_9!="-"){_8*=-1;}}if(_9){_8-=_4.getTimezoneOffset();}if(_8){_4.setTime(_4.getTime()+_8*60000);}}return _4;};dojo.date.stamp.toISOString=function(_a,_b){var _=function(n){return (n<10)?"0"+n:n;};_b=_b||{};var _e=[];var _f=_b.zulu?"getUTC":"get";var _10="";if(_b.selector!="time"){var _11=_a[_f+"FullYear"]();_10=["0000".substr((_11+"").length)+_11,_(_a[_f+"Month"]()+1),_(_a[_f+"Date"]())].join("-");}_e.push(_10);if(_b.selector!="date"){var _12=[_(_a[_f+"Hours"]()),_(_a[_f+"Minutes"]()),_(_a[_f+"Seconds"]())].join(":");var _13=_a[_f+"Milliseconds"]();if(_b.milliseconds){_12+="."+(_13<100?"0":"")+_(_13);}if(_b.zulu){_12+="Z";}else{if(_b.selector!="time"){var _14=_a.getTimezoneOffset();var _15=Math.abs(_14);_12+=(_14>0?"-":"+")+_(Math.floor(_15/60))+":"+_(_15%60);}}_e.push(_12);}return _e.join("T");};}if(!dojo._hasResource["dojo.parser"]){dojo._hasResource["dojo.parser"]=true;dojo.provide("dojo.parser");dojo.parser=new function(){var d=dojo;var _17=d._scopeName+"Type";var qry="["+_17+"]";function val2type(_19){if(d.isString(_19)){return "string";}if(typeof _19=="number"){return "number";}if(typeof _19=="boolean"){return "boolean";}if(d.isFunction(_19)){return "function";}if(d.isArray(_19)){return "array";}if(_19 instanceof Date){return "date";}if(_19 instanceof d._Url){return "url";}return "object";};function str2obj(_1a,_1b){switch(_1b){case "string":return _1a;case "number":return _1a.length?Number(_1a):NaN;case "boolean":return typeof _1a=="boolean"?_1a:!(_1a.toLowerCase()=="false");case "function":if(d.isFunction(_1a)){_1a=_1a.toString();_1a=d.trim(_1a.substring(_1a.indexOf("{")+1,_1a.length-1));}try{if(_1a.search(/[^\w\.]+/i)!=-1){_1a=d.parser._nameAnonFunc(new Function(_1a),this);}return d.getObject(_1a,false);}catch(e){return new Function();}case "array":return _1a?_1a.split(/\s*,\s*/):[];case "date":switch(_1a){case "":return new Date("");case "now":return new Date();default:return d.date.stamp.fromISOString(_1a);}case "url":return d.baseUrl+_1a;default:return d.fromJson(_1a);}};var _1c={};function getClassInfo(_1d){if(!_1c[_1d]){var cls=d.getObject(_1d);if(!d.isFunction(cls)){throw new Error("Could not load class '"+_1d+"'. Did you spell the name correctly and use a full path, like 'dijit.form.Button'?");}var _1f=cls.prototype;var _20={};for(var _21 in _1f){if(_21.charAt(0)=="_"){continue;}var _22=_1f[_21];_20[_21]=val2type(_22);}_1c[_1d]={cls:cls,params:_20};}return _1c[_1d];};this._functionFromScript=function(_23){var _24="";var _25="";var _26=_23.getAttribute("args");if(_26){d.forEach(_26.split(/\s*,\s*/),function(_27,idx){_24+="var "+_27+" = arguments["+idx+"]; ";});}var _29=_23.getAttribute("with");if(_29&&_29.length){d.forEach(_29.split(/\s*,\s*/),function(_2a){_24+="with("+_2a+"){";_25+="}";});}return new Function(_24+_23.innerHTML+_25);};this.instantiate=function(_2b){var _2c=[];d.forEach(_2b,function(_2d){if(!_2d){return;}var _2e=_2d.getAttribute(_17);if((!_2e)||(!_2e.length)){return;}var _2f=getClassInfo(_2e);var _30=_2f.cls;var ps=_30._noScript||_30.prototype._noScript;var _32={};var _33=_2d.attributes;for(var _34 in _2f.params){var _35=_33.getNamedItem(_34);if(!_35||(!_35.specified&&(!dojo.isIE||_34.toLowerCase()!="value"))){continue;}var _36=_35.value;switch(_34){case "class":_36=_2d.className;break;case "style":_36=_2d.style&&_2d.style.cssText;}var _37=_2f.params[_34];_32[_34]=str2obj(_36,_37);}if(!ps){var _38=[],_39=[];d.query("> script[type^='dojo/']",_2d).orphan().forEach(function(_3a){var _3b=_3a.getAttribute("event"),_2e=_3a.getAttribute("type"),nf=d.parser._functionFromScript(_3a);if(_3b){if(_2e=="dojo/connect"){_38.push({event:_3b,func:nf});}else{_32[_3b]=nf;}}else{_39.push(nf);}});}var _3d=_30["markupFactory"];if(!_3d&&_30["prototype"]){_3d=_30.prototype["markupFactory"];}var _3e=_3d?_3d(_32,_2d,_30):new _30(_32,_2d);_2c.push(_3e);var _3f=_2d.getAttribute("jsId");if(_3f){d.setObject(_3f,_3e);}if(!ps){d.forEach(_38,function(_40){d.connect(_3e,_40.event,null,_40.func);});d.forEach(_39,function(_41){_41.call(_3e);});}});d.forEach(_2c,function(_42){if(_42&&_42.startup&&!_42._started&&(!_42.getParent||!_42.getParent())){_42.startup();}});return _2c;};this.parse=function(_43){var _44=d.query(qry,_43);var _45=this.instantiate(_44);return _45;};}();(function(){var _46=function(){if(dojo.config["parseOnLoad"]==true){dojo.parser.parse();}};if(dojo.exists("dijit.wai.onload")&&(dijit.wai.onload===dojo._loaders[0])){dojo._loaders.splice(1,0,_46);}else{dojo._loaders.unshift(_46);}})();dojo.parser._anonCtr=0;dojo.parser._anon={};dojo.parser._nameAnonFunc=function(_47,_48){var jpn="$joinpoint";var nso=(_48||dojo.parser._anon);if(dojo.isIE){var cn=_47["__dojoNameCache"];if(cn&&nso[cn]===_47){return _47["__dojoNameCache"];}}var ret="__"+dojo.parser._anonCtr++;while(typeof nso[ret]!="undefined"){ret="__"+dojo.parser._anonCtr++;}nso[ret]=_47;return ret;};}if(!dojo._hasResource["xandmail.rpc.Ajax"]){dojo._hasResource["xandmail.rpc.Ajax"]=true;dojo.provide("xandmail.rpc.Ajax");dojo.declare("xandmail.rpc.Ajax",null,{callback:null,errorCallBack:null,timeout:100,method:null,status:0,statusText:"",xhr:null,responseMimeType:"",getXhr:function(){var xhr=null;XMLHTTP_ACTIVEXNAME=["Msxml2.XMLHTTP","Microsoft.XMLHTTP","Msxml2.XMLHTTP.4.0"];if(window.XMLHttpRequest){xhr=new XMLHttpRequest();}else{if(window.ActiveXObject){for(var i=0;i<3;++i){try{xhr=new ActiveXObject(XMLHTTP_ACTIVEXNAME[i]);}catch(e){continue;}}}}return xhr;},abort:function(){if((this.xhr)&&(this.xhr.readyState!=0)){this.xhr.onreadystatechange=null;this.xhr.abort();}},requestOk:function(xhr){var _50=xhr["status"];return Boolean((!_50)||((200<=_50)&&(_50<300)));},getMimeTypeFromCntType:function(_51){if(!_51){return "";}pos=_51.indexOf(";");if(pos!=-1){_51=_51.substring(0,pos);_51=_51.replace(/ /g,"");}return _51.toLowerCase();},request:function(uri,_53){this.xhr=this.getXhr();var _54=this;if(!this.method){this.method="GET";}url=uri;var _55=uri.split("?");if(this.method=="POST"&&_55.length>1){url=_55[0];_53=_55[1]+((_53&&_53.length>0)?"&"+_53:"");}if((this.method=="GET")&&(_53)){_53=null;}if(this.callback){this.xhr.onreadystatechange=function(){if(_54.xhr.readyState==4){var _56=false;_54.responseMimeType=_54.getMimeTypeFromCntType(_54.xhr.getResponseHeader("Content-Type"));if(_54.requestOk(_54.xhr)==false){_54.status=_54.xhr.status;_54.statusText=_54.xhr.statusText;}try{if(_54.responseMimeType=="text/xml"||_54.responseMimeType=="application/xml"){_56=_54.xhr.responseXML;}else{_56=_54.xhr.responseText;}}catch(err){}_54.callback(_56,_54);}};}this.xhr.open(this.method,url,this.callback?true:false);if(this.cntType){this.xhr.setRequestHeader("Content-Type",this.cntType);}else{if(this.method=="POST"){this.xhr.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=utf-8");}}try{this.xhr.send(_53);if(this.callback){return null;}if(this.requestOk(this.xhr)==false){this.status=this.xhr.status;if(this.errorCallBack){this.errorCallBack();return false;}}this.responseMimeType=this.getMimeTypeFromCntType(this.xhr.getResponseHeader("Content-Type"));}catch(e){throw e;}var _57=false;try{if(this.responseMimeType=="text/xml"||this.responseMimeType=="application/xml"){_57=this.xhr.responseXML;}else{_57=this.xhr.responseText;}}catch(err){}return _57;}});}if(!dojo._hasResource["dojo.i18n"]){dojo._hasResource["dojo.i18n"]=true;dojo.provide("dojo.i18n");dojo.i18n.getLocalization=function(_58,_59,_5a){_5a=dojo.i18n.normalizeLocale(_5a);var _5b=_5a.split("-");var _5c=[_58,"nls",_59].join(".");var _5d=dojo._loadedModules[_5c];if(_5d){var _5e;for(var i=_5b.length;i>0;i--){var loc=_5b.slice(0,i).join("_");if(_5d[loc]){_5e=_5d[loc];break;}}if(!_5e){_5e=_5d.ROOT;}if(_5e){var _61=function(){};_61.prototype=_5e;return new _61();}}throw new Error("Bundle not found: "+_59+" in "+_58+" , locale="+_5a);};dojo.i18n.normalizeLocale=function(_62){var _63=_62?_62.toLowerCase():dojo.locale;if(_63=="root"){_63="ROOT";}return _63;};dojo.i18n._requireLocalization=function(_64,_65,_66,_67){var _68=dojo.i18n.normalizeLocale(_66);var _69=[_64,"nls",_65].join(".");var _6a="";if(_67){var _6b=_67.split(",");for(var i=0;i<_6b.length;i++){if(_68["indexOf"](_6b[i])==0){if(_6b[i].length>_6a.length){_6a=_6b[i];}}}if(!_6a){_6a="ROOT";}}var _6d=_67?_6a:_68;var _6e=dojo._loadedModules[_69];var _6f=null;if(_6e){if(dojo.config.localizationComplete&&_6e._built){return;}var _70=_6d.replace(/-/g,"_");var _71=_69+"."+_70;_6f=dojo._loadedModules[_71];}if(!_6f){_6e=dojo["provide"](_69);var _72=dojo._getModuleSymbols(_64);var _73=_72.concat("nls").join("/");var _74;dojo.i18n._searchLocalePath(_6d,_67,function(loc){var _76=loc.replace(/-/g,"_");var _77=_69+"."+_76;var _78=false;if(!dojo._loadedModules[_77]){dojo["provide"](_77);var _79=[_73];if(loc!="ROOT"){_79.push(loc);}_79.push(_65);var _7a=_79.join("/")+".js";_78=dojo._loadPath(_7a,null,function(_7b){var _7c=function(){};_7c.prototype=_74;_6e[_76]=new _7c();for(var j in _7b){_6e[_76][j]=_7b[j];}});}else{_78=true;}if(_78&&_6e[_76]){_74=_6e[_76];}else{_6e[_76]=_74;}if(_67){return true;}});}if(_67&&_68!=_6a){_6e[_68.replace(/-/g,"_")]=_6e[_6a.replace(/-/g,"_")];}};(function(){var _7e=dojo.config.extraLocale;if(_7e){if(!_7e instanceof Array){_7e=[_7e];}var req=dojo.i18n._requireLocalization;dojo.i18n._requireLocalization=function(m,b,_82,_83){req(m,b,_82,_83);if(_82){return;}for(var i=0;i<_7e.length;i++){req(m,b,_7e[i],_83);}};}})();dojo.i18n._searchLocalePath=function(_85,_86,_87){_85=dojo.i18n.normalizeLocale(_85);var _88=_85.split("-");var _89=[];for(var i=_88.length;i>0;i--){_89.push(_88.slice(0,i).join("-"));}_89.push(false);if(_86){_89.reverse();}for(var j=_89.length-1;j>=0;j--){var loc=_89[j]||"ROOT";var _8d=_87(loc);if(_8d){break;}}};dojo.i18n._preloadLocalizations=function(_8e,_8f){function preload(_90){_90=dojo.i18n.normalizeLocale(_90);dojo.i18n._searchLocalePath(_90,true,function(loc){for(var i=0;i<_8f.length;i++){if(_8f[i]==loc){dojo["require"](_8e+"_"+loc);return true;}}return false;});};preload();var _93=dojo.config.extraLocale||[];for(var i=0;i<_93.length;i++){preload(_93[i]);}};}if(!dojo._hasResource["xandmail.rpc"]){dojo._hasResource["xandmail.rpc"]=true;dojo.provide("xandmail.rpc");xandmail.rpc.instance=function(_95,_96,_97){function rpcObject(_98,_99,_9a){var xfm=dojo.global["xfm"];this.url=_98["url"]?_98["url"]:xfm.getRequest(_98["serviceName"],_98["serviceMethod"],_98["serviceExtraArgs"]?_98["serviceExtraArgs"]:{});this.content=_98["content"]?_98["content"]:undefined;this.sync=_98["sync"]?_98["sync"]:false;this.muteRequest=_98["hideActivity"]?_98["hideActivity"]:false;this.ajaxRequest=new xandmail.rpc.Ajax();this.ajaxRequest.method=_98["method"]?_98["method"]:"GET";this.load=_98["load"];this.requestedMimeType=_98["mimetype"]?_98["mimetype"]:null;this.httpParams=_99;this.msgCallback=_9a;this.requestParams=_98;this.messages=dojo.i18n.getLocalization("xandmail","rpc",this.lang);if(!this.requestedMimeType){if(_98["url"]){this.requestedMimeType="text/html";}else{this.requestedMimeType="application/json";}}var _9c=this;this._postProcess=function(_9d){var _9e=null;if((_9c.msgCallback)&&(_9c.msgCallback.doneMsg)){_9c.msgCallback.doneMsg(_9c.muteRequest);}if(_9c.ajaxRequest.status){if((_9c.msgCallback)&&(_9c.msgCallback.errorMsg)){var _9f=_9c.messages[_9c.ajaxRequest.status]||_9c.ajaxRequest.statusText;_9c.msgCallback.errorMsg(_9c.messages.connectionError,_9c.ajaxRequest.status,_9f);}return;}if(_9c.requestedMimeType=="application/json"){try{_9e=xandmail.rpc.evalJson(_9d);if(_9e.status&&_9e.status.err_code){var _a0=xandmail.rpc.getJsonErrorHandler(_9e.status.err_code);var _a1=true;if(_a0){try{_a1=_a0(_9e,_9c.requestParams);}catch(e){console.log("jsonErrorHandler error:"+e);}}if(_a1){if((_9c.msgCallback)&&(_9c.msgCallback.errorMsg)){var _a2=_9e.status.err_text?_9e.status.err_text:xandmail.rpc.getExtErrorText(_9e.status.err_code);_9c.msgCallback.errorMsg(_9c.messages.error,_9e.status.err_code,_a2);}}if(_9e.status.err_code==5006||_9e.status.err_code==5007||_9e.status.err_code==1093){redirect=function(){var cnx=xfm.conf.indexPage;if(cnx){top.location.href=cnx;}else{top.location.href=xfm.rootUrl+"/"+"index.html";}};setTimeout("redirect()",4000);return;}}else{for(var key in xandmail.rpc.jsonEventHandler){if((_9e[key])&&(xandmail.rpc.jsonEventHandler[key])){try{xandmail.rpc.jsonEventHandler[key](_9e);}catch(e){console.log("jsonEventHandler error:"+e);}}}}}catch(e){if((_9c.msgCallback)&&(_9c.msgCallback.errorMsg)){_9c.msgCallback.errorMsg(_9c.messages.error,1,_9c.messages.interpretresponse);}return;}}else{_9e=_9d;}_9c.load(_9e,_9c);delete _9c.ajaxRequest;_9c.ajaxRequest=null;};this.abort=function(){if((_9c.msgCallback)&&(_9c.msgCallback.doneMsg)){_9c.msgCallback.doneMsg(_9c.muteRequest);}if(_9c.ajaxRequest){_9c.ajaxRequest.abort();}delete _9c.ajaxRequest;_9c.ajaxRequest=null;};if((this.msgCallback)&&(this.msgCallback.loadingMsg)){this.msgCallback.loadingMsg(this.muteRequest);}if(this.sync){var _9c=this;_9c._postProcess(_9c.ajaxRequest.request(_9c.url,_9c.httpParams));}else{this.ajaxRequest.callback=this._postProcess;this.ajaxRequest.request(this.url,this.httpParams);}};var rpc=new rpcObject(_95,_96,_97);return rpc;};xandmail.rpc.evalJson=function(str){if(str!=""){return eval("("+str+")");}return "";};xandmail.rpc.getRequest=function(_a7,_a8,_a9,_aa){nocache="&nocache="+Math.random()*1000000;function arg(){var _ab=null;var _ac=_aa;if((!_aa)||(arguments.length==0)){return "";}try{for(var i=0;i<arguments.length;i++){_ac=_ac[arguments[i]];}_ab=_ac;}catch(e){console.debug(arguments[i]+" not found.");}if(_ab==null){return "";}return testHttpData(_ab);};function httpArray(_ae,_af){if((!_aa)||(!_aa[_af])){return "";}var ar=_aa[_af];var ret="";for(var i=0;i<ar.length;++i){if(i!=0){ret+="&";}ret+=_ae+"="+testHttpData(ar[i]);}return ret;};function httpNameArray(_b3,_b4){if((!_aa)||(_aa[_b4]==null)){return "";}var ar=_aa[_b4];var _b6=_aa[_b3];var ret="";for(var i=0;i<ar.length;++i){if(i!=0){ret+="&";}ret+=_b6[i]+"="+testHttpData(ar[i]);}return ret;};function httpIdxArray(_b9,_ba,_bb){if((!_aa)||(_aa[_ba]==null)){return "";}if(!_bb){_bb=0;}var ar=_aa[_ba];var ret="";for(var i=0;i<ar.length;++i){index=_bb+i;if(ar[i]){if(ret!=""){ret+="&";}ret+=_b9+index+"="+testHttpData(ar[i]);}}return ret;};function testHttpData(_bf){if(typeof _bf=="string"){return encodeURIComponent(_bf);}else{if(typeof _bf=="undefined"){return "";}else{if(_bf===NaN){return "";}else{return _bf;}}}};function httpABIdxArray(_c0){if(!_aa){return "";}var ret="";var _c2=_aa[_c0];for(var i=0;i<_c2.length;++i){name=_c2[i].objClass=="contact"?"CID":"GID";if(i!=0){ret+="&";}ret+=name+"="+_c2[i].objectId;}return ret;};return eval(_a7[_a8][_a9]);};xandmail.rpc.jsonErrorHandler=[];xandmail.rpc.addJsonErrorHandler=function(_c4,_c5){if((!_c4)||(!_c5)){return;}xandmail.rpc.jsonErrorHandler.push({err:_c4,hdl:_c5});};xandmail.rpc.getJsonErrorHandler=function(_c6){for(i in xandmail.rpc.jsonErrorHandler){if(xandmail.rpc.jsonErrorHandler[i].err==_c6){return xandmail.rpc.jsonErrorHandler[i].hdl;break;}}return null;};xandmail.rpc.delJsonErrorHandler=function(_c7){for(i in xandmail.rpc.jsonErrorHandler){if(xandmail.rpc.jsonErrorHandler[i].err==_c7){xandmail.rpc.jsonErrorHandler.splice(i,1);break;}}};xandmail.rpc.jsonEventHandler={};xandmail.rpc.addJsonEventHandler=function(_c8,_c9){if((!_c8)||(!_c9)){return;}xandmail.rpc.jsonEventHandler[_c8]=_c9;};xandmail.rpc.getJsonEventHandler=function(_ca){if(xandmail.rpc.jsonEventHandler[_ca]){return xandmail.rpc.jsonEventHandler[_ca];}return null;};xandmail.rpc.delJsonEventHandler=function(_cb){if(xandmail.rpc.jsonEventHandler[_cb]){delete xandmail.rpc.jsonEventHandler[_cb];}};xandmail.rpc.extErrorResources={};xandmail.rpc.getExtErrorText=function(_cc){if(xandmail.rpc.extErrorResources){for(var x in xandmail.rpc.extErrorResources){if(x==_cc){return xandmail.rpc.extErrorResources[x];}}}return "";};}if(!dojo._hasResource["xandmail.xfm.DataCom"]){dojo._hasResource["xandmail.xfm.DataCom"]=true;dojo.provide("xandmail.xfm.DataCom");dojo.declare("xandmail.xfm.DataCom",null,{listeners:null,constructor:function(_ce){this.listeners=new Array();},unsubscribe:function(id){if(!this.listeners[id]){return;}delete this.listeners[id];},subscribe:function(_d0){if(!_d0.id){console.debug("DataCom : missing mandatory id");return;}if((_d0.path)&&(_d0.path.charAt(_d0.path.length-1)!="/")){_d0.path=_d0.path+"/";}this.listeners[_d0.id]=_d0;},notify:function(_d1){var _d2=this._getListeners(_d1.path);if((!_d2)||(_d2.length==0)){return;}for(var i=0;i<_d2.length;++i){if((_d2[i].action)&&(_d1.action)&&(_d2[i].action!=_d1.action)){continue;}console.debug("notify "+_d2[i].id);if(!_d2[i].callback){continue;}_d2[i].callback(_d2[i],_d1.action,_d1.params);}},_getListeners:function(_d4){function newRegExpFilter(_d5){var _d6="";var _d7="";if(_d5.charAt(0)!="*"){_d6="^";}var _d5=_d5.replace(/^\*|\*$/,"");return new RegExp(_d6+_d5);};if(!_d4){return null;}var _d8=new Array();if(dojo.isArray(_d4)){dojo.forEach(_d4,function(_d9){_d8.push(newRegExpFilter(_d9));});}else{_d8.push(newRegExpFilter(_d4));}var _da=new Array();for(var x in this.listeners){for(var i=0;i<_d8.length;++i){if(_d8[i].test(this.listeners[x].path)){_da.push(this.listeners[x]);}}}return _da;}});}if(!dojo._hasResource["xandmail.url"]){dojo._hasResource["xandmail.url"]=true;dojo.provide("xandmail.url");xandmail.url.getParam=function(url,_de){var sep=url.indexOf("?");if(sep<0){return "";}var req=url.substring(sep+1);var _e1=req.split("&");for(var i=0;i<_e1.length;i++){sep=_e1[i].indexOf("=");if(sep<0){continue;}if(_e1[i].substring(0,sep)==_de){return _e1[i].substring(sep+1);}}return "";};xandmail.url.getPath=function(url){var sep=url.indexOf("?");if(sep<0){return url;}else{return url.substring(0,sep);}};xandmail.url.addParameter=function(url,_e6){var sep=url.indexOf("?");if(sep<0){return url+"?"+_e6;}else{return url+"&"+_e6;}};}if(!dojo._hasResource["xandmail.xfm.FileDesc"]){dojo._hasResource["xandmail.xfm.FileDesc"]=true;dojo.provide("xandmail.xfm.FileDesc");dojo.declare("xandmail.xfm.FileDesc",null,{_fileIndex:null,_location:"",_rootUrl:"",_descriptors:{},_fileType:{},_version:null,_httpVersionId:"_v_",constructor:function(_e8,_e9,_ea){this._rootUrl=_e8;if(_ea){this._version=_ea;}if(_e9){this._fileIndex=this._load_descriptor(_e9);if(this._fileIndex){this._location=_e9;}}},init:function(_eb,_ec,_ed){if((!_ec)&&((_eb)&&(this._location==_eb))){return;}if(_ed){this._version=_ed;}if(this._fileIndex){delete this._fileIndex;this._fileIndex=null;}if(this._descriptors!={}){delete this._descriptors;this._descriptors={};}if(this._descriptors!={}){delete this._descriptors;this._descriptors={};}this._fileIndex=this._load_descriptor(_eb);if(this._fileIndex){this._location=_eb;}},_loadFile:function(url){if(this._version){url=xandmail.url.addParameter(url,this._httpVersionId+"="+this._version);}var req=new xandmail.rpc.Ajax();var _f0=req.request(url);delete req;return _f0;},_load_descriptor:function(_f1){if(!this._descriptors[_f1]){var _f2=this._loadFile(this._rootUrl+"/"+_f1);try{this._descriptors[_f1]=xandmail.rpc.evalJson(_f2);}catch(e){console.log("Error in "+_f1+". Bad json format : "+e);this._descriptors[_f1]=null;return null;}}var _f3="";var pos=_f1.lastIndexOf("/");if(pos){_f3=_f1.substring(0,pos);}return this._parse_descriptor(this._descriptors[_f1],_f3);},_parse_descriptor:function(_f5,_f6,_f7,_f8){var _f9=null;var _fa=null;var _fb;if(_f8){_fb=_f8;}else{_fb={};}if(!_f5){return;}if(_f5._location){if(_f5._location.substring(0,1)=="."){_f6+=_f5._location.substring(1,_f5._location.length);}else{_f6=_f5._location;}}if(_f5._types){for(var i in _f5._types){if(this._fileType[i]){console.log("File type "+i+" already described (ignored)");continue;}this._fileType[_f5._types[i]._name]=_f5._types[i];}}if(_f5._depend){if((typeof _f5._depend)=="string"){_fa=this._load_descriptor(_f5._depend);}else{_fa=this._parse_descriptor(_f5._depend,_f6,_f7);}}if(_f5._nodep){if((typeof _f5._nodep)=="string"){_f9=this._load_descriptor(_f5._nodep);}else{_f9=this._parse_descriptor(_f5._nodep,_f6,_f7);}}for(var key in _f5){switch(key){case "_location":case "_types":case "_depend":case "_nodep":continue;break;}var _fe=_f5[key];if(!_f7){if(this._isType(key)){this._parse_descriptor(_fe,_f6,key,_fb);}else{if(typeof _fe=="object"){this._parse_descriptor(_fe,_f6,_f7,_fb);}else{continue;}}}else{if(typeof _fe=="string"){if(!_fb[_f7]){_fb[_f7]={};}_fb[_f7][key]={path:_f6+"/"+_fe};}else{if(typeof _fe=="object"){this._parse_descriptor(_fe,_f6,_f7,_fb);}}}}if(_fa){for(var _ff in _fa){if((_f7)&&(_f7!=_ff)){continue;}if(!_fb[_ff]){_fb[_ff]=_fa[_ff];}else{for(var _100 in _fa[_ff]){if(!_fb[_ff][_100]){_fb[_ff][_100]=_fa[_ff][_100];}else{_fb[_ff][_100].dep=_fa[_ff][_100];}}}}}if(_f9){for(var _101 in _f9){if((_f7)&&(_f7!=_ff)){continue;}if(!_fb[_101]){_fb[_101]=_f9[_101];}else{for(var _102 in _f9[_101]){if(!_fb[_101][_102]){_fb[_101][_102]=_f9[_101][_102];}else{_fb[_101][_102]=_f9[_101][_102];}}}}}delete _fa;delete _f9;return _fb;},_isType:function(key){if(this._fileType[key]){return true;}else{return false;}},getFilePaths:function(type,key){if((!this._fileIndex[type])||(!this._fileIndex[type][key])){console.log("FileDesc : cannot find the key "+key);return false;}var _106=[];var _107=this._fileIndex[type][key];do{var path=this._rootUrl+"/"+_107.path;_106.push(path);_107=_107.dep;}while(_107);_106.reverse();return _106;},getFilePath:function(type,key){if((!this._fileIndex[type])||(!this._fileIndex[type][key])){console.log("FileDesc : cannot find the key "+key);return false;}if(this._version){return this._rootUrl+"/"+this._fileIndex[type][key].path+"?"+this._httpVersionId+"="+this._version;}else{return this._rootUrl+"/"+this._fileIndex[type][key].path;}},_getFileContent:function(path,type){var cnt=this._loadFile(path);switch(type){case "json":cnt=xandmail.rpc.evalJson(cnt);break;case "text":default:break;}return cnt;},getContent:function(type,key,_110){var sync=true;if(_110){sync=false;}if((!this._fileIndex[type])||(!this._fileIndex[type][key])){return null;}if(!this._fileIndex[type][key].content){var _112=this._fileType[type]._merge;var _113=this._fileType[type]._type;if(!_112){this._fileIndex[type][key].content=this._getFileContent(this._rootUrl+"/"+this._fileIndex[type][key].path,_113);}else{var _114=this._fileIndex[type][key];var _115=[];do{_115.push(this._getFileContent(this._rootUrl+"/"+_114.path,_113));_114=_114.dep;}while(_114);var _116=null;switch(_112){case "obj":var _117={};for(var i=(_115.length-1);i>=0;i--){var obj=_115[i];if(typeof obj!="object"){console.log("Cannot merge content of "+this._fileIndex[type][key][path]+" : Not an object.");break;}this._mergObj(obj,_117);}_116=_117;break;case "cat":_116="";for(var i=(_115.length-1);i>=0;i--){_116+=_115[i];}break;}this._fileIndex[type][key].content=_116;}}return this._fileIndex[type][key].content;},_mergObj:function(_11a,_11b){for(var _11c in _11a){if(_11b[_11c]&&_11a[_11c]&&(typeof _11b[_11c]=="object")&&(typeof _11a[_11c]=="object")){this._mergObj(_11a[_11c],_11b[_11c]);}else{_11b[_11c]=_11a[_11c];}}}});}if(!dojo._hasResource["xandmail.xfm.Xfm"]){dojo._hasResource["xandmail.xfm.Xfm"]=true;dojo.provide("xandmail.xfm.Xfm");dojo.declare("xandmail.xfm.Xfm",null,{rootUrl:null,layoutUrl:null,moduleUrl:null,mainFrame:null,sessionId:null,conf:null,display:null,services:null,modules:[],datacom:null,filedesc:null,jstpl:[],loaded:false,_evalJson:function(str){return xandmail.rpc.evalJson(str);},constructor:function(self){if(!self){reqConf=new xandmail.rpc.Ajax();pathToConf=window.name!="xfmFrame"?"../../../":"";this.conf=this._evalJson(reqConf.request(pathToConf+"xfmconf.php"));delete reqConf;this.rootUrl=this.conf.rootUrl;this.layoutUrl=this.rootUrl+"/"+this.conf.layoutBase+"/"+this.conf.theme;this.loadedScripts=[];this.loadedResources=[];this.resources=null;if(this.conf.descriptor){this.filedesc=new xandmail.xfm.FileDesc(this.rootUrl,this.conf.descriptor);}else{this.filedesc=new xandmail.xfm.FileDesc(this.rootUrl);}}else{this.rootUrl=self.rootUrl;this.layoutUrl=self.layoutUrl;this.moduleUrl=self.moduleUrl;this.sessionId=self.sessionId;this.conf=self.conf;this.display=self.display;this.services=self.services;this.modules=self.modules;this.loadedScripts=self.loadedScripts;this.loadedResources=self.loadedResources;this.resources=self.resources;this.filedesc=self.filedesc;}this.datacom=new xandmail.xfm.DataCom();},loadDescriptor:function(_11f,_120){if(_11f){if(this.conf.version){this.filedesc.init(_11f,_120,this.conf.version);}else{this.filedesc.init(_11f,_120);}}else{if(this.conf.version){this.filedesc.init(this.conf.filedesc,_120,this.conf.version);}else{this.filedesc.init(this.conf.filedesc,_120);}}this.services=this.filedesc.getContent("conf","xfmrequest");},init:function(_121,_122){this.mainFrame=_121;this.moduleUrl=this.rootUrl+"/"+_122;this.loaded=true;},rpc:function(_123,_124){return xandmail.rpc.instance(_123,_124,this.display);},addRpcJsonErrorHandler:xandmail.rpc.addJsonErrorHandler,delRpcJsonErrorHandler:xandmail.rpc.delJsonErrorHandler,getRpcJsonErrorHandler:xandmail.rpc.getJsonErrorHandler,addJsonEventHandler:xandmail.rpc.addJsonEventHandler,getJsonEventHandler:xandmail.rpc.getJsonEventHandler,delJsonEventHandler:xandmail.rpc.delJsonEventHandler,ajax:function(){var _125=new xandmail.rpc.Ajax();return _125;},getRequest:function(_126,_127,args){return xandmail.rpc.getRequest(this.services,_126,_127,args);},_appendScript:function(_129){var _12a=this.mainFrame.document;var _12b=_12a.getElementsByTagName("head");var head=null;if(!_12b){var _12d=_12a.createElement("head");head=_12a.documentElement.insertBefore(_12d,_12a.body);}else{head=_12b[_12b.length-1];}var n=_12a.createElement("script");n.type="text/javascript";head.appendChild(n);n.text=_129;},loadFileScript:function(url){if(this.loadedScripts[url]){return;}var req=new xandmail.rpc.Ajax();var path=url;var js=req.request(path);this._appendScript(js);delete req;this.loadedScripts[url]=true;},loadResource:function(_133,key){try{var _135=this.filedesc.getFilePath(_133,key);if(this.loadedResources[_135]){return this.loadedResources[_135];}var _136=this.filedesc.getContent(_133,key);if(!_136){console.log("Cannot load the script ("+_133+","+key+")");return;}this.loadedResources[_135]=_136;return _136;}catch(e){console.debug("cannot load the script "+key+" : "+e);}},loadScript:function(_137,key){try{var _139=this.filedesc.getFilePaths(_137,key);for(var i in _139){var path=_139[i];if(this.loadedScripts[path]){continue;}var _13c=this.filedesc._loadFile(path);if(!_13c){console.log("Cannot load the script ("+_137+","+key+")");return;}this._appendScript(_13c);this.loadedScripts[path]=true;}}catch(e){console.debug("cannot load the script "+key+" : "+e);}},use:function(_13d,path){try{var req=new xandmail.rpc.Ajax();var js=req.request(path);eval("this."+_13d+" = new "+js);delete req;}catch(e){console.debug(e);}},getLayoutPath:function(name){return this.layoutUrl+"/"+name;}});}if(!dojo._hasResource["xandmail.xfm.package"]){dojo._hasResource["xandmail.xfm.package"]=true;dojo.provide("xandmail.xfm.package");}dojo.i18n._preloadLocalizations("dojo.nls.mystartup",["mx","es","de","hu","ROOT","fr","it","pl","cz","ru","en","bo","xx"]);

