/*
	Copyright (c) 2004-2009, 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["ic.parser"]){dojo._hasResource["ic.parser"]=true;dojo.provide("ic.parser");dojo.mixin(ic.parser,{parse:function(_1,_2){_2=_2||{};var _3=_2.onlySelfNode?[_1]:dojo.query("[dojoType],[dojotype]",_1||dojo.body());var _4=[];for(var i=_3.length;i--;){var _6=_3[i],_7=_6.getAttribute("dojoType"),_8=dojo.getObject(_7);if(this._isParsed(_6)){continue;}this._setParsed(_6);if(!_8){console.error("Class was not found for: "+_7);continue;}if(!_6.id){_6.id=this._genUid();}var w=new _8(_6,{},_2.forceTemplated);_4.push(w);}for(var i=_4.length;i--;){var w=_4[i];try{w._init();}catch(e){console.error(e);throw new Error("Error initializing widget: "+w.declaredClass);}}for(var i=_4.length;i--;){try{var w=_4[i];w=this.decorate(w);w.startup();}catch(e){console.error(e);}}var _a=function(){var _b={};for(id in ic._instances){var w=ic._instances[id];var n=w.declaredClass;if(_b[n]){_b[n]++;}else{_b[n]=1;}}var _e=[],_f=0;for(var i in _b){_e.push({jsClass:i,cnt:_b[i]});}for(var i=0;i<_e.length;i++){for(var k=0;k<_e.length;k++){if(_e[i].cnt>_e[k].cnt){var o=_e[i];_e[i]=_e[k];_e[k]=o;}}}var tc=0;for(var i=0;i<_e.length;i++){tc+=_e[i].cnt;console.log(_e[i].jsClass+":"+_e[i].cnt);}console.log("\n\nTotal count: "+tc);console.log("================================================================");};},decorate:function(w){if(w._infoObj&&w._infoObj.jsw&&(dd=w._infoObj.jsw.decorators)){dojo.forEach(dd,function(_15){var _16=dojo.getObject(_15);w=new _16(w);});}return w;},_genUid:function(){return "fewid"+(ic.parser._uid++);},_setParsed:function(n){n.setAttribute("_parsed",true);},_isParsed:function(n){return !!n.getAttribute("_parsed");}});ic.parser._uid=0;}if(!dojo._hasResource["ic.pngfix"]){dojo._hasResource["ic.pngfix"]=true;dojo.provide("ic.pngfix");ic.pngfix={apply:function(_19,_1a){if(!dojo.isIE||dojo.isIE>6||!DD_belatedPNG){return;}console.log("Applying pngfix query=",_19,", root=",_1a);dojo.query(_19,_1a).forEach(function(_1b){DD_belatedPNG.fixPng(_1b);});}};}if(!dojo._hasResource["dojo.io.iframe"]){dojo._hasResource["dojo.io.iframe"]=true;dojo.provide("dojo.io.iframe");dojo.io.iframe={create:function(_1c,_1d,uri){if(window[_1c]){return window[_1c];}if(window.frames[_1c]){return window.frames[_1c];}var _1f=null;var _20=uri;if(!_20){if(dojo.config["useXDomain"]&&!dojo.config["dojoBlankHtmlUrl"]){console.warn("dojo.io.iframe.create: When using cross-domain Dojo builds,"+" please save dojo/resources/blank.html to your domain and set djConfig.dojoBlankHtmlUrl"+" to the path on your domain to blank.html");}_20=(dojo.config["dojoBlankHtmlUrl"]||dojo.moduleUrl("dojo","resources/blank.html"));}var _21=dojo.isIE?"<iframe name=\""+_1c+"\" src=\""+_20+"\" onload=\""+_1d+"\">":"iframe";_1f=dojo.doc.createElement(_21);with(_1f){name=_1c;setAttribute("name",_1c);id=_1c;}dojo.body().appendChild(_1f);window[_1c]=_1f;with(_1f.style){if(!(dojo.isSafari<3)){position="absolute";}left=top="1px";height=width="1px";visibility="hidden";}if(!dojo.isIE){this.setSrc(_1f,_20,true);_1f.onload=new Function(_1d);}return _1f;},setSrc:function(_22,src,_24){try{if(!_24){if(dojo.isWebKit){_22.location=src;}else{frames[_22.name].location=src;}}else{var _25;if(dojo.isIE||dojo.isWebKit>521){_25=_22.contentWindow.document;}else{if(dojo.isSafari){_25=_22.document;}else{_25=_22.contentWindow;}}if(!_25){_22.location=src;return;}else{_25.location.replace(src);}}}catch(e){console.log("dojo.io.iframe.setSrc: ",e);}},doc:function(_26){var doc=_26.contentDocument||(((_26.name)&&(_26.document)&&(document.getElementsByTagName("iframe")[_26.name].contentWindow)&&(document.getElementsByTagName("iframe")[_26.name].contentWindow.document)))||((_26.name)&&(document.frames[_26.name])&&(document.frames[_26.name].document))||null;return doc;},send:function(_28){if(!this["_frame"]){this._frame=this.create(this._iframeName,dojo._scopeName+".io.iframe._iframeOnload();");}var dfd=dojo._ioSetArgs(_28,function(dfd){dfd.canceled=true;dfd.ioArgs._callNext();},function(dfd){var _2c=null;try{var _2d=dfd.ioArgs;var dii=dojo.io.iframe;var ifd=dii.doc(dii._frame);var _30=_2d.handleAs;_2c=ifd;if(_30!="html"){if(_30=="xml"){if(dojo.isIE){dojo.query("a",dii._frame.contentWindow.document.documentElement).orphan();var _31=(dii._frame.contentWindow.document).documentElement.innerText;_31=_31.replace(/>\s+</g,"><");_31=dojo.trim(_31);var _32={responseText:_31};_2c=dojo._contentHandlers["xml"](_32);}}else{_2c=ifd.getElementsByTagName("textarea")[0].value;if(_30=="json"){_2c=dojo.fromJson(_2c);}else{if(_30=="javascript"){_2c=dojo.eval(_2c);}}}}}catch(e){_2c=e;}finally{_2d._callNext();}return _2c;},function(_33,dfd){dfd.ioArgs._hasError=true;dfd.ioArgs._callNext();return _33;});dfd.ioArgs._callNext=function(){if(!this["_calledNext"]){this._calledNext=true;dojo.io.iframe._currentDfd=null;dojo.io.iframe._fireNextRequest();}};this._dfdQueue.push(dfd);this._fireNextRequest();dojo._ioWatch(dfd,function(dfd){return !dfd.ioArgs["_hasError"];},function(dfd){return (!!dfd.ioArgs["_finished"]);},function(dfd){if(dfd.ioArgs._finished){dfd.callback(dfd);}else{dfd.errback(new Error("Invalid dojo.io.iframe request state"));}});return dfd;},_currentDfd:null,_dfdQueue:[],_iframeName:dojo._scopeName+"IoIframe",_fireNextRequest:function(){try{if((this._currentDfd)||(this._dfdQueue.length==0)){return;}var dfd=this._currentDfd=this._dfdQueue.shift();var _39=dfd.ioArgs;var _3a=_39.args;_39._contentToClean=[];var fn=dojo.byId(_3a["form"]);var _3c=_3a["content"]||{};if(fn){if(_3c){var _3d=function(_3e,_3f){var tn;if(dojo.isIE){tn=dojo.doc.createElement("<input type='hidden' name='"+_3e+"'>");}else{tn=dojo.doc.createElement("input");tn.type="hidden";tn.name=_3e;}tn.value=_3f;fn.appendChild(tn);_39._contentToClean.push(_3e);};for(var x in _3c){var val=_3c[x];if(dojo.isArray(val)&&val.length>1){var i;for(i=0;i<val.length;i++){_3d(x,val[i]);}}else{if(!fn[x]){_3d(x,val);}else{fn[x].value=val;}}}}var _44=fn.getAttributeNode("action");var _45=fn.getAttributeNode("method");var _46=fn.getAttributeNode("target");if(_3a["url"]){_39._originalAction=_44?_44.value:null;if(_44){_44.value=_3a.url;}else{fn.setAttribute("action",_3a.url);}}if(!_45||!_45.value){if(_45){_45.value=(_3a["method"])?_3a["method"]:"post";}else{fn.setAttribute("method",(_3a["method"])?_3a["method"]:"post");}}_39._originalTarget=_46?_46.value:null;if(_46){_46.value=this._iframeName;}else{fn.setAttribute("target",this._iframeName);}fn.target=this._iframeName;fn.submit();}else{var _47=_3a.url+(_3a.url.indexOf("?")>-1?"&":"?")+_39.query;this.setSrc(this._frame,_47,true);}}catch(e){dfd.errback(e);}},_iframeOnload:function(){var dfd=this._currentDfd;if(!dfd){this._fireNextRequest();return;}var _49=dfd.ioArgs;var _4a=_49.args;var _4b=dojo.byId(_4a.form);if(_4b){var _4c=_49._contentToClean;for(var i=0;i<_4c.length;i++){var key=_4c[i];for(var j=0;j<_4b.childNodes.length;j++){var _50=_4b.childNodes[j];if(_50.name==key){dojo.destroy(_50);break;}}}if(_49["_originalAction"]){_4b.setAttribute("action",_49._originalAction);}if(_49["_originalTarget"]){_4b.setAttribute("target",_49._originalTarget);_4b.target=_49._originalTarget;}}_49._finished=true;}};}if(!dojo._hasResource["dojo.AdapterRegistry"]){dojo._hasResource["dojo.AdapterRegistry"]=true;dojo.provide("dojo.AdapterRegistry");dojo.AdapterRegistry=function(_51){this.pairs=[];this.returnWrappers=_51||false;};dojo.extend(dojo.AdapterRegistry,{register:function(_52,_53,_54,_55,_56){this.pairs[((_56)?"unshift":"push")]([_52,_53,_54,_55]);},match:function(){for(var i=0;i<this.pairs.length;i++){var _58=this.pairs[i];if(_58[1].apply(this,arguments)){if((_58[3])||(this.returnWrappers)){return _58[2];}else{return _58[2].apply(this,arguments);}}}throw new Error("No match found");},unregister:function(_59){for(var i=0;i<this.pairs.length;i++){var _5b=this.pairs[i];if(_5b[0]==_59){this.pairs.splice(i,1);return true;}}return false;}});}if(!dojo._hasResource["dojox.rpc.Service"]){dojo._hasResource["dojox.rpc.Service"]=true;dojo.provide("dojox.rpc.Service");dojo.declare("dojox.rpc.Service",null,{constructor:function(smd,_5d){var url;var _5f=this;function _60(smd){smd._baseUrl=new dojo._Url(location.href,url||".")+"";_5f._smd=smd;for(var _62 in _5f._smd.services){var _63=_62.split(".");var _64=_5f;for(var i=0;i<_63.length-1;i++){_64=_64[_63[i]]||(_64[_63[i]]={});}_64[_63[_63.length-1]]=_5f._generateService(_62,_5f._smd.services[_62]);}};if(smd){if((dojo.isString(smd))||(smd instanceof dojo._Url)){if(smd instanceof dojo._Url){url=smd+"";}else{url=smd;}var _66=dojo._getText(url);if(!_66){throw new Error("Unable to load SMD from "+smd);}else{_60(dojo.fromJson(_66));}}else{_60(smd);}}this._options=(_5d?_5d:{});this._requestId=0;},_generateService:function(_67,_68){if(this[_68]){throw new Error("WARNING: "+_67+" already exists for service. Unable to generate function");}_68.name=_67;var _69=dojo.hitch(this,"_executeMethod",_68);var _6a=dojox.rpc.transportRegistry.match(_68.transport||this._smd.transport);if(_6a.getExecutor){_69=_6a.getExecutor(_69,_68,this);}var _6b=_68.returns||(_68._schema={});var _6c="/"+_67+"/";_6b._service=_69;_69.servicePath=_6c;_69._schema=_6b;_69.id=dojox.rpc.Service._nextId++;return _69;},_getRequest:function(_6d,_6e){var smd=this._smd;var _70=dojox.rpc.envelopeRegistry.match(_6d.envelope||smd.envelope||"NONE");if(_70.namedParams){if((_6e.length==1)&&dojo.isObject(_6e[0])){_6e=_6e[0];}else{var _71={};for(var i=0;i<_6d.parameters.length;i++){if(typeof _6e[i]!="undefined"||!_6d.parameters[i].optional){_71[_6d.parameters[i].name]=_6e[i];}}_6e=_71;}var _73=(_6d.parameters||[]).concat(smd.parameters||[]);if(_6d.strictParameters||smd.strictParameters){for(i in _6e){var _74=false;for(var j=0;j<_73.length;j++){if(_73[i].name==i){_74=true;}}if(!_74){delete _6e[i];}}}for(i=0;i<_73.length;i++){var _76=_73[i];if(!_76.optional&&_76.name&&!_6e[_76.name]){if(_76["default"]){_6e[_76.name]=_76["default"];}else{if(!(_76.name in _6e)){throw new Error("Required parameter "+_76.name+" was omitted");}}}}}else{if(_6d.parameters&&_6d.parameters[0]&&_6d.parameters[0].name&&(_6e.length==1)&&dojo.isObject(_6e[0])){if(_70.namedParams===false){_6e=dojox.rpc.toOrdered(_6d,_6e);}else{_6e=_6e[0];}}}if(dojo.isObject(this._options)){_6e=dojo.mixin(_6e,this._options);}var _77=_6d._schema||_6d.returns;var _78=_70.serialize.apply(this,[smd,_6d,_6e]);_78._envDef=_70;var _79=(_6d.contentType||smd.contentType||_78.contentType);return dojo.mixin(_78,{sync:dojox.rpc._sync,contentType:_79,headers:{},target:_78.target||dojox.rpc.getTarget(smd,_6d),transport:_6d.transport||smd.transport||_78.transport,envelope:_6d.envelope||smd.envelope||_78.envelope,timeout:_6d.timeout||smd.timeout,callbackParamName:_6d.callbackParamName||smd.callbackParamName,schema:_77,handleAs:_78.handleAs||"auto",preventCache:_6d.preventCache||smd.preventCache,frameDoc:this._options.frameDoc||undefined});},_executeMethod:function(_7a){var _7b=[];var i;for(i=1;i<arguments.length;i++){_7b.push(arguments[i]);}var _7d=this._getRequest(_7a,_7b);var _7e=dojox.rpc.transportRegistry.match(_7d.transport).fire(_7d);_7e.addBoth(function(_7f){return _7d._envDef.deserialize.call(this,_7f);});return _7e;}});dojox.rpc.getTarget=function(smd,_81){var _82=smd._baseUrl;if(smd.target){_82=new dojo._Url(_82,smd.target)+"";}if(_81.target){_82=new dojo._Url(_82,_81.target)+"";}return _82;};dojox.rpc.toOrdered=function(_83,_84){if(dojo.isArray(_84)){return _84;}var _85=[];for(var i=0;i<_83.parameters.length;i++){_85.push(_84[_83.parameters[i].name]);}return _85;};dojox.rpc.transportRegistry=new dojo.AdapterRegistry(true);dojox.rpc.envelopeRegistry=new dojo.AdapterRegistry(true);dojox.rpc.envelopeRegistry.register("URL",function(str){return str=="URL";},{serialize:function(smd,_89,_8a){var d=dojo.objectToQuery(_8a);return {data:d,transport:"POST"};},deserialize:function(_8c){return _8c;},namedParams:true});dojox.rpc.envelopeRegistry.register("JSON",function(str){return str=="JSON";},{serialize:function(smd,_8f,_90){var d=dojo.toJson(_90);return {data:d,handleAs:"json",contentType:"application/json"};},deserialize:function(_92){return _92;}});dojox.rpc.envelopeRegistry.register("PATH",function(str){return str=="PATH";},{serialize:function(smd,_95,_96){var i;var _98=dojox.rpc.getTarget(smd,_95);if(dojo.isArray(_96)){for(i=0;i<_96.length;i++){_98+="/"+_96[i];}}else{for(i in _96){_98+="/"+i+"/"+_96[i];}}return {data:"",target:_98};},deserialize:function(_99){return _99;}});dojox.rpc.transportRegistry.register("POST",function(str){return str=="POST";},{fire:function(r){r.url=r.target;r.postData=r.data;return dojo.rawXhrPost(r);}});dojox.rpc.transportRegistry.register("GET",function(str){return str=="GET";},{fire:function(r){r.url=r.target+(r.data?"?"+r.data:"");return dojo.xhrGet(r);}});dojox.rpc.transportRegistry.register("JSONP",function(str){return str=="JSONP";},{fire:function(r){r.url=r.target+((r.target.indexOf("?")==-1)?"?":"&")+r.data;r.callbackParamName=r.callbackParamName||"callback";return dojo.io.script.get(r);}});dojox.rpc.Service._nextId=1;dojo._contentHandlers.auto=function(xhr){var _a1=dojo._contentHandlers;var _a2=xhr.getResponseHeader("Content-Type");var _a3=!_a2?_a1.text(xhr):_a2.match(/\/.*json/)?_a1.json(xhr):_a2.match(/\/javascript/)?_a1.javascript(xhr):_a2.match(/\/xml/)?_a1.xml(xhr):_a1.text(xhr);return _a3;};}if(!dojo._hasResource["ic.ic"]){dojo._hasResource["ic.ic"]=true;dojo.provide("ic.ic");if(typeof ic=="undefined"){ic={};}dojo.mixin(ic,{_instances:{},getPage:function(){return this._page;},setPage:function(_a4){this._page=_a4;},byId:function(id){return this._instances[id];},byNode:function(_a6){if(!_a6.id){return null;}return this._instances[_a6.id];},isEmpty:function(o){if(o==null){return true;}if(typeof o=="string"&&o.length>0){return false;}for(var p in o){if(o[p]!=undefined&&!dojo.isFunction(o[p])){return false;}}return true;},toggleState:function(_a9,_aa,_ab){dojo.forEach(_a9,function(w){w.updateState(_ab,false);});_aa.updateState(_ab,true);},disconnect:function(hdl){if(!hdl){return;}if(!dojo.isArray(hdl)){hdl=[hdl];}dojo.forEach(hdl,dojo.disconnect);},setupDefaultIoFrame:function(){var dif=dojo.io.iframe;dif._frame=dif.create(dif._iframeName,"dojo.io.iframe._iframeOnload();");},fixIERoundH:function(el){return (dojo.isIE<8)?-el.offsetWidth%2+"px":"0";},fixIERoundV:function(el){return (dojo.isIE<8)?-el.offsetHeight%2+"px":"0";}});ic.DS_CONFIG={};dojo.mixin(ic.DS_CONFIG,{ATTACHMENT:{uid:"ds-attach",fetch:{},save:{url:"/contacts/updateAttach"},remove:{url:"/contacts/deleteAttach"}},SETTINGS:{uid:"ds-settings",fetch:{url:"/contacts/getContactDetails?settings=true",responseName:"cdetails"},save:{url:"/contacts/saveProfile",trigger:[{P:"RATING",params:["RATING","I"],url:"/contacts/saveRating"},{P:"CLICK2CALL",params:["CLICK2CALL","SYNCIN","SYNCOUT","DEFAULT_CONTACTS_VIEW","PUBLISH_CALENDAR","TIMEZONE","DISABLE_POPUP_HELP","GFS","DSD"],url:"/settings/updateusersettings"}]},responseName:"cdetails"},CLICK2CALL_SETTINGS:{uid:"ds-click2call-settings",fetch:{url:"/settings/getusersettings"}},SECURITY:{uid:"ds-security",fetch:{url:"/contacts/getUsersAndGroups"},save:{url:"/contacts/savePermissions"}},CONTACTS:{uid:"ds-contacts",fetch:{url:"/contacts/getContactList",responseName:"contacts"},load:{url:"/contacts/getContactDetails",responseName:"cdetails",converter:"ic.data.ContactConverter"},save:{url:"/contacts/saveProfile",trigger:[{P:"NOTE",params:["NOTE","I"],url:"/contacts/saveNote"},{P:"TAG",params:["TAG","I"],url:"/contacts/saveTags"},{P:"TAGSBULK",params:["TAGSBULK"],url:"/contacts/addTags"},{P:"RATING",params:["RATING","I"],url:"/contacts/saveRating"}]},remove:{url:"/contacts/deleteContact"},removeBulk:{url:"/contacts/deleteContacts"},idName:"I"},CONTACTS1:{uid:"ds-contacts1",fetch:{url:"/contacts/getContactList",responseName:"contacts"},load:{url:"/contacts/getContactDetails",responseName:"cdetails",converter:"ic.data.ContactConverter"},save:{url:"/contacts/saveProfile",trigger:[{P:"NOTE",params:["NOTE","I"],url:"/contacts/saveNote"},{P:"TAG",params:["TAG","I"],url:"/contacts/saveTags"},{P:"TAGSBULK",params:["TAGSBULK"],url:"/contacts/addTags"},{P:"RATING",params:["RATING","I"],url:"/contacts/saveRating"}]},remove:{url:"/contacts/deleteContact"},removeBulk:{url:"/contacts/deleteContacts"},idName:"I"},TAGS:{uid:"ds-tags",fetch:{url:"/contacts/getGlobalTags",responseName:"TAG"},save:{url:"/contacts/saveTags"}},HISTORY:{uid:"ds-history",fetch:{url:"/contacts/getContactJournal",responseName:"journal"},load:{url:"/contacts/getContactJournal",responseName:"journal",idName:"jid"},save:{url:"/contacts/saveJournal"},remove:{url:"/contacts/deleteJournal"},idName:"I"},TASKS:{uid:"ds-tasks",fetch:{url:"/tasks/getTasks",responseName:"tasks"},save:{url:"/tasks/saveTask",trigger:[{P:"TASKLISTID",params:["TASKLISTID","TASKID"],url:"/tasks/saveDrop"}]},remove:{url:"/tasks/removeTask"}},TASKLISTS:{uid:"ds-tasklists",fetch:{url:"/tasks/getTaskList",responseName:"tasklist"},save:{url:"/tasks/saveList"},remove:{url:"/tasks/removeList"}},TASKCONTACTS:{uid:"ds-taskcontacts",fetch:{url:"/tasks/getContactList",responseName:"tips"}},TASKSOVERVIEW:{uid:"ds-tasksoverview",fetch:{url:"/tasks/getTasks?overview=true",responseName:"overview"}},LOGIN:{uid:"ds-login",fetch:{url:"/account/forgotPassword",responseName:"result"}},DASH_HISTORY:{uid:"ds-dashboard-history",fetch:{url:"/narration/getNarrations",responseName:"journal"}},SUMMARY:{uid:"ds-summary",fetch:{url:"/dashboard/getSummary",responseName:"summary"},autoActivate:true},CONTACTUS:{uid:"ds-contactus",fetch:{},save:{url:"/about/contactUs"}},INVOICES:{uid:"ds-invoices",fetch:{url:"/invoice/getInvoices?sortby=status",responseName:"invoices"}},SERVICE_HISTORY:{uid:"ds-servicehistory",fetch:{url:"/account/getServiceHistory",responseName:"history"}},CALLRECORDS:{uid:"ds-callrecords",fetch:{url:"/narration/getNarrations",responseName:"journal"}},USERS:{uid:"ds-users",fetch:{url:"/users/getUsers",responseName:"users"},save:{url:"/users/createUser"},remove:{url:"/users/removeUser"}},SECPAY:{uid:"ds-secpay",save:{url:"/secpay/process"}},UPGRADE:{uid:"ds-upgrade",fetch:{url:"/contacts/getContactDetails?settings=true",responseName:"cdetails"},save:{url:"/account/modifyClient",responseName:"payment"}},ALL_PACKAGES:{uid:"ds-allpackages",fetch:{url:"/settings/getAllPackages",responseName:"packages"}},PAYMENT_DETAILS:{uid:"ds-paymentdetails",fetch:{url:"/invoice/getPaymentDetails",responseName:"payment"}},VOIPLINES:{uid:"ds-voiplines",fetch:{url:"/telephony/getVoipLines",responseName:"lines"}},VOIPFREENUMBERS:{uid:"ds-voipfreenumbers",fetch:{url:"/telephony/getFreeNumbers",responseName:"Numbers"}},VOIPPSTNPROVISIONING:{uid:"ds-voippstnprovisioning",fetch:{url:"/telephony/getProvisionedNumbers",responseName:"Numbers"},save:{url:"/telephony/provisionNumber"}},FAXTOEMAIL:{uid:"ds-faxtoemail",fetch:{url:"/telephony/getFaxToEmail",responseName:"faxtoemail"},save:{url:"/telephony/modifyFaxExtension"}},EXTENSION:{uid:"ds-extension",fetch:{url:"/telephony/getExtension",responseName:"extension"},save:{url:"/telephony/modifyExtension"}},COMPONENTS:{uid:"ds-components",fetch:{url:"/components/getComponents",responseName:"components"}}});dojo.addOnLoad(function(){(function(){var _b1=arguments.callee;dojo.xhrGet({url:"/settings/ping",preventCache:true,handle:function(){setTimeout(_b1,600000);}});})();});}if(!dojo._hasResource["dojo.string"]){dojo._hasResource["dojo.string"]=true;dojo.provide("dojo.string");dojo.string.rep=function(str,num){if(num<=0||!str){return "";}var buf=[];for(;;){if(num&1){buf.push(str);}if(!(num>>=1)){break;}str+=str;}return buf.join("");};dojo.string.pad=function(_b5,_b6,ch,end){if(!ch){ch="0";}var out=String(_b5),pad=dojo.string.rep(ch,Math.ceil((_b6-out.length)/ch.length));return end?out+pad:pad+out;};dojo.string.substitute=function(_bb,map,_bd,_be){_be=_be||dojo.global;_bd=(!_bd)?function(v){return v;}:dojo.hitch(_be,_bd);return _bb.replace(/\$\{([^\s\:\}]+)(?:\:([^\s\:\}]+))?\}/g,function(_c0,key,_c2){var _c3=dojo.getObject(key,false,map);if(_c2){_c3=dojo.getObject(_c2,false,_be).call(_be,_c3,key);}return _bd(_c3,key).toString();});};dojo.string.trim=String.prototype.trim?dojo.trim:function(str){str=str.replace(/^\s+/,"");for(var i=str.length-1;i>=0;i--){if(/\S/.test(str.charAt(i))){str=str.substring(0,i+1);break;}}return str;};}if(!dojo._hasResource["ic.widget._Widget"]){dojo._hasResource["ic.widget._Widget"]=true;dojo.provide("ic.widget._Widget");dojo.declare("ic.widget._Widget",null,{domNode:null,id:null,_infoObj:null,_attachedPoints:null,constructor:function(_c6,_c7,_c8){if(!_c6){_c6=this._createNode(_c7);}this._attachedPoints=[];if(_c6&&_c8&&(this.templateString||this.templatePath)){var p={};for(var i=_c6.attributes.length;i--;){p[_c6.attributes.item(i).nodeName.toLowerCase()]=_c6.attributes.item(i).nodeValue;}_node=this._createNode(p);_c6.parentNode.replaceChild(_node,_c6);_c6=_node;}this.domNode=_c6;this.id=_c6.id;this._initDataSource();ic._instances[this.id]=this;return this.domNode;},_init:function(){if(v=this.domNode.getAttribute("icWJSInfo")){this._infoObj=dojo.fromJson(v.replace(/&#123;/ig,"{").replace(/&#125;/ig,"}"));this._attachNodes(this._infoObj.nodes||[]);this._attachEvents(this._infoObj.events||[]);}},_createNode:function(_cb){if(!this.templateString&&this.templatePath){this.templateString=dojo._getText(this.templatePath);}var div=document.createElement("div");div.innerHTML=dojo.string.substitute(this.templateString,_cb,function(v,k){return v||"";});var _cf=div.firstChild;for(var _d0 in _cb){if(!_cb[_d0]){continue;}var _d1=_d0.toLowerCase();if(_d1=="dojoattachpoint"||_d1=="dojoattachevent"){continue;}else{if(_d1=="class"){_cf.className=(_cf.className?_cf.className+" ":"")+_cb[_d0];}else{_cf[_d0]=""+_cb[_d0];_cf.setAttribute(_d0,""+_cb[_d0]);}}}ic.parser.parse(div.firstChild,{forceTemplated:true});var _d2=dojo.query("[dojoAttachPoint],[dojoattachpoint],[dojoAttachEvent],[dojoattachevent]",div);dojo.forEach(_d2,dojo.hitch(this,function(_d3){var _d4=ic.byNode(_d3)||_d3;if(p=_d3.getAttribute("dojoAttachPoint")){this[p]=_d4;_d3.removeAttribute("dojoAttachPoint");this._attachedPoints.push(p);}if(p=_d3.getAttribute("dojoAttachEvent")){var _d5=p.split(/\s*,\s*/ig);for(var i=_d5.length;i--;){var o=_d5[i].split(/\s*:\s*/ig);dojo.connect(_d4,o[0],this,o[1]);}_d3.removeAttribute("dojoAttachEvent");}}));dojo.forEach(["dojoattachpoint","dojoattachevent"],function(_d8){if(v=_cb[_d8]){_cf.setAttribute(_d8,v);}});return div.firstChild;},_attachNodes:function(_d9){for(var i=_d9.length;i--;){var o=_d9[i],p=o[1],_dd=ic.byId(o[0])||dojo.byId(o[0]);if(!_dd){continue;}if(this[p]==undefined){this[p]=_dd;}else{if(!dojo.isArray(this[p])){this[p]=[this[p]];}this[p].push(_dd);}this._attachedPoints.push(p);}},_attachEvents:function(_de){for(var i=_de.length;i--;){var o=_de[i];var _e1=(this.id==o[0]?dojo.byId(o[0]):(ic.byId(o[0])||dojo.byId(o[0])));dojo.connect(_e1,o[1],this,o[2]);}},_initDataSource:function(){if(this.dsuid=this.domNode.getAttribute("dsuid")){for(dsc in ic.DS_CONFIG){if(ic.DS_CONFIG[dsc].uid==this.dsuid){this.ds=ic.data.create(ic.DS_CONFIG[dsc],this.dsuid);}}}},startup:function(){},onAfterStartup:function(){},getDataSource:function(){return this.ds;},get:function(_e2){return this.domNode.getAttribute(_e2);},set:function(_e3,v){this.domNode.setAttribute(_e3,v);},show:function(){ic.html.show(this.domNode);},hide:function(){ic.html.hide(this.domNode);},focus:function(){if(this.domNode.focus){this.domNode.focus();}},setContent:function(_e5){if(!this.contentNode){throw new Error("Error setting content. Content node is undefined for: "+this.declaredClass);}this.contentNode.innerHTML=_e5;},attachTemplateFromNode:function(_e6,_e7){this[_e6]=this.decodeVariables(_e7.innerHTML);_e7.parentNode.removeChild(_e7);},decodeVariables:function(v){return v?v.replace(/\$&(?:amp;)?#123;(.*?)&(?:amp;)?#125;/ig,"${$1}"):"";}});}if(!dojo._hasResource["ic.data.DAO"]){dojo._hasResource["ic.data.DAO"]=true;dojo.provide("ic.data.DAO");dojo.declare("ic.data.DAO",null,{_config:{save:"",load:"",xpath:"",ppath:"",prefix:"",type:""},_loaded:false,_updated:null,_data:null,_keys:null,constructor:function(){this._data={};this._keys={};},load:function(){return dojo.xhrGet({url:this._config.load,handleAs:"json",preventCache:true,content:{returnType:"json"}}).addCallback(this,"onLoad");},save:function(){var _e9=this.getJsonRequest();if(!dojo.isArray(_e9)){_e9=[_e9];}return dojo.xhrPost({url:this._config.save,handleAs:"json",preventCache:true,content:{content:dojo.toJson({content:_e9})}}).addCallback(this,"onSave");},getJsonRequest:function(){return {xp:this._config.xpath,type:this._config.type,method:"append",data:this._data};},onLoad:function(res){ic.getPage().registerDAO(this);var _eb=dojo.getObject(this._config.ppath,false,res);this._data={};for(var p in _eb){this._set(p,_eb[p]||"");}return res;},onSave:function(){},_get:function(_ed){var rv=this._valueOrArray(dojo.getObject(this._toProp(_ed),false,this._data));if(rv&&dojo.isObject(rv)&&ic.isEmpty(rv)){return null;}return rv;},_set:function(_ef,_f0,_f1){if(_f1=="array"){_f0=this._arrayAsObject(_f0);}dojo.setObject(this._toProp(_ef),_f0,this._data);},_arrayAsObject:function(arr){return {_type:"array",_v:arr};},_valueOrArray:function(v){if(dojo.isObject(v)&&v["_type"]=="array"){var _v=v["_v"];return dojo.isArray(_v)?_v:[_v];}return v;},_delete:function(_f5,_f6){if((context=dojo.getObject(this._config.prefix,false,_f6||this._data))&&context[_f5]!=undefined){delete context[_f5];}},_toProp:function(_f7){return this._config.prefix+"."+_f7;},getValue:function(_f8){return this._get(_f8);},setValue:function(_f9,_fa,_fb){this._set(_f9,_fa,_fb);},__set:function(_fc){var v=_fc.value;if(_fc.type="array"){}},__get:function(_fe){}});}if(!dojo._hasResource["ic.data.UserSettings"]){dojo._hasResource["ic.data.UserSettings"]=true;dojo.provide("ic.data.UserSettings");dojo.declare("ic.data.UserSettings",[ic.data.DAO],{_config:{load:"/settings/getSettings?type=user&id=1",save:"/settings/saveSettings?type=user&id=1",ppath:"user.xml.settings",xpath:"/xml",prefix:"settings",type:"user"},onLoad:function(res){this.inherited(arguments);var _100=dojo.getObject(this._config.ppath,false,res);this._set("globalTags",dojo.getObject("user.xml.globalTags",false,res));this._set("id",dojo.getObject("user.id",false,res));return res;},isStartupDialogueEnabled:function(){return !this._get("disableStartupDialogue");},isOpenCreatedContact:function(){return !this._get("dontOpenContact");},isAlertDialogueEnabled:function(){return !!this._get("enableAlertDialogue");},isPopupHelpEnabled:function(){return !this._get("disablePopupHelp");},isHomeTabFirst:function(){return !!this._get("homeTabFirst");},disableAlertDialogue:function(){this._set("enableAlertDialogue","");},disableStartupDialogue:function(){this._set("disableStartupDialogue","true");},getDefaultContactsMode:function(){return this._get("defaultContactsView")||"default";},getDateBoxMode:function(){return this._get("dateBoxMode")||"calendar";},setContainerState:function(id,_102){this._set("containers."+id,_102);},getContainerState:function(id){return this._get("containers."+id);},getTags:function(){return this._get("globalTags");},setTags:function(tags){this._set("globalTags",tags,"array");},setNarrationFilters:function(_105){this._set("narrationFilters",_105);},getNarrationFilters:function(){return this._get("narrationFilters");},getContactsStartupTags:function(){return this._get("contactsStartupTags");},getId:function(){return this._get("id");},getJsonRequest:function(){var _106="globalTags",req=[],gt=this._get(_106),d=dojo.clone(this._data);gt=dojo.getObject(this._toProp(_106),false,this._data);this._delete(_106,d);req.push({type:this._config.type,xp:this._config.xpath,method:"append",data:d});req.push({type:this._config.type,xp:this._config.xpath,method:"overwrite",data:{xml:{"globalTags":gt}}});return req;}});}if(!dojo._hasResource["ic.data.ClientSettings"]){dojo._hasResource["ic.data.ClientSettings"]=true;dojo.provide("ic.data.ClientSettings");dojo.declare("ic.data.ClientSettings",[ic.data.DAO],{_config:{load:"/settings/getSettings?type=client&id=176",save:"/settings/saveSettings?type=client&id=176",ppath:"client.xml",xpath:"/",prefix:"xml",type:"client"},getGlobalFields:function(){var gf=this._get("globalFields");if(!gf||gf=="null"){return null;}return gf;},getGlobalFieldsAsArray:function(){var gf=this.getGlobalFields();if(!gf){return null;}var res=[];for(var name in gf){res.push(dojo.mixin(gf[name],{name:name}));}res=res.sort(function(a,b){return a.index-b.index;});return res;},getJsonRequest:function(){var req=[],gf=this._get("globalFields"),d=dojo.clone(this._data);this._delete("globalFields",d);req.push({type:this._config.type,xp:this._config.xpath,method:"append",data:d});req.push({type:this._config.type,xp:this._config.xpath,method:"overwrite",data:{xml:{globalFields:gf}}});return req;},onLoad:function(res){this._set("id",dojo.getObject("client.id",false,res));return this.inherited(arguments);},getPlan:function(){return this._get("plan")||"FREE";},isGlobalTagsOnly:function(){return !!this._get("onlyGlobalTags");},isFreePlan:function(){return this.getPlan()=="FREE";},getPackageId:function(){return this._get("packageid");},getClientId:function(){return this._get("id");},isExportRestricted:function(){return !!this._get("restrictExport");},isAddUserRestricted:function(){return !!this._get("restrictAddUpgrade");},isAddNumberRestricted:function(){return !!this._get("restrictAddUpgrade");},isOrganizationsFirst:function(){return !!this._get("organizationsFirst");},isAddUpgradeRestricted:function(){return !!this._get("restrictAddUpgrade");},isRestrictGlobals:function(){return !!this._get("restrictGlobals");},__tmpTestReq:function(){var req=[];req.push({type:this._config.type,xp:this._config.xpath,method:"overwrite",data:{xml:{subscriptionterms:"1"}}});return dojo.xhrPost({url:this._config.save,handleAs:"json",preventCache:true,content:{content:dojo.toJson({content:req})}}).addCallback(this,"onSave");}});}if(!dojo._hasResource["ic.data.AccountInfo"]){dojo._hasResource["ic.data.AccountInfo"]=true;dojo.provide("ic.data.AccountInfo");dojo.declare("ic.data.AccountInfo",[ic.data.DAO],{_config:{load:"/account/getAccountInfo",ppath:"account",xpath:"/xml",prefix:"settings",type:"user"},getClientId:function(){return this._get("CLIENT_ID");},getPlan:function(){return this._get("PLAN");},getPackageId:function(){var plan=this.getPlan();var _116={FREE:4,STARTER:3,ESSENTIAL:2,PREMIUM:1};return _116[plan];},isFreePlan:function(){return this.getPlan()=="FREE";},getMemberSince:function(){return this._get("MEMBER_SINCE");},getContactsCount:function(){return this._get("CONTACTS");},getUsersCount:function(){return this._get("USERS");},getNumbersCount:function(){return this._get("VOIP");},getQuota:function(){return this._get("QUOTA");},getPaidUpTo:function(){return this._get("PAIDUPTO");},getBalance:function(){return this.getServiceCreditBalance()+this.getBonusCreditBalance()+this.getPurchasedCreditBalance()+this.getInvoiceCreditBalance();},getServiceCreditBalance:function(){return this._get("SERVICECREDITBALANCE");},getBonusCreditBalance:function(){return this._get("BONUSCREDITBALANCE");},getPurchasedCreditBalance:function(){return this._get("PURCHASEDCREDITBALANCE");},getInvoiceCreditBalance:function(){return parseFloat(this._get("INVOICECREDITBALANCE"));},getSubscriptionDue:function(){return parseFloat(this._get("SUBSCRIPTION_DUE"));},getOutstandingInvoices:function(){return this._get("OUTSTANDING_INVOICES");},getLastPayment:function(){var _117=this._get("LAST_PAY");return _117=="null"?"":_117;},getNextPayment:function(){var _118=this._get("NEXT_PAY");return _118=="null"?"":_118;},hasAdminRights:function(){var v=this._get("ADMINRIGHTS");return !v||v=="false"?false:true;}});}if(!dojo._hasResource["ic.ui.DialogMixin"]){dojo._hasResource["ic.ui.DialogMixin"]=true;dojo.provide("ic.ui.DialogMixin");dojo.declare("ic.ui.DialogMixin",null,{dialog:function(_11a){if(_11a){this._dialog=_11a;}else{return this._dialog;}},open:function(){this._dialog.open();},close:function(){this._dialog.close();}});}if(!dojo._hasResource["ic.ui.PopupHelp"]){dojo._hasResource["ic.ui.PopupHelp"]=true;dojo.provide("ic.ui.PopupHelp");dojo.declare("ic.ui.PopupHelp",ic.widget._Widget,{_popupDialog:null,_isInitialized:false,_onIconClick:function(){if(!this._isInitialized){this._popupDialog.domNode.parentNode.removeChild(this._popupDialog.domNode);dojo.body().appendChild(this._popupDialog.domNode);this._isInitialized=true;}this._popupDialog.open();}});}if(!dojo._hasResource["ic.ui.v2.LazyMixin"]){dojo._hasResource["ic.ui.v2.LazyMixin"]=true;dojo.provide("ic.ui.v2.LazyMixin");dojo.declare("ic.ui.v2.LazyMixin",null,{_attrLinkHref:"lazyHref",_connectLazyInit:function(_11b){var f=dojo.hitch(this,function(_11d){dojo.xhrGet({url:this.get(this._attrLinkHref)}).addCallback(dojo.hitch(this,function(data){this.domNode.innerHTML=data;ic.parser.parse(this.domNode);this._lazyInit();})).addCallback(_11d);});var _m=this[_11b];this[_11b]=dojo.hitch(this,function(){var args=arguments,_121=this;f(function(){_m.apply(_121,args);_121[_11b]=_m;});});},_lazyInit:function(){}});}if(!dojo._hasResource["dojo.date.stamp"]){dojo._hasResource["dojo.date.stamp"]=true;dojo.provide("dojo.date.stamp");dojo.date.stamp.fromISOString=function(_122,_123){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 _124=dojo.date.stamp._isoRegExp.exec(_122);var _125=null;if(_124){_124.shift();if(_124[1]){_124[1]--;}if(_124[6]){_124[6]*=1000;}if(_123){_123=new Date(_123);dojo.map(["FullYear","Month","Date","Hours","Minutes","Seconds","Milliseconds"],function(prop){return _123["get"+prop]();}).forEach(function(_127,_128){if(_124[_128]===undefined){_124[_128]=_127;}});}_125=new Date(_124[0]||1970,_124[1]||0,_124[2]||1,_124[3]||0,_124[4]||0,_124[5]||0,_124[6]||0);var _129=0;var _12a=_124[7]&&_124[7].charAt(0);if(_12a!="Z"){_129=((_124[8]||0)*60)+(Number(_124[9])||0);if(_12a!="-"){_129*=-1;}}if(_12a){_129-=_125.getTimezoneOffset();}if(_129){_125.setTime(_125.getTime()+_129*60000);}}return _125;};dojo.date.stamp.toISOString=function(_12b,_12c){var _=function(n){return (n<10)?"0"+n:n;};_12c=_12c||{};var _12f=[];var _130=_12c.zulu?"getUTC":"get";var date="";if(_12c.selector!="time"){var year=_12b[_130+"FullYear"]();date=["0000".substr((year+"").length)+year,_(_12b[_130+"Month"]()+1),_(_12b[_130+"Date"]())].join("-");}_12f.push(date);if(_12c.selector!="date"){var time=[_(_12b[_130+"Hours"]()),_(_12b[_130+"Minutes"]()),_(_12b[_130+"Seconds"]())].join(":");var _134=_12b[_130+"Milliseconds"]();if(_12c.milliseconds){time+="."+(_134<100?"0":"")+_(_134);}if(_12c.zulu){time+="Z";}else{if(_12c.selector!="time"){var _135=_12b.getTimezoneOffset();var _136=Math.abs(_135);time+=(_135>0?"-":"+")+_(Math.floor(_136/60))+":"+_(_136%60);}}_12f.push(time);}return _12f.join("T");};}if(!dojo._hasResource["dojox.json.ref"]){dojo._hasResource["dojox.json.ref"]=true;dojo.provide("dojox.json.ref");dojox.json.ref={resolveJson:function(root,args){args=args||{};var _139=args.idAttribute||"id";var _13a=args.idPrefix||"";var _13b=args.assignAbsoluteIds;var _13c=args.index||{};var _13d=args.timeStamps;var ref,_13f=[];var _140=/^(.*\/)?(\w+:\/\/)|[^\/\.]+\/\.\.\/|^.*\/(\/)/;var _141=this._addProp;var F=function(){};function walk(it,stop,_146,_147,_148){var _149,val,id=_139 in it?it[_139]:_146;if(id!==undefined){id=(_13a+id).replace(_140,"$2$3");}var _14c=_148||it;if(id!==undefined){if(_13b){it.__id=id;}if(args.schemas&&(!(it instanceof Array))&&(val=id.match(/^(.+\/)[^\.\[]*$/))){_147=args.schemas[val[1]];}if(_13c[id]&&((it instanceof Array)==(_13c[id] instanceof Array))){_14c=_13c[id];delete _14c.$ref;_149=true;}else{var _14d=_147&&_147.prototype;if(_14d){F.prototype=_14d;_14c=new F();}}_13c[id]=_14c;if(_13d){_13d[id]=args.time;}}var _14e=_147&&_147.properties;var _14f=it.length;for(var i in it){if(i==_14f){break;}if(it.hasOwnProperty(i)){val=it[i];var _151=_14e&&_14e[i];if(_151&&_151.format=="date-time"&&typeof val=="string"){val=dojo.date.stamp.fromISOString(val);}else{if((typeof val=="object")&&val&&!(val instanceof Date)){ref=val.$ref;if(ref){delete it[i];var path=ref.replace(/(#)([^\.\[])/,"$1.$2").match(/(^([^\[]*\/)?[^#\.\[]*)#?([\.\[].*)?/);if((ref=(path[1]=="$"||path[1]=="this"||path[1]=="")?root:_13c[(_13a+path[1]).replace(_140,"$2$3")])){if(path[3]){path[3].replace(/(\[([^\]]+)\])|(\.?([^\.\[]+))/g,function(t,a,b,c,d){ref=ref&&ref[b?b.replace(/[\"\'\\]/,""):d];});}}if(ref){val=ref;}else{if(!stop){var _158;if(!_158){_13f.push(_14c);}_158=true;}else{val=walk(val,false,val.$ref,_151);val._loadObject=args.loader;}}}else{if(!stop){val=walk(val,_13f==it,id&&_141(id,i),_151,_14c!=it&&typeof _14c[i]=="object"&&_14c[i]);}}}}it[i]=val;if(_14c!=it&&!_14c.__isDirty){var old=_14c[i];_14c[i]=val;if(_149&&val!==old&&!_14c._loadObject&&!(val instanceof Date&&old instanceof Date&&val.getTime()==old.getTime())&&!(typeof val=="function"&&typeof old=="function"&&val.toString()==old.toString())&&_13c.onUpdate){_13c.onUpdate(_14c,i,old,val);}}}}if(_149){for(i in _14c){if(!_14c.__isDirty&&_14c.hasOwnProperty(i)&&!it.hasOwnProperty(i)&&i!="__id"&&i!="__clientId"&&!(_14c instanceof Array&&isNaN(i))){if(_13c.onUpdate&&i!="_loadObject"&&i!="_idAttr"){_13c.onUpdate(_14c,i,_14c[i],undefined);}delete _14c[i];while(_14c instanceof Array&&_14c.length&&_14c[_14c.length-1]===undefined){_14c.length--;}}}}else{if(_13c.onLoad){_13c.onLoad(_14c);}}return _14c;};if(root&&typeof root=="object"){root=walk(root,false,args.defaultId);walk(_13f,false);}return root;},fromJson:function(str,args){function ref(_15d){return {$ref:_15d};};try{var root=eval("("+str+")");}catch(e){throw new SyntaxError("Invalid JSON string: "+e.message+" parsing: "+str);}if(root){return this.resolveJson(root,args);}return root;},toJson:function(it,_160,_161,_162){var _163=this._useRefs;var _164=this._addProp;_161=_161||"";var _165={};var _166={};function _167(it,path,_16a){if(typeof it=="object"&&it){var _16b;if(it instanceof Date){return "\""+dojo.date.stamp.toISOString(it,{zulu:true})+"\"";}var id=it.__id;if(id){if(path!="#"&&((_163&&!id.match(/#/))||_165[id])){var ref=id;if(id.charAt(0)!="#"){if(it.__clientId==id){ref="cid:"+id;}else{if(id.substring(0,_161.length)==_161){ref=id.substring(_161.length);}else{ref=id;}}}return _167({$ref:ref},"#");}path=id;}else{it.__id=path;_166[path]=it;}_165[path]=it;_16a=_16a||"";var _16e=_160?_16a+dojo.toJsonIndentStr:"";var _16f=_160?"\n":"";var sep=_160?" ":"";if(it instanceof Array){var res=dojo.map(it,function(obj,i){var val=_167(obj,_164(path,i),_16e);if(typeof val!="string"){val="undefined";}return _16f+_16e+val;});return "["+res.join(","+sep)+_16f+_16a+"]";}var _175=[];for(var i in it){if(it.hasOwnProperty(i)){var _177;if(typeof i=="number"){_177="\""+i+"\"";}else{if(typeof i=="string"&&(i.charAt(0)!="_"||i.charAt(1)!="_")){_177=dojo._escapeString(i);}else{continue;}}var val=_167(it[i],_164(path,i),_16e);if(typeof val!="string"){continue;}_175.push(_16f+_16e+_177+":"+sep+val);}}return "{"+_175.join(","+sep)+_16f+_16a+"}";}else{if(typeof it=="function"&&dojox.json.ref.serializeFunctions){return it.toString();}}return dojo.toJson(it);};var json=_167(it,"#","");if(!_162){for(var i in _166){delete _166[i].__id;}}return json;},_addProp:function(id,prop){return id+(id.match(/#/)?id.length==1?"":".":"#")+prop;},_useRefs:false,serializeFunctions:false};}if(!dojo._hasResource["dojox.rpc.Rest"]){dojo._hasResource["dojox.rpc.Rest"]=true;dojo.provide("dojox.rpc.Rest");(function(){if(dojox.rpc&&dojox.rpc.transportRegistry){dojox.rpc.transportRegistry.register("REST",function(str){return str=="REST";},{getExecutor:function(func,_17f,svc){return new dojox.rpc.Rest(_17f.name,(_17f.contentType||svc._smd.contentType||"").match(/json|javascript/),null,function(id,args){var _183=svc._getRequest(_17f,[id]);_183.url=_183.target+(_183.data?"?"+_183.data:"");return _183;});}});}var drr;function _185(_186,_187,_188,id){_186.addCallback(function(_18a){if(_188){_188=_186.ioArgs.xhr&&_186.ioArgs.xhr.getResponseHeader("Content-Range");_186.fullLength=_188&&(_188=_188.match(/\/(.*)/))&&parseInt(_188[1]);}return _18a;});return _186;};drr=dojox.rpc.Rest=function(path,_18c,_18d,_18e){var _18f;path=path.match(/\/$/)?path:(path+"/");_18f=function(id,args){return drr._get(_18f,id,args);};_18f.isJson=_18c;_18f._schema=_18d;_18f.cache={serialize:_18c?((dojox.json&&dojox.json.ref)||dojo).toJson:function(_192){return _192;}};_18f._getRequest=_18e||function(id,args){var _195={url:path+(dojo.isObject(id)?"?"+dojo.objectToQuery(id):id==null?"":id),handleAs:_18c?"json":"text",contentType:_18c?"application/json":"text/plain",sync:dojox.rpc._sync,headers:{Accept:_18c?"application/json,application/javascript":"*/*"}};if(args&&(args.start>=0||args.count>=0)){_195.headers.Range="items="+(args.start||"0")+"-"+((args.count&&args.count!=Infinity&&(args.count+(args.start||0)-1))||"");}dojox.rpc._sync=false;return _195;};function _196(name){_18f[name]=function(id,_199){return drr._change(name,_18f,id,_199);};};_196("put");_196("post");_196("delete");_18f.servicePath=path;return _18f;};drr._index={};drr._timeStamps={};drr._change=function(_19a,_19b,id,_19d){var _19e=_19b._getRequest(id);_19e[_19a+"Data"]=_19d;return _185(dojo.xhr(_19a.toUpperCase(),_19e,true),_19b);};drr._get=function(_19f,id,args){args=args||{};return _185(dojo.xhrGet(_19f._getRequest(id,args)),_19f,(args.start>=0||args.count>=0),id);};})();}if(!dojo._hasResource["dojox.rpc.JsonRest"]){dojo._hasResource["dojox.rpc.JsonRest"]=true;dojo.provide("dojox.rpc.JsonRest");(function(){var _1a2=[];var Rest=dojox.rpc.Rest;var jr;function _1a5(_1a6,_1a7,_1a8,_1a9){var _1aa=_1a7.ioArgs&&_1a7.ioArgs.xhr&&_1a7.ioArgs.xhr.getResponseHeader("Last-Modified");if(_1aa&&Rest._timeStamps){Rest._timeStamps[_1a9]=_1aa;}return _1a8&&dojox.json.ref.resolveJson(_1a8,{defaultId:_1a9,index:Rest._index,timeStamps:_1aa&&Rest._timeStamps,time:_1aa,idPrefix:_1a6.servicePath,idAttribute:jr.getIdAttribute(_1a6),schemas:jr.schemas,loader:jr._loader,assignAbsoluteIds:true});};jr=dojox.rpc.JsonRest={conflictDateHeader:"If-Unmodified-Since",commit:function(_1ab){_1ab=_1ab||{};var _1ac=[];var _1ad={};var _1ae=[];for(var i=0;i<_1a2.length;i++){var _1b0=_1a2[i];var _1b1=_1b0.object;var old=_1b0.old;var _1b3=false;if(!(_1ab.service&&(_1b1||old)&&(_1b1||old).__id.indexOf(_1ab.service.servicePath))&&_1b0.save){delete _1b1.__isDirty;if(_1b1){if(old){var _1b4;if((_1b4=_1b1.__id.match(/(.*)#.*/))){_1b1=Rest._index[_1b4[1]];}if(!(_1b1.__id in _1ad)){_1ad[_1b1.__id]=_1b1;_1ac.push({method:"put",target:_1b1,content:_1b1});}}else{_1ac.push({method:"post",target:{__id:jr.getServiceAndId(_1b1.__id).service.servicePath},content:_1b1});}}else{if(old){_1ac.push({method:"delete",target:old});}}_1ae.push(_1b0);_1a2.splice(i--,1);}}dojo.connect(_1ab,"onError",function(){var _1b5=_1a2;_1a2=_1ae;var _1b6=0;jr.revert();_1a2=_1b5;});jr.sendToServer(_1ac,_1ab);return _1ac;},sendToServer:function(_1b7,_1b8){var _1b9;var _1ba=dojo.xhr;var left=_1b7.length;var i,_1bd;var _1be;var _1bf=this.conflictDateHeader;dojo.xhr=function(_1c0,args){args.headers=args.headers||{};args.headers["Transaction"]=_1b7.length-1==i?"commit":"open";if(_1bf&&_1be){args.headers[_1bf]=_1be;}if(_1bd){args.headers["Content-ID"]="<"+_1bd+">";}return _1ba.apply(dojo,arguments);};for(i=0;i<_1b7.length;i++){var _1c2=_1b7[i];dojox.rpc.JsonRest._contentId=_1c2.content&&_1c2.content.__id;var _1c3=_1c2.method=="post";_1be=_1c2.method=="put"&&Rest._timeStamps[_1c2.content.__id];if(_1be){Rest._timeStamps[_1c2.content.__id]=(new Date())+"";}_1bd=_1c3&&dojox.rpc.JsonRest._contentId;var _1c4=jr.getServiceAndId(_1c2.target.__id);var _1c5=_1c4.service;var dfd=_1c2.deferred=_1c5[_1c2.method](_1c4.id.replace(/#/,""),dojox.json.ref.toJson(_1c2.content,false,_1c5.servicePath,true));(function(_1c7,dfd,_1c9){dfd.addCallback(function(_1ca){try{var _1cb=dfd.ioArgs.xhr&&dfd.ioArgs.xhr.getResponseHeader("Location");if(_1cb){var _1cc=_1cb.match(/(^\w+:\/\/)/)&&_1cb.indexOf(_1c9.servicePath);_1cb=_1cc>0?_1cb.substring(_1cc):(_1c9.servicePath+_1cb).replace(/^(.*\/)?(\w+:\/\/)|[^\/\.]+\/\.\.\/|^.*\/(\/)/,"$2$3");_1c7.__id=_1cb;Rest._index[_1cb]=_1c7;}_1ca=_1a5(_1c9,dfd,_1ca,_1c7&&_1c7.__id);}catch(e){}if(!(--left)){if(_1b8.onComplete){_1b8.onComplete.call(_1b8.scope);}}return _1ca;});})(_1c2.content,dfd,_1c5);dfd.addErrback(function(_1cd){left=-1;_1b8.onError.call(_1b8.scope,_1cd);});}dojo.xhr=_1ba;},getDirtyObjects:function(){return _1a2;},revert:function(_1ce){for(var i=_1a2.length;i>0;){i--;var _1d0=_1a2[i];var _1d1=_1d0.object;var old=_1d0.old;if(!(_1ce&&(_1d1||old)&&(_1d1||old).__id.indexOf(_1ce.servicePath))){if(_1d1&&old){for(var j in old){if(old.hasOwnProperty(j)){_1d1[j]=old[j];}}for(j in _1d1){if(!old.hasOwnProperty(j)){delete _1d1[j];}}}_1a2.splice(i,1);}}},changing:function(_1d4,_1d5){if(!_1d4.__id){return;}_1d4.__isDirty=true;for(var i=0;i<_1a2.length;i++){var _1d7=_1a2[i];if(_1d4==_1d7.object){if(_1d5){_1d7.object=false;if(!this._saveNotNeeded){_1d7.save=true;}}return;}}var old=_1d4 instanceof Array?[]:{};for(i in _1d4){if(_1d4.hasOwnProperty(i)){old[i]=_1d4[i];}}_1a2.push({object:!_1d5&&_1d4,old:old,save:!this._saveNotNeeded});},deleteObject:function(_1d9){this.changing(_1d9,true);},getConstructor:function(_1da,_1db){if(typeof _1da=="string"){var _1dc=_1da;_1da=new dojox.rpc.Rest(_1da,true);this.registerService(_1da,_1dc,_1db);}if(_1da._constructor){return _1da._constructor;}_1da._constructor=function(data){var self=this;var args=arguments;var _1e0;function _1e1(_1e2){if(_1e2){_1e1(_1e2["extends"]);_1e0=_1e2.properties;for(var i in _1e0){var _1e4=_1e0[i];if(_1e4&&(typeof _1e4=="object")&&("default" in _1e4)){self[i]=_1e4["default"];}}}if(data){dojo.mixin(self,data);}if(_1e2&&_1e2.prototype&&_1e2.prototype.initialize){_1e2.prototype.initialize.apply(self,args);}};_1e1(_1da._schema);var _1e5=jr.getIdAttribute(_1da);Rest._index[this.__id=this.__clientId=_1da.servicePath+(this[_1e5]||Math.random().toString(16).substring(2,14)+"@"+((dojox.rpc.Client&&dojox.rpc.Client.clientId)||"client"))]=this;if(dojox.json.schema&&_1e0){dojox.json.schema.mustBeValid(dojox.json.schema.validate(this,_1da._schema));}_1a2.push({object:this,save:true});};return dojo.mixin(_1da._constructor,_1da._schema,{load:_1da});},fetch:function(_1e6){var _1e7=jr.getServiceAndId(_1e6);return this.byId(_1e7.service,_1e7.id);},getIdAttribute:function(_1e8){var _1e9=_1e8._schema;var _1ea;if(_1e9){if(!(_1ea=_1e9._idAttr)){for(var i in _1e9.properties){if(_1e9.properties[i].identity){_1e9._idAttr=_1ea=i;}}}}return _1ea||"id";},getServiceAndId:function(_1ec){var _1ed=_1ec.match(/^(.*\/)([^\/]*)$/);var svc=jr.services[_1ed[1]]||new dojox.rpc.Rest(_1ed[1],true);return {service:svc,id:_1ed[2]};},services:{},schemas:{},registerService:function(_1ef,_1f0,_1f1){_1f0=_1f0||_1ef.servicePath;_1f0=_1ef.servicePath=_1f0.match(/\/$/)?_1f0:(_1f0+"/");_1ef._schema=jr.schemas[_1f0]=_1f1||_1ef._schema||{};jr.services[_1f0]=_1ef;},byId:function(_1f2,id){var _1f4,_1f5=Rest._index[(_1f2.servicePath||"")+id];if(_1f5&&!_1f5._loadObject){_1f4=new dojo.Deferred();_1f4.callback(_1f5);return _1f4;}return this.query(_1f2,id);},query:function(_1f6,id,args){var _1f9=_1f6(id,args);_1f9.addCallback(function(_1fa){if(_1fa.nodeType&&_1fa.cloneNode){return _1fa;}return _1a5(_1f6,_1f9,_1fa,typeof id!="string"||(args&&(args.start||args.count))?undefined:id);});return _1f9;},_loader:function(_1fb){var _1fc=jr.getServiceAndId(this.__id);var self=this;jr.query(_1fc.service,_1fc.id).addBoth(function(_1fe){if(_1fe==self){delete _1fe.$ref;delete _1fe._loadObject;}else{self._loadObject=function(_1ff){_1ff(_1fe);};}_1fb(_1fe);});},isDirty:function(item){if(!item){return !!_1a2.length;}return item.__isDirty;}};})();}if(!dojo._hasResource["ic.ICompleteConstants"]){dojo._hasResource["ic.ICompleteConstants"]=true;dojo.provide("ic.ICompleteConstants");dojo.mixin(ic.ICompleteConstants,{UI_DATE_FORMAT:"d/m/Y",UI_DATETIME_FORMAT:"d/m/Y H:i:s",UI_TIME_FORMAT:"H:i:s",SYS_DATE_FORMAT:"Ymd",SYS_DATETIME_FORMAT:"YmdHis",DAO:{UserSettings:"ic.data.UserSettings",ClientSettings:"ic.data.ClientSettings",AccountInfo:"ic.data.AccountInfo",PackageInfo:"ic.data.PackageInfo"},SHORT_MONTH_NAMES:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],ATTR_RECID:"recId"});}if(!dojo._hasResource["dojo.DeferredList"]){dojo._hasResource["dojo.DeferredList"]=true;dojo.provide("dojo.DeferredList");dojo.declare("dojo.DeferredList",dojo.Deferred,{constructor:function(list,_202,_203,_204,_205){this.list=list;this.resultList=new Array(this.list.length);this.chain=[];this.id=this._nextId();this.fired=-1;this.paused=0;this.results=[null,null];this.canceller=_205;this.silentlyCancelled=false;if(this.list.length===0&&!_202){this.callback(this.resultList);}this.finishedCount=0;this.fireOnOneCallback=_202;this.fireOnOneErrback=_203;this.consumeErrors=_204;dojo.forEach(this.list,function(d,_207){d.addCallback(this,function(r){this._cbDeferred(_207,true,r);return r;});d.addErrback(this,function(r){this._cbDeferred(_207,false,r);return r;});},this);},_cbDeferred:function(_20a,_20b,_20c){this.resultList[_20a]=[_20b,_20c];this.finishedCount+=1;if(this.fired!==0){if(_20b&&this.fireOnOneCallback){this.callback([_20a,_20c]);}else{if(!_20b&&this.fireOnOneErrback){this.errback(_20c);}else{if(this.finishedCount==this.list.length){this.callback(this.resultList);}}}}if(!_20b&&this.consumeErrors){_20c=null;}return _20c;},gatherResults:function(_20d){var d=new dojo.DeferredList(_20d,false,true,false);d.addCallback(function(_20f){var ret=[];dojo.forEach(_20f,function(_211){ret.push(_211[1]);});return ret;});return d;}});}if(!dojo._hasResource["ic.ui.Page"]){dojo._hasResource["ic.ui.Page"]=true;dojo.provide("ic.ui.Page");dojo.declare("ic.ui.Page",ic.widget._Widget,{query:null,daos:null,constructor:function(){ic.setPage(this);this.query=[];this.daos=[];if(dojo.isIE){var cnt=dojo.byId("wacomplete-con");if(cnt){var f=dojo.hitch(this,function(){var _214=ic.html.getViewport().w;var _215=cnt.getAttribute("minWidth");if(cnt.clientWidth<_215){this.minWinWidth=_214;dojo.style(cnt,"width",_215);}if(this.minWinWidth&&this.minWinWidth<_214){dojo.style(cnt,"width","");this.minWinWidth=null;}});dojo.connect(window,"onresize",f);f();}}},startup:function(){this._initAutoOpen();this.init();},init:function(){var _216=this._getInitDeferred(),_217=dojo.hitch(this,this.isAutoOpen()?"doAutoOpen":"doNormalOpen");_216.addCallback(this,"onBeforeOpen").addCallback(_217).addCallback(this,"onAfterOpen");},_getInitDeferred:function(){dojo.forEach(this._getSettingsToPreload(),dojo.hitch(this,function(name){if((jsClass=ic.ICompleteConstants.DAO[name])&&(clazz=dojo.getObject(jsClass))){var dao=new clazz();this.query.push(dao.load());}}));var _21a=new dojo.DeferredList(this.query);_21a.addCallback(dojo.hitch(this,function(){ic.parser.parse();}));return _21a;},onBeforeOpen:function(){if(this.declaredClass!="ic.ui.home.Page"){this.reAttachPoints();ic.setupDefaultIoFrame();this.addToQuery(ic.data.find("ds-tags").fetch());}},onAfterOpen:function(){this._initPopupHelp();},_initAutoOpen:function(){if(autoOpenConfig=this.get("icAutoOpen")){this._autoOpenConfig=dojo.fromJson(autoOpenConfig);}},isAutoOpen:function(){return this._autoOpenConfig&&this._autoOpenConfig["aoAction"];},doAutoOpen:function(cbv){var _21c=this._autoOpenConfig["aoAction"],m="doAutoOpen_"+_21c;if(_21c&&this[m]){this[m]();}this._didAutoOpen=true;return cbv;},doNormalOpen:function(cbv){return cbv;},isPendingAutoOpen:function(){return !this._didAutoOpen&&this.isAutoOpen();},_initPopupHelp:function(){var f=dojo.hitch(this,function(){var m=this.getUserSettings().isPopupHelpEnabled()?"show":"hide";dojo.forEach(dojo.query(".cicPopupHelp,.cicpopuphelp"),function(n){var w=ic.byNode(n);w[m]();});});dojo.connect(this.getUserSettings(),"onSave",f);f();},reAttachPoints:function(){dojo.forEach(this._attachedPoints,dojo.hitch(this,function(p){if(id=this[p].id){this[p]=ic.byId(id)||dojo.byId(id);}}));},_getSettingsToPreload:function(){return (this.get("initDAO")||"").split(/\s*,\s*/);},getDAO:function(name){return this.daos[ic.ICompleteConstants.DAO[name]];},registerDAO:function(dao){this.daos[dao.declaredClass]=dao;},getUserSettings:function(){return this.getDAO("UserSettings");},getClientSettings:function(){return this.getDAO("ClientSettings");},getAccountInfo:function(){return this.getDAO("AccountInfo");},addToQuery:function(dfd){this.query.push(dfd);}});ic.ui.Page.HTML_ELEMENT_ID="icMainPage";dojo.addOnLoad(function(){ic.parser.parse(dojo.byId(ic.ui.Page.HTML_ELEMENT_ID),{onlySelfNode:true});});}if(!dojo._hasResource["dojo.dnd.common"]){dojo._hasResource["dojo.dnd.common"]=true;dojo.provide("dojo.dnd.common");dojo.dnd._isMac=navigator.appVersion.indexOf("Macintosh")>=0;dojo.dnd._copyKey=dojo.dnd._isMac?"metaKey":"ctrlKey";dojo.dnd.getCopyKeyState=function(e){return e[dojo.dnd._copyKey];};dojo.dnd._uniqueId=0;dojo.dnd.getUniqueId=function(){var id;do{id=dojo._scopeName+"Unique"+(++dojo.dnd._uniqueId);}while(dojo.byId(id));return id;};dojo.dnd._empty={};dojo.dnd.isFormElement=function(e){var t=e.target;if(t.nodeType==3){t=t.parentNode;}return " button textarea input select option ".indexOf(" "+t.tagName.toLowerCase()+" ")>=0;};dojo.dnd._lmb=dojo.isIE?1:0;dojo.dnd._isLmbPressed=dojo.isIE?function(e){return e.button&1;}:function(e){return e.button===0;};}if(!dojo._hasResource["dojo.dnd.autoscroll"]){dojo._hasResource["dojo.dnd.autoscroll"]=true;dojo.provide("dojo.dnd.autoscroll");dojo.dnd.getViewport=function(){var d=dojo.doc,dd=d.documentElement,w=window,b=dojo.body();if(dojo.isMozilla){return {w:dd.clientWidth,h:w.innerHeight};}else{if(!dojo.isOpera&&w.innerWidth){return {w:w.innerWidth,h:w.innerHeight};}else{if(!dojo.isOpera&&dd&&dd.clientWidth){return {w:dd.clientWidth,h:dd.clientHeight};}else{if(b.clientWidth){return {w:b.clientWidth,h:b.clientHeight};}}}}return null;};dojo.dnd.V_TRIGGER_AUTOSCROLL=32;dojo.dnd.H_TRIGGER_AUTOSCROLL=32;dojo.dnd.V_AUTOSCROLL_VALUE=16;dojo.dnd.H_AUTOSCROLL_VALUE=16;dojo.dnd.autoScroll=function(e){var v=dojo.dnd.getViewport(),dx=0,dy=0;if(e.clientX<dojo.dnd.H_TRIGGER_AUTOSCROLL){dx=-dojo.dnd.H_AUTOSCROLL_VALUE;}else{if(e.clientX>v.w-dojo.dnd.H_TRIGGER_AUTOSCROLL){dx=dojo.dnd.H_AUTOSCROLL_VALUE;}}if(e.clientY<dojo.dnd.V_TRIGGER_AUTOSCROLL){dy=-dojo.dnd.V_AUTOSCROLL_VALUE;}else{if(e.clientY>v.h-dojo.dnd.V_TRIGGER_AUTOSCROLL){dy=dojo.dnd.V_AUTOSCROLL_VALUE;}}window.scrollBy(dx,dy);};dojo.dnd._validNodes={"div":1,"p":1,"td":1};dojo.dnd._validOverflow={"auto":1,"scroll":1};dojo.dnd.autoScrollNodes=function(e){for(var n=e.target;n;){if(n.nodeType==1&&(n.tagName.toLowerCase() in dojo.dnd._validNodes)){var s=dojo.getComputedStyle(n);if(s.overflow.toLowerCase() in dojo.dnd._validOverflow){var b=dojo._getContentBox(n,s),t=dojo._abs(n,true);var w=Math.min(dojo.dnd.H_TRIGGER_AUTOSCROLL,b.w/2),h=Math.min(dojo.dnd.V_TRIGGER_AUTOSCROLL,b.h/2),rx=e.pageX-t.x,ry=e.pageY-t.y,dx=0,dy=0;if(dojo.isWebKit||dojo.isOpera){rx+=dojo.body().scrollLeft,ry+=dojo.body().scrollTop;}if(rx>0&&rx<b.w){if(rx<w){dx=-w;}else{if(rx>b.w-w){dx=w;}}}if(ry>0&&ry<b.h){if(ry<h){dy=-h;}else{if(ry>b.h-h){dy=h;}}}var _240=n.scrollLeft,_241=n.scrollTop;n.scrollLeft=n.scrollLeft+dx;n.scrollTop=n.scrollTop+dy;if(_240!=n.scrollLeft||_241!=n.scrollTop){return;}}}try{n=n.parentNode;}catch(x){n=null;}}dojo.dnd.autoScroll(e);};}if(!dojo._hasResource["dojo.dnd.Mover"]){dojo._hasResource["dojo.dnd.Mover"]=true;dojo.provide("dojo.dnd.Mover");dojo.declare("dojo.dnd.Mover",null,{constructor:function(node,e,host){this.node=dojo.byId(node);this.marginBox={l:e.pageX,t:e.pageY};this.mouseButton=e.button;var h=this.host=host,d=node.ownerDocument,_247=dojo.connect(d,"onmousemove",this,"onFirstMove");this.events=[dojo.connect(d,"onmousemove",this,"onMouseMove"),dojo.connect(d,"onmouseup",this,"onMouseUp"),dojo.connect(d,"ondragstart",dojo.stopEvent),dojo.connect(d.body,"onselectstart",dojo.stopEvent),_247];if(h&&h.onMoveStart){h.onMoveStart(this);}},onMouseMove:function(e){dojo.dnd.autoScroll(e);var m=this.marginBox;this.host.onMove(this,{l:m.l+e.pageX,t:m.t+e.pageY});dojo.stopEvent(e);},onMouseUp:function(e){if(dojo.isWebKit&&dojo.dnd._isMac&&this.mouseButton==2?e.button==0:this.mouseButton==e.button){this.destroy();}dojo.stopEvent(e);},onFirstMove:function(){var s=this.node.style,l,t,h=this.host;switch(s.position){case "relative":case "absolute":l=Math.round(parseFloat(s.left));t=Math.round(parseFloat(s.top));break;default:s.position="absolute";var m=dojo.marginBox(this.node);var b=dojo.doc.body;var bs=dojo.getComputedStyle(b);var bm=dojo._getMarginBox(b,bs);var bc=dojo._getContentBox(b,bs);l=m.l-(bc.l-bm.l);t=m.t-(bc.t-bm.t);break;}this.marginBox.l=l-this.marginBox.l;this.marginBox.t=t-this.marginBox.t;if(h&&h.onFirstMove){h.onFirstMove(this);}dojo.disconnect(this.events.pop());},destroy:function(){dojo.forEach(this.events,dojo.disconnect);var h=this.host;if(h&&h.onMoveStop){h.onMoveStop(this);}this.events=this.node=this.host=null;}});}if(!dojo._hasResource["dojo.dnd.Moveable"]){dojo._hasResource["dojo.dnd.Moveable"]=true;dojo.provide("dojo.dnd.Moveable");dojo.declare("dojo.dnd.Moveable",null,{handle:"",delay:0,skip:false,constructor:function(node,_256){this.node=dojo.byId(node);if(!_256){_256={};}this.handle=_256.handle?dojo.byId(_256.handle):null;if(!this.handle){this.handle=this.node;}this.delay=_256.delay>0?_256.delay:0;this.skip=_256.skip;this.mover=_256.mover?_256.mover:dojo.dnd.Mover;this.events=[dojo.connect(this.handle,"onmousedown",this,"onMouseDown"),dojo.connect(this.handle,"ondragstart",this,"onSelectStart"),dojo.connect(this.handle,"onselectstart",this,"onSelectStart")];},markupFactory:function(_257,node){return new dojo.dnd.Moveable(node,_257);},destroy:function(){dojo.forEach(this.events,dojo.disconnect);this.events=this.node=this.handle=null;},onMouseDown:function(e){if(this.skip&&dojo.dnd.isFormElement(e)){return;}if(this.delay){this.events.push(dojo.connect(this.handle,"onmousemove",this,"onMouseMove"),dojo.connect(this.handle,"onmouseup",this,"onMouseUp"));this._lastX=e.pageX;this._lastY=e.pageY;}else{this.onDragDetected(e);}dojo.stopEvent(e);},onMouseMove:function(e){if(Math.abs(e.pageX-this._lastX)>this.delay||Math.abs(e.pageY-this._lastY)>this.delay){this.onMouseUp(e);this.onDragDetected(e);}dojo.stopEvent(e);},onMouseUp:function(e){for(var i=0;i<2;++i){dojo.disconnect(this.events.pop());}dojo.stopEvent(e);},onSelectStart:function(e){if(!this.skip||!dojo.dnd.isFormElement(e)){dojo.stopEvent(e);}},onDragDetected:function(e){new this.mover(this.node,e,this);},onMoveStart:function(_25f){dojo.publish("/dnd/move/start",[_25f]);dojo.addClass(dojo.body(),"dojoMove");dojo.addClass(this.node,"dojoMoveItem");},onMoveStop:function(_260){dojo.publish("/dnd/move/stop",[_260]);dojo.removeClass(dojo.body(),"dojoMove");dojo.removeClass(this.node,"dojoMoveItem");},onFirstMove:function(_261){},onMove:function(_262,_263){this.onMoving(_262,_263);var s=_262.node.style;s.left=_263.l+"px";s.top=_263.t+"px";this.onMoved(_262,_263);},onMoving:function(_265,_266){},onMoved:function(_267,_268){}});}if(!dojo._hasResource["dojo.dnd.move"]){dojo._hasResource["dojo.dnd.move"]=true;dojo.provide("dojo.dnd.move");dojo.declare("dojo.dnd.move.constrainedMoveable",dojo.dnd.Moveable,{constraints:function(){},within:false,markupFactory:function(_269,node){return new dojo.dnd.move.constrainedMoveable(node,_269);},constructor:function(node,_26c){if(!_26c){_26c={};}this.constraints=_26c.constraints;this.within=_26c.within;},onFirstMove:function(_26d){var c=this.constraintBox=this.constraints.call(this,_26d);c.r=c.l+c.w;c.b=c.t+c.h;if(this.within){var mb=dojo.marginBox(_26d.node);c.r-=mb.w;c.b-=mb.h;}},onMove:function(_270,_271){var c=this.constraintBox,s=_270.node.style;s.left=(_271.l<c.l?c.l:c.r<_271.l?c.r:_271.l)+"px";s.top=(_271.t<c.t?c.t:c.b<_271.t?c.b:_271.t)+"px";}});dojo.declare("dojo.dnd.move.boxConstrainedMoveable",dojo.dnd.move.constrainedMoveable,{box:{},markupFactory:function(_274,node){return new dojo.dnd.move.boxConstrainedMoveable(node,_274);},constructor:function(node,_277){var box=_277&&_277.box;this.constraints=function(){return box;};}});dojo.declare("dojo.dnd.move.parentConstrainedMoveable",dojo.dnd.move.constrainedMoveable,{area:"content",markupFactory:function(_279,node){return new dojo.dnd.move.parentConstrainedMoveable(node,_279);},constructor:function(node,_27c){var area=_27c&&_27c.area;this.constraints=function(){var n=this.node.parentNode,s=dojo.getComputedStyle(n),mb=dojo._getMarginBox(n,s);if(area=="margin"){return mb;}var t=dojo._getMarginExtents(n,s);mb.l+=t.l,mb.t+=t.t,mb.w-=t.w,mb.h-=t.h;if(area=="border"){return mb;}t=dojo._getBorderExtents(n,s);mb.l+=t.l,mb.t+=t.t,mb.w-=t.w,mb.h-=t.h;if(area=="padding"){return mb;}t=dojo._getPadExtents(n,s);mb.l+=t.l,mb.t+=t.t,mb.w-=t.w,mb.h-=t.h;return mb;};}});dojo.dnd.move.constrainedMover=function(fun,_283){dojo.deprecated("dojo.dnd.move.constrainedMover, use dojo.dnd.move.constrainedMoveable instead");var _284=function(node,e,_287){dojo.dnd.Mover.call(this,node,e,_287);};dojo.extend(_284,dojo.dnd.Mover.prototype);dojo.extend(_284,{onMouseMove:function(e){dojo.dnd.autoScroll(e);var m=this.marginBox,c=this.constraintBox,l=m.l+e.pageX,t=m.t+e.pageY;l=l<c.l?c.l:c.r<l?c.r:l;t=t<c.t?c.t:c.b<t?c.b:t;this.host.onMove(this,{l:l,t:t});},onFirstMove:function(){dojo.dnd.Mover.prototype.onFirstMove.call(this);var c=this.constraintBox=fun.call(this);c.r=c.l+c.w;c.b=c.t+c.h;if(_283){var mb=dojo.marginBox(this.node);c.r-=mb.w;c.b-=mb.h;}}});return _284;};dojo.dnd.move.boxConstrainedMover=function(box,_290){dojo.deprecated("dojo.dnd.move.boxConstrainedMover, use dojo.dnd.move.boxConstrainedMoveable instead");return dojo.dnd.move.constrainedMover(function(){return box;},_290);};dojo.dnd.move.parentConstrainedMover=function(area,_292){dojo.deprecated("dojo.dnd.move.parentConstrainedMover, use dojo.dnd.move.parentConstrainedMoveable instead");var fun=function(){var n=this.node.parentNode,s=dojo.getComputedStyle(n),mb=dojo._getMarginBox(n,s);if(area=="margin"){return mb;}var t=dojo._getMarginExtents(n,s);mb.l+=t.l,mb.t+=t.t,mb.w-=t.w,mb.h-=t.h;if(area=="border"){return mb;}t=dojo._getBorderExtents(n,s);mb.l+=t.l,mb.t+=t.t,mb.w-=t.w,mb.h-=t.h;if(area=="padding"){return mb;}t=dojo._getPadExtents(n,s);mb.l+=t.l,mb.t+=t.t,mb.w-=t.w,mb.h-=t.h;return mb;};return dojo.dnd.move.constrainedMover(fun,_292);};dojo.dnd.constrainedMover=dojo.dnd.move.constrainedMover;dojo.dnd.boxConstrainedMover=dojo.dnd.move.boxConstrainedMover;dojo.dnd.parentConstrainedMover=dojo.dnd.move.parentConstrainedMover;}if(!dojo._hasResource["ic.math"]){dojo._hasResource["ic.math"]=true;dojo.provide("ic.math");dojo.mixin(ic.math,{clip:function(v,minv,maxv){return v<minv?minv:(v>maxv?maxv:v);},random:function(minv,maxv){return (maxv-minv)*Math.random()+minv;},round:function(v,dc){return Math.round(Math.pow(10,dc)*v)/Math.pow(10,dc);}});}if(!dojo._hasResource["ic.dnd.Moveable"]){dojo._hasResource["ic.dnd.Moveable"]=true;dojo.provide("ic.dnd.Moveable");dojo.declare("ic.dnd.Moveable",dojo.dnd.Moveable,{direction:"b",clip:null,leftTop:null,constructor:function(node,_2a0){this.direction=_2a0.direction||this.direction;this.clip=_2a0.clip||null;this.leftTop=dojo.marginBox(this.handle);},onMoving:function(_2a1,_2a2){switch(this.direction){case "v":_2a2.l=this.leftTop.l;break;case "h":_2a2.t=this.leftTop.t;break;}if(c=this.clip){if(!isNaN(+c.l0)&&!isNaN(+c.l1)){_2a2.l=ic.math.clip(_2a2.l,c.l0,c.l1);}if(!isNaN(+c.t0)&&!isNaN(+c.t1)){_2a2.t=ic.math.clip(_2a2.t,c.t0,c.t1);}}},onMoveStart:function(_2a3){dojo.publish("/dnd/move/start",[_2a3]);},onMoveStop:function(_2a4){dojo.publish("/dnd/move/stop",[_2a4]);}});}if(!dojo._hasResource["ic.widget._Statable"]){dojo._hasResource["ic.widget._Statable"]=true;dojo.provide("ic.widget._Statable");dojo.declare("ic.widget._Statable",null,{baseClass:"",_staticClass:"",_states:null,states:null,startup:function(_2a5){this._states=["checked","hovered","disabled"];if(st=this.get("states")){this._states=this._states.concat(st.split(/\s*,\s*/));}this._staticClass=this.domNode.className;this._setStateClass();},_setStateClass:function(){var cn=[],iecn=[];dojo.forEach(this._states,dojo.hitch(this,function(_2a8){if(this["_"+_2a8]){var css=this.baseClass+_2a8.substr(0,1).toUpperCase()+_2a8.substr(1);cn.push(css);iecn.push(css);}}));if(cn.length==0){cn=[this.baseClass];iecn=[this.baseClass];}var sc=this._staticClass;this.domNode.className=(sc?sc+" "+sc+"-":"")+cn.join("-")+" "+cn.join(" ");},updateState:function(_2ab,v){this["_"+_2ab]=v;this._setStateClass();}});}if(!dojo._hasResource["ic.widget.LabeledButton"]){dojo._hasResource["ic.widget.LabeledButton"]=true;dojo.provide("ic.widget.LabeledButton");dojo.declare("ic.widget.LabeledButton",[ic.widget._Widget,ic.widget._Statable],{templateString:"<div class=\"icLabeledButton icFloatLeft\" dojoAttachEvent=\"onclick:_onClick,onmouseover:_onMouseOver, onmouseout:_onMouseOut\" name=\"${name}\">\n\t<div class=\"icButtonIcon\" title=\"${title}\"></div>\n\t<div dojoAttachPoint=\"textNode\" class=\"icButtonText\" title=\"${title}\">${caption}</div>\n</div>\n",baseClass:"icLabeledButton",textNode:null,caption:"",_hovered:false,_disabled:false,name:"",rtl:"",_staticClass:null,startup:function(){this.inherited(arguments);if(!!this.rtl){var n=dojo.query(".icButtonIcon",this.domNode)[0],pn=n.parentNode;pn.removeChild(n);pn.appendChild(n);}},_onClick:function(evt){dojo.stopEvent(evt);if(this._disabled){return false;}this._setStateClass();this.onClick(evt);},_onMouseOver:function(evt){dojo.stopEvent(evt);this._hovered=true;this._setStateClass();},_onMouseOut:function(evt){dojo.stopEvent(evt);this._hovered=false;this._setStateClass();},onClick:function(){},setDisabled:function(_2b2){this._disabled=_2b2;this._setStateClass();},setCaption:function(text){this.textNode.innerHTML=text;}});}if(!dojo._hasResource["ic.widget._Closeable"]){dojo._hasResource["ic.widget._Closeable"]=true;dojo.provide("ic.widget._Closeable");dojo.declare("ic.widget._Closeable",null,{});ic.widget._Closeable._queue=[];ic.widget._Closeable._active=null;ic.widget._Closeable.add=function(o){if(!o["close"]){throw new Error("Method close must be implemented");}ic.widget._Closeable._queue.push(o);};ic.widget._Closeable.remove=function(o){var idx=dojo.indexOf(ic.widget._Closeable._queue,o);if(idx!=-1){ic.widget._Closeable._queue.splice(idx,1);dojo.publish("ic.widget._Closeable#remove");}else{console.warn("Can not find closeable object in the queue: ");console.warn(o);}};ic.widget._Closeable.close=function(){var c=ic.widget._Closeable._queue;if(c.length==0){return;}var o=c[c.length-1];o.close();};dojo.addOnLoad(function(){var hdl=function(evt){if(evt.keyCode==dojo.keys.ESCAPE){dojo.stopEvent(evt);ic.widget._Closeable.close();}};dojo.connect(document,dojo.isWebKit?"onkeyup":"onkeydown",hdl);dojo.subscribe("RichEditor.onEscClick",ic.widget._Closeable,"close");});}if(!dojo._hasResource["ic.html"]){dojo._hasResource["ic.html"]=true;dojo.provide("ic.html");dojo.mixin(ic.html,{_trimCache:{},addClass:function(node,_2bc){node=dojo.byId(node);var cls=node.className;if(dojo.indexOf(cls.split(/\s+/),_2bc)==-1){node.className=cls+(cls?" ":"")+_2bc;}},replaceHTML:function(node,html){var tn=node.tagName;var _2c1=document.createElement(tn),_2c2=node.attributes;for(var i=0,l=_2c2.length;i<l;i++){var _2c5=_2c2.item(i),name=_2c5.nodeName;if(name=="class"){_2c1.className=_2c5.nodeValue;}else{_2c1.setAttribute(name,_2c5.nodeValue);}}_2c1.innerHTML=html;node.parentNode.replaceChild(_2c1,node);return _2c1;},setHTML:function(node,html){node=dojo.byId(node);if(dojo.isIE){if(node.tagName.toUpperCase()=="TR"){dojo.forEach(node.cells,function(n){node.removeChild(n);});var f=function(n){node.appendChild(n);};var div=document.createElement("div");div.innerHTML=dojo.string.substitute("<table><tr>${0}</tr></table>",[html]);var _2cd=div.firstChild.rows[0].cells;while(_2cd.length>0){f(_2cd[0]);}}else{node.innerHTML=html;}}else{node.innerHTML=html;}},show:function(n,v){v=!v||v=="d"?0:1;var prop=[["display","visibility"],["block","inherit"]];dojo.style(dojo.byId(n),prop[0][v],prop[1][v]);},hide:function(n,v){v=!v||v=="d"?0:1;var prop=[["display","visibility"],["none","hidden"]];dojo.style(dojo.byId(n),prop[0][v],prop[1][v]);},toggle:function(_2d4,node,css){dojo.forEach(_2d4,function(n){dojo.removeClass(n,css);});if(node){dojo.addClass(node,css);}},toggleDisplay:function(_2d8,node,prop){var _2db={"block":"none","none":"block"};dojo.forEach(_2d8,function(n){if(_2db[prop]!=dojo.style(n,"display")){dojo.style(n,"display",_2db[prop]);}});dojo.style(node,"display",prop);},destroyElement:function(e){dojo._destroyElement(e);},getTextContent:function(e){return e.innerText!=undefined?e.innerText:e.textContent;},unsetBackgroundStyle:function(el,_2e0){if(dojo.isIE){var bg=this.getStyleClassBackground(_2e0);dojo.style(el,"backgroundImage",bg.image);dojo.style(el,"backgroundPosition",bg.position);}else{dojo.style(el,"backgroundImage","");dojo.style(el,"backgroundPosition","");}},getStyleClassBackground:function(_2e2){var _2e3=null;if(!this.classCache){this.classCache=_2e2;}if(this.classCache[_2e2]){return this.classCache[_2e2];}_2e3=this._getStyleClassBackground(_2e2);this.classCache[_2e2]=_2e3;return _2e3;},_getStyleClassBackground:function(_2e4){var _2e5={image:"",position:""};var _2e6=null;var _2e7="."+_2e4;for(var s=0;s<document.styleSheets.length;s++){if(document.styleSheets[s].rules){for(var r=0;r<document.styleSheets[s].rules.length;r++){if(document.styleSheets[s].rules[r].selectorText==_2e7){_2e6=document.styleSheets[s].rules[r];if(_2e6.style.backgroundPosition){_2e5.position=_2e6.style.backgroundPosition;if(_2e5.image){return _2e5;}}if(_2e6.style.backgroundImage){_2e5.image=_2e6.style.backgroundImage;if(_2e5.position){return _2e5;}}}}}else{if(document.styleSheets[s].cssRules){for(var r=0;r<document.styleSheets[s].cssRules.length;r++){if(document.styleSheets[s].cssRules[r].selectorText==_2e7){_2e6=document.styleSheets[s].cssRules[r];if(_2e6.style.backgroundPosition){_2e5.position=_2e6.style.backgroundPosition;if(_2e5.image){return _2e5;}}if(_2e6.style.backgroundImage){_2e5.image=_2e6.style.backgroundImage;if(_2e5.position){return _2e5;}}}}}}}return _2e5;},getViewport:function(){var d=dojo.doc,dd=d.documentElement,w=window,b=dojo.body();if(dojo.isMozilla){return {w:dd.clientWidth,h:w.innerHeight};}else{if(!dojo.isOpera&&w.innerWidth){return {w:w.innerWidth,h:w.innerHeight};}else{if(!dojo.isOpera&&dd&&dd.clientWidth){return {w:dd.clientWidth,h:dd.clientHeight};}else{if(b.clientWidth){return {w:b.clientWidth,h:b.clientHeight};}}}}return null;},decodeEntities:function(v){return v.replace(/&amp;/g,"&").replace(/&quot;/g,"\"");},normalize:function(str){return (str||"").replace(/[\xC2]/gm,"");},escape:function(v){return ic.html.normalize(String(v||"").replace(/&/gm,"&amp;").replace(/</gm,"&lt;").replace(/[>]/gm,"&gt;").replace(/"/gm,"&quot;"));},unescape:function(v){return String(v||"").replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&quot;/gm,"\"").replace(/&amp;/g,"&");},trim:function(text,css,size){return text;},_trim:function(text,css,size,uid){return text;},toText:function(html){if(!html||typeof (html)!="string"){return html;}return html.replace(/<[^>]+>/g,"").replace(/<\/[^>]+>/g,"").replace(/\[^>]+>/g,"");},hasVisibleContent:function(html){return dojo.string.trim(ic.html.toText(html))!="";},encodeLTGT:function(v){return (v||"").replace(/</g,"&lt;").replace(/>/g,"&gt;");},decodeLTGT:function(v){return (v||"").replace(/&lt;/g,"<").replace(/&gt;/g,">");},lookupElement:function(elem,_2fe,_2ff){var i=0,el=elem,_2ff=_2ff||3;while(i++<_2ff){if(_2fe.call(null,el)){return el;}el=el.parentNode;}return null;}});}if(!dojo._hasResource["ic.widget.Dialog"]){dojo._hasResource["ic.widget.Dialog"]=true;dojo.provide("ic.widget.Dialog");dojo.declare("ic.widget.Dialog",ic.widget._Widget,{headerNode:null,containerNode:null,titleNode:null,_config:null,icTitle:"",w:0,h:0,_isOpened:false,_pngfixHnd:null,startup:function(){this.inherited(arguments);this.w=dojo.style(this.domNode,"width");this.h=dojo.style(this.domNode,"height");var mv=new ic.dnd.Moveable(this.domNode,{handle:this.headerNode});this._pngfixHnd=dojo.connect(this,"onBeforeOpen",this,"fixPng");},fixPng:function(){dojo.disconnect(this._pngfixHnd);var _303=["> .icCorners > div","> .icContainerLeftRight .icRight","> .icContainerTopBottom .icBottom"];ic.pngfix.apply(_303.join(", "),this.domNode);},close:function(_304){if(!this._isOpened){return true;}_304=_304||{};this.onBeforeClose(_304);if(_304.__preventClose){return false;}this._fixMozCursor();ic.html.hide(this.domNode,"v");ic.widget._Closeable.remove(this);this._isOpened=false;ic.widget.Dialog._openedCount--;this.onAfterClose(_304);ic.widget.Dialog.onClosed(this);return true;},_fixMozCursor:function(){if(dojo.isMoz){dojo.query("input",this.domNode).forEach(function(node){if(dojo.isFunction(node.blur)){node.blur();}});}},open:function(_306){this._config=_306||{};this.onBeforeOpen(this._config);if(title=this._config["title"]){this.setTitle(title);}if(cnt=this._config["content"]){this.setContent(cnt);}if(css=this._config["className"]){dojo.removeClass(this.domNode,this["class"]);dojo.addClass(this.domNode,css);}var vp=dojo.dnd.getViewport(),n=this.domNode;dojo.style(this.domNode,"left",(vp.w-dojo.style(this.domNode,"width"))/2);dojo.style(this.domNode,"top",(vp.h-dojo.style(this.domNode,"height"))/2);ic.html.show(this.domNode,"v");if(0<dojo.isFF&&dojo.isFF<3){dojo.style(this.domNode,"position","fixed");}ic.widget._Closeable.add(this);this._isOpened=true;ic.widget.Dialog._openedCount++;this.onAfterOpen(this._config);return true;},isOpened:function(){return this._isOpened;},setContent:function(cnt){this.containerNode=ic.html.replaceHTML(this.containerNode,cnt);},setTitle:function(v){this.titleNode.innerHTML=v;this.icTitle=v;},onBeforeClose:function(){return true;},onAfterClose:function(){},onBeforeOpen:function(){return true;},onAfterOpen:function(){}});dojo.mixin(ic.widget.Dialog,{_openedCount:0,hasOpenedDialogs:function(){return !!ic.widget.Dialog._openedCount;},onClosed:function(w){}});}if(!dojo._hasResource["ic.widget.ModalDialog"]){dojo._hasResource["ic.widget.ModalDialog"]=true;dojo.provide("ic.widget.ModalDialog");dojo.declare("ic.widget.ModalDialog",ic.widget.Dialog,{onAfterOpen:function(){dojo.style(dojo.byId("icModalLock"),"visibility","visible");this._fixZIndexOnOpen();},onAfterClose:function(){this._fixZIndexOnClose();},_fixZIndexOnOpen:function(){var _30c=dojo.byId("icModalLock"),ozi=parseInt(_30c.style.zIndex||10)+5;dojo.style(dojo.byId("icModalLock"),"zIndex",ozi);dojo.style(this.domNode,"zIndex",ozi+1);},_fixZIndexOnClose:function(){var _30e=dojo.byId("icModalLock"),ozi=_30e.style.zIndex-5;dojo.style(dojo.byId("icModalLock"),"zIndex",ozi);dojo.style(this.domNode,"zIndex",0);if(ic.widget.ModalDialog._defZIndex==ozi){dojo.style(dojo.byId("icModalLock"),"visibility","hidden");}}});ic.widget.ModalDialog._defZIndex=10;ic.widget.ModalDialog._fixLockNode=function(){if(!(e=dojo.byId("icModalLock"))){var d=document,e=d.body.appendChild(d.createElement("div"));e.appendChild(d.createElement("div"));e.id="icModalLock";dojo.style(e,"zIndex",ic.widget.ModalDialog._defZIndex);}ic.pngfix.apply(e.firstChild);};dojo.addOnLoad(ic.widget.ModalDialog._fixLockNode);}if(!dojo._hasResource["ic.ui.home.InitMessageDialog"]){dojo._hasResource["ic.ui.home.InitMessageDialog"]=true;dojo.provide("ic.ui.home.InitMessageDialog");dojo.declare("ic.ui.home.InitMessageDialog",ic.widget.ModalDialog,{_disabledClose:false,startup:function(){this.inherited(arguments);dojo.query(".continue",this.domNode).onclick(this,"close");},disableClose:function(){this._disabledClose=true;dojo.style(this._closeManageBtn.domNode,"display","none");dojo.query(".continue",this.domNode).style("display","none");},setText:function(text){dojo.query(".text",this.domNode)[0].innerHTML=text;},setHeight:function(h){dojo.style(this.domNode,"height",h+"px");},setWidth:function(w){dojo.style(this.domNode,"width",w+"px");},close:function(){if(this._disabledClose){return;}this.inherited(arguments);}});}if(!dojo._hasResource["ic.widget.WaitingIndicator"]){dojo._hasResource["ic.widget.WaitingIndicator"]=true;dojo.provide("ic.widget.WaitingIndicator");dojo.declare("ic.widget.WaitingIndicator",null,{templateString:"<div class=\"icWaitIndicator\"><div class=\"icWaitAnim\"></div></div>\n",elem:null,domNode:null,constructor:function(elem){if(!this.templateString){this.templateString=dojo._getText(this.templatePath);}this.domNode=document.createElement("div");this.domNode.innerHTML=this.templateString;elem.appendChild(this.domNode);this.hide();ic.pngfix.apply(".icWaitIndicator",this.domNode);},show:function(){ic.html.show(this.domNode);},hide:function(){ic.html.hide(this.domNode);},connect:function(){var a=arguments;if(a.length==3){dojo.connect(a[0],a[1],this,"show");dojo.connect(a[0],a[2],this,"hide");}else{if(a.length==4){dojo.connect(a[0],a[1],this,"show");dojo.connect(a[2],a[3],this,"hide");}else{throw new Error("Invalid arguments count for connect method");}}}});}if(!dojo._hasResource["ic.ui"]){dojo._hasResource["ic.ui"]=true;dojo.provide("ic.ui");dojo.mixin(ic.ui,{_wi:null,_locked:false,lock:function(){if(n=dojo.byId("form-lock")){if(!ic.ui._wi){ic.ui._wi=new ic.widget.WaitingIndicator(n);}ic.ui._wi.show();dojo.style(n,"display","block");}ic.ui._locked=true;},unlock:function(){if(n=dojo.byId("form-lock")){if(!ic.ui._wi){ic.ui._wi=new ic.widget.WaitingIndicator(n);}ic.ui._wi.hide();dojo.style(n,"display","none");}ic.ui._locked=false;},locked:function(){return ic.ui._locked;}});}if(!dojo._hasResource["ic.ui.home.Page"]){dojo._hasResource["ic.ui.home.Page"]=true;dojo.provide("ic.ui.home.Page");dojo.declare("ic.ui.home.Page",ic.ui.Page,{URL_MESSAGE:"/home/initMessage",_initDialog:null,_message:null,startup:function(){var _317=this;this.addToQuery(dojo.xhrPost({url:"/home/initMessage",handleAs:"json"}).addCallback(function(res){_317._message=res;}));this.inherited(arguments);dojo.addOnUnload(this,"_onUnload");},onBeforeOpen:function(){this.inherited(arguments);var m=this._message;if(m&&m.show){this._setupMessageDialog({disableClose:m.disableClose,title:m.title,content:m.message,w:m.width,h:m.height});this._getInitMessageDialog().open();dojo.connect(this._getInitMessageDialog(),"onAfterClose",dojo.hitch(this._getLoginForm(),"focus"));}else{this._getLoginForm().focus();}},_getInitMessageDialog:function(){return ic.byId("initMessageDialog");},_setupMessageDialog:function(_31a){var dlg=this._getInitMessageDialog();if(_31a.disableClose){dlg.disableClose();}dlg.setTitle(_31a.title);dlg.setText(_31a.content);if(_31a.w){dlg.setWidth(_31a.w);}if(_31a.h){dlg.setHeight(_31a.h);}},_getLoginForm:function(){return ic.byId("icLoginForm");},_onUnload:function(){dojo.body().innerHTML="";}});}if(!dojo._hasResource["ic.data.DataSource"]){dojo._hasResource["ic.data.DataSource"]=true;dojo.provide("ic.data.DataSource");dojo.declare("ic.data.DataSource",null,{STATUS_LOADING:"_ic_rec_loading",_config:null,_records:null,_loadedRecs:null,_response:null,_activeRec:null,_cached:null,_request:null,_lastSearch:null,_dfd:{LOAD:[]},constructor:function(_31c){this._config=_31c||{};this._request={};this._cached=[];this._loadedRecs={};},fetch:function(_31d){_31d=_31d||{};this._lastSearch=_31d.query||null;var dfd=this._send(this._config.fetch.url,_31d.query);dfd.addCallback(dojo.hitch(this,function(v){this._handleFetch(v,_31d["cancelEvent"],_31d.eArgs);return _31d.eArgs?_31d.eArgs:v;}));return dfd;},fetchLastSearch:function(_320,_321){if(_320){this._lastSearch=dojo.mixin(this._lastSearch||{},_320);}return this.fetch({query:this._lastSearch,eArgs:_321});},getLastSearch:function(){return this._lastSearch;},fetchOne:function(_322){var dfd=new dojo.Deferred();this.fetch(_322).addCallback(dojo.hitch(this,function(cbv){this.activateRecord(this.getRecord(0)).addCallback(this,"onFetchOne").addCallback(dfd,"callback");}));return dfd;},activateRecord:function(rec,_326){if(!rec){return;}var dfd=new dojo.Deferred();if(this._config.load&&!_326){this.loadRecord(rec,dfd);}else{setTimeout(dojo.hitch(dfd,"callback",rec),50);dfd.addCallback(dojo.hitch(this,function(rec){var _rec=this._idOrRecToRec(rec);this._loadedRecs[this._idOrRecToId(rec)]=_rec;return _rec;}));}dfd.addCallback(dojo.hitch(this,function(rec){this._activeRec=this._loadedRecs[this._idOrRecToId(rec)];this.onRecordActivated(this._activeRec);return rec;}));return dfd;},reloadRecord:function(rec){this._loadedRecs[this.getRecordId(rec)]=null;var dfd=new dojo.Deferred();this.loadRecord(rec,dfd);dfd.addCallback(dojo.hitch(this,function(rec){if(this.getActiveRecordId()==this.getRecordId(rec)){this._activeRec=rec;}if(cn=this._config.load.converter){var c=new (dojo.getObject(cn))(),_32f=this.getRecordById(this.getRecordId(rec));var _rec=c.simple(rec);for(p in _rec){_32f[p]=_rec[p];}}this.onRecordReloaded(rec);return rec;}));return dfd;},getResponse:function(){return this._response;},getRequest:function(){return this._request;},getRecords:function(){return this._records;},getRecordsCount:function(){return this._records.length;},getRecord:function(idx){return this._records[idx]||null;},getRecordById:function(id){var _333=this.getIdName();for(var i=this._records.length;i--;){if(this._records[i][_333]==id){return this._records[i];}}return null;},deleteRecord:function(rec){if(this.getRecordId(rec)==this.getRecordId(this._activeRec)){this._activeRec=null;}var dfd=this._send(this._config.remove.url,{"I":this.getRecordId(rec)});dfd.addCallback(this,"onDelete");return dfd;},deleteRecords:function(ids){var dfd=this._send(this._config.removeBulk.url,{"ids":ids.join(",")});dfd.addCallback(this,"onDelete");return dfd;},findRecords:function(_339){throw new Error("Method is not implemented");},getActiveRecord:function(){return this._activeRec;},getActiveRecordId:function(){if(rec=this.getActiveRecord()){return this.getRecordId(rec);}return null;},getIdName:function(){return this._config.idName||"I";},getRecordId:function(rec){return rec[this.getIdName()];},getLoadedRecord:function(id){return this._loadedRecs[id];},emptyLoadedRecords:function(){this._loadedRecs={};},isRecordLoaded:function(rec){if(!rec){return false;}var _33d=this._idOrRecToId(rec);var lrec=this._loadedRecs[_33d];return (!this._config.load&&this.getRecordById(_33d))||(lrec&&lrec!=this.STATUS_LOADING);},isRecordLoading:function(rec){var _340=this._idOrRecToId(rec);return this._config.load&&this._loadedRecs[_340]==this.STATUS_LOADING;},loadRecord:function(rec,dfd){if(!dfd){dfd=new dojo.Deferred();}var id=this._idOrRecToId(rec);if(id>=0||!this.isRecordLoaded(rec)){dfd.addCallback(dojo.hitch(this,function(res){var rec=res[this._config.load.responseName];if(dojo.isArray(rec)){rec=rec[0];}var id=this.getRecordId(rec);this._loadedRecs[id]=rec;if(!this.getRecordById(id)&&(cv=this.getConverter())){var srec=cv.simple(rec);srec.I=id;this._records.push(srec);}return rec;}));var _348={};_348[this._config.load.idName||this.getIdName()]=id;var _dfd=this._send(this._config.load.url,_348);this._dfd.LOAD.push(_dfd);_dfd.addBoth(dojo.hitch(this,function(v){var idx=dojo.indexOf(this._dfd.LOAD,_dfd);if(idx!=-1){this._dfd.LOAD.splice(idx,1);}return v;}));_dfd.addCallback(dfd,"callback");_dfd.addErrback(dfd,"errback");this._loadedRecs[id]=this.STATUS_LOADING;}else{setTimeout(dojo.hitch(dfd,"callback",this._loadedRecs[id]),50);}return dfd;},_handleRecordLoaded:function(res){var rec=res[this._config.load.responseName];},getValue:function(rec,_34f,_350){},_send:function(url,_352){var _353={url:url,handleAs:"json",content:_352,preventCache:true,contentType:"application/x-www-form-urlencoded; charset=UTF-8"};var dfd=dojo.xhrPost(_353);dfd.addCallback(this,"_handleError");return dfd;},_handleFetch:function(res,_356,_357){this._response=res;this._records=res[this._config.fetch.responseName];if(this._records&&!dojo.isArray(this._records)){this._records=[this._records];}if(!_356){this.onFetch(res,_357||{});}if(this._config.autoActivate){if(this.getRecordsCount()==1){this.activateRecord(this.getRecord(0));}}return res;},_handleError:function(res){if(!res["success"]){var msg="Error occured at server: \n";if(errs=res["errors"]){for(var i=errs.length;i--;){var err=errs[i];msg+=err.action+": "+err.msg+(err.stmt?"\nStatement: "+err.stmt:"")+"\n-----------------------\n";}alert(msg);console.error(msg);}}return res;},clearRequest:function(){this._request={};},deactivate:function(){this._activeRec=null;},setValue:function(_35c,_35d){var req=this._request;if(req[_35c]!=undefined&&!dojo.isArray(req[_35c])){req[_35c]=[req[_35c]];req[_35c].push(_35d);}else{if(dojo.isArray(req[_35c])){req[_35c].push(_35d);}else{req[_35c]=_35d;}}},setValues:function(_35f,_360){if(!this._request[_35f]){this._request[_35f]=["FAKE"];}if(!dojo.isArray(_360)){_360=[_360];}this._request[_35f]=this._request[_35f].concat(_360);},save:function(_361){_361=_361||{};_361.skipTriggers=_361.skipTriggers||[];if(triggers=this._config.save.trigger){dojo.forEach(triggers,dojo.hitch(this,function(_362){if(this._request[_362.P]!==undefined&&dojo.indexOf(_361.skipTriggers,_362.P)==-1){this.saveOnTrigger(_362);}}));}if(ic.isEmpty(this._request)){var dfd=new dojo.Deferred();setTimeout(dojo.hitch(dfd,"callback",true),50);return dfd;}var dfd=this._send(this._config.save.url,this._request);dfd.addCallback(this,"onSave");return dfd;},saveOnTrigger:function(_364){var _365={};dojo.forEach(_364.params,dojo.hitch(this,function(p){_365[p]=this._request[p];}));var dfd=this._send(_364.url,_365,dojo.hitch(this,"onTriggerSave",_364));dfd.addCallback(function(v){dojo.publish("ic.data.DataSource.saveOnTrigger#"+_364.P,[v,dojo.clone(_365)]);});var _id=this.getIdName();dojo.forEach(_364.params,dojo.hitch(this,function(p){if(p!=_id){delete this._request[p];}}));var keys=[];for(k in this._request){keys.push(k);}if(keys.length==1&&keys[0]==_id){delete this._request[_id];}},cancel:function(_36c){while(d=_36c.pop()){d.cancel();}},cancelLoad:function(){this.cancel(this._dfd.LOAD);},getConverter:function(){if(!this._converter&&(cn=this._config.load.converter)){this._converter=new (dojo.getObject(cn))();}return this._converter;},_idOrRecToRec:function(_36d){return isNaN(parseInt(_36d))?_36d:this.getRecordById(_36d);},_idOrRecToId:function(_36e){return isNaN(parseInt(_36e))?this.getRecordId(_36e):_36e;},createSaveRequestFromJson:function(_36f){this.clearRequest();for(p in _36f){this.setValue(p,_36f[p]);}},onFetch:function(){},onFetchOne:function(){},onSave:function(cbv){return cbv;},onTriggerSave:function(){},onDelete:function(res){return res;},onRecordActivated:function(rec){},onRecordReloaded:function(){},getConfiguration:function(){return {obj:this,setAutoActivate:function(v){this.obj._config.autoActivate=!!v;}};},getConfig:function(){return this.getConfiguration();},saveRecord:function(_374){this._send(this._config.save.url,_374,dojo.hitch(this,"onSave"));}});ic.data.DataSource.dss={};ic.data.DataSource.create=function(_375,uid){if(uid&&(ds=ic.data.DataSource.dss[uid])){return ds;}var ds=new ic.data.DataSource(_375);if(uid){ic.data.DataSource.dss[uid]=ds;}return ds;};ic.data.find=function(uid){if(ds=ic.data.DataSource.dss[uid]){return ds;}for(var p in ic.DS_CONFIG){if(ic.DS_CONFIG[p].uid==uid){return ic.data.create(ic.DS_CONFIG[p],uid);}}return null;};ic.data.create=ic.data.DataSource.create;}if(!dojo._hasResource["ic.widget.Button"]){dojo._hasResource["ic.widget.Button"]=true;dojo.provide("ic.widget.Button");dojo.declare("ic.widget.Button",ic.widget._Widget,{templateString:"<div class=\"icButton\" dojoAttachEvent=\"onclick: _onClick\" title=\"${title}\">\n\t<div class=\"icLightGrayArea\">\n\t<a href=\"javascript:void(0);\">\n\t\t<div class=\"icBottomLeft\"></div><div class=\"icBottomRight\"></div>\n\t\t<div class=\"icTopLeft\"></div><div class=\"icTopRight\"></div>\n\t\t<div class=\"icButtonCaption\" dojoAttachPoint=\"captionNode\">${caption}</div>\n\t\t<div class=\"icButtonIcon\"></div>\n\t</a>\n\t</div>\n</div>\n",title:"",caption:"",captionNode:null,_disabled:false,_onClick:function(evt){dojo.stopEvent(evt);if(this._disabled){return false;}this.onClick();},onClick:function(){},setTitle:function(_37b){this.title=dojo.attr(this.domNode,{title:_37b});},setCaption:function(_37c){if(!this.title){this.setTitle(_37c);}this.caption=this.captionNode.innerHTML=_37c;},hide:function(){dojo.style(this.domNode,"display","none");},show:function(){dojo.style(this.domNode,"display","block");},setDisabled:function(_37d){this._disabled=_37d;},isDisabled:function(){return this._disabled;}});}if(!dojo._hasResource["dojo.regexp"]){dojo._hasResource["dojo.regexp"]=true;dojo.provide("dojo.regexp");dojo.regexp.escapeString=function(str,_37f){return str.replace(/([\.$?*|{}\(\)\[\]\\\/\+^])/g,function(ch){if(_37f&&_37f.indexOf(ch)!=-1){return ch;}return "\\"+ch;});};dojo.regexp.buildGroupRE=function(arr,re,_383){if(!(arr instanceof Array)){return re(arr);}var b=[];for(var i=0;i<arr.length;i++){b.push(re(arr[i]));}return dojo.regexp.group(b.join("|"),_383);};dojo.regexp.group=function(_386,_387){return "("+(_387?"?:":"")+_386+")";};}if(!dojo._hasResource["dojo.cookie"]){dojo._hasResource["dojo.cookie"]=true;dojo.provide("dojo.cookie");dojo.cookie=function(name,_389,_38a){var c=document.cookie;if(arguments.length==1){var _38c=c.match(new RegExp("(?:^|; )"+dojo.regexp.escapeString(name)+"=([^;]*)"));return _38c?decodeURIComponent(_38c[1]):undefined;}else{_38a=_38a||{};var exp=_38a.expires;if(typeof exp=="number"){var d=new Date();d.setTime(d.getTime()+exp*24*60*60*1000);exp=_38a.expires=d;}if(exp&&exp.toUTCString){_38a.expires=exp.toUTCString();}_389=encodeURIComponent(_389);var _38f=name+"="+_389,_390;for(_390 in _38a){_38f+="; "+_390;var _391=_38a[_390];if(_391!==true){_38f+="="+_391;}}document.cookie=_38f;}};dojo.cookie.isSupported=function(){if(!("cookieEnabled" in navigator)){this("__djCookieTest__","CookiesAllowed");navigator.cookieEnabled=this("__djCookieTest__")=="CookiesAllowed";if(navigator.cookieEnabled){this("__djCookieTest__","",{expires:-1});}}return navigator.cookieEnabled;};}if(!dojo._hasResource["dojox.encoding.base64"]){dojo._hasResource["dojox.encoding.base64"]=true;dojo.provide("dojox.encoding.base64");(function(){var p="=";var tab="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";var dxe=dojox.encoding;dxe.base64.encode=function(ba){var s=[],l=ba.length;var rm=l%3;var x=l-rm;for(var i=0;i<x;){var t=ba[i++]<<16|ba[i++]<<8|ba[i++];s.push(tab.charAt((t>>>18)&63));s.push(tab.charAt((t>>>12)&63));s.push(tab.charAt((t>>>6)&63));s.push(tab.charAt(t&63));}switch(rm){case 2:var t=ba[i++]<<16|ba[i++]<<8;s.push(tab.charAt((t>>>18)&63));s.push(tab.charAt((t>>>12)&63));s.push(tab.charAt((t>>>6)&63));s.push(p);break;case 1:var t=ba[i++]<<16;s.push(tab.charAt((t>>>18)&63));s.push(tab.charAt((t>>>12)&63));s.push(p);s.push(p);break;}return s.join("");};dxe.base64.decode=function(str){var s=str.split(""),out=[];var l=s.length;while(s[--l]==p){}for(var i=0;i<l;){var t=tab.indexOf(s[i++])<<18;if(i<=l){t|=tab.indexOf(s[i++])<<12;}if(i<=l){t|=tab.indexOf(s[i++])<<6;}if(i<=l){t|=tab.indexOf(s[i++]);}out.push((t>>>16)&255);out.push((t>>>8)&255);out.push(t&255);}while(out[out.length-1]==0){out.pop();}return out;};})();}if(!dojo._hasResource["dojox.encoding.crypto._base"]){dojo._hasResource["dojox.encoding.crypto._base"]=true;dojo.provide("dojox.encoding.crypto._base");(function(){var c=dojox.encoding.crypto;c.cipherModes={ECB:0,CBC:1,PCBC:2,CFB:3,OFB:4,CTR:5};c.outputTypes={Base64:0,Hex:1,String:2,Raw:3};})();}if(!dojo._hasResource["dojox.encoding.crypto.Blowfish"]){dojo._hasResource["dojox.encoding.crypto.Blowfish"]=true;dojo.provide("dojox.encoding.crypto.Blowfish");dojox.encoding.crypto.Blowfish=new function(){var POW2=Math.pow(2,2);var POW3=Math.pow(2,3);var POW4=Math.pow(2,4);var POW8=Math.pow(2,8);var _3a7=Math.pow(2,16);var _3a8=Math.pow(2,24);var iv=null;var _3aa={p:[608135816,2242054355,320440878,57701188,2752067618,698298832,137296536,3964562569,1160258022,953160567,3193202383,887688300,3232508343,3380367581,1065670069,3041331479,2450970073,2306472731],s0:[3509652390,2564797868,805139163,3491422135,3101798381,1780907670,3128725573,4046225305,614570311,3012652279,134345442,2240740374,1667834072,1901547113,2757295779,4103290238,227898511,1921955416,1904987480,2182433518,2069144605,3260701109,2620446009,720527379,3318853667,677414384,3393288472,3101374703,2390351024,1614419982,1822297739,2954791486,3608508353,3174124327,2024746970,1432378464,3864339955,2857741204,1464375394,1676153920,1439316330,715854006,3033291828,289532110,2706671279,2087905683,3018724369,1668267050,732546397,1947742710,3462151702,2609353502,2950085171,1814351708,2050118529,680887927,999245976,1800124847,3300911131,1713906067,1641548236,4213287313,1216130144,1575780402,4018429277,3917837745,3693486850,3949271944,596196993,3549867205,258830323,2213823033,772490370,2760122372,1774776394,2652871518,566650946,4142492826,1728879713,2882767088,1783734482,3629395816,2517608232,2874225571,1861159788,326777828,3124490320,2130389656,2716951837,967770486,1724537150,2185432712,2364442137,1164943284,2105845187,998989502,3765401048,2244026483,1075463327,1455516326,1322494562,910128902,469688178,1117454909,936433444,3490320968,3675253459,1240580251,122909385,2157517691,634681816,4142456567,3825094682,3061402683,2540495037,79693498,3249098678,1084186820,1583128258,426386531,1761308591,1047286709,322548459,995290223,1845252383,2603652396,3431023940,2942221577,3202600964,3727903485,1712269319,422464435,3234572375,1170764815,3523960633,3117677531,1434042557,442511882,3600875718,1076654713,1738483198,4213154764,2393238008,3677496056,1014306527,4251020053,793779912,2902807211,842905082,4246964064,1395751752,1040244610,2656851899,3396308128,445077038,3742853595,3577915638,679411651,2892444358,2354009459,1767581616,3150600392,3791627101,3102740896,284835224,4246832056,1258075500,768725851,2589189241,3069724005,3532540348,1274779536,3789419226,2764799539,1660621633,3471099624,4011903706,913787905,3497959166,737222580,2514213453,2928710040,3937242737,1804850592,3499020752,2949064160,2386320175,2390070455,2415321851,4061277028,2290661394,2416832540,1336762016,1754252060,3520065937,3014181293,791618072,3188594551,3933548030,2332172193,3852520463,3043980520,413987798,3465142937,3030929376,4245938359,2093235073,3534596313,375366246,2157278981,2479649556,555357303,3870105701,2008414854,3344188149,4221384143,3956125452,2067696032,3594591187,2921233993,2428461,544322398,577241275,1471733935,610547355,4027169054,1432588573,1507829418,2025931657,3646575487,545086370,48609733,2200306550,1653985193,298326376,1316178497,3007786442,2064951626,458293330,2589141269,3591329599,3164325604,727753846,2179363840,146436021,1461446943,4069977195,705550613,3059967265,3887724982,4281599278,3313849956,1404054877,2845806497,146425753,1854211946],s1:[1266315497,3048417604,3681880366,3289982499,2909710000,1235738493,2632868024,2414719590,3970600049,1771706367,1449415276,3266420449,422970021,1963543593,2690192192,3826793022,1062508698,1531092325,1804592342,2583117782,2714934279,4024971509,1294809318,4028980673,1289560198,2221992742,1669523910,35572830,157838143,1052438473,1016535060,1802137761,1753167236,1386275462,3080475397,2857371447,1040679964,2145300060,2390574316,1461121720,2956646967,4031777805,4028374788,33600511,2920084762,1018524850,629373528,3691585981,3515945977,2091462646,2486323059,586499841,988145025,935516892,3367335476,2599673255,2839830854,265290510,3972581182,2759138881,3795373465,1005194799,847297441,406762289,1314163512,1332590856,1866599683,4127851711,750260880,613907577,1450815602,3165620655,3734664991,3650291728,3012275730,3704569646,1427272223,778793252,1343938022,2676280711,2052605720,1946737175,3164576444,3914038668,3967478842,3682934266,1661551462,3294938066,4011595847,840292616,3712170807,616741398,312560963,711312465,1351876610,322626781,1910503582,271666773,2175563734,1594956187,70604529,3617834859,1007753275,1495573769,4069517037,2549218298,2663038764,504708206,2263041392,3941167025,2249088522,1514023603,1998579484,1312622330,694541497,2582060303,2151582166,1382467621,776784248,2618340202,3323268794,2497899128,2784771155,503983604,4076293799,907881277,423175695,432175456,1378068232,4145222326,3954048622,3938656102,3820766613,2793130115,2977904593,26017576,3274890735,3194772133,1700274565,1756076034,4006520079,3677328699,720338349,1533947780,354530856,688349552,3973924725,1637815568,332179504,3949051286,53804574,2852348879,3044236432,1282449977,3583942155,3416972820,4006381244,1617046695,2628476075,3002303598,1686838959,431878346,2686675385,1700445008,1080580658,1009431731,832498133,3223435511,2605976345,2271191193,2516031870,1648197032,4164389018,2548247927,300782431,375919233,238389289,3353747414,2531188641,2019080857,1475708069,455242339,2609103871,448939670,3451063019,1395535956,2413381860,1841049896,1491858159,885456874,4264095073,4001119347,1565136089,3898914787,1108368660,540939232,1173283510,2745871338,3681308437,4207628240,3343053890,4016749493,1699691293,1103962373,3625875870,2256883143,3830138730,1031889488,3479347698,1535977030,4236805024,3251091107,2132092099,1774941330,1199868427,1452454533,157007616,2904115357,342012276,595725824,1480756522,206960106,497939518,591360097,863170706,2375253569,3596610801,1814182875,2094937945,3421402208,1082520231,3463918190,2785509508,435703966,3908032597,1641649973,2842273706,3305899714,1510255612,2148256476,2655287854,3276092548,4258621189,236887753,3681803219,274041037,1734335097,3815195456,3317970021,1899903192,1026095262,4050517792,356393447,2410691914,3873677099,3682840055],s2:[3913112168,2491498743,4132185628,2489919796,1091903735,1979897079,3170134830,3567386728,3557303409,857797738,1136121015,1342202287,507115054,2535736646,337727348,3213592640,1301675037,2528481711,1895095763,1721773893,3216771564,62756741,2142006736,835421444,2531993523,1442658625,3659876326,2882144922,676362277,1392781812,170690266,3921047035,1759253602,3611846912,1745797284,664899054,1329594018,3901205900,3045908486,2062866102,2865634940,3543621612,3464012697,1080764994,553557557,3656615353,3996768171,991055499,499776247,1265440854,648242737,3940784050,980351604,3713745714,1749149687,3396870395,4211799374,3640570775,1161844396,3125318951,1431517754,545492359,4268468663,3499529547,1437099964,2702547544,3433638243,2581715763,2787789398,1060185593,1593081372,2418618748,4260947970,69676912,2159744348,86519011,2512459080,3838209314,1220612927,3339683548,133810670,1090789135,1078426020,1569222167,845107691,3583754449,4072456591,1091646820,628848692,1613405280,3757631651,526609435,236106946,48312990,2942717905,3402727701,1797494240,859738849,992217954,4005476642,2243076622,3870952857,3732016268,765654824,3490871365,2511836413,1685915746,3888969200,1414112111,2273134842,3281911079,4080962846,172450625,2569994100,980381355,4109958455,2819808352,2716589560,2568741196,3681446669,3329971472,1835478071,660984891,3704678404,4045999559,3422617507,3040415634,1762651403,1719377915,3470491036,2693910283,3642056355,3138596744,1364962596,2073328063,1983633131,926494387,3423689081,2150032023,4096667949,1749200295,3328846651,309677260,2016342300,1779581495,3079819751,111262694,1274766160,443224088,298511866,1025883608,3806446537,1145181785,168956806,3641502830,3584813610,1689216846,3666258015,3200248200,1692713982,2646376535,4042768518,1618508792,1610833997,3523052358,4130873264,2001055236,3610705100,2202168115,4028541809,2961195399,1006657119,2006996926,3186142756,1430667929,3210227297,1314452623,4074634658,4101304120,2273951170,1399257539,3367210612,3027628629,1190975929,2062231137,2333990788,2221543033,2438960610,1181637006,548689776,2362791313,3372408396,3104550113,3145860560,296247880,1970579870,3078560182,3769228297,1714227617,3291629107,3898220290,166772364,1251581989,493813264,448347421,195405023,2709975567,677966185,3703036547,1463355134,2715995803,1338867538,1343315457,2802222074,2684532164,233230375,2599980071,2000651841,3277868038,1638401717,4028070440,3237316320,6314154,819756386,300326615,590932579,1405279636,3267499572,3150704214,2428286686,3959192993,3461946742,1862657033,1266418056,963775037,2089974820,2263052895,1917689273,448879540,3550394620,3981727096,150775221,3627908307,1303187396,508620638,2975983352,2726630617,1817252668,1876281319,1457606340,908771278,3720792119,3617206836,2455994898,1729034894,1080033504],s3:[976866871,3556439503,2881648439,1522871579,1555064734,1336096578,3548522304,2579274686,3574697629,3205460757,3593280638,3338716283,3079412587,564236357,2993598910,1781952180,1464380207,3163844217,3332601554,1699332808,1393555694,1183702653,3581086237,1288719814,691649499,2847557200,2895455976,3193889540,2717570544,1781354906,1676643554,2592534050,3230253752,1126444790,2770207658,2633158820,2210423226,2615765581,2414155088,3127139286,673620729,2805611233,1269405062,4015350505,3341807571,4149409754,1057255273,2012875353,2162469141,2276492801,2601117357,993977747,3918593370,2654263191,753973209,36408145,2530585658,25011837,3520020182,2088578344,530523599,2918365339,1524020338,1518925132,3760827505,3759777254,1202760957,3985898139,3906192525,674977740,4174734889,2031300136,2019492241,3983892565,4153806404,3822280332,352677332,2297720250,60907813,90501309,3286998549,1016092578,2535922412,2839152426,457141659,509813237,4120667899,652014361,1966332200,2975202805,55981186,2327461051,676427537,3255491064,2882294119,3433927263,1307055953,942726286,933058658,2468411793,3933900994,4215176142,1361170020,2001714738,2830558078,3274259782,1222529897,1679025792,2729314320,3714953764,1770335741,151462246,3013232138,1682292957,1483529935,471910574,1539241949,458788160,3436315007,1807016891,3718408830,978976581,1043663428,3165965781,1927990952,4200891579,2372276910,3208408903,3533431907,1412390302,2931980059,4132332400,1947078029,3881505623,4168226417,2941484381,1077988104,1320477388,886195818,18198404,3786409000,2509781533,112762804,3463356488,1866414978,891333506,18488651,661792760,1628790961,3885187036,3141171499,876946877,2693282273,1372485963,791857591,2686433993,3759982718,3167212022,3472953795,2716379847,445679433,3561995674,3504004811,3574258232,54117162,3331405415,2381918588,3769707343,4154350007,1140177722,4074052095,668550556,3214352940,367459370,261225585,2610173221,4209349473,3468074219,3265815641,314222801,3066103646,3808782860,282218597,3406013506,3773591054,379116347,1285071038,846784868,2669647154,3771962079,3550491691,2305946142,453669953,1268987020,3317592352,3279303384,3744833421,2610507566,3859509063,266596637,3847019092,517658769,3462560207,3443424879,370717030,4247526661,2224018117,4143653529,4112773975,2788324899,2477274417,1456262402,2901442914,1517677493,1846949527,2295493580,3734397586,2176403920,1280348187,1908823572,3871786941,846861322,1172426758,3287448474,3383383037,1655181056,3139813346,901632758,1897031941,2986607138,3066810236,3447102507,1393639104,373351379,950779232,625454576,3124240540,4148612726,2007998917,544563296,2244738638,2330496472,2058025392,1291430526,424198748,50039436,29584100,3605783033,2429876329,2791104160,1057563949,3255363231,3075367218,3463963227,1469046755,985887462]};function add(x,y){return (((x>>16)+(y>>16)+(((x&65535)+(y&65535))>>16))<<16)|(((x&65535)+(y&65535))&65535);};function xor(x,y){return (((x>>16)^(y>>16))<<16)|(((x&65535)^(y&65535))&65535);};function $(v,box){var d=box.s3[v&255];v>>=8;var c=box.s2[v&255];v>>=8;var b=box.s1[v&255];v>>=8;var a=box.s0[v&255];var r=(((a>>16)+(b>>16)+(((a&65535)+(b&65535))>>16))<<16)|(((a&65535)+(b&65535))&65535);r=(((r>>16)^(c>>16))<<16)|(((r&65535)^(c&65535))&65535);return (((r>>16)+(d>>16)+(((r&65535)+(d&65535))>>16))<<16)|(((r&65535)+(d&65535))&65535);};function eb(o,box){var l=o.left;var r=o.right;l=xor(l,box.p[0]);r=xor(r,xor($(l,box),box.p[1]));l=xor(l,xor($(r,box),box.p[2]));r=xor(r,xor($(l,box),box.p[3]));l=xor(l,xor($(r,box),box.p[4]));r=xor(r,xor($(l,box),box.p[5]));l=xor(l,xor($(r,box),box.p[6]));r=xor(r,xor($(l,box),box.p[7]));l=xor(l,xor($(r,box),box.p[8]));r=xor(r,xor($(l,box),box.p[9]));l=xor(l,xor($(r,box),box.p[10]));r=xor(r,xor($(l,box),box.p[11]));l=xor(l,xor($(r,box),box.p[12]));r=xor(r,xor($(l,box),box.p[13]));l=xor(l,xor($(r,box),box.p[14]));r=xor(r,xor($(l,box),box.p[15]));l=xor(l,xor($(r,box),box.p[16]));o.right=l;o.left=xor(r,box.p[17]);};function db(o,box){var l=o.left;var r=o.right;l=xor(l,box.p[17]);r=xor(r,xor($(l,box),box.p[16]));l=xor(l,xor($(r,box),box.p[15]));r=xor(r,xor($(l,box),box.p[14]));l=xor(l,xor($(r,box),box.p[13]));r=xor(r,xor($(l,box),box.p[12]));l=xor(l,xor($(r,box),box.p[11]));r=xor(r,xor($(l,box),box.p[10]));l=xor(l,xor($(r,box),box.p[9]));r=xor(r,xor($(l,box),box.p[8]));l=xor(l,xor($(r,box),box.p[7]));r=xor(r,xor($(l,box),box.p[6]));l=xor(l,xor($(r,box),box.p[5]));r=xor(r,xor($(l,box),box.p[4]));l=xor(l,xor($(r,box),box.p[3]));r=xor(r,xor($(l,box),box.p[2]));l=xor(l,xor($(r,box),box.p[1]));o.right=l;o.left=xor(r,box.p[0]);};function init(key){var k=key;if(dojo.isString(k)){k=dojo.map(k.split(""),function(item){return item.charCodeAt(0)&255;});}var pos=0,data=0,res={left:0,right:0},i,j,l;var box={p:dojo.map(_3aa.p.slice(0),function(item){var l=k.length,j;for(j=0;j<4;j++){data=(data*POW8)|k[pos++%l];}return (((item>>16)^(data>>16))<<16)|(((item&65535)^(data&65535))&65535);}),s0:_3aa.s0.slice(0),s1:_3aa.s1.slice(0),s2:_3aa.s2.slice(0),s3:_3aa.s3.slice(0)};for(i=0,l=box.p.length;i<l;){eb(res,box);box.p[i++]=res.left,box.p[i++]=res.right;}for(i=0;i<4;i++){for(j=0,l=box["s"+i].length;j<l;){eb(res,box);box["s"+i][j++]=res.left,box["s"+i][j++]=res.right;}}return box;};this.getIV=function(_3d0){var out=_3d0||dojox.encoding.crypto.outputTypes.Base64;switch(out){case dojox.encoding.crypto.outputTypes.Hex:return dojo.map(iv,function(item){return (item<=15?"0":"")+item.toString(16);}).join("");case dojox.encoding.crypto.outputTypes.String:return iv.join("");case dojox.encoding.crypto.outputTypes.Raw:return iv;default:return dojox.encoding.base64.encode(iv);}};this.setIV=function(data,_3d4){var ip=_3d4||dojox.encoding.crypto.outputTypes.Base64;var ba=null;switch(ip){case dojox.encoding.crypto.outputTypes.String:ba=dojo.map(data.split(""),function(item){return item.charCodeAt(0);});break;case dojox.encoding.crypto.outputTypes.Hex:ba=[];for(var i=0,l=data.length-1;i<l;i+=2){ba.push(parseInt(data.substr(i,2),16));}break;case dojox.encoding.crypto.outputTypes.Raw:ba=data;break;default:ba=dojox.encoding.base64.decode(data);break;}iv={};iv.left=ba[0]*_3a8|ba[1]*_3a7|ba[2]*POW8|ba[3];iv.right=ba[4]*_3a8|ba[5]*_3a7|ba[6]*POW8|ba[7];};this.encrypt=function(_3da,key,ao){var out=dojox.encoding.crypto.outputTypes.Base64;var mode=dojox.encoding.crypto.cipherModes.ECB;if(ao){if(ao.outputType){out=ao.outputType;}if(ao.cipherMode){mode=ao.cipherMode;}}var bx=init(key),_3e0=8-(_3da.length&7);for(var i=0;i<_3e0;i++){_3da+=String.fromCharCode(_3e0);}var _3e2=[],_3e3=_3da.length>>3,pos=0,o={},_3e6=(mode==dojox.encoding.crypto.cipherModes.CBC);var _3e7={left:iv.left||null,right:iv.right||null};for(var i=0;i<_3e3;i++){o.left=_3da.charCodeAt(pos)*_3a8|_3da.charCodeAt(pos+1)*_3a7|_3da.charCodeAt(pos+2)*POW8|_3da.charCodeAt(pos+3);o.right=_3da.charCodeAt(pos+4)*_3a8|_3da.charCodeAt(pos+5)*_3a7|_3da.charCodeAt(pos+6)*POW8|_3da.charCodeAt(pos+7);if(_3e6){o.left=(((o.left>>16)^(_3e7.left>>16))<<16)|(((o.left&65535)^(_3e7.left&65535))&65535);o.right=(((o.right>>16)^(_3e7.right>>16))<<16)|(((o.right&65535)^(_3e7.right&65535))&65535);}eb(o,bx);if(_3e6){_3e7.left=o.left;_3e7.right=o.right;}_3e2.push((o.left>>24)&255);_3e2.push((o.left>>16)&255);_3e2.push((o.left>>8)&255);_3e2.push(o.left&255);_3e2.push((o.right>>24)&255);_3e2.push((o.right>>16)&255);_3e2.push((o.right>>8)&255);_3e2.push(o.right&255);pos+=8;}switch(out){case dojox.encoding.crypto.outputTypes.Hex:return dojo.map(_3e2,function(item){return (item<=15?"0":"")+item.toString(16);}).join("");case dojox.encoding.crypto.outputTypes.String:return _3e2.join("");case dojox.encoding.crypto.outputTypes.Raw:return _3e2;default:return dojox.encoding.base64.encode(_3e2);}};this.decrypt=function(_3e9,key,ao){var ip=dojox.encoding.crypto.outputTypes.Base64;var mode=dojox.encoding.crypto.cipherModes.ECB;if(ao){if(ao.outputType){ip=ao.outputType;}if(ao.cipherMode){mode=ao.cipherMode;}}var bx=init(key);var pt=[];var c=null;switch(ip){case dojox.encoding.crypto.outputTypes.Hex:c=[];for(var i=0,l=_3e9.length-1;i<l;i+=2){c.push(parseInt(_3e9.substr(i,2),16));}break;case dojox.encoding.crypto.outputTypes.String:c=dojo.map(_3e9.split(""),function(item){return item.charCodeAt(0);});break;case dojox.encoding.crypto.outputTypes.Raw:c=_3e9;break;default:c=dojox.encoding.base64.decode(_3e9);break;}var _3f4=c.length>>3,pos=0,o={},_3f7=(mode==dojox.encoding.crypto.cipherModes.CBC);var _3f8={left:iv.left||null,right:iv.right||null};for(var i=0;i<_3f4;i++){o.left=c[pos]*_3a8|c[pos+1]*_3a7|c[pos+2]*POW8|c[pos+3];o.right=c[pos+4]*_3a8|c[pos+5]*_3a7|c[pos+6]*POW8|c[pos+7];if(_3f7){var left=o.left;var _3fa=o.right;}db(o,bx);if(_3f7){o.left=(((o.left>>16)^(_3f8.left>>16))<<16)|(((o.left&65535)^(_3f8.left&65535))&65535);o.right=(((o.right>>16)^(_3f8.right>>16))<<16)|(((o.right&65535)^(_3f8.right&65535))&65535);_3f8.left=left;_3f8.right=_3fa;}pt.push((o.left>>24)&255);pt.push((o.left>>16)&255);pt.push((o.left>>8)&255);pt.push(o.left&255);pt.push((o.right>>24)&255);pt.push((o.right>>16)&255);pt.push((o.right>>8)&255);pt.push(o.right&255);pos+=8;}if(pt[pt.length-1]==pt[pt.length-2]||pt[pt.length-1]==1){var n=pt[pt.length-1];pt.splice(pt.length-n,n);}return dojo.map(pt,function(item){return String.fromCharCode(item);}).join("");};this.setIV("0000000000000000",dojox.encoding.crypto.outputTypes.Hex);}();}if(!dojo._hasResource["ic.widget.LoginForm"]){dojo._hasResource["ic.widget.LoginForm"]=true;dojo.provide("ic.widget.LoginForm");dojo.declare("ic.widget.LoginForm",ic.widget._Widget,{_ds:null,_loginInProgress:null,loginBlockNode:null,headerNode:null,titleNode:null,notifyBoxBadNode:null,usernameNode:null,passwordNode:null,remembermeNode:null,loginFormNode:null,loginButtonNode:null,boxSecureNode:null,swapFormsNode:null,restoreBlockNode:null,restoreFormNode:null,restoreButtonNode:null,restoreUserNode:null,restoreErrorNode:null,startup:function(_3fd){this._ds=ic.data.create(ic.DS_CONFIG.LOGIN,ic.DS_CONFIG.LOGIN.uid);ic.pngfix.apply([".icCorners .icTopLeft",".icCorners .icTopRight",".icCorners .icBottomLeft",".icCorners .icBottomRight",".icRight",".icBottom"].join(", "),this.domNode);dojo.forEach(this.swapFormsNode,dojo.hitch(this,function(node){dojo.connect(node,"onclick",dojo.hitch(this,function(evt){dojo.stopEvent(evt);this.swapForms();}));}));this._loginInProgress=false;dojo.connect(ic.byId("idGetStarted"),"onClick",dojo.hitch(this,function(evt){this.login(evt);}));dojo.connect(this.loginFormNode,"onsubmit",dojo.hitch(this,function(evt){this.login(evt);}));this._b_key="__CHANGE_ME__";this._b_obj=dojox.encoding.crypto.Blowfish;if(this._b_obj&&dojo.cookie("remember_me")){var _402=dojo.fromJson(this._b_obj.decrypt(dojo.cookie("remember_me"),this._b_key)||"");if(_402["username"]){this.usernameNode.value=_402["username"];}if(_402["password"]){this.passwordNode.value=_402["password"];}if(_402){this.remembermeNode.checked=true;}}dojo.connect(this.remembermeNode,"onchange",dojo.hitch(this,function(evt){if(!this.remembermeNode.checked){dojo.cookie("remember_me",null);}}));dojo.connect(this._ds,"onFetch",dojo.hitch(this,function(_404){if(!_404.success){this.restoreErrorNode.innerHTML=_404.message;}else{this.swapForms();this.restoreErrorNode.innerHTML="";this.loginInfoNode.innerHTML=_404.message;}}));dojo.connect(ic.byId("idGeneratePassword"),"onClick",dojo.hitch(this,function(evt){this.restore(evt);}));dojo.connect(this.restoreFormNode,"onsubmit",dojo.hitch(this,function(evt){this.restore(evt);}));},focus:function(){this.usernameNode.focus();},login:function(evt){if(this._loginInProgress){return false;}if(evt){dojo.stopEvent(evt);}var _408=this.usernameNode;var _409=this.passwordNode;var _40a=this.remembermeNode;dojo.removeClass(_408,"notify_bad");dojo.removeClass(_409,"notify_bad");dojo.removeClass(this.loginBlockNode,"icLoginBad");dojo.style(this.notifyBoxBadNode,"display","none");if(!_408.value.length||!_409.value.length){dojo.addClass(_408,"notify_bad");dojo.addClass(_409,"notify_bad");dojo.addClass(this.loginBlockNode,"icLoginBad");dojo.style(this.notifyBoxBadNode,"display","block");return false;}var _40b=dojo.formToObject(this.loginFormNode);_40b["ajaxCall"]=1;this._loginInProgress=true;dojo.xhrPost({url:this.loginFormNode.getAttribute("action"),content:_40b,sync:true,load:dojo.hitch(this,function(data,_40d){if(data&&dojo.string.trim(data)=="AUTHENTICATED"){try{if(_40a.checked){dojo.cookie("remember_me",this._b_obj.encrypt(dojo.toJson({"username":_408.value,"password":_409.value}),this._b_key),{expires:3650});}}catch(_e){}window.location.href="/dashboard/";}else{dojo.addClass(_408,"notify_bad");dojo.addClass(_409,"notify_bad");dojo.addClass(this.loginBlockNode,"icLoginBad");dojo.style(this.notifyBoxBadNode,"display","block");}this._loginInProgress=false;}),error:function(data,_40f){this._loginInProgress=false;}});return false;},restore:function(evt){if(evt){dojo.stopEvent(evt);}var _411=this.restoreUserNode;var _412=dojo.trim(_411.value);if(!_412){return alert("Specify username please!");}this._ds.fetch({query:{username:_412}});},swapForms:function(){var _413=dojo.style(this.restoreBlockNode,"display");dojo.style(this.restoreBlockNode,"display",dojo.style(this.loginBlockNode,"display"));dojo.style(this.loginBlockNode,"display",_413);},setLoginMode:function(evt){dojo.style(this.loginBlockNode,"display","none");dojo.style(this.restoreBlockNode,"display","block");},setRestoreMode:function(evt){dojo.style(this.loginBlockNode,"display","block");dojo.style(this.restoreBlockNode,"display","none");}});}dojo.addOnLoad(function(){});
