function CEUtils(){}function CECleanTicks(n,t,i,r,u){var e,f,c,o,s,h;s=Math.log(2)/Math.LN10;h=Math.log(5)/Math.LN10;r=Math.max(0,r);i>0&&t>0?(c=t/i,e=Math.log(c)/Math.LN10,o=Math.floor(e),f=e-o,f!==0&&(f<s?f=s:f<h?f=h:(o++,f=0)),e=o+f,this.TickSpacing=Math.max(Math.exp(Math.LN10*e),u),this.LowTick=Math.floor(n/this.TickSpacing)*this.TickSpacing,this.HighTick=Math.ceil((n+t)/this.TickSpacing)*this.TickSpacing,this.TickRange=this.HighTick-this.LowTick,this.NumTicks=Math.ceil((n+t)/this.TickSpacing)-Math.floor(n/this.TickSpacing)+1,this.DecPlaces=Math.max(-o,0)):(this.LowTick=n,this.HighTick=n+1,this.TickRange=1,this.TickSpacing=1,this.NumTicks=2,this.DecPlaces=0)}function eventTimer(){events.doPost()}function eventRespond(n){return events.respond(this,n||window.event)}function eventIgnore(n){return n||(n=window.event),n.cancelBubble=!0,n.stopPropagation&&n.stopPropagation(),!1}function eventGoogleLoaded(){rp.googleMapsLoaded()}function CEEvents(){this.deferred=[];this.postTimer=null;this.immediateList=[]}function CEWindow(n){ui[n.id]=this;this.options=n;this.control=null;this.domNode=window.document.createElement("div");this.domNode.className="cewindow";n.cn&&utils.setClass(this.domNode,n.cn,!0);n.title&&(this.divTitle=window.document.createElement("div"),this.divTitle.className="cewindow_caption",this.divTitle.innerHTML=utils.htmlEncode(n.title),this.domNode.appendChild(this.divTitle));this.containerNode=window.document.createElement("div");this.containerNode.className="cewindow_container";this.domNode.appendChild(this.containerNode);n.html&&(this.containerNode.innerHTML=n.html);n.close&&(this.divClose=window.document.createElement("div"),this.divClose.className="cewindow_close",this.divClose.innerHTML="&times;",this.domNode.appendChild(this.divClose),events.add(this.divClose,"click",this,this.closeClick));this.state=0}function CE2Split(n){ui[n.id]=this;this.id=n.id;this.left=null;this.middle=null;this.right=null;this.leftExpandedWidth=250;this.rightExpandedWidth=600;this.splitterWidth=12;this.leftWidth=this.leftExpandedWidth;this.rightWidth=this.rightExpandedWidth;n.domid?(this.domNode=window.document.getElementById(n.domid),this.domNode.innerHTML=""):this.domNode=window.document.createElement("div");this.domNode.className="ce2split";this.divLeft=window.document.createElement("div");this.divLeft.id=n.id+"_left";this.divLeft.className="ce2split_left";this.divLeftSplitter=window.document.createElement("div");this.divLeftSplitter.id=n.id+"_leftsplitter";this.divLeftSplitter.className="ce2split_leftsplitter";this.divLeftGrip=window.document.createElement("div");this.divMiddle=window.document.createElement("div");this.divMiddle.id=n.id+"_middle";this.divMiddle.className="ce2split_middle";this.divRightSplitter=window.document.createElement("div");this.divRightSplitter.id=n.id+"_rightsplitter";this.divRightSplitter.className="ce2split_rightsplitter";this.divRightGrip=window.document.createElement("div");this.divRight=window.document.createElement("div");this.divRight.id=n.id+"_right";this.divRight.className="ce2split_right";this.divLeftSplitter.appendChild(this.divLeftGrip);this.divRightSplitter.appendChild(this.divRightGrip);this.domNode.appendChild(this.divLeft);this.domNode.appendChild(this.divMiddle);this.domNode.appendChild(this.divLeftSplitter);this.domNode.appendChild(this.divRight);this.domNode.appendChild(this.divRightSplitter);events.add(this.divLeftSplitter,"click",this,this.leftSplitterClick);events.add(this.divRightSplitter,"click",this,this.rightSplitterClick);events.add(this.divLeftSplitter,"mousedown",this,this.leftSplitterMouseDown);events.add(this.divRightSplitter,"mousedown",this,this.rightSplitterMouseDown);events.add(this.divLeftSplitter,"touchstart",this,this.leftSplitterTouchStart);events.add(this.divRightSplitter,"touchstart",this,this.rightSplitterTouchStart);this.updateSizes()}function CEAnimateView(n){ui[n.id]=this;this.id=n.id;this.domNode=window.document.createElement("div");this.domNode.className="ceanimate"}function CEBannerPage(n){var r=[{s:"/content/img/bg-house-small.jpg",l:"/content/img/bg-house-large.jpg"},{s:"/content/img/bg-city-small.jpg",l:"/content/img/bg-city-large.jpg"}],i,t;ui[n.id]=this;this.id=n.id;this.control=null;this.domNode=window.document.createElement("div");this.domNode.className="cewebpage";i=Math.floor(Math.random()*2);this.bg=new CEBlurUpImage({el:this.domNode,small:r[i].s,large:r[i].l,w:"100%",h:"100%"});this.containerNode=window.document.createElement("div");this.containerNode.className="container";t=window.document.createElement("div");t.className="bg";t.appendChild(this.containerNode);this.domNode.appendChild(t)}function CEBarGraphGroup(n){ui[n.id]=this;this.id=n.id;this.key=n.key;this.level=n.level;this.hrwe=n.hrwe;this.domNode=window.document.createElement("div");this.domNode.className="cebargraphgroup";this.containerNode=window.document.createElement("div");this.containerNode.className="container";this.domNode.appendChild(this.containerNode);this.divExpander=window.document.createElement("div");this.divExpander.className="expander pointer";this.divExpander.style.left=(n.level*16+5).toString()+"px";this.divExpander.style.backgroundColor="#"+n.color;this.domNode.appendChild(this.divExpander);this.divExpanderBtn=window.document.createElement("div");this.divExpanderBtn.className="btn pointer";this.divExpanderBtn.style.left=(n.level*16+2).toString()+"px";this.divExpanderBtn.style.display="none";this.domNode.appendChild(this.divExpanderBtn);events.add(this.divExpanderBtn,"click",this,this.expanderClick);events.add(this.divExpander,"click",this,this.expanderClick);this.isExpanded=!1;this.items=[]}function CEBarGraph(n){ui[n.id]=this;this.id=n.id;this.domNode=window.document.createElement("div");this.domNode.className="cebargraph";this.divTitle=window.document.createElement("div");this.divTitle.className="cetitlebar";this.divTitleLabel=document.createElement("div");this.divTitleLabel.className="label";this.setTitles(n.title1||"Bar Chart",n.title2);this.divHeader=window.document.createElement("div");this.divHeader.className="cebargraph_header";this.containerNode=window.document.createElement("div");this.containerNode.className="cebargraph_body";this.divFooter=window.document.createElement("div");this.divFooter.className="cebargraph_footer";this.domNode.appendChild(this.divTitle);this.domNode.appendChild(this.divHeader);this.domNode.appendChild(this.containerNode);this.divToolbar=document.createElement("div");this.divToolbar.className="cebtn-toolbar";this.divSort=utils.createButton(null,null,null,"fa-sort-amount-desc");this.divPct=utils.createButton(null,null,null,"fa-percent");this.divSave=utils.createButton("Save");this.divPyramid=utils.createButton(null,null,null,"ri-bar-chart-pyramid");this.divTitle.appendChild(this.divToolbar);this.divTitle.appendChild(this.divTitleLabel);this.divToolbar.appendChild(this.divPyramid);this.divToolbar.appendChild(this.divSort);this.divToolbar.appendChild(this.divPct);this.divToolbar.appendChild(this.divSave);events.add(this.divPyramid,"click",this,this.pyramidClick);events.add(this.divSort,"click",this,this.sortClick);events.add(this.divPct,"click",this,this.pctClick);events.add(this.divHeader,"click",this,this.headerClick);events.add(this.divSave,"click",this,this.saveClick);this.items=[];events.add(rp,"resize",this,this.resize)}function CEBarGraphRow(n){var o,u,f,s,i,t,h,e,r,a,v,c,l;for(ui[n.id]=this,this.id=n.id,this.domNode=window.document.createElement("div"),this.domNode.className="cebargraphrow",n.bgc&&(this.domNode.style.backgroundColor="#"+n.bgc),this.divName=window.document.createElement("div"),this.divName.className="name",this.divName.innerHTML=n.image?"<table><tr><td class='img'><img src='"+n.image+"'/><\/td><td>"+utils.htmlEncode(n.name)+"<\/td><\/tr><\/table>":"<table><tr><td>"+utils.htmlEncode(n.name)+"<\/td><\/tr><\/table>",this.domNode.appendChild(this.divName),r=2,l=window.document.createElement("div"),l.className="border",this.domNode.appendChild(l),o=window.document.createElement("div"),o.className="valuebox",this.domNode.appendChild(o),f=window.document.createElement("div"),f.className="barbox",this.domNode.appendChild(f),s=0,a=n.cg.length;s<a;++s){for(i=n.cg[s],u=window.document.createElement("div"),u.className="value",u.innerHTML="<table><tr><td>"+utils.htmlEncode(i.v)+"<\/td><\/tr><\/table>",u.style.top=r.toString()+"px",u.style.height=i.h.toString()+"px",o.appendChild(u),h=0,v=i.cells.length;h<v;++h)e=i.cells[h],window.isNaN(e.x)||(t=window.document.createElement("div"),t.className="bar",t.style.backgroundColor="#"+e.c,t.style.left=e.x+"%",t.style.width=e.w+"%",t.style.top=r.toString()+"px",t.style.height=i.h.toString()+"px",f.appendChild(t));r+=i.h+1}r+=2;r>16&&(this.domNode.style.height=r.toString()+"px");c=window.document.createElement("div");c.className="zero";c.style.left=n.z+"%";f.appendChild(c);events.add(this.domNode,"click",this,this.divClick);this.isSelected=!1;this.isExpanded=!1}function CEBarGraphTotalRow(n){var f,r,e,o,i,t,s,a,u,v,y,h,c,l;for(ui[n.id]=this,this.id=n.id,this.domNode=window.document.createElement("div"),this.domNode.className="cebargraphtotalrow",n.bgc&&(this.domNode.style.backgroundColor="#"+n.bgc),f=window.document.createElement("div"),f.className="name",f.innerHTML=n.image?"<table><tr><td class='img'><img src='"+n.image+"'/><\/td><td>"+utils.htmlEncode(n.name)+"<\/td><\/tr><\/table>":"<table><tr><td>"+utils.htmlEncode(n.name)+"<\/td><\/tr><\/table>",this.domNode.appendChild(f),u=2,h=window.document.createElement("div"),h.className="border",this.domNode.appendChild(h),c=n.cg.length>1||n.cg[0].cols.length>1,c&&(e=window.document.createElement("div"),e.className="barbox",this.domNode.appendChild(e)),o=0,v=n.cg.length;o<v;++o){if(i=n.cg[o],r=window.document.createElement("div"),r.className="value",r.innerHTML="<table><tr><td>"+utils.htmlEncode(i.v)+"<\/td><\/tr><\/table>",r.style.top=u.toString()+"px",r.style.height=i.h.toString()+"px",this.domNode.appendChild(r),c)for(l=0,s=0,y=i.cols.length;s<y;++s)a=i.cols[s],t=window.document.createElement("div"),t.className="bar",t.style.backgroundColor="#"+a.c,t.style.left=l+"px",t.style.width="30px",t.style.top=(u+(i.h-10)/2).toString()+"px",t.style.height="10px",e.appendChild(t),l+=30;u+=i.h+1}u+=2;this.domNode.style.height=u.toString()+"px";events.add(this.domNode,"click",this,this.divClick);this.isSelected=!1}function CEBlurUpImage(n){n.id&&!n.el&&(ui[n.id]=this,this.id=n.id,n.el=document.createElement("div"),n.cn&&(n.el.className="ceblurupimage "+(n.cn||"")));var t=Math.floor(Math.random()*n.c)+1;this.options=n;this.domNode=n.el;this.titleNode=document.createElement("div");this.domNode.appendChild(this.titleNode);n.t&&(this.titleNode.innerHTML+=n.t);this.imgSmall=document.createElement("img");this.imgSmall.className="blurup-small";events.add(this.imgSmall,"load",this,this.smallLoaded,!1);this.imgSmall.src="/Content/img/banners/"+n.g+"/"+t+"S.jpg";this.imgLarge=document.createElement("img");this.imgLarge.className="blurup-large";events.add(this.imgLarge,"load",this,this.largeLoaded,!1);this.imgLarge.src="/Content/img/banners/"+n.g+"/"+t+"L.jpg";this.domNode.insertBefore(this.imgLarge,this.domNode.firstChild);this.domNode.insertBefore(this.imgSmall,this.domNode.firstChild);events.add(rp,"resize",this,this.onResize)}function CEBusy(n){ui[n.id]=this;this.id=n.id;this.domNode=window.document.createElement("div");this.domNode.className="cebusy";n.cn&&utils.setClass(this.domNode,n.cn,!0);this.domNode.style.display="none";events.add(rp,"busy",this,this.rpbusy)}function CEButton(n){ui[n.id]=this;this.id=n.id;this.domNode=window.document.createElement("button");this.domNode.className="cebutton";n.t&&(this.domNode.innerHTML=utils.htmlEncode(n.t));n.cn&&utils.setClass(this.domNode,n.cn,!0);events.add(this.domNode,"click",this,this.domNodeClick)}function CEChart(n){ui[n.id]=this;this.id=n.id;this.domNode=window.document.createElement("div");this.domNode.className="cechart";this.divChart=window.document.createElement("div");this.divChart.className="chart";this.domNode.appendChild(this.divChart);this.divOverlay=window.document.createElement("div");this.divOverlay.className="overlay";this.divOverlay.style.display="none";this.domNode.appendChild(this.divOverlay);events.add(this.domNode,"mouseup",this,this.domMouseClick)}function CEContentTitle(n){ui[n.id]=this;this.id=n.id;this.domNode=window.document.createElement("div");this.domNode.className=n.cn||"cecontenttitle";this.containerNode=this.domNode}function CEDock(n){ui[n.id]=this;this.id=n.id;this.items=[];this.domNode=window.document.createElement("div");this.domNode.className="cedock";n.cn&&utils.setClass(this.domNode,n.cn,!0)}function CEDocument(n){ui[n.id]=this;this.id=n.id;this.classname=n.cn||"cedocument";this.domNode=window.document.createElement("div");this.domNode.className=this.classname;events.add(this,"createeditor",this,this.createEditor);events.post(this,"createeditor",null)}function CEEconomyRegionButton(n){this.id=n.id;this.data=n.d;ui[this.id]=this;this.domNode=document.createElement("div");this.domNode.ceobjectid=this.id;this.domNode.className=n.cn||"ceeconomyregion";var t=document.createElement("table");t.className="title";this.elTitle=t.insertRow(-1).insertCell(-1);this.elTitle.innerText=n.t;this.domNode.appendChild(t);this.elContainer=document.createElement("div");this.elContainer.className="container";this.domNode.appendChild(this.elContainer);this.populateDetails(n.d)}function CEForecastRegionButton(n){this.id=n.id;this.data=n.d;ui[this.id]=this;this.domNode=document.createElement("div");this.domNode.ceobjectid=this.id;this.domNode.className=n.cn||"ceeconomyregion";var t=document.createElement("table");t.className="title";this.elTitle=t.insertRow(-1).insertCell(-1);this.elTitle.innerText=n.t;this.domNode.appendChild(t);this.elContainer=document.createElement("div");this.elContainer.className="container";this.domNode.appendChild(this.elContainer);this.populateDetails(n.d)}function CEFrame(n){ui[n.id]=this;this.id=n.id;this.domNode=window.document.createElement("iframe");this.domNode.className=n.cn;this.domNode.ceselectable=!0;this.items=[]}function CEGapLegend(n){ui[n.id]=this;this.id=n.id;this.items=[];this.domNode=window.document.createElement("div");this.domNode.className="cegaplegend";this.containerNode=this.domNode}function CEGraph(n){ui[n.id]=this;this.id=n.id;this.options=n;n.dom?(this.domNode=n.dom,n.data=window.JSON.parse(n.dom.ceattr)):(this.domNode=window.document.createElement("div"),this.domNode.className="cegraph");events.add(rp,"resize",this,this.resize);events.add(this.domNode,"mousemove",this,this.mouseMove);this.hoverTimer=0}function CEGridCol(n){ui[n.id]=this;this.id=n.id;this.w=n.w;this.domw=n.w;n.c&&(this.color=n.c);this.isVisible=n.v;this.items=[]}function CEGrid(n){ui[n.id]=this;this.id=n.id;this.cols=[];this.rows=[];this.collevels=[];this.rowlevels=[];this.waitingForCellVisible=!1;this.domNode=window.document.createElement("div");this.domNode.className="cegrid";this.domNode.tabIndex="0";this.domNode.hideFocus=!0;n.cn&&utils.setClass(this.domNode,n.cn,!0);this.autosize=n.as===!0?!0:!1;events.add(this.domNode,"focus",this,this.domNodeFocus);events.add(this.domNode,"blur",this,this.domNodeBlur);events.add(this,"startedit",this,this.startEdit);events.add(this,"endedit",this,this.endEdit);events.add(this,"focus",this,this.focus)}function CEGridPane(){this.selection=new CEGridSelection;this.domNode=window.document.createElement("div");this.domNode.className="pane";this.domNode.appendChild(this.selection.domNode);this.domNode.cepane=this;this.cols=[];this.rows=[]}function CEGridRow(n){ui[n.id]=this;this.id=n.id;this.h=n.h;this.domh=n.h;n.c&&(this.color=n.c);this.items=[];this.isVisible=n.v}function CEGridSelection(){this.domNode=window.document.createElement("div");this.domNode.className="cegridselection";this.divShade1=window.document.createElement("div");this.divShade1.className="shade";this.divShade2=window.document.createElement("div");this.divShade2.className="shade";this.domNode.appendChild(this.divShade1);this.domNode.appendChild(this.divShade2)}function CEHeader(n){var t,r,i,u;ui[n.id]=this;this.id=n.id;this.options=n;this.appLookup={economy:{id:"es",name:"Economy"},community:{id:"cs",name:"Community"},forecast:{id:"fs",name:"Forecast"},embeddedapps:{id:"ea",name:"Embedded Apps"}};this.names={};this.urls={};this.currentApp=null;t=this.appLookup;for(r in t)t.hasOwnProperty(r)&&window.ceorigin===r&&(this.currentApp=t[r]);this.currentApp||(this.currentApp=t.economy);window.name=this.currentApp.id;this.domNode=window.document.createElement("div");this.domNode.id="global-header";this.domNode.className=this.currentApp.id;this.domNode.innerHTML=this.makeInnerHTML();const f=document.createElement("script");for(f.src="https://app.remplan.com.au/embedded-link-group.min.js",this.domNode.appendChild(f),this.shadow=this.domNode.querySelector("#global-header-shadow"),this.dropDownButton=this.domNode.querySelector("#remplan-dropdown"),this.divPopup=this.domNode.querySelector("#global-header-popup"),this.popupContainer=this.domNode.querySelector("#global-header-popup .container"),this.covidimpacts=this.domNode.querySelector("#btn-covid2"),this.dropDownButton.tabIndex=0,this.dropDownButton.hideFocus=!0,this.divPopup.tabIndex=0,this.divPopup.hideFocus=!0,this.buttons=this.domNode.querySelectorAll(".app-button"),i=0;i!==this.buttons.length;i++)events.add(this.buttons[i],"mouseover",this,this.setShadow),events.add(this.buttons[i],"mouseout",this,this.resetShadow);n.tu&&n.tu.length>0&&(u=this.domNode.querySelector(".theme"),u&&events.add(u,"click",this,this.goToThemeUrl));this.covidimpacts&&events.add(this.covidimpacts,"click",this,this.covidimpactsClick);events.add(this.dropDownButton,"click",this,this.dropDownClick);events.add(document.body,"click",this,this.clickOutside);events.add(this,"popup",this,this.popup);events.add(rp,"resize",this,this.onResize);events.addImmediateTimeout(this,this.resetShadow);this.popupContentLoaded=!1;this.popupShow=!1;this.newsFeedLoaded=!1;this.getPopupContent();this.getNewsfeed()}function CEHelpBtn(n){var t;ui[n.id]=this;this.id=n.id;this.isVisible=!0;this.className="cehelpbtn";t=window.document.createElement("i");t.className="fa fa-question-circle fa-lg";this.domNode=window.document.createElement("div");this.domNode.className=this.className;this.domNode.appendChild(t);this.show(n.vis!==!1);events.add(this.domNode,"click",this,this.domNodeClick)}function CEHorzSelector(n){ui[n.id]=this;this.id=n.id;this.options=n;this.options.btnWidth=25;n.dom?(this.domNode=n.dom,n.data=window.JSON.parse(n.dom.ceattr)):(this.domNode=window.document.createElement("div"),this.domNode.className="cehorzsel");this.divBG=window.document.createElement("div");this.divBG.className="cehorzsel_bg";this.domNode.appendChild(this.divBG);events.add(rp,"resize",this,this.resize);this.bars=[]}function CEHorzSelectorKnob(n){this.index=n;this.domNode=window.document.createElement("button");this.domNode.className="cehorzsel_bar1";this.domNode.cebar=this;this.div2=window.document.createElement("span");this.div2.className="cehorzsel_bar2";this.domNode.appendChild(this.div2)}function CEHorzSplit(n){ui[n.id]=this;this.id=n.id;this.left=null;this.bottom=null;this.topFrac=.5;this.splitterHeight=6;this.swap=!1;n.domid?(this.domNode=window.document.getElementById(n.domid),this.domNode.innerHTML=""):this.domNode=window.document.createElement("div");this.domNode.className="cehorzsplit";this.divTop2=window.document.createElement("div");this.divTop2.id=n.id+"_top2";this.divTop2.className="cehorzsplit_top2";this.divTop=window.document.createElement("div");this.divTop.id=n.id+"_top";this.divTop.className="cehorzsplit_top";this.divSplitter=window.document.createElement("div");this.divSplitter.id=n.id+"_splitter";this.divSplitter.className="cehorzsplit_splitter";this.divBottom2=window.document.createElement("div");this.divBottom2.id=n.id+"_bottom2";this.divBottom2.className="cehorzsplit_bottom2";this.divBottom=window.document.createElement("div");this.divBottom.id=n.id+"_bottom";this.divBottom.className="cehorzsplit_bottom";this.divGrip=window.document.createElement("div");this.divGrip.className="cehorzsplit_grip";this.divBottom.appendChild(this.divBottom2);this.divTop.appendChild(this.divTop2);this.divSplitter.appendChild(this.divGrip);this.domNode.appendChild(this.divTop);this.domNode.appendChild(this.divBottom);this.domNode.appendChild(this.divSplitter);this.divSwap=utils.createButton("Swap Panels",null,"swap-panels","fa-arrows-v");this.domNode.appendChild(this.divSwap);events.add(this.divSwap,"click",this,this.swapClick);events.add(this.divSplitter,"mousedown",this,this.splitterMouseDown);events.add(this.divSplitter,"click",this,this.splitterClick);events.add(this.divSplitter,"touchstart",this,this.splitterTouchStart)}function CEHTML(n){ui[n.id]=this;this.id=n.id;this.domNode=window.document.createElement("div");this.domNode.className=n.cn;this.domNode.ceselectable=!0;this.items=[]}function CEHTMLReport(n){ui[n.id]=this;this.id=n.id;this.domNode=window.document.createElement("div");this.domNode.className=n.cn||"cehtmlreport";this.containerNode=window.document.createElement("div");this.containerNode.className="cehtmlreport_container";this.divHeader=window.document.createElement("div");this.divHeader.className="cehtmlreport_header";this.divLabel=window.document.createElement("div");this.divLabel.className="label";this.divLabel.innerHTML="Report";this.divSave=window.document.createElement("div");this.divSave.className="copy pointer";this.divSave.innerHTML='<div class="l"><\/div><div class="c">Copy<\/div><div class="r"><\/div>';this.divPrint=window.document.createElement("div");this.divPrint.className="print pointer";this.divHeader.appendChild(this.divLabel);this.divHeader.appendChild(this.divSave);this.divHeader.appendChild(this.divPrint);this.domNode.appendChild(this.divHeader);this.domNode.appendChild(this.containerNode);events.add(this.divSave,"click",this,this.saveClick);events.add(this.divPrint,"click",this,this.printClick)}function CEIFrame(n){ui[n.id]=this;this.id=n.id;this.domNode=window.document.createElement("iframe");this.domNode.src=n.src;this.domNode.width="100%";this.domNode.height="100%";this.domNode.frameBorder=0;this.domNode.wmode="transparent";this.domNode.className=n.cn;this.domNode.ceselectable=!1;this.domNode.onload=function(){rp.decBusy()}}function CEImage(n){ui[n.id]=this;this.id=n.id;this.domNode=window.document.createElement("div");this.domNode.className="ceimage";n.cn&&utils.setClass(this.domNode,n.cn,!0)}function CEInfoHelper(){this.tip=null}function CEInfoPane(n){ui[n.id]=this;this.id=n.id;this.containerNode=window.document.createElement("div");this.containerNode.className="ceinfo_container";this.containerNode.ceselectable=!0;this.domNode=window.document.createElement("div");this.domNode.className="ceinfo";this.domNode.appendChild(this.containerNode)}function CEKeyValues(n){ui[n.id]=this;this.id=n.id;this.items=n.items}function CELayoutGrid(n){var t,r,i,u,f;for(ui[n.id]=this,this.id=n.id,this.classname=n.cn||"celayoutgrid",t=[],t.push('<table class="'),t.push(this.classname),t.push('" ><colgroup>'),i=0,u=n.cols.length;i<u;++i)t.push('<col class="'),t.push(this.classname),t.push("_c"),t.push(i),t.push('"'),n.cols[i]>0&&(t.push(' style="width:'),t.push(n.cols[i]),t.push('px;"')),t.push("/>");for(t.push("<\/colgroup><tbody>"),r=0,f=n.rows.length;r<f;++r){for(t.push('<tr class="'),t.push(this.classname),t.push("_r"),t.push(r),t.push('"'),n.rows[r]>0&&(t.push(' style="height:'),t.push(n.rows[r]),t.push('px;"')),t.push(">"),i=0,u=n.cols.length;i<u;++i)t.push('<td class="'),t.push(this.classname),t.push("_r"),t.push(r),t.push("c"),t.push(i),t.push(" "),t.push(this.classname),t.push("_c"),t.push(i),t.push('"/>');t.push("<\/tr>")}t.push("<\/tbody><\/table>");this.domNode=window.document.createElement("div");this.domNode.className=this.classname;this.domNode.innerHTML=t.join("")}function CELegendItem(n){var t;ui[n.id]=this;this.id=n.id;this.classname="celegenditem";this.domNode=window.document.createElement("div");this.domNode.className=this.classname;t=[];t.push('<div class="inner"><table><tr><td class="c0"><div class="color" style="background-color:#');t.push(n.c);t.push(';"><\/div><\/td><td class="c1">');t.push(utils.htmlEncode(n.t));t.push("<\/td><\/tr><\/table><\/div>");this.domNode.innerHTML=t.join("");events.add(this.domNode,"click",this,this.domNodeClick)}function CELogonBox(n){ui[n.id]=this;this.id=n.id;this.item={email:""};this.views=[{id:"email",templateUrl:"/Content/html/logonbox/email.html",oninit:function(n,t){t.controls={form:t.template.querySelector("form.form"),next:t.template.querySelector("button"),email:t.template.querySelector("#logon_email")};t.ni={email:new CENewInput({label:"Please enter your email address",input:t.controls.email})};t.controls.email.value=n.item.email},onactivate:function(n,t){t.ni.email.activate();t.controls.email.focus();events.add(t.controls.form,"submit",n,n._email_NextClick);events.add(t.controls.email,"keyup",n,n._email_KeyUp);events.add(t.controls.email,"change",n,n._email_KeyUp);n._email_KeyUp()},ondeactivate:function(n,t){events.remove(t.controls.form,"submit",n,n._email_NextClick);events.remove(t.controls.email,"keyup",n,n._email_KeyUp);events.remove(t.controls.email,"change",n,n._email_KeyUp);t.ni.email.deactivate()},ondispose:function(n,t){n._disposeView.call(n,t)}},{id:"password",templateUrl:"/Content/html/logonbox/password.html",oninit:function(n,t){t.controls={header:t.template.querySelector("h2"),form:t.template.querySelector("form.form"),email:t.template.querySelector("#logon_email"),password:t.template.querySelector("#logon_password"),logon:t.template.querySelector("#logon_logon"),forgot:t.template.querySelector("#logon_forgot"),back:t.template.querySelector("#logon_back")};t.ni={email:new CENewInput({label:"Email Address",input:t.controls.email}),password:new CENewInput({label:"Please enter your password",input:t.controls.password})}},onactivate:function(n,t){var i=t.ni;for(var r in i)i.hasOwnProperty(r)&&i[r].activate&&i[r].activate();t.ni.email.setValue(n.item.email);t.ni.password.setValue("");t.controls.password.focus();t.controls.header.innerHTML=utils.htmlEncode("Welcome back "+n.item.name);events.add(t.controls.form,"submit",n,n._password_LogonClick);events.add(t.controls.forgot,"click",n,n._password_ForgotClick);events.add(t.controls.back,"click",n,n._password_BackClick);events.add(t.controls.password,"change",n,n._password_KeyUp);events.add(t.controls.password,"keyup",n,n._password_KeyUp);n._password_KeyUp()},ondeactivate:function(n,t){var i=t.ni;for(var r in i)i.hasOwnProperty(r)&&i[r].deactivate&&i[r].deactivate();events.remove(t.controls.form,"submit",n,n._password_LogonClick);events.remove(t.controls.forgot,"click",n,n._password_ForgotClick);events.remove(t.controls.back,"click",n,n._password_BackClick);events.remove(t.controls.password,"change",n,n._password_KeyUp);events.remove(t.controls.password,"keyup",n,n._password_KeyUp);t.ni.password.setValue("")},ondispose:function(n,t){n._disposeView.call(n,t)}},{id:"newuser",templateUrl:"/Content/html/logonbox/newuser.html",oninit:function(n,t){t.controls={email:t.template.querySelector("#logon_email"),clientId:t.template.querySelector("#logon_clientid"),title:t.template.querySelector("#logon_title"),name:t.template.querySelector("#logon_name"),company:t.template.querySelector("#logon_company"),position:t.template.querySelector("#logon_position"),workphone:t.template.querySelector("#logon_workphone"),mobilephone:t.template.querySelector("#logon_mobilephone"),ua:t.template.querySelector("#logon_ua"),back:t.template.querySelector("#logon_back"),submit:t.template.querySelector("#logon_submit")};t.ni={email:new CENewInput({label:"Email Address",input:t.controls.email}),clientId:new CENewInput({label:"Client ID",input:t.controls.clientId}),title:new CENewSelect({label:"Title",select:t.controls.title}),name:new CENewInput({label:"Name",input:t.controls.name}),company:new CENewInput({label:"Company",input:t.controls.company}),position:new CENewInput({label:"Position",input:t.controls.position}),workphone:new CENewInput({label:"Work Phone",input:t.controls.workphone}),mobilephone:new CENewInput({label:"Mobile Phone",input:t.controls.mobilephone})}},onactivate:function(n,t){var i=t.ni;for(var r in i)i.hasOwnProperty(r)&&i[r].activate&&i[r].activate();events.add(t.controls.back,"click",n,n._newuser_BackClick);events.add(t.controls.submit,"click",n,n._newuser_SubmitClick);t.ni.email.setValue(n.item.email);t.controls.clientId.focus()},ondeactivate:function(n,t){var i=t.ni;for(var r in i)i.hasOwnProperty(r)&&i[r].deactivate&&i[r].deactivate();events.remove(t.controls.back,"click",n,n._newuser_BackClick);events.remove(t.controls.submit,"click",n,n._newuser_SubmitClick)},ondispose:function(n,t){n._disposeView.call(n,t)}},{id:"unknown",templateUrl:"/Content/html/logonbox/unknown.html",oninit:function(n,t){t.controls={back:t.template.querySelector("button")}},onactivate:function(n,t){events.add(t.controls.back,"click",n,n._unknown_BackClick)},ondeactivate:function(n,t){events.remove(t.controls.back,"click",n,n._unknown_BackClick)},ondispose:function(n,t){n._disposeView.call(n,t)}},{id:"newuser_done",templateUrl:"/Content/html/logonbox/newuser_done.html",oninit:function(n,t){t.controls={back:t.template.querySelector("button"),email:t.template.querySelector("#newuser_email")}},onactivate:function(n,t){t.controls.email.innerHTML=utils.htmlEncode(n.item.email);events.add(t.controls.back,"click",n,n._newuser_BackClick)},ondeactivate:function(n,t){events.remove(t.controls.back,"click",n,n._newuser_BackClick)},ondispose:function(n,t){n._disposeView.call(n,t)}},{id:"message",templateUrl:"/Content/html/logonbox/message.html",oninit:function(n,t){t.controls={header:t.template.querySelector("h2"),back:t.template.querySelector("#logon_back"),msg:t.template.querySelector("#logon_message")};t.ni={}},onactivate:function(n,t){var i=t.ni;for(var r in i)i.hasOwnProperty(r)&&i[r].activate&&i[r].activate();t.controls.header.innerHTML=utils.htmlEncode(n.item.msgtitle);t.controls.msg.innerHTML=n.item.msghtml;events.add(t.controls.back,"click",n,n._password_BackClick)},ondeactivate:function(n,t){var i=t.ni;for(var r in i)i.hasOwnProperty(r)&&i[r].deactivate&&i[r].deactivate();events.remove(t.controls.back,"click",n,n._password_BackClick)},ondispose:function(n,t){n._disposeView.call(n,t)}}];this.domNode=window.document.createElement("div");this.domNode.className="celogonbox";this.templateView=new TemplateView({controller:this,views:this.views,domNode:this.domNode})}function CEMap(n){ui[n.id]=this;this.id=n.id;this.mapurl=n.mapurl;this.waitForAllOverlaysToLoad=!1;this.domNode=window.document.createElement("div");this.domNode.className=n.cn||"cemap full";this.divInfo=window.document.createElement("div");this.divInfo.className="cemap_info";events.add(rp,"googlemapsloaded",this,this.doCommands);events.add(this,"cmd",this,this.doCommands);events.add(this,"tilesloaded",this,this.onTilesLoaded);this.inCmds=!1;this.pendingcmds=[];this.addCmd({cmd:"start",lat:-23.75,lng:133.87,zoom:4,maptype:"roadmap",offline:rp.offline})}function CEMenuBar(n){ui[n.id]=this;this.id=n.id;this.items=[];this.domNode=window.document.createElement("div");this.domNode.className="cemenubar";n.cn&&utils.setClass(this.domNode,n.cn,!0);this.containerNode=document.createElement("div");this.containerNode.className="cebtn-toolbar";this.divTitleLabel=document.createElement("div");this.divTitleLabel.className="label";this.domNode.appendChild(this.containerNode);this.domNode.appendChild(this.divTitleLabel)}function CEMenuBtn(n){ui[n.id]=this;this.id=n.id;this.classname=n.cn||"cemenubtn";this.domNode=utils.createButton(n.title,null,n.cn,n.ic);this.isVisible=!0;this.show(n.vis!==!1);events.add(this.domNode,"click",this,this.domNodeClick)}function CENavBar(n){ui[n.id]=this;this.id=n.id;this.items=[];n.domid?(this.domNode=window.document.getElementById(n.domid),this.domNode.innerHTML=""):this.domNode=window.document.createElement("div");this.domNode.className="cenavbar";n.cn&&n.cn.length>0&&(this.domNode.className+=" "+n.cn);this.containerNode=this.domNode;this.renderingDelayedId=null;this.delayedRenderingItems=[];events.add(rp,"resize",this,this.renderDelayed);events.add(this.domNode,"scroll",this,this.renderDelayed)}function CENavBtn(n){var u,f,i,t,r,e;ui[n.id]=this;this.id=n.id;this.isChecked=!1;this.isVisible=!0;this.isEnable=!0;this.className=n.cn||"cenavbtn";e=window.document.createDocumentFragment();u=e.appendChild(window.document.createElement("div"));f=u.appendChild(window.document.createElement("table"));f.className="cenavbtn";i=f.insertRow(-1);n.rb&&(this.tdRadio=i.insertCell(-1),this.tdRadio.className="rb");n.cb&&(this.className+=" cenavcheck",u.className+="cenavbtn_inner",this.tdCheck=!0);n.image&&(r=window.document.createElement("img"),r.src=n.image.url,r.style.width=n.image.w.toString()+"px",r.style.height=n.image.h.toString()+"px",t=i.insertCell(-1),t.style.width=(n.image.w+4).toString()+"px",t.appendChild(r));n.bc&&(this.divColor=window.document.createElement("div"),this.divColor.className="color",t=i.insertCell(-1),t.className="bc",t.appendChild(this.divColor));n.t&&(this.tdText=i.insertCell(-1),this.tdText.className="text",this.tdText.innerHTML=utils.htmlEncode(n.t));n.ra&&(this.tdArrow=i.insertCell(-1),this.tdArrow.className="ra",this.tdArrow.innerHTML='<i class="fa fa-caret-right"><\/i>',events.add(this.tdArrow,"click",this,this.divArrowClick));n.da&&(t=i.insertCell(-1),t.className="da");n.acb&&(this.acb=1);this.domNode=window.document.createElement("div");this.domNode.className=this.className;this.domNode.appendChild(e);this.show(n.vis!==!1);this.setChecked(n.checked===!0);events.add(this.domNode,"click",this,this.domNodeClick)}function CENavBtn2(n){ui[n.id]=this;this.id=n.id;this.isChecked=!1;this.isVisible=!0;this.isEnable=!0;this.className=n.cn||"cenavbtn";this.divText=window.document.createElement("div");this.divText.className="cenavbtn_inner";n.t&&(this.divText.innerHTML=utils.htmlEncode(n.t));this.domNode=window.document.createElement("div");this.domNode.className=this.className;this.domNode.appendChild(this.divText);this.setTooltip(n.tt);this.show(n.vis!==!1);this.setChecked(n.checked===!0);events.add(this.domNode,"click",this,this.domNodeClick)}function CENavColorBtn(n){var i,r,u,t;ui[n.id]=this;this.id=n.id;this.isVisible=!0;this.className=n.cn||"cenavcolor";r=window.document.createElement("table");u=r.insertRow(-1);this.divColor=window.document.createElement("div");this.divColor.className="nocolor";t=u.insertCell(-1);t.className="bc";t.appendChild(this.divColor);t=u.insertCell(-1);t.className="da";i=window.document.createElement("div");i.appendChild(r);this.domNode=window.document.createElement("div");this.domNode.className=this.className;this.domNode.appendChild(i);this.show(n.vis!==!1);events.add(this.domNode,"click",this,this.domNodeClick)}function CENavColors(n){var e,s,h,t,r,u,i,f,o,c,l;for(ui[n.id]=this,this.id=n.id,this.colors=n.colors,this.divs=[],e=window.document.createElement("table"),u=0,c=this.colors.length;u<c;++u){for(o=[],s=e.insertRow(-1),f=this.colors[u],i=0,l=f.length;i<l;++i)r=window.document.createElement("div"),r.className="inner",r.style.backgroundColor="#"+f[i],t=window.document.createElement("div"),t.className="color",t.appendChild(r),t.cecolor=f[i],events.add(t,"click",this,this.divClick),h=s.insertCell(-1),h.appendChild(t),o.push(t);this.divs.push(o)}this.domNode=window.document.createElement("div");this.domNode.className="cenavcolors";this.domNode.appendChild(e)}function CENavCombo(n){ui[n.id]=this;this.id=n.id;this.domNode=window.document.createElement("div");this.domNode.className="cenavcombo";this.edit=window.document.createElement("input");this.edit.type="text";n.w&&(this.edit.style.width=n.w.toString()+"px");this.domNode.appendChild(this.edit);events.add(this.edit,"keypress",this,this.editKeyPress);events.add(this.edit,"blur",this,this.editBlur)}function CENavDivider(n){ui[n.id]=this;this.id=n.id;this.isVisible=!0;this.domNode=window.document.createElement("div");this.domNode.className="cenavdivider";this.domNode.innerHTML=utils.htmlEncode(n.title);this.show(n.vis!==!1)}function CENavDropDown(n){ui[n.id]=this;this.id=n.id;this.isVisible=!0;this.domNode=window.document.createElement("select");this.domNode.className="cenavdropdown";n.w&&(this.domNode.style.width=n.w.toString()+"px");events.add(this.domNode,"change",this,this.domNodeChange)}function CENavEdit(n){var t;ui[n.id]=this;this.id=n.id;this.isVisible=!0;this.domNode=window.document.createElement("div");n.lines>0?(this.edit=window.document.createElement("textarea"),this.edit.rows=n.lines,t=window.document.createElement("div"),t.className="wrapper",t.appendChild(this.edit),this.domNode.appendChild(t),this.domNode.className="cenavtextarea"):(this.edit=window.document.createElement("input"),this.edit.type="text",events.add(this.edit,"keypress",this,this.editKeyPress),this.domNode.appendChild(this.edit),this.domNode.className="cenavedit");n.cn&&(this.domNode.className+=" "+n.cn,console.log("cenavedit "+n.cn));n.w&&(this.edit.style.width=n.w.toString()+"px");n.value&&(this.value=n.value!==null?n.value:"",this.edit.value=this.value);n.alt&&(this.edit.placeholder=n.alt);this.show(n.vis!==!1);events.add(this.edit,"blur",this,this.editBlur)}function CENavGroup(n){var r,t,i;ui[n.id]=this;this.id=n.id;this.items=[];this.domNode=window.document.createElement("div");this.domNode.className="cenavgroup"+(n.cn&&n.cn.length>0?" "+n.cn:"");r=window.document.createElement("div");r.className="cenavgroup_border";this.domNode.appendChild(r);t=window.document.createElement("div");t.className="cenavgroup_header";r.appendChild(t);n.image&&(i=window.document.createElement("img"),i.src=n.image.url,i.style.width=n.image.w.toString()+"px",i.style.height=n.image.h.toString()+"px",i.className="cenavgroup_img",t.appendChild(i));this.divText=window.document.createElement("div");this.divText.className="cenavgroup_text";this.divText.innerHTML=utils.htmlEncode(n.title);n.image&&(this.divText.style.paddingLeft=(4+n.image.w).toString()+"px");t.appendChild(this.divText);this.containerNode=window.document.createElement("div");this.containerNode.className="cenavgroup_container";r.appendChild(this.containerNode);n.ex&&(this.domNode.className+=" expand-collapse",this.spanExpand=document.createElement("i"),this.spanExpand.className="fa fa-caret-down",this.divText.insertBefore(this.spanExpand,this.divText.firstChild),events.add(t,"click",this,this.toggleExpand))}function CENavHorz(n){ui[n.id]=this;this.id=n.id;this.isVisible=!0;this.items=[];this.domNode=window.document.createElement("div");this.domNode.className="cenavhorz";this.show(n.vis!==!1)}function CENavHTML(n){ui[n.id]=this;this.id=n.id;this.isVisible=!0;this.domNode=window.document.createElement("div");this.domNode.innerHTML=n.html}function CENavImgBtn(n){var r,i,f,u,t;ui[n.id]=this;this.id=n.id;this.isChecked=!1;this.isVisible=!0;this.className=n.cn||"cenavbtn";i=window.document.createElement("table");i.className="cenavbtn";f=i.insertRow(-1);t=window.document.createElement("img");t.src=n.image.url;t.style.width=n.image.w.toString()+"px";t.style.height=n.image.h.toString()+"px";this.divColor=window.document.createElement("div");this.divColor.className="textcolor";u=f.insertCell(-1);u.className="img";u.appendChild(t);r=window.document.createElement("div");r.appendChild(i);this.domNode=window.document.createElement("div");this.domNode.className=this.className;this.domNode.style.width=(n.image.w+8).toString()+"px";this.domNode.appendChild(r);this.show(n.vis!==!1);events.add(this.domNode,"click",this,this.domNodeClick)}function CENavLabel(n){ui[n.id]=this;this.id=n.id;this.isVisible=!0;this.domNode=window.document.createElement("div");this.domNode.className="cenavlabel";this.domNode.innerHTML=utils.htmlEncode(n.title);this.show(n.vis!==!1);n.cn&&n.cn.length>0&&(this.domNode.className+=" "+n.cn);!n.c||(this.closeBtn=document.createElement("a"),this.closeBtn.className="close",this.closeBtn.href="",this.closeBtn.innerHTML='<i class="fa fa-close"><\/i>',this.domNode.appendChild(this.closeBtn),events.add(this.closeBtn,"click",this,this.closeClick),events.add(this.domNode,"auxclick",this,this.closeClick))}function CENavLabelScrollList(n){ui[n.id]=this;this.id=n.id;this.options=n.o;this.orientation=n.d;this.navbarid=n.anb;this.linkList=[];this.searchLabelSelector=n.sls||".cenavlabel";this.domNode=document.createElement("div");this.domNode.className=n.cn||"cenavlabelscrolllist"}function CENavListBox(n){var t;ui[n.id]=this;this.id=n.id;this.items=[];this.domNode=window.document.createElement("div");this.domNode.className="cenavlistbox";n.cn&&utils.setClass(this.domNode,n.cn,!0);n.w&&(this.domNode.style.width=n.w.toString()+"px");n.h&&(this.domNode.style.height=n.h.toString()+"px");this.divHeaders=window.document.createElement("div");this.divHeaders.className="cenavlistbox_hdr";t=window.document.createElement("div");t.className="cenavlistbox_outer";this.domNode.appendChild(this.divHeaders);this.domNode.appendChild(t);this.containerNode=window.document.createElement("div");this.containerNode.className="cenavlistbox_container";t.appendChild(this.containerNode)}function CENavListItem(n){var t,i,f,u,r,e;for(ui[n.id]=this,this.id=n.id,this.isChecked=!1,this.isVisible=!0,this.className=n.cn||"cenavlistitem",this.tds=[],i=window.document.createElement("table"),i.className="cenavlistitem",f=i.insertRow(-1),r=0,e=n.cols;r<e;++r)u=f.insertCell(-1),u.className="td"+r.toString(),this.tds.push(u);t=window.document.createElement("div");t.className="cenavlistitem_inner";t.appendChild(i);this.domNode=window.document.createElement("div");this.domNode.className=this.className;this.domNode.appendChild(t);this.show(n.vis!==!1);this.setChecked(n.checked===!0);events.add(this.domNode,"click",this,this.domNodeClick)}function CENavMenu(n){ui[n.id]=this;this.id=n.id;this.classname=n.cn;this.enabled=!0;this.isexpand=!1;this.items=[];this.domNode=window.document.createElement("div");this.domNode.className=this.classname;this.divhdr=window.document.createElement("div");this.divhdr.className=this.classname+"_hdr";this.textNode=window.document.createElement("div");this.textNode.className=this.classname+"_text";this.textNode.innerHTML=utils.htmlEncode(n.t);this.divhdr.appendChild(this.textNode);this.domNode.appendChild(this.divhdr);this.containerNode=window.document.createElement("div");this.containerNode.className=this.classname+"_container";events.add(this.divhdr,"click",this,this.hdrClick)}function CENavTextColorBtn(n){var r,u,f,t,i;ui[n.id]=this;this.id=n.id;this.isChecked=!1;this.isVisible=!0;this.className=n.cn||"cenavcolor";u=window.document.createElement("table");f=u.insertRow(-1);i=window.document.createElement("img");i.src=n.image.url;i.style.width=n.image.w.toString()+"px";i.style.height=n.image.h.toString()+"px";this.divColor=window.document.createElement("div");this.divColor.className="textcolor";t=f.insertCell(-1);t.className="tc";t.appendChild(i);t.appendChild(this.divColor);t=f.insertCell(-1);t.className="da";r=window.document.createElement("div");r.appendChild(u);this.domNode=window.document.createElement("div");this.domNode.className=this.className;this.domNode.appendChild(r);this.show(n.vis!==!1);events.add(this.domNode,"click",this,this.domNodeClick)}function CENavText(n){ui[n.id]=this;this.id=n.id;this.isVisible=!0;this.domNode=window.document.createTextNode(n.text)}function CENewInput(n){if(this._activated=!1,!n.input||n.input.tagName!=="INPUT")throw"input property must be set and be an input element";this.domNode=document.createElement("label");this.domNode.className="form-control new-input";this.span=document.createElement("span");this.span.appendChild(document.createTextNode(n.label));this.textbox=n.input;this.domNode.appendChild(this.span);this.textbox.parentNode.insertBefore(this.domNode,this.textbox);this.textbox.parentNode.removeChild(this.textbox);this.domNode.appendChild(this.textbox);this.activate()}function CENewSelect(n){if(this._activated=!1,!n.select||n.select.tagName!=="SELECT")throw"select property must be set and be a select element";this.select=n.select;this.domNode=document.createElement("label");this.domNode.className="form-control new-select";this.span=document.createElement("span");this.span.appendChild(document.createTextNode(n.label));this.domNode.appendChild(this.span);this.select.parentNode.insertBefore(this.domNode,this.select);this.select.parentNode.removeChild(this.select);this.domNode.appendChild(this.select)}function CENullTile(){this.tileSize=new google.maps.Size(256,256)}function CEOfflineTile(n){this.map=n;this.tileSize=new google.maps.Size(256,256)}function CEOverlayTile(n,t){this.map=n;this.overlayid=t;this.mapType=function(n){var t=new google.maps.ImageMapType({name:"ceoverlay",tileSize:new google.maps.Size(256,256),getTileUrl:function(t,i){var r=t.x&(1<<i)-1;return n.map.mapurl+"/overlaytile?sid="+rp.sessionid+"&wid="+rp.windowid+"&id="+n.map.id+"&oid="+n.overlayid+"&x="+r.toString()+"&y="+t.y.toString()+"&z="+i.toString()},maxZoom:21,minZoom:0});return t.overlayid=n.overlayid,t}(this)}function CEPopupMenu(n){ui[n.id]=this;this.id=n.id;this.items=[];this.domNode=window.document.createElement("div");this.domNode.className="cepopupmenu";this.domNode.tabIndex=0;this.domNode.hideFocus=!0;n.cn&&utils.setClass(this.domNode,n.cn,!0);this.containerNode=this.domNode;this.owner=null;events.add(this.domNode,"blur",this,this.domBlur);events.add(this.domNode,"mousedown",this,this.domMouseDown);events.add(this.domNode,"click",this,this.domClick)}function CEProjectList(n){this.id=n.id;this.projects=[];this.currentProject=-1;this.Flags={None:0,Shared:1,ReadWrite:2};this.domNode=document.createElement("div");this.domNode.className="ceprojectlist";this.noProjects=document.createElement("h2");this.noProjects.innerHTML="There are no saved projects to display";this.domNode.appendChild(this.noProjects);this.elList=document.createElement("div");this.elList.className="list";this.domNode.appendChild(this.elList);ui[this.id]=this}function CERegionBtn(n){var t,i,r;ui[n.id]=this;this.id=n.id;this.isChecked=!1;this.isVisible=!0;this.isEnable=!0;this.className=n.cn||"ceregionbtn";this.subClass=n.sc||null;this.domNode=window.document.createElement("button");this.domNode.type="button";this.domNode.className=this.className;this.subClass&&(this.domNode.className+=" "+this.subClass);this.domProgress=null;this.domContainer=window.document.createElement("div");this.domContainer.className="container";this.domNode.appendChild(this.domContainer);t=document.createElement("table");i=t.insertRow(-1);r=i.insertCell(-1);this.domContainer.appendChild(t);this.divText=document.createElement("span");this.divText.className="text";this.divText.innerHTML=n.t;r.appendChild(this.divText);this.show(n.vis!==!1);this.setChecked(n.checked===!0);this.setBadge(n.b,n.bc);this.setBtns(n.btns);events.add(this.domNode,"click",this,this.domNodeClick)}function CERegionNavLabel(n){this.id=n.id;ui[this.id]=this;this.domNode=document.createElement("div");this.domNode.className="ceregionnavlabel "+(n.cn||"");this.elLabel=document.createElement("div");this.elLabel.className="label";this.elLabel.innerHTML=utils.htmlEncode(n.t);this.domNode.appendChild(this.elLabel);var t=document.createElement("div");t.className="region";t.innerHTML="<span>Region<\/span>";this.domNode.appendChild(t);t=document.createElement("div");t.className="latest";t.innerHTML="<span>"+(n.tl||"Latest Dataset")+"<\/span>";this.domNode.appendChild(t);t=document.createElement("div");t.className="archive";t.innerHTML="<span>"+(n.th||"Historical Datasets")+"<\/span>";this.domNode.appendChild(t);this.showLabels(n.sl)}function CERegionNavList(n){this.id=n.id;this.latestAdded=!1;this.init=!0;this.bulk=!1;this.items=[];this.itemObjs=[];this.rendered=!1;ui[this.id]=this;this.domNode=document.createElement("div");this.domNode.ceobjectid=this.id;this.domNode.className=n.cn||"ceregionnavlist";var t=document.createElement("table");t.className="title";this.elTitle=t.insertRow(-1).insertCell(-1);this.elTitle.innerText=n.t;this.domNode.appendChild(t);this.elLatest=document.createElement("div");this.elLatest.className="latest";this.domNode.appendChild(this.elLatest);this.ofContainer=document.createElement("div");this.ofContainer.className="of-container";this.domNode.appendChild(this.ofContainer);this.elContainer=document.createElement("div");this.elContainer.className="container";this.elContainer.style.left="0px";this.ofContainer.appendChild(this.elContainer);this.imgleft=window.document.createElement("div");this.imgleft.className="l fa fa-caret-left";this.imgright=window.document.createElement("div");this.imgright.className="r fa fa-caret-right";this.divArrows=window.document.createElement("div");this.divArrows.className="arrows";this.divArrows.style.display="none";this.divArrows.appendChild(this.imgleft);this.divArrows.appendChild(this.imgright);this.domNode.appendChild(this.divArrows);events.add(this.imgleft,"click",this,this.leftClick);events.add(this.imgright,"click",this,this.rightClick);events.add(rp,"resize",this,this.resize)}function CERegionSummaryMap(n){var t,u,i,r;if(ui[n.id]=this,this.id=n.id,this.map=ui[n.map],this.toolbarButtons=[],this.domNode=window.document.createElement("div"),this.domNode.className="ceregionsummarymap",!!n.toolbar){for(utils.setClass(this.domNode,"ceregionsummarymap_withtoolbar",!0),this.divTitle=document.createElement("div"),this.divTitle.className="cetitlebar",this.divTitleLabel=document.createElement("div"),this.divTitleLabel.className="label",this.divToolbar=document.createElement("div"),this.divToolbar.className="cebtn-toolbar",this.divTitle.appendChild(this.divToolbar),this.divTitle.appendChild(this.divTitleLabel),!n.selectAll||(this.divSelectAll=utils.createButton("Select All"),this.toolbarButtons.push({b:this.divSelectAll,ch:this.onSelectAllClick})),this.divSatMap=utils.createButton("Satellite"),this.toolbarButtons.push({b:this.divSatMap,ch:this.onSatMapClick}),u=utils.createButton("Save"),this.toolbarButtons.push({b:u,ch:this.onSaveClick}),this.domNode.appendChild(this.divTitle),i=0;i!==this.toolbarButtons.length;i++)r=this.toolbarButtons[i],this.divToolbar.appendChild(r.b),events.add(r.b,"click",this,r.ch);events.add(this.map,"maptype",this,this.mapTypeChange)}!n.banner||(utils.setClass(this.domNode,"ceregionsummarymap_withbanner",!0),t=window.document.createElement("div"),t.className="ceregionsummarymap_banner",this.banner=new CEBlurUpImage({el:t,small:"/content/img/banner-small.jpg",large:"/content/img/banner.jpg",w:"100%",h:"100%"}),this.domNode.appendChild(t));this.containerNode=window.document.createElement("div");this.containerNode.className="ceregionsummarymap_container";this.containerNode.appendChild(this.map.domNode);this.domNode.appendChild(this.containerNode)}function CEReportMap(n){ui[n.id]=this;this.id=n.id;this.classname=n.cn||"cereportmap";this.legendId=0;this.divTitle=window.document.createElement("div");this.divTitle.className="cetitlebar";this.divTitleLabel=window.document.createElement("div");this.divTitleLabel.className="label";this.divToolbar=window.document.createElement("div");this.divToolbar.className="cebtn-toolbar";this.divSatMap=utils.createButton("Satellite");this.divPct=utils.createButton(null,null,null,"fa-percent");this.divChange=utils.createButton("Change");this.divColor=utils.createButton(null,null,"rm-color","fa-paint-brush");this.divAll=utils.createButton("Select All");this.divDensity=utils.createButton("Density");this.divSave=utils.createButton("Save");this.map=ui[n.map];this.divLegendBox=window.document.createElement("div");this.divLegendBox.className="cereportmap_legendcontainer";this.divMin=window.document.createElement("div");this.divMin.className="cereportmap_min";this.divLegend=window.document.createElement("div");this.divLegend.className="cereportmap_legend";this.divMax=window.document.createElement("div");this.divMax.className="cereportmap_max";this.divLegendButton=utils.createButton(null,null,"celegendbtn","fa-caret-down");this.divLegendOptions=window.document.createElement("div");this.divLegendOptions.className="legend_options";this.divLegendBox.appendChild(this.divMin);this.divLegendBox.appendChild(this.divLegend);this.divLegendBox.appendChild(this.divMax);this.divLegendBox.appendChild(this.divLegendButton);this.legendOptionsOpen=!1;this.divContainer=window.document.createElement("div");this.divContainer.className="cereportmap_container";this.divContainer.appendChild(this.map.domNode);this.divTitle.appendChild(this.divToolbar);this.divTitle.appendChild(this.divTitleLabel);this.divToolbar.appendChild(this.divAll);this.divToolbar.appendChild(this.divSatMap);this.divToolbar.appendChild(this.divDensity);this.divToolbar.appendChild(this.divPct);this.divToolbar.appendChild(this.divChange);this.divToolbar.appendChild(this.divColor);this.divToolbar.appendChild(this.divSave);this.domNode=window.document.createElement("div");this.domNode.className=this.classname;this.domNode.appendChild(this.divTitle);this.domNode.appendChild(this.divContainer);this.domNode.appendChild(this.divLegendBox);this.divContainer.appendChild(this.divLegendOptions);events.add(this.divPct,"click",this,this.pctClick);events.add(this.divChange,"click",this,this.changeClick);events.add(this.divColor,"click",this,this.colorClick);events.add(this.divSatMap,"click",this,this.satMapClick);events.add(this.divLegend,"click",this,this.colorClick);events.add(this.divAll,"click",this,this.allClick);events.add(this.divDensity,"click",this,this.densityClick);events.add(this.divSave,"click",this,this.saveClick);events.add(this.map,"maptype",this,this.mapTypeChange);events.add(this.divLegendButton,"click",this,this.legendButtonClick);events.add(this.divLegendOptions,"mouseover",this,this.legendOptionsMouseOver,!0);events.add(this.divLegendOptions,"mouseout",this,this.legendOptionsMouseOut,!0);events.add(this.divLegendOptions,"click",this,this.legendOptionClick);events.add(this.map,"hover",this,this.svgHover);this.showLegend(!1)}function CEReportNav(n){ui[n.id]=this;this.id=n.id;this.items=[];this.containerNode=window.document.createElement("div");this.containerNode.className="container";this.containerNode.style.left="0px";this.imgleft=window.document.createElement("div");this.imgleft.className="l";this.imgright=window.document.createElement("div");this.imgright.className="r";this.divArrows=window.document.createElement("div");this.divArrows.className="arrows";this.divArrows.style.display="none";this.divArrows.appendChild(this.imgleft);this.divArrows.appendChild(this.imgright);this.domNode=window.document.createElement("div");this.domNode.className="cereportnav";this.domNode.appendChild(this.containerNode);this.domNode.appendChild(this.divArrows);events.add(this.imgleft,"click",this,this.leftClick);events.add(this.imgright,"click",this,this.rightClick);events.add(rp,"resize",this,this.resize)}function CERowEditor(n){ui[n.id]=this;this.id=n.id;this.classname=n.cn?"ceroweditor "+n.cn:"ceroweditor";this.domNode=window.document.createElement("div");this.domNode.className=this.classname;this.divHeader=window.document.createElement("div");this.divHeader.className="ceroweditor_header";this.divBody=window.document.createElement("div");this.divBody.className="ceroweditor_body";this.divFooter=window.document.createElement("div");this.divFooter.className="ceroweditor_footer";this.domNode.appendChild(this.divHeader);this.domNode.appendChild(this.divBody);this.domNode.appendChild(this.divFooter);events.add(this.domNode,"click",this,this.domClick);events.add(this.domNode,"blur",this,this.domBlur)}function CESVGTile(n,t){var i;this.name="cevector";this.map=n;this.overlayid=t;this.tileSize=new google.maps.Size(256,256);this.divs=[];this.hoverId=null;this.styleId=null;i=this;this.mouseover=function(n){i.polyMouseOver(n)};this.mouseout=function(n){i.polyMouseOut(n)}}function CETab(n){ui[n.id]=this;this.id=n.id;this.classname=n.cn;this.domNode=window.document.createElement("a");this.domNode.href="";this.domNode.id=n.id;this.domNode.className=n.cn;this.domNode.tabIndex=n.ti||"1";n.ic&&n.ic.length>0&&(this.spanIcon=window.document.createElement("i"),this.spanIcon.className="fa "+n.ic,this.domNode.appendChild(this.spanIcon));this.spanText=window.document.createElement("span");n.title&&n.title.length>0&&(this.spanIcon&&this.domNode.appendChild(document.createTextNode(" ")),this.spanText.innerHTML=utils.htmlEncode(n.title));this.domNode.appendChild(this.spanText);n.close&&(this.spanClose=window.document.createElement("b"),this.spanClose.className="fa fa-times",this.domNode.appendChild(this.spanClose),events.add(this.spanClose,"click",this,this.closeClick),events.add(this.domNode,"auxclick",this,this.domNodeClick));this.isActive=!1;this.isVisible=!0;this.show(n.vis!==!1);this.setActive(n.active===!0);events.add(this.domNode,"click",this,this.domNodeClick)}function CETabStrip(n){ui[n.id]=this;this.id=n.id;this.items=[];this.animateAddTab=!1;this.containerNode=window.document.createElement("div");this.containerNode.className="container";this.containerNode.style.left="0px";this.domNode=window.document.createElement("div");this.domNode.className="cetabstrip";n.cn&&utils.setClass(this.domNode,n.cn,!0);this.domNode.appendChild(this.containerNode);n.ar&&(this.imgleft=window.document.createElement("div"),this.imgleft.className="l fa fa-caret-left",this.imgright=window.document.createElement("div"),this.imgright.className="r fa fa-caret-right",this.divArrows=window.document.createElement("div"),this.divArrows.className="arrows",this.divArrows.style.display="none",this.divArrows.appendChild(this.imgleft),this.divArrows.appendChild(this.imgright),this.domNode.appendChild(this.divArrows),events.add(this.imgleft,"click",this,this.leftClick),events.add(this.imgright,"click",this,this.rightClick),events.add(rp,"resize",this,this.resize))}function CETable(n){ui[n.id]=this;this.id=n.id;this.domNode=window.document.createElement("div");this.domNode.className="cetable";n.cn&&utils.setClass(this.domNode,n.cn,!0)}function CETemp(){}function TemplateView(n){for(this.options=n,this.controller=n.controller,this.views=n.views,this.domNode=n.domNode;this.domNode.childNodes.length>0;)this.domNode.removeChild(this.domNode.firstChild);this.currentView=null;this.options.initialView&&this.displayView(this.options.initialView)}function CETitle(n){ui[n.id]=this;this.id=n.id;this.domNode=window.document.createElement("div");this.domNode.className="cetitle";n.cn&&utils.setClass(this.domNode,n.cn,!0);this.domNode.innerHTML=utils.htmlEncode(n.text)}function CETooltip(){var n=this;n.__ttContainer=document.createElement("div");n.__ttContainer.className="cetooltip_container";n.__isOpen=!1;document.body.appendChild(n.__ttContainer);n.__index=0;events.add(document,"mouseenter",this,CETooltip.prototype.__onMouseEnter,!0);events.add(document,"mouseleave",this,CETooltip.prototype.__onMouseLeave,!0)}function CETravelTimeControls(n){ui[n.id]=this;this.id=n.id;this.domNode=window.document.createElement("div");this.domNode.className="cetraveltimecontrols";this.domNode.innerHTML='<span>Travel by<\/span><div><span class="select"><\/span><select class="travelmode"><option value="0">car<\/option><option value="1">bicycle<\/option><option value="2">foot<\/option><option value="3">public transport<\/option><\/select><\/div><span>for up to<\/span><div><span class="number"><\/span><input class="range" type="number" placeholder="60" /><\/div><div><span class="select"><\/span><select class="rangemode"><option value="0">minutes<\/option><option value="1">kilometres<\/option><\/select><\/div><div><span class="select"><\/span><select class="locationmode"><option value="0">departing<\/option><option value="1">arriving at<\/option><\/select><\/div><div><span class="edit"><\/span><input class="location" placeholder="type an address or click on map" /><\/div><div><span class="select"><\/span><select class="conditions"><option value="100">free flowing<\/option><option value="75">light congestion<\/option><option value="50">moderate congestion<\/option><option value="30">heavy congestion<\/option><option value="10">traffic jam<\/option><\/select><\/div><span class="at">at<\/span><input class="tod" type="time" placeholder="hh:mm" /><div><span class="select"><\/span><select class="dow"><option>anytime<\/option><option>Monday<\/option><option>Tuesday<\/option><option>Wednesday<\/option><option>Thursday<\/option><option selected>Friday<\/option><option>Saturday<\/option><option>Sunday<\/option><\/select><\/div><span class="calculating">Calculating...<\/span>';this.select_locationmode=this.domNode.querySelector(".locationmode");this.edit_location=this.domNode.querySelector(".location");this.span_at=this.domNode.querySelector(".at");this.select_dow=this.domNode.querySelector(".dow");this.edit_tod=this.domNode.querySelector(".tod");this.select_travelmode=this.domNode.querySelector(".travelmode");this.edit_range=this.domNode.querySelector(".range");this.select_rangemode=this.domNode.querySelector(".rangemode");this.select_conditions=this.domNode.querySelector(".conditions");this.span_calc=this.domNode.querySelector(".calculating");this.state={location:"",locationMode:LOCATION_MODES.destination,dayOfWeek:0,timeOfDay:"11:00",range:15,rangeMode:RANGE_MODES.minutes,travelMode:TRAVEL_MODES.car,conditions:100};var t=this;this.select_locationmode.addEventListener("change",function(){t.setState({locationMode:this.selectedIndex})});this.edit_location.addEventListener("input",function(){t.setState({location:this.value})});this.select_dow.addEventListener("change",function(){t.setState({dayOfWeek:this.selectedIndex})});this.edit_tod.addEventListener("change",function(){t.setState({timeOfDay:this.value})});this.select_travelmode.addEventListener("change",function(){t.setState({travelMode:this.selectedIndex})});this.edit_range.addEventListener("input",function(){t.setState({range:parseInt(this.value)})});this.select_rangemode.addEventListener("change",function(){t.setState({rangeMode:this.selectedIndex})});this.select_conditions.addEventListener("change",function(){t.setState({conditions:this.options[this.selectedIndex].value})});this.updateTimerId=0;this.calcPending=!1;this.calcState=null;this.copyStateToUI()}function CETreeNode(n){var t,r,i,u;ui[n.id]=this;this.id=n.id;this.classname="cetreenode";r=window.document.createElement("table");i=r.insertRow(-1);this.tdimg=i.insertCell(-1);this.tdimg.className="img";this.icon=document.createElement("i");this.icon.className="fa fa-file-text-o";this.tdimg.appendChild(this.icon);events.add(this.tdimg,"click",this,this.expandClick);n.cb&&(this.tdcb=i.insertCell(-1),this.tdcb.className="cb");u=i.insertCell(-1);u.className="text";u.innerHTML=n.t;t=window.document.createElement("div");t.className=this.classname+"_inner";t.appendChild(r);this.divText=window.document.createElement("div");this.divText.className=this.classname+"_text";this.divText.appendChild(t);this.domNode=window.document.createElement("div");this.domNode.className=this.classname;this.domNode.appendChild(this.divText);events.add(this.divText,"click",this,this.domNodeClick)}function CETreeView(n){ui[n.id]=this;this.id=n.id;this.items=[];this.divHeaders=window.document.createElement("div");this.divHeaders.className="cetreeview_hdr";this.containerNode=window.document.createElement("div");this.containerNode.className="cetreeview_container";this.domNode=window.document.createElement("div");this.domNode.className="cetreeview";n.cn&&utils.setClass(this.domNode,n.cn,!0);this.domNode.appendChild(this.divHeaders);this.domNode.appendChild(this.containerNode)}function CEVMLTile(n,t){var i;this.name="cevector";this.map=n;this.overlayid=t;this.tileSize=new google.maps.Size(256,256);this.divs=[];this.hoverId=null;i=this;this.mouseover=function(){i.polyMouseOver(this)};this.mouseout=function(){i.polyMouseOut(this)}}function CEWizard(n){ui[n.id]=this;this.id=n.id;this.divTitle=document.createElement("h2");this.divImage=document.createElement("div");this.divImage.className="image";this.divDesc=document.createElement("p");this.divHeader=window.document.createElement("div");this.divHeader.className="cewizard_header";this.divHeader.appendChild(this.divImage);this.divHeader.appendChild(this.divTitle);this.divHeader.appendChild(this.divDesc);this.divBody=window.document.createElement("div");this.divBody.className="cewizard_body";this.btnPrev=window.document.createElement("button");this.btnPrev.innerHTML='<i class="fa fa-arrow-left"><\/i> Prev';this.btnPrev.className="cewizard_btn";events.add(this.btnPrev,"click",this,this.btnPrevClick);this.btnNext=window.document.createElement("button");this.btnNext.innerHTML='Next <i class="fa fa-arrow-right"><\/i>';this.btnNext.className="cewizard_btn";events.add(this.btnNext,"click",this,this.btnNextClick);this.btnFinish=window.document.createElement("button");this.btnFinish.innerHTML="Finish";this.btnFinish.className="cewizard_btn";events.add(this.btnFinish,"click",this,this.btnFinishClick);this.divFooter=window.document.createElement("div");this.divFooter.className="cewizard_footer";this.divFooter.appendChild(this.btnPrev);this.divFooter.appendChild(this.btnNext);this.divFooter.appendChild(this.btnFinish);this.domNode=window.document.createElement("div");this.domNode.className="cewizard";n.cn&&utils.setClass(this.domNode,n.cn,!0);this.domNode.appendChild(this.divHeader);this.domNode.appendChild(this.divBody);this.domNode.appendChild(this.divFooter)}function CEWizardPage(n){ui[n.id]=this;this.options=n}function CEBusinessCardTextField(){this.divEditor=window.document.createElement("div");this.divEditor.className="cebusinesscardtext";this.editor=window.document.createElement("input");this.editor.type="text";this.divEditor.appendChild(this.editor);this.value="";this.editor.value="";this.changed=!1;events.add(this.editor,"keyup",this,this.editorChange);events.add(this.editor,"mouseup",this,this.editorChange)}function CEBusinessCardCheckField(n){this.divEditor=window.document.createElement("div");this.divEditor.className="cebusinesscardcheck";this.option=n;this.divNone=window.document.createElement("div");this.divNone.className="none";this.divNone.innerHTML=n[2];this.divYes=window.document.createElement("div");this.divYes.className="yes";this.divYes.innerHTML=n[0];this.divNo=window.document.createElement("div");this.divNo.className="no";this.divNo.innerHTML=n[1];this.divEditor.appendChild(this.divNone);this.divEditor.appendChild(this.divYes);this.divEditor.appendChild(this.divNo);this.value=null;this.editorValue=null;this.changed=!1;events.add(this.divEditor,"click",this,this.click)}function CEBusinessCardDateField(){this.divEditor=window.document.createElement("div");this.divEditor.className="cebusinesscardtext";this.editor=window.document.createElement("input");this.editor.type="text";this.editor.placeholder="dd mmm yyyy";this.divEditor.appendChild(this.editor);this.value="";this.editor.value="";this.changed=!1;events.add(this.editor,"keyup",this,this.editorChange);events.add(this.editor,"mouseup",this,this.editorChange)}function CEBusinessCardDropDownField(){this.divEditor=window.document.createElement("div");this.divEditor.className="cebusinesscarddropdown";this.editor=window.document.createElement("input");this.editor.type="text";this.divEditor.appendChild(this.editor);this.divArrow=window.document.createElement("div");this.divArrow.className="arrow fa fa-caret-down";this.divEditor.appendChild(this.divArrow);this.divList=window.document.createElement("div");this.divList.className="cebusinesscarddropdownlist";this.divList.tabIndex=0;this.divList.hideFocus=!0;this.value="";this.editor.value="";this.changed=!1;this.divItem=null;this.listVisible=!1;this.focusCount=0;this.focusPending=!1;events.add(this.divArrow,"click",this,this.arrowClick);events.add(this.editor,"keyup",this,this.editorChange);events.add(this.editor,"mouseup",this,this.editorChange);events.add(this.editor,"focus",this,this.editorFocus);events.add(this.editor,"blur",this,this.editorBlur);events.add(this.divList,rp.iever<10?"focusin":"focus",this,this.listFocus);events.add(this.divList,rp.iever<10?"focusout":"blur",this,this.listBlur);events.add(this.divList,"click",this,this.listClick);events.add(this,"search",this,this.search);events.add(this,"focus",this,this.focus)}function CEBusinessCard(n){ui[n.id]=this;this.id=n.id;this.classname="cebusinesscard "+(n.cn||"");this.changeCount=0;this.state=0;this.data=null;this.fields=null;this.domNode=window.document.createElement("div");this.domNode.className=this.classname;this.divCaption=window.document.createElement("div");this.divCaption.className="cetitlebar";this.divLabel=window.document.createElement("div");this.divLabel.className="label";this.divLabel.innerHTML='<div class="icon icon-table"><\/div>Business Details';this.toolBar=document.createElement("div");this.toolBar.className="cebtn-toolbar";this.divCaption.appendChild(this.toolBar);this.divCaption.appendChild(this.divLabel);this.divSave=utils.createButton("Save");this.divCancel=utils.createButton("Cancel");this.divDelete=utils.createButton("Delete");this.divRestore=utils.createButton("Restore");this.toolBar.appendChild(this.divSave);this.toolBar.appendChild(this.divCancel);this.toolBar.appendChild(this.divDelete);this.toolBar.appendChild(this.divRestore);this.divBody=window.document.createElement("div");this.divBody.className="cebusinesscard_body";this.domNode.appendChild(this.divCaption);this.domNode.appendChild(this.divBody);events.add(this.divSave,"click",this,this.saveClick);events.add(this.divCancel,"click",this,this.cancelClick);events.add(this.divDelete,"click",this,this.deleteClick);events.add(this.divRestore,"click",this,this.restoreClick);this.updateBtns()}function CEBusinessCardLabelField(n){this.divLabel=window.document.createElement("div");this.divLabel.innerHTML=utils.htmlEncode(n);this.divEditor=window.document.createElement("div");this.divEditor.className="eo";this.editor=window.document.createElement("div");this.editor.className="ro";this.divEditor.appendChild(this.editor)}function CEBusinessCardNumberField(){}function CEBusinessCardTextAreaField(n,t){this.divEditor=window.document.createElement("div");this.divEditor.className="cebusinesscardtextarea";this.editor=window.document.createElement("textarea");this.editor.className=t?"cebusinesscardtextarea_wrap":"cebusinesscardtextarea_nowrap";this.editor.rows=n;this.divEditor.appendChild(this.editor);this.value="";this.editor.value="";this.changed=!1;events.add(this.editor,"keyup",this,this.editorChange);events.add(this.editor,"mouseup",this,this.editorChange)}function CEBusinessList(n){ui[n.id]=this;this.id=n.id;this.classname="cebusinesslist "+(n.cn||"");this.topIndex=0;this.itemsPerPage=0;this.itemHeight=20;this.rows=[];this.rowcache={};this.pending={fetch:0,sortcol:-1,sortorder:0,get:!1};this.data={numItems:0,sortcol:-1,sortorder:0};this.domNode=window.document.createElement("div");this.domNode.className=this.classname;this.divCaption=window.document.createElement("div");this.divCaption.className="cetitlebar";this.divLabel=window.document.createElement("div");this.divLabel.className="label";this.divLabel.innerHTML='<i class="icon icon-table"><\/i> Business List';this.divIncludeDeleted=utils.createButton("Include Deleted Businesses");this.divResetFilter=utils.createButton("Reset Filter");this.divExport=utils.createButton("Save");this.divFirst=utils.createButton(null,null,null,"fa-fast-backward");this.divPrev=utils.createButton(null,null,null,"fa-backward");this.divNext=utils.createButton(null,null,null,"fa-forward");this.divLast=utils.createButton(null,null,null,"fa-fast-forward");this.divToolbar=document.createElement("div");utils.setClass(this.divToolbar,"cebtn-toolbar",!0);this.divToolbar.appendChild(this.divIncludeDeleted);this.divToolbar.appendChild(this.divResetFilter);this.divToolbar.appendChild(this.divExport);this.divToolbar.appendChild(this.divFirst);this.divToolbar.appendChild(this.divPrev);this.divToolbar.appendChild(this.divNext);this.divToolbar.appendChild(this.divLast);this.divCaption.appendChild(this.divToolbar);this.divCaption.appendChild(this.divLabel);this.divHeader=window.document.createElement("div");this.divHeader.className="cebusinesslist_header";this.divBody=window.document.createElement("div");this.divBody.className="cebusinesslist_body";this.divBody.tabIndex="0";this.divBody.hideFocus=!0;this.divPad=window.document.createElement("div");this.divPad.style.height="1px";this.divBody.appendChild(this.divPad);this.divVertSBContent=window.document.createElement("div");this.divVertSBContent.className="cebusinesslist_vertsbcontent";this.divVertSB=window.document.createElement("div");this.divVertSB.className="cebusinesslist_vertsb";this.divVertSB.appendChild(this.divVertSBContent);this.domNode.appendChild(this.divCaption);this.domNode.appendChild(this.divVertSB);this.domNode.appendChild(this.divHeader);this.domNode.appendChild(this.divBody);this.keywordTimerId=null;this.repaintTimerId=null;this.scrollLeft=0;this.textColParser=new CEBusinessTextParser;events.add(this.domNode,"click",this,this.domClick);events.add(this.divFirst,"click",this,this.firstClick);events.add(this.divPrev,"click",this,this.prevClick);events.add(this.divNext,"click",this,this.nextClick);events.add(this.divLast,"click",this,this.lastClick);events.add(this.divVertSB,"scroll",this,this.vertSBScroll);events.add(this.divBody,"touchstart",this,this.bodyTouchStart);events.add(this.divBody,"scroll",this,this.bodyScroll);events.add(this.divHeader,"scroll",this,this.headerScroll);events.add(this.divBody,"mousewheel",this,this.bodyMouseWheel);events.add(this.divBody,"keydown",this,this.bodyKeyDown);events.add(rp,"resize",this,this.resize);events.add(this.divExport,"click",this,this.exportClick);events.add(this.divIncludeDeleted,"click",this,this.includeDeletedClick);events.add(this.divResetFilter,"click",this,this.resetFilterClick);this.updateButtons()}function CEBusinessListRow(n){var i,t;for(this.domNode=window.document.createElement("div"),this.domNode.className="cebusinesslistrow",this.domNode.style.width=n.w+"px",this.domNode.cerow=this,this.divCells=[],i=0;i<n.numcols;i++)t=window.document.createElement("div"),t.className="cell",t.style.left=n.cols[i].l+2+"px",t.style.width=n.cols[i].w-2+"px",this.divCells.push(t),this.domNode.appendChild(t)}function CEBusinessTextParser(){}function CEColorDlg(n){var t,i;n.title="Select Color";n.cn="cecolordlg";n.close=!0;CEWindow.call(this,n);t=this.addDiv(this.containerNode,"dlgbody");i=this.addDiv(this.containerNode,"dlgcmds");this.addSpan(t,"Red:","redlbl");this.addSpan(t,"Green:","greenlbl");this.addSpan(t,"Blue:","bluelbl");this.addSpan(t,"Hue:","huelbl");this.addSpan(t,"Sat:","satlbl");this.addSpan(t,"Lum:","lumlbl");this.addSpan(t,"New","newlbl");this.addSpan(t,"Current","currentlbl");this.divHueSat=this.addDiv(t,"huesat");this.divHueSatMarker=this.addDiv(t,"huesatmarker");this.divLum=this.addDiv(t,"lum");this.divLumMarker=this.addDiv(t,"lummarker");this.editr=this.addEdit(t,"r");this.editg=this.addEdit(t,"g");this.editb=this.addEdit(t,"b");this.edith=this.addEdit(t,"h");this.edits=this.addEdit(t,"s");this.editl=this.addEdit(t,"l");n.sa&&(this.addSpan(t,"Transparency % :","translbl"),this.editt=this.addEdit(t,"t"),events.add(this.editt,"change",this,this.editChange));this.divCurrentBG=this.addDiv(t,"currentbg");this.divCurrent=this.addDiv(t,"current");this.divNewBG=this.addDiv(t,"newbg");this.divNew=this.addDiv(t,"new");this.btnSave=this.addBtn(i,"OK","ok cebtn");this.ignore=!1;events.add(this.editr,"change",this,this.editChange);events.add(this.editg,"change",this,this.editChange);events.add(this.editb,"change",this,this.editChange);events.add(this.edith,"change",this,this.editChange);events.add(this.edits,"change",this,this.editChange);events.add(this.editl,"change",this,this.editChange);events.add(this.btnSave,"click",this,this.saveClick);events.add(this.divLumMarker,"mousedown",this,this.divLumMarkerMouseDown);events.add(this.divHueSatMarker,"mousedown",this,this.divHueSatMarkerMouseDown);this.setColor(n.c,n.a)}function CEDatabaseQueryDlg(n){var t,i=[{v:1,l:"Businesses Trading At"},{v:2,l:"Business Entries"},{v:3,l:"Business Exits"},{v:null,l:"────────────────────"}],r;for(n.addLGPRF&&(i.push({v:4,l:"LGPRF Businesses Trading At"}),i.push({v:5,l:"LGPRF Business Entries"}),i.push({v:6,l:"LGPRF Business Exits"}),i.push({v:null,l:"────────────────────"})),i.push({v:0,l:"All Business Records"}),n.cn="cedatabasequerydlg",n.close=!0,CEWindow.call(this,n),rp.divTemp.appendChild(this.domNode),t=[],t.push('<div class="dlgbody"><table>'),t.push('<tr><td class="t">Query Type<\/td><td><select id="'),t.push(this.options.id),t.push('_filter">'),r=0;r!==i.length;r++)t.push("<option "),i[r].v===null?t.push("disabled"):t.push(' value="'+i[r].v+'"'),t.push(">"),t.push(i[r].l),t.push("<\/option>");t.push("<\/select ><\/td ><\/tr > ");t.push('<tr id="');t.push(this.options.id);t.push('_trat"><td>Date<\/td><td><input id="');t.push(this.options.id);t.push('_inputat" placeholder="dd mmm yyyy"/> dd mmm yyyy<\/td><\/tr>');t.push('<tr id="');t.push(this.options.id);t.push('_trstart"><td>Start Date<\/td><td><input id="');t.push(this.options.id);t.push('_inputstart" placeholder="dd mmm yyyy"/> dd mmm yyyy<\/td><\/tr>');t.push('<tr id="');t.push(this.options.id);t.push('_trend"><td>End Date<\/td><td><input id="');t.push(this.options.id);t.push('_inputend" placeholder="dd mmm yyyy"/> dd mmm yyyy<\/td><\/tr>');t.push("<tr><td colspan=2>Database contains entries from ");t.push(utils.fmtDate(this.options.mindt));t.push(" to ");t.push(utils.fmtDate(this.options.maxdt));t.push("<\/td><\/tr>");t.push("<\/table><\/div>");t.push('<div class="dlgcmds">');t.push('<button class="cebtn" id="');t.push(this.options.id);t.push('_save">Save<\/button>');t.push("<\/div>");this.containerNode.innerHTML=t.join("");this.centre();this.selectfilter=window.document.getElementById(n.id+"_filter");this.trat=window.document.getElementById(n.id+"_trat");this.trstart=window.document.getElementById(n.id+"_trstart");this.trend=window.document.getElementById(n.id+"_trend");this.inputat=window.document.getElementById(n.id+"_inputat");this.inputstart=window.document.getElementById(n.id+"_inputstart");this.inputend=window.document.getElementById(n.id+"_inputend");this.btnsave=window.document.getElementById(n.id+"_save");events.add(this.selectfilter,"change",this,this.filterChange);events.add(this.btnsave,"click",this,this.saveClick);rp.divTemp.removeChild(this.domNode)}function CEEconomyRegionDlg(n){n.title="Economy Region";n.cn="cedatasetselect";n.close=!0;this.datasets=n.rs;this.views=[{id:"datasets",templateUrl:"/Content/html/economy.region.dataset.select.html",oninit:function(n,t){t.controls={region:t.template.querySelector(".region-name"),dslist:t.template.querySelector(".ds-list"),ok:t.template.querySelector(".ok-button"),cancel:t.template.querySelector(".cancel-button")};n.datasets.length>0&&(t.controls.region.innerHTML=utils.htmlEncode(n.datasets[0].r));for(var i=0;i!==n.datasets.length;i++)n.addButton(n.datasets[i],t.controls.dslist);n.setTitle("Select Historical Datasets")},onactivate:function(n,t){events.add(t.controls.ok,"click",n,n.okClick);events.add(t.controls.cancel,"click",n,n.cancelClick);n.centre()},ondeactivate:function(n,t){events.remove(t.controls.ok,"click",n,n.okClick);events.remove(t.controls.cancel,"click",n,n.cancelClick)}},{id:"update",templateUrl:"/Content/html/economy.region.update.html",oninit:function(n,t){var i;t.controls={name:t.template.querySelector(".dataset-name"),cancel:t.template.querySelector(".cancel-button"),email:t.template.querySelector(".email-link")};i=n.datasets[0];console.info(i);n.setTitle(i.ac===1?"Order Updated Dataset":"Order Historical Dataset");t.controls.email.href="mailto:info@remplan.com.au?subject="+encodeURIComponent("Request "+(i.ac===1?"latest":"historical")+" dataset: "+i.r);t.controls.name.innerHTML=utils.htmlEncode(i.r)},onactivate:function(n,t){events.add(t.controls.cancel,"click",n,n.cancelClick);n.centre()},ondeactivate:function(n,t){events.remove(t.controls.cancel,"click",n,n.cancelClick)}}];CEWindow.call(this,n);this.templateView=new TemplateView({controller:this,domNode:this.containerNode,views:this.views,initialView:n.v})}function CEErrorDlg(n){n.title="REMPLAN Error";n.cn="ceerrordlg";n.html='<div class="dlgbody">'+(n.html||utils.htmlEncode(n.text))+'<\/div><div class="dlgcmds"><button id="'+n.id+'_close" class="cebtn" onclick="rp.doCmds([[\''+n.id+"',3]]);\">OK<\/button><\/div>";CEWindow.call(this,n)}function CEExportDlg(n){n.cn="ceexportdlg";n.close=!0;CEWindow.call(this,n)}function CEForecastRegionDlg(n){n.title="Economy Region";n.cn="cedatasetselect";n.close=!0;this.datasets=n.rs;this.views=[{id:"datasets",templateUrl:"/Content/html/economy.region.dataset.select.html",oninit:function(n,t){t.controls={region:t.template.querySelector(".region-name"),dslist:t.template.querySelector(".ds-list"),ok:t.template.querySelector(".ok-button"),cancel:t.template.querySelector(".cancel-button")};n.datasets.length>0&&(t.controls.region.innerHTML=utils.htmlEncode(n.datasets[0].r));for(var i=0;i!==n.datasets.length;i++)n.addButton(n.datasets[i],t.controls.dslist);n.setTitle("Select Previous Forecasts")},onactivate:function(n,t){events.add(t.controls.ok,"click",n,n.okClick);events.add(t.controls.cancel,"click",n,n.cancelClick);n.centre()},ondeactivate:function(n,t){events.remove(t.controls.ok,"click",n,n.okClick);events.remove(t.controls.cancel,"click",n,n.cancelClick)}},{id:"update",templateUrl:"/Content/html/economy.region.update.html",oninit:function(n,t){var i;t.controls={name:t.template.querySelector(".dataset-name"),cancel:t.template.querySelector(".cancel-button"),email:t.template.querySelector(".email-link")};i=n.datasets[0];console.info(i);n.setTitle(i.ac===1?"Order Updated Dataset":"Order Historical Dataset");t.controls.email.href="mailto:info@remplan.com.au?subject="+encodeURIComponent("Request "+(i.ac===1?"latest":"historical")+" dataset: "+i.r);t.controls.name.innerHTML=utils.htmlEncode(i.r)},onactivate:function(n,t){events.add(t.controls.cancel,"click",n,n.cancelClick);n.centre()},ondeactivate:function(n,t){events.remove(t.controls.cancel,"click",n,n.cancelClick)}}];CEWindow.call(this,n);this.templateView=new TemplateView({controller:this,domNode:this.containerNode,views:this.views,initialView:n.v})}function CEInputDlg(n){n.title=n.title;n.cn="ceinputdlg "+n.cn;n.close=!0;n.html='<div class="dlgbody">';n.html+=n.blurb;n.html+='<\/div><div class="dlgcmds"><button class="cebtn" id="'+n.id+'_close" onclick="rp.doCmds([['+n.id+',3]]);">'+n.submit+"<\/button><\/div>";CEWindow.call(this,n)}function CELogonDlg(n){n.title="REMPLAN Log In";n.cn="celogondlg";n.close=!0;n.html='<div class="dlgbody"><table><tr><td>Log in email<\/td><td><input class="field" type="text" id="'+n.id+'_email"><\/td><\/tr><tr><td>Password<\/td><td><input class="field" type="password" id="'+n.id+'_password"><\/td><\/tr><tr><td><\/td><td><input type="checkbox" id="'+n.id+'_rm"> Remember me on this computer<\/td><\/tr><\/table><\/div><div class="dlgcmds"><button onclick="ui[\''+n.id+'\'].logon();">Log In<\/button><a href="#" onclick="rp.doCmds([['+n.id+',3]]);">New User?<\/a><a href="#" onclick="rp.doCmds([['+n.id+',4]]);">Resend Password<\/a><\/div>';CEWindow.call(this,n)}function CEMsgBoxDlg(n){var t,i,r,u;for(n.cn="cemsgboxdlg",n.html='<div class="dlgbody">'+(n.html||utils.htmlEncode(n.text))+'<\/div><div class="dlgcmds">',t=0,r=n.btns.length;t<r;++t)i=n.btns[t],i.id=n.id+"_"+i.cmd,n.html+='<button class="cebtn" id="'+i.id+'">'+utils.htmlEncode(i.n)+"<\/button>";for(n.html+="<\/div>",CEWindow.call(this,n),rp.divTemp.appendChild(this.domNode),t=0,r=n.btns.length;t<r;++t)i=n.btns[t],u=window.document.getElementById(i.id),u.cecmd=i.cmd,events.add(u,"click",this,this.btnClick);events.add(this,"close",this,this.closeClick);rp.divTemp.removeChild(this.domNode)}function CEMsgDlg(n){n.title="REMPLAN";n.cn="cemsgboxdlg";n.html='<div class="dlgbody">'+(n.html||utils.htmlEncode(n.text))+'<\/div><div class="dlgcmds"><button class="cebtn" id="'+n.id+'_close" onclick="rp.doCmds([[\''+n.id+"',3]]);\">OK<\/button><\/div>";CEWindow.call(this,n)}function CENewUserDlg(n){n.title="REMPLAN New User";n.cn="cenewuserdlg";n.close=!0;n.html='<div class="dlgbody"><table><tr><td colspan="2" style="white-space:normal"><p>For REMPLAN subscribers please enter your details below including your Client ID and work email address.<\/p><p>Not a REMPLAN subscriber?  Please call 1300 737 443 (within Australia), or (+61) 3 5444 4788 (International) to discuss your requirements.<\/p><\/td><\/tr><tr><td>Client ID<\/td><td><input class="field" id="'+n.id+'_clientid" type="text"/><span class="mandatory">*<\/span><\/td><\/tr><tr><td>Title<\/td><td><select id="'+n.id+'_title"><option><\/option><option value="Mr">Mr<\/option><option value="Ms">Ms<\/option><option value="Dr">Dr<\/option><option value="Prof">Prof<\/option><\/select><\/td><\/tr><tr><td>Name<\/td><td><input class="field" id="'+n.id+'_name" type="text"/><span class="mandatory">*<\/span><\/td><\/tr><tr><td>Company<\/td><td><input class="field" id="'+n.id+'_company" type="text"/><\/td><\/tr><tr><td>Position<\/td><td><input class="field" id="'+n.id+'_position" type="text"/><span class="mandatory">*<\/span><\/td><\/tr><tr><td>Email<\/td><td><input class="field" id="'+n.id+'_email" type="text"/><span class="mandatory">*<\/span><\/td><\/tr><tr><td>Work Phone<\/td><td><input class="field" id="'+n.id+'_work" type="text"/><span class="mandatory">*<\/span><\/td><\/tr><tr><td>Mobile Phone<\/td><td><input class="field" id="'+n.id+'_mobile" type="text"/><\/td><\/tr><tr><td colspan="2">I have read and agree to the terms in the <a target="_new" href="/doc/useragreement">REMPLAN user agreement<\/a> <input id="'+n.id+'_agree" type="checkbox" value="1"/><span class="mandatory">*<\/span><\/td><\/tr><\/table><\/div><div class="dlgcmds"><button id="'+n.id+'_create" class="cebtn" onclick="rp.doCmds([['+n.id+',3]]);">Create<\/button><\/div>';CEWindow.call(this,n)}function CEPasteDlg(n){n.title="Paste Text";n.cn="cepastedlg";n.close=!0;n.html='<div class="dlgbody"><table><tr><td>Paste your text into this box and then click OK<\/td><\/tr><tr><td><textarea class="text" id="'+n.id+'_text" wrap="off" ><\/textarea><\/td><\/tr><\/table><\/div><div class="dlgcmds"><button class="cebtn" onclick="rp.doCmds([['+n.id+',3]]);">OK<\/button><\/div>';CEWindow.call(this,n)}function CEProjectSharingDlg(n){n.title="Project Sharing";n.cn="ceprojsharedlg";n.close=!0;this.flags=n.f;this.views=[{id:"share",templateUrl:"/Content/html/project.sharing.html",oninit:function(n,t){t.controls={private:t.template.querySelector("#share_private"),shared:t.template.querySelector("#share_shared"),readwrite:t.template.querySelector("#share_readwrite"),save:t.template.querySelector(".save-button"),cancel:t.template.querySelector(".cancel-button")};t.controls.private.checked=n.flags===0;t.controls.shared.checked=(n.flags&1)==1;t.controls.readwrite.checked=(n.flags&2)==2},onactivate:function(n,t){events.add(t.template,"change",n,n._onChange,!0);events.add(t.controls.save,"click",n,n.saveClick);events.add(t.controls.cancel,"click",n,n.cancelClick);n._onChange();n.centre()},ondeactivate:function(n,t){events.remove(t.template,"change",n,n._onChange,!0);events.remove(t.controls.save,"click",n,n.saveClick);events.remove(t.controls.cancel,"click",n,n.cancelClick)},ondispose:function(n,t){delete t.controls}}];CEWindow.call(this,n);this.templateView=new TemplateView({controller:this,domNode:this.containerNode,views:this.views,initialView:"share"})}function CERenameDataDlg(n){n.title="Rename Chart Data";n.cn="cesavedlg";n.close=!0;n.html='<div class="dlgbody"><table>';n.html+='<tr><td>Name <input class="field" id="'+n.id+'_name" type="text" value="'+utils.htmlEncode(n.name)+'"/><\/td><\/tr>';n.html+='<\/table><\/div><div class="dlgcmds"><button class="cebtn" id="'+n.id+'_create" onclick="rp.doCmds([['+n.id+',3]]);">Rename<\/button><\/div>';CEWindow.call(this,n)}function CERenameTemplateDlg(n){n.title="Rename Template";n.cn="cesavedlg";n.close=!0;n.html='<div class="dlgbody"><table>';n.html+='<tr><td>Name <input class="field" id="'+n.id+'_name" type="text" value="'+utils.htmlEncode(n.name)+'"/><\/td><\/tr>';n.html+='<\/table><\/div><div class="dlgcmds"><button class="cebtn" id="'+n.id+'_create" onclick="rp.doCmds([['+n.id+',3]]);">Rename<\/button><\/div>';CEWindow.call(this,n)}function CEResendPasswordDlg(n){n.title="REMPLAN Resend Password";n.cn="ceresendpassworddlg";n.close=!0;n.html='<div class="dlgbody"><table><tr><td>Log in email<\/td><td><input class="field" type="text" id="'+n.id+'_email"><\/td><\/tr><\/table><\/div><div class="dlgcmds"><button class="cebtn" onclick="rp.doCmds([['+n.id+',3]]);">Resend Password<\/button><\/div>';CEWindow.call(this,n)}function CESaveBusinessDlg(n){n.title="Save changes to Business";n.cn="cesavedlg";n.close=!0;n.html='<div class="dlgbody"><p>You modified the details for this Business<\/p><p>Save changes to Business ?<\/p><\/div><div class="dlgcmds"><button class="cebtn" id="'+n.id+'_save" onclick="rp.doCmds([['+n.id+',3]]);">Save<\/button><\/div>';CEWindow.call(this,n)}function CESaveChartImageDlg(n){n.title="Save Chart Image";n.cn="cesavedlg";n.close=!0;n.html='<div class="dlgbody"><table><tr><td colspan="2">Save the chart to your computer in the following format<\/td><\/tr><tr><td><input type="radio" name="'+n.id+'_it" value="png" checked="true" /><\/td><td>PNG file<\/td><\/tr><tr><td><input type="radio" name="'+n.id+'_it" value="jpg" /><\/td><td>JPG file<\/td><\/tr><tr><td><input type="radio" name="'+n.id+'_it" value="emf" /><\/td><td>Windows Enhanced Metafile (this is a vector format that will scale to very large sizes without distorting)<\/td><\/tr><tr><td><input type="radio" name="'+n.id+'_it" value="svg" /><\/td><td>Vector file (.svg) (this is a vector format that will scale to very large sizes without distorting)<\/td><\/tr><\/table><\/div><div class="dlgcmds"><button class="cebtn" id="'+n.id+'_save" onclick="rp.doCmds([['+n.id+',3]]);">Save...<\/button><\/div>';CEWindow.call(this,n)}function CESaveDataAsDlg(n){n.title="Save Chart Data";n.cn="cesaveasdlg";n.close=!0;n.html='<div class="dlgbody"><table>';n.html+='<tr><td>Chart data named "'+utils.htmlEncode(n.name)+'" already exists<\/td><\/tr>';n.html+='<tr><td><input id="'+n.id+'_ow" name="ow" type="radio" value="0" checked="1" />Overwrite existing chart data with your changes<\/td><\/tr>';n.html+='<tr><td><input name="ow" type="radio" value="1" />Save chart data with another name<\/td><\/tr>';n.html+='<tr><td>Name <input class="field" id="'+n.id+'_name" type="text"/><\/td><\/tr>';n.html+='<\/table><\/div><div class="dlgcmds"><button class="cebtn" id="'+n.id+'_create" onclick="rp.doCmds([['+n.id+',3]]);">Save<\/button><\/div>';CEWindow.call(this,n)}function CESaveDataDlg(n){n.title="Save Chart Data";n.cn="cesavedlg";n.close=!0;n.html='<div class="dlgbody"><table>';n.html+='<tr><td>Name <input class="field" id="'+n.id+'_name" type="text"/><\/td><\/tr>';n.html+='<\/table><\/div><div class="dlgcmds"><button class="cebtn" id="'+n.id+'_create" onclick="rp.doCmds([['+n.id+',3]]);">Save<\/button><\/div>';CEWindow.call(this,n)}function CESaveProjectAsDlg(n){n.title="Save Project";n.cn="cesaveasdlg";n.close=!0;this.views=[{id:"saveas",templateUrl:"/Content/html/save.as.project.html",oninit:function(n,t){t.controls={alert:t.template.querySelector(".alert"),existingname:t.template.querySelector(".project_existing"),overwrite:t.template.querySelector("#project_overwrite"),"new":t.template.querySelector("#project_new"),name:t.template.querySelector("#project_name"),private:t.template.querySelector("#share_private"),shared:t.template.querySelector("#share_shared"),readwrite:t.template.querySelector("#share_readwrite"),save:t.template.querySelector("#project_save"),cancel:t.template.querySelector("#project_cancel")};t.controls.alert.style.display=n.options.owner?"none":"";t.controls.existingname.innerHTML=utils.htmlEncode(n.options.name);t.controls.overwrite.checked=!0;t.controls.private.checked=!0},onactivate:function(n,t){events.add(t.template,"change",n,n._onChange,!0);events.add(t.controls.save,"click",n,n.saveClick);events.add(t.controls.cancel,"click",n,n.cancelClick);n._onChange();n.centre()},ondeactivate:function(n,t){events.remove(t.template,"change",n,n._onChange,!0);events.remove(t.controls.save,"click",n,n.saveClick);events.remove(t.controls.cancel,"click",n,n.cancelClick)},ondispose:function(n,t){delete t.controls}}];CEWindow.call(this,n);this.templateView=new TemplateView({controller:this,domNode:this.containerNode,views:this.views,initialView:"saveas"})}function CESaveProjectDlg(n){n.title="Save Project";n.cn="cesavedlg";n.close=!0;this.views=[{id:"save",templateUrl:"/Content/html/save.project.html",oninit:function(n,t){t.controls={alert:t.template.querySelector(".alert"),name:t.template.querySelector("#project_name"),private:t.template.querySelector("#share_private"),shared:t.template.querySelector("#share_shared"),readwrite:t.template.querySelector("#share_readwrite"),save:t.template.querySelector("#project_save"),cancel:t.template.querySelector("#project_cancel")};t.controls.name.value=n.options.name;t.controls.private.checked=!0;t.controls.alert.style.display=n.options.owner?"none":""},onactivate:function(n,t){events.add(t.template,"change",n,n._onChange,!0);events.add(t.controls.save,"click",n,n.saveClick);events.add(t.controls.cancel,"click",n,n.cancelClick);n._onChange();n.centre()},ondeactivate:function(n,t){events.remove(t.template,"change",n,n._onChange,!0);events.remove(t.controls.save,"click",n,n.saveClick);events.remove(t.controls.cancel,"click",n,n.cancelClick)},ondispose:function(n,t){delete t.controls}}];CEWindow.call(this,n);this.templateView=new TemplateView({controller:this,domNode:this.containerNode,views:this.views,initialView:"save"})}function CESaveTemplateAsDlg(n){n.title="Save Template";n.cn="cesaveasdlg";n.close=!0;n.html='<div class="dlgbody"><table>';n.html+='<tr><td>A template named "'+utils.htmlEncode(n.name)+'" already exists<\/td><\/tr>';n.html+='<tr><td><input id="'+n.id+'_ow" name="ow" type="radio" value="0" checked="1" />Overwrite existing template with your changes<\/td><\/tr>';n.html+='<tr><td><input name="ow" type="radio" value="1" />Save Template with another name<\/td><\/tr>';n.html+='<tr><td>Name <input class="field" id="'+n.id+'_name" type="text"/><\/td><\/tr>';n.html+='<\/table><\/div><div class="dlgcmds"><button class="cebtn" id="'+n.id+'_create" onclick="rp.doCmds([['+n.id+',3]]);">Save<\/button><\/div>';CEWindow.call(this,n)}function CESaveTemplateDlg(n){n.title="Save Template";n.cn="cesavedlg";n.close=!0;n.html='<div class="dlgbody"><table>';n.html+='<tr><td>Name <input class="field" id="'+n.id+'_name" type="text"/><\/td><\/tr>';n.html+='<\/table><\/div><div class="dlgcmds"><button class="cebtn" id="'+n.id+'_create" onclick="rp.doCmds([['+n.id+',3]]);">Save<\/button><\/div>';CEWindow.call(this,n)}function CEShareDlg(n){this.id=n.id;ui[n.id]=this;this.url=n.url;n.title="Share Link";n.cn="cesharedlg";n.close=!0;CEWindow.call(this,n);var t=document.createElement("p");t.appendChild(document.createTextNode("Copy the URL below and share with other REMPLAN users from your organisation only"));this.containerNode.appendChild(t);t=document.createElement("p");this.containerNode.appendChild(t);this.txt=document.createElement("input");this.txt.readOnly=!0;this.txt.value=this.url;t.appendChild(this.txt);this.btn=utils.createButton(null,null,null,"fa-copy");t.appendChild(this.btn);t=document.createElement("div");t.className="dlgcmds";this.containerNode.appendChild(t);this.okbtn=utils.createButton("Ok");t.appendChild(this.okbtn);events.add(this.txt,"click",this,this._selectUrl);events.add(this.okbtn,"click",this,this.closeClick);events.add(this.btn,"click",this,this._copyUrl)}function CESnapshotDlg(n){n.cn="cesnapshotdlg";n.close=!0;n.html='<div class="dlgbody"><table><tr><td>Name<\/td><td><input id="'+n.id+'_name" type="text" value="'+n.name+'"/><span class="mandatory">*<\/span><\/td><\/tr><tr><td>Description<\/td><td><textarea id="'+n.id+'_desc">'+n.desc+'<\/textarea><\/td><\/tr><\/table><\/div><div class="dlgcmds"><button class="cebtn" id="'+n.id+'_save" onclick="rp.doCmds([['+n.id+',3]]);">Save<\/button><\/div>';CEWindow.call(this,n)}function CESession(){this.sessionid=null;this.ver=0;this.iever=10;this.modal=[];this.body=null;this.focusElement=null;this.popups=[];this.pendingCalls=[];this.offline=!1;this.googlemaps=0;this.googleparams="";this.route="/economy";this.downloadiframe=null;this.nextid=0;this.busy=0;this.params=""}CEUtils.prototype.createButton=function(n,t,i,r){var u=document.createElement("button"),f,e;return u.type="button",t&&t.length>0&&(u.id=t),this.setClass(u,"cebtn",!0),i&&i.length>0&&this.setClass(u,i,!0),f=document.createElement("span"),u.appendChild(f),r&&r.length>0&&(e=this.createIcon(r),f.appendChild(e),n&&n.length>0&&f.appendChild(document.createTextNode(" "))),n&&n.length>0&&f.appendChild(document.createTextNode(n)),u};CEUtils.prototype.createIcon=function(n,t,i){var r=document.createElement("i");return n.indexOf("fa-")>=0&&(r.className="fa "),n.indexOf("ri-")>=0&&(r.className="ri "),r.className+=n+" "+(t||""),r.title=i||"",r};CEUtils.prototype.format=function(n){var t,r,i,u;for(i=n,u=arguments.length,t=1;t<u;++t)r=new RegExp("\\{"+(t-1).toString()+"\\}","g"),i=i.replace(r,arguments[t]);return i};CEUtils.prototype.htmlEncode=function(n){var r,i,t,u;if(r="",n&&n.length)for(u=n.length,i=0;i<u;++i)t=n.charAt(i),r+=t.charCodeAt()===10?"<br/>":t<" "||t>"~"||t==="&"||t==="<"||t===">"?"&#"+t.charCodeAt()+";":t;return r};CEUtils.prototype.indexOf=function(n,t){var i,r;if(n&&n.length)for(i=0,r=n.length;i<r;++i)if(n[i]===t)return i;return-1};CEUtils.prototype.purge=function(n){var i=n.attributes,t,u,r;if(i)for(t=i.length-1;t>=0;--t)r=i[t].name,typeof n[r]=="function"&&(n[r]=null);if(i=n.childNodes,i)for(t=0,u=i.length;t<u;++t)utils.purge(i[t])};CEUtils.prototype.disableNodes=function(n){var t,i;return t=[],i=function(n){for(var r,u=0,f=n.length;u<f;++u)r=n[u],r.disabled!=="undefined"?r.disabled||(r.disabled=!0,t.push(r)):r.childNodes&&r.childNodes.length>0&&i(r.childNodes)},i(n),t};CEUtils.prototype.disableAllBut=function(n){for(var t=[],i=function(n,r){for(var u,f=0,e=n.length;f<e;++f)(u=n[f],u!==r)&&(u.disabled!=="undefined"?u.disabled||(u.disabled=!0,t.push(u)):u.childNodes&&u.childNodes.length>0&&i(u.childNodes,null))};n!==window.document.body;){if(!n.parentNode)break;i(n.parentNode.childNodes,n);n=n.parentNode}return t};CEUtils.prototype.enableNodes=function(n){for(var t=0,i=n.length;t<i;++t)n[t].disabled=!1};CEUtils.prototype.setFocus=function(n){if(n)try{n.focus()}catch(t){}};CEUtils.prototype.hslToRGB=function(n,t,i){var e,f,o,r,u;if(t=t/100,i=i/100,n<0&&(n=0),n>359&&(n=359),t<0&&(t=0),t>1&&(t=1),i<0&&(i=0),i>1&&(i=1),t===0)return{r:Math.round(i*255),g:Math.round(i*255),b:Math.round(i*255),h:Math.round(n),s:Math.round(t*100),l:Math.round(i*100)};for(e=i<.5?i*(1+t):i+t-i*t,f=2*i-e,o=n/360,r=[],r[0]=o+1/3,r[1]=o,r[2]=o-1/3,u=0;u<3;++u)r[u]<0&&(r[u]+=1),r[u]>1&&(r[u]-=1),r[u]=r[u]*6<1?f+(e-f)*6*r[u]:r[u]*2<1?e:r[u]*3<2?f+(e-f)*(2/3-r[u])*6:f;return{r:Math.round(r[0]*255),g:Math.round(r[1]*255),b:Math.round(r[2]*255),h:Math.round(n),s:Math.round(t*100),l:Math.round(i*100)}};CEUtils.prototype.rgbToHSL=function(n,t,i){var f,o,e,r,u;return n=n/255,t=t/255,i=i/255,n<0&&(n=0),n>1&&(n=1),t<0&&(t=0),t>1&&(t=1),i<0&&(i=0),i>1&&(i=1),r=Math.max(n,Math.max(t,i)),u=Math.min(n,Math.min(t,i)),r===u?f=0:r===n&&t>=i?f=60*(t-i)/(r-u):r===n&&t<i?f=60*(t-i)/(r-u)+360:r===t?f=60*(i-n)/(r-u)+120:r===i&&(f=60*(n-t)/(r-u)+240),e=(r+u)/2,e===0||r===u?o=0:e>0&&e<=.5?o=(r-u)/(r+u):e>.5&&(o=(r-u)/(2-(r+u))),{r:Math.round(n*255),g:Math.round(t*255),b:Math.round(i*255),h:Math.round(f),s:Math.round(o*100),l:Math.round(e*100)}};CEUtils.prototype.colorToRGB=function(n){return{r:window.parseInt(n.substr(0,2),16),g:window.parseInt(n.substr(2,2),16),b:window.parseInt(n.substr(4,2),16)}};CEUtils.prototype.rgbToColor=function(n,t,i){return utils.leftpad(n.toString(16),"0",2)+utils.leftpad(t.toString(16),"0",2)+utils.leftpad(i.toString(16),"0",2)};CEUtils.prototype.alphaToTrans=function(n){return n=Math.min(Math.max(n,0),255),100-n/2.55};CEUtils.prototype.transToAlpha=function(n){return n=Math.min(Math.max(n,0),100),255-n*2.55};CEUtils.prototype.leftpad=function(n,t,i){while(n.length<i)n=t+n;return n};CEUtils.prototype.getAbsPosition=function(n){for(var t=0,i=0,r=n.clientWidth,u=n.clientHeight;n!==null;){if(t+=n.offsetLeft-n.scrollLeft,i+=n.offsetTop-n.scrollTop,n===window.document.body)break;n=n.offsetParent}return{x:t,y:i,w:r,h:u}};CEUtils.prototype.isInDOM=function(n){while(n!==null){if(n===window.document.body)return!0;n=n.parentNode}return!1};CEUtils.prototype.isChild=function(n,t){while(n!==null){if(n===window.document.body)return!1;if(n===t)return!0;n=n.parentNode}return!1};CEUtils.prototype.include=function(n){var i,t;i=window.document.getElementsByTagName("body")[0];t=window.document.createElement("script");t.src=n;t.type="text/javascript";i.appendChild(t)};CEUtils.prototype.copyPrototype=function(n,t){for(var i in n.prototype)n.prototype.hasOwnProperty(i)&&(t.prototype[i]=n.prototype[i])};CEUtils.prototype.setClass=function(n,t,i){n&&(n.className=n.className.replace(new RegExp(" "+t,"g"),""),i&&(n.className+=" "+t))};CEUtils.prototype.animate=function(n){var t,i;t=new Date;i=window.setInterval(function(){var f,u,r;f=new Date-t;u=f/n.duration;u<1?(r=n.delta(u),n.step.call(n.obj,r)):(window.clearInterval(i),r=n.delta(1),n.step.call(n.obj,r),n.stepEnd&&n.stepEnd.call(n.obj))},n.delay||10)};CEUtils.prototype.makeEaseOut=function(n){return function(t){return 1-n(1-t)}};CEUtils.prototype.makeEaseInOut=function(n){return function(t){return t<.5?n(2*t)/2:(2-n(2*(1-t)))/2}};CEUtils.prototype.deltaSmoothInOut=function(n){return n<=.5?Math.pow(n*2,3)/2:1-Math.pow((1-n)*2,3)/2};CEUtils.prototype.deltaLinear=function(n){return n};CEUtils.prototype.deltaQuad=function(n){return Math.pow(n,2)};CEUtils.prototype.deltaCubic=function(n){return Math.pow(n,3)};CEUtils.prototype.getElementById=function(n,t){for(var i,u=n.childNodes,r=u.length-1;r>=0;--r)if((i=u[r],i.nodeType===1)&&(i.id===t||(i=this.getElementById(i,t),i!==null)))return i;return null};CEUtils.prototype.longMonthNames=["January","February","March","April","May","June","July","August","September","October","November","December"];CEUtils.prototype.shortMonthNames=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];CEUtils.prototype.daysInMonth=[31,28,31,30,31,30,31,31,30,31,30,31];CEUtils.prototype.longDayNames=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];CEUtils.prototype.shortDayNames=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"];CEUtils.prototype.isLeapYear=function(n){return n%4==0&&(n%100!=0||n%400==0)};CEUtils.prototype.getDaysInMonth=function(n,t){return n===2&&this.isLeapYear(t)?29:this.daysInMonth[n-1]};CEUtils.prototype.geoOptions={timeout:1e4,maximumAge:6e4,enableHighAccuracy:!1};CEUtils.prototype.fmtDate=function(n){var t;return n.isNaN||n<=0?"":(t=new Date(n),t.getUTCDate().toString()+" "+this.shortMonthNames[t.getUTCMonth()]+" "+t.getUTCFullYear().toString())};CEUtils.prototype.isDigit=function(n){return n>="0"&&n<="9"};CEUtils.prototype.isFirstDigit=function(n){return n>="1"&&n<="9"};CEUtils.prototype.isLetter=function(n){return n>="a"&&n<="z"||n>="A"&&n<="Z"};CEUtils.prototype.parseDate=function(n){var t,e,u,r,i,o,f,s;for(t=0,u=0,r=0,i=0;t<n.length&&!this.isFirstDigit(n[t]);)t++;if(t>=n.length)return 0;while(t<n.length&&this.isDigit(n[t]))u=u*10+(n.charCodeAt(t)-48),t++;while(t<n.length&&!this.isLetter(n[t])&&!this.isFirstDigit(n[t]))t++;if(t>=n.length)return 0;if(this.isFirstDigit(n[t])){while(t<n.length&&this.isDigit(n[t]))r=r*10+(n.charCodeAt(t)-48),t++;if(r>12)return 0}else if(this.isLetter(n[t])){for(e=t;t<n.length&&this.isLetter(n[t]);)t++;if(s=n.charAt(e).toUpperCase()+n.slice(e+1,t).toLowerCase(),r=this.shortMonthNames.indexOf(s),r<0&&(r=this.longMonthNames.indexOf(s)),r<0)return 0;r++}while(t<n.length&&!this.isFirstDigit(n[t]))t++;if(t>=n.length)return 0;while(t<n.length&&this.isDigit(n[t]))i=i*10+(n.charCodeAt(t)-48),t++;return(i=i>9999?9999:i,i=i<90?2e3+i:i,i=i<=99?1900+i:i,u>this.getDaysInMonth(r,i))?0:(o=new window.Date(i,r-1,u),f=o.getTime(),window.isNaN(f)||f<0?0:f-o.getTimezoneOffset()*6e4)};CEUtils.prototype.fmtNum=function(n,t){for(var i=n.toFixed(t),r=t>0?i.length-t-4:i.length-3;r>0;r-=3){if(i.charCodeAt(r-1)<48||i.charCodeAt(r-1)>57)break;i=i.slice(0,r)+","+i.slice(r)}return i};CEUtils.prototype.getLastChildElement=function(n){for(var t=n?n.lastChild:null;t;){if(t.nodeType===1&&t.tagName!=="SCRIPT")return t;t=t.previousSibling}};CEEvents.prototype.add=function(n,t,i,r,u){var f="ceon"+t;n[f]||(n[f]=[],n.addEventListener?n.addEventListener(t,eventRespond,u||!1):n["on"+t]=eventRespond);n[f].push({o:i,m:r})};CEEvents.prototype.remove=function(n,t,i,r,u){var o,f,e;if(o="ceon"+t,n[o]){for(e=n[o],f=e.length-1;f>=0;--f)if(e[f].o===i&&e[f].m===r){e.splice(f,1);break}e.length===0&&(n[o]=null,n.addEventListener?n.removeEventListener(t,eventRespond,u||!1):n["on"+t]=null)}};CEEvents.prototype.respond=function(n,t){var u,r,i,f;for(t.target=t.target||t.srcElement,u="ceon"+t.type,r=n[u],i=0,f=r.length;i<f;++i)r[i].m.call(r[i].o,n,t);return!t.cancelBubble};CEEvents.prototype.trigger=function(n,t,i){var f,u,r,e;if(f="ceon"+t,n[f])for(u=n[f],r=0,e=u.length;r<e;++r)u[r].m.call(u[r].o,n,i)};CEEvents.prototype.post=function(n,t,i){this.deferred.push({element:n,type:t,e:i});this.postTimer===null&&(this.postTimer=window.setTimeout(eventTimer,1))};CEEvents.prototype.doPost=function(){var i,n,t,r;for(this.postTimer=null,i=this.deferred,this.deferred=[],n=0,r=i.length;n<r;++n)t=i[n],this.trigger(t.element,t.type,t.e)};CEEvents.prototype.startTrackMouse=function(n,t,i){this.endTrackMouse();this.trackObj=n;this.trackMethod=t;this.trackMethod&&(this.add(window.document,"mousemove",events,events.trackMouseMove),this.add(window.document,"mouseup",events,events.trackMouseUp),this.trackMethod.call(this.trackObj,0,i));i.cancelBubble=!0};CEEvents.prototype.endTrackMouse=function(){this.trackMethod&&(this.remove(window.document,"mousemove",events,events.trackMouseMove),this.remove(window.document,"mouseup",events,events.trackMouseUp),this.trackMethod.call(this.trackObj,3,null),this.trackMethod=null,this.trackObj=null)};CEEvents.prototype.trackMouseMove=function(n,t){(t.movementX!==0||t.movementY!==0)&&this.trackMethod&&this.trackMethod.call(this.trackObj,1,t);t.cancelBubble=!0};CEEvents.prototype.trackMouseUp=function(n,t){this.trackMethod&&this.trackMethod.call(this.trackObj,2,t);this.endTrackMouse();t.cancelBubble=!0};CEEvents.prototype.startTimer=function(n,t,i){return window.setInterval(function(){t.call(n)},i)};CEEvents.prototype.setTimeout=function(n,t,i){return window.setTimeout(function(){t.call(n)},i)};CEEvents.prototype.addImmediateTimeout=function(n,t,i){this.immediateList.push({o:n,m:t,a:i});this.immediateId||(this.immediateId=this.setTimeout(this,this.runImmediateTimeout,0))};CEEvents.prototype.runImmediateTimeout=function(){this.immediateId=null;for(var n=0;n!==this.immediateList.length;n++)this.immediateList[n].m.call(this.immediateList[n].o,this.immediateList[n].a);this.immediateList.splice(0,this.immediateList.length)};CEEvents.prototype.stopTimer=function(n){window.clearInterval(n)};CEEvents.prototype.startTrackTouch=function(n,t,i){this.trackEl=i.target;this.trackObj=n;this.trackMethod=t;this.trackMethod&&(this.add(this.trackEl,"touchmove",events,events.trackTouchMove),this.add(this.trackEl,"touchend",events,events.trackTouchEnd),this.add(this.trackEl,"touchcancel",events,events.trackTouchCancel),this.trackMethod.call(this.trackObj,0,i));i.cancelBubble=!0};CEEvents.prototype.endTrackTouch=function(){this.trackMethod&&(this.remove(this.trackEl,"touchmove",events,events.trackTouchMove),this.remove(this.trackEl,"touchend",events,events.trackTouchEnd),this.remove(this.trackEl,"touchcancel",events,events.trackTouchCancel),this.trackMethod.call(this.trackObj,4,null),this.trackEl=null,this.trackMethod=null,this.trackObj=null)};CEEvents.prototype.trackTouchMove=function(n,t){this.trackMethod&&this.trackMethod.call(this.trackObj,1,t);t.cancelBubble=!0;t.preventDefault()};CEEvents.prototype.trackTouchEnd=function(n,t){this.trackMethod&&this.trackMethod.call(this.trackObj,2,t);this.endTrackTouch();t.cancelBubble=!0};CEEvents.prototype.trackTouchCancel=function(n,t){this.trackMethod&&this.trackMethod.call(this.trackObj,3,t);this.endTrackTouch();t.cancelBubble=!0;t.preventDefault()};CEWindow.prototype.dispose=function(){this.options.close&&events.remove(this.divClose,"click",this,this.closeClick);utils.purge(this.domNode);this.control=null;this.domNode=null;this.divClose=null;this.divTitle=null;this.containerNode=null;delete ui[this.options.id]};CEWindow.prototype.setTitle=function(n){this.divTitle.innerHTML=utils.htmlEncode(n)};CEWindow.prototype.show=function(){this.state===0&&(window.document.body.appendChild(this.domNode),this.state=1)};CEWindow.prototype.showClose=function(n){this.divClose.style.display=n?"":"none"};CEWindow.prototype.showModal=function(){this.state===0&&(this.modal=rp.startModal(this.domNode,!0),this.centre(),this.state=2,utils.setFocus(this.domNode))};CEWindow.prototype.centre=function(){this.domNode.style.marginLeft=(-this.domNode.offsetWidth/2).toString()+"px";this.domNode.style.marginTop=(-this.domNode.offsetHeight/2).toString()+"px"};CEWindow.prototype.close=function(){switch(this.state){case 1:window.document.body.removeChild(this.domNode);this.state=0;break;case 2:rp.endModal(this.modal);delete this.modal;this.state=0}};CEWindow.prototype.setControl=function(n){this.control!==null&&this.containerNode.removeChild(this.control.domNode);this.control=n!==null?ui[n]:null;this.containerNode.innerHTML="";this.control!==null&&this.containerNode.appendChild(this.control.domNode)};CEWindow.prototype.closeClick=function(){rp.call({id:this.options.id,cmd:"close"})};CEWindow.prototype.cmds=[CEWindow.prototype.dispose,CEWindow.prototype.showModal,CEWindow.prototype.show,CEWindow.prototype.close,CEWindow.prototype.setControl];CE2Split.prototype.dispose=function(){events.remove(this.divLeftSplitter,"click",this,this.leftSplitterClick);events.remove(this.divRightSplitter,"click",this,this.rightSplitterClick);events.remove(this.divLeftSplitter,"mousedown",this,this.leftSplitterMouseDown);events.remove(this.divRightSplitter,"mousedown",this,this.rightSplitterMouseDown);events.remove(this.divLeftSplitter,"touchstart",this,this.leftSplitterTouchStart);events.remove(this.divRightSplitter,"touchstart",this,this.rightSplitterTouchStart);rp.dispose(this.domNode);this.domNode=null;this.divLeft=null;this.divLeftSplitter=null;this.divLeftGrip=null;this.divMiddle=null;this.divRightSplitter=null;this.divRightGrip=null;this.divRight=null;this.left=null;this.middle=null;this.right=null;delete ui[this.id]};CE2Split.prototype.updateSizes=function(n){(this.divLeft.style.width=this.leftWidth.toString()+"px",this.divLeftSplitter.style.left=this.leftWidth.toString()+"px",this.divLeftSplitter.style.display=this.left?"":"none",this.divLeft.style.display=this.left?"":"none",this.divMiddle.style.left=(this.left?this.leftWidth+this.splitterWidth:0).toString()+"px",this.divMiddle.style.right=(this.right?this.rightWidth+this.splitterWidth:0).toString()+"px",this.divRightSplitter.style.right=this.rightWidth.toString()+"px",this.divRight.style.width=this.rightWidth.toString()+"px",this.divRightSplitter.style.display=this.right?"":"none",this.divRight.style.display=this.right?"":"none",this.divLeftGrip.className=this.leftWidth>0?"ce2split_gripl":"ce2split_gripr",this.divRightGrip.className=this.rightWidth>0?"ce2split_gripr":"ce2split_gripl",n)||rp.needResize()};CE2Split.prototype.leftSplitterClick=function(){var n,t;this.moved||(n=this.leftWidth,t=(this.leftWidth>0?0:this.leftExpandedWidth)-n,utils.setClass(this.divLeftSplitter,"minimised",t<=0),utils.animate({duration:300,delta:utils.deltaSmoothInOut,obj:this,step:function(i){this.leftWidth=n+t*i;this.updateSizes(!0)},stepEnd:function(){this.updateSizes(!1)}}))};CE2Split.prototype.rightSplitterClick=function(){var n,t;this.moved||(n=this.rightWidth,t=(this.rightWidth>0?0:this.rightExpandedWidth)-n,utils.setClass(this.divRightSplitter,"minimised",t<=0),utils.animate({duration:300,delta:utils.deltaSmoothInOut,obj:this,step:function(i){this.rightWidth=n+t*i;this.updateSizes(!0)},stepEnd:function(){this.updateSizes(!1)}}))};CE2Split.prototype.leftSplitterMouseDown=function(n,t){this.moved=!1;this.leftWidth>0&&events.startTrackMouse(this,this.leftSplitterMouseTrack,t)};CE2Split.prototype.rightSplitterMouseDown=function(n,t){this.moved=!1;this.rightWidth>0&&events.startTrackMouse(this,this.rightSplitterMouseTrack,t)};CE2Split.prototype.leftSplitterMouseTrack=function(n,t){switch(n){case 0:this.orgx=t.clientX-this.leftWidth;this.orgy=t.clientY-this.divLeftGrip.offsetTop;break;case 1:case 2:this.tmpWidth=Math.max(Math.min(t.clientX-this.orgx,this.domNode.offsetWidth-32),32);this.leftExpandedWidth=this.tmpWidth;this.leftWidth=this.tmpWidth;this.divLeftGrip.style.top=(Math.max(Math.min(t.clientY-this.orgy,this.divLeftSplitter.offsetHeight-65),0)+32)/this.divLeftSplitter.offsetHeight*100+"%"}n===1&&(this.moved=!0,this.updateSizes(!0));n===2&&this.updateSizes(!1)};CE2Split.prototype.rightSplitterMouseTrack=function(n,t){switch(n){case 0:this.orgx=this.rightWidth+t.clientX;this.orgy=t.clientY-this.divRightGrip.offsetTop;break;case 1:case 2:this.tmpWidth=Math.max(Math.min(this.orgx-t.clientX,this.domNode.offsetWidth-32),32);this.rightExpandedWidth=this.tmpWidth;this.rightWidth=this.tmpWidth;this.divRightGrip.style.top=(Math.max(Math.min(t.clientY-this.orgy,this.divRightSplitter.offsetHeight-65),0)+32)/this.divRightSplitter.offsetHeight*100+"%"}n===1&&(this.moved=!0,this.updateSizes(!0));n===2&&this.updateSizes(!1)};CE2Split.prototype.leftSplitterTouchStart=function(n,t){this.moved=!1;this.leftWidth>0&&events.startTrackTouch(this,this.leftSplitterTouchTrack,t)};CE2Split.prototype.rightSplitterTouchStart=function(n,t){this.moved=!1;this.rightWidth>0&&events.startTrackTouch(this,this.rightSplitterTouchTrack,t)};CE2Split.prototype.leftSplitterTouchTrack=function(n,t){switch(n){case 0:this.orgx=t.touches[0].clientX-this.leftWidth;this.orgy=t.touches[0].clientY-this.divLeftGrip.offsetTop;break;case 1:this.moved=!0;this.tmpWidth=Math.max(Math.min(t.touches[0].clientX-this.orgx,this.domNode.offsetWidth-32),32);this.leftExpandedWidth=this.tmpWidth;this.leftWidth=this.tmpWidth;this.divLeftGrip.style.top=(Math.max(Math.min(t.touches[0].clientY-this.orgy,this.divLeftSplitter.offsetHeight-65),0)+32)/this.divLeftSplitter.offsetHeight*100+"%";this.updateSizes(!0);break;case 2:this.leftSplitterClick(this,t)}};CE2Split.prototype.rightSplitterTouchTrack=function(n,t){switch(n){case 0:this.orgx=this.rightWidth+t.touches[0].clientX;this.orgy=t.touches[0].clientY-this.divRightGrip.offsetTop;break;case 1:this.moved=!0;this.tmpWidth=Math.max(Math.min(this.orgx-t.touches[0].clientX,this.domNode.offsetWidth-32),32);this.rightExpandedWidth=this.tmpWidth;this.rightWidth=this.tmpWidth;this.divRightGrip.style.top=(Math.max(Math.min(t.touches[0].clientY-this.orgy,this.divRightSplitter.offsetHeight-65),0)+32)/this.divRightSplitter.offsetHeight*100+"%";this.updateSizes(!0);break;case 2:this.rightSplitterClick(this,t)}};CE2Split.prototype.setLeft=function(n){this.left&&this.divLeft.removeChild(this.left.domNode);this.left=n!==null?ui[n]:null;this.left&&(utils.setClass(this.left.domNode,"full",!0),this.divLeft.appendChild(this.left.domNode));this.updateSizes()};CE2Split.prototype.setMiddle=function(n){this.middle&&this.divMiddle.removeChild(this.middle.domNode);this.middle=n!==null?ui[n]:null;this.middle&&(utils.setClass(this.middle.domNode,"full",!0),this.divMiddle.appendChild(this.middle.domNode))};CE2Split.prototype.setRight=function(n){this.right&&this.divRight.removeChild(this.right.domNode);this.right=n!==null?ui[n]:null;this.right&&(utils.setClass(this.right.domNode,"full",!0),this.divRight.appendChild(this.right.domNode));this.updateSizes()};CE2Split.prototype.cmds=[CE2Split.prototype.dispose,CE2Split.prototype.setLeft,CE2Split.prototype.setMiddle,CE2Split.prototype.setRight];CEAnimateView.prototype.scroll=function(n,t){var r,i;if(r=this.child,i=ui[n],utils.setClass(i.domNode,"full",!0),i!==r){r||(t=0);switch(t){case 0:this.domNode.appendChild(i.domNode);r&&this.domNode.removeChild(r.domNode);this.child=i;break;case 1:i.domNode.style.left="100%";i.domNode.style.right="auto";r.domNode.style.right="auto";this.domNode.appendChild(i.domNode);utils.animate({duration:500,delta:utils.deltaSmoothInOut,obj:this,step:function(n){r.domNode.style.left=n*-100+"%";i.domNode.style.left=100-100*n+"%"},stepEnd:function(){this.domNode.removeChild(r.domNode);i.domNode.style.left="";i.domNode.style.right="";this.child=i}});break;case 2:i.domNode.style.left="-100%";i.domNode.style.right="auto";r.domNode.style.right="auto";this.domNode.appendChild(i.domNode);utils.animate({duration:500,delta:utils.deltaSmoothInOut,obj:this,step:function(n){r.domNode.style.left=n*100+"%";i.domNode.style.left=-100+n*100+"%"},stepEnd:function(){this.domNode.removeChild(r.domNode);i.domNode.style.left="";i.domNode.style.right="";this.child=i}})}}};CEAnimateView.prototype.cmds=[CEAnimateView.prototype.dispose,CEAnimateView.prototype.scroll];CEBannerPage.prototype.dispose=function(){rp.dispose(this.domNode);this.domNode=null;this.containerNode=null;this.control=null;delete ui[this.id]};CEBannerPage.prototype.setContent=function(n,t){var i,f,r,u;this.control&&(this.control.domNode.parentNode.removeChild(this.control.domNode),this.control=null);this.containerNode.innerHTML="";this.control=n!==null?ui[n]:null;this.control&&(t?(r=window.document.createElement("table"),r.className="container",f=r.insertRow(-1),f.style.height="100%",i=f.insertCell(-1),i.className="container",i.style.width="100%",i.appendChild(this.control.domNode),u=window.document.createElement("div"),u.className="full",u.appendChild(r),this.containerNode.appendChild(u)):this.containerNode.appendChild(this.control.domNode))};CEBannerPage.prototype.setHTML=function(n){this.control&&(this.control.domNode.parentNode.removeChild(this.control.domNode),this.control=null);this.containerNode.innerHTML=n};CEBannerPage.prototype.cmds=[CEBannerPage.prototype.dispose,CEBannerPage.prototype.setContent];CEBarGraphGroup.prototype.dispose=function(){events.remove(this.divExpanderBtn,"click",this,this.expanderClick);events.remove(this.divExpander,"click",this,this.expanderClick);rp.dispose(this.domNode);this.domNode=null;this.containerNode=null;this.divExpander=null;this.divExpanderBtn=null;this.items=null;this.child=null;delete ui[this.id]};CEBarGraphGroup.prototype.add=function(n){var t;t=ui[n];t.setGroup(this);this.items.push(t);this.containerNode.appendChild(t.domNode)};CEBarGraphGroup.prototype.clear=function(){for(var n=0,t=this.items.length;n<t;++n)this.containerNode.removeChild(this.items[n].domNode);if(this.items=[],this.children){for(n=0,t=this.children.length;n<t;++n)this.containerNode.removeChild(this.children[n].domNode);delete this.children}};CEBarGraphGroup.prototype.addChild=function(n){var t;this.children||(this.children=[]);t=ui[n];this.children.push(t);t&&(this.domNode.insertBefore(t.domNode,this.divExpander),t.domNode.style.display=this.isExpanded?"":"none",this.divExpanderBtn.style.display="")};CEBarGraphGroup.prototype.setExpanded=function(n){var t;if(n!==this.isExpanded&&(this.isExpanded=n,utils.setClass(this.divExpanderBtn,"btnexpanded",this.isExpanded),this.containerNode.style.display=this.isExpanded&&this.hrwe?"none":"",this.children))for(t=this.children.length-1;t>=0;--t)this.children[t].domNode.style.display=this.isExpanded?"":"none"};CEBarGraphGroup.prototype.expanderClick=function(){rp.call({id:this.id,cmd:"expand"})};CEBarGraphGroup.prototype.cmds=[CEBarGraphGroup.prototype.dispose,CEBarGraphGroup.prototype.clear,CEBarGraphGroup.prototype.add,CEBarGraphGroup.prototype.addChild,CEBarGraphGroup.prototype.setExpanded];CEBarGraph.prototype.dispose=function(){events.remove(this.divPyramid,"click",this,this.pyramidClick);events.remove(this.divSort,"click",this,this.sortClick);events.remove(this.divPct,"click",this,this.pctClick);events.remove(this.divHeader,"click",this,this.headerClick);events.remove(this.divSave,"click",this,this.saveClick);events.remove(rp,"resize",this,this.resize);rp.dispose(this.domNode);this.domNode=null;this.divHeader=null;this.containerNode=null;this.divFooter=null;this.divSort=null;this.divPct=null;this.divAxis=null;this.levels=null;this.ticks=null;this.items=null;delete ui[this.id]};CEBarGraph.prototype.setData=function(n){var l,t,a,v,h,i,f,e,y,o,k,r,s,c,w;if(this.data&&(this.levels=null,this.divHeader.innerHTML="",this.divFooter.removeChild(this.divAxis),rp.dispose(this.divAxis),this.divAxis=null,this.ticks=null),this.data=n,this.divHeader.style.height="",this.containerNode.style.top="",this.sort=0,this.pct=0,this.swap=0,this.divSort.style.display="none",this.divPct.style.display="none",this.data){e=50;l=window.document.createElement("div");l.className="rowtitle";l.innerHTML="<table><tr><td>"+utils.htmlEncode(this.data.rowtitle)+"<\/td><\/tr><\/table>";this.divHeader.appendChild(l);a=window.document.createElement("div");a.className="units";o=[];o.push("<table><tr><td>");o.push(utils.htmlEncode(this.data.cgs[0].units));this.data.cgs[0].units2&&o.push("<div class='units2'>"+utils.htmlEncode(this.data.cgs[0].units2)+"<\/div>");o.push("<\/td><\/tr><\/table>");a.innerHTML=o.join("");this.divHeader.appendChild(a);v=window.document.createElement("div");v.className="legend";var b=0,p=window.document.createElement("table"),u=this.data.cgs[0];if(this.data.cgs.length===1&&u.cols.length===1)k=p.insertRow(-1).insertCell(-1),k.innerHTML=utils.htmlEncode(u.name);else{if(u.cols.length>1){for(b=13,s=p.insertRow(-1),t=0;t<u.cols.length;t++)c=u.cols[t],r=s.insertCell(-1),r.innerHTML=c.title||c.units,r.className="colname";r=s.insertCell(-1)}for(w=0;w<this.data.cgs.length;w++){for(b+=13,u=this.data.cgs[w],s=p.insertRow(-1),t=0;t<u.cols.length;t++)c=u.cols[t],r=s.insertCell(-1),r.className="color",r.innerHTML='<div style="background-color:#'+c.color+'"><\/div>';r=s.insertCell(-1);r.innerHTML=u.name;r.className="colgroupname"}}if(v.appendChild(p),e=Math.max(b,e),this.containerNode.style.top=(47+e).toString()+"px",this.divHeader.style.height=e.toString()+"px",this.divHeader.appendChild(v),this.data.levels)for(this.levels=[],t=0,y=this.data.levels.length;t<y;++t)f=utils.createButton(this.data.levels[t],null,"cebtn_vertical"),f.style.position="absolute",f.style.left=(t*16+1).toString()+"px",f.style.height=(e-2).toString()+"px",f.celevel=t,this.divHeader.appendChild(f),events.add(f,"click",this,this.levelClick),this.levels.push(f);for(this.divAxis=window.document.createElement("div"),this.divAxis.className="axis",this.ticks=[],h=0,y=this.data.ticks.length;h<y;++h)i={tick:window.document.createElement("div"),lbl:window.document.createElement("span"),f:this.data.ticks[h].f},i.tick.className="tick",i.tick.style.left=(i.f*100).toString()+"%",i.lbl.className="lbl",i.lbl.innerHTML=this.data.ticks[h].l,i.lbl.style.visibility="hidden",i.lbl.style.left=(i.f*100).toString()+"%",this.ticks.push(i),this.divAxis.appendChild(i.tick),this.divAxis.appendChild(i.lbl);this.divFooter.appendChild(this.divAxis);this.sort=this.data.sort===undefined?0:this.data.sort?2:1;this.pct=this.data.pct===undefined?0:this.data.pct?2:1;this.swap=this.data.swap===undefined?0:this.data.swap?2:1;this.pyramid=this.data.pyr===undefined?0:this.data.pyr?2:1}this.updateBtns();rp.needResize()};CEBarGraph.prototype.add=function(n){var t;t=ui[n];this.items.push(t);this.containerNode.appendChild(t.domNode)};CEBarGraph.prototype.clear=function(){for(var n=0,t=this.items.length;n<t;++n)this.containerNode.removeChild(this.items[n].domNode);this.items=[]};CEBarGraph.prototype.resize=function(){function r(n,t,i){var o,r,u,f,e;o=t.f*i.w;r=t.lbl.offsetWidth;switch(n){case 0:t.lbl.style.marginLeft=(-r).toString()+"px";f=o;u=f-r;e=!0;break;case 1:u=o;f=u+r;e=f<i.r;break;default:t.lbl.style.marginLeft=(-r/2).toString()+"px";u=o-r/2;f=u+r;e=u>=i.l&&f<=i.r}t.tick.style.height=e?"8px":"";t.lbl.style.visibility=e?"":"hidden";e&&(n===0?i.r=u-2:i.l=f+2)}var n,t,i;if(this.divAxis)for(this.divAxis.style.right=(this.containerNode.offsetWidth-this.containerNode.clientWidth).toString()+"px",t={l:0,w:this.divAxis.offsetWidth-1},t.r=t.w,n=0,i=this.ticks.length;n<i;++n)r(n,this.ticks[n],t)};CEBarGraph.prototype.setAll=function(n){utils.setClass(this.divHeader,"cebargraph_header_check",n)};CEBarGraph.prototype.updateBtns=function(){this.divPyramid.style.display=this.pyramid>0?"":"none";utils.setClass(this.divPyramid,"checked",this.pyramid===2);this.divSort.style.display=this.sort>0?"":"none";utils.setClass(this.divSort,"checked",this.sort===2);this.divPct.style.display=this.pct>0?"":"none";utils.setClass(this.divPct,"checked",this.pct===2)};CEBarGraph.prototype.levelClick=function(n){rp.call({id:this.id,cmd:"level",level:n.celevel})};CEBarGraph.prototype.pyramidClick=function(){rp.call({id:this.id,cmd:"pyramid"})};CEBarGraph.prototype.sortClick=function(){rp.call({id:this.id,cmd:"sort"})};CEBarGraph.prototype.pctClick=function(){rp.call({id:this.id,cmd:"pct"})};CEBarGraph.prototype.headerClick=function(){rp.call({id:this.id,cmd:"clearsel"})};CEBarGraph.prototype.swapClick=function(){rp.call({id:this.id,cmd:"swap"})};CEBarGraph.prototype.saveClick=function(){rp.call({id:this.id,cmd:"save"})};CEBarGraph.prototype.copyDataClick=function(){rp.showCopy("data",this.id)};CEBarGraph.prototype.copyChartClick=function(){rp.showCopy("chart",this.id)};CEBarGraph.prototype.setTitles=function(n,t){var r,u,i,f;if(n.constructor===Array){for(i=[],f=0;f!==n.length;f++)i.push(utils.htmlEncode(n[f]));i.length>1&&(i[i.length-1]="<strong>"+i[i.length-1]+"<\/strong>");r=i.join(" / ");u=n[n.length-1]}else r=utils.htmlEncode(n),u=n,t&&t.length>0&&(u=t,r+=" / <strong>"+utils.htmlEncode(t)+"<\/strong>");this.divTitleLabel.title=u;this.divTitleLabel.innerHTML=r};CEBarGraph.prototype.cmds=[CEBarGraph.prototype.dispose,CEBarGraph.prototype.setData,CEBarGraph.prototype.clear,CEBarGraph.prototype.add,CEBarGraph.prototype.setAll,CEBarGraph.prototype.setTitles];CEBarGraphRow.prototype.dispose=function(){events.remove(this.domNode,"click",this,this.divClick);rp.dispose(this.domNode);this.domNode=null;delete ui[this.id]};CEBarGraphRow.prototype.setSelect=function(n){n!==this.isSelected&&(this.isSelected=n,utils.setClass(this.domNode,"cebargraphrow_select",n))};CEBarGraphRow.prototype.setExpand=function(n){n!==this.isExpanded&&(this.isExpanded=n,utils.setClass(this.domNode,"cebargraphrow_expand",n))};CEBarGraphRow.prototype.setGroup=function(n){var t;t=(n.level+1)*16;this.divName.style.left=t+"px";this.divName.style.width=248-t+"px"};CEBarGraphRow.prototype.divClick=function(n,t){rp.call({id:this.id,cmd:"click",ctrl:(t.ctrlKey||t.metaKey)===!0,shift:t.shiftKey})};CEBarGraphRow.prototype.cmds=[CEBarGraphRow.prototype.dispose,CEBarGraphRow.prototype.setSelect,CEBarGraphRow.prototype.setExpand];CEBarGraphTotalRow.prototype.dispose=function(){events.remove(this.domNode,"click",this,this.divClick);rp.dispose(this.domNode);this.domNode=null;delete ui[this.id]};CEBarGraphTotalRow.prototype.setSelect=function(n){n!==this.isSelected&&(this.isSelected=n,utils.setClass(this.domNode,"cebargraphtotalrow_select",n))};CEBarGraphTotalRow.prototype.divClick=function(n,t){rp.call({id:this.id,cmd:"click",ctrl:(t.ctrlKey||t.metaKey)===!0,shift:t.shiftKey})};CEBarGraphTotalRow.prototype.cmds=[CEBarGraphTotalRow.prototype.dispose,CEBarGraphTotalRow.prototype.setSelect];CEBlurUpImage.prototype.smallLoaded=function(){this.imgSmall.celoaded=!0;this.imgSmall.originalDimensions={w:this.imgSmall.width,h:this.imgSmall.height};utils.setClass(this.imgSmall,"blurup-loaded",!0);this.onResize()};CEBlurUpImage.prototype.largeLoaded=function(){this.imgLarge.celoaded=!0;this.imgLarge.originalDimensions={w:this.imgLarge.width,h:this.imgLarge.height};utils.setClass(this.imgLarge,"blurup-loaded",!0);this.onResize()};CEBlurUpImage.prototype.onResize=function(){var t=utils.getAbsPosition(this.domNode),f,r,i,n,u,e;try{e=t.w/t.h;!this.imgSmall.celoaded||(n=this.imgSmall.originalDimensions,f=n.w/n.h,e>=f?(r=t.w,i=n.h*(t.w/n.w),u=Math.abs(i-t.h)/-2):(i=t.h,r=n.w*(t.h/n.h),u=0),this.imgSmall.width=r,this.imgSmall.height=i,this.imgSmall.style.top=u+"px");!this.imgLarge.celoaded||(n=this.imgLarge.originalDimensions,f=n.w/n.h,e>=f?(r=t.w,i=n.h*(t.w/n.w),u=Math.abs(i-t.h)/-2):(i=t.h,r=n.w*(t.h/n.h),u=0),this.imgLarge.width=r,this.imgLarge.height=i,this.imgLarge.style.top=u+"px")}catch(o){}};CEBlurUpImage.prototype.dispose=function(){delete ui[this.id];events.remove(this.imgLarge,"load",this,this.largeLoaded,!1);events.remove(this.imgSmall,"load",this,this.smallLoaded,!1);events.remove(rp,"resize",this,this.onResize)};CEBlurUpImage.prototype.setHTML=function(n){this.titleNode.innerHTML=n};CEBlurUpImage.prototype.cmds=[CEBlurUpImage.prototype.dispose,CEBlurUpImage.prototype.setHTML];CEBusy.prototype.dispose=function(){events.remove(rp,"busy",this,this.rpbusy);rp.dispose(this.domNode);this.domNode=null;delete ui[this.id]};CEBusy.prototype.rpbusy=function(n,t){var i=document.querySelector(".cetooltab i");utils.setClass(i,"fa-spin",t)};CEBusy.prototype.cmds=[CEBusy.prototype.dispose];CEButton.prototype.dispose=function(){events.remove(this.domNode,"click",this,this.domNodeClick);rp.dispose(this.domNode);this.domNode=null;delete ui[this.id]};CEButton.prototype.setText=function(n){this.domNode.innerHTML=utils.htmlEncode(n)};CEButton.prototype.setClickCmds=function(n){this.clickCmds=n};CEButton.prototype.domNodeClick=function(){this.clickCmds?rp.doCmds(this.clickCmds):rp.call({id:this.id,cmd:"click"})};CEButton.prototype.show=function(n){this.domNode.style.display=n?"":"none"};CEButton.prototype.cmds=[CEButton.prototype.dispose,CEButton.prototype.show,null,CEButton.prototype.setText,CEButton.prototype.setClickCmds];CEChart.prototype.dispose=function(){this.clearOverlay();events.remove(this.domNode,"mouseup",this,this.domMouseClick);rp.dispose(this.domNode);this.domNode=null;this.divChart=null;this.divOverlays=null;delete ui[this.id]};CEChart.prototype.setChart=function(n,t,i){this.divChart.style.width=t.toString()+"px";this.divChart.style.height=i.toString()+"px";this.divOverlay.style.width=t.toString()+"px";this.divOverlay.style.height=i.toString()+"px";this.divChart.style.backgroundImage="url(chartimage?sid="+rp.sessionid+"&wid="+rp.windowid+"&id="+n+")";this.clearOverlay()};CEChart.prototype.clearOverlay=function(){this.divOverlay.style.display="none";this.divOverlay.style.backgroundImage=""};CEChart.prototype.setOverlay=function(n){this.clearOverlay();this.overlayId=n;this.overlayStep=0;this.divOverlay.style.backgroundImage="url(chartoverlay?sid="+rp.sessionid+"&wid="+rp.windowid+"&id="+this.overlayId+")";this.divOverlay.style.display=""};CEChart.prototype.domMouseClick=function(n,t){rp.call({id:this.id,cmd:"click",x:t.offsetX||t.layerX,y:t.offsetY||t.layerY})};CEChart.prototype.cmds=[CEChart.prototype.dispose,CEChart.prototype.setChart,CEChart.prototype.setOverlay];CEContentTitle.prototype.dispose=function(){};CEContentTitle.prototype.setText=function(n){this.containerNode.innerHTML=utils.htmlEncode(n)};CEContentTitle.prototype.cmds=[CEContentTitle.prototype.dispose,CEContentTitle.prototype.setText];CEDock.prototype.dispose=function(){this.clear();rp.dispose(this.domNode);this.domNode=null;this.items=null;delete ui[this.id]};CEDock.prototype.calcSizes=function(){var i,r,u,f,e,t,n,o;for(i=0,r=0,u=0,f=0,t=null,e=0,o=this.items.length;e<o;++e)if(n=this.items[e],n.domNode.style.display!=="none"){switch(n.dock){case 0:t=n;break;case 1:n.domNode.style.top=u.toString()+"px";n.domNode.style.height=n.docksize.toString()+"px";n.domNode.style.left=i.toString()+"px";n.domNode.style.right=r.toString()+"px";u+=n.docksize;break;case 2:n.domNode.style.bottom=f.toString()+"px";n.domNode.style.height=n.docksize.toString()+"px";n.domNode.style.left=i.toString()+"px";n.domNode.style.right=r.toString()+"px";f+=n.docksize;break;case 3:n.domNode.style.top=u.toString()+"px";n.domNode.style.bottom=f.toString()+"px";n.domNode.style.left=i.toString()+"px";n.domNode.style.width=n.docksize.toString()+"px";i+=n.docksize;break;case 4:n.domNode.style.top=u.toString()+"px";n.domNode.style.bottom=f.toString()+"px";n.domNode.style.right=r.toString()+"px";n.domNode.style.width=n.docksize.toString()+"px";r+=n.docksize}n.domNode.style.position="absolute"}t&&(t.domNode.style.left=i.toString()+"px",t.domNode.style.right=r.toString()+"px",t.domNode.style.top=u.toString()+"px",t.domNode.style.bottom=f.toString()+"px")};CEDock.prototype.add=function(n,t,i){var r;r=ui[n];r.dock=t;r.docksize=i;this.items.push(r);this.calcSizes();this.domNode.appendChild(r.domNode)};CEDock.prototype.insert=function(n,t,i,r){var u;u=ui[t];u.dock=i;u.docksize=r;this.items.splice(n,0,u);this.calcSizes();this.domNode.appendChild(u.domNode)};CEDock.prototype.del=function(n){var t,i;t=ui[n];delete t.dock;delete t.docksize;this.items.splice(utils.indexOf(this.items,t),1);this.domNode.removeChild(t.domNode);i=t.domNode.className;t.domNode.className=i;t.domNode.style.left="";t.domNode.style.right="";t.domNode.style.top="";t.domNode.style.bottom="";this.calcSizes()};CEDock.prototype.clear=function(){for(var n=0,t=this.items.length;n<t;++n)this.domNode.removeChild(this.items[n].domNode);this.items=[]};CEDock.prototype.cmds=[CEDock.prototype.dispose,CEDock.prototype.add,CEDock.prototype.del,CEDock.prototype.clear,CEDock.prototype.insert,CEDock.prototype.calcSizes];CEDocument.prototype.dispose=function(){events.remove(this,"createeditor",this,this.createEditor);events.remove(rp,"resize",this,this.resize);this.editor.destroy();delete ui[this.id]};CEDocument.prototype.setHTML=function(){};CEDocument.prototype.createEditor=function(){var n;n={resize_enabled:!1,outer:0};this.editor=CKEDITOR.appendTo(this.domNode,n);events.add(rp,"resize",this,this.resize);events.post(rp,"resize",null)};CEDocument.prototype.resize=function(){this.editor&&this.editor.container&&utils.isInDOM(this.domNode)&&this.editor.resize(this.domNode.offsetWidth,this.domNode.offsetHeight)};CEDocument.prototype.blur=function(){this.editor&&this.editor.container&&(this.snapshot=this.editor.getSnapshot())};CEDocument.prototype.focus=function(){this.editor&&this.editor.container&&(this.snapshot&&this.editor.loadSnapshot(this.snapshot),this.editor.focus())};CEDocument.prototype.cmds=[CEDocument.prototype.dispose,CEDocument.prototype.setHTML,CEDocument.prototype.focus,CEDocument.prototype.blur];CEEconomyRegionButton.prototype.dispose=function(){delete ui[this.id]};CEEconomyRegionButton.prototype.setTitle=function(n){this.elTitle.innerText=n};CEEconomyRegionButton.prototype.buildRegionButton=function(n){var i=document.createElement("button"),u,t,r;return i.className="ceregionbtn",utils.setClass(i,"ceregionbtn_checked",n.ch),utils.setClass(i,"ceregionbtn_disabled",n.ds),n.ds&&(i.disabled=!0),u=document.createElement("div"),u.className="badge "+n.bc,t=document.createElement("div"),t.className="badge_primary",t.innerHTML=utils.htmlEncode(n.bp),u.appendChild(t),t=document.createElement("div"),t.className="badge_secondary",t.innerHTML=utils.htmlEncode(n.bs),u.appendChild(t),i.appendChild(u),t=document.createElement("div"),t.className="description",i.appendChild(t),r=document.createElement("p"),r.innerHTML="<strong>Published:<\/strong> "+utils.htmlEncode(n.p),t.appendChild(r),r=document.createElement("p"),r.innerHTML=n.d?"<strong>New:<\/strong> "+utils.htmlEncode(n.d):"There is no update information available for this release.",t.appendChild(r),i};CEEconomyRegionButton.prototype.populateDetails=function(n){while(this.elContainer.firstChild!==null)this.elContainer.removeChild(this.elContainer.firstChild);var t;n.ua?(t=document.createElement("button"),t.className="ceregionbtn update",t.cebtncmd="u",t.innerHTML='<div class="badge badge_older"><div class="badge_secondary">Update<br/>Available<\/div><\/div><div class="description"><h3>Order Now<\/h3><\/div>',events.add(t,"click",this,this.click),this.elContainer.appendChild(t)):(t=this.buildRegionButton(n),t.cebtncmd="m",events.add(t,"click",this,this.click),this.elContainer.appendChild(t));n.ac>0||n.bc!=="badge_1"&&n.bc!=="badge_2"?(t=document.createElement("button"),t.className="ceregionbtn more",t.cebtncmd="s",t.innerHTML="<h3>Historical Datasets<\/h3><p>Show Available<\/p>",this.elContainer.appendChild(t),events.add(t,"click",this,this.click)):(t=document.createElement("button"),t.className="ceregionbtn more",t.cebtncmd="h",t.innerHTML="<h3>Historical Datasets<\/h3><p>Order Now<\/p>",this.elContainer.appendChild(t),events.add(t,"click",this,this.click))};CEEconomyRegionButton.prototype.update=function(n){this.populationDetails(n)};CEEconomyRegionButton.prototype.setSelected=function(n,t){utils.setClass(this.elContainer.firstChild,"ceregionbtn_checked",n&&!this.data.ua);this.elContainer.childNodes.length>1&&utils.setClass(this.elContainer.lastChild,"ceregionbtn_checked",t||this.data.ua&&n)};CEEconomyRegionButton.prototype.show=function(n){this.domNode.style.display=n?"":"none"};CEEconomyRegionButton.prototype.click=function(n,t){rp.call({id:this.id,cmd:"click",b:n.cebtncmd,ctrlKey:t.ctrlKey})};CEEconomyRegionButton.prototype.cmds=[CEEconomyRegionButton.prototype.dispose,CEEconomyRegionButton.prototype.setTitle,CEEconomyRegionButton.prototype.show,CEEconomyRegionButton.prototype.update,CEEconomyRegionButton.prototype.setSelected];CEForecastRegionButton.prototype.dispose=function(){delete ui[this.id]};CEForecastRegionButton.prototype.setTitle=function(n){this.elTitle.innerText=n};CEForecastRegionButton.prototype.buildRegionButton=function(n){var i=document.createElement("button"),u,t,r;return i.className="ceregionbtn",utils.setClass(i,"ceregionbtn_checked",n.ch),utils.setClass(i,"ceregionbtn_disabled",n.ds),n.ds&&(i.disabled=!0),u=document.createElement("div"),u.className="badge "+n.bc,t=document.createElement("div"),t.className="badge_secondary",t.innerHTML=utils.htmlEncode(n.bp),u.appendChild(t),t=document.createElement("div"),t.className="badge_primary",t.innerHTML=utils.htmlEncode(n.bs),u.appendChild(t),i.appendChild(u),t=document.createElement("div"),t.className="description",i.appendChild(t),r=document.createElement("p"),r.innerHTML="<strong>Published:<\/strong> "+utils.htmlEncode(n.p),t.appendChild(r),r=document.createElement("p"),r.innerHTML=n.d?"<strong>New:<\/strong> "+utils.htmlEncode(n.d):"There is no update information available for this release.",t.appendChild(r),i};CEForecastRegionButton.prototype.populateDetails=function(n){while(this.elContainer.firstChild!==null)this.elContainer.removeChild(this.elContainer.firstChild);var t;n.ua?(t=document.createElement("button"),t.className="ceregionbtn update",t.cebtncmd="u",t.innerHTML='<div class="badge badge_older"><div class="badge_secondary">Update<br/>Available<\/div><\/div><div class="description"><h3>Order Now<\/h3><\/div>',events.add(t,"click",this,this.click),this.elContainer.appendChild(t)):(t=this.buildRegionButton(n),t.cebtncmd="m",events.add(t,"click",this,this.click),this.elContainer.appendChild(t));(n.ac>0||n.bc!=="badge_1"&&n.bc!=="badge_2")&&(t=document.createElement("button"),t.className="ceregionbtn more",t.cebtncmd="s",t.innerHTML="<h3>Previous Forecasts<\/h3><p>Show Available<\/p>",this.elContainer.appendChild(t),events.add(t,"click",this,this.click))};CEForecastRegionButton.prototype.update=function(n){this.populationDetails(n)};CEForecastRegionButton.prototype.setSelected=function(n,t){utils.setClass(this.elContainer.firstChild,"ceregionbtn_checked",n&&!this.data.ua);this.elContainer.childNodes.length>1&&utils.setClass(this.elContainer.lastChild,"ceregionbtn_checked",t||this.data.ua&&n)};CEForecastRegionButton.prototype.show=function(n){this.domNode.style.display=n?"":"none"};CEForecastRegionButton.prototype.click=function(n,t){rp.call({id:this.id,cmd:"click",b:n.cebtncmd,ctrlKey:t.ctrlKey})};CEForecastRegionButton.prototype.cmds=[CEForecastRegionButton.prototype.dispose,CEForecastRegionButton.prototype.setTitle,CEForecastRegionButton.prototype.show,CEForecastRegionButton.prototype.update,CEForecastRegionButton.prototype.setSelected];CEFrame.prototype.dispose=function(){utils.purge(this.domNode);rp.dispose(this.domNode);this.domNode=null;delete ui[this.id]};CEFrame.prototype.navigate=function(n){this.domNode.src=n};CEFrame.prototype.cmds=[CEFrame.prototype.dispose,CEFrame.prototype.navigate];CEGapLegend.prototype.dispose=function(){rp.dispose(this.domNode);this.domNode=null;this.containerNode=null;this.items=null;delete ui[this.id]};CEGapLegend.prototype.add=function(n){var t;t=ui[n];this.items.push(t);this.containerNode.appendChild(t.domNode)};CEGapLegend.prototype.clear=function(){for(var n=0,t=this.items.length;n<t;++n)this.containerNode.removeChild(this.items[n].domNode);this.items=[]};CEGapLegend.prototype.cmds=[CEGapLegend.prototype.dispose,CEGapLegend.prototype.clear,CEGapLegend.prototype.add];CEGraph.prototype.dispose=function(){this.domNode.innerHTML="";this.options.dom||rp.dispose(this.domNode);this.domNode=null;events.remove(this.domNode,"mousemove",this,this.mouseMove);events.remove(rp,"resize",this,this.resize);delete ui[this.id]};CEGraph.prototype.setData=function(n){if(this.data=n,this.data===null){this.domNode.innerHTML="No data";return}this.build()};CEGraph.prototype.makeFakeData=function(){var n=function(){return Math.random()*200};return{title1:"Example data by forecast year",title2:"Region(s) names here",sc:"#F88",xscale:{name:"Forecast Year",height:50,rows:2,ew:12,ep:6},elements:[{id:2011,n:"2011",c:"#FFF",s:!1},{id:2012,n:"2012",c:"#FFF",s:!1},{id:2013,n:"2013",c:"#FFF",s:!1},{id:2014,n:"2014",c:"#FFF",s:!1},{id:2015,n:"2015",c:"#FFF",s:!1},{id:2016,n:"2016",c:"#FFF",s:!1},{id:2017,n:"2017",c:"#FFF",s:!1},{id:2018,n:"2018",c:"#FFF",s:!1},{id:2019,n:"2019",c:"#FFF",s:!1},{id:2020,n:"2020",c:"#FFF",s:!1},{id:2021,n:"2021",c:"#FFF",s:!1},{id:2022,n:"2022",c:"#FFF",s:!1},{id:2023,n:"2023",c:"#FFF",s:!1},{id:2024,n:"2024",c:"#FFF",s:!1},{id:2025,n:"2025",c:"#FFF",s:!1},{id:2026,n:"2026",c:"#FFF",s:!1},{id:2027,n:"2027",c:"#FFF",s:!1},{id:2028,n:"2028",c:"#FFF",s:!1},{id:2029,n:"2029",c:"#FFF",s:!1},{id:2030,n:"2030",c:"#FFF",s:!1},{id:2031,n:"2031",c:"#FFF",s:!1},{id:2032,n:"2032",c:"#FFF",s:!1},{id:2033,n:"2033",c:"#FFF",s:!1},{id:2034,n:"2034",c:"#FFF",s:!1},{id:2035,n:"2035",c:"#FFF",s:!1},{id:2036,n:"2036",c:"#FFF",s:!1}],yscales:[{name:"People",width:50,zero:!0,mintick:1},{name:"People / ha",width:50,zero:!0,mintick:0}],series:[{yscale:0,type:0,name:"Region1 male",bg:0,fillcolor:"#F88",values:[{v:n()},{v:n()},{v:n()},{v:n()},{v:n()},{v:n()},{v:n()},{v:n()},{v:n()},{v:n()},{v:n()},{v:n()},{v:n()},{v:n()},{v:n()},{v:n()},{v:n()},{v:n()},{v:n()},{v:n()},{v:n()},{v:n()},{v:n()},{v:n()},{v:n()},{v:n()}]},{yscale:0,type:0,name:"Region1 female",bg:0,fillcolor:"#FBB",values:[{v:n()},{v:n()},{v:n()},{v:n()},{v:n()},{v:n()},{v:n()},{v:n()},{v:n()},{v:n()},{v:n()},{v:n()},{v:n()},{v:n()},{v:n()},{v:n()},{v:n()},{v:n()},{v:n()},{v:n()},{v:n()},{v:n()},{v:n()},{v:n()},{v:n()},{v:n()}]},{yscale:0,type:0,name:"Region2 male",bg:1,fillcolor:"#88F",values:[{v:n()},{v:n()},{v:n()},{v:n()},{v:n()},{v:n()},{v:n()},{v:n()},{v:n()},{v:n()},{v:n()},{v:n()},{v:n()},{v:n()},{v:n()},{v:n()},{v:n()},{v:n()},{v:n()},{v:n()},{v:n()},{v:n()},{v:n()},{v:n()},{v:n()},{v:n()}]},{yscale:0,type:0,name:"Region2 female",bg:1,fillcolor:"#BBF",values:[{v:n()},{v:n()},{v:n()},{v:n()},{v:n()},{v:n()},{v:n()},{v:n()},{v:n()},{v:n()},{v:n()},{v:n()},{v:n()},{v:n()},{v:n()},{v:n()},{v:n()},{v:n()},{v:n()},{v:n()},{v:n()},{v:n()},{v:n()},{v:n()},{v:n()},{v:n()}]},{yscale:1,type:1,name:"Region1 people / ha",markerstyle:1,linecolor:"#F00",linewidth:2,linestyle:0,values:[{v:n()},{v:n()},{v:n()},{v:n()},{v:n()},{v:n()},{v:n()},{v:n()},{v:n()},{v:n()},{v:n()},{v:n()},{v:n()},{v:n()},{v:n()},{v:n()},{v:n()},{v:n()},{v:n()},{v:n()},{v:n()},{v:n()},{v:n()},{v:n()},{v:n()},{v:n()}]},{yscale:1,type:1,name:"Region2 people / ha",markerstyle:1,linecolor:"#00F",linewidth:2,linestyle:1,values:[{v:n()},{v:n()},{v:n()},{v:n()},{v:n()},{v:n()},{v:n()},{v:n()},{v:n()},{v:n()},{v:n()},{v:n()},{v:n()},{v:n()},{v:n()},{v:n()},{v:n()},{v:n()},{v:n()},{v:n()},{v:n()},{v:n()},{v:n()},{v:n()},{v:n()},{v:n()}]}]}};CEGraph.prototype.build=function(){this.calcData();this.makeDivs();this.makeYScale1();this.makeYScale2();this.makeXScale();this.makeChart();this.makeLegend();this.makeTitle();this.sizeDivs()};CEGraph.prototype.makeDivs=function(){this.domNode.innerHTML="";this.divTitle=window.document.createElement("div");this.divTitle.className="cetitlebar";this.divTitleLabel=window.document.createElement("div");this.divTitleLabel.className="label";this.divLegend=window.document.createElement("div");this.divLegend.className="cegraph_legend";this.divBody=window.document.createElement("div");this.divBody.className="cegraph_body";this.divYScale1=window.document.createElement("div");this.divYScale1.className="cegraph_yscale1";this.divYScale2=window.document.createElement("div");this.divYScale2.className="cegraph_yscale2";this.divChart=window.document.createElement("div");this.divChart.className="cegraph_chart";this.divXScale=window.document.createElement("div");this.divXScale.className="cegraph_xscale";this.divXTitle=window.document.createElement("div");this.divXTitle.className="cegraph_xscaletitle";this.divScroller=window.document.createElement("div");this.divScroller.className="cegraph_scroller";this.divScroller2=window.document.createElement("div");this.divScroller2.className="cegraph_scroller2";this.divToolbar=window.document.createElement("div");this.divToolbar.className="cebtn-toolbar";this.divSave=utils.createButton("Save");this.divToolbar.appendChild(this.divSave);(this.data.flags&2)>0&&(this.divReset=utils.createButton("Reset"),this.divToolbar.appendChild(this.divReset));this.divInfo=window.document.createElement("div");this.divInfo.className="cegraph_info";this.divScroller2.appendChild(this.divChart);this.divScroller2.appendChild(this.divXScale);this.divScroller.appendChild(this.divScroller2);this.divBody.appendChild(this.divScroller);this.divBody.appendChild(this.divYScale1);this.divBody.appendChild(this.divYScale2);this.divBody.appendChild(this.divXTitle);this.divTitle.appendChild(this.divToolbar);this.divTitle.appendChild(this.divTitleLabel);this.domNode.appendChild(this.divTitle);this.domNode.appendChild(this.divLegend);this.domNode.appendChild(this.divBody);this.domNode.appendChild(this.divInfo);events.add(this.divSave,"click",this,this.saveClick)};CEGraph.prototype.sizeDivs=function(){var n,t;n=this.data.yscales[0].width;t=this.data.yscales.length>1?this.data.yscales[1].width:8;this.divScroller.style.left=n+"px";this.divScroller.style.right=t+"px";this.divLegend.style.left="10px";this.divChart.style.bottom=this.data.xscale.height+"px";this.divXScale.style.height=this.data.xscale.height+"px";this.divXTitle.style.left=n+"px";this.divYScale1.style.width=n+"px";this.divYScale2.style.width=t+"px";this.divScroller2.style.minWidth=this.data.width+"px"};CEGraph.prototype.calcData=function(){var i,n,r,e,u,f,t,o;for(this.data.numstacks=0,i=0;i<this.data.series.length;i++)(f=this.data.series[i],f.type!==1)&&(this.data.numstacks=Math.max(f.bg,this.data.numstacks));for(this.data.numstacks++,i=0;i<this.data.yscales.length;i++)n=this.data.yscales[i],n.minv=n.zero?0:window.NaN,n.maxv=n.zero?0:window.NaN;for(r=this.data.xscale.ep,e=0;e<this.data.elements.length;e++){for(u=this.data.elements[e],u.index=e,u.stacks=[],u.minx=r,r+=this.data.xscale.ep,i=0;i<this.data.numstacks;i++)u.stacks[i]={minv:0,maxv:0,minx:r,maxx:r+this.data.xscale.ew},r+=this.data.xscale.ew;for(r+=this.data.xscale.ep,u.maxx=r,u.x=(u.maxx+u.minx)/2,i=0;i<this.data.series.length;i++){f=this.data.series[i];n=this.data.yscales[f.yscale];t=f.values[e];switch(f.type){case 0:o=u.stacks[f.bg];t.v<0?(t.maxv=o.minv,t.minv=t.maxv+t.v,o.minv=t.minv,n.maxv=window.isNaN(n.maxv)?t.minv:Math.max(n.maxv,t.minv),n.minv=window.isNaN(n.minv)?t.minv:Math.min(n.minv,t.minv)):(t.minv=o.maxv,t.maxv=t.minv+t.v,o.maxv=t.maxv,n.maxv=window.isNaN(n.maxv)?t.maxv:Math.max(n.maxv,t.maxv),n.minv=window.isNaN(n.minv)?t.maxv:Math.min(n.minv,t.maxv));break;case 1:n.minv=window.isNaN(n.minv)?t.v:Math.min(n.minv,t.v);n.maxv=window.isNaN(n.maxv)?t.v:Math.max(n.maxv,t.v)}}}for(r+=this.data.xscale.ep,this.data.width=r,i=0;i<this.data.yscales.length;i++)n=this.data.yscales[i],n.ticks=new CECleanTicks(n.minv,n.maxv-n.minv,5,1,n.mintick)};CEGraph.prototype.makeTitle=function(){var t=this.data.title1,i=this.data.title2,r='<i class="fa fa-bar-chart fa-lg"><\/i> ',u,n,f;if(t.constructor===Array){for(n=[],f=0;f!==t.length;f++)n.push(utils.htmlEncode(t[f]));n.length>1&&(n[n.length-1]="<strong>"+n[n.length-1]+"<\/strong>");r+=n.join(" / ");u=t[t.length-1]}else r+=utils.htmlEncode(t),u=t,i&&i.length>0&&(u=i,r+=" / <strong>"+utils.htmlEncode(i)+"<\/strong>");this.divTitleLabel.title=u;this.divTitleLabel.innerHTML=r};CEGraph.prototype.makeChart=function(){var t,n,e,i,o,u,s,f,l,r,h,a,c;for(this.divChart.innerHTML="",this.divChart.svg=svg.canvas(),t=0;t<this.data.elements.length;t++)n=this.data.elements[t],n.bgrect=svg.rect(n.minx,"0%",n.maxx-n.minx,"100%"),n.bgrect.setAttribute("class","elementbg"),n.g=svg.g(),n.g.ceelement=n,events.add(n.g,"click",this,this.elementClick),events.add(n.g,"mouseover",this,this.elementMouseOver),events.add(n.g,"mouseout",this,this.elementMouseOut),n.fgrect=svg.rect(n.minx,"0%",n.maxx-n.minx,"100%"),n.fgrect.setAttribute("class","elementbox"),n.g.appendChild(n.fgrect),this.divChart.svg.appendChild(n.bgrect),this.setElementClass(n);if(r=this.data.yscales[0],r.lines)for(t=0;;t++){if(f=r.ticks.LowTick+t*r.ticks.TickSpacing,f>r.ticks.HighTick)break;c=this.convertScaleValueToPct(r,f);this.divChart.svg.appendChild(svg.linec(0,c,"100%",c,f===0?"tick0":"tick"))}for(t=0;t<this.data.elements.length;t++)n=this.data.elements[t],this.divChart.svg.appendChild(n.g);for(e=0;e<this.data.series.length;e++){i=this.data.series[e];r=this.data.yscales[i.yscale];switch(i.type){case 0:for(t=0;t<this.data.elements.length;t++)n=this.data.elements[t],o=n.stacks[i.bg],u=i.values[t],f=Math.min(u.maxv,r.ticks.HighTick),l=Math.max(u.minv,r.ticks.LowTick),u.rect=this.makeSeriesRect(i,o.minx,this.convertScaleValueToPct(r,f),o.maxx-o.minx,this.convertScaleRangeToPct(r,f-l)),n.g.appendChild(u.rect);break;case 1:for(s=this.data.elements[0].x,f=i.values[0].v,t=1;t<this.data.elements.length;t++)n=this.data.elements[t],u=i.values[t],a=this.makeSeriesLine(i,s,this.convertScaleValueToPct(r,f),n.x,this.convertScaleValueToPct(r,u.v)),this.divChart.svg.appendChild(a),s=n.x,f=u.v}}for(e=0;e<this.data.series.length;e++)if(i=this.data.series[e],i.type===1&&i.markerstyle>0)for(r=this.data.yscales[i.yscale],t=0;t<this.data.elements.length;t++)n=this.data.elements[t],u=i.values[t],h=this.makeSeriesMarker(i,n.x,this.convertScaleValueToPct(r,u.v)),h!==null&&this.divChart.svg.appendChild(h);this.divChart.appendChild(this.divChart.svg)};CEGraph.prototype.makeLegend=function(){var u,t,i,n,r,f;for(this.divLegend.innerHTML="",u=0;u<this.data.series.length;u++){t=this.data.series[u];i=window.document.createElement("div");i.className="cegraph_legenditem";n=window.document.createElement("div");n.className="cegraph_legendsvg";r=svg.canvas();switch(t.type){case 0:r.appendChild(this.makeSeriesRect(t,0,0,"100%","100%"));break;case 1:r.appendChild(this.makeSeriesLine(t,0,"50%","100%","50%"));f=this.makeSeriesMarker(t,"50%","50%");f!==null&&r.appendChild(f)}n.appendChild(r);i.appendChild(n);n=window.document.createElement("div");n.className="cegraph_legendtext";n.innerHTML=t.name;i.appendChild(n);this.divLegend.appendChild(i)}};CEGraph.prototype.makeSeriesRect=function(n,t,i,r,u){var f;return f=svg.rect(t,i,r,u),f.setAttribute("class","elementbar"),f.setAttribute("fill","#"+n.fillcolor),f};CEGraph.prototype.makeSeriesLine=function(n,t,i,r,u){var f;f=svg.line(t,i,r,u);f.setAttribute("stroke","#"+n.linecolor);f.setAttribute("stroke-width",n.linewidth);switch(n.linestyle){case 1:f.setAttribute("stroke-dasharray","5 5")}return f};CEGraph.prototype.makeSeriesMarker=function(n,t,i){switch(n.markerstyle){case 0:return null;case 1:return svg.circle(t,i,2,"#000",.5,"#FFF");default:return null}};CEGraph.prototype.convertScaleValueToPct=function(n,t){return(n.ticks.HighTick-t)/(n.ticks.HighTick-n.ticks.LowTick)*100+"%"};CEGraph.prototype.convertScaleRangeToPct=function(n,t){return t/(n.ticks.HighTick-n.ticks.LowTick)*100+"%"};CEGraph.prototype.makeYScale1=function(){var t,n,f,u,e,i,r;for(this.divYScale1.innerHTML="",r=window.document.createElement("DIV"),r.className="cegraph_yscale1b",r.style.bottom=this.data.xscale.height+"px",this.divYScale1.appendChild(r),n=this.data.yscales[0],t=svg.canvas(),t.setAttribute("class","scale"),t.appendChild(svg.linec(n.width,0,n.width,"100%","axis")),u=0;u<n.ticks.NumTicks;u++)e=n.ticks.LowTick+u*n.ticks.TickSpacing,f=this.convertScaleValueToPct(n,n.ticks.LowTick+u*n.ticks.TickSpacing),t.appendChild(svg.linec(n.width-5,f,n.width,f,"tick")),i=svg.textc(n.width-10,f,"value",utils.fmtNum(e,n.ticks.DecPlaces)),i.setAttribute("transform","translate(0, 3)"),t.appendChild(i);r.appendChild(t);t=svg.canvas();t.style.top="100%";i=svg.textc(0,0,"title",n.name);i.setAttribute("transform","rotate(-90) translate(0, 16)");t.appendChild(i);r.appendChild(t)};CEGraph.prototype.makeYScale2=function(){var n,t,f,u,e,i,r;if(this.divYScale2.innerHTML="",this.data.yscales.length>1){for(r=window.document.createElement("DIV"),r.className="cegraph_yscale2b",r.style.bottom=this.data.xscale.height+"px",this.divYScale2.appendChild(r),t=this.data.yscales[1],n=svg.canvas(),n.setAttribute("class","scale"),n.appendChild(svg.linec(0,0,0,"100%","axis")),u=0;u<t.ticks.NumTicks;u++)e=t.ticks.LowTick+u*t.ticks.TickSpacing,f=this.convertScaleValueToPct(t,t.ticks.LowTick+u*t.ticks.TickSpacing),n.appendChild(svg.linec(0,f,5,f,"tick")),i=svg.textc(10,f,"value",utils.fmtNum(e,t.ticks.DecPlaces)),i.setAttribute("transform","translate(0, 3)"),n.appendChild(i);r.appendChild(n);n=svg.canvas();n.style.left="100%";i=svg.textc(0,0,"title",t.name);i.setAttribute("transform","rotate(90) translate(0, 16)");n.appendChild(i);r.appendChild(n)}};CEGraph.prototype.makeXScale=function(){var i,t,r,n;for(this.divXScale.innerHTML="",i=svg.canvas(),i.setAttribute("class","scale"),t=0;t<this.data.elements.length;t++)n=this.data.elements[t],i.appendChild(svg.linec(n.x,0,n.x,3,"tick")),t%this.data.xscale.snl==0&&(r=14+t%this.data.xscale.rows*14,n.text=svg.textc(n.x,r,"element",n.n),i.appendChild(n.text));this.divXScale.appendChild(i);this.divXTitle.innerHTML=this.data.xscale.name};CEGraph.prototype.setBar=function(n,t){for(var r,i=0;i<this.data.elements.length;i++)if(r=this.data.elements[i],r.id===n){r.check=t;this.setElementClass(r,t);break}};CEGraph.prototype.setElementClass=function(n){var t;t="elementbg";n.s&&(t+=" set");n===this.hoverElement&&(t+=" hover");n.bgrect.setAttribute("class",t);t="elementfg";n.s&&(t+=" set");n===this.hoverElement&&(t+=" hover");n.fgrect.setAttribute("class",t)};CEGraph.prototype.elementClick=function(n){(this.data.flags&1)==0&&(n.ceelement.s=!n.ceelement.s,this.setElementClass(n.ceelement),rp.call({cmd:"el",id:this.id,elid:n.ceelement.id,sel:n.ceelement.s?"1":"0"}))};CEGraph.prototype.elementMouseOver=function(n){this.hoverElement=n.ceelement;this.setElementClass(n.ceelement)};CEGraph.prototype.elementMouseOut=function(n){this.hoverElement=null;this.setElementClass(n.ceelement)};CEGraph.prototype.mouseMove=function(){};CEGraph.prototype.fmtInfo=function(n){var i,t=[],r;for(t.push("<div><b>"),t.push(n.n),t.push("<\/b><\/div>"),t.push("<table>"),i=0;i<this.data.series.length;i++)r=this.data.series[i],t.push("<tr><td>"),t.push(r.name),t.push("<\/td><td>"),t.push(r.values[n.index].v.toFixed(0)),t.push("<\/td><\/tr>");return t.push("<\/table>"),t.join("")};CEGraph.prototype.moveInfo=function(n){var t;t=utils.getAbsPosition(this.domNode);this.divInfo.style.left=n.clientX-t.x+16+"px";this.divInfo.style.top=n.clientY-t.y+"px"};CEGraph.prototype.resize=function(){this.data&&(this.divYScale1&&(this.divYScale1.style.bottom=this.divScroller.offsetHeight-this.divScroller.clientHeight+"px"),this.divYScale2&&(this.divYScale2.style.bottom=this.divScroller.offsetHeight-this.divScroller.clientHeight+"px"),this.divXTitle&&(this.divXTitle.style.bottom=this.divScroller.offsetHeight-this.divScroller.clientHeight+"px"))};CEGraph.prototype.saveClick=function(){rp.call({id:this.id,cmd:"save"})};CEGraph.prototype.cmds=[CEGraph.prototype.dispose,CEGraph.prototype.setData,CEGraph.prototype.setBar];CEGridCol.prototype.dispose=function(){this.outline=null;this.outlinebtn=null;this.items=null;delete ui[this.id]};CEGridCol.prototype.add=function(n){this.items.push(ui[n])};CEGridCol.prototype.clear=function(){this.items=[]};CEGridCol.prototype.setVis=function(n){this.isVisible=n;this.outlinebtn&&utils.setClass(this.outlinebtn,"coloutlinebtnexpanded",!n)};CEGridCol.prototype.makeOutline=function(n){this.color&&(this.outline=window.document.createElement("div"),this.outline.className="coloutline",this.outline.style.top=(this.level*16+5).toString()+"px",this.outline.style.backgroundColor="#"+this.color,this.items.length>0&&(this.outline.ceid=this.id,this.outlinebtn=window.document.createElement("div"),this.outlinebtn.className="coloutlinebtn",this.outline.appendChild(this.outlinebtn)),n.appendChild(this.outline))};CEGridCol.prototype.cmds=[CEGridCol.prototype.dispose,CEGridCol.prototype.setVis,CEGridCol.prototype.add];CEGrid.prototype.dispose=function(){this.clear();events.remove(this.domNode,"focus",this,this.domNodeFocus);events.remove(this.domNode,"blur",this,this.domNodeBlur);events.remove(this,"startedit",this,this.startEdit);events.remove(this,"endedit",this,this.endEdit);events.remove(this,"focus",this,this.focus);this.domNode=null;delete ui[this.id]};CEGrid.prototype.clear=function(){var n,i,r,u,t;if(events.remove(rp,"resize",this,this.resize),events.remove(this.divHorz,"scroll",this,this.divHorzPos),utils.purge(this.divHorz),utils.purge(this.divVert),this.divRowLevels)for(n=0,t=this.divRowLevels.length;n<t;++n)events.remove(this.divRowLevels[n],"click",this,this.rowlevelClick);if(this.divColLevels)for(n=0,t=this.divColLevels.length;n<t;++n)events.remove(this.divColLevels[n],"click",this,this.collevelClick);if(this.allcols)for(n=0,t=this.allcols.length;n<t;++n)r=this.allcols[n],r.outlinebtn&&events.remove(r.outline,"click",this,this.outlineClick);if(this.allrows)for(n=0,t=this.allrows.length;n<t;++n)u=this.allrows[n],u.outlinebtn&&events.remove(u.outline,"click",this,this.outlineClick);if(this.panes)for(n=0,t=this.panes.length;n<t;++n)i=this.panes[n],events.remove(i.domNode,"click",this,this.paneClick),events.remove(i.domNode,"mousedown",this,this.paneMouseDown),events.remove(i.domNode,"mousemove",this,this.paneMouseMove),events.remove(i.domNode,"mouseup",this,this.paneMouseUp),i.dispose();this.cells=null;this.cols=[];this.rows=[];this.rowlevels=null;this.collevels=null;this.allcols=null;this.allrows=null;this.visrows=null;this.viscols=null;this.paneltopleft=null;this.paneltop=null;this.panelleft=null;this.panelcells=null;this.panelbotleft=null;this.panelbot=null;this.panes=null;this.panesgrid=null;this.divVert=null;this.divHorz=null;this.divRowLevels=null;this.divColLevels=null;this.mousePane=null;this.domEdit=null;this.isEditing=!1;this.domNode.innerHTML=""};CEGrid.prototype.setData=function(n){var i,r,f,o,e,h,v,s,t,c,l,u,a,y;for(this.rowlevels=n.rowlevels||null,this.collevels=n.collevels||null,this.allcols=[],this.allrows=[],this.addGridCols(null,0,this.cols),this.addGridRows(null,0,this.rows),f=this.rowlevels?this.rowlevels.length*16:0,e=this.collevels?this.collevels.length*16:0,o=0,r=0,u=n.fl;r<u;++r)o+=this.allcols[r].w;for(h=0,i=0,u=n.ft;i<u;++i)h+=this.allrows[i].h;for(v=0,s=this.allrows.length-n.fb,i=s,u=this.allrows.length;i<u;++i)v+=this.allrows[i].h;if(this.fbh=v,this.rlw=f,this.clh=e,n&&n.topheading&&(t=window.document.createElement("div"),t.className="topheading",t.style.top=e+"px",t.style.left=f+o+32+"px",t.innerHTML=n.topheading,this.domNode.appendChild(t),e+=16),n&&n.leftheading&&(t=window.document.createElement("div"),t.className="leftheading1",t.style.top=e+h+32+"px",t.style.left=f+"px",this.domNode.appendChild(t),a=window.document.createElement("div"),a.className="leftheading2",a.innerHTML=n.leftheading,t.appendChild(a),f+=16),this.divHorz=window.document.createElement("div"),this.divHorz.className="horz",this.divHorz.style.left=(f+o).toString()+"px",events.add(this.divHorz,"scroll",this,this.divHorzPos),this.divVert=window.document.createElement("div"),this.divVert.className="vert",this.divVert.style.top=(e+h).toString()+"px",this.panes=[],this.panesgrid=[],this.panesgrid[0]=[],this.panesgrid[1]=[],this.panesgrid[2]=[],n.fl>0&&(this.panelleft=this.makePane(this.divVert,{r1:n.ft,c1:0,r2:s-1,c2:n.fl-1},1,0),this.panelleft.domNode.style.left=f.toString()+"px",this.panelleft.domNode.style.top="0px"),this.panelcells=this.makePane(this.divVert,{r1:n.ft,c1:n.fl,r2:s-1,c2:this.allcols.length-1},1,1),this.panelcells.domNode.style.left=(f+o).toString()+"px",this.panelcells.domNode.style.top="0px",n.fb>0&&n.fl>0&&(this.panelbotleft=this.makePane(this.domNode,{r1:s,c1:0,r2:this.allrows.length-1,c2:n.fl-1},2,0),this.panelbotleft.domNode.style.left=f.toString()+"px"),n.fb>0&&(this.panelbot=this.makePane(this.divHorz,{r1:s,c1:n.fl,r2:this.allrows.length-1,c2:this.allcols.length-1},2,1),this.panelbot.domNode.style.left="0px"),n.ft>0&&n.fl>0&&(this.paneltopleft=this.makePane(this.domNode,{r1:0,c1:0,r2:n.ft-1,c2:n.fl-1},0,0),this.paneltopleft.domNode.style.left=f.toString()+"px",this.paneltopleft.domNode.style.top=e.toString()+"px"),n.ft>0&&(this.paneltop=this.makePane(this.divHorz,{r1:0,c1:n.fl,r2:n.ft-1,c2:this.allcols.length-1},0,1),this.paneltop.domNode.style.left="0px",this.paneltop.domNode.style.top=e.toString()+"px"),this.rowlevels){for(this.divRowLevels=[],i=0,u=this.rowlevels.length;i<u;++i)t=window.document.createElement("button"),t.className="cebtn cebtn_vertical rowlevel",t.style.top=(e+1).toString()+"px",t.style.height=(h-2).toString()+"px",t.style.left=(i*16+1).toString()+"px",y=document.createElement("span"),y.innerHTML=this.rowlevels[i],t.appendChild(y),t.celevel=i,events.add(t,"click",this,this.rowlevelClick),this.divRowLevels.push(t),this.domNode.appendChild(t);for(i=0,u=this.panelcells.rows.length;i<u;++i)l=this.panelcells.rows[i],l.makeOutline(this.divVert),l.outlinebtn&&events.add(l.outline,"click",this,this.outlineClick)}if(this.collevels){for(this.divColLevels=[],r=0,u=this.collevels.length;r<u;++r)t=window.document.createElement("button"),t.type="button",t.className="cebtn collevel",t.style.left=(f+1).toString()+"px",t.style.width=(o-2).toString()+"px",t.style.top=(r*16+1).toString()+"px",t.innerText=this.collevels[r],t.celevel=r,events.add(t,"click",this,this.collevelClick),this.divColLevels.push(t),this.domNode.appendChild(t);for(r=0,u=this.panelcells.cols.length;r<u;++r)c=this.panelcells.cols[r],c.makeOutline(this.divHorz),c.outlinebtn&&events.add(c.outline,"click",this,this.outlineClick)}this.range=n.range;this.setLastRange();events.add(rp,"resize",this,this.resize);this.domNode.appendChild(this.divHorz);this.domNode.appendChild(this.divVert);rp.needResize()};CEGrid.prototype.addCol=function(n){this.cols.push(ui[n])};CEGrid.prototype.addRow=function(n){this.rows.push(ui[n])};CEGrid.prototype.addGridCols=function(n,t,i){for(var r,u=0,f=i.length;u<f;++u)r=i[u],r.parent=n,r.level=t,r.index=this.allcols.length,this.allcols.push(r),r.items.length>0&&this.addGridCols(r,t+1,r.items),r.colspan=this.allcols.length-r.index};CEGrid.prototype.addGridRows=function(n,t,i){for(var r,u=0,f=i.length;u<f;++u)r=i[u],r.parent=n,r.level=t,r.index=this.allrows.length,this.allrows.push(r),r.items.length>0&&this.addGridRows(r,t+1,r.items),r.rowspan=this.allrows.length-r.index};CEGrid.prototype.resize=function(){var n;if(this.divVert.clientWidth>0&&this.divHorz.clientHeight>0){for(n=0;n<2;++n)this.divHorz.style.right=(this.divVert.offsetWidth-this.divVert.clientWidth).toString()+"px",this.divVert.style.bottom=(this.fbh+this.divHorz.offsetHeight-this.divHorz.clientHeight).toString()+"px";this.panelbotleft&&(this.panelbotleft.domNode.style.top=(this.divHorz.clientHeight-this.fbh).toString()+"px");this.panelbot&&(this.panelbot.domNode.style.top=(this.divHorz.clientHeight-this.fbh).toString()+"px")}this.panelcells.domNode.style.width=this.divHorz.offsetWidth.toString()+"px";this.panelcells.domNode.scrollLeft=this.divHorz.scrollLeft};CEGrid.prototype.divHorzPos=function(){this.panelcells.domNode.scrollLeft=this.divHorz.scrollLeft};CEGrid.prototype.update=function(){var n,t,f,o,i,e,s,h,c,u,r;for(this.destroyEditor(),f=0,this.visrows=[],n=0,r=this.allrows.length;n<r;++n)t=this.allrows[n],t.y1=f,t.isVisible?(f+=t.h,t.visRow=this.visrows.length,this.visrows.push(t)):t.visRow=-1,t.y2=f;for(e=0,this.viscols=[],n=0,r=this.allcols.length;n<r;++n)i=this.allcols[n],i.x1=e,i.isVisible?(e+=i.w,i.visCol=this.viscols.length,this.viscols.push(i)):i.visCol=-1,i.x2=e;if(this.divRowLevels)for(c=this.panelcells.rows[0].y1,n=0,r=this.panelcells.rows.length;n<r;++n)t=this.panelcells.rows[n],t.outline&&(t.outline.style.top=(t.y1-c+1).toString()+"px",o=Math.max(this.panelcells.rows[n+t.rowspan-1].y2-t.y1-2,0),t.outline.style.height=o.toString()+"px",t.outline.style.display=o>0?"":"none");if(this.divColLevels)for(h=this.panelcells.cols[0].x1,n=0,r=this.panelcells.cols.length;n<r;++n)i=this.panelcells.cols[n],i.outline&&(i.outline.style.left=(i.x1-h+1).toString()+"px",s=Math.max(this.panelcells.cols[n+i.colspan-1].x2-i.x1-2,0),i.outline.style.width=s.toString()+"px",i.outline.style.display=s>0?"":"none");for(n=0,r=this.panes.length;n<r;++n)u=this.panes[n],u.parent.removeChild(u.domNode),u.updateCells(this.cells),u.parent.appendChild(u.domNode);this.autosize&&(this.domNode.style.width=(this.rlw+e).toString()+"px",this.domNode.style.height=(this.clh+f).toString()+"px");this.updateCursor();rp.needResize()};CEGrid.prototype.mapRCToPane=function(n,t){var i,r,u;return r=this.allrows[n],u=this.allcols[t],i={pane:this.panesgrid[r.panerow][u.panecol]},r.visRow>=0&&(i.vr=r.visRow-i.pane.visRows[0].visRow),u.visCol>=0&&(i.vc=u.visCol-i.pane.visCols[0].visCol),i};CEGrid.prototype.makePane=function(n,t,i,r){var u,f,e,o,s;for(u=new CEGridPane(t),u.range=t,u.parent=n,u.panerow=i,u.panecol=r,f=t.c1;f<=t.c2;++f)o=this.allcols[f],o.panecol=r,u.cols.push(o);for(e=t.r1;e<=t.r2;++e)s=this.allrows[e],s.panerow=i,u.rows.push(s);return this.panesgrid[i][r]=u,this.panes.push(u),n.appendChild(u.domNode),events.add(u.domNode,"click",this,this.paneClick),events.add(u.domNode,"mousedown",this,this.paneMouseDown),events.add(u.domNode,"mousemove",this,this.paneMouseMove),events.add(u.domNode,"mouseup",this,this.paneMouseUp),u};CEGrid.prototype.setAllCells=function(n){this.cells=n};CEGrid.prototype.setCells=function(n,t,i,r){for(var u,e,o,s,h,f=0,c=n.length;f<c;++f)for(e=n[f],u=0,h=t.length;u<h;++u)o=t[u],s=i[f][u],this.cells[e][o]=s,r&&this.setCell(e,o,s)};CEGrid.prototype.setPts=function(n,t){for(var i,r=0,u=n.length;r<u;++r)i=n[r],this.cells[i.r][i.c]=i,t&&this.setCell(i.r,i.c,i)};CEGrid.prototype.setCell=function(n,t,i){var u,f,r,e,o,s,h;u=this.allrows[n];f=this.allcols[t];u.visRow>=0&&f.visCol>=0&&(r=this.panesgrid[u.panerow][f.panecol],e=u.visRow-r.visRows[0].visRow,o=f.visCol-r.visCols[0].visCol,s=r.tbody.rows[e].cells[o],h=r.tbody1.rows[e].cells[o],s.className=i.cn||"",h.className=i.cn||"",s.style.backgroundColor=i.bgc?"#"+i.bgc:"",h.innerHTML=i.t||"&nbsp;")};CEGrid.prototype.setStyle=function(n,t){for(var r,i=0,u=n.length;i<u;++i)r=n[i],this.cells[r.x][r.y].cn=t};CEGrid.prototype.setCursor=function(n,t,i,r){i?(this.range.r2=n,this.range.c2=t):(this.range.r1=n,this.range.c1=t,this.range.r2=n,this.range.c2=t,this.range.ctrl=r===!0);this.updateCursor()};CEGrid.prototype.setRange=function(n){this.range=n;this.setLastRange();this.updateCursor()};CEGrid.prototype.notifyCursor=function(){(this.range.r1!==this.lastrange.r1||this.range.r2!==this.lastrange.r2||this.range.c1!==this.lastrange.c1||this.range.c2!==this.lastrange.c2)&&(rp.call({id:this.id,cmd:"range",r1:this.range.r1,r2:this.range.r2,c1:this.range.c1,c2:this.range.c2,c:this.range.ctrl?"1":"0"}),this.setLastRange())};CEGrid.prototype.setLastRange=function(){this.lastrange={r1:this.range.r1,r2:this.range.r2,c1:this.range.c1,c2:this.range.c2}};CEGrid.prototype.updateCursor=function(){var i,u,f,e,o,s,h,c,l,r,n,t,a;for(u=this.allcols[Math.min(this.range.c1,this.range.c2)].x1,s=this.allrows[Math.min(this.range.r1,this.range.r2)].y1,f=this.allcols[Math.max(this.range.c1,this.range.c2)].x2,h=this.allrows[Math.max(this.range.r1,this.range.r2)].y2,e=this.allcols[this.range.c1].x1,c=this.allrows[this.range.r1].y1,o=this.allcols[this.range.c1].x2,l=this.allrows[this.range.r1].y2,i=0,a=this.panes.length;i<a;++i)r=this.panes[i],n=r.cols[0].x1,t=r.rows[0].y1,r.selection.setCoord({l:u-n,t:s-t,r:f-n,b:h-t},{l:e-n,t:c-t,r:o-n,b:l-t});this.waitingForCellVisible||(this.waitingForCellVisible=!0,events.addImmediateTimeout(this,this.ensureCellVisible,[this.range.r2,this.range.c2]))};CEGrid.prototype.rowlevelClick=function(n){events.post(this,"endedit",27);rp.call({id:this.id,cmd:"rowlevel",level:n.celevel})};CEGrid.prototype.collevelClick=function(n){events.post(this,"endedit",27);rp.call({id:this.id,cmd:"collevel",level:n.celevel})};CEGrid.prototype.outlineClick=function(n){events.post(this,"endedit",27);rp.call({id:n.ceid,cmd:"expand"})};CEGrid.prototype.paneClick=function(n,t){this.mouseCell=n.cepane.getRC(t);this.mouseCell&&(this.setCursor(this.mouseCell.r,this.mouseCell.c,t.shiftKey,(t.ctrlKey||t.metaKey)===!0),t.shiftKey||this.startEdit(this,null))};CEGrid.prototype.paneMouseDown=function(n,t){this.mouseCell=n.cepane.getRC(t);this.mouseCell&&events.startTrackMouse(this,this.mouseTrack,t)};CEGrid.prototype.paneMouseMove=function(n,t){this.mouseCell=n.cepane.getRC(t);this.isTracking&&this.mouseCell&&this.setCursor(this.mouseCell.r,this.mouseCell.c,!0)};CEGrid.prototype.paneMouseUp=function(n,t){this.mouseCell=n.cepane.getRC(t);this.isTracking&&this.mouseCell&&this.setCursor(this.mouseCell.r,this.mouseCell.c,!0)};CEGrid.prototype.mouseTrack=function(n,t){switch(n){case 0:this.endEdit(this,13);this.setCursor(this.mouseCell.r,this.mouseCell.c,t.shiftKey,(t.ctrlKey||t.metaKey)===!0);this.isTracking=!0;break;case 3:this.isTracking=!1;this.notifyCursor();utils.setFocus(this.domNode)}};CEGrid.prototype.startEdit=function(n,t){var i,r,u,f;if(this.destroyEditor(),u=this.range.r1,f=this.range.c1,i=this.mapRCToPane(u,f),r=i.pane.table1.rows[i.vr].cells[i.vc],r.className.indexOf(" edit")>=0){if(this.editr=u,this.editc=f,this.domEdit=window.document.createElement("textarea"),this.domEdit.className="edit",this.domEdit.style.left=(i.pane.cols[f-i.pane.range.c1].x1-i.pane.cols[0].x1).toString()+"px",this.domEdit.style.width=(i.pane.cols[f-i.pane.range.c1].w-2).toString()+"px",this.domEdit.style.top=(i.pane.rows[u-i.pane.range.r1].y1-i.pane.rows[0].y1).toString()+"px",this.domEdit.style.height=(i.pane.rows[u-i.pane.range.r1].h-2).toString()+"px",i.pane.domNode.appendChild(this.domEdit),utils.setFocus(this.domEdit),t===null)this.domEdit.value=r.textContent||r.innerText;else if(t.key){switch(t.key){case 13:this.domEdit.value=r.textContent||r.innerText}this.domEdit.select()}else t.chr&&(this.domEdit.setSelectionRange?(this.domEdit.value=String.fromCharCode(t.chr),this.domEdit.setSelectionRange(1,1)):this.domEdit.createTextRange&&(this.domEdit.createTextRange().text=String.fromCharCode(t.chr)));events.add(this.domEdit,"keydown",this,this.editKeyDown);events.add(this.domEdit,"keypress",this,this.editKeyPress);events.add(this.domEdit,"blur",this,this.editBlur);this.isEditing=!0}return this.isEditing};CEGrid.prototype.editKeyDown=function(n,t){var i=t.which||t.keyCode;switch(i){case 9:case 27:case 38:case 40:events.post(this,"endedit",i);t.cancelBubble=!0}};CEGrid.prototype.editKeyPress=function(n,t){var i=t.which||t.keyCode;switch(i){case 9:case 13:events.post(this,"endedit",i);t.cancelBubble=!0;t.stopPropagation();t.preventDefault()}};CEGrid.prototype.editBlur=function(){events.post(this,"endedit",27)};CEGrid.prototype.endEdit=function(n,t){if(this.isEditing){t!==27&&rp.call({id:this.id,cmd:"edit",r:this.editr,c:this.editc,v:this.domEdit.value});this.destroyEditor();switch(t){case 9:this.moveRight(1);break;case 38:this.moveUp(1);break;case 40:this.moveDown(1)}events.post(this,"focus",null)}};CEGrid.prototype.destroyEditor=function(){this.isEditing&&(events.remove(this.domEdit,"keydown",this,this.editKeyDown),events.remove(this.domEdit,"keypress",this,this.editKeyPress),events.remove(this.domEdit,"blur",this,this.editBlur),this.domEdit.parentNode.removeChild(this.domEdit),this.domEdit=null,this.isEditing=!1)};CEGrid.prototype.domNodeFocus=function(){this.isFocus||(this.isFocus=!0,events.add(this.domNode,"keydown",this,this.domKeyDown),events.add(this.domNode,"keypress",this,this.domKeyPress),events.add(this.domNode,"keyup",this,this.domKeyUp));rp.focusElement=this.domNode};CEGrid.prototype.domNodeBlur=function(){this.isFocus=!1;events.remove(this.domNode,"keydown",this,this.domKeyDown);events.remove(this.domNode,"keypress",this,this.domKeyPress);events.remove(this.domNode,"keyup",this,this.domKeyUp);rp.focusElement=null};CEGrid.prototype.domKeyDown=function(n,t){var i=t.which||t.keyCode;switch(i){case 38:this.moveUp(1,t.shiftKey);t.cancelBubble=!0;break;case 40:this.moveDown(1,t.shiftKey);t.cancelBubble=!0;break;case 37:this.moveLeft(1,t.shiftKey);t.cancelBubble=!0;break;case 9:t.preventDefault();case 39:this.moveRight(1,t.shiftKey);t.cancelBubble=!0;break;case 13:events.post(this,"startedit",{key:13});t.cancelBubble=!0;break;case 8:case 46:events.post(this,"startedit",{key:46});t.cancelBubble=!0}};CEGrid.prototype.domKeyPress=function(n,t){var i;i=t.which||t.keyCode;i>=45&&i<128?(events.post(this,"startedit",{chr:i}),t.cancelBubble=!0):i===13&&(events.post(this,"startedit",{key:13}),t.cancelBubble=!0)};CEGrid.prototype.domKeyUp=function(n,t){t.shiftKey||t.ctrlKey||t.metaKey||this.isTracking||this.notifyCursor()};CEGrid.prototype.focus=function(){utils.setFocus(this.domNode)};CEGrid.prototype.moveUp=function(n,t){var r,u,i;(r=t?this.range.r2:this.range.r1,u=t?this.range.c2:this.range.c1,i=this.allrows[r].visRow,i<0)||(i=Math.max(i-n,0),r=this.visrows[i].index,this.setCursor(r,u,t))};CEGrid.prototype.moveDown=function(n,t){var r,u,i;(r=t?this.range.r2:this.range.r1,u=t?this.range.c2:this.range.c1,i=this.allrows[r].visRow,i<0)||(i=Math.min(i+n,this.visrows.length-1),r=this.visrows[i].index,this.setCursor(r,u,t))};CEGrid.prototype.moveLeft=function(n,t){var u,r,i;(u=t?this.range.r2:this.range.r1,r=t?this.range.c2:this.range.c1,i=this.allcols[r].visCol,i<0)||(i=Math.max(i-n,0),r=this.viscols[i].index,this.setCursor(u,r,t))};CEGrid.prototype.moveRight=function(n,t){var u,r,i;(u=t?this.range.r2:this.range.r1,r=t?this.range.c2:this.range.c1,i=this.allcols[r].visCol,i<0)||(i=Math.min(i+n,this.viscols.length-1),r=this.viscols[i].index,this.setCursor(u,r,t))};CEGrid.prototype.ensureCellVisible=function(n){for(var e,o,u=n[0],f=n[1],r=null,i=0;i!==this.panes.length;i++)if(f>=this.panes[i].range.c1&&f<=this.panes[i].range.c2&&u>=this.panes[i].range.r1&&u<=this.panes[i].range.r2){r=this.panes[i];break}if(r!=null&&r.parent===this.divHorz||r.parent===this.divVert){var t={x:this.allcols[f].x1-r.cols[0].x1,y:this.allrows[u].y1-r.rows[0].y1,w:this.allcols[f].w,h:this.allrows[u].h},s=this.divHorz.scrollLeft,h=this.divHorz.offsetWidth;t.x-s<0?this.divHorz.scrollLeft=t.x-10:t.x+t.w-s>h&&(this.divHorz.scrollLeft=t.x+t.w-h+10);e=this.divVert.scrollTop;o=this.divVert.offsetHeight;t.y-e<0?this.divVert.scrollTop=t.y-10:t.y+t.h-e>o&&(this.divVert.scrollTop=t.y+t.h-o+10)}this.waitingForCellVisible=!1};CEGrid.prototype.cmds=[CEGrid.prototype.dispose,CEGrid.prototype.setData,CEGrid.prototype.setAllCells,CEGrid.prototype.setCells,CEGrid.prototype.setPts,CEGrid.prototype.clear,CEGrid.prototype.addRow,CEGrid.prototype.addCol,CEGrid.prototype.update];CEGridPane.prototype.dispose=function(){this.domNode.cepane=null;this.selection.dispose();rp.dispose(this.domNode);this.domNode=null;this.table=null;this.tbody=null;this.table1=null;this.tbody1=null;this.cols=null;this.rows=null;this.visRows=null;this.visCols=null;this.btns=null};CEGridPane.prototype.intersect=function(n){var t;return t={},t.r1=Math.max(n.r1,this.range.r1),t.r2=Math.min(n.r2,this.range.r2),t.c1=Math.max(n.c1,this.range.c1),t.c2=Math.min(n.c2,this.range.c2),t.r1<=t.r2&&t.c1<=t.c2?t:null};CEGridPane.prototype.updateCells=function(n){var s,e,r,u,f,t,i,o,h;for(this.visRows=[],this.visCols=[],this.selection.domNode.parentNode&&this.domNode.removeChild(this.selection.domNode),this.table=null,this.tbody=null,this.table1=null,this.tbody1=null,this.domNode.innerHTML="",this.h=0,this.w=0,t=[],i=[],t.push('<table class="pane"><colgroup>'),i.push('<table class="pane1"><colgroup>'),r=this.range.c1,o=this.range.c2;r<=o;++r)u=this.cols[r-this.range.c1],u.isVisible&&(this.visCols.push(u),t.push('<col style="width:'),i.push('<col style="width:'),t.push(u.domw),i.push(u.domw),t.push('px;"/>'),i.push('px;"/>'),this.w+=u.domw);for(t.push("<\/colgroup><tbody>"),i.push("<\/colgroup><tbody>"),s=this.range.r1,h=this.range.r2;s<=h;++s)if(e=this.rows[s-this.range.r1],e.isVisible){for(this.visRows.push(e),t.push('<tr style="height:'),i.push('<tr style="height:'),t.push(e.domh),i.push(e.domh),t.push('px;">'),i.push('px;">'),this.h+=e.domh,r=0,o=this.visCols.length;r<o;++r)u=this.visCols[r],f=n[s][u.index],t.push("<td"),i.push("<td"),f.cn&&(t.push(' class="'),i.push(' class="'),t.push(f.cn),i.push(f.cn),t.push('"'),i.push('"')),f.bgc&&(t.push(' style="background-color: #'),t.push(f.bgc),t.push(';"')),t.push(">&nbsp;<\/td>"),i.push(">"),i.push(f.t||"&nbsp;"),i.push("<\/td>");t.push("<\/tr>");i.push("<\/tr>")}if(t.push("<\/tbody><\/table>"),i.push("<\/tbody><\/table>"),this.domNode.innerHTML=t.join("")+i.join(""),this.table=this.domNode.childNodes[0],this.tbody=this.table.childNodes[1],this.table1=this.domNode.childNodes[1],this.tbody1=this.table1.childNodes[1],this.domNode.insertBefore(this.selection.domNode,this.table1),this.domNode.style.height=this.h.toString()+"px",this.domNode.style.width=this.w.toString()+"px",this.btns)for(r=0,o=this.btns.length;r<o;++r)this.domNode.appendChild(this.btns[r])};CEGridPane.prototype.getRC=function(n){for(var i,t=n.target;t!==null;){if(t.tagName==="TD"&&(i=t.parentNode.parentNode.parentNode,i===this.table1))return{r:this.visRows[t.parentNode.rowIndex].index,c:this.visCols[t.cellIndex].index};t=t.offsetParent}return null};CEGridRow.prototype.dispose=function(){this.outline=null;this.outlinebtn=null;this.items=null;delete ui[this.id]};CEGridRow.prototype.add=function(n){this.items.push(ui[n])};CEGridRow.prototype.clear=function(){this.items=[]};CEGridRow.prototype.setVis=function(n){this.isVisible=n;this.outlinebtn&&utils.setClass(this.outlinebtn,"rowoutlinebtnexpanded",!n)};CEGridRow.prototype.makeOutline=function(n){this.color&&(this.outline=window.document.createElement("div"),this.outline.className="rowoutline",this.outline.style.left=(this.level*16+5).toString()+"px",this.outline.style.backgroundColor="#"+this.color,this.items.length>0&&(this.outline.ceid=this.id,this.outlinebtn=window.document.createElement("div"),this.outlinebtn.className="rowoutlinebtn",this.outline.appendChild(this.outlinebtn)),n.appendChild(this.outline))};CEGridRow.prototype.cmds=[CEGridRow.prototype.dispose,CEGridRow.prototype.setVis,CEGridRow.prototype.add];CEGridSelection.prototype.dispose=function(){rp.dispose(this.domNode);this.domNode=null;this.divShade1=null;this.divShade2=null};CEGridSelection.prototype.setCoord=function(n,t){var i,r;this.domNode.style.left=n.l.toString()+"px";this.domNode.style.width=Math.max(n.r-n.l-4,0).toString()+"px";this.domNode.style.top=n.t.toString()+"px";this.domNode.style.height=Math.max(n.b-n.t-4,0).toString()+"px";i={t:1,l:1,r:n.r-n.l-5,b:n.b-n.t-5};r={t:t.t-n.t+1,l:t.l-n.l+1,r:t.r-n.l-5,b:t.b-n.t-5};this.divShade1.style.display=r.l===i.l&&r.r===i.r?"none":"";this.divShade1.style.top=i.t.toString()+"px";this.divShade1.style.height=Math.max(i.b-i.t,0).toString()+"px";r.l>i.l?(this.divShade1.style.left=i.l.toString()+"px",this.divShade1.style.width=(r.l-i.l).toString()+"px"):r.r<i.r&&(this.divShade1.style.left=r.r.toString()+"px",this.divShade1.style.width=(i.r-r.r).toString()+"px");this.divShade2.style.display=r.t===i.t&&r.b===i.b?"none":"";this.divShade2.style.left=r.l.toString()+"px";this.divShade2.style.width=Math.max(r.r-r.l,0).toString()+"px";r.t>i.t?(this.divShade2.style.top=i.t.toString()+"px",this.divShade2.style.height=(r.t-i.t).toString()+"px"):r.b<i.b&&(this.divShade2.style.top=r.b.toString()+"px",this.divShade2.style.height=(i.b-r.b).toString()+"px")};CEHeader.prototype.dispose=function(){rp.dispose(this.domNode);this.domNode=null;delete ui[this.id]};CEHeader.prototype.makeInnerHTML=function(){var n='<div id="global-header-shadow" class="shadow"><\/div><div class="inner"> <div id="remplan-dropdown" tabindex="0">     <div id="remplan-dropdown-notif" class="notification"><\/div> <\/div><div id="global-header-logo" class="app-logo app-logo-'+this.currentApp.id+'"><img src="/Content/img/logo/'+this.currentApp.id+'.png" alt="'+this.currentApp.name+'" /><\/div><div id="global-header-app-buttons" class="app-buttons">',t=this.appLookup;for(var i in t)t.hasOwnProperty(i)&&(n+='<div data-id="'+t[i].id+'" id="app-button-'+t[i].id+'" class="app-button noicon" tabindex="0"><a href="#" target="'+t[i].id+'"><div class="app-button-inner"><div class="label">'+t[i].name+"<\/div><\/div><\/a><\/div>");return n+='<div class="theme app-button" tabindex="0"><\/div>',n+="<\/div>",n+='<div id="app-buttons-right" class="app-buttons">',n+='<div data-id="pa-grantguru" id="app-button-pa-grantguru" class="app-button icon" style="display: none;" tabindex="0">',n+='<a href="#" target="pa-grantguru"><div class="app-button-inner"><img width="100" height="25" src="/Content/img/header/logo-pa-grantguru.png" /><\/div><\/a><\/div>',n+='<a href="https://www.remplan.com.au/covid-19-information/" target="rw" class="btn-covid">COVID - 19 Tools<\/a >',n+='<div data-id="admin-console" id="app-button-admin" class="app-button icon" tabindex="1">',n+='<a href="#" target="ac"><div class="app-button-inner"><img width="21" height="16" src="/Content/img/header/admin-sign-in-'+this.currentApp.id+'.png" /><div class="label">Admin<\/div><\/div><\/a><\/div>',n+="<\/div>",n+='<div id="global-header-popup"><div class="balloontip"><\/div><div class="container"><\/div><\/div>',n+"<\/div>"};CEHeader.prototype.setShadow=function(n,t){if(n.className.indexOf("app-button")>=0){t&&t.preventDefault&&(t.preventDefault(),t.cancelBubble=!0);var i=utils.getAbsPosition(n);this.shadow.style.left=i.x+"px";this.shadow.style.width=i.w+"px"}};CEHeader.prototype.resetShadow=function(n,t){for(var i=0;i!==this.buttons.length;i++)this.buttons[i].getAttribute("data-id")===this.currentApp.id&&this.setShadow(this.buttons[i],t)};CEHeader.prototype.getPopupContent=function(){var n=rp.makeXMLRequest();events.add(n,"readystatechange",this,this.popupContentReceived);n.open("GET","/Content/html/header.html");n.send()};CEHeader.prototype.popupContentReceived=function(n){var i,r,t;if(n.readyState===4){if(n.status===200){this.popupContentLoaded=!0;this.popupContainer.innerHTML=n.responseText;this.popupContent=this.popupContainer.querySelector(".content");this.newsfeed=this.popupContainer.querySelector(".newsfeed");this.domUser=this.popupContainer.querySelector(".user");i=this.names;for(t in i)i.hasOwnProperty(t)&&this.setName(t,i[t]);r=this.urls;for(t in r)r.hasOwnProperty(t)&&this.setUrl(t,r[t]);this.setUser(this.currentUser);this.renderNewsfeed();this.popupShow&&rp.needResize()}events.remove(n,"readystatechange",this,this.popupContentReceived)}};CEHeader.prototype.getNewsfeed=function(){var n=rp.makeXMLRequest();events.add(n,"readystatechange",this,this.newsfeedReceived);n.open("POST","/home/newsfeed");n.send()};CEHeader.prototype.newsfeedReceived=function(n){if(n.readyState===4&&n.status===200){this.newsfeedLoaded=!0;this.newsitems=[];var t=JSON.parse(n.responseText);t&&(this.newsitems=t);this.renderNewsfeed()}};CEHeader.prototype.renderNewsfeed=function(){var i,r,n,t;if(this.newsfeedLoaded&&this.popupContentLoaded){while(this.newsfeed.children.length>0)this.newsfeed.removeChild(this.newsfeed.firstChild);for(i=0;i!==this.newsitems.length;i++)r=document.createElement("div"),r.className="newsfeed-item",n=document.createElement("h4"),n.innerHTML=this.newsitems[i].Title,r.appendChild(n),n=document.createElement("p"),n.innerHTML=this.newsitems[i].Description,t=document.createElement("br"),n.appendChild(t),t=document.createElement("a"),t.href=this.newsitems[i].Url,t.target="_blank",t.innerHTML="Read more&hellip;",n.appendChild(t),r.appendChild(n),this.newsfeed.appendChild(r)}};CEHeader.prototype.dropDownClick=function(n,t){this.popupShow=!this.popupShow;utils.setClass(this.divPopup,"open",!1);utils.setClass(this.domNode,"open",this.popupShow);this.popupShow&&(rp.needResize(),events.addImmediateTimeout(this.divPopup,function(){utils.setClass(this,"open",!0)}));t.preventDefault();t.cancelBubble=!0};CEHeader.prototype.clickOutside=function(n,t){this.popupShow&&t.target&&!this.divPopup.contains(t.target)&&this.dropDownClick(n,t)};CEHeader.prototype.onResize=function(){var t;if(this.popupShow&&this.popupContentLoaded){this.popupContent.style.height=null;var i=480,r=50,u=document.body.clientHeight,n=this.popupContent.scrollHeight-80,f=327,e=n+f;e>u&&(n=u-f);n>i&&(n=i);n<r&&(n=r);this.popupContent.style.height=n+"px";t=document.body.clientWidth*.75;t=Math.min(t,1200);this.popupContainer.style.width=t+"px"}};CEHeader.prototype.setName=function(n,t){var r,i,u,f;if(this.names[n]=t,r=this.domNode.querySelectorAll("a.app-"+n+", #app-button-"+n+" a"),r)for(i=this.appLookup,u=0;u!==r.length;u++)for(f in i)if(i.hasOwnProperty(f)&&i[f].id===n){i[f].name=t;r[u].querySelectorAll(".app-button-inner .label")[0].innerText=t;break}};CEHeader.prototype.setUrl=function(n,t){var i,r;if(this.urls[n]=t,i=this.domNode.querySelectorAll("a.app-"+n+", #app-button-"+n+" a"),i)for(r=0;r!==i.length;r++)i[r].href=t};CEHeader.prototype.setUser=function(n){this.currentUser=n;this.domUser&&(this.domUser.innerHTML=utils.htmlEncode(n));utils.setClass(this.divPopup,"with-user",n&&n.length>0)};CEHeader.prototype.setVisible=function(n,t){var r=this.domNode.querySelectorAll("#app-button-"+n),i;if(r)for(i=0;i!==r.length;i++)r[i].style.display=typeof t=="boolean"&&t?"inline-block":"none"};CEHeader.prototype.goToThemeUrl=function(){this.options.tu&&this.options.tu.length>0&&window.open(this.options.tu,"_blank")};CEHeader.prototype.cmds=[CEHeader.prototype.dispose,CEHeader.prototype.setUrl,CEHeader.prototype.setUser,CEHeader.prototype.setVisible,CEHeader.prototype.setName];CEHelpBtn.prototype.dispose=function(){events.remove(this.domNode,"click",this,this.domNodeClick);rp.dispose(this.domNode);this.domNode=null;delete ui[this.id]};CEHelpBtn.prototype.show=function(n){this.isVisible=n;this.domNode.style.display=n?"":"none"};CEHelpBtn.prototype.domNodeClick=function(){rp.showHelp()};CEHelpBtn.prototype.cmds=[CEHelpBtn.prototype.dispose];CEHorzSelector.prototype.dispose=function(){this.domNode.innerHTML="";this.options.dom||rp.dispose(this.domNode);this.domNode=null;events.remove(rp,"resize",this,this.resize)};CEHorzSelector.prototype.show=function(n){this.domNode.style.display=n?"":"none"};CEHorzSelector.prototype.setData=function(n){var t,i;if(this.data=n,n){for(this.setNumBars(this.data.values.length),t=0;t<this.data.values.length;t++)i=this.data.values[t],this.bars[t].setValue(i);this.layoutBars()}else this.setNumBars(0)};CEHorzSelector.prototype.resize=function(){this.layoutBars()};CEHorzSelector.prototype.setNumBars=function(n){for(var i,t=this.bars.length;t<n;t++)i=new CEHorzSelectorKnob(t),events.add(i.domNode,"mousedown",this,this.barMouseDown),events.add(i.domNode,"keyup",this,this.onBarKeyUp),events.add(i.domNode,"keydown",this,this.onBarKeyDown),this.bars.push(i),this.domNode.appendChild(i.domNode);for(t=this.bars.length-1;t>=0;--t)this.bars[t].domNode.style.display=t<n?"":"none"};CEHorzSelector.prototype.onBarKeyDown=function(n,t){var i=0;switch(t.key){case"ArrowLeft":i=-this.valueGap;break;case"ArrowRight":i=this.valueGap}i!==0&&(this.dragBar=n.cebar,i=this.dragBar.domNode.offsetLeft+i,this.setDragBar(i))};CEHorzSelector.prototype.onBarKeyUp=function(){this.dragBar&&(this.layoutBars(),rp.call({id:this.id,cmd:"value",index:this.dragBar.index,value:this.data.values[this.dragBar.index]}),this.dragBar=null)};CEHorzSelector.prototype.layoutBars=function(){var t,n,i,r,u;if(this.data)for(this.valueGap=(this.divBG.clientWidth+1-this.data.values.length*this.options.btnWidth)/(this.data.maxValue-this.data.minValue+1-this.data.values.length),n=this.divBG.offsetLeft+1,u=this.data.minValue,t=0;t<this.data.values.length;t++)r=this.data.values[t],i=this.bars[t],n=n+(r-u)*this.valueGap,i.domNode.style.left=n+"px",i.x=n,n+=this.options.btnWidth,u=r+1};CEHorzSelector.prototype.barMouseDown=function(n,t){this.dragBar=n.cebar;events.startTrackMouse(this,this.barMouseTrack,t)};CEHorzSelector.prototype.barMouseTrack=function(n,t){switch(n){case 0:this.orgx=t.clientX-this.dragBar.domNode.offsetLeft;break;case 1:this.setDragBar(t.clientX-this.orgx);break;case 2:this.setDragBar(t.clientX-this.orgx);this.layoutBars();rp.call({id:this.id,cmd:"value",index:this.dragBar.index,value:this.data.values[this.dragBar.index]});this.dragBar=null}};CEHorzSelector.prototype.setDragBar=function(n){var t,u,r,i;r=this.dragBar.index===0?this.data.minValue:this.bars[this.dragBar.index-1].value+1;t=this.dragBar.index===0?this.divBG.offsetLeft+1:this.bars[this.dragBar.index-1].x+this.options.btnWidth;u=this.dragBar.index<this.data.values.length-1?this.bars[this.dragBar.index+1].x-this.options.btnWidth:this.divBG.clientWidth-this.options.btnWidth+this.divBG.offsetLeft+1;n=Math.min(u,Math.max(t,n));i=Math.floor(r+(n-t+this.valueGap/2)/this.valueGap);n=t+(i-r)*this.valueGap;this.dragBar.domNode.style.left=n+"px";this.dragBar.x=n;this.data.values[this.dragBar.index]=i;this.dragBar.setValue(i)};CEHorzSelector.prototype.cmds=[CEHorzSelector.prototype.dispose,CEHorzSelector.prototype.show,CEHorzSelector.prototype.setData];CEHorzSelectorKnob.prototype.setValue=function(n){this.value=n;this.div2.innerHTML=n.toString()};CEHorzSplit.prototype.dispose=function(){events.remove(this.divSplitter,"mousedown",this,this.splitterMouseDown);events.remove(this.divSplitter,"click",this,this.splitterClick);events.remove(this.divSplitter,"touchstart",this,this.splitterTouchStart);events.remove(this.divSwap,"click",this,this.swapClick);rp.dispose(this.domNode);this.domNode=null;this.divTop2=null;this.divTop=null;this.divSplitter=null;this.divBottom2=null;this.divBottom=null;this.divGrip=null;this.top=null;this.bottom=null;this.divSwap=null;delete ui[this.id]};CEHorzSplit.prototype.updateSizes=function(n){(this.divTop.style.height=this.topFrac*100+"%",this.divSplitter.style.top=this.topFrac*100+"%",this.divSwap&&(this.divSwap.style.top=this.topFrac*100+"%"),this.divBottom.style.top=this.topFrac*100+"%",this.divBottom.style.height=(1-this.topFrac)*100+"%",n)||rp.needResize()};CEHorzSplit.prototype.splitterClick=function(){this.moved||(this.topFrac=.5,this.updateSizes())};CEHorzSplit.prototype.splitterMouseDown=function(n,t){events.startTrackMouse(this,this.splitterMouseTrack,t)};CEHorzSplit.prototype.splitterMouseTrack=function(n,t){var i;switch(n){case 0:this.moved=!1;this.orgy=t.clientY-(this.topFrac*this.domNode.offsetHeight-6);break;case 1:case 2:i=Math.max(Math.min(t.clientY-this.orgy+6,this.domNode.offsetHeight-32),32);this.topFrac=i/this.domNode.offsetHeight}n===1&&(this.moved=!0,this.updateSizes(!0));n===2&&this.updateSizes(!1)};CEHorzSplit.prototype.splitterTouchStart=function(n,t){events.startTrackTouch(this,this.splitterTouchTrack,t)};CEHorzSplit.prototype.splitterTouchTrack=function(n,t){var i;switch(n){case 0:this.moved=!1;this.orgy=t.touches[0].clientY-(this.topFrac*this.domNode.offsetHeight-6);break;case 1:this.moved=!0;i=Math.max(Math.min(t.touches[0].clientY-this.orgy+6,this.domNode.offsetHeight-32),32);this.topFrac=i/this.domNode.offsetHeight;this.updateSizes();rp.needResize();break;case 2:this.splitterClick(this,t)}};CEHorzSplit.prototype.setTop=function(n,t){var f,e,i,r,u;this.top&&(this.top.domNode.parentNode.removeChild(this.top.domNode),utils.setClass(this.top.domNode,"full",!1));this.divTop2.innerHTML="";this.top=n!==null?ui[n]:null;this.top&&(t?(i=window.document.createElement("table"),i.className="cehorzsplit_center full",e=i.insertRow(-1),e.className="cehorzsplit_center",f=e.insertCell(-1),f.className="cehorzsplit_center",f.appendChild(this.top.domNode),r=window.document.createElement("img"),r.src="/content/img/community/start_bg.png",r.className="cehorzsplit_center full",u=window.document.createElement("div"),u.className="cehorzsplit_center full",u.appendChild(i),this.divTop2.appendChild(r),this.divTop2.appendChild(u)):(utils.setClass(this.top.domNode,"full",!0),this.divTop2.appendChild(this.top.domNode)))};CEHorzSplit.prototype.setBottom=function(n,t){var f,e,i,r,u;this.bottom&&(this.bottom.domNode.parentNode.removeChild(this.bottom.domNode),utils.setClass(this.bottom.domNode,"full",!1));this.divBottom2.innerHTML="";this.bottom=n!==null?ui[n]:null;this.bottom&&(t?(i=window.document.createElement("table"),i.className="cehorzsplit_center full",e=i.insertRow(-1),e.className="cehorzsplit_center",f=e.insertCell(-1),f.className="cehorzsplit_center",f.appendChild(this.bottom.domNode),r=window.document.createElement("img"),r.src="/content/img/community/start_bg.png",r.className="cehorzsplit_center full",u=window.document.createElement("div"),u.className="cehorzsplit_center full",u.appendChild(i),this.divBottom2.appendChild(r),this.divBottom2.appendChild(u)):(utils.setClass(this.bottom.domNode,"full",!0),this.divBottom2.appendChild(this.bottom.domNode)))};CEHorzSplit.prototype.setSwap=function(n){n!==this.swap&&(this.swap=n,utils.setClass(this.divSwap,"cehorzsplit_swap_check",n))};CEHorzSplit.prototype.swapClick=function(){rp.call({id:this.id,cmd:"swap"})};CEHorzSplit.prototype.showSwapButton=function(n){this.divSwap.style.display=n?"block":"none"};CEHorzSplit.prototype.cmds=[CEHorzSplit.prototype.dispose,CEHorzSplit.prototype.setTop,CEHorzSplit.prototype.setBottom,CEHorzSplit.prototype.setSwap,CEHorzSplit.prototype.showSwapButton];CEHTML.prototype.dispose=function(){utils.purge(this.domNode);rp.dispose(this.domNode);this.domNode=null;delete ui[this.id]};CEHTML.prototype.setHTML=function(n){this.items=[];this.domNode.innerHTML=n};CEHTML.prototype.add=function(n,t){var i,r;i=ui[n];r=this.domNode.getElementsByClassName(t)[0];r.appendChild(i.domNode);this.items.push(i)};CEHTML.prototype.remove=function(n){var t;t=ui[n];t.domNode.parentNode.removeChild(t.domNode);this.items.splice(utils.indexOf(this.items,t),1)};CEHTML.prototype.clear=function(){for(var t,n=this.items.length-1;n>=0;--n)t=this.items[n],t.domNode.parentNode.removeChild(t.domNode);this.items=[]};CEHTML.prototype.cmds=[CEHTML.prototype.dispose,CEHTML.prototype.setHTML,CEHTML.prototype.add,CEHTML.prototype.remove,CEHTML.prototype.clear];CEHTMLReport.prototype.dispose=function(){events.remove(this.divSave,"click",this,this.saveClick);events.remove(this.divPrint,"click",this,this.printClick);rp.dispose(this.domNode);this.containerNode=null;this.divHeader=null;this.divSave=null;this.divPrint=null;this.divLabel=null;this.domNode=null;delete ui[this.id]};CEHTMLReport.prototype.setHTML=function(n){this.containerNode.innerHTML=n};CEHTMLReport.prototype.saveClick=function(){rp.showCopy2("all",this.id,null)};CEHTMLReport.prototype.printClick=function(){rp.showCopy2("all",this.id,null)};CEHTMLReport.prototype.cmds=[CEHTMLReport.prototype.dispose,CEHTMLReport.prototype.setHTML];CEIFrame.prototype.dispose=function(){utils.purge(this.domNode);rp.dispose(this.domNode);this.domNode=null;delete ui[this.id]};CEIFrame.prototype.setSrc=function(n){rp.incBusy();this.domNode.src=n};CEIFrame.prototype.cmds=[CEIFrame.prototype.dispose,CEIFrame.prototype.setSrc];CEImage.prototype.dispose=function(){rp.dispose(this.domNode);this.domNode=null;delete ui[this.id]};CEImage.prototype.setURL=function(n){this.domNode.style.backgroundImage=n?"url("+n+")":""};CEImage.prototype.cmds=[CEImage.prototype.dispose,CEImage.prototype.setURL];CEInfoHelper.prototype.toggleTip=function(n){var t;t=window.document.getElementById(n);t===this.tip?this.closeTip():this.openTip(t)};CEInfoHelper.prototype.closeTip=function(){this.tip&&(this.tip.style.display="",this.tip=null)};CEInfoHelper.prototype.openTip=function(n){this.closeTip();this.tip=n;this.tip.style.display="block"};CEInfoHelper.prototype.toggleMap=function(n){var t,i,r,u;return t=window.document.getElementById(n),i=t.style.display==="none",t.style.display=i?"":"none",i&&(r=t.firstChild,u=t.getAttribute("imgsrc"),r.src!==u&&(r.src=u)),i};CEInfoHelper.prototype.cmds=[null,CEInfoHelper.prototype.toggleMap,CEInfoHelper.prototype.toggleTip,CEInfoHelper.prototype.closeTip];CEInfoPane.prototype.dispose=function(){utils.purge(this.domNode);rp.dispose(this.domNode);this.containerNode=null;this.domNode=null;delete ui[this.id]};CEInfoPane.prototype.setHTML=function(n){this.containerNode.innerHTML=n};CEInfoPane.prototype.cmds=[CEInfoPane.prototype.dispose,CEInfoPane.prototype.setHTML];CEKeyValues.prototype.dispose=function(){delete ui[this.id]};CEKeyValues.prototype.getValue=function(n){for(var t=this.items.length-1;t>=0;--t)if(this.items[t].k===n)return this.items[t].v;return null};CEKeyValues.prototype.cmds=[CEKeyValues.prototype.dispose];CELayoutGrid.prototype.dispose=function(){rp.dispose(this.domNode);this.domNode=null;delete ui[this.id]};CELayoutGrid.prototype.add=function(n,t,i){this.domNode.childNodes[0].childNodes[1].rows[n].cells[t].appendChild(ui[i].domNode)};CELayoutGrid.prototype.clear=function(n,t){this.domNode.childNodes[0].childNodes[1].rows[n].cells[t].innerHTML=""};CELayoutGrid.prototype.showRow=function(n,t){this.domNode.childNodes[0].childNodes[1].rows[n].style.display=t?"":"none"};CELayoutGrid.prototype.cmds=[CELayoutGrid.prototype.dispose,CELayoutGrid.prototype.add,CELayoutGrid.prototype.clear,CELayoutGrid.prototype.showRow];CELegendItem.prototype.dispose=function(){events.remove(this.domNode,"click",this,this.domNodeClick);rp.dispose(this.domNode);this.domNode=null;delete ui[this.id]};CELegendItem.prototype.domNodeClick=function(n,t){rp.call({id:this.id,cmd:"click",c:(t.ctrlKey||t.metaKey)===!0?"1":"0"})};CELegendItem.prototype.cmds=[CELegendItem.prototype.dispose];CELogonBox.prototype.dispose=function(){this.templateView.dispose();rp.dispose(this.domNode);this.domNode=null;delete ui[this.id]};CELogonBox.prototype._disposeView=function(n){n.controls&&delete n.controls;n.ni&&delete n.ni};CELogonBox.prototype.init=function(){this.item.email=window.localStorage.getItem("ce_email")||"";this.item.email&&this.item.email.length>0?this._checkEmail(this.item.email):this.displayView("email")};CELogonBox.prototype._checkEmail=function(n){this._rpCall({id:this.id,cmd:"email",email:n})};CELogonBox.prototype._email_NextClick=function(n,t){t.preventDefault();t.cancelBubble=!0;this.item.email=this.templateView.currentView.controls.email.value;this._checkEmail(this.item.email)};CELogonBox.prototype._email_KeyUp=function(){this.templateView.currentView.controls.next.disabled=!/[^@]+@.+/.test(this.templateView.currentView.controls.email.value)};CELogonBox.prototype._password_BackClick=function(n,t){t.preventDefault();t.cancelBubble=!0;this.displayView("email")};CELogonBox.prototype._password_KeyUp=function(){this.templateView.currentView.controls.logon.disabled=this.templateView.currentView.controls.password.value.length===0};CELogonBox.prototype._password_LogonClick=function(n,t){t.preventDefault();t.cancelBubble=!0;this.item.email=this.templateView.currentView.controls.email.value;window.localStorage.setItem("ce_email",this.item.email);this._rpCall({id:this.id,cmd:"logon",email:this.item.email,password:this.templateView.currentView.controls.password.value,rm:"1"})};CELogonBox.prototype._password_ForgotClick=function(n,t){t.preventDefault();t.cancelBubble=!0;this.item.email=this.templateView.currentView.controls.email.value;this._rpCall({id:this.id,cmd:"emailpassword",email:this.item.email})};CELogonBox.prototype._unknown_BackClick=function(n,t){t.preventDefault();t.cancelBubble=!0;this.displayView("email")};CELogonBox.prototype._newuser_BackClick=function(n,t){t.preventDefault();t.cancelBubble=!0;this.displayView("email")};CELogonBox.prototype._newuser_SubmitClick=function(n,t){t.preventDefault();t.cancelBubble=!0;var i=this.templateView.currentView.controls;this._rpCall({id:this.id,cmd:"newuser",clientid:i.clientId.value,title:i.title.value,name:i.name.value,company:i.company.value,position:i.position.value,email:i.email.value,work:i.workphone.value,mobile:i.mobilephone.value,agree:i.ua.checked?"1":""})};CELogonBox.prototype._rpCall=function(n){events.add(rp,"busy",this,this._onBusy);rp.call(n)};CELogonBox.prototype.busyDisabledList=[];CELogonBox.prototype._onBusy=function(n,t){if(this.templateView.currentView){var r=this.templateView.currentView.controls,i;if(t){if(r)for(i in r)r.hasOwnProperty(i)&&(r[i].disabled="disabled",this.busyDisabledList.push(r[i]))}else{for(i=0;i!==this.busyDisabledList.length;i++)this.busyDisabledList[i].disabled="";this.busyDisabledList.splice(0,this.busyDisabledList.length)}}t||events.remove(rp,"busy",this,this._onBusy)};CELogonBox.prototype.displayView=function(n){this.templateView.displayView(n)};CELogonBox.prototype.resetForm=function(){events.setTimeout(this,this.init,0)};CELogonBox.prototype.setUser=function(n){this.item.name=n.name};CELogonBox.prototype.setMessage=function(n){this.item.msgtitle=n.title;this.item.msghtml=n.html};CELogonBox.prototype.cmds=[CELogonBox.prototype.dispose,null,null,null,null,null,CELogonBox.prototype.displayView,CELogonBox.prototype.resetForm,CELogonBox.prototype.setUser,CELogonBox.prototype.setMessage];CEMap.prototype.dispose=function(){events.remove(rp,"googlemapsloaded",this,this.doCommands);events.remove(this,"cmd",this,this.doCommands);events.remove(this,"tilesloaded",this,this.onTilesLoaded);this.map&&(events.remove(this.domNode,"focusin",this,this.mapFocusIn),events.remove(this.domNode,"mouseup",this,this.mapMouseUp),events.remove(this.domNode,"mousedown",this,this.mapMouseDown),events.remove(this.domNode,"mousemove",this,this.mapMouseMove),events.remove(rp,"precopy",this,this.preCopy),this.map.destroy());rp.dispose(this.domNode);this.domNode=null;delete ui[this.id]};CEMap.prototype.preCopy=function(n,t){t.cmd==="map"&&utils.isInDOM(this.domNode)&&(t.params+=this.getCopyParams()+"|")};CEMap.prototype.getCopyParams=function(){return this.id+","+this.map.getCenter().lat()+","+this.map.getCenter().lng()+","+this.map.getZoom()+","+this.map.getMapTypeId()+","+this.domNode.offsetWidth+","+this.domNode.offsetHeight};CEMap.prototype.doCommands=function(){var n;switch(rp.googlemaps){case 0:rp.loadGoogleMaps();return;case 2:this.inCmds=!0;n=this.pendingcmds[0];this.pendingcmds.splice(0,1);switch(n.cmd){case"start":this.map=new google.maps.Map(this.domNode,{mapTypeId:n.maptype,center:new google.maps.LatLng(n.lat,n.lng),zoom:n.zoom,disableDefaultUI:!0,streetViewControl:!0,scaleControl:!0,zoomControl:!0,zoomControlOptions:{style:google.maps.ZoomControlStyle.SMALL},rotateControl:!1,minZoom:3,controlSize:24,tilt:0,styles:[{featureType:"poi",elementType:"all",stylers:[{visibility:"off"}]},{featureType:"landscape",elementType:"geometry.fill",stylers:[{color:"#FFFFFF"}]}]});n.offline&&this.map.mapTypes.set("roadmap",new CEOfflineTile(this));this.domNode.style.background="#FFF";this.map.setTilt(0);events.add(this.domNode,"focusin",this,this.mapFocusIn);events.add(this.domNode,"mouseup",this,this.mapMouseUp);events.add(this.domNode,"mousedown",this,this.mapMouseDown);events.add(this.domNode,"mousemove",this,this.mapMouseMove);google.maps.event.addListener(this.map,"click",function(n){return function(t){n.mapClick(t)}}(this));google.maps.event.addListener(this.map,"zoom_changed",function(n){return function(){n.mapZoomChanged()}}(this));google.maps.event.addListener(this.map,"center_changed",function(n){return function(){n.mapCenterChanged()}}(this));google.maps.event.addListener(this.map,"maptypeid_changed",function(n){return function(){n.mapTypeChanged()}}(this));events.add(rp,"resize",this,this.resize);events.add(rp,"precopy",this,this.preCopy);rp.needResize();events.post(this,"maptype",n.maptype);this.domNode.appendChild(this.divInfo);this.nullTile=new CENullTile;this.map.overlayMapTypes.push(this.nullTile);this.map.overlayMapTypes.push(this.nullTile);this.addCustomLayer();break;case"overlay":if(this.overlayMapType&&(this.overlayMapType=null,events.stopTimer(this.overlayTimerId)),n.oid>0){this.overlayMapType=new CEOverlayTile(this,n.oid);this.map.overlayMapTypes.setAt(0,this.overlayMapType.mapType);this.overlayTimerId=events.startTimer(this,this.overlayTimer,200);break}this.map.overlayMapTypes.setAt(0,this.nullTile);break;case"voverlay":if(this.svgMapType&&(events.remove(this.svgMapType,"hover",this,this.info_hover),this.svgMapType=null,this.clearInfo()),n.oid>0&&(rp.hasSVG?this.svgMapType=new CESVGTile(this,n.oid):rp.hasVML&&(this.svgMapType=new CEVMLTile(this,n.oid)),this.svgMapType)){events.add(this.svgMapType,"hover",this,this.info_hover);this.map.overlayMapTypes.setAt(1,this.svgMapType);break}this.map.overlayMapTypes.setAt(1,this.nullTile);break;case"bounds":this.domNode.offsetHeight===0?(n.cmd="bounds2",this.addCmd(n)):this.map.fitBounds(new google.maps.LatLngBounds(new google.maps.LatLng(n.s,n.w),new google.maps.LatLng(n.n,n.e)));break;case"bounds2":this.map.fitBounds(new google.maps.LatLngBounds(new google.maps.LatLng(n.s,n.w),new google.maps.LatLng(n.n,n.e)));break;case"center":this.map.setCenter(new google.maps.LatLng(n.lat,n.lng));this.map.setZoom(n.zoom);break;case"maptype":this.map.setMapTypeId(n.maptype);events.post(this,"maptype",n.maptype);break;case"setpin":this.marker?(this.marker.setMap(this.map),this.marker.setPosition(new google.maps.LatLng(n.lat,n.lng))):this.marker=new google.maps.Marker({position:new google.maps.LatLng(n.lat,n.lng),map:this.map});break;case"clearpin":this.marker&&this.marker.setMap(null);break;case"setuserloc":this.userImage||(this.userImage={url:"/content/img/maps/userloc.png",size:new google.maps.Size(32,32),origin:new google.maps.Point(0,0),anchor:new google.maps.Point(16,16)});this.userMarker?this.userMarker.setPosition(new google.maps.LatLng(n.lat,n.lng)):this.userMarker=new google.maps.Marker({position:new google.maps.LatLng(n.lat,n.lng),icon:this.userImage,map:this.map});break;case"clearloc":this.userMarker&&this.userMarker.setMap(null)}this.pendingcmds.length>0&&events.post(this,"cmd",null);this.inCmds=!1}};CEMap.prototype.addCustomLayer=function(){var n;n=new google.maps.OverlayView;n.onAdd=function(){for(var t=this.getPanes(),n=t.mapPane.lastChild;n!==null;){if(parseInt(n.style.zIndex)===1){t.mapPane.removeChild(n);t.overlayMouseTarget.appendChild(n);break}n=n.previousSibling}};n.onRemove=function(){};n.draw=function(){this.onAdd()};n.setMap(this.map)};CEMap.prototype.addCmd=function(n){this.pendingcmds.push(n);this.pendingcmds.length===1&&events.post(this,"cmd",null)};CEMap.prototype.resize=function(){google.maps.event.trigger(this.map,"resize")};CEMap.prototype.setCentre=function(n,t,i){this.addCmd({cmd:"center",lat:n,lng:t,zoom:i})};CEMap.prototype.setBounds=function(n,t,i,r){this.addCmd({cmd:"bounds",n:n,s:t,e:i,w:r})};CEMap.prototype.setMapType=function(n){this.addCmd({cmd:"maptype",maptype:n})};CEMap.prototype.getMapType=function(){return this.map.getMapTypeId()};CEMap.prototype.setOverlay=function(n){this.addCmd({cmd:"overlay",oid:n})};CEMap.prototype.setVectorOverlay=function(n){this.addCmd({cmd:"voverlay",oid:n})};CEMap.prototype.setCustomOverlay=function(n){this.addCmd({cmd:"coverlay",url:n})};CEMap.prototype.setInfo=function(n,t){n===this.hoverId&&(this.divInfo.innerHTML=t,this.divInfo.style.display="block")};CEMap.prototype.clearInfo=function(){this.divInfo.innerHTML="";this.divInfo.style.display="";this.hoverId=null};CEMap.prototype.setPin=function(n,t){this.addCmd({cmd:"setpin",lat:n,lng:t})};CEMap.prototype.clearPin=function(){this.addCmd({cmd:"clearpin"})};CEMap.prototype.mapFocusIn=function(n,t){for(var i=t.relatedTarget,r=!1;i;){if(i===this.domNode)break;if(typeof i.className=="string"&&i.className.indexOf("mapIgnoreClickOnFocus")>=0){r=!0;break}i=i.parentElement}this.ignoreClick=this.mouseDown&&r};CEMap.prototype.mapMouseDown=function(n,t){this.ctrlKey=(t.ctrlKey||t.metaKey)===!0;this.mouseDown=!0};CEMap.prototype.mapMouseUp=function(){this.mouseDown=!1};CEMap.prototype.mapMouseMove=function(n,t){var i;i=utils.getAbsPosition(this.domNode);this.divInfo.style.left=t.clientX-i.x+16+"px";this.divInfo.style.top=t.clientY-i.y+"px"};CEMap.prototype.mapClick=function(n){this.ignoreClick||rp.call({id:this.id,cmd:"click",lat:n.latLng.lat(),lng:n.latLng.lng(),z:this.map.getZoom(),ctrl:this.ctrlKey});this.ignoreClick=!1};CEMap.prototype.mapCenterChanged=function(){var f,n,r,t,i,u;this.inCmds||(u=this.map.getBounds(),u)&&(f=u.getNorthEast().lat()-u.getSouthWest().lat(),n=this.map.getCenter().lat(),r=this.map.getCenter().lng(),t=85-f/2,i=-85+f/2,this.inCmds=!0,n<i&&n>t?this.map.setCenter(new google.maps.LatLng((i+t)/2,r)):n>t?this.map.setCenter(new google.maps.LatLng(t,r)):n<i&&this.map.setCenter(new google.maps.LatLng(i,r)),this.inCmds=!1,this.startMapChangedTimer())};CEMap.prototype.mapZoomChanged=function(){this.svgMapType&&this.svgMapType.setHoverId(null);this.startMapChangedTimer();this.addCustomLayer()};CEMap.prototype.startMapChangedTimer=function(){this.mapChangedTimerId&&(events.stopTimer(this.mapChangedTimerId),this.mapChangedTimerId=null);this.mapChangedTimerId=events.setTimeout(this,this.mapChangedTimer,500)};CEMap.prototype.mapChangedTimer=function(){this.mapChangedTimerId=null;utils.isInDOM(this.domNode)&&rp.call({id:this.id,cmd:"pos",data:this.getCopyParams()})};CEMap.prototype.mapTypeChanged=function(){this.inCmds||rp.call({id:this.id,cmd:"maptype",mt:this.map.getMapTypeId()})};CEMap.prototype.findMeClick=function(){this.setGeoState(this.geoState+1)};CEMap.prototype.overlayTimer=function(){var n,t,r,i,u;for(i=!0,t=this.domNode.getElementsByTagName("IMG"),n=0,u=t.length;n<u;++n)if(r=t[n],!r.complete){i=!1;break}i&&(events.stopTimer(this.overlayTimerId),this.overlayTimerId=null,rp.call({id:this.id,cmd:"complete"}))};CEMap.prototype.info_hover=function(n,t){t!==this.hoverId&&(this.hoverId=t,this.infoTimerId&&(events.stopTimer(this.infoTimerId),this.infoTimerId=null),this.infoTimerId=events.setTimeout(this,this.infoTimer,200))};CEMap.prototype.infoTimer=function(){this.infoTimerId=null;this.hoverId!==null?this.startInfoReq():(this.infoHoverId=null,this.divInfo.style.display="",events.trigger(this,"hover",null))};CEMap.prototype.startInfoReq=function(){var n;this.infoReq||(this.infoReq=rp.makeXMLRequest(),this.infoHoverId=this.hoverId,n=this,this.infoReq.open("POST","/map/info",!0),this.infoReq.onreadystatechange=function(){n.infoReqChange()},this.infoReq.setRequestHeader("Content-type","application/x-www-form-urlencoded"),this.infoReq.send("sid="+rp.sessionid+"&wid="+rp.windowid+"&id="+this.id+"&hid="+window.encodeURIComponent(this.hoverId)))};CEMap.prototype.infoReqChange=function(){var data;if(this.infoReq.readyState===4){if(this.infoReq.status===200)try{data=window.JSON&&window.JSON.parse?window.JSON.parse(this.infoReq.responseText):eval(this.infoReq.responseText);this.setInfo(data[0],data[1]);events.trigger(this,"hover",{hid:this.hoverId,smt:this.svgMapType})}catch(ignore){}this.infoReq=null;this.hoverId!==null&&this.hoverId!==this.infoHoverId?this.startInfoReq():this.infoHoverId=null}};CEMap.prototype.enableGeo=function(n){var t;window.navigator.geolocation&&(n?this.geoWatchId||(t=this,this.geoWatchId=window.navigator.geolocation.watchPosition(function(n){t.geoSuccess(n)},function(n){t.geoError(n)},utils.geoOptions)):this.geoWatchId&&(window.navigator.geolocation.clearWatch(this.geoWatchId),this.geoWatchId=null))};CEMap.prototype.geoSuccess=function(n){n!==null&&n.coords.accuracy<3e3?this.addCmd({cmd:"setuserloc",lat:n.coords.latitude,lng:n.coords.longitude}):this.addCmd({cmd:"clearuserloc"})};CEMap.prototype.geoError=function(){this.addCmd({cmd:"clearuserloc"})};CEMap.prototype.clearUserLoc=function(){};CEMap.prototype.setStyleHover=function(n){this.svgMapType&&this.svgMapType.setStyleId&&this.svgMapType.setStyleId(n)};CEMap.prototype.cmds=[CEMap.prototype.dispose,CEMap.prototype.setCentre,CEMap.prototype.setBounds,CEMap.prototype.setMapType,CEMap.prototype.setOverlay,CEMap.prototype.setInfo,CEMap.prototype.setVectorOverlay,CEMap.prototype.setCustomOverlay,CEMap.prototype.setPin,CEMap.prototype.clearPin,CEMap.prototype.enableGeo];CEMenuBar.prototype.dispose=function(){rp.dispose(this.domNode);this.domNode=null;this.containerNode=null;this.items=null;delete ui[this.id]};CEMenuBar.prototype.add=function(n){var t;t=ui[n];this.items.push(t);this.containerNode.appendChild(t.domNode)};CEMenuBar.prototype.clear=function(){for(var n=0,t=this.items.length;n<t;++n)this.containerNode.removeChild(this.items[n].domNode);this.items=[]};CEMenuBar.prototype.setTitles=function(n,t){for(var r,f,i=[],u=0;u!==t.length;u++)i.push(utils.htmlEncode(t[u]));i.length>1&&(i[i.length-1]="<strong>"+i[i.length-1]+"<\/strong>");r=i.join(" / ");f=t[t.length-1];n&&n.length>0&&(n.indexOf("fa-")>=0&&(n="fa "+n),r='<i class="icon '+n+'"><\/i> '+r);this.divTitleLabel.title=f;this.divTitleLabel.innerHTML=r};CEMenuBar.prototype.cmds=[CEMenuBar.prototype.dispose,CEMenuBar.prototype.clear,CEMenuBar.prototype.add,CEMenuBar.prototype.setTitles];CEMenuBtn.prototype.dispose=function(){events.remove(this.domNode,"click",this,this.domNodeClick);rp.dispose(this.domNode);this.domNode=null;delete ui[this.id]};CEMenuBtn.prototype.show=function(n){n!==this.isVisible&&(this.isVisible=n,this.domNode.style.display=n?"":"none")};CEMenuBtn.prototype.domNodeClick=function(){this.clickCmds?rp.doCmds(this.clickCmds):rp.call({id:this.id,cmd:"click"})};CEMenuBtn.prototype.showPopup=function(n){var t;t=ui[n];events.add(t,"close",this,this.popupClose);t.show(this,0,this.domNode.offsetHeight);utils.setClass(this.domNode,this.classname+"_popup",!0)};CEMenuBtn.prototype.setClickCmds=function(n){this.clickCmds=n};CEMenuBtn.prototype.setChecked=function(n){utils.setClass(this.domNode,"checked",n)};CEMenuBtn.prototype.popupClose=function(n){events.remove(n,"close",this,this.popupClose);utils.setClass(this.domNode,this.classname+"_popup",!1)};CEMenuBtn.prototype.cmds=[CEMenuBtn.prototype.dispose,CEMenuBtn.prototype.setClickCmds,CEMenuBtn.prototype.show,CEMenuBtn.prototype.setChecked,CEMenuBtn.prototype.showPopup];CENavBar.prototype.dispose=function(){events.remove(this.domNode,"scroll",this,this.renderDelayed);events.remove(rp,"resize",this,this.renderDelayed);rp.dispose(this.domNode);this.domNode=null;this.containerNode=null;this.items=null;delete ui[this.id]};CENavBar.prototype.renderDelayed=function(){this.renderingDelayedId===null&&(this.renderingDelayedId=events.setTimeout(this,this.onRenderDelayed,200))};CENavBar.prototype.onRenderDelayed=function(){var t,e;this.renderingDelayedId=null;for(var o=this.delayedRenderingItems.length,r=100,u=this.domNode.scrollTop-r,f=u+this.domNode.clientHeight+r,i=[],n=0;n!==this.delayedRenderingItems.length;n++)if(t=this.delayedRenderingItems[n].domNode.offsetTop,t>=u&&t<=f&&(this.delayedRenderingItems[n].render(),i.push(n)),t>f)break;for(n=i.length-1;n>0;n--)this.delayedRenderingItems.splice(i[n],1);e=this.delayedRenderingItems.length};CENavBar.prototype.add=function(n){var t=ui[n];this.items.push(t);this.containerNode.appendChild(t.domNode);t.render&&t.rendered===!1&&this.delayedRenderingItems.push(t)};CENavBar.prototype.insert=function(n,t){var i=ui[t];n<this.items.length?this.containerNode.insertBefore(i.domNode,this.items[n].domNode):this.containerNode.appendChild(i.domNode);n<this.items.length?this.items.splice(n,0,i):this.items.push(i);i.render&&i.rendered===!1&&this.delayedRenderingItems.push(i)};CENavBar.prototype.clear=function(){for(var n=0,t=this.items.length;n<t;++n)try{this.containerNode.removeChild(this.items[n].domNode)}catch(i){console.log("Cannot remove child "+n+" "+this.items[n].domNode.innerHTML)}this.items=[];this.delayedRenderingItems.splice(0,this.delayedRenderingItems.length)};CENavBar.prototype.show=function(n){this.domNode.style.display=n?"":"none"};CENavBar.prototype.cmds=[CENavBar.prototype.dispose,CENavBar.prototype.clear,CENavBar.prototype.add,CENavBar.prototype.insert,CENavBar.prototype.show];CENavBtn.prototype.dispose=function(){events.remove(this.domNode,"click",this,this.domNodeClick);this.tdArrow&&events.remove(this.tdArrow,"click",this,this.divArrowClick);rp.dispose(this.domNode);this.tdRadio=null;this.tdCheck=null;this.divColor=null;this.tdText=null;this.tdArrow=null;this.domNode=null;delete ui[this.id]};CENavBtn.prototype.show=function(n){this.isVisible=n;this.domNode.style.display=n?"":"none"};CENavBtn.prototype.enable=function(n){this.isEnable=n;this.domNode.disabled=!this.isEnable;utils.setClass(this.domNode,this.className+"_disable",!this.isEnable)};CENavBtn.prototype.setChecked=function(n){n!==this.isChecked&&(this.isChecked=n,utils.setClass(this.domNode,this.className+"_checked",this.isChecked))};CENavBtn.prototype.setText=function(n){this.tdText.innerHTML=utils.htmlEncode(n)};CENavBtn.prototype.setBC=function(n){this.domNode.style.backgroundColor=n!==null?"#"+n:""};CENavBtn.prototype.setColor=function(n){this.divColor.className=n!==null?"color":"nocolor";this.divColor.style.backgroundColor=n!==null?"#"+n:""};CENavBtn.prototype.domNodeClick=function(){this.isEnable&&(this.clickCmds?rp.doCmds(this.clickCmds):(rp.call({id:this.id,cmd:"click",check:this.isChecked?"0":"1"}),this.acb&&this.tdCheck&&this.setChecked(!this.isChecked)))};CENavBtn.prototype.divArrowClick=function(n,t){rp.call({id:this.id,cmd:"arrow"});t.cancelBubble=!0};CENavBtn.prototype.showPopup=function(n){var t;t=ui[n];events.add(t,"close",this,this.popupClose);t.show(this,this.domNode.offsetWidth,0);utils.setClass(this.domNode,this.className+"_popup",!0)};CENavBtn.prototype.popupClose=function(n){events.remove(n,"close",this,this.popupClose);utils.setClass(this.domNode,this.className+"_popup",!1)};CENavBtn.prototype.setClickCmds=function(n){this.clickCmds=n};CENavBtn.prototype.cmds=[CENavBtn.prototype.dispose,CENavBtn.prototype.show,CENavBtn.prototype.enable,CENavBtn.prototype.setChecked,CENavBtn.prototype.setText,CENavBtn.prototype.setColor,CENavBtn.prototype.setBC,CENavBtn.prototype.showPopup,CENavBtn.prototype.setClickCmds];CENavBtn2.prototype.dispose=function(){events.remove(this.domNode,"click",this,this.domNodeClick);rp.dispose(this.domNode);this.divText=null;this.domNode=null;delete ui[this.id]};CENavBtn2.prototype.show=function(n){this.isVisible=n;this.domNode.style.display=n?"":"none"};CENavBtn2.prototype.enable=function(n){this.isEnable=n;this.domNode.disabled=!this.isEnable;utils.setClass(this.domNode,this.className+"_disable",!this.isEnable)};CENavBtn2.prototype.setChecked=function(n){n!==this.isChecked&&(this.isChecked=n,utils.setClass(this.domNode,this.className+"_checked",this.isChecked))};CENavBtn2.prototype.setText=function(n){this.divText.innerHTML=utils.htmlEncode(n)};CENavBtn2.prototype.domNodeClick=function(){this.isEnable&&(this.clickCmds?rp.doCmds(this.clickCmds):rp.call({id:this.id,cmd:"click"}))};CENavBtn2.prototype.setClickCmds=function(n){this.clickCmds=n};CENavBtn2.prototype.setTooltip=function(n){n&&n.length>0?tt.register(this.domNode,n):tt.remove(this.domNode,n)};CENavBtn2.prototype.cmds=[CENavBtn2.prototype.dispose,CENavBtn2.prototype.show,CENavBtn2.prototype.enable,CENavBtn2.prototype.setChecked,CENavBtn2.prototype.setText,CENavBtn2.prototype.setClickCmds,CENavBtn2.prototype.setTooltip];CENavColorBtn.prototype.dispose=function(){events.remove(this.domNode,"click",this,this.domNodeClick);rp.dispose(this.domNode);this.divColor=null;this.domNode=null;delete ui[this.id]};CENavColorBtn.prototype.show=function(n){this.isVisible=n;this.domNode.style.display=n?"":"none"};CENavColorBtn.prototype.domNodeClick=function(){rp.call({id:this.id,cmd:"click"})};CENavColorBtn.prototype.setColor=function(n){this.divColor.className=n!==null?"color":"nocolor";this.divColor.style.backgroundColor=n!==null?"#"+n:""};CENavColorBtn.prototype.showPopup=function(n){var t;t=ui[n];events.add(t,"close",this,this.popupClose);t.show(this,0,this.domNode.offsetHeight);utils.setClass(this.domNode,this.className+"_popup",!0)};CENavColorBtn.prototype.popupClose=function(n){events.remove(n,"close",this,this.popupClose);utils.setClass(this.domNode,this.className+"_popup",!1)};CENavColorBtn.prototype.cmds=[CENavColorBtn.prototype.dispose,CENavColorBtn.prototype.show,null,CENavColorBtn.prototype.setColor,CENavColorBtn.prototype.showPopup];CENavColors.prototype.dispose=function(){utils.purge(this.domNode);rp.dispose(this.domNode);this.domNode=null;this.divs=null;delete ui[this.id]};CENavColors.prototype.setColor=function(n){var t,i,r,u;for(this.color=n,t=0;t<this.colors.length;++t)for(r=this.colors[t],i=0;i<r.length;++i)u=this.divs[t][i],u.className=r[i]===n?"color color_checked":"color"};CENavColors.prototype.divClick=function(n){n.cecolor!==this.color&&(this.color=n.cecolor,rp.call({id:this.id,cmd:"click",color:n.cecolor}))};CENavColors.prototype.cmds=[CENavColors.prototype.dispose,null,null,CENavColors.prototype.setColor];CENavCombo.prototype.dispose=function(){events.remove(this.edit,"keypress",this,this.editKeyPress);events.remove(this.edit,"blur",this,this.editBlur);rp.dispose(this.domNode);this.domNode=null;this.edit=null;delete ui[this.id]};CENavCombo.prototype.setValue=function(n){this.value=n;this.edit.value=n};CENavCombo.prototype.sendValue=function(){this.edit.value!==this.value&&(this.value=this.edit.value,rp.call({id:this.id,cmd:"value",value:this.value}))};CENavCombo.prototype.editBlur=function(){this.sendValue()};CENavCombo.prototype.editKeyPress=function(n,t){var i;return i=t.which||t.keyCode,i===13?(this.sendValue(),!1):void 0};CENavCombo.prototype.cmds=[CENavCombo.prototype.dispose,null,null,CENavCombo.prototype.setValue];CENavDivider.prototype.dispose=function(){rp.dispose(this.domNode);this.domNode=null;delete ui[this.id]};CENavDivider.prototype.show=function(n){this.isVisible=n;this.domNode.style.display=n?"":"none"};CENavDivider.prototype.cmds=[CENavDivider.prototype.dispose,CENavDivider.prototype.show];CENavDropDown.prototype.dispose=function(){events.remove(this.domNode,"change",this,this.domNodeChange);rp.dispose(this.domNode);this.domNode=null;delete ui[this.id]};CENavDropDown.prototype.show=function(n){this.isVisible=n;this.domNode.style.display=n?"":"none"};CENavDropDown.prototype.setValue=function(n){this.value=n;this.domNode.selectedIndex=-1;try{this.domNode.selectedIndex=this.map[n]}catch(t){}};CENavDropDown.prototype.setList=function(n){var t,r,i,u;for(i=ui[n],this.list=i,this.domNode.innerHTML="",this.map={},t=0,u=i.items.length;t<u;++t)r=i.items[t].k||i.items[t].v,this.domNode.options[t]=new window.Option(i.items[t].v,r),this.map[r]=t};CENavDropDown.prototype.domNodeChange=function(){var t,n;t=this.domNode.selectedIndex;n=t>=0?this.domNode.options[t].value:"";n!==this.value&&(this.value=n,rp.call({id:this.id,cmd:"change",value:n}))};CENavDropDown.prototype.cmds=[CENavDropDown.prototype.dispose,CENavDropDown.prototype.show,null,CENavDropDown.prototype.setValue,CENavDropDown.prototype.setList];CENavEdit.prototype.dispose=function(){events.remove(this.edit,"keypress",this,this.editKeyPress);events.remove(this.edit,"blur",this,this.editBlur);rp.dispose(this.domNode);this.domNode=null;this.edit=null;delete ui[this.id]};CENavEdit.prototype.show=function(n){this.isVisible=n;this.domNode.style.display=n?"":"none"};CENavEdit.prototype.setValue=function(n){this.value=n!==null?n:"";this.edit.value=this.value};CENavEdit.prototype.editKeyPress=function(n,t){var i;return i=t.which||t.keyCode,i===13?(this.sendValue(),!1):void 0};CENavEdit.prototype.editBlur=function(){this.sendValue()};CENavEdit.prototype.sendValue=function(){this.edit.value!==this.value&&(this.value=this.edit.value,rp.call({id:this.id,cmd:"value",value:this.value}))};CENavEdit.prototype.cmds=[CENavEdit.prototype.dispose,CENavEdit.prototype.show,null,CENavEdit.prototype.setValue];CENavGroup.prototype.toggleExpand=function(){var n=this.domNode.className.indexOf("cenavgroup_collapsed")>=0;this.spanExpand.className="fa fa-caret-"+(n?"down":"up");n?this.domNode.className=this.domNode.className.replace(" cenavgroup_collapsed",""):this.domNode.className+=" cenavgroup_collapsed"};CENavGroup.prototype.dispose=function(){rp.dispose(this.domNode);this.domNode=null;this.containerNode=null;this.items=null;delete ui[this.id]};CENavGroup.prototype.add=function(n){var t;t=ui[n];this.items.push(t);this.containerNode.appendChild(t.domNode)};CENavGroup.prototype.insert=function(n,t){var i;i=ui[t];n<this.items.length?this.containerNode.insertBefore(i.domNode,this.items[n].domNode):this.containerNode.appendChild(i.domNode);this.items.splice(n,0,i)};CENavGroup.prototype.clear=function(){for(var n=0,t=this.items.length;n<t;++n)this.containerNode.removeChild(this.items[n].domNode);this.items=[]};CENavGroup.prototype.show=function(n){this.domNode.style.display=n?"":"none"};CENavGroup.prototype.setTitle=function(n){this.divText.replaceChild(document.createTextNode(n),this.divText.lastChild)};CENavGroup.prototype.cmds=[CENavGroup.prototype.dispose,CENavGroup.prototype.clear,CENavGroup.prototype.add,CENavGroup.prototype.insert,CENavGroup.prototype.show,CENavGroup.prototype.setTitle];CENavHorz.prototype.dispose=function(){rp.dispose(this.domNode);this.domNode=null;this.items=null;delete ui[this.id]};CENavHorz.prototype.show=function(n){this.isVisible=n;this.domNode.style.display=n?"":"none"};CENavHorz.prototype.addGrid=function(n,t){var r,e,f,u,i,o;for(r=window.document.createElement("table"),t&&(r.className="stretch"),e=r.insertRow(-1),u=0,o=n.length;u<o;++u)f=e.insertCell(-1),f.className="cenavhorz",i=ui[n[u]],i.domNode.style&&(i.domNode.style.display="inline-block",i.domNode.style.marginRight="2px"),f.appendChild(i.domNode),this.items.push(i);this.domNode.appendChild(r)};CENavHorz.prototype.addFlow=function(n,t){var r,e,f,u,i,o;for(r=window.document.createElement("table"),t&&(r.className="stretch"),e=r.insertRow(-1),f=e.insertCell(-1),f.className="cenavhorz",u=0,o=n.length;u<o;++u)i=ui[n[u]],i.domNode.style&&(i.domNode.style.display="inline-block"),f.appendChild(i.domNode),this.items.push(i);this.domNode.appendChild(r)};CENavHorz.prototype.clear=function(){for(var n=0,t=this.items.length;n<t;++n)this.items[n].domNode.parentNode.removeChild(this.items[n].domNode);this.items=[];this.domNode.innerHTML=""};CENavHorz.prototype.cmds=[CENavHorz.prototype.dispose,CENavHorz.prototype.show,null,CENavHorz.prototype.clear,CENavHorz.prototype.addGrid,CENavHorz.prototype.addFlow];CENavHTML.prototype.dispose=function(){rp.dispose(this.domNode);this.domNode=null;delete ui[this.id]};CENavHTML.prototype.setHTML=function(n){this.domNode.innerHTML=n};CENavHTML.prototype.show=function(n){this.domNode.style.display=n?"":"none"};CENavHTML.prototype.cmds=[CENavHTML.prototype.dispose,CENavHTML.prototype.show,null,CENavHTML.prototype.setHTML];CENavImgBtn.prototype.dispose=function(){events.remove(this.domNode,"click",this,this.domNodeClick);rp.dispose(this.domNode);this.divColor=null;this.domNode=null;delete ui[this.id]};CENavImgBtn.prototype.show=function(n){this.isVisible=n;this.domNode.style.display=n?"":"none"};CENavImgBtn.prototype.setChecked=function(n){n!==this.isChecked&&(this.isChecked=n,utils.setClass(this.domNode,this.className+"_checked",this.isChecked))};CENavImgBtn.prototype.domNodeClick=function(){rp.call({id:this.id,cmd:"click"})};CENavImgBtn.prototype.cmds=[CENavImgBtn.prototype.dispose,CENavImgBtn.prototype.show,null,CENavImgBtn.prototype.setChecked];CENavLabel.prototype.closeClick=function(n,t){t.preventDefault();(t.type==="auxclick"&&t.button===1||t.type==="click")&&rp.call({id:this.id,cmd:"click"})};CENavLabel.prototype.dispose=function(){this.closeBtn&&events.remove(this.closeBtn,"click",this,this.closeClick);rp.dispose(this.domNode);this.domNode=null;delete ui[this.id]};CENavLabel.prototype.show=function(n){this.isVisible=n;this.domNode.style.display=n?"":"none"};CENavLabel.prototype.cmds=[CENavLabel.prototype.dispose,CENavLabel.prototype.show];CENavLabelScrollList.prototype.dispose=function(){this.clearLinkList();delete ui[this.id]};CENavLabelScrollList.prototype.updateData=function(n,t,i){this.options=n;this.orientation=t;this.navbarid=i};CENavLabelScrollList.prototype.refresh=function(){var t,n;for(this.clearLinkList();this.domNode.childNodes.length!==0;)this.domNode.removeChild(this.domNode.firstChild);for(t=document.createElement("table"),n=0;n!==this.options.length;n++)this.createOption(this.options[n],t);this.domNode.appendChild(t);events.addImmediateTimeout(this,this.checkLabelAvailability)};CENavLabelScrollList.prototype.clearLinkList=function(){for(var n=0;n!=this.linkList.length;n++)events.remove(this.linkList[n],"click",this,this.linkClick);this.linkList.splice(0,this.linkList.length)};CENavLabelScrollList.prototype.getNavLabel=function(n){for(var i=ui[this.navbarid].domNode.querySelectorAll(this.searchLabelSelector),t=0;t!==i.length;t++)if(i[t].innerText===n)return i[t];return null};CENavLabelScrollList.prototype.createOption=function(n,t){var i=this.orientation===1?t.firstChild:null,r;i==null&&(i=t.insertRow(-1));r=i.insertCell(-1);r.innerText=n};CENavLabelScrollList.prototype.checkLabelAvailability=function(){for(var r=ui[this.navbarid].domNode.querySelectorAll(this.searchLabelSelector),f={},i,t,e,u,n=0;n!==r.length;n++)i=r[n].innerText,i&&i.length>0&&(f[i]=r[n]);for(t=this.domNode.querySelectorAll("table td"),n=0;n!==t.length;n++)e=t[n].innerText,u=f[e],u?(t[n].cenavlabel=u,t[n].className="link",events.add(t[n],"click",this,this.linkClick),this.linkList.push(t[n])):t[n].className="disabled"};CENavLabelScrollList.prototype.linkClick=function(n,t){t.preventDefault();n.cenavlabel&&n.cenavlabel.scrollIntoView(!0)};CENavLabelScrollList.prototype.cmds=[CENavLabelScrollList.prototype.dispose,CENavLabelScrollList.prototype.updateData,CENavLabelScrollList.prototype.refresh];CENavListBox.prototype.dispose=function(){rp.dispose(this.domNode);this.containerNode=null;this.divHeaders=null;this.domNode=null;this.items=null;delete ui[this.id]};CENavListBox.prototype.add=function(n){var t;t=ui[n];this.items.push(t);this.containerNode.appendChild(t.domNode)};CENavListBox.prototype.clear=function(){for(var n=0,t=this.items.length;n<t;++n)this.containerNode.removeChild(this.items[n].domNode);this.items=[]};CENavListBox.prototype.setHeaders=function(n){var t,i,r;if(n&&n.length){for(t=[],t.push("<table><tbody><tr>"),i=0,r=n.length;i<r;++i)t.push('<td class="td'),t.push(i),t.push('">'),t.push(utils.htmlEncode(n[i])),t.push("<\/td>");t.push("<\/tr><\/tbody><\/table>");this.divHeaders.innerHTML=t.join("")}else this.divHeaders.innerHTML=""};CENavListBox.prototype.cmds=[CENavListBox.prototype.dispose,null,null,CENavListBox.prototype.setHeaders,CENavListBox.prototype.add,CENavListBox.prototype.clear];CENavListItem.prototype.dispose=function(){events.remove(this.domNode,"click",this,this.domNodeClick);rp.dispose(this.domNode);this.domNode=null;this.tds=null;delete ui[this.id]};CENavListItem.prototype.setBC=function(n){this.domNode.style.backgroundColor=n!==null?"#"+n:""};CENavListItem.prototype.setText=function(n,t){this.tds[n].innerHTML=utils.htmlEncode(t)};CENavListItem.prototype.show=function(n){this.isVisible=n;this.domNode.style.display=n?"":"none"};CENavListItem.prototype.setChecked=function(n){n!==this.isChecked&&(this.isChecked=n,utils.setClass(this.domNode,this.className+"_checked",this.isChecked))};CENavListItem.prototype.domNodeClick=function(){rp.call({id:this.id,cmd:"click",check:this.isChecked?"1":"0"})};CENavListItem.prototype.cmds=[CENavListItem.prototype.dispose,null,null,CENavListItem.prototype.setText,CENavListItem.prototype.setChecked,CENavListItem.prototype.setBC];CENavMenu.prototype.dispose=function(){events.remove(this.divhdr,"click",this,this.hdrClick);rp.dispose(this.domNode);this.domNode=null;this.divhdr=null;this.textNode=null;this.containerNode=null;this.items=null;delete ui[this.id]};CENavMenu.prototype.show=function(n){this.domNode.style.display=n?"":"none"};CENavMenu.prototype.setExpand=function(n){utils.setClass(this.domNode,this.classname+"_expand",n);this.isexpand=n};CENavMenu.prototype.enable=function(n){n!==this.enabled&&(this.enabled=n,this.domNode.disabled=!n,utils.setClass(this.domNode,this.classname+"_disabled",!n),this.containerNode.style.display=n?"":"none")};CENavMenu.prototype.checked=function(n){utils.setClass(this.domNode,this.classname+"_checked",n)};CENavMenu.prototype.setText=function(n){this.textNode.innerHTML=utils.htmlEncode(n)};CENavMenu.prototype.clear=function(){var n,t;if(this.items.length>0){for(n=0,t=this.items.length;n<t;++n)this.containerNode.removeChild(this.items[n].domNode);this.items=[];this.domNode.removeChild(this.containerNode)}};CENavMenu.prototype.add=function(n){var t;t=ui[n];this.items.length===0&&this.domNode.appendChild(this.containerNode);this.items.push(t);this.containerNode.appendChild(t.domNode)};CENavMenu.prototype.hdrClick=function(){this.items.length===0&&this.enabled?rp.call({id:this.id,cmd:"click"}):this.setExpand(!this.isexpand)};CENavMenu.prototype.cmds=[CENavMenu.prototype.dispose,CENavMenu.prototype.clear,CENavMenu.prototype.add,CENavMenu.prototype.show,CENavMenu.prototype.enable,CENavMenu.prototype.setText,CENavMenu.prototype.checked];CENavTextColorBtn.prototype.dispose=function(){events.remove(this.domNode,"click",this,this.domNodeClick);rp.dispose(this.domNode);this.divColor=null;this.domNode=null;delete ui[this.id]};CENavTextColorBtn.prototype.show=function(n){this.isVisible=n;this.domNode.style.display=n?"":"none"};CENavTextColorBtn.prototype.domNodeClick=function(){rp.call({id:this.id,cmd:"click"})};CENavTextColorBtn.prototype.setColor=function(n){this.divColor.style.backgroundColor="#"+n};CENavTextColorBtn.prototype.showPopup=function(n){var t;t=ui[n];events.add(t,"close",this,this.popupClose);t.show(this,0,this.domNode.offsetHeight);utils.setClass(this.domNode,this.className+"_popup",!0)};CENavTextColorBtn.prototype.popupClose=function(n){events.remove(n,"close",this,this.popupClose);utils.setClass(this.domNode,this.className+"_popup",!1)};CENavTextColorBtn.prototype.cmds=[CENavTextColorBtn.prototype.dispose,CENavTextColorBtn.prototype.show,null,CENavTextColorBtn.prototype.setColor,CENavTextColorBtn.prototype.showPopup];CENavText.prototype.dispose=function(){rp.dispose(this.domNode);this.domNode=null;delete ui[this.id]};CENavText.prototype.setText=function(n){this.domNode.nodeValue=n};CENavText.prototype.cmds=[CENavText.prototype.dispose,null,null,CENavText.prototype.setText];CENewInput.prototype.activate=function(){this._activated||(events.add(this.textbox,"focus",this,this._focus),events.add(this.textbox,"blur",this,this._blur),events.add(this.textbox,"change",this,this._change),this._activated=!0)};CENewInput.prototype.deactivate=function(){this._activated&&(events.remove(this.textbox,"focus",this,this._focus),events.remove(this.textbox,"blur",this,this._blur),events.remove(this.textbox,"change",this,this._change),this._activated=!1)};CENewInput.prototype._focus=function(){utils.setClass(this.domNode,"focus",!0)};CENewInput.prototype._blur=function(){utils.setClass(this.domNode,"focus",!1);this._change()};CENewInput.prototype._change=function(){utils.setClass(this.domNode,"hasText",this.textbox.value.length>0)};CENewInput.prototype.getValue=function(){return this.textbox.value};CENewInput.prototype.setValue=function(n){this.textbox.value=n;this._change()};CENewSelect.prototype.activate=function(){this._activated||(events.add(this.select,"focus",this,CENewSelect.prototype._focus),events.add(this.select,"blur",this,CENewSelect.prototype._blur),events.add(this.select,"change",this,CENewSelect.prototype._change),this._activated=!0)};CENewSelect.prototype.deactivate=function(){this._activated&&(events.remove(this.select,"focus",this,CENewSelect.prototype._focus),events.remove(this.select,"blur",this,CENewSelect.prototype._blur),events.remove(this.select,"change",this,CENewSelect.prototype._change),this._activated=!1)};CENewSelect.prototype._focus=function(){utils.setClass(this.domNode,"focus",!0)};CENewSelect.prototype._blur=function(){utils.setClass(this.domNode,"focus",!1);this._change()};CENewSelect.prototype._change=function(){var n=this.select.selectedIndex>=0&&this.select.options[this.select.selectedIndex].value.length>0&&this.select.options[this.select.selectedIndex].text.length>0;utils.setClass(this.domNode,"hasText",n)};CENewSelect.prototype.getValue=function(){return this.select.value};CENewSelect.prototype.setValue=function(n){this.select.value=n};CENullTile.prototype.maxZoom=21;CENullTile.prototype.minZoom=0;CENullTile.prototype.getTile=function(n,t,i){return i.createElement("div")};CEOfflineTile.prototype.maxZoom=21;CEOfflineTile.prototype.minZoom=0;CEOfflineTile.prototype.getTile=function(n,t,i){var r=i.createElement("DIV");return r.style.width=this.tileSize.width+"px",r.style.height=this.tileSize.height+"px",r.style.backgroundImage="url("+this.map.mapurl+"/offlinetile?x="+n.x.toString()+"&y="+n.y.toString()+"&z="+t.toString()+"&mt=gr)",r};CEOfflineTile.prototype.releaseTile=function(){};CEPopupMenu.prototype.dispose=function(){events.remove(this.domNode,"blur",this,this.domBlur);events.remove(this.domNode,"mousedown",this,this.domMouseDown);events.remove(this.domNode,"click",this,this.domClick);rp.dispose(this.domNode);this.domNode=null;this.containerNode=null;this.items=null;delete ui[this.id]};CEPopupMenu.prototype.add=function(n){var t;t=ui[n];this.items.push(t);this.containerNode.appendChild(t.domNode)};CEPopupMenu.prototype.clear=function(){for(var n=0,t=this.items.length;n<t;++n)this.containerNode.removeChild(this.items[n].domNode);this.items=[]};CEPopupMenu.prototype.show=function(n,t,i){var r;for(this.stopTimeout(),window.document.body.appendChild(this.domNode),this.owner=n,r=n.domNode;r.offsetParent!==null;){if(r===window.document.body)break;t+=r.offsetLeft-r.scrollLeft;i+=r.offsetTop-r.scrollTop;r=r.offsetParent}this.domNode.style.top=Math.max(Math.min(window.document.body.offsetHeight-this.domNode.offsetHeight,i),0).toString()+"px";this.domNode.style.left=Math.max(Math.min(window.document.body.offsetWidth-this.domNode.offsetWidth,t),0).toString()+"px";utils.setFocus(this.domNode)};CEPopupMenu.prototype.hide=function(){this.owner!==null&&(this.stopTimeout(),this.owner=null,window.document.body.removeChild(this.domNode),events.trigger(this,"close",null))};CEPopupMenu.prototype.domMouseDown=function(){window.ActiveXObject&&(this.ignoreBlur=!0)};CEPopupMenu.prototype.domBlur=function(){if(this.ignoreBlur){delete this.ignoreBlur;return}events.setTimeout(this,this.hide,250)};CEPopupMenu.prototype.domClick=function(){this.hide()};CEPopupMenu.prototype.stopTimeout=function(){this.fTimeoutId&&(window.clearTimeout(this.fTimeoutId),delete this.fTimeoutId)};CEPopupMenu.prototype.cmds=[CEPopupMenu.prototype.dispose,CEPopupMenu.prototype.clear,CEPopupMenu.prototype.add,CEPopupMenu.prototype.hide];CEProjectList.prototype.dispose=function(){delete ui[this.id]};CEProjectList.prototype.showProjectDetails=function(n){if(!(n<0)&&!(n>=this.projects.length))for(var t=0;t!==this.projects.length;t++)utils.setClass(this.projects[t].el,"active",t===n)};CEProjectList.prototype.clear=function(){for(var n=0;n!==this.projects.length;n++)this.projects[n].del&&this.deleteDetails(this.projects[n].del),this.projects[n].sel&&this.deleteSummary(this.projects[n].sel);for(this.projects.splice(0,this.projects.length);this.elList.children.length>0;)this.elList.removeChild(this.elList.firstChild);this.noProjects.style.display=""};CEProjectList.prototype.addProject=function(n){var t={s:n,d:null,el:document.createElement("div"),sel:this.createSummaryUI(n)};t.el.className="item";t.el.appendChild(t.sel);this.projects.push(t);this.elList.appendChild(t.el);this.noProjects.style.display="none"};CEProjectList.prototype.removeProject=function(n){if(!(n<0)&&!(n>=this.projects.length)){var t=this.projects[n];t.del&&this.deleteDetails(t.del);t.sel&&this.deleteSummary(t.sel);this.elList.removeChild(t.el);this.projects.splice(n,1);this.projects.length===0&&(this.noProjects.style.display="")}};CEProjectList.prototype.projectDetails=function(n,t){var i,r;n<0||n>=this.projects.length||(i=this.projects[n],i.d=t,r=this.createFullUI(t),i.del&&(this.deleteDetails(i.del),i.el.removeChild(i.del)),i.el.appendChild(r),i.del=r)};CEProjectList.prototype.setShow=function(n){this.domNode.style.display=!n?"none":""};CEProjectList.prototype.setCurrent=function(n){for(var t=0;t!==this.projects.length;t++)utils.setClass(this.projects[t].el,"current",t===n)};CEProjectList.prototype.deleteDetails=function(n){n&&n.ceElements&&(n.ceElements.header&&events.remove(n.ceElements.header,"click",this,this.headerClick),n.ceElements.open&&events.remove(n.ceElements.open,"click",this,this.openClick),n.ceElements["delete"]&&events.remove(n.ceElements["delete"],"click",this,this.deleteClick),n.ceElements.sharing&&events.remove(n.ceElements.sharing,"click",this,this.sharingClick))};CEProjectList.prototype.deleteSummary=function(n){n&&n.ceElements&&n.ceElements.header&&events.remove(n.ceElements.header,"click",this,this.headerClick)};CEProjectList.prototype.createFullUI=function(n){var i=document.createElement("div"),f,l,u,e,t,o,r,a,s,h,c;if(i.className="project project-full",f=document.createElement("h2"),l=utils.createIcon("fa-star","current-project","Currently Opened"),f.appendChild(l),f.appendChild(document.createTextNode(n.name)),u=document.createElement("span"),u.className="header-options",f.appendChild(u),e=(n.flags&this.Flags.Shared)===this.Flags.Shared,n.owner&&e?(u.appendChild(utils.createIcon("fa-users",null,"Shared with Organisation")),u.appendChild(document.createTextNode(" "))):e&&(e=(n.flags&this.Flags.ReadWrite)===this.Flags.ReadWrite,u.appendChild(utils.createIcon(e?"fa-pencil":"fa-lock",null,"Shared with you")),u.appendChild(document.createTextNode(" "))),u.appendChild(utils.createIcon("fa-caret-down")),f.appendChild(u),i.appendChild(f),t=document.createElement("h4"),t.innerHTML="Regions",i.appendChild(t),n.regions.length===0)t=document.createElement("div"),t.className="error",t.innerHTML="<em>There are no regions in this project.<\/em>",i.appendChild(t);else for(o=document.createElement("div"),o.className="region-list",i.appendChild(o),r=0;r!==n.regions.length;r++)a="badge_"+(n.regions[r].age>=1&&n.regions[r].age<=5?""+n.regions[r].age:n.regions[r].age===-1?"error":"older"),t=document.createElement("div"),t.className="project-region",t.innerHTML=((n.regions[r].badge||"").length>0?'<span class="badge '+a+'">'+n.regions[r].badge+"<\/span>":"")+'<span class="text">'+utils.htmlEncode(n.regions[r].name)+"<\/span>",o.appendChild(t);return(n.flags&this.Flags.Shared)!==this.Flags.Shared&&n.owner||(t=document.createElement("p"),t.className="shared",t.innerHTML=n.owner?"<strong>Shared:<\/strong> This project is shared within your organisation and can"+((n.flags&this.Flags.ReadWrite)===this.Flags.ReadWrite?" be updated by <strong>anyone<\/strong>.":" only be updated by <strong>you<\/strong>."):"<strong>Shared:<\/strong> This project has been shared within your organisation and can"+((n.flags&this.Flags.ReadWrite)===this.Flags.ReadWrite?" be updated by <strong>anyone<\/strong>.":" only be updated by the <strong>owner<\/strong>."),i.appendChild(t)),!n.owner&&n.ownername&&(t=document.createElement("p"),t.className="owner",t.innerHTML="<strong>Owner:<\/strong> "+utils.htmlEncode(n.ownername),i.appendChild(t)),t=document.createElement("div"),t.className="created",t.innerHTML="<strong>Created:<\/strong> "+utils.htmlEncode(n.created),i.appendChild(t),t=document.createElement("div"),t.className="lastsaved",t.innerHTML="<strong>Last Saved:<\/strong> "+utils.htmlEncode(n.lastsaved),i.appendChild(t),t=document.createElement("div"),t.className="region-btns",i.appendChild(t),s=utils.createButton("Open",null,null,"fa-folder-open"),t.appendChild(s),i.ceElements={header:f,open:s},events.add(f,"click",this,this.headerClick),events.add(s,"click",this,this.openClick),n.owner&&(h=utils.createButton("Sharing",null,null,"fa-users"),c=utils.createButton("Delete",null,null,"fa-trash"),t.appendChild(h),t.appendChild(c),i.ceElements["delete"]=c,i.ceElements.sharing=h,events.add(c,"click",this,this.deleteClick),events.add(h,"click",this,this.sharingClick)),i};CEProjectList.prototype.createSummaryUI=function(n){var u=document.createElement("div"),i,e,t,f,r;return u.className="project project-summary",i=document.createElement("h2"),e=utils.createIcon("fa-star","current-project","Currently Opened"),i.appendChild(e),i.appendChild(document.createTextNode(n.name)),t=document.createElement("span"),t.className="header-options",i.appendChild(t),f=(n.flags&this.Flags.Shared)===this.Flags.Shared,n.owner&&f?(t.appendChild(utils.createIcon("fa-users",null,"Shared with Organisation")),t.appendChild(document.createTextNode(" "))):f&&(f=(n.flags&this.Flags.ReadWrite)===this.Flags.ReadWrite,t.appendChild(utils.createIcon(f?"fa-pencil":"fa-lock",null,"Shared with you")),t.appendChild(document.createTextNode(" "))),t.appendChild(utils.createIcon("fa-caret-down")),i.appendChild(t),u.appendChild(i),r=document.createElement("div"),r.className="created",r.innerHTML="<strong>Created:<\/strong> "+utils.htmlEncode(n.created),u.appendChild(r),r=document.createElement("div"),r.className="lastsaved",r.innerHTML="<strong>Last Saved:<\/strong> "+utils.htmlEncode(n.lastsaved),u.appendChild(r),u.ceElements={header:i},events.add(i,"click",this,this.headerClick),u};CEProjectList.prototype.getProjectByElement=function(n){for(var t,i;n&&n.className.indexOf("item")===-1;)n=n.parentNode;if(!n)return null;for(t=0;t!==this.projects.length;t++)if(i=this.projects[t],i.el===n)return i;return null};CEProjectList.prototype.headerClick=function(n){var t=this.getProjectByElement(n);t&&(t.el.className.indexOf("active")===-1?rp.call({id:this.id,cmd:"details",idx:this.projects.indexOf(t)}):utils.setClass(t.el,"active",!1))};CEProjectList.prototype.openClick=function(n){var t=this.getProjectByElement(n);t&&rp.call({id:this.id,cmd:"open",idx:this.projects.indexOf(t)})};CEProjectList.prototype.deleteClick=function(n){var t=this.getProjectByElement(n);t&&rp.call({id:this.id,cmd:"delete",idx:this.projects.indexOf(t)})};CEProjectList.prototype.sharingClick=function(n){var t=this.getProjectByElement(n);t&&rp.call({id:this.id,cmd:"sharing",idx:this.projects.indexOf(t)})};CEProjectList.prototype.cmds=[CEProjectList.prototype.dispose,CEProjectList.prototype.showProjectDetails,CEProjectList.prototype.clear,CEProjectList.prototype.addProject,CEProjectList.prototype.removeProject,CEProjectList.prototype.projectDetails,CEProjectList.prototype.setShow,CEProjectList.prototype.setCurrent];CERegionBtn.prototype.dispose=function(){events.remove(this.domNode,"click",this,this.domNodeClick);rp.dispose(this.domNode);this.tdText=null;this.domNode=null;delete ui[this.id]};CERegionBtn.prototype.show=function(n){this.isVisible=n;this.domNode.style.display=n?"":"none"};CERegionBtn.prototype.enable=function(n){this.isEnable=n;this.domNode.disabled=!this.isEnable;utils.setClass(this.domNode,this.className+"_disable",!this.isEnable)};CERegionBtn.prototype.setChecked=function(n){n!==this.isChecked&&(this.isChecked=n,utils.setClass(this.domNode,this.className+"_checked",this.isChecked))};CERegionBtn.prototype.setHTML=function(n){this.divText.innerHTML=n};CERegionBtn.prototype.setSubClass=function(n){this.subClass&&utils.setClass(this.domNode,this.subClass,!1);this.subClass=n;this.subClass&&utils.setClass(this.domNode,this.subClass,!0)};CERegionBtn.prototype.domNodeClick=function(n,t){console.log("btnclick");t.preventDefault();t.cancelBubble=!0;this.isEnable&&rp.call({id:this.id,cmd:"click",check:this.isChecked?"1":"0",ctrlKey:t.ctrlKey})};CERegionBtn.prototype.showPopup=function(n){var t;t=ui[n];events.add(t,"close",this,this.popupClose);t.show(this,this.domNode.offsetWidth,0);utils.setClass(this.domNode,this.className+"_popup",!0)};CERegionBtn.prototype.popupClose=function(n){events.remove(n,"close",this,this.popupClose);utils.setClass(this.domNode,this.className+"_popup",!1)};CERegionBtn.prototype.setBadge=function(n,t){n&&n.length>0&&(this.divBadge||(this.divBadge=document.createElement("span"),this.divBadge.className="badge",this.domContainer.insertBefore(this.divBadge,this.domContainer.firstChild)),this.divBadge.innerHTML=utils.htmlEncode(n),t&&t.length>0&&utils.setClass(this.divBadge,t,!0));this.divBadge&&(this.divBadge.style.display=n&&n.length>0?"":"none")};CERegionBtn.prototype.setBtns=function(n){(n&2)==0||this.btnEdit||(this.btnEdit=utils.createButton("Edit",null,null,"fa-pencil"),this.domContainer.appendChild(this.btnEdit),events.add(this.btnEdit,"click",this,this.btnEditClick));(n&1)==0||this.btnDelete||(this.btnDelete=utils.createButton("Delete",null,null,"fa-trash"),this.domContainer.appendChild(this.btnDelete),events.add(this.btnDelete,"click",this,this.btnDeleteClick));this.btnDelete&&(this.btnDelete.style.display=(n&1)!=0?"":"none");this.btnEdit&&(this.btnEdit.style.display=(n&2)!=0?"":"none")};CERegionBtn.prototype.setProgress=function(n){n<0&&(n=0);n>1&&(n=1);!this.domProgress&&n>0&&(this.domProgress=window.document.createElement("div"),this.domProgress.className="ceregionbtn_progress",this.domNode.firstChild?this.domNode.insertBefore(this.domProgress,this.domNode.firstChild):this.domNode.appendChild(this.domProgress));this.domProgress&&(this.domProgress.style.width=n*100+"%",this.domProgress.style.display=n>0?"":"none")};CERegionBtn.prototype.btnDeleteClick=function(n,t){console.log("deleteclick");t.preventDefault();t.cancelBubble=!0;this.isEnable&&rp.call({id:this.id,cmd:"delete"})};CERegionBtn.prototype.btnEditClick=function(n,t){console.log("editclick");t.preventDefault();t.cancelBubble=!0;this.isEnable&&rp.call({id:this.id,cmd:"edit"})};CERegionBtn.prototype.cmds=[CERegionBtn.prototype.dispose,CERegionBtn.prototype.show,CERegionBtn.prototype.enable,CERegionBtn.prototype.setChecked,CERegionBtn.prototype.setHTML,CERegionBtn.prototype.setSubClass,CERegionBtn.prototype.showPopup,CERegionBtn.prototype.setBadge,CERegionBtn.prototype.setBtns,CERegionBtn.prototype.setProgress];CERegionNavLabel.prototype.dispose=function(){delete ui[this.id];this.elLabel=null};CERegionNavLabel.prototype.setTitle=function(n){this.elLabel.innerHTML=utils.htmlEncode(n)};CERegionNavLabel.prototype.showLabels=function(n){utils.setClass(this.domNode,"showLabels",n)};CERegionNavLabel.prototype.cmds=[CERegionNavLabel.prototype.dispose,CERegionNavLabel.prototype.setTitle,CERegionNavLabel.prototype.showLabels];CERegionNavList.prototype.dispose=function(){this.clear();delete ui[this.id];events.remove(this.imgleft,"click",this,this.leftClick);events.remove(this.imgright,"click",this,this.rightClick);events.remove(rp,"resize",this,this.resize)};CERegionNavList.prototype.setTitle=function(n){this.elTitle.innerText=n};CERegionNavList.prototype.clear=function(){while(this.items.length>0)this.remove(0)};CERegionNavList.prototype.add=function(n){this.bulk||this.itemObjs.push(n);this.rendered&&this.__renderItem(n)};CERegionNavList.prototype.__renderItem=function(n){var t=document.createElement("button"),i;t.className="ceregionbtn "+(n.cn||"");utils.setClass(t,"ceregionbtn_checked",n.ch);i=document.createElement("span");n.b&&i.appendChild(document.createTextNode(n.b));n.bc&&(i.className="badge "+(n.bc||""));t.appendChild(i);this.items.push(t);t.celatest=n.l;this.bulk||(!n.l||this.latestAdded?this.elContainer.appendChild(t):(this.elLatest.appendChild(t),this.latestAdded=!0));events.add(t,"click",this,this.click)};CERegionNavList.prototype.update=function(n,t){var i,u,r;n<0||n>=this.itemObjs.length||(this.itemObjs[n]=t,this.rendered&&(i=this.items[n],i.className="ceregionbtn "+(t.cn||""),utils.setClass(i,"ceregionbtn_checked",!!t.ch),u=i.firstChild,u.innerHTML=utils.htmlEncode(t.b),u.className="badge "+(t.bc||""),i.l!==t.l&&(i.celatest=t.l,i.parentNode.removeChild(i),t.l?(this.latestAdded&&(r=this.elLatest.removeChild(this.elLatest.firstChild),r.celatest=!1,this.elContainer.children.length>0?this.elContainer.insertBefore(r,this.elContainer.firstChild):this.elContainer.appendChild(r)),this.latestAdded=!0,this.elLatest.appendChild(i)):(this.latestAdded=!1,this.elContainer.children.length>0?this.elContainer.insertBefore(i,this.elContainer.firstChild):this.elContainer.appendChild(i)))))};CERegionNavList.prototype.remove=function(n){if(!(n<0)&&!(n>=this.itemObjs.length)&&(this.itemObjs.splice(n,1),this.rendered)){var t=this.items[n];this.items.splice(n,1);t.parentNode.removeChild(t);events.remove(t,"click",this,this.click)}};CERegionNavList.prototype.setChecked=function(n,t){if(!(n<0)&&!(n>=this.itemObjs.length)&&(this.itemObjs[n].ch=t,this.rendered)){var i=this.items[n];utils.setClass(i,"ceregionbtn_checked",t)}};CERegionNavList.prototype.show=function(n){this.domNode.style.display=n?"":"none"};CERegionNavList.prototype.bulkAdd=function(n){var t,i;for(this.ofContainer.removeChild(this.elContainer);this.elLatest.childNodes.length!==0;)this.elLatest.removeChild(this.elLatest.firstChild);while(this.elContainer.childNodes.length!==0)this.elContainer.removeChild(this.elContainer.firstChild);for(this.latestAdded=!1,this.bulk=!0,t=0;t!==n.length;t++)this.add(n[t]);if(this.bulk=!1,this.rendered)for(t=0;t!==this.items.length;t++)i=this.items[t],i.celatest&&!this.latestAdded?(this.elLatest.appendChild(i),this.latestAdded=!0):this.elContainer.appendChild(i);else this.itemObjs=n;this.ofContainer.appendChild(this.elContainer)};CERegionNavList.prototype.render=function(){this.rendered||(this.rendered=!0,this.bulkAdd(this.itemObjs))};CERegionNavList.prototype.click=function(n,t){rp.call({id:this.id,cmd:"click",idx:this.items.indexOf(n),ctrlKey:t.ctrlKey})};CERegionNavList.prototype.resize=function(){var r,f,i,u,n,t,o,s,e,h;if(this.rendered){for(i=0,r=0,s=this.items.length;r<s;++r)f=this.items[r],i=f.offsetLeft+f.offsetWidth;n=this.elContainer.offsetWidth;u=i>n;u&&(n-=32);t=-window.parseInt(this.elContainer.style.left||"0",10);o=t+n;i<o&&(t=i-n);t<0&&(t=0);e=(-t).toString()+"px";this.elContainer.style.left!==e&&(this.elContainer.style.left=e);this.scrollDistance=n/3;this.scrollDistance<100&&(this.scrollDistance=n);h=u?"":"none";this.divArrows.style.display!==h&&events.addImmediateTimeout(this,function(n){this.divArrows.style.display=n},u?"":"none")}};CERegionNavList.prototype.leftClick=function(){var n=Math.min(window.parseInt(this.elContainer.style.left,10)+this.scrollDistance,0).toString()+"px";this.elContainer.style.left=n};CERegionNavList.prototype.rightClick=function(){var n=Math.max(window.parseInt(this.elContainer.style.left||"0",10)-this.scrollDistance,this.elContainer.offsetWidth-this.elContainer.scrollWidth).toString()+"px";this.elContainer.style.left=n};CERegionNavList.prototype.cmds=[CERegionNavList.prototype.dispose,CERegionNavList.prototype.setTitle,CERegionNavList.prototype.clear,CERegionNavList.prototype.add,CERegionNavList.prototype.update,CERegionNavList.prototype.remove,CERegionNavList.prototype.setChecked,CERegionNavList.prototype.show,CERegionNavList.prototype.bulkAdd];CERegionSummaryMap.prototype.dispose=function(){var n,t;for(rp.dispose(this.domNode),this.containerNode=null,this.divFooter=null,this.divFooter2=null,this.domNode=null,n=0;n!==this.toolbarButtons.length;n++)t=this.toolbarButtons[n],events.remove(t.b,"click",this,t.ch);events.remove(this.map,"maptype",this,this.mapTypeChange);delete ui[this.id]};CERegionSummaryMap.prototype.setFooter=function(){};CERegionSummaryMap.prototype.onSaveClick=function(){rp.call({id:this.id,cmd:"save",params:this.map.getCopyParams()})};CERegionSummaryMap.prototype.onPrintClick=function(){rp.showCopy("map")};CERegionSummaryMap.prototype.onSatMapClick=function(){var n;n=this.map.getMapType()==="satellite"?"roadmap":"satellite";rp.call({id:this.id,cmd:"maptype",mt:n});this.map.setMapType(n)};CERegionSummaryMap.prototype.onSelectAllClick=function(){rp.call({id:this.id,cmd:"selectAll"})};CERegionSummaryMap.prototype.mapTypeChange=function(n,t){utils.setClass(this.divSatMap,"checked",t==="satellite")};CERegionSummaryMap.prototype.setTitles=function(n,t){var r,i,u;if(this.divTitleLabel){if(n.constructor===Array){for(i=[],u=0;u!==n.length;u++)i.push(utils.htmlEncode(n[u]));i.length>1&&(i[i.length-1]="<strong>"+i[i.length-1]+"<\/strong>");r=i.join(" / ")}else r=utils.htmlEncode(n),t&&t.length>0&&(r+=" / <strong>"+utils.htmlEncode(t)+"<\/strong>");this.divTitleLabel.innerHTML=r}};CERegionSummaryMap.prototype.cmds=[CERegionSummaryMap.prototype.dispose,CERegionSummaryMap.prototype.setFooter,CERegionSummaryMap.prototype.setTitles];CEReportMap.prototype.dispose=function(){events.remove(this.divPct,"click",this,this.pctClick);events.remove(this.divChange,"click",this,this.changeClick);events.remove(this.divColor,"click",this,this.colorClick);events.remove(this.divSatMap,"click",this,this.satMapClick);events.remove(this.divLegend,"click",this,this.colorClick);events.remove(this.divAll,"click",this,this.allClick);events.remove(this.divDensity,"click",this,this.densityClick);events.remove(this.divSave,"click",this,this.saveClick);events.remove(this.map,"maptype",this,this.mapTypeChange);events.remove(this.divLegendButton,"click",this,this.legendButtonClick);events.remove(this.divLegendOptions,"mouseover",this,this.legendOptionsMouseOver,!0);events.remove(this.divLegendOptions,"mouseout",this,this.legendOptionsMouseOut,!0);events.remove(this.divLegendOptions,"click",this,this.legendOptionClick);events.remove(this.map,"hover",this,this.svgHover);rp.dispose(this.domNode);this.divPct=null;this.divColor=null;this.divAll=null;this.divMin=null;this.divLegend=null;this.divMax=null;this.divContainer=null;this.divFooter=null;this.domNode=null;delete ui[this.id]};CEReportMap.prototype.setSwap=function(){};CEReportMap.prototype.setLegend=function(n,t,i,r){this.divMin.innerHTML=utils.htmlEncode(n);this.divMax.innerHTML=utils.htmlEncode(i!==null?t+" "+i:t);this.divLegend.style.backgroundImage=null;r!==-1&&this.updateLegendOptions(r)};CEReportMap.prototype.updateLegend=function(){this.divLegend.style.backgroundImage=null;this.showLegend(this.domNode.className.indexOf("legend_show")>=0)};CEReportMap.prototype.showLegend=function(n){n&&(this.legendId++,this.divLegend.style.backgroundImage="url(/map/legend?sid="+rp.sessionid+"&wid="+rp.windowid+"&id="+this.id+"&lid="+this.legendId+"&w=200&h=16)");utils.setClass(this.domNode,"legend_show",n)};CEReportMap.prototype.setPct=function(n){this.divPct.style.display=n>0?"":"none";utils.setClass(this.divPct,"checked",n===2)};CEReportMap.prototype.setChange=function(n){this.divChange.style.display=n>0?"":"none";utils.setClass(this.divChange,"checked",n===2)};CEReportMap.prototype.setDensity=function(n){this.divDensity.style.display=n>0?"":"none";utils.setClass(this.divDensity,"checked",n===2)};CEReportMap.prototype.pctClick=function(){rp.call({id:this.id,cmd:"pct"})};CEReportMap.prototype.changeClick=function(){rp.call({id:this.id,cmd:"change"})};CEReportMap.prototype.densityClick=function(){rp.call({id:this.id,cmd:"density"})};CEReportMap.prototype.colorClick=function(){rp.call({id:this.id,cmd:"color"})};CEReportMap.prototype.setAll=function(n){this.divAll.style.display=n>0?"":"none";utils.setClass(this.divAll,"checked",n===2)};CEReportMap.prototype.allClick=function(){rp.call({id:this.id,cmd:"reset"})};CEReportMap.prototype.saveClick=function(){rp.call({id:this.id,cmd:"save",params:this.map.getCopyParams()})};CEReportMap.prototype.printClick=CEReportMap.prototype.copyClick=function(){rp.showCopy("map",this.id,this.map.getCopyParams())};CEReportMap.prototype.satMapClick=function(){var n;n=this.map.getMapType()==="satellite"?"roadmap":"satellite";rp.call({id:this.id,cmd:"maptype",mt:n});this.map.setMapType(n)};CEReportMap.prototype.mapTypeChange=function(n,t){utils.setClass(this.divSatMap,"checked",t==="satellite")};CEReportMap.prototype.setTitles=function(n,t){var r,i,u;if(n.constructor===Array){for(i=[],u=0;u!==n.length;u++)i.push(utils.htmlEncode(n[u]));i.length>1&&(i[i.length-1]="<strong>"+i[i.length-1]+"<\/strong>");r=i.join(" / ")}else r=utils.htmlEncode(n),t&&t.length>0&&(r+=" / <strong>"+utils.htmlEncode(t)+"<\/strong>");this.divTitleLabel.innerHTML=r};CEReportMap.prototype.legendButtonClick=function(n,t){t.preventDefault();t.cancelBubble=!0;this.setLegendOptionsOpen(!this.legendOptionsOpen)};CEReportMap.prototype.setLegendOptionsOpen=function(n){if(this.legendOptionsOpen!==n)if(this.legendOptionsOpen=n,utils.setClass(this.domNode,"legendoptions_open",this.legendOptionsOpen),utils.setClass(this.divLegendButton,"checked",this.legendOptionsOpen),this.legendOptionsOpen){events.add(rp,"resize",this,this.legendOptionResize);var t=utils.getAbsPosition(this.divContainer),i=utils.getAbsPosition(this.divLegendOptions),r=t.h-(i.y-t.y)-140;this.legendOptionsMaxHeight=0;this.divLegendOptions.style.height="";this.divLegendOptions.style.maxHeight="";this.divLegendOptions.style.visibility="hidden";rp.needResize()}else events.remove(rp,"resize",this,this.legendOptionResize),this.divLegendOptions.style.height=""};CEReportMap.prototype.legendOptionResize=function(){var i=utils.getAbsPosition(this.divContainer),t=utils.getAbsPosition(this.divLegendOptions),n;this.legendOptionsMaxHeight===0&&(this.divLegendOptions.style.visibility="visible",this.legendOptionsY=t.y,this.legendOptionsMaxHeight=t.h,this.divLegendOptions.style.maxHeight=t.h+"px");n=i.h-(this.legendOptionsY-i.y)-140;n<this.legendOptionsMaxHeight?(n<70&&(n+=110),this.divLegendOptions.style.height=n+"px"):this.divLegendOptions.style.height=""};CEReportMap.prototype.legendOptionsNonSpecificClick=function(n,t){var i=utils.isChild(t.target,this.divLegendOptions);i||this.legendButtonClick(null,{preventDefault:function(){},cancelBubble:!1})};CEReportMap.prototype.updateLegendOptions=function(n){for(var f,o,u,i,r,s,t,e;this.divLegendOptions.children.length>0;)this.divLegendOptions.removeChild(this.divLegendOptions.firstChild);if(!n||n.length===0){utils.setClass(this.domNode,"legendoptions_exist",!1);this.setLegendOptionsOpen(!1);return}for(utils.setClass(this.domNode,"legendoptions_exist",!0),f=document.createElement("div"),f.className="legendoption legendoption-all",f.appendChild(document.createTextNode("All")),events.add(f,"click",this,this.legendOptionClick),this.divLegendOptions.appendChild(f),o=!1,u=0;u!==n.length;u++)o|=n[u][2]>0;for(utils.setClass(f,"checked",!o),u=0;u!==n.length;u++)i=n[u],r=document.createElement("div"),r.className="legendoption",utils.setClass(r,"checked",i[2]===1),utils.setClass(r,"partial",i[2]===2),s=document.createElement("div"),s.className="check",r.appendChild(s),t=document.createElement("div"),t.className="col",i[4]!==null&&(t.style.borderColor="#"+i[4],t.style.borderWidth="2px",t.style.borderStyle="solid",t.style.width="16px",t.style.height="16px",r.style.lineHeight="16px"),i[5]!==null?t.style.backgroundImage="url(MapLegendBG"+i[5]+"&w=20&h=20)":t.style.backgroundColor="#"+i[1],t.innerHTML="&nbsp;",r.appendChild(t),e=document.createElement("div"),e.className="text",e.appendChild(document.createTextNode(i[0])),r.appendChild(e),this.divLegendOptions.appendChild(r),r.cecode=i[3];this.setLegendOptionsOpen(!0)};CEReportMap.prototype.legendOptionsMouseOut=function(n,t){for(var i=t.target;i!==null&&!i.cecode;)i=i.parentElement;i&&t.target===i&&this.setStyleHover(null)};CEReportMap.prototype.legendOptionsMouseOver=function(n,t){for(var i=t.target;i!==null&&!i.cecode;)i=i.parentElement;i&&i.cecode?this.setStyleHover(i.cecode):i===null&&this.setStyleHover(null)};CEReportMap.prototype.setStyleHover=function(n){this.map.setStyleHover(n)};CEReportMap.prototype.legendOptionClick=function(n,t){for(var i=t.target,r;i!==null&&i.className.indexOf("legendoption")<0;)i=i.parentNode;if(i!==null)for(r=0;r!==this.divLegendOptions.children.length;r++)if(i===this.divLegendOptions.children[r]){rp.call({id:this.id,cmd:"legendclick",idx:r-1});break}};CEReportMap.prototype.updateLegendOptionCheckedStatus=function(n){for(var i=!1,t=0;t<n.length;t++)i|=n[t]>0;for(utils.setClass(this.divLegendOptions.children[0],"checked",!i),t=0;t<n.length;t++){if(t>=this.divLegendOptions.children.length)break;utils.setClass(this.divLegendOptions.children[t+1],"checked",n[t]===1);utils.setClass(this.divLegendOptions.children[t+1],"partial",n[t]===2)}};CEReportMap.prototype.showColor=function(n){this.divColor.style.display=n?"":"none"};CEReportMap.prototype.svgHover=function(n,t){for(var u,f,r,i=0;i!==this.divLegendOptions.children.length;i++)utils.setClass(this.divLegendOptions.children[i],"highlight",!1);if(t!==null&&this.divLegendOptions.children.length>0)for(i=0;i!==t.smt.divs.length;i++)for(u=0;u!==t.smt.divs[i].cepolys.length;u++)if(f=t.smt.divs[i].cepolys[u],f.ceid===t.hid){if(f.cestyle)for(r=0;r!==this.divLegendOptions.children;r++)if(this.divLegendOptions.children[r].cecode&&this.divLegendOptions.children[r].cecode===f.cestyle){this.highlightLegendOption(this.divLegendOptions.children[r]);break}return}};CEReportMap.prototype.highlightLegendOption=function(n){var r=this.divLegendOptions.scrollTop,t=utils.getAbsPosition(this.divLegendOptions),i=utils.getAbsPosition(n),u;utils.setClass(n,"highlight",!0);(i.y<t.y+r||i.y+i.h>r+t.y+t.h)&&(u=i.y-t.y+i.h/2-t.h/2,this.divLegendOptions.scrollTop=u)};CEReportMap.prototype.cmds=[CEReportMap.prototype.dispose,CEReportMap.prototype.showLegend,CEReportMap.prototype.setLegend,CEReportMap.prototype.setSwap,CEReportMap.prototype.setPct,CEReportMap.prototype.setAll,CEReportMap.prototype.updateLegend,CEReportMap.prototype.setTitles,CEReportMap.prototype.setDensity,CEReportMap.prototype.updateLegendOptionCheckedStatus,CEReportMap.prototype.showColor,CEReportMap.prototype.setChange];CEReportNav.prototype.dispose=function(){events.remove(rp,"resize",this,this.resize);events.remove(this.imgright,"click",this,this.rightClick);events.remove(this.imgleft,"click",this,this.leftClick);rp.dispose(this.domNode);this.imgleft=null;this.imgright=null;this.divArrows=null;this.domNode=null;this.containerNode=null;delete ui[this.id]};CEReportNav.prototype.add=function(n){var t;t=ui[n];this.items.push(t);this.containerNode.appendChild(t.domNode)};CEReportNav.prototype.insert=function(n,t){var i;i=ui[t];n<this.items.length?this.containerNode.insertBefore(i.domNode,this.items[n].domNode):this.containerNode.appendChild(i.domNode);this.items.splice(n,0,i)};CEReportNav.prototype.clear=function(){for(var n=0,t=this.items.length;n<t;++n)this.containerNode.removeChild(this.items[n].domNode);this.items=[];this.active=null};CEReportNav.prototype.setActive=function(n){var t;(t=n!==null?ui[n]:null,this.active!==t)&&(this.active=t)};CEReportNav.prototype.resize=function(){var u,f,i,e,t,o,s,n,r,h;for(i=0,u=0,h=this.items.length;u<h;++u)f=this.items[u],f.isVisible&&(i=f.domNode.offsetLeft+f.domNode.offsetWidth);t=this.domNode.offsetWidth;e=i>t;this.containerNode.style.right=e?"32px":"0";this.divArrows.style.display=e?"":"none";e&&(t-=32);n=-window.parseInt(this.containerNode.style.left,10);r=n+t;i<r&&(n=i-t,r=i);n<0&&(n=0,r=t);this.active&&(o=this.active.domNode.offsetLeft,s=o+this.active.domNode.offsetWidth,s>r&&(n=s-t),o<n&&(n=o));this.containerNode.style.left=(-n).toString()+"px"};CEReportNav.prototype.leftClick=function(){this.containerNode.style.left=Math.min(window.parseInt(this.containerNode.style.left,10)+100,0).toString()+"px"};CEReportNav.prototype.rightClick=function(){this.containerNode.style.left=Math.max(window.parseInt(this.containerNode.style.left,10)-100,this.domNode.offsetWidth-32-this.containerNode.scrollWidth).toString()+"px"};CEReportNav.prototype.cmds=[CEReportNav.prototype.dispose,null,null,CEReportNav.prototype.clear,CEReportNav.prototype.insert,CEReportNav.prototype.add,CEReportNav.prototype.setActive];CERowEditor.prototype.dispose=function(){events.remove(this.domNode,"click",this,this.domClick);events.remove(this.domNode,"blur",this,this.domBlur);this.destroyEditors();rp.dispose(this.domNode);this.domNode=null;this.divHeader=null;this.divBody=null;this.divFooter=null;delete ui[this.id]};CERowEditor.prototype.setData=function(n){this.data=n;this.data.rows=[];this.divHeader.innerHTML="";this.divFooter.innerHTML="";this.divBody.innerHTML="";this.newRow=null;this.editRow=null;this.createEditors();this.makeHeader();this.makeFooter();this.setFooterRed(this.data.fr)};CERowEditor.prototype.addRow=function(n){var e,t,r,i,f,u,o;for(n.tds=[],f=window.document.createElement("table"),e=f.insertRow(-1),t=0,o=this.data.cols.length;t<o;++t){r=this.data.cols[t];i=e.insertCell(-1);i.className="td"+t.toString();i.style.width=r.width-4+"px";switch(r.type){case CERowEditor.prototype.eColCmd:i.className+=" del";break;case CERowEditor.prototype.eColCombo:n.cells[t]!==null&&(i.innerHTML=utils.htmlEncode(this.getComboValue(r,this.getComboIndex(r,n.cells[t]))));break;default:n.cells[t]!==null&&(i.innerHTML=n.cells[t])}n.tds.push(i)}u=window.document.createElement("div");u.className="ceroweditor_rowinner";u.appendChild(f);n.divrow=window.document.createElement("div");n.divrow.className="ceroweditor_row";n.bgcolor&&(n.divrow.style.backgroundColor="#"+n.bgcolor);n.divrow.appendChild(u);n.divrow.cerow=n;events.add(n.divrow,"click",this,this.rowClick);n.key=this.data.rows.length;this.data.rows.push(n);this.newRow?this.divBody.insertBefore(n.divrow,this.newRow.divrow):this.divBody.appendChild(n.divrow)};CERowEditor.prototype.addNewRow=function(){var f,n,t,i,u,r,e;for(this.newRow={},u=window.document.createElement("table"),f=u.insertRow(-1),n=0,e=this.data.cols.length;n<e;++n){t=this.data.cols[n];i=f.insertCell(-1);i.className="td"+n.toString();i.style.width=t.width-4+"px";switch(t.type){case CERowEditor.prototype.eColCmd:i.className+=" add";break;default:t.add&&(i.innerHTML=t.add)}}r=window.document.createElement("div");r.className="ceroweditor_rowinner";r.appendChild(u);this.newRow.divrow=window.document.createElement("div");this.newRow.divrow.className="ceroweditor_row";this.newRow.divrow.appendChild(r);events.add(this.newRow.divrow,"click",this,this.newRowClick);this.divBody.appendChild(this.newRow.divrow)};CERowEditor.prototype.makeHeader=function(){var u,n,i,t,r,f;for(r=window.document.createElement("table"),u=r.insertRow(-1),this.data.headertds=[],n=0,f=this.data.cols.length;n<f;++n)i=this.data.cols[n],t=u.insertCell(-1),t.className="td"+n.toString(),i.header!==null&&(t.innerHTML=i.header),t.style.width=i.width-4+"px",this.data.headertds.push(t);this.divHeader.appendChild(r)};CERowEditor.prototype.eColText=1;CERowEditor.prototype.eColNumber=2;CERowEditor.prototype.eColCombo=3;CERowEditor.prototype.eColMulti=4;CERowEditor.prototype.eColImage=5;CERowEditor.prototype.eColCmd=6;CERowEditor.prototype.makeFooter=function(){var u,n,i,t,r,f;for(this.data.footertds=[],r=window.document.createElement("table"),u=r.insertRow(-1),n=0,f=this.data.cols.length;n<f;++n)i=this.data.cols[n],t=u.insertCell(-1),t.className="td"+n.toString(),i.footer!==null&&(t.innerHTML=i.footer),t.style.width=i.width-4+"px",this.data.footertds.push(t);this.divFooter.appendChild(r)};CERowEditor.prototype.setCell=function(n,t,i){var r,u;if(r=this.data.rows[n],u=this.data.cols[t],r.cells[t]=i,r===this.editRow)switch(u.type){case CERowEditor.prototype.eColText:u.editor.value=i;break;case CERowEditor.prototype.eColNumber:u.editor.value=i;break;case CERowEditor.prototype.eColCombo:u.editor.selectedIndex=this.getComboIndex(u,i);break;default:r.tds[t].innerHTML=r.cells[t]}else switch(u.type){case CERowEditor.prototype.eColCombo:r.tds[t].innerHTML=utils.htmlEncode(this.getComboValue(u,this.getComboIndex(u,r.cells[t])));break;default:r.tds[t].innerHTML=r.cells[t]}};CERowEditor.prototype.setHeader=function(n,t){this.data.headertds[n].innerHTML=t};CERowEditor.prototype.setFooter=function(n,t){this.data.footertds[n].innerHTML=t};CERowEditor.prototype.setFooterRed=function(n){utils.setClass(this.divFooter,"ceroweditor_footerred",n)};CERowEditor.prototype.startEdit=function(n){var i,t,r,u,f;if(i=this.data.rows[n],i!==this.editRow)for(this.stopEdit(),this.editRow=i,utils.setClass(this.editRow.divrow,"ceroweditor_row_checked",!0),this.copyToEditors(this.editRow),this.addEditors(this.editRow),u=!1,t=0,f=this.data.cols.length;t<f;++t){r=this.data.cols[t];switch(r.type){case CERowEditor.prototype.eColText:case CERowEditor.prototype.eColNumber:case CERowEditor.prototype.eColCombo:r.editor.focus();u=!0}if(u)break}};CERowEditor.prototype.stopEdit=function(){this.editRow!==null&&(this.copyFromEditors(this.editRow),this.removeEditors(this.editRow),utils.setClass(this.editRow.divrow,"ceroweditor_row_checked",!1),this.editRow=null)};CERowEditor.prototype.delRow=function(n){var t;t=this.data.rows[n];t===this.editRow&&(this.removeEditors(this.editRow),utils.setClass(this.editRow.divrow,"ceroweditor_row_checked",!1),this.editRow=null);this.divBody.removeChild(t.divrow);this.data.rows.splice(n,1)};CERowEditor.prototype.createEditors=function(){var t,n,i;for(this.editors=[],t=0,i=this.data.cols.length;t<i;++t){n=this.data.cols[t];switch(n.type){case CERowEditor.prototype.eColText:n.editor=window.document.createElement("input");n.editor.type="text";n.editor.style.width=n.width-8+"px";events.add(n.editor,"blur",this,this.editorBlur);break;case CERowEditor.prototype.eColNumber:n.editor=window.document.createElement("input");n.editor.type="text";n.editor.style.width=n.width-8+"px";events.add(n.editor,"blur",this,this.editorBlur);break;case CERowEditor.prototype.eColCombo:n.editor=window.document.createElement("select");n.editor.style.width=n.width-8+"px";this.makeComboOptions(n);events.add(n.editor,"blur",this,this.editorBlur);break;case CERowEditor.prototype.eColMulti:n.editor=window.document.createElement("textarea");n.editor.style.width=n.width-8+"px";n.editor.rows=n.lines;events.add(n.editor,"blur",this,this.editorBlur)}}};CERowEditor.prototype.destroyEditors=function(){};CERowEditor.prototype.addEditors=function(n){for(var i,t=0,r=this.data.cols.length;t<r;++t){i=this.data.cols[t];switch(this.data.cols[t].type){case CERowEditor.prototype.eColText:case CERowEditor.prototype.eColNumber:case CERowEditor.prototype.eColCombo:case CERowEditor.prototype.eColMulti:n.tds[t].innerHTML="";n.tds[t].appendChild(i.editor)}}};CERowEditor.prototype.removeEditors=function(n){for(var i,t=0,r=this.data.cols.length;t<r;++t){i=this.data.cols[t];switch(i.type){case CERowEditor.prototype.eColText:case CERowEditor.prototype.eColNumber:case CERowEditor.prototype.eColMulti:n.tds[t].removeChild(i.editor);n.tds[t].innerHTML=n.cells[t];break;case CERowEditor.prototype.eColCombo:n.tds[t].removeChild(i.editor);n.tds[t].innerHTML=utils.htmlEncode(this.getComboValue(i,this.getComboIndex(i,n.cells[t])))}}};CERowEditor.prototype.copyToEditors=function(){for(var t,n=0,i=this.data.cols.length;n<i;++n){t=this.data.cols[n];switch(this.data.cols[n].type){case CERowEditor.prototype.eColText:case CERowEditor.prototype.eColNumber:case CERowEditor.prototype.eColMulti:t.editor.value=this.editRow.cells[n];break;case CERowEditor.prototype.eColCombo:t.editor.selectedIndex=this.getComboIndex(t,this.editRow.cells[n])}}};CERowEditor.prototype.copyFromEditors=function(n){var t,i,u,f,r,e;for(u=!1,r={},t=0,e=this.data.cols.length;t<e;++t){i=this.data.cols[t];switch(i.type){case CERowEditor.prototype.eColText:case CERowEditor.prototype.eColNumber:case CERowEditor.prototype.eColMulti:n.cells[t]!==i.editor.value&&(n.cells[t]=i.editor.value,r["c"+t]=i.editor.value,u=!0);break;case CERowEditor.prototype.eColCombo:f=i.editor.selectedIndex>=1?i.keys[i.editor.selectedIndex]:"";n.cells[t]!==f&&(n.cells[t]=f,r["c"+t]=f,u=!0)}}u&&(r.id=this.id,r.cmd="edit",r.r=utils.indexOf(this.data.rows,n),rp.call(r))};CERowEditor.prototype.makeComboOptions=function(n){for(var u,i,r,t=0,f=n.keys.length;t<f;++t){for(u=window.parseInt(n.keys[t].substr(0,1),10),i="",r=0;r<u;++r)i+="      ";n.editor.options[t]=new window.Option(i+n.values[t],n.keys[t])}};CERowEditor.prototype.getComboIndex=function(n,t){for(var i=0,r=n.keys.length;i<r;++i)if(n.keys[i]===t)return i;return 0};CERowEditor.prototype.getComboValue=function(n,t){return t<=0?"":n.values[t]};CERowEditor.prototype.getColFromEvent=function(n,t){for(var i=t.target;i!==null;){if(i===n)return-1;if(i.tagName==="TD")return i.cellIndex;i=i.offsetParent}return-1};CERowEditor.prototype.rowClick=function(n,t){n.cerow!==this.editRow&&(this.stopEdit(),rp.call({id:this.id,cmd:"row",r:utils.indexOf(this.data.rows,n.cerow),c:this.getColFromEvent(n,t)}));t.cancelBubble=!0};CERowEditor.prototype.domBlur=function(n,t){this.stopEdit();t.cancelBubble=!0};CERowEditor.prototype.domClick=function(n,t){this.stopEdit();t.cancelBubble=!0};CERowEditor.prototype.newRowClick=function(n,t){this.stopEdit();t.cancelBubble=!0;rp.call({id:this.id,cmd:"add",c:this.getColFromEvent(n,t)})};CERowEditor.prototype.editorBlur=function(){this.editRow!==null?this.copyFromEditors(this.editRow):this.stopEdit()};CERowEditor.prototype.cmds=[CERowEditor.prototype.dispose,CERowEditor.prototype.setData,CERowEditor.prototype.setCell,CERowEditor.prototype.setHeader,CERowEditor.prototype.setFooter,CERowEditor.prototype.setFooterRed,CERowEditor.prototype.addNewRow,CERowEditor.prototype.addRow,CERowEditor.prototype.startEdit,CERowEditor.prototype.stopEdit,CERowEditor.prototype.delRow];CESVGTile.prototype.maxZoom=21;CESVGTile.prototype.minZoom=0;CESVGTile.prototype.getTile=function(n,t,i){var r,u,f,e;return e=n.x&(1<<t)-1,r=i.createElement("div"),r.className="cesvgtile",r.cepolys=[],this.divs.push(r),u=rp.makeXMLRequest(),f=this,u.open("POST","/map/svg",!0),u.onreadystatechange=function(){f.svgReqChange(r,u)},u.setRequestHeader("Content-type","application/x-www-form-urlencoded"),u.send("sid="+rp.sessionid+"&wid="+rp.windowid+"&id="+this.map.id+"&oid="+this.overlayid.toString()+"&x="+e.toString()+"&y="+n.y.toString()+"&z="+t.toString()),r};CESVGTile.prototype.svgReqChange=function(div,req){var data,c,i,len,poly,item;if(req.readyState===4&&req.status===200&&req.responseText.length>=3)try{for(data=window.JSON&&window.JSON.parse?window.JSON.parse(req.responseText):eval(req.responseText),c=svg.canvas(256,256),div.appendChild(c),len=data.length,i=0;i,len;++i)item=data[i],poly=svg.path(item[1]),poly.onmouseover=this.mouseover,poly.onmouseout=this.mouseout,this.setPolyHover(poly,item[0]===this.hoverId),c.appendChild(poly),poly.ceid=item[0],div.cepolys.push(poly),item.length>2&&(poly.cestyle=item[2])}catch(ignore){}};CESVGTile.prototype.releaseTile=function(n){var t;t=utils.indexOf(this.divs,n);this.divs.splice(t,1)};CESVGTile.prototype.polyMouseOver=function(n){this.setHoverId(n.target.ceid)};CESVGTile.prototype.polyMouseOut=function(){this.setHoverId(null)};CESVGTile.prototype.setPolyHover=function(n,t){n.className.baseVal=t?"_hover":""};CESVGTile.prototype.setHoverId=function(n){var t,i,r,u;if(n!==this.hoverId||this.styleId!=null){for(this.hoverId=n,t=this.divs.length-1;t>=0;--t)for(r=this.divs[t],i=r.cepolys.length-1;i>=0;--i)u=r.cepolys[i],this.setPolyHover(u,u.ceid===n);events.post(this,"hover",n)}};CESVGTile.prototype.setStyleId=function(n){var t,i,r,u;if(n!==this.styleId||this.hoverId!=null)for(this.styleId=n,t=this.divs.length-1;t>=0;--t)for(r=this.divs[t],i=r.cepolys.length-1;i>=0;--i)u=r.cepolys[i],this.setPolyHover(u,u.cestyle===n)};CETab.prototype.dispose=function(){events.remove(this.domNode,"click",this,this.domNodeClick);this.spanClose&&(events.remove(this.spanClose,"click",this,this.closeClick),events.remove(this.domNode,"auxclick",this,this.closeMouseUp));rp.dispose(this.domNode);this.spanIcon=null;this.spanText=null;this.spanClose=null;this.domNode=null;delete ui[this.id]};CETab.prototype.show=function(n){n!==this.isVisible&&(this.isVisible=n,this.domNode.style.display=n?"":"none")};CETab.prototype.setActive=function(n){n!==this.isActive&&(this.isActive=n,utils.setClass(this.domNode,"active",n))};CETab.prototype.setTitle=function(n){this.spanText.innerHTML=utils.htmlEncode(n)};CETab.prototype.domNodeClick=function(n,t){t.preventDefault();t.button===1&&this.spanClose?this.closeClick(n,t):t.button===0&&(this.clickCmds?rp.doCmds(this.clickCmds):rp.call({id:this.id,cmd:"click"}))};CETab.prototype.closeClick=function(n,t){t.preventDefault();t.cancelBubble=!0;rp.call({id:this.id,cmd:"close"})};CETab.prototype.showPopup=function(n){var t=ui[n];events.add(t,"close",this,this.popupClose);t.show(this,0,this.domNode.offsetHeight);utils.setClass(this.domNode,"cetab_popup",!0)};CETab.prototype.popupClose=function(n){events.remove(n,"close",this,this.popupClose);utils.setClass(this.domNode,"cetab_popup",!1)};CETab.prototype.flash=function(){events.setTimeout(this,function(){utils.setClass(this.domNode,"flash",!0);events.setTimeout(this,function(){utils.setClass(this.domNode,"flash",!1)},400)},100)};CETab.prototype.setClickCmds=function(n){this.clickCmds=n};CETab.prototype.cmds=[CETab.prototype.dispose,CETab.prototype.show,CETab.prototype.setTitle,CETab.prototype.showPopup,CETab.prototype.setClickCmds];CETabStrip.prototype.dispose=function(){this.divArrows&&(events.remove(rp,"resize",this,this.resize),events.remove(this.imgright,"click",this,this.rightClick),events.remove(this.imgleft,"click",this,this.leftClick));rp.dispose(this.domNode);this.containerNode=null;this.imgleft=null;this.imgright=null;this.divArrows=null;this.domNode=null;this.items=null;delete ui[this.id]};CETabStrip.prototype.add=function(n){var t;t=ui[n];this.items.push(t);this.containerNode.appendChild(t.domNode);t.setActive(this.activetab===t);rp.needResize();this.animateAddTab&&t.flash()};CETabStrip.prototype.insert=function(n,t){var i;i=ui[t];n<this.items.length?this.containerNode.insertBefore(i.domNode,this.items[n].domNode):this.containerNode.appendChild(i.domNode);this.items.splice(n,0,i);i.setActive(this.activetab===i);rp.needResize();this.animateAddTab&&i.flash()};CETabStrip.prototype.clear=function(){for(var n=0,t=this.items.length;n<t;++n)this.containerNode.removeChild(this.items[n].domNode);this.items=[];rp.needResize()};CETabStrip.prototype.remove=function(n){var t,i;t=ui[n];this.activetab===t&&(this.activetab=null);i=utils.indexOf(this.items,t);this.items.splice(i,1);this.containerNode.removeChild(t.domNode);rp.needResize()};CETabStrip.prototype.setActive=function(n){var i,t;for(i=n!==null?ui[n]:null,this.activetab=i,t=0;t!==this.items.length;t++)this.items[t].setActive(this.activetab===this.items[t])};CETabStrip.prototype.resize=function(){var u,f,i,e,t,o,s,n,r,h;for(i=0,u=0,h=this.items.length;u<h;++u)f=this.items[u],f.isVisible&&(i=f.domNode.offsetLeft+f.domNode.offsetWidth);t=this.domNode.offsetWidth;e=i>t;this.containerNode.style.right=e?"32px":"0";this.divArrows.style.display=e?"":"none";e&&(t-=32);n=-window.parseInt(this.containerNode.style.left,10);r=n+t;i<r&&(n=i-t,r=i);n<0&&(n=0,r=t);this.activetab&&(o=this.activetab.domNode.offsetLeft,s=o+this.activetab.domNode.offsetWidth,s>r&&(n=s-t),o<n&&(n=o));this.containerNode.style.left=(-n).toString()+"px"};CETabStrip.prototype.leftClick=function(){this.containerNode.style.left=Math.min(window.parseInt(this.containerNode.style.left,10)+100,0).toString()+"px"};CETabStrip.prototype.rightClick=function(){this.containerNode.style.left=Math.max(window.parseInt(this.containerNode.style.left,10)-100,this.domNode.offsetWidth-32-this.containerNode.scrollWidth).toString()+"px"};CETabStrip.prototype.setAnimateAddTab=function(n){this.animateAddTab=n};CETabStrip.prototype.cmds=[CETabStrip.prototype.dispose,CETabStrip.prototype.clear,CETabStrip.prototype.add,CETabStrip.prototype.setActive,CETabStrip.prototype.remove,CETabStrip.prototype.insert,CETabStrip.prototype.setAnimateAddTab];CETable.prototype.dispose=function(){rp.dispose(this.domNode);this.domNode=null;delete ui[this.id]};CETable.prototype.setData=function(n){var u,i,f,r,t,e,o;for(this.domNode.innerHTML="",t=[],t.push('<div class="title">'),t.push(utils.htmlEncode(n.title)),t.push('<\/div><table class="tabledata"><colgroup>'),i=0,e=n.cols.length;i<e;++i)t.push('<col style="width:'),t.push(n.cols[i].w),t.push('px;">');for(t.push("<\/colgroup><tbody>"),u=0,o=n.rows.length;u<o;++u){for(f=n.rows[u],t.push('<tr style="height:'),t.push(f.h),t.push('px;">'),i=0,e=f.cells.length;i<e;++i)r=f.cells[i],t.push('<td class="'),t.push(r.cn),t.push('"'),r.span&&(t.push(' colspan="'),t.push(r.span),t.push('"')),t.push(">"),t.push(utils.htmlEncode(r.text)),r.subText&&t.push('<div class="subText">'+r.subText+"<\/div>"),t.push("<\/td>");t.push("<\/tr>")}t.push("<\/tbody><\/table>");this.domNode.innerHTML=t.join("")};CETable.prototype.dispose=function(){delete ui[this.id]};CETable.prototype.cmds=[CETable.prototype.dispose,CETable.prototype.setData];TemplateView.prototype.dispose=function(){for(var n=0;n!==this.views.length;n++){if(this.views[n].ondispose)this.views[n].ondispose(this.controller,this.views[n]);this.views[n].template&&delete this.views[n].template;this.views[n].templateHtml&&delete this.views[n].templateHtml}};TemplateView.prototype._getViewById=function(n){for(var t=0;t!==this.views.length;t++)if(this.views[t].id===n)return this.views[t];throw"View '"+n+"' does not exist";};TemplateView.prototype._getViewTemplate=function(n){(function(n,t){var i=rp.makeXMLRequest();i.open("GET",t.templateUrl);i.onreadystatechange=function(){if(i.readyState===XMLHttpRequest.DONE)if(i.status===200)t.templateHtml=i.responseText,n.displayView(t.id);else throw"Couldn't retrieve template for view '"+t.id+"'";};i.send()})(this,n)};TemplateView.prototype.displayView=function(n){var t=null;if(n&&(t=this._getViewById(n),!t.template))if(t.templateHtml){if(t.template=document.createElement("div"),t.template.className="view",t.template.id="view_"+t.id,t.template.innerHTML=t.templateHtml,t.oninit)t.oninit(this.controller,t)}else{this._getViewTemplate(t);return}if(this.currentView){if(this.currentView.ondeactivate)this.currentView.ondeactivate(this.controller,this.currentView);this.domNode.firstChild&&this.domNode.removeChild(this.domNode.firstChild)}if(this.currentView=t,t&&(this.domNode.appendChild(t.template),t.onactivate))t.onactivate(this.controller,t)};CETitle.prototype.dispose=function(){rp.dispose(this.domNode);this.domNode=null;delete ui[this.id]};CETitle.prototype.setText=function(n){this.domNode.innerHTML=utils.htmlEncode(n)};CETitle.prototype.cmds=[CETitle.prototype.dispose,CETitle.prototype.setText];CETooltip.prototype.__createTooltip=function(n){var t=utils.getAbsPosition(n.el);tt.__ttContainer.style.top=t.y+"px";tt.__ttContainer.style.left=t.x+t.w+"px";tt.__ttContainer.innerHTML=n.t;tt.__ttContainer.cetooltip=n;tt.__ttContainer.className="cetooltip_container cetooltip_show";tt.__timeoutId=events.setTimeout(this,tt.__checkDOMForElement,100)};CETooltip.prototype.__checkDOMForElement=function(){if(this.__timeoutId=null,this.__isOpen&&this.__ttContainer.cetooltip){var n=this.__ttContainer.cetooltip;document.body.contains(n.el)?this.__timeoutId=events.setTimeout(this,this.__checkDOMForElement,100):this.__destroyTooltip(n)}};CETooltip.prototype.__destroyTooltip=function(n){this.__ttContainer.cetooltip==n&&(this.__isOpen=!1,this.__ttContainer.className="cetooltip_container",events.setTimeout(this,function(){this.__isOpen||(this.__ttContainer.style.left=null,this.__ttContainer.style.top=null)},500),this.__ttContainer.cetooltip=null)};CETooltip.prototype.__onTimeout=function(n){n!=null&&(n.timeoutId=null,n.isOver?(tt.__isOpen=!0,tt.__createTooltip(n)):tt.__destroyTooltip(n))};CETooltip.prototype.__onMouseEnter=function(n,t){var i=t.target.cetooltip;i&&(i.isOver=!0,this.__onTimeout(i),eventIgnore())};CETooltip.prototype.__onMouseLeave=function(n,t){this.__ttContainer.cetooltip&&this.__ttContainer.cetooltip.el&&(!this.__ttContainer.cetooltip.el.contains(t.target)||!document.body.contains(this.__ttContainer.cetooltip.el))&&this.__destroyTooltip(this.__ttContainer.cetooltip);var i=t.target.cetooltip;i&&(i.isOver=!1,this.__isOpen&&this.__onTimeout(i),eventIgnore())};CETooltip.prototype.register=function(n,t){"cetooltip"in n&&n.cetooltip!=null?n.cetooltip.t=t:n.cetooltip={id:++this.__index,el:n,t:t,timeoutId:null}};CETooltip.prototype.remove=function(n){if("cetooltip"in n&&n.cetooltip!=null){var t=n.cetooltip;t.timeoutId&&window.clearTimeout(t.timeoutId);t.el==null;n.cetooltip=null}};const LOCATION_MODES={origin:0,destination:1},RANGE_MODES={minutes:0,km:1},TRAVEL_MODES={car:0,bike:1,walking:2,publicTransport:3},DAY_OF_WEEK={anyday:0,monday:1,tuesday:2,wednesday:3,thursday:4,friday:5,saturday:6,sunday:7};CETravelTimeControls.prototype.dispose=function(){events.remove(this.btn_calc,"click",this,this.calcClick);rp.dispose(this.domNode);this.domNode=null;delete ui[this.id]};CETravelTimeControls.prototype.setValues=function(n){this.state=n;this.copyStateToUI()};CETravelTimeControls.prototype.setLocation=function(n){this.updateTimerId&&window.clearTimeout(this.updateTimerId);this.setState({location:n},!0);this.startCalc()};CETravelTimeControls.prototype.finishCalc=function(){this.span_calc.style.display="";this.calcPending=!1;this.state!==this.calcState&&this.startCalc()};CETravelTimeControls.prototype.setState=function(n,t){var r=Object.assign({},this.state),i;this.state=Object.assign(r,n);this.copyStateToUI();this.updateTimerId&&window.clearTimeout(this.updateTimerId);t?this.startCalc():(i=this,this.updateTimerId=window.setTimeout(function(){i.uiTimeout()},1e3))};CETravelTimeControls.prototype.copyStateToUI=function(){var t=!1,n,i;switch(this.state.travelMode){case TRAVEL_MODES.publicTransport:case TRAVEL_MODES.bike:this.state.rangeMode=RANGE_MODES.minutes;t=!0}this.select_locationmode.selectedIndex=this.state.locationMode;this.edit_location.value=this.state.location;this.select_dow.selectedIndex=this.state.dayOfWeek;this.edit_tod.value=this.state.timeOfDay;this.select_travelmode.selectedIndex=this.state.travelMode;this.edit_range.value=this.state.range;this.select_conditions.selectedIndex=this.findSelectIndex(this.select_conditions,this.state.conditions);this.select_rangemode.selectedIndex=this.state.rangeMode;this.select_rangemode.disabled=t;this.resizeSelect(this.select_locationmode);this.edit_location.parentNode.firstChild.innerHTML=this.edit_location.value.length>0?this.edit_location.value:this.edit_location.placeholder;this.resizeSelect(this.select_dow);this.resizeSelect(this.select_travelmode);this.edit_range.parentNode.firstChild.innerHTML=this.edit_range.value>0?this.edit_range.value:"60";this.resizeSelect(this.select_rangemode);this.resizeSelect(this.select_conditions);n=this.state.travelMode===TRAVEL_MODES.publicTransport;i=this.state.travelMode===TRAVEL_MODES.car;this.span_at.style.display=n?"":"none";this.edit_tod.style.display=n&&this.state.dayOfWeek!==DAY_OF_WEEK.anyday?"":"none";this.select_dow.parentNode.style.display=n?"":"none";this.select_conditions.parentNode.style.display=i?"":"none"};CETravelTimeControls.prototype.findSelectIndex=function(n,t){if(t===null||t===undefined)return-1;t=t.toString();for(var i=n.options.length-1;i>=0;--i)if(n.options[i].value===t)return i;return-1};CETravelTimeControls.prototype.resizeSelect=function(n){var t=n.selectedIndex<0?null:n.options[n.selectedIndex];n.parentNode.firstChild.innerHTML=t===null?"unknown":t.text};CETravelTimeControls.prototype.resizeEdit=function(n){n.parentNode.firstChild.innerHTML=n.value.length==0?n.placeholder:option.text};CETravelTimeControls.prototype.uiTimeout=function(){this.startCalc()};CETravelTimeControls.prototype.startCalc=function(){(this.updateTimerId&&window.clearTimeout(this.updateTimerId),this.updateTimerId=0,this.calcPending)||(this.span_calc.style.display="inline-block",this.calcPending=!0,this.calcState=this.state,rp.call({id:this.id,cmd:"calc",locationMode:this.state.locationMode,location:this.state.location,dayOfWeek:this.state.dayOfWeek,timeOfDay:this.state.timeOfDay,travelMode:this.state.travelMode,range:this.state.range,rangeMode:this.state.rangeMode,conditions:this.state.conditions}))};CETravelTimeControls.prototype.cmds=[CETravelTimeControls.prototype.dispose,CETravelTimeControls.prototype.setValues,CETravelTimeControls.prototype.setLocation,CETravelTimeControls.prototype.finishCalc];typeof Object.assign!="function"&&Object.defineProperty(Object,"assign",{value:function(n){"use strict";var u,i,t,r;if(n===null||n===undefined)throw new TypeError("Cannot convert undefined or null to object");for(u=Object(n),i=1;i<arguments.length;i++)if(t=arguments[i],t!==null&&t!==undefined)for(r in t)Object.prototype.hasOwnProperty.call(t,r)&&(u[r]=t[r]);return u},writable:!0,configurable:!0});CETreeNode.prototype.dispose=function(){events.remove(this.divText,"click",this,this.domNodeClick);events.remove(this.tdimg,"click",this,this.expandClick);rp.dispose(this.domNode);this.containerNode=null;this.icon=null;this.tdimg=null;this.tdcb=null;this.divText=null;this.domNode=null;this.items=null;delete ui[this.id]};CETreeNode.prototype.setExpand=function(n){this.items&&(this.containerNode.style.display=n?"block":"none",this.icon.className="fa fa-folder"+(n?"-open":"")+"-o",this.isExpand=n)};CETreeNode.prototype.setCheck=function(n){utils.setClass(this.divText,this.classname+"_partchecked",n===1);utils.setClass(this.divText,this.classname+"_checked",n===2)};CETreeNode.prototype.show=function(n){this.domNode.style.display=n?"":"none"};CETreeNode.prototype.setBC=function(n){this.domNode.style.backgroundColor=n!==null?"#"+n:""};CETreeNode.prototype.add=function(n){var t;t=ui[n];this.items||(this.items=[],this.containerNode=window.document.createElement("div"),this.containerNode.className=this.classname+"_container",this.containerNode.style.display="none",this.isExpand=!1,this.domNode.appendChild(this.containerNode),this.icon.className="fa fa-folder-o");this.items.push(t);this.containerNode.appendChild(t.domNode)};CETreeNode.prototype.clear=function(){var n,t;if(this.items){for(n=0,t=this.items.length;n<t;++n)this.containerNode.removeChild(this.items[n].domNode);this.containerNode.parentNode.removeChild(this.containerNode);delete this.containerNode;delete this.items;this.icon.className="fa fa-file-text-o"}};CETreeNode.prototype.domNodeClick=function(){rp.call({id:this.id,cmd:"click"})};CETreeNode.prototype.expandClick=function(n,t){rp.call({id:this.id,cmd:"expand"});t.cancelBubble=!0};CETreeNode.prototype.cmds=[CETreeNode.prototype.dispose,CETreeNode.prototype.clear,CETreeNode.prototype.add,CETreeNode.prototype.setExpand,CETreeNode.prototype.setCheck,CETreeNode.prototype.show,CETreeNode.prototype.setBC];CETreeView.prototype.dispose=function(){rp.dispose(this.domNode);this.divHeaders=null;this.containerNode=null;this.domNode=null;this.items=null;delete ui[this.id]};CETreeView.prototype.add=function(n){var t;t=ui[n];this.items.push(t);this.containerNode.appendChild(t.domNode)};CETreeView.prototype.clear=function(){for(var n=0,t=this.items.length;n<t;++n)this.containerNode.removeChild(this.items[n].domNode);this.items=[]};CETreeView.prototype.setHeaders=function(n){var t,i,r;if(n&&n.length){for(t=[],t.push("<table><tbody><tr>"),i=0,r=n.length;i<r;++i)t.push('<td class="td'),t.push(i),t.push('">'),t.push(utils.htmlEncode(n[i])),t.push("<\/td>");t.push("<\/tr><\/tbody><\/table>");this.divHeaders.innerHTML=t.join("")}else this.divHeaders.innerHTML=""};CETreeView.prototype.cmds=[CETreeView.prototype.dispose,CETreeView.prototype.clear,CETreeView.prototype.add,CETreeView.prototype.setHeaders];CEVMLTile.prototype.maxZoom=21;CEVMLTile.prototype.minZoom=0;CEVMLTile.prototype.getTile=function(n,t,i){var r,u,f,e;return e=n.x&(1<<t)-1,r=i.createElement("div"),r.className="cevmltile",r.cepolys=[],this.divs.push(r),u=rp.makeXMLRequest(),f=this,u.open("POST","/map/vml",!0),u.onreadystatechange=function(){f.vmlReqChange(r,u)},u.setRequestHeader("Content-type","application/x-www-form-urlencoded"),u.send("sid="+rp.sessionid+"&wid="+rp.windowid+"&id="+this.map.id+"&oid="+this.overlayid+"&x="+e+"&y="+n.y+"&z="+t),r};CEVMLTile.prototype.vmlReqChange=function(div,req){var data,i,len,poly,vml,hover;if(req.readyState===4&&req.status===200&&req.responseText.length>=3)try{for(data=window.JSON&&window.JSON.parse?window.JSON.parse(req.responseText):eval(req.responseText),vml="",i=0,len=data.length;i<len;i+=2)hover=data[i]===this.hoverId,vml+='<v:shape ceid="'+data[i]+'" path="'+data[i+1]+'" coordsize="1 1" style="position:absolute;width:1px;height:1px;display:block" fillcolor="#FFF4CA"><v:fill opacity="'+(hover?"0.5":"0")+'"/><v:stroke on="false"/><\/v:shape>';for(div.insertAdjacentHTML("beforeEnd",vml),poly=div.firstChild;poly!==null;)poly.onmouseover=this.mouseover,poly.onmouseout=this.mouseout,div.cepolys.push(poly),poly=poly.nextSibling}catch(ignore){}};CEVMLTile.prototype.releaseTile=function(n){var t=utils.indexOf(this.divs,n);this.divs.splice(t,1)};CEVMLTile.prototype.polyMouseOver=function(n){this.setHoverId(n.ceid)};CEVMLTile.prototype.polyMouseOut=function(){this.setHoverId(null)};CEVMLTile.prototype.setPolyHover=function(n,t){n.fill.opacity=t?"0.5":"0"};CEVMLTile.prototype.setHoverId=function(n){var t,i,r,u;if(this.hoverId!==null)for(t=this.divs.length-1;t>=0;--t)for(r=this.divs[t],i=r.cepolys.length-1;i>=0;--i)u=r.cepolys[i],u.ceid===this.hoverId&&this.setPolyHover(u,!1);if(this.hoverId=n,this.hoverId!==null)for(t=this.divs.length-1;t>=0;--t)for(r=this.divs[t],i=r.cepolys.length-1;i>=0;--i)u=r.cepolys[i],u.ceid===this.hoverId&&this.setPolyHover(u,!0);events.post(this,"hover",n)};CEWizard.prototype.dispose=function(){events.remove(this.btnPrev,"click",this,this.btnPrevClick);events.remove(this.btnNext,"click",this,this.btnNextClick);events.remove(this.btnFinish,"click",this,this.btnFinishClick);rp.dispose(this.domNode);this.divTitle=null;this.divDesc=null;this.divImage=null;this.divHeader=null;this.divBody=null;this.btnPrev=null;this.btnNext=null;this.btnFinish=null;this.divFooter=null;this.domNode=null;this.page=null;delete ui[this.id]};CEWizard.prototype.setPage=function(n,t){var u,i,r;this.page&&this.divBody.removeChild(ui[this.page.options.control].domNode);i=ui[n];this.page=i;this.divTitle.innerHTML=i.options.title;i.options.desc&&(this.divDesc.innerHTML=i.options.desc);i.options.image&&(this.divImage.style.backgroundImage="url("+i.options.image+")");this.divImage.style.display=i.options.image?"":"none";this.divBody.appendChild(ui[i.options.control].domNode);utils.setClass(this.divTitle,"no-desc",!i.options.desc||i.options.desc.length===0);u=8;r=(t&4)>0;this.btnFinish.style.right=u.toString()+"px";this.btnFinish.style.display=r?"":"none";r&&(u+=this.btnFinish.offsetWidth+8);r=(t&2)>0;this.btnNext.style.right=u.toString()+"px";this.btnNext.style.display=r?"":"none";r&&(u+=this.btnNext.offsetWidth+8);r=(t&1)>0;this.btnPrev.style.right=u.toString()+"px";this.btnPrev.style.display=r?"":"none";r&&(u+=this.btnPrev.offsetWidth+8)};CEWizard.prototype.btnPrevClick=function(){rp.call({id:this.page.options.id,cmd:"prev"})};CEWizard.prototype.btnNextClick=function(){rp.call({id:this.page.options.id,cmd:"next"})};CEWizard.prototype.btnFinishClick=function(){rp.call({id:this.page.options.id,cmd:"finish"})};CEWizard.prototype.cmds=[CEWizard.prototype.dispose,CEWizard.prototype.setPage];CEWizardPage.prototype.dispose=function(){delete ui[this.options.id]};CEWizardPage.prototype.cmds=[CEWizardPage.prototype.dispose];CEBusinessCardTextField.prototype.dispose=function(){events.remove(this.editor,"keyup",this,this.editorChange);events.remove(this.editor,"mouseup",this,this.editorChange)};CEBusinessCardTextField.prototype.clear=function(){this.value="";this.editor.value="";this.changed=!1};CEBusinessCardTextField.prototype.setValue=function(n){this.value=n||"";this.editor.value=this.value;this.changed=!1};CEBusinessCardTextField.prototype.focus=function(){utils.setFocus(this.editor)};CEBusinessCardTextField.prototype.revert=function(){this.editor.value=this.value};CEBusinessCardTextField.prototype.getValue=function(){return this.editor.value};CEBusinessCardTextField.prototype.editorChange=function(){var n;n=this.editor.value!==this.value;n!==this.changed&&(this.changed=n,events.trigger(this,"changed",null))};CEBusinessCardCheckField.prototype.dispose=function(){events.remove(this.divEditor,"click",this,this.click)};CEBusinessCardCheckField.prototype.clear=function(){this.setValue("")};CEBusinessCardCheckField.prototype.setValue=function(n){this.value=n;this.editorValue=n;this.updateDivs();this.changed=!1};CEBusinessCardCheckField.prototype.focus=function(){};CEBusinessCardCheckField.prototype.revert=function(){this.editorValue=this.value;this.updateDivs();this.changed=!1};CEBusinessCardCheckField.prototype.getValue=function(){return this.editorValue};CEBusinessCardCheckField.prototype.click=function(n,t){var i,r;i=t.target;i===this.divNone&&(this.editorValue="");i===this.divYes&&(this.editorValue="1");i===this.divNo&&(this.editorValue="0");this.updateDivs();r=this.editorValue!==this.value;r!==this.changed&&(this.changed=r,events.trigger(this,"changed",null))};CEBusinessCardCheckField.prototype.updateDivs=function(){utils.setClass(this.divNone,"checked",this.editorValue==="");utils.setClass(this.divYes,"checked",this.editorValue==="1");utils.setClass(this.divNo,"checked",this.editorValue==="0")};CEBusinessCardTextField.prototype.dispose=function(){events.remove(this.editor,"keyup",this,this.editorChange);events.remove(this.editor,"mouseup",this,this.editorChange)};CEBusinessCardDateField.prototype.clear=function(){this.value="";this.editor.value="";this.changed=!1};CEBusinessCardDateField.prototype.setValue=function(n){this.value=n?utils.fmtDate(window.parseInt(n,10)):"";this.editor.value=this.value;this.changed=!1};CEBusinessCardDateField.prototype.focus=function(){utils.setFocus(this.editor)};CEBusinessCardDateField.prototype.revert=function(){this.editor.value=this.value};CEBusinessCardDateField.prototype.getValue=function(){return utils.parseDate(this.editor.value)};CEBusinessCardDateField.prototype.editorChange=function(){var n;n=this.editor.value!==this.value;n!==this.changed&&(this.changed=n,events.trigger(this,"changed",null))};CEBusinessCardDropDownField.prototype.dispose=function(){events.remove(this.divArrow,"click",this,this.arrowClick);events.remove(this.editor,"keyup",this,this.editorChange);events.remove(this.editor,"mouseup",this,this.editorChange);events.remove(this.editor,"focus",this,this.editorFocus);events.remove(this.editor,"blur",this,this.editorBlur);events.remove(this.divList,rp.iever<10?"focusin":"focus",this,this.listFocus);events.remove(this.divList,rp.iever<10?"focusout":"blur",this,this.listBlur);events.remove(this.divList,"click",this,this.listClick);events.remove(this,"search",this,this.search);events.remove(this,"focus",this,this.focus)};CEBusinessCardDropDownField.prototype.clear=function(){this.oldvalue="";this.newvalue="";this.editor.value="";this.editorvalue="";this.changed=!1};CEBusinessCardDropDownField.prototype.setValue=function(n){var t;if(this.oldvalue=n,this.newvalue=n,t=this.keyValues[n],t!==undefined){this.editor.value=t;this.editorvalue=t;this.changed=!1;return}this.editor.value=n;this.editorvalue=n;this.changed=!1};CEBusinessCardDropDownField.prototype.focus=function(){utils.setFocus(this.editor)};CEBusinessCardDropDownField.prototype.setKeyValues=function(n){var t,r,i;for(this.clearKeyValues(),this.divItems={},this.keyValues={},r=n.items.length,t=0;t<r;++t)i=window.document.createElement("div"),i.cekey=n.items[t].k,i.innerHTML=utils.htmlEncode(n.items[t].v),i.className="listitem",this.divList.appendChild(i),this.keyValues[n.items[t].k]=n.items[t].v,this.divItems[n.items[t].k]=i;this.changed=!1};CEBusinessCardDropDownField.prototype.setKeyValues2=function(n){var t,r,i;for(this.clearKeyValues(),this.divItems={},this.keyValues={},r=n.length,t=0;t<r;t+=2)i=window.document.createElement("div"),i.cekey=n[t],i.innerHTML=utils.htmlEncode(n[t+1]),i.className="listitem",this.divList.appendChild(i),this.keyValues[n[t]]=n[t+1],this.divItems[n[t]]=i;this.changed=!1};CEBusinessCardDropDownField.prototype.clearKeyValues=function(){this.divItems&&(this.divItems=null,this.divList.innerHTML="",this.divItem=null)};CEBusinessCardDropDownField.prototype.revert=function(){this.newvalue=this.oldvalue;this.editor.value=this.keyvalues[this.oldvalue];this.editorvalue=this.editor.value};CEBusinessCardDropDownField.prototype.getValue=function(){return this.newvalue};CEBusinessCardDropDownField.prototype.editorChange=function(){events.post(this,"search",null)};CEBusinessCardDropDownField.prototype.search=function(){var n,i,t;if(this.editor.value!==this.editorvalue)if(this.editorvalue=this.editor.value,i=this.editor.value.toLowerCase(),i!=="")for(n in this.divItems)this.divItems.hasOwnProperty(n)&&(t=this.divItems[n],t.style.display=this.keyValues[n].toLowerCase().indexOf(i)<0?"none":"");else for(n in this.divItems)this.divItems.hasOwnProperty(n)&&(t=this.divItems[n],t.style.display="")};CEBusinessCardDropDownField.prototype.arrowClick=function(){this.editor.focus()};CEBusinessCardDropDownField.prototype.editorFocus=function(){this.focusCount++;this.postFocus()};CEBusinessCardDropDownField.prototype.editorBlur=function(){this.focusCount--;this.postFocus()};CEBusinessCardDropDownField.prototype.listFocus=function(){this.focusCount++;this.postFocus()};CEBusinessCardDropDownField.prototype.listBlur=function(){this.focusCount--;this.postFocus()};CEBusinessCardDropDownField.prototype.postFocus=function(){this.focusPending||(this.focusPending=!0,events.post(this,"focus",null))};CEBusinessCardDropDownField.prototype.focus=function(){this.focusCount===1?this.showList():this.focusCount===0&&this.hideList();this.focusPending=!1};CEBusinessCardDropDownField.prototype.listClick=function(n,t){var u,i,r;(u=t.target,i=u.cekey,i!==undefined)&&(this.newvalue=i,this.hideList(),r=this.newvalue!==this.oldvalue,r!==this.changed&&(this.changed=r,events.trigger(this,"changed",null)))};CEBusinessCardDropDownField.prototype.hideList=function(){this.divList.parentNode&&this.divList.parentNode.removeChild(this.divList);rp.iever<=8&&events.remove(rp,"resize",this,this.onresize);this.divList.style.display="";this.listVisible=!1;this.editor.value=this.keyValues.hasOwnProperty(this.newvalue)?this.keyValues[this.newvalue]:"";this.editorvalue=this.editor.value;this.focusCount=0};CEBusinessCardDropDownField.prototype.showList=function(){var n,t;if(!this.listVisible){this.divItem&&(utils.setClass(this.divItem,"listitemselect",!1),this.divItem=null);for(n in this.divItems)this.divItems.hasOwnProperty(n)&&(t=this.divItems[n],t.style.display="");this.divEditor.appendChild(this.divList);this.divList.style.display="block";this.divItems.hasOwnProperty(this.newvalue)&&(this.divItem=this.divItems[this.newvalue],utils.setClass(this.divItem,"listitemselect",!0),this.divList.scrollTop=this.divItem.offsetTop);this.listVisible=!0}};CEBusinessCardDropDownField.prototype.onresize=function(){this.setListPosition()};CEBusinessCardDropDownField.prototype.setListPosition=function(){var n;n=utils.getAbsPosition(this.divEditor);this.divList.style.left=n.x-2+"px";this.divList.style.top=n.y+this.divEditor.offsetHeight+"px";this.divList.style.width=this.divEditor.offsetWidth+"px"};CEBusinessCard.prototype.dispose=function(){events.remove(this.divSave,"click",this,this.saveClick);events.remove(this.divCancel,"click",this,this.cancelClick);events.remove(this.divDelete,"click",this,this.deleteClick);rp.dispose(this.domNode);this.domNode=null;this.divCaption=null;this.divHeader=null;this.divBody=null;delete ui[this.id]};CEBusinessCard.prototype.domClick=function(){};CEBusinessCard.prototype.setNone=function(){this.state=0;this.data=null;this.divBody.firstChild&&this.divBody.removeChild(this.divBody.firstChild);this.divEmpty||this.makeEmpty();this.divEmpty.innerHTML="Select a business to view or update";this.divBody.appendChild(this.divEmpty);this.changeCount=0;this.updateBtns()};CEBusinessCard.prototype.setFields=function(n){this.fields=n};CEBusinessCard.prototype.setData=function(n,t){this.state=1;this.canedit=n;this.data=t;this.numviews=0;this.divBody.firstChild&&this.divBody.removeChild(this.divBody.firstChild);this.divEditor||(this.divEditor=window.document.createElement("div"));this.divEditor.innerHTML="";this.makeConflictHeader();this.makeViewers();this.divBody.appendChild(this.divEditor);this.changeCount=0;this.updateBtns()};CEBusinessCard.prototype.setNew=function(){this.state=2;this.canedit=!0;this.numviews=0;this.data=[];this.data[0]=this.newData(0);this.data[1]=[];this.data[2]=[];this.divBody.firstChild&&this.divBody.removeChild(this.divBody.firstChild);this.divEditor||(this.divEditor=window.document.createElement("div"));this.divEditor.innerHTML="";this.makeViewers();this.divBody.appendChild(this.divEditor);this.changeCount=0;this.updateBtns()};CEBusinessCard.prototype.setDeleted=function(n){this.state=3;this.data=null;this.divBody.firstChild&&this.divBody.removeChild(this.divBody.firstChild);this.divEmpty||(this.divEmpty=this.makeEmpty());this.divEmpty.innerHTML=utils.htmlEncode(n);this.divBody.appendChild(this.divEmpty);this.changeCount=0;this.updateBtns()};CEBusinessCard.prototype.newData=function(n){for(var i=new Array(this.fields[n].length),t=this.fields[n].length-1;t>=0;--t)i[t]=[this.fields[n][t][4]];return i};CEBusinessCard.prototype.makeEmpty=function(){this.divEmpty=window.document.createElement("div");this.divEmpty.className="empty"};CEBusinessCard.prototype.makeClear=function(){var n;return n=window.document.createElement("div"),n.className="clear",n};CEBusinessCard.prototype.dataHasConflicts=function(n){for(var t=0;t<n.length;t++)if(n[t].length>1)return!0;return!1};CEBusinessCard.prototype.makeConflictHeader=function(){for(var i,t=this.dataHasConflicts(this.data[0]),n=0;n<this.data[1].length;n++)t=t||this.dataHasConflicts(this.data[1][n]);for(n=0;n<this.data[2].length;n++)t=t||this.dataHasConflicts(this.data[2][n]);t&&(i=window.document.createElement("div"),i.className="conflicthdr",i.innerHTML="<p>Following your upload of ABR data some conflicts need to be resolved.  Resolve each conflict by selecting data based on:<\/p><table><tr><td><div class='conflict0'><input type='radio' name='"+this.id+"_ch'/><\/div><\/td><td>Your latest ABR upload<\/td><\/tr><tr><td><div class='conflict1'><input type='radio' name='"+this.id+"_ch'/><\/div><\/td><td>A previous edit by you or a colleague<\/td><\/tr><tr><td><div class='conflict2'><input type='radio' name='"+this.id+"_ch'/><\/div><\/td><td>Your older ARR upload<\/td><\/tr><\/table><p>Once all conflicts are resolved press Save.<\/p>",this.divEditor.appendChild(i))};CEBusinessCard.prototype.makeViewers=function(){var i,u,n,r,t,f;for(n=window.document.createElement("h2"),n.innerHTML="Business",this.divEditor.appendChild(n),this.basic=this.makeView("col","Basic Details",1,this.fields[0],this.data[0],!1),this.divEditor.appendChild(this.basic.div),this.custom=this.makeView("col","Custom",6,this.fields[0],this.data[0],!1),this.divEditor.appendChild(this.custom.div),this.divEditor.appendChild(this.makeClear()),this.tradingaddress=this.makeView("col","Address (Trading Location)",2,this.fields[0],this.data[0],!1),this.divEditor.appendChild(this.tradingaddress.div),this.postaladdress=this.makeView("col","Address (Postal)",3,this.fields[0],this.data[0],!1),this.divEditor.appendChild(this.postaladdress.div),this.divEditor.appendChild(this.makeClear()),this.socialmedia=this.makeView("col","Internet and Social Media",4,this.fields[0],this.data[0],!1),this.divEditor.appendChild(this.socialmedia.div),this.phone=this.makeView("col","Phone",5,this.fields[0],this.data[0],!1),this.divEditor.appendChild(this.phone.div),this.divEditor.appendChild(this.makeClear()),t=window.document.createElement("div"),t.className="col",n=window.document.createElement("h2"),n.innerHTML="Contacts",t.appendChild(n),r=utils.createButton("New Contact",null,"cebtn_right","fa-plus-circle"),r.disabled=!this.canedit,n.appendChild(r),this.canedit&&events.add(r,"click",this,this.newContactClick),this.divContacts=window.document.createElement("div"),this.contacts=[],i=0,f=this.data[1].length;i<f;++i)u=this.makeView("","Contact",7,this.fields[1],this.data[1][i],!1),this.contacts.push(u),this.divContacts.appendChild(u.div);for(t.appendChild(this.divContacts),this.divEditor.appendChild(t),t=window.document.createElement("div"),t.className="col",n=window.document.createElement("h2"),n.innerHTML="Notes",t.appendChild(n),r=utils.createButton("New Note",null,"cebtn_right","fa-plus-circle"),r.disabled=!this.canedit,n.appendChild(r),this.canedit&&events.add(r,"click",this,this.newNoteClick),this.divNotes=window.document.createElement("div"),this.notes=[],i=this.data[2].length-1;i>=0;--i)u=this.makeView("","Note",8,this.fields[2],this.data[2][i],!1),this.notes.push(u),this.divNotes.appendChild(u.div);t.appendChild(this.divNotes);this.divEditor.appendChild(t);this.divEditor.appendChild(this.makeClear())};CEBusinessCard.prototype.makeView=function(n,t,i,r,u,f){var s,e,o;for(e={data:u,group:i,num:this.numviews++},e.fields=[],s=r.length-1;s>=0;--s)o=r[s],o[0]===i&&(o=o.slice(),o.index=s,e.fields.push(o));return e.fields.sort(function(n,t){return n[1]-t[1]}),e.div=window.document.createElement("div"),e.div.className=n,e.divView=window.document.createElement("div"),e.divView.className="view",e.divHeading=window.document.createElement("div"),e.divHeading.className="heading",e.divHeading.innerHTML=t,e.divEdit=utils.createButton("Edit",null,"right","fa-pencil"),e.divEdit.disabled=!this.canedit,e.divEdit.ceview=e,e.divClose=utils.createButton("Close",null,"right"),e.divClose.ceview=e,e.divBody=window.document.createElement("div"),e.divBody.className="detail1",e.divView.appendChild(e.divHeading),e.divHeading.appendChild(e.divEdit),e.divHeading.appendChild(e.divClose),e.divView.appendChild(e.divBody),e.div.appendChild(e.divView),events.add(e.divEdit,"click",this,this.viewEditClick),events.add(e.divClose,"click",this,this.viewCloseClick),this.showView(e,f),e};CEBusinessCard.prototype.newContactClick=function(){var n,t;n=this.newData(1);this.data[1].push(n);t=this.makeView("","New Contact",7,this.fields[1],n,!0);this.contacts.push(t);this.divContacts.insertBefore(t.div,this.divContacts.firstChild)};CEBusinessCard.prototype.newNoteClick=function(){var n,t;n=this.newData(2);this.data[2].push(n);t=this.makeView("","New Note",8,this.fields[2],n,!0);this.notes.push(t);this.divNotes.insertBefore(t.div,this.divNotes.firstChild)};CEBusinessCard.prototype.showView=function(n,t){for(var o,r,s,u,h,l,f,i,a,c=!1,e=0;e<n.fields.length;e++)r=n.fields[e],u=n.data[r.index],c=c||u.length>1;if(n.divEdit.style.display=this.state===1&&!t&&!c?"":"none",n.divClose.style.display=this.state===1&&t&&!c?"":"none",n.divBody.innerHTML="",n.edits=null,c||t||this.state===2){for(utils.setClass(n.divView,"bamconflict",!1),o=window.document.createElement("table"),o.className="edit",n.edits=[],e=0;e<n.fields.length;e++)if(r=n.fields[e],h=this.makeEditor(r),h){for(u=n.data[r.index],h.setValue(u[0]),events.add(h,"changed",this,this.editorChanged),r.editors=[],r.editors.push(h),n.edits.push(h),s=1;s<u.length;s++)h=this.makeEditor(r),h.setValue(u[s]),events.add(h,"changed",this,this.editorChanged),r.editors.push(h),n.edits.push(h);if(u.length>1){for(f=o.insertRow(-1),f.className="bamspace",s=0;s<u.length;s++)f=o.insertRow(-1),f.className="bamconflict",s===0&&(i=f.insertCell(-1),i.rowSpan=u.length,i.className="name",i.innerHTML=utils.htmlEncode(r[2])),i=f.insertCell(-1),i.className="radio",a=window.document.createElement("div"),a.className="conflict"+s,l=window.document.createElement("input"),l.type="radio",l.name=this.id+"_"+n.num+"_"+e,r.editors[s].radio=l,a.appendChild(l),i.appendChild(a),events.add(l,"click",this,this.editorChanged),i=f.insertCell(-1),i.className="value",i.appendChild(r.editors[s].divEditor);u.index!==undefined&&(r.editors[u.index].radio.checked=!0)}u.length===1&&(f=o.insertRow(-1),i=f.insertCell(-1),i.className="name",i.innerHTML=utils.htmlEncode(r[2]),i=f.insertCell(-1),i.className="radio",i=f.insertCell(-1),i.className="value",i.appendChild(r.editors[0].divEditor))}n.divBody.appendChild(o);n.edits[0].focus()}else{for(utils.setClass(n.divView,"bamconflict",c),o=window.document.createElement("table"),o.className="view",e=0;e<n.fields.length;e++)(r=n.fields[e],r.editors=null,u=this.getFieldValue(n,r),u!==null&&u.length!==0)&&(f=o.insertRow(-1),i=f.insertCell(-1),i.className="name",i.innerHTML=utils.htmlEncode(r[2]),i=f.insertCell(-1),i.className="value",i.innerHTML=this.fmtField(r,u));o.rows.length>0?n.divBody.appendChild(o):n.divBody.innerHTML="<i>No data entered<\/i>"}};CEBusinessCard.prototype.viewEditClick=function(n){this.showView(n.ceview,!0)};CEBusinessCard.prototype.viewCloseClick=function(n){this.copyFromEditors(n.ceview);this.showView(n.ceview,!1)};CEBusinessCard.prototype.getFieldValue=function(n,t){var i,u,f,r;i=n.data[t.index];r=i.length>1?i.index!==undefined?i.index:1:0;switch(t[3]){case 1:return null;case 3:return u=i[r],f=this.anzsicCodes.getValue(u),f!==null?f:u;case 4:return u=i[r],f=this.entityTypes.getValue(u),f!==null?f:u;case 6:return i[r]==="1"?t[6][0]:i[r]==="0"?t[6][1]:"";case 8:return this.getComboValue(t,i[r]);case 9:return utils.fmtDate(window.parseInt(i[r],10))}return i[r]};CEBusinessCard.prototype.getComboValue=function(n,t){for(var i=0;i<n[6].length;i+=2)if(t===n[6][i])return n[6][i+1];return null};CEBusinessCard.prototype.makeEditor=function(n){var t=null;switch(n[3]){case 2:t=new CEBusinessCardTextField;break;case 3:t=new CEBusinessCardDropDownField;t.setKeyValues(this.anzsicCodes);break;case 4:t=new CEBusinessCardDropDownField;t.setKeyValues(this.entityTypes);break;case 5:t=new CEBusinessCardTextAreaField(n[6][0],n[6][1]);break;case 6:t=new CEBusinessCardCheckField(n[6]);break;case 7:t=new CEBusinessCardTextField;break;case 8:t=new CEBusinessCardDropDownField;t.setKeyValues2(n[6]);break;case 9:t=new CEBusinessCardDateField}return t};CEBusinessCard.prototype.fmtField=function(n,t){var i;switch(n[5]){case 1:return"<a href='mailto:"+window.encodeURIComponent(t)+"'>"+utils.htmlEncode(t)+"<\/a>";case 2:return i=new URI(t,"http:"),"<a target='_blank' href='"+i.toString()+"'>"+utils.htmlEncode(t)+"<\/a>"}return utils.htmlEncode(t)};CEBusinessCard.prototype.copyFromEditors=function(n){var r,i,t,u,f;if(n.edits)for(r=n.fields.length-1;r>=0;--r)if(i=n.fields[r],i.editors)for(t=i.editors.length-1;t>=0;--t)f=n.data[i.index],u=i.editors[t],u.radio&&u.radio.checked&&(f.index=t),f[t]=u.getValue()};CEBusinessCard.prototype.editorChanged=function(){this.changeCount++;this.changeCount===1&&rp.call({id:this.id,cmd:"dirty"});this.updateBtns()};CEBusinessCard.prototype.setANZSICs=function(n){this.anzsicCodes=ui[n]};CEBusinessCard.prototype.setEntityTypes=function(n){this.entityTypes=ui[n]};CEBusinessCard.prototype.getData=function(){var n,t;for(this.copyFromEditors(this.basic),this.copyFromEditors(this.socialmedia),this.copyFromEditors(this.tradingaddress),this.copyFromEditors(this.postaladdress),this.copyFromEditors(this.custom),this.copyFromEditors(this.phone),n=this.contacts.length-1;n>=0;--n)this.copyFromEditors(this.contacts[n]);for(n=this.notes.length-1;n>=0;--n)this.copyFromEditors(this.notes[n]);for(t={},t.business=this.flattenData(this.data[0]),t.contacts=new Array(this.data[1].length),n=this.data[1].length-1;n>=0;--n)t.contacts[n]=this.flattenData(this.data[1][n]);for(t.notes=new Array(this.data[2].length),n=this.data[2].length-1;n>=0;--n)t.notes[n]=this.flattenData(this.data[2][n]);rp.call({cmd:"data",id:this.id,data:window.JSON.stringify(t)})};CEBusinessCard.prototype.flattenData=function(n){for(var i=new Array(n.length),t=n.length-1;t>=0;--t)i[t]=n[t].length===1?n[t][0]:n[t].index!==undefined?n[t][n[t].index]:null;return i};CEBusinessCard.prototype.updateBtns=function(){this.divDelete.style.display=this.state===1?"":"none";this.divRestore.style.display=this.state===3?"":"none";this.divCancel.style.display=(this.state===1||this.state===2)&&this.changeCount>0?"":"none";this.divSave.style.display=(this.state===1||this.state===2)&&this.changeCount>0?"":"none";rp.iever>=8&&(this.changeCount===1?this.modal=rp.startModal(this.domNode,!1):this.changeCount===0&&this.modal&&(rp.endModal(this.modal),delete this.modal))};CEBusinessCard.prototype.saveClick=function(){this.getData();rp.call({cmd:"save",id:this.id})};CEBusinessCard.prototype.cancelClick=function(){rp.call({cmd:"cancel",id:this.id})};CEBusinessCard.prototype.deleteClick=function(){rp.call({cmd:"delete",id:this.id})};CEBusinessCard.prototype.restoreClick=function(){rp.call({cmd:"restore",id:this.id})};CEBusinessCard.prototype.cmds=[CEBusinessCard.prototype.dispose,CEBusinessCard.prototype.setANZSICs,CEBusinessCard.prototype.setEntityTypes,CEBusinessCard.prototype.setFields,CEBusinessCard.prototype.setNone,CEBusinessCard.prototype.setNew,CEBusinessCard.prototype.setData,CEBusinessCard.prototype.setDeleted,CEBusinessCard.prototype.getData];CEBusinessCardLabelField.prototype.clear=function(){this.editor.innerHTML=""};CEBusinessCardLabelField.prototype.setValue=function(n){this.editor.innerHTML=utils.htmlEncode(n)};CEBusinessCardTextAreaField.prototype.dispose=function(){events.remove(this.editor,"keyup",this,this.editorChange);events.remove(this.editor,"mouseup",this,this.editorChange)};CEBusinessCardTextAreaField.prototype.clear=function(){this.value="";this.editor.value="";this.changed=!1};CEBusinessCardTextAreaField.prototype.setValue=function(n){this.value=n||"";this.editor.value=this.value;this.changed=!1};CEBusinessCardTextAreaField.prototype.focus=function(){utils.setFocus(this.editor)};CEBusinessCardTextAreaField.prototype.revert=function(){this.editor.value=this.value};CEBusinessCardTextAreaField.prototype.getValue=function(){return this.editor.value};CEBusinessCardTextAreaField.prototype.editorChange=function(){var n;n=this.editor.value!==this.value;n!==this.changed&&(this.changed=n,events.trigger(this,"changed",null))};CEBusinessList.prototype.dispose=function(){var n;for(events.remove(rp,"resize",this,this.resize),events.remove(this.domNode,"click",this,this.domClick),events.remove(this.divFirst,"click",this,this.firstClick),events.remove(this.divPrev,"click",this,this.prevClick),events.remove(this.divNext,"click",this,this.nextClick),events.remove(this.divLast,"click",this,this.lastClick),events.remove(this.divVertSB,"scroll",this,this.vertSBScroll),events.remove(this.divBody,"touchstart",this,this.bodyTouchStart),events.remove(this.divBody,"scroll",this,this.bodyScroll),events.remove(this.divHeader,"scroll",this,this.headerScroll),events.remove(this.divBody,"mousewheel",this,this.bodyMouseWheel),events.remove(this.divBody,"keydown",this,this.bodyKeyDown),events.remove(this.divExport,"click",this,this.exportClick),events.remove(this.divIncludeDeleted,"click",this,this.includeDeletedClick),events.remove(this.divResetFilter,"click",this,this.resetFilterClick),this.setHeaders(null),n=this.rows.length-1;n>=0;--n)events.remove(this.rows[n].domNode,"click",this,this.rowClick);rp.dispose(this.domNode);this.domNode=null;this.divCaption=null;this.divHeader=null;this.divBody=null;this.divVertSB=null;this.divVertSBContent=null;this.divPad=null;delete ui[this.id]};CEBusinessList.prototype.setHeaders=function(n){var i,t,r;if(this.header){for(i=this.header.numcols-1;i>=0;--i)t=this.header.cols[i],events.remove(t.input,"keyup",this,this.inputChange),events.remove(t.input,"mouseup",this,this.inputChange),events.remove(t.divtitle,"click",this,this.colClick);this.header=null;this.divHeader.innerHTML=""}if(n){for(this.divLabel.innerHTML='<i class="icon icon-table"><\/i> '+n.title,this.header=n,this.header.numcols=this.header.cols.length,r=0,i=0;i<this.header.numcols;i++)t=this.header.cols[i],t.data="",t.div=window.document.createElement("div"),t.div.className="col",t.div.cecolid=t.id,t.divtitle=window.document.createElement("div"),t.divtitle.className="title",t.divSort=window.document.createElement("i"),t.divSort.className="fa",t.divtitle.appendChild(t.divSort),t.divtitle.appendChild(window.document.createTextNode(" "+t.n)),t.divtitle.cecolid=t.id,t.div.appendChild(t.divtitle),t.input=window.document.createElement("input"),t.input.cecol=t,t.input.style.width=t.w-10+"px",t.div.style.left=r+"px",t.div.style.width=n.cols[i].w+"px",t.div.appendChild(t.input),t.l=r,r+=t.w,events.add(t.input,"keyup",this,this.inputChange),events.add(t.input,"mouseup",this,this.inputChange),events.add(t.divtitle,"click",this,this.colClick),this.divHeader.appendChild(t.div);this.header.w=r;this.divPad.style.width=r+"px"}};CEBusinessList.prototype.setFilter=function(n){var i,t,r;for(this.data.sortid=n.si,this.pending.sortid=n.si,this.data.sortorder=n.sd,this.pending.sortorder=n.sd,i=this.header.numcols-1;i>=0;--i)t=this.header.cols[i],r="f"+t.id,t.data=n.hasOwnProperty(r)?n[r]:"",t.input.value=t.data,t.id===n.si&&(utils.setClass(t.divSort,"fa-sort-alpha-asc",n.sd>0),utils.setClass(t.divSort,"fa-sort-alpha-desc",n.sd<0)),utils.setClass(t.div,"sorted",t.id===n.si)};CEBusinessList.prototype.parseFilter=function(n,t){this.textColParser.parse(t);n.input.style.backgroundColor=this.textColParser.error!==null?"#FFAAAA":this.textColParser.ops>0?"#AAFFAA":""};CEBusinessList.prototype.setData=function(n){var t;for(this.pending.fetch=0,this.data.numItems=n.c,this.itemsPerPage=0,this.topIndex=0,this.ignoreVBScroll=0,this.vertSBHuge=this.data.numItems>=65536,this.vertSBScalar=this.vertSBHuge?65536*this.itemHeight/this.data.numItems:this.itemHeight,this.divVertSB.scrollTop=0,this.rowcache={},this.selectedIndex=n.i,t=this.rows.length-1;t>=0;--t)this.rows[t].domNode.style.display="none";this.divPad.style.display=""};CEBusinessList.prototype.invalidateRows=function(){this.repaintTimerId===null&&(this.repaintTimerId=events.setTimeout(this,this.repaint,0))};CEBusinessList.prototype.repaint=function(){var r,n,u,e,t,f,s,o,i,h;for(this.repaintTimerId=null,f=-1,o=0,r=0,n=this.topIndex;r<this.rows.length;){if(n>this.topIndex+this.itemsPerPage)break;if(n>=this.data.numItems)break;if(e=this.rowcache[n],e===undefined){f<0&&(f=n);s=n;n++;continue}for(i=e[0],h=e[1],n=i[2],t=this.rows[r],t.domNode.style.display="",t.domNode.style.top=(n-this.topIndex)*this.itemHeight+"px",t.domNode.style.height=this.itemHeight*i[3]+"px",o++,u=this.header.numcols-1;u>=0;--u)t.divCells[u].innerHTML=this.fmtData(this.header.cols[u],h[u]);t.rowNum=i[1];utils.setClass(t.domNode,"cebusinesslistrow_deleted",(i[0]&1)!=0);utils.setClass(t.domNode,"cebusinesslistrow_conflict",(i[0]&2)!=0);utils.setClass(t.domNode,"cebusinesslistrow_select",i[1]===this.selectedIndex);r++;n+=i[3]}while(r<this.rows.length)this.rows[r].domNode.style.display="none",r++;f>=0&&(this.pending.min=f,this.pending.count=s-f+1,this.pending.get=!0);this.divPad.style.display=o>0?"none":"";o===0&&this.divBody.appendChild(this.divPad);this.doPending()};CEBusinessList.prototype.fmtData=function(n,t){var i;switch(n.ct){case 1:return"<a href='mailto:"+window.encodeURIComponent(t)+"'>"+utils.htmlEncode(t)+"<\/a>";case 2:return i=new URI(t,"http:"),"<a target='_blank' href='"+i.toString()+"'>"+utils.htmlEncode(t)+"<\/a>"}return utils.htmlEncode(t)};CEBusinessList.prototype.setSelectedIndex=function(n){var t,i;for(this.selectedIndex=n,t=this.itemsPerPage;t>=0;--t)i=this.rows[t],utils.setClass(i.domNode,"cebusinesslistrow_select",i.rowNum===this.selectedIndex)};CEBusinessList.prototype.trimCache=function(n,t){var i,r={};for(i in this.rowcache)this.rowcache.hasOwnProperty(i)&&i>=n&&i<=t&&(r[i]=this.rowcache[i]);this.rowcache=r};CEBusinessList.prototype.doPending=function(){var n,t,i,r;if(!(this.pending.fetch>0)){for(i=!1,n=this.header.numcols-1;n>=0;--n)if(t=this.header.cols[n],t.input.value!==t.data){i=!0;break}if(i){for(this.data.sortid=this.pending.sortid,this.data.sortorder=this.pending.sortorder,this.pending.fetch=3,r={id:this.id,cmd:"filter",si:this.pending.sortid,sd:this.pending.sortorder},n=this.header.numcols-1;n>=0;--n)t=this.header.cols[n],t.data=t.input.value,r["f"+t.id]=t.data;rp.call(r);return}if(this.pending.sortid!==this.data.sortid||this.pending.sortorder!==this.data.sortorder){this.data.sortid=this.pending.sortid;this.data.sortorder=this.pending.sortorder;this.pending.fetch=2;rp.call({id:this.id,cmd:"sort",si:this.pending.sortid,sd:this.pending.sortorder});return}if(this.pending.get){this.pending.get=!1;this.pending.fetch=1;rp.call({id:this.id,cmd:"get",s:this.pending.min,c:this.pending.count});return}}};CEBusinessList.prototype.domClick=function(){};CEBusinessList.prototype.findColById=function(n){for(var i,t=this.header.numcols-1;t>=0;--t)if(i=this.header.cols[t],i.id===n)return i;return null};CEBusinessList.prototype.colClick=function(n){var t;n.cecolid===this.pending.sortid?(this.pending.sortorder=this.pending.sortorder===1?-1:1,t=this.findColById(n.cecolid),utils.setClass(t.divSort,"fa-sort-alpha-asc",this.pending.sortorder>0),utils.setClass(t.divSort,"fa-sort-alpha-desc",this.pending.sortorder<0)):(this.pending.sortid&&(t=this.findColById(this.pending.sortid),utils.setClass(t.div,"sorted",!1),utils.setClass(t.divSort,"fa-sort-alpha-asc",!1),utils.setClass(t.divSort,"fa-sort-alpha-desc",!1)),this.pending.sortid=n.cecolid,this.pending.sortorder=1,t=this.findColById(this.pending.sortid),utils.setClass(t.div,"sorted",!0),utils.setClass(t.divSort,"fa-sort-alpha-asc",!0));this.doPending()};CEBusinessList.prototype.rowClick=function(n){this.setSelectedIndex(n.cerow.rowNum);rp.call({id:this.id,cmd:"row",i:n.cerow.rowNum})};CEBusinessList.prototype.firstClick=function(){this.setTopIndex(0)};CEBusinessList.prototype.prevClick=function(){this.setTopIndex(this.topIndex-this.itemsPerPage)};CEBusinessList.prototype.nextClick=function(){this.setTopIndex(this.topIndex+this.itemsPerPage)};CEBusinessList.prototype.lastClick=function(){this.setTopIndex(this.data.numItems-this.itemsPerPage)};CEBusinessList.prototype.exportClick=function(){rp.call({cmd:"export",id:this.id})};CEBusinessList.prototype.resetFilterClick=function(){rp.call({cmd:"resetfilter",id:this.id})};CEBusinessList.prototype.includeDeletedClick=function(){utils.setClass(this.divIncludeDeleted,"checked",this.divIncludeDeleted.className.indexOf("checked")<0);rp.call({cmd:"showdeleted",id:this.id})};CEBusinessList.prototype.bodyScroll=function(){this.scrollLeft=this.divBody.scrollLeft;this.divHeader.scrollLeft=this.scrollLeft};CEBusinessList.prototype.headerScroll=function(){this.scrollLeft=this.divHeader.scrollLeft;this.divBody.scrollLeft=this.scrollLeft};CEBusinessList.prototype.bodyTouchStart=function(n,t){events.startTrackTouch(this,this.bodyTouchTrack,t)};CEBusinessList.prototype.bodyTouchTrack=function(n,t){switch(n){case 0:this.orgTopIndex=this.topIndex;this.orgScrollLeft=this.divBody.scrollLeft;this.orgx=t.touches[0].clientX;this.orgy=t.touches[0].clientY;break;case 1:this.orgMove=!0;this.setTopIndex(this.orgTopIndex+Math.floor((this.orgy-t.touches[0].clientY)/this.itemHeight));this.divBody.scrollLeft=this.orgScrollLeft+this.orgx-t.touches[0].clientX;t.preventDefault()}};CEBusinessList.prototype.bodyMouseWheel=function(n,t){var i;i=t.detail?t.detail*-120:t.wheelDelta;this.setTopIndex(this.topIndex-Math.ceil(i/this.itemHeight))};CEBusinessList.prototype.bodyKeyDown=function(n,t){switch(t.keyCode){case 36:this.setTopIndex(0);break;case 35:this.setTopIndex(this.data.numItems-this.itemsPerPage);break;case 33:this.setTopIndex(this.topIndex-this.itemsPerPage);break;case 34:this.setTopIndex(this.topIndex+this.itemsPerPage);break;case 38:this.setTopIndex(this.topIndex-1);break;case 40:this.setTopIndex(this.topIndex+1)}};CEBusinessList.prototype.vertSBScroll=function(){var n;n=Math.round(this.divVertSB.scrollTop/this.vertSBScalar);n=Math.min(this.data.numItems-this.itemsPerPage,n);n=Math.max(n,0);this.topIndex=n;this.invalidateRows()};CEBusinessList.prototype.setTopIndex=function(n){n=Math.min(this.data.numItems-this.itemsPerPage,n);n=Math.max(n,0);this.topIndex=n;this.ignoreVBScroll===0&&(this.divVertSB.scrollTop=Math.round(this.topIndex*this.vertSBScalar));this.invalidateRows()};CEBusinessList.prototype.inputChange=function(){this.keywordTimerId!==null&&events.stopTimer(this.keywordTimerId);this.keywordTimerId=events.setTimeout(this,this.keywordTimer,500)};CEBusinessList.prototype.keywordTimer=function(){this.keywordTimerId=null;this.doPending()};CEBusinessList.prototype.resize=function(){for(var n,t=Math.floor(this.divBody.clientHeight/this.itemHeight),i=this.rows.length;i<=t;i++)n=new CEBusinessListRow(this.header),n.domNode.style.display="none",events.add(n.domNode,"click",this,this.rowClick),this.rows.push(n),this.divBody.appendChild(n.domNode);t>this.itemsPerPage&&this.invalidateRows();this.itemsPerPage=t;this.divVertSBContent.style.height=(this.data.numItems-this.itemsPerPage)*this.vertSBScalar+this.divVertSB.clientHeight+"px";this.divHeader.style.right=this.divVertSB.offsetWidth-this.divVertSB.clientWidth+"px";this.divBody.style.right=this.divVertSB.offsetWidth-this.divVertSB.clientWidth+"px"};CEBusinessList.prototype.setItems=function(n){var t,i,r;for(this.pending.fetch=0,t=0,t=n.length-1;t>=0;--t)for(r=n[t][0],i=r[3]-1;i>=0;--i)this.rowcache[r[2]+i]=n[t];this.trimCache(this.topIndex-50,this.topIndex+this.itemsPerPage+50);this.repaint()};CEBusinessList.prototype.setNOP=function(){this.pending.fetch=0;this.doPending()};CEBusinessList.prototype.updateButtons=function(n){n=n||{};utils.setClass(this.divIncludeDeleted,"checked",!!n.showDeleted);var t=!!n.showFilters;this.divResetFilter.style.display=t?"":"none";this.divIncludeDeleted.style.display=t?"":"none"};CEBusinessList.prototype.cmds=[CEBusinessList.prototype.dispose,CEBusinessList.prototype.setData,CEBusinessList.prototype.setItems,CEBusinessList.prototype.setNOP,CEBusinessList.prototype.setFilter,CEBusinessList.prototype.updateItem,CEBusinessList.prototype.setHeaders,CEBusinessList.prototype.updateButtons];CEBusinessTextParser.prototype.eTokenType={none:0,or:1,and:2,not:3,openparen:4,closeparen:5,eof:6,string:7};CEBusinessTextParser.prototype.parse=function(n){this.reset();this.text=n;this.textLength=n!==null?n.length:0;try{this.getNextToken();this.tokenType!==this.eTokenType.eof&&this.parseSearch1()}catch(t){}};CEBusinessTextParser.prototype.reset=function(){this.tokenType=this.eTokenType.none;this.textPos=0;this.errorPos=0;this.error=null;this.ops=0};CEBusinessTextParser.prototype.setError=function(n){this.error=n;throw n;};CEBusinessTextParser.prototype.parseSearch1=function(){for(this.parseSearch2();this.tokenType===this.eTokenType.or;)this.getNextToken(),this.parseSearch2(),this.ops++};CEBusinessTextParser.prototype.parseSearch2=function(){for(this.parseSearch3();this.tokenType!==this.eTokenType.eof;){if(this.tokenType===this.eTokenType.and)this.getNextToken();else if(this.tokenType===this.eTokenType.or||this.tokenType===this.eTokenType.eof)return;this.parseSearch3();this.ops++}};CEBusinessTextParser.prototype.parseSearch3=function(){var n=!1;this.tokenType===this.eTokenType.not&&(n=!0,this.getNextToken());this.parseSearch4();n&&this.ops++};CEBusinessTextParser.prototype.parseSearch4=function(){this.tokenType===this.eTokenType.openparen?(this.getNextToken(),this.parseSearch1(),this.tokenType!==this.eTokenType.closeparen&&this.setError(") expected"),this.getNextToken()):this.tokenType===this.eTokenType.string?(this.ops++,this.getNextToken()):this.setError("searchword, searchphrase or ( expected")};CEBusinessTextParser.prototype.getNextToken=function(){for(var n;this.textPos<this.textLength;){if(this.tokenStart=this.textPos,n=this.text[this.textPos++],n==="("){this.tokenType=this.eTokenType.openparen;return}if(n===")"){this.tokenType=this.eTokenType.closeparen;return}if(n===","){this.tokenType=this.eTokenType.or;return}if(n==="+"){this.tokenType=this.eTokenType.and;return}if(n==="-"){this.tokenType=this.eTokenType.not;return}if(n==='"'){while(this.textPos<this.textLength)if(n=this.text[this.textPos++],n==='"')break;n!=='"'&&this.setError('" expected');this.textPos-this.tokenStart<2&&this.setError("searchphrase cannot be empty");this.tokenType=this.eTokenType.string;this.tokenString=this.text.substring(this.tokenStart+1,this.textPos-1).toLowerCase();return}if(n>" "){while(this.textPos<this.textLength){if(n=this.text[this.textPos],n<=" "||n===","||n==="+")break;this.textPos++}this.tokenString=this.text.substring(this.tokenStart,this.textPos).toLowerCase();this.tokenType=this.tokenString==="and"?this.eTokenType.and:this.tokenString==="or"?this.eTokenType.or:this.tokenString==="not"?this.eTokenType.not:this.eTokenType.string;return}}this.tokenType=this.eTokenType.eof};CEUtils.prototype.copyPrototype(CEWindow,CEColorDlg);CEColorDlg.prototype.dispose=function(){events.remove(this.editr,"change",this,this.editChange);events.remove(this.editg,"change",this,this.editChange);events.remove(this.editb,"change",this,this.editChange);events.remove(this.edith,"change",this,this.editChange);events.remove(this.edits,"change",this,this.editChange);events.remove(this.editl,"change",this,this.editChange);this.options.sa&&events.remove(this.editt,"change",this,this.editChange);events.remove(this.btnSave,"click",this,this.saveClick);events.remove(this.divLumMarker,"mousedown",this,this.divLumMarkerMouseDown);events.remove(this.divHueSatMarker,"mousedown",this,this.divHueSatMarkerMouseDown);this.divHueSat=null;this.divHueSatMarker=null;this.divLum=null;this.divLumMarker=null;this.editr=null;this.editg=null;this.editb=null;this.edith=null;this.edits=null;this.editl=null;this.editt=null;this.divCurrentBG=null;this.divCurrent=null;this.divNewBG=null;this.divNew=null;this.btnSave=null;CEWindow.prototype.dispose.call(this)};CEColorDlg.prototype.addSpan=function(n,t,i){var r;return r=window.document.createElement("span"),r.className=i,r.innerHTML=t,n.appendChild(r),r};CEColorDlg.prototype.addDiv=function(n,t){var i;return i=window.document.createElement("div"),i.className=t,n.appendChild(i),i};CEColorDlg.prototype.addEdit=function(n,t){var i;return i=window.document.createElement("input"),i.type="text",i.className=t,n.appendChild(i),i};CEColorDlg.prototype.addBtn=function(n,t,i){var r;return r=window.document.createElement("button"),r.innerHTML=t,r.className=i,n.appendChild(r),r};CEColorDlg.prototype.saveClick=function(){rp.call({id:this.options.id,cmd:"save",color:utils.rgbToColor(this.color.r,this.color.g,this.color.b),alpha:this.alpha})};CEColorDlg.prototype.setColor=function(n,t){var i;i=utils.colorToRGB(n);this.color=utils.rgbToHSL(i.r,i.g,i.b);this.alpha=t;this.divCurrent.style.backgroundColor="#"+n;this.options.sa&&(this.divCurrent.style.opacity=this.alpha/255,this.divCurrent.style.filter="alpha(opacity="+this.alpha/2.55+")");this.updateEdits();this.updateHueSat();this.updateLum()};CEColorDlg.prototype.updateEdits=function(){this.ignore=!0;this.editr.value=this.color.r;this.editg.value=this.color.g;this.editb.value=this.color.b;this.edith.value=this.color.h;this.edits.value=this.color.s;this.editl.value=this.color.l;this.options.sa&&(this.editt.value=utils.alphaToTrans(this.alpha).toFixed(0));this.ignore=!1;this.divNew.style.backgroundColor="#"+utils.rgbToColor(this.color.r,this.color.g,this.color.b);this.options.sa&&(this.divNew.style.opacity=this.alpha/255,this.divNew.style.filter="alpha(opacity="+this.alpha/2.55+")")};CEColorDlg.prototype.updateLum=function(){var n;n=utils.hslToRGB(this.color.h,this.color.s,50);this.divLum.style.backgroundColor="#"+utils.rgbToColor(n.r,n.g,n.b);this.divLumMarker.style.backgroundPosition="right "+((100-this.color.l)*1.6).toString()+"px"};CEColorDlg.prototype.updateHueSat=function(){this.divHueSatMarker.style.backgroundPosition=(this.color.h/2).toString()+"px "+((100-this.color.s)*1.6).toString()+"px"};CEColorDlg.prototype.editChange=function(n){var t;this.ignore||(n===this.editr&&(t=window.parseInt(this.editr.value,10),window.isNaN(t)||(this.color=utils.rgbToHSL(t,this.color.g,this.color.b))),n===this.editg&&(t=window.parseInt(this.editg.value,10),window.isNaN(t)||(this.color=utils.rgbToHSL(this.color.r,t,this.color.b))),n===this.editb&&(t=window.parseInt(this.editb.value,10),window.isNaN(t)||(this.color=utils.rgbToHSL(this.color.r,this.color.g,t))),n===this.edith&&(t=window.parseInt(this.edith.value,10),window.isNaN(t)||(this.color=utils.hslToRGB(t,this.color.s,this.color.l))),n===this.edits&&(t=window.parseInt(this.edits.value,10),window.isNaN(t)||(this.color=utils.hslToRGB(this.color.h,t,this.color.l))),n===this.editl&&(t=window.parseInt(this.editl.value,10),window.isNaN(t)||(this.color=utils.hslToRGB(this.color.h,this.color.s,t))),n===this.editt&&(t=window.parseInt(this.editt.value,10),window.isNaN(t)||(this.alpha=utils.transToAlpha(t))),this.updateEdits(),this.updateHueSat(),this.updateLum())};CEColorDlg.prototype.divLumMarkerMouseDown=function(n,t){this.org=utils.getAbsPosition(this.divLum);events.startTrackMouse(this,this.lumMarkerMove,t)};CEColorDlg.prototype.divHueSatMarkerMouseDown=function(n,t){this.org=utils.getAbsPosition(this.divHueSat);events.startTrackMouse(this,this.hueSatMarkerMove,t)};CEColorDlg.prototype.lumMarkerMove=function(n,t){switch(n){case 0:case 1:this.color=utils.hslToRGB(this.color.h,this.color.s,100-(t.clientY-this.org.y)/1.6);this.updateEdits();this.updateHueSat();this.updateLum()}};CEColorDlg.prototype.hueSatMarkerMove=function(n,t){switch(n){case 0:case 1:this.color=utils.hslToRGB((t.clientX-this.org.x)*2,100-(t.clientY-this.org.y)/1.6,this.color.l);this.updateEdits();this.updateHueSat();this.updateLum()}};CEColorDlg.prototype.cmds=[CEColorDlg.prototype.dispose,CEColorDlg.prototype.showModal,CEColorDlg.prototype.close];CEUtils.prototype.copyPrototype(CEWindow,CEDatabaseQueryDlg);CEDatabaseQueryDlg.prototype.dispose=function(){events.remove(this.selectfilter,"change",this,this.filterChange);events.remove(this.btnsave,"click",this,this.saveClick);this.selectfilter=null;this.trat=null;this.trstart=null;this.trend=null;this.inputat=null;this.inputstart=null;this.inputend=null;this.btnsave=null;CEWindow.prototype.dispose.call(this)};CEDatabaseQueryDlg.prototype.filterChange=function(){var n;n=window.parseInt(this.selectfilter.options[this.selectfilter.selectedIndex].value);this.trat.style.display=n===1||n===4?"":"none";this.trstart.style.display=n===2||n===3||n===5||n===6?"":"none";this.trend.style.display=n===2||n===3||n===5||n===6?"":"none"};CEDatabaseQueryDlg.prototype.saveClick=function(){var n,t,i,r;n=window.parseInt(this.selectfilter[this.selectfilter.selectedIndex].value);t=utils.parseDate(this.inputat.value);i=utils.parseDate(this.inputstart.value);r=utils.parseDate(this.inputend.value);rp.call({id:this.options.id,cmd:"save",tf:n,ta:t,ts:i,te:r})};CEDatabaseQueryDlg.prototype.setFilter=function(n,t,i,r){var u,f;for(n=n.toString(),f=0,u=this.selectfilter.options.length-1;u>=0;--u)this.selectfilter.options[u].value===n&&(f=u);this.selectfilter.selectedIndex=f;this.inputat.value=utils.fmtDate(t);this.inputstart.value=utils.fmtDate(i);this.inputend.value=utils.fmtDate(r);this.filterChange()};CEDatabaseQueryDlg.prototype.cmds=[CEDatabaseQueryDlg.prototype.dispose,CEDatabaseQueryDlg.prototype.showModal,CEDatabaseQueryDlg.prototype.close,CEDatabaseQueryDlg.prototype.setFilter];CEUtils.prototype.copyPrototype(CEWindow,CEEconomyRegionDlg);CEEconomyRegionDlg.prototype.addButton=function(n,t){var r=document.createElement("div"),i;r.className="ceeconomyregion";i=CEEconomyRegionButton.prototype.buildRegionButton(n);i.cedata=n;n.ds||events.add(i,"click",this,this.toggleCheck);r.appendChild(i);t.appendChild(r)};CEEconomyRegionDlg.prototype.toggleCheck=function(n){n.cedata.ch=!n.cedata.ch;utils.setClass(n,"ceregionbtn_checked",n.cedata.ch)};CEEconomyRegionDlg.prototype.okClick=function(){rp.call({id:this.options.id,cmd:"ok",ch:this.datasets.map(function(n){return n.ch?"1":"0"}).join(",")})};CEEconomyRegionDlg.prototype.cancelClick=function(){rp.call({id:this.options.id,cmd:"cancel"})};CEEconomyRegionDlg.prototype.closeClick=CEEconomyRegionDlg.prototype.cancelClick;CEEconomyRegionDlg.prototype.cmds=[CEEconomyRegionDlg.prototype.dispose,CEEconomyRegionDlg.prototype.showModal,CEEconomyRegionDlg.prototype.close];CEUtils.prototype.copyPrototype(CEWindow,CEErrorDlg);CEErrorDlg.prototype.closeClick=function(){this.close();events.trigger(this,"close",null);this.dispose()};CEErrorDlg.prototype.cmds=[CEErrorDlg.prototype.dispose,CEErrorDlg.prototype.showModal,CEErrorDlg.prototype.close,CEErrorDlg.prototype.closeClick];CEUtils.prototype.copyPrototype(CEWindow,CEExportDlg);CEExportDlg.prototype.showFormats=function(n,t,i){var r,u;for(this.divProgressBar=null,this.divProgressPct=null,this.opts=i,r=[],r.push('<div class="dlgbody"><p>'),r.push(n),r.push("<\/p><table>"),u=0;u<t.length;u+=2)r.push('<tr><td><input type="radio" name="'),r.push(this.options.id),r.push('_ft" id="'),r.push(t[u]),r.push('_ft" value="'),r.push(t[u]),r.push('"'),u===0&&r.push(' checked="true"'),r.push('/><\/td><td><label for="'),r.push(t[u]),r.push('_ft">'),r.push(t[u+1]),r.push("<\/label><\/td><\/tr>");if(this.opts)for(r.push('<tr><td colspan="2">&nbsp;<\/td><\/tr>'),u=0;u<i.length;u+=2)r.push('<tr><td><input type="checkbox" id="'),r.push(this.options.id),r.push("_"),r.push(i[u]),r.push('" value="1"><\/td><td><label for="'),r.push(this.options.id),r.push("_"),r.push(i[u]),r.push('">'),r.push(i[u+1]),r.push("<\/label><\/td><\/tr>");r.push("<\/table><\/div>");r.push('<div class="dlgcmds">');r.push('<button class="cebtn" id="');r.push(this.options.id);r.push('_save" onclick="rp.doCmds([[');r.push(this.options.id);r.push(',4]]);">Save...<\/button>');r.push("<\/div>");this.containerNode.innerHTML=r.join("");this.centre()};CEExportDlg.prototype.showProgress=function(n){var t,i,r;t=[];t.push('<div class="dlgbody"><p>');t.push(n);t.push("<\/p><\/div>");this.containerNode.innerHTML=t.join("");i=window.document.createElement("div");i.className="ceprogressbar";this.containerNode.firstChild.appendChild(i);r=window.document.createElement("div");r.className="ceprogressbar_box";i.appendChild(r);this.divProgressBar=window.document.createElement("div");this.divProgressBar.className="ceprogressbar_bar";r.appendChild(this.divProgressBar);this.divProgressPct=window.document.createElement("div");this.divProgressPct.className="ceprogressbar_pct";i.appendChild(this.divProgressPct);this.centre()};CEExportDlg.prototype.setProgress=function(n,t,i){var r;r=Math.round(n/t*100);this.divProgressBar.style.width=r+"%";this.divProgressPct.innerHTML=r+"%";events.setTimeout(this,this.onTimer,i)};CEExportDlg.prototype.onTimer=function(){rp.call({id:this.options.id,cmd:"timer"})};CEExportDlg.prototype.showLink=function(n,t,i,r){var u;this.divProgressBar=null;this.divProgressPct=null;this.link=n;u=[];u.push('<div class="dlgbody"><p>Your file is ready to download<br/><\/p><div class="save"><button class="cebtn save" onclick="rp.doCmds([[');u.push(this.options.id);u.push(',8]]);">');r&&(u.push('<img class="icon" src="'),u.push(r),u.push('"/>'));u.push(t);u.push("<\/button> ");u.push(i);u.push("<\/div><\/div>");this.containerNode.innerHTML=u.join("");this.centre()};CEExportDlg.prototype.save=function(){var t,n,r,i,u;for(i={id:this.options.id,cmd:"save",fmt:null},t=window.document.getElementsByName(this.options.id+"_ft"),n=0,r=t.length;n<r;++n)t[n].checked&&(i.fmt=t[n].value);if(this.opts)for(n=0;n<this.opts.length;n+=2)u=window.document.getElementById(this.options.id+"_"+this.opts[n]),u.checked&&(i[this.opts[n]]="1");rp.call(i)};CEExportDlg.prototype.startDownload=function(){rp.call({id:this.options.id,cmd:"download"});rp.download(this.link);this.close()};CEExportDlg.prototype.cmds=[CEExportDlg.prototype.dispose,CEExportDlg.prototype.showModal,CEExportDlg.prototype.close,CEExportDlg.prototype.showFormats,CEExportDlg.prototype.save,CEExportDlg.prototype.showProgress,CEExportDlg.prototype.setProgress,CEExportDlg.prototype.showLink,CEExportDlg.prototype.startDownload];CEUtils.prototype.copyPrototype(CEWindow,CEForecastRegionDlg);CEForecastRegionDlg.prototype.addButton=function(n,t){var r=document.createElement("div"),i;r.className="ceeconomyregion";i=CEForecastRegionButton.prototype.buildRegionButton(n);i.cedata=n;n.ds||events.add(i,"click",this,this.toggleCheck);r.appendChild(i);t.appendChild(r)};CEForecastRegionDlg.prototype.toggleCheck=function(n){n.cedata.ch=!n.cedata.ch;utils.setClass(n,"ceregionbtn_checked",n.cedata.ch)};CEForecastRegionDlg.prototype.okClick=function(){rp.call({id:this.options.id,cmd:"ok",ch:this.datasets.map(function(n){return n.ch?"1":"0"}).join(",")})};CEForecastRegionDlg.prototype.cancelClick=function(){rp.call({id:this.options.id,cmd:"cancel"})};CEForecastRegionDlg.prototype.closeClick=CEForecastRegionDlg.prototype.cancelClick;CEForecastRegionDlg.prototype.cmds=[CEForecastRegionDlg.prototype.dispose,CEForecastRegionDlg.prototype.showModal,CEForecastRegionDlg.prototype.close];CEUtils.prototype.copyPrototype(CEWindow,CEInputDlg);CEInputDlg.prototype.ok=function(){var r,i,t,n;for(r={id:this.options.id,cmd:"ok"},i=this.domNode.getElementsByTagName("input"),t=0;t<i.length;t++){n=i[t];switch(n.type){case"checkbox":r[n.name]=n.checked;break;case"radio":n.checked&&(r[n.name]=n.value);break;case"text":r[n.name]=n.value}}for(i=this.domNode.getElementsByTagName("select"),t=0;t<i.length;t++)n=i[t],n.selectedIndex>=0&&(r[n.name]=n.selectedIndex.options[n.selectedIndex].value);for(i=this.domNode.getElementsByTagName("textarea"),t=0;t<i.length;t++)n=i[t],r[n.name]=n.value;rp.call(r)};CEInputDlg.prototype.cmds=[CEInputDlg.prototype.dispose,CEInputDlg.prototype.showModal,CEInputDlg.prototype.close,CEInputDlg.prototype.ok];CEUtils.prototype.copyPrototype(CEWindow,CELogonDlg);CELogonDlg.prototype.logon=function(){rp.call({id:this.options.id,cmd:"logon",email:window.document.getElementById(this.options.id+"_email").value,password:window.document.getElementById(this.options.id+"_password").value,rm:window.document.getElementById(this.options.id+"_rm").checked?"1":""})};CELogonDlg.prototype.newuser=function(){rp.call({id:this.options.id,cmd:"newuser"})};CELogonDlg.prototype.emailpassword=function(){rp.call({id:this.options.id,cmd:"emailpassword"})};CELogonDlg.prototype.cmds=[CELogonDlg.prototype.dispose,CELogonDlg.prototype.showModal,CELogonDlg.prototype.close,CELogonDlg.prototype.newuser,CELogonDlg.prototype.emailpassword];CEUtils.prototype.copyPrototype(CEWindow,CEMsgBoxDlg);CEMsgBoxDlg.prototype.btnClick=function(n,t){rp.call({id:this.options.id,cmd:n.cecmd,ctrl:(t.ctrlKey||t.metaKey)===!0})};CEMsgBoxDlg.prototype.closeClick=function(n,t){rp.call({id:this.options.id,cmd:"close",ctrl:(t.ctrlKey||t.metaKey)===!0})};CEMsgBoxDlg.prototype.cmds=[CEMsgBoxDlg.prototype.dispose,CEMsgBoxDlg.prototype.showModal,CEMsgBoxDlg.prototype.close];CEUtils.prototype.copyPrototype(CEWindow,CEMsgDlg);CEMsgDlg.prototype.closeClick=function(){this.close();this.dispose()};CEMsgDlg.prototype.cmds=[CEMsgDlg.prototype.dispose,CEMsgDlg.prototype.showModal,CEMsgDlg.prototype.close,CEMsgDlg.prototype.closeClick];CEUtils.prototype.copyPrototype(CEWindow,CENewUserDlg);CENewUserDlg.prototype.create=function(){rp.call({id:this.options.id,cmd:"newuser",clientid:window.document.getElementById(this.options.id+"_clientid").value,title:window.document.getElementById(this.options.id+"_title").value,name:window.document.getElementById(this.options.id+"_name").value,company:window.document.getElementById(this.options.id+"_company").value,position:window.document.getElementById(this.options.id+"_position").value,email:window.document.getElementById(this.options.id+"_email").value,work:window.document.getElementById(this.options.id+"_work").value,mobile:window.document.getElementById(this.options.id+"_mobile").value,agree:window.document.getElementById(this.options.id+"_agree").checked?"1":""})};CENewUserDlg.prototype.cmds=[CENewUserDlg.prototype.dispose,CENewUserDlg.prototype.showModal,CENewUserDlg.prototype.close,CENewUserDlg.prototype.create];CEUtils.prototype.copyPrototype(CEWindow,CEPasteDlg);CEPasteDlg.prototype.showModal=function(){var n;CEWindow.prototype.showModal.call(this);n=window.document.getElementById(this.options.id+"_text");n.value=window.clipboardData?window.clipboardData.getData("Text"):""};CEPasteDlg.prototype.ok=function(){rp.call({id:this.options.id,cmd:"paste",cb:window.document.getElementById(this.options.id+"_text").value})};CEPasteDlg.prototype.cmds=[CEPasteDlg.prototype.dispose,CEPasteDlg.prototype.showModal,CEPasteDlg.prototype.close,CEPasteDlg.prototype.ok];CEUtils.prototype.copyPrototype(CEWindow,CEProjectSharingDlg);CEProjectSharingDlg.prototype.saveClick=function(){var n=this.templateView.currentView.controls;this.flags=n.private.checked?0:n.readwrite.checked?3:1;rp.call({id:this.options.id,cmd:"save",flags:this.flags})};CEProjectSharingDlg.prototype.cancelClick=function(){rp.call({id:this.options.id,cmd:"cancel"})};CEProjectSharingDlg.prototype.closeClick=CEProjectSharingDlg.prototype.cancelClick;CEProjectSharingDlg.prototype._onChange=function(){var n=this.templateView.currentView.controls;n.readwrite.disabled=n.private.checked};CEProjectSharingDlg.prototype.cmds=[CEProjectSharingDlg.prototype.dispose,CEProjectSharingDlg.prototype.showModal,CEProjectSharingDlg.prototype.close];CEUtils.prototype.copyPrototype(CEWindow,CERenameDataDlg);CERenameDataDlg.prototype.save=function(){rp.call({id:this.options.id,cmd:"save",name:window.document.getElementById(this.options.id+"_name").value})};CERenameDataDlg.prototype.cmds=[CERenameDataDlg.prototype.dispose,CERenameDataDlg.prototype.showModal,CERenameDataDlg.prototype.close,CERenameDataDlg.prototype.save];CEUtils.prototype.copyPrototype(CEWindow,CERenameTemplateDlg);CERenameTemplateDlg.prototype.save=function(){rp.call({id:this.options.id,cmd:"save",name:window.document.getElementById(this.options.id+"_name").value})};CERenameTemplateDlg.prototype.cmds=[CERenameTemplateDlg.prototype.dispose,CERenameTemplateDlg.prototype.showModal,CERenameTemplateDlg.prototype.close,CERenameTemplateDlg.prototype.save];CEUtils.prototype.copyPrototype(CEWindow,CEResendPasswordDlg);CEResendPasswordDlg.prototype.emailpassword=function(){rp.call({id:this.options.id,cmd:"emailpassword",email:window.document.getElementById(this.options.id+"_email").value})};CEResendPasswordDlg.prototype.cmds=[CEResendPasswordDlg.prototype.dispose,CEResendPasswordDlg.prototype.showModal,CEResendPasswordDlg.prototype.close,CEResendPasswordDlg.prototype.emailpassword];CEUtils.prototype.copyPrototype(CEWindow,CESaveBusinessDlg);CESaveBusinessDlg.prototype.save=function(){rp.call({id:this.options.id,cmd:"save"})};CESaveBusinessDlg.prototype.cmds=[CESaveBusinessDlg.prototype.dispose,CESaveBusinessDlg.prototype.showModal,CESaveBusinessDlg.prototype.close,CESaveBusinessDlg.prototype.save];CEUtils.prototype.copyPrototype(CEWindow,CESaveChartImageDlg);CESaveChartImageDlg.prototype.save=function(){var t,n,i,r;for(i=null,t=window.document.getElementsByName(this.options.id+"_it"),n=0,r=t.length;n<r;++n)t[n].checked&&(i=t[n].value);rp.download("savechartimage/chart."+i+"?sid="+rp.sessionid+"&wid="+rp.windowid+"&type="+i);rp.call({id:this.options.id,cmd:"close"})};CESaveChartImageDlg.prototype.cmds=[CESaveChartImageDlg.prototype.dispose,CESaveChartImageDlg.prototype.showModal,CESaveChartImageDlg.prototype.close,CESaveChartImageDlg.prototype.save];CEUtils.prototype.copyPrototype(CEWindow,CESaveDataAsDlg);CESaveDataAsDlg.prototype.save=function(){var n={id:this.options.id,cmd:"save"};window.document.getElementById(this.options.id+"_ow").checked?(n.ow="1",n.name=this.options.name):n.name=window.document.getElementById(this.options.id+"_name").value;rp.call(n)};CESaveDataAsDlg.prototype.cmds=[CESaveDataAsDlg.prototype.dispose,CESaveDataAsDlg.prototype.showModal,CESaveDataAsDlg.prototype.close,CESaveDataAsDlg.prototype.save];CEUtils.prototype.copyPrototype(CEWindow,CESaveDataDlg);CESaveDataDlg.prototype.save=function(){rp.call({id:this.options.id,cmd:"save",name:window.document.getElementById(this.options.id+"_name").value})};CESaveDataDlg.prototype.cmds=[CESaveDataDlg.prototype.dispose,CESaveDataDlg.prototype.showModal,CESaveDataDlg.prototype.close,CESaveDataDlg.prototype.save];CEUtils.prototype.copyPrototype(CEWindow,CESaveProjectAsDlg);CESaveProjectAsDlg.prototype.saveClick=function(){var t=this.templateView.currentView.controls,n={id:this.options.id,cmd:"save",ow:t.overwrite.checked?"1":"0"};n.name=n.ow==="1"?this.options.name:t.name.value;n.ow==="0"&&(n.flags=t.private.checked?0:t.readwrite.checked?3:1);rp.call(n)};CESaveProjectAsDlg.prototype.cancelClick=function(){rp.call({id:this.options.id,cmd:"close"})};CESaveProjectAsDlg.prototype.closeClick=CESaveProjectAsDlg.prototype.cancelClick;CESaveProjectAsDlg.prototype._onChange=function(){console.info("onchange");var n=this.templateView.currentView.controls;n.overwrite.checked?n.name.disabled=n.private.disabled=n.shared.disabled=n.readwrite.disabled=!0:(n.name.disabled=n.private.disabled=n.shared.disabled=!1,n.readwrite.disabled=n.private.checked)};CESaveProjectAsDlg.prototype.cmds=[CESaveProjectAsDlg.prototype.dispose,CESaveProjectAsDlg.prototype.showModal,CESaveProjectAsDlg.prototype.close,CESaveProjectAsDlg.prototype.save];CEUtils.prototype.copyPrototype(CEWindow,CESaveProjectDlg);CESaveProjectDlg.prototype.saveClick=function(){var n=this.templateView.currentView.controls,t=n.private.checked?0:n.readwrite.checked?3:1;rp.call({id:this.options.id,cmd:"save",name:n.name.value,flags:t})};CESaveProjectDlg.prototype.cancelClick=function(){rp.call({id:this.options.id,cmd:"close"})};CESaveProjectDlg.prototype.closeClick=CESaveProjectDlg.prototype.cancelClick;CESaveProjectDlg.prototype._onChange=function(){var n=this.templateView.currentView.controls;n.readwrite.disabled=n.private.checked};CESaveProjectDlg.prototype.cmds=[CESaveProjectDlg.prototype.dispose,CESaveProjectDlg.prototype.showModal,CESaveProjectDlg.prototype.close,CESaveProjectDlg.prototype.saveClick];CEUtils.prototype.copyPrototype(CEWindow,CESaveTemplateAsDlg);CESaveTemplateAsDlg.prototype.save=function(){var n={id:this.options.id,cmd:"save"};window.document.getElementById(this.options.id+"_ow").checked?(n.ow="1",n.name=this.options.name):n.name=window.document.getElementById(this.options.id+"_name").value;rp.call(n)};CESaveTemplateAsDlg.prototype.cmds=[CESaveTemplateAsDlg.prototype.dispose,CESaveTemplateAsDlg.prototype.showModal,CESaveTemplateAsDlg.prototype.close,CESaveTemplateAsDlg.prototype.save];CEUtils.prototype.copyPrototype(CEWindow,CESaveTemplateDlg);CESaveTemplateDlg.prototype.save=function(){rp.call({id:this.options.id,cmd:"save",name:window.document.getElementById(this.options.id+"_name").value})};CESaveTemplateDlg.prototype.cmds=[CESaveTemplateDlg.prototype.dispose,CESaveTemplateDlg.prototype.showModal,CESaveTemplateDlg.prototype.close,CESaveTemplateDlg.prototype.save];CEUtils.prototype.copyPrototype(CEWindow,CEShareDlg);CEShareDlg.prototype._selectUrl=function(){this.txt.select()};CEShareDlg.prototype._copyUrl=function(){this._selectUrl();var n=!1;try{n=document.execCommand("copy")}catch(t){utils.log(t)}this.btn.querySelector("i").className="fa "+(n?"fa-check-circle":"fa-exclamation-circle");utils.setClass(this.btn,"copy-success",n);utils.setClass(this.btn,"copy-fail",!n);events.setTimeout(this,this._resetCopyBtn,5e3)};CEShareDlg.prototype._resetCopyBtn=function(){utils.setClass(this.btn,"copy-success",!1);utils.setClass(this.btn,"copy-fail",!1);this.btn.querySelector("i").className="fa fa-copy"};CEShareDlg.prototype.showModal=function(){CEWindow.prototype.showModal.call(this);this.txt.select()};CEShareDlg.prototype.closeClick=function(){this.close();events.trigger(this,"close",null);this.dispose()};CEShareDlg.prototype.cmds=[CEShareDlg.prototype.dispose,CEShareDlg.prototype.showModal,CEShareDlg.prototype.close,CEShareDlg.prototype.closeClick];CEUtils.prototype.copyPrototype(CEWindow,CESnapshotDlg);CESnapshotDlg.prototype.save=function(){rp.call({id:this.options.id,cmd:"save",name:window.document.getElementById(this.options.id+"_name").value,desc:window.document.getElementById(this.options.id+"_desc").value})};CESnapshotDlg.prototype.cmds=[CESnapshotDlg.prototype.dispose,CESnapshotDlg.prototype.showModal,CESnapshotDlg.prototype.close,CESnapshotDlg.prototype.save];CESession.prototype.makeXMLRequest=function(){return new window.XMLHttpRequest};CESession.prototype.call=function(n){var t;this.incBusy();this.sessionid&&(n.sid=this.sessionid,n.wid=this.windowid);t=new Date;n.dto=-t.getTimezoneOffset();this.pendingCalls.push(n);this.pendingCalls.length===1&&this.doPendingCall()};CESession.prototype.doPendingCall=function(){var t,r,i,n;t=this.pendingCalls[0];r="";for(i in t)t.hasOwnProperty(i)&&t[i]!=null&&(r+="&"+i+"="+window.encodeURIComponent(t[i]));try{n=this.makeXMLRequest();n.open("POST","cmd",!0);n.onreadystatechange=function(){rp.callReqChange(n)};n.setRequestHeader("Content-type","application/x-www-form-urlencoded");n.send(r)}catch(u){window.alert("Your browser does not support XMLHttpRequest. Please use the latest version of your browser.\n\nFor more assistance contact REMPLAN on 1300 737 443 (within Australia), or (+61) 3 5444 4788 (International)")}};CESession.prototype.callReqTimeout=function(){this.sendError({sid:this.sessionid,name:"cmd timeout"});window.alert("A timeout error occurred whilst communicating with the REMPLAN server\n\nPlease contact your IT department and let them know that your computer needs GET and POST access to *.remplanlogin.com.au\n\nFor more assistance contact REMPLAN on 1300 737 443 (within Australia), or (+61) 3 5444 4788 (International)")};CESession.prototype.callReqChange=function(req){var cmds;if(req.readyState===4){if(this.reqTimerId!==null&&(events.stopTimer(this.reqTimerId),this.reqTimerId=null),req.status!==200&&req.status!==0&&(this.sendError({sid:this.sessionid,name:"bad http response",error:req.status+" "+req.statusText}),window.alert("An error occurred whilst communicating with the REMPLAN server\n\nPlease contact your IT department and let them know that your computer needs GET and POST access to *.remplanlogin.com.au, and that you are getting this error\n"+req.status+": "+req.statusText+"\n\nFor more assistance, contact your IT department or contact REMPLAN on 1300 737 443 (within Australia), or (+61) 3 5444 4788 (International)")),req.status===200){try{cmds=window.JSON&&window.JSON.parse?window.JSON.parse(req.responseText):eval(req.responseText);cmds===undefined?this.sendError({sid:this.sessionid,name:"cmds == null",error:"cmds == null",stack:"",cmd:req.responseText}):this.doCmds(cmds)}catch(e){this.sendError({sid:this.sessionid,name:e.name,error:e.message,stack:e.stack?e.stack:"no stack",cmd:req.responseText});window.alert("The following error occurred whilst communicating with the REMPLAN server\n\nName: "+e.name+"\nMessage: "+e.message+"\n\nPlease contact REMPLAN on 1300 737 443 (within Australia), or (+61) 3 5444 4788 (International) if this problem persists")}this.needResize();this.divTrash.innerHTML=""}this.pendingCalls.splice(0,1);this.decBusy();this.pendingCalls.length>0&&this.doPendingCall()}};CESession.prototype.sendError=function(n){var i,t,r;t="";for(r in n)n.hasOwnProperty(r)&&(t.length>0&&(t+="&"),t+=r+"="+window.encodeURIComponent(n[r]));i=this.makeXMLRequest();i.open("POST","Error",!0);i.setRequestHeader("Content-type","application/x-www-form-urlencoded");i.send(t)};CESession.prototype.incBusy=function(){this.busy===0&&events.trigger(this,"busy",!0);this.busy++};CESession.prototype.decBusy=function(){this.busy--;this.busy===0&&events.trigger(this,"busy",!1)};CESession.prototype.doCmds=function(n){for(var u,t,f,o=function(){},i=0,e=n.length;i<e;++i){t=n[i];try{t[0]===0&&t[1]===5?(f=this.objs[t[2]],o.prototype=f.prototype,f.apply(new o,t.slice(3))):(u=ui[t[0]],u.cmds[t[1]].apply(u,t.slice(2)))}catch(r){this.sendError({sid:this.sessionid,name:r.name,error:r.message,stack:r.stack?r.stack:"no stack",cmd:"i="+i+" cmd=["+t.toString()+"]"});throw r;}}};CESession.prototype.getIEVer=function(){if(window.ActiveXObject!==undefined){if(!window.XMLHttpRequest)return 6;if(!window.document.querySelector)return 7;if(!window.document.addEventListener)return 8;if(!window.atob)return 9}return 10};CESession.prototype.start=function(){if(this.iever=this.getIEVer(),this.iever<9){window.alert("REMPLAN does not support your browser");return}this.iever<=8&&(window.document.namespaces.add("v","urn:schemas-microsoft-com:vml","#default#VML"),window.document.createStyleSheet().cssText="v\\:shape { behavior:url(#default#VML); display: block; }");this.hasSVG=this.iever>=9;this.hasVML=this.iever<=9;this.divTrash=window.document.createElement("div");tt=new CETooltip;this.divTemp=window.document.createElement("div");this.divTemp.style.display="none";window.document.body.appendChild(this.divTemp);this.reqTimerId=events.setTimeout(this,this.callReqTimeout,6e4);this.call({cmd:"start",iever:this.iever,url:window.document.URL,ver:this.ver,params:this.params,origin:window.ceorigin});events.add(this,"resize",this,this.resize);events.add(window.document.body,"keydown",this,this.bodykeydown);events.add(window.document.body,"click",this,this.bodyclick);window.document.body.onselectstart!==undefined&&events.add(window.document.body,"selectstart",this,this.bodyselectstart);window.document.body.onfocusin!==undefined?events.add(window.document.body,"focusin",this,this.bodyfocus):events.add(window.document.body,"focus",this,this.bodyfocus,!0);this.timerId=events.startTimer(this,this.pingTimer,3e5);this.googleAnalytics()};CESession.prototype.googleAnalytics=function(){ga=function(){ga.q.push(arguments)};ga.q=[];ga.l=+new Date;window.GoogleAnalyticsObject="ga";window.setTimeout(function(){var n=window.document.createElement("script");n.async=1;n.src="//www.google-analytics.com/analytics.js";window.document.body.appendChild(n)},2e3);ga("create","UA-17425199-7","auto");ga("send","pageview")};CESession.prototype.setSession=function(n,t,i){this.sessionid=n;this.windowid=t;i&&(this.googleparams+=i)};CESession.prototype.showError=function(n){var t;t=new CEErrorDlg({id:"x"+this.nextid++,text:n});t.showModal()};CESession.prototype.showNoSession=function(){var n;events.stopTimer(this.timerId);n=new CEErrorDlg({id:"x"+this.nextid++,text:"REMPLAN Software needs to restart.\nClick OK to restart now.\nLog in again (if required) and your session will be restored."});events.add(n,"close",this,this.showNoSessionClose);n.showModal()};CESession.prototype.showNoSessionClose=function(){window.location.reload(!0)};CESession.prototype.showMessage=function(n){var t;t=new CEMsgDlg({id:"x"+this.nextid++,text:n});t.showModal()};CESession.prototype.showHTMLMessage=function(n){var t;t=new CEMsgDlg({id:"x"+this.nextid++,html:n});t.showModal()};CESession.prototype.needResize=function(){this.resizePending||(events.post(this,"resize",null),this.resizePending=!0)};CESession.prototype.resize=function(){this.resizePending=!1};CESession.prototype.setBody=function(n){var t;t=n!==null?ui[n]:null;this.body!==null&&window.document.body.removeChild(t.domNode);this.body=t;this.body!==null&&(utils.setClass(t.domNode,"full",!0),window.document.body.appendChild(t.domNode))};CESession.prototype.showWindow=function(n,t,i,r){var u,f;u=i||r?"toolbar=0,menubar=0,location=0,scrollbars=1,resizable=1":"";i&&(u+=",width="+i);r&&(u+=",height="+r);try{f=window.open(n,t,u);f.focus()}catch(e){console.debug("failed to open window")}};CESession.prototype.showWindow2=function(n,t,i,r,u){var o,h,f,s,e;o="toolbar=1,menubar=1,location=1,scrollbars=1,resizable=1";i&&(o+=",width="+i);r&&(o+=",height="+r);try{h=window.open("",t,o);h.focus();h.name=t}catch(c){console.debug("failed to open window")}f=window.document.createElement("form");f.method="post";f.action=n;f.target=t;for(s in u)u.hasOwnProperty(s)&&(e=window.document.createElement("input"),e.type="hidden",e.name=s,e.value=window.encodeURIComponent(u[s]),f.appendChild(e));window.document.body.appendChild(f);f.submit();window.document.body.removeChild(f)};CESession.prototype.openWindow=function(n){window.open(n)};CESession.prototype.cancelPopups=function(){for(var n=0,t=this.popups.length;n<t;++n)this.popups[n].hide();this.popups=[]};CESession.prototype.pingTimer=function(){this.call({cmd:"ping"})};CESession.prototype.showChartStyler=function(n){this.showWindow("/chartstyler/?sid="+this.sessionid+"&wid="+this.windowid+"&iid="+n+"&origin="+window.ceorigin,"remplan_chartstyler",600,600)};CESession.prototype.showHelp=function(){this.showWindow("help/?sid="+this.sessionid+"&wid="+this.windowid,"remplan_help",600,600)};CESession.prototype.showTraining=function(){this.showWindow("/doc/training/training_guide.pdf?&sid="+this.sessionid,"remplanlogin_training")};CESession.prototype.showCopy=function(n){var t={cmd:n,params:""};events.trigger(this,"precopy",t);this.showWindow("/copy/copy.htm?cmd="+n+"&sid="+this.sessionid+"&wid="+this.windowid+"&params="+t.params,"remplanlogin_copy",400,400)};CESession.prototype.showCopy2=function(n,t,i){this.showWindow("/copy/copy.htm?cmd="+n+"&sid="+this.sessionid+"&wid="+this.windowid+"&id="+t+"&params="+i,"remplanlogin_copy",400,400)};CESession.prototype.exportMap_ESRI=function(n){this.download("exportmap_esri/mapdata.zip?sid="+this.sessionid+"&wid="+this.windowid+"&id="+n)};CESession.prototype.exportMap_MapInfo=function(n){this.download("exportmap_mapinfo/mapdata.zip?sid="+this.sessionid+"&wid="+this.windowid+"&id="+n)};CESession.prototype.exportMap_KML=function(n){this.download("exportmap_kml/mapdata.kml?sid="+this.sessionid+"&wid="+this.windowid+"&id="+n)};CESession.prototype.showPDF=function(n){var t={cmd:n,params:""};events.trigger(this,"precopy",t);this.download("pdf/pdf.pdf?cmd="+n+"&sid="+this.sessionid+"&wid="+this.windowid+"&params="+t.params)};CESession.prototype.showWord=function(n){var t={cmd:n,params:""};events.trigger(this,"precopy",t);this.download("docx/docx.docx?cmd="+n+"&sid="+this.sessionid+"&wid="+this.windowid+"&params="+t.params)};CESession.prototype.showExport=function(n){var t={cmd:n,params:""};events.trigger(this,"precopy",t);this.download("/export/export.html?cmd="+n+"&sid="+this.sessionid+"&wid="+this.windowid+"&params="+t.params)};CESession.prototype.stop=function(){};CESession.prototype.logoff=function(){window.localStorage.clear()};CESession.prototype.loadGoogleMaps=function(){this.googlemaps=1;var n=window.document.createElement("script");n.type="text/javascript";n.src="https://maps.googleapis.com/maps/api/js?callback=eventGoogleLoaded&"+this.googleparams;window.document.body.appendChild(n)};CESession.prototype.download=function(n){n.indexOf("?")<0&&(n=n+"?&sid="+this.sessionid);this.downloadiframe||(this.downloadiframe=window.document.createElement("iframe"),this.downloadiframe.style.display="none",this.downloadiframe.src="about:blank",window.document.body.appendChild(this.downloadiframe));this.downloadiframe.src="about:blank";this.downloadiframe.src=n};CESession.prototype.log=function(n){window.console&&window.console.log(n)};CESession.prototype.bodykeydown=function(n,t){var i,r;if(i=t.target,r=t.which||t.keyCode,r===8){if(i.tagName==="INPUT"||i.tagName==="TEXTAREA")return;eventIgnore(t)}};CESession.prototype.bodyselectstart=function(n,t){var i;if(i=t.target,i.tagName!=="INPUT"&&i.tagName!=="TEXTAREA"){while(i){if(i===window.document.body)break;if(i.ceselectable)return;i=i.offsetParent}eventIgnore(t)}};CESession.prototype.bodyfocus=function(n,t){this.focusElement=t.target;events.post(this,"focus",t)};CESession.prototype.bodyclick=function(n,t){this.focusElement=t.target;events.post(this,"click",t)};CESession.prototype.dispose=function(n){this.divTrash.appendChild(n)};CESession.prototype.reload=function(){window.location.reload(!0)};CESession.prototype.setVer=function(n){this.ver=n};CESession.prototype.setIEVer=function(n){this.iever=n};CESession.prototype.setOffline=function(){this.offline=!0;this.googlemaps=2};CESession.prototype.googleMapsLoaded=function(){this.googlemaps=2;google.maps.visualRefresh=!0;events.trigger(rp,"googlemapsloaded",null)};CESession.prototype.setClientTimer=function(n){this.timerId&&(events.stopTimer(this.timerId),delete this.timerId);n>0&&(this.timerId=events.startTimer(this,this.onClientTimer,n*1e3))};CESession.prototype.onClientTimer=function(){this.call({cmd:"timer"})};CESession.prototype.exportExcel=function(n){this.download("exportexcel/report.xlsx?sid="+this.sessionid+"&wid="+this.windowid+"&id="+n)};CESession.prototype.startModal=function(n,t){var i;return this.modal.length>0&&(this.modal[this.modal.length-1].bgdiv.style.display="none"),i={},i.prevFocus=this.focusElement,i.prevZIndex=n.style.zIndex,i.prevParent=n.parentElement,i.disabledElements=i.prevParent?utils.disableAllBut(n):utils.disableNodes(window.document.body.childNodes),i.domNode=n,i.zIndex=this.modal.length*20+20,i.bgdiv=window.document.createElement("div"),i.bgdiv.className="modalbg",i.bgdiv.style.zIndex=i.zIndex,this.modal.push(i),t&&(i.blurDiv=utils.getLastChildElement(window.document.body),i.blurDiv&&utils.setClass(i.blurDiv,"glass",!0)),window.document.body.appendChild(i.bgdiv),n.style.zIndex=i.zIndex+1,i.prevParent===null&&window.document.body.appendChild(n),i};CESession.prototype.endModal=function(n){n.blurDiv&&utils.setClass(n.blurDiv,"glass",!1);this.modal.splice(utils.indexOf(this.modal,n),1);n.prevParent===null&&window.document.body.removeChild(n.domNode);n.domNode.style.zIndex=n.prevZIndex;window.document.body.removeChild(n.bgdiv);utils.enableNodes(n.disabledElements);n.prevFocus&&utils.setFocus(n.prevFocus);this.modal.length>0&&(this.modal[this.modal.length-1].bgdiv.style.display="")};CESession.prototype.cmds=[null,CESession.prototype.setSession,CESession.prototype.reload,CESession.prototype.showNoSession,CESession.prototype.showError,null,CESession.prototype.showMessage,CESession.prototype.setBody,CESession.prototype.showCopy,CESession.prototype.showPDF,CESession.prototype.showTraining,CESession.prototype.openWindow,CESession.prototype.showHTMLMessage,CESession.prototype.showExport,CESession.prototype.showChartStyler,CESession.prototype.setVer,CESession.prototype.setIEVer,CESession.prototype.setOffline,CESession.prototype.setClientTimer,CESession.prototype.googleMapsLoaded,CESession.prototype.call,CESession.prototype.exportExcel,CESession.prototype.download,CESession.prototype.showHelp,CESession.prototype.showWord,CESession.prototype.logoff];CESession.prototype.objs=[null,CE2Split,CETab,CETabStrip,CENavLabel,CENavDivider,CENavEdit,CENavText,CENavHTML,CENavBtn,CENavTextColorBtn,CENavColorBtn,CENavImgBtn,CEButton,CENavHorz,CEReportNav,CENavGroup,CENavBar,CEDock,CERegionBtn,CEHTML,CEWindow,CELogonDlg,CELogonBox,CENewUserDlg,CESnapshotDlg,CESaveProjectDlg,CESaveProjectAsDlg,CESaveTemplateDlg,CESaveTemplateAsDlg,CERenameTemplateDlg,CESaveDataDlg,CESaveDataAsDlg,CERenameDataDlg,CEMsgBoxDlg,CESaveChartImageDlg,CEPasteDlg,CEBarGraphRow,CEBarGraphGroup,CEBarGraph,CEHorzSplit,CEBusy,CEImage,CEGridCol,CEGridRow,CEGrid,CETitle,CEMenuBtn,CEMenuBar,CEPopupMenu,CEChart,CEKeyValues,CENavDropDown,CENavCombo,CENavColors,CENavListBox,CENavListItem,CEHelpBtn,CEWizard,CEWizardPage,CELayoutGrid,CELegendItem,CEGapLegend,CETreeNode,CETreeView,CEColorDlg,CEMap,CEDocument,CERowEditor,CEBannerPage,CEReportMap,CERegionSummaryMap,CETable,CEHTMLReport,CEInfoPane,CEBarGraphTotalRow,CEContentTitle,CENavMenu,CEFrame,CEAnimateView,CENavBtn2,null,null,CEResendPasswordDlg,CEBusinessList,CEBusinessCard,CEHeader,CESaveBusinessDlg,CEExportDlg,CEDatabaseQueryDlg,CEGraph,CEHorzSelector,CEInputDlg,null,null,null,null,null,null,null,CENavLabelScrollList,CEBlurUpImage,CERegionNavList,CERegionNavLabel,null,null,null,null,null,null,CEProjectList,CEShareDlg,CEProjectSharingDlg,null,null,CEEconomyRegionButton,CEEconomyRegionDlg,CEForecastRegionButton,CEForecastRegionDlg,null,CEIFrame,CETravelTimeControls];var events,rp,utils,ui={},ga,svg,tt;events=new CEEvents;rp=new CESession;utils=new CEUtils;svg={ns:"http://www.w3.org/2000/svg",canvas:function(n,t){var i=window.document.createElementNS(this.ns,"svg");return i.setAttribute("width",n||"100%"),i.setAttribute("height",t||"100%"),i.setAttribute("version","1.2"),i.setAttribute("baseProfile","tiny"),i},line:function(n,t,i,r){var u=window.document.createElementNS(this.ns,"line");return u.setAttribute("x1",n),u.setAttribute("y1",t),u.setAttribute("x2",i),u.setAttribute("y2",r),u},linec:function(n,t,i,r,u){var f=window.document.createElementNS(this.ns,"line");return f.setAttribute("x1",n),f.setAttribute("y1",t),f.setAttribute("x2",i),f.setAttribute("y2",r),f.setAttribute("class",u),f},rect:function(n,t,i,r){var u=window.document.createElementNS(this.ns,"rect");return u.setAttribute("x",n),u.setAttribute("y",t),u.setAttribute("width",i),u.setAttribute("height",r),u},rectc:function(n,t,i,r,u){var f=window.document.createElementNS(this.ns,"rect");return f.setAttribute("x",n),f.setAttribute("y",t),f.setAttribute("width",i),f.setAttribute("height",r),f.setAttribute("class",u),f},circle:function(n,t,i,r,u,f){var e=window.document.createElementNS(this.ns,"circle");return e.setAttribute("cx",n),e.setAttribute("cy",t),e.setAttribute("r",i),e.setAttribute("stroke",r),e.setAttribute("stroke-width",u),e.setAttribute("fill",f),e},g:function(){return window.document.createElementNS(this.ns,"g")},gc:function(n){var t=window.document.createElementNS(this.ns,"g");return t.setAttribute("class",n),t},textc:function(n,t,i,r){var u=window.document.createElementNS(this.ns,"text");return u.setAttribute("x",n),u.setAttribute("y",t),u.setAttribute("class",i),u.textContent=r,u},path:function(n){var t=window.document.createElementNS(this.ns,"path");return t.setAttribute("d",n),t}};ui[0]=rp;ui[1]=new CEInfoHelper;window.skipStart||events.add(window,"load",rp,rp.start);events.add(window,"resize",rp,rp.needResize);events.add(window,"unload",rp,rp.stop)