window.dhtmlx||(dhtmlx={});dhtmlx.version="3.0";dhtmlx.codebase="./";dhtmlx.extend=function(a,b){for(var c in b)a[c]=b[c];b.g&&a.g();return a};dhtmlx.bind=function(a,b){return function(){return a.apply(b,arguments)}};dhtmlx.require=function(a){if(!dhtmlx.N[a]){dhtmlx.exec(dhtmlx.ajax().sync().get(dhtmlx.codebase+a).responseText);dhtmlx.N[a]=true}};dhtmlx.N={};dhtmlx.exec=function(a){window.execScript?window.execScript(a):window.eval(a)}; dhtmlx.methodPush=function(a,b){return function(){var c=false;return c=a[b].apply(a,arguments)}};dhtmlx.isNotDefined=function(a){return typeof a=="undefined"};dhtmlx.delay=function(a,b,c){setTimeout(function(){var d=a.apply(b,c);a=b=c=null;return d},1)};dhtmlx.uid=function(){if(!this.ca)this.ca=(new Date).valueOf();this.ca++;return this.ca};dhtmlx.toNode=function(a){if(typeof a=="string")return document.getElementById(a);return a};dhtmlx.toArray=function(a){return dhtmlx.extend(a||[],dhtmlx.PowerArray)}; dhtmlx.toFunctor=function(a){return typeof a=="string"?eval(a):a};dhtmlx.h={};dhtmlx.event=function(a,b,c,d){a=dhtmlx.toNode(a);var e=dhtmlx.uid();dhtmlx.h[e]=[a,b,c];if(d)c=dhtmlx.bind(c,d);if(a.addEventListener)a.addEventListener(b,c,false);else a.attachEvent&&a.attachEvent("on"+b,c);return e};dhtmlx.eventRemove=function(a){if(a){var b=dhtmlx.h[a];if(b[0].removeEventListener)b[0].removeEventListener(b[1],b[2],false);else b[0].detachEvent&&b[0].detachEvent("on"+b[1],b[2]);delete this.h[a]}}; dhtmlx.EventSystem={g:function(){this.h={};this.H={};this.B={}},block:function(){this.h.ha=true},unblock:function(){this.h.ha=false},mapEvent:function(a){dhtmlx.extend(this.B,a)},callEvent:function(a,b){if(this.h.ha)return true;a=a.toLowerCase();var c=this.h[a.toLowerCase()],d=true;if(c)for(var e=0;e=0)this.splice(a,b||1)},remove:function(a){this.removeAt(this.find(a))},insertAt:function(a,b){if(!b&&b!==0)this.push(a);else{var c=this.splice(b,this.length-b);this[b]=a;this.push.apply(this,c)}},find:function(a){for(i=0;i")!=-1){c=c.split("->"); switch(c[0]){case "html":c=dhtmlx.html.getValue(c[1]).replace(/\"/g,'\\"');break;case "http":c=(new dhtmlx.ajax).sync().get(c[1],{uid:(new Date).valueOf()}).responseText;break;default:break}}a[b]=dhtmlx.Template.fromHTML(c)}}}; dhtmlx.Settings={g:function(){this.a=this.config=[];this.a.sort=null},define:function(a,b){if(typeof a=="object")return this.Fa(a);return this.la(a,b)},la:function(a,b){var c=this[a+"_setter"];return this.a[a]=c?c.call(this,a,b):b},Fa:function(a){if(a)for(var b in a)this.la(b,a[b])},O:function(a,b){var c=dhtmlx.extend({},b);typeof a=="object"&&!a.tagName&&dhtmlx.extend(c,a);this.Fa(c)},v:function(a,b){for(var c in b)switch(typeof a[c]){case "object":a[c]=this.v(a[c]||{},b[c]);break;case "undefined":a[c]= b[c];break;default:break}return a},$:function(a,b,c){if(typeof a=="object"&&!a.tagName)a=a.container;this.b=dhtmlx.toNode(a);if(!this.b&&c)this.b=c(a);this.b.className+=" "+b;this.b.onselectstart=function(){return false};this.c=this.b},qb:function(a){if(typeof a=="object")return this.type_setter("type",a);this.type=dhtmlx.extend({},this.types[a]);this.customize()},customize:function(a){a&&dhtmlx.extend(this.type,a);this.type.ya=dhtmlx.Template.fromHTML(this.template_item_start(this.type));this.type.xa= this.template_item_end(this.type);this.render()},type_setter:function(a,b){this.qb(typeof b=="object"?dhtmlx.Type.add(this,b):b);return b},template_setter:function(a,b){return this.type_setter("type",{template:b})},css_setter:function(a,b){this.b.className+=" "+b;return b}}; dhtmlx.Destruction={g:function(){dhtmlx.destructors.push(this)},destructor:function(){this.destructor=function(){};this.u=this.d=null;this.l&&document.body.appendChild(this.l);this.l=null;if(this.b){this.b.innerHTML="";this.b.d=null}this.data=this.b=this.c=null;this.h=this.H={}}};dhtmlx.destructors=[]; dhtmlx.event(window,"unload",function(){for(var a=0;a=this.data.limit)a=this.data.limit-1;if(this.callEvent("onBeforePageChange",[this.a.page,a])){this.data.page=a*1;this.refresh();this.callEvent("onAfterPageChange",[a])}},types:{"default":{template:dhtmlx.Template.fromHTML("{common.pages()}"), pages:function(a){var b="";if(a.page==-1)return"";a.min=a.page-Math.round((a.group-1)/2);a.max=a.min+a.group-1;if(a.min<0){a.max+=a.min*-1;a.min=0}if(a.max>=a.limit){a.min-=Math.min(a.min,a.max-a.limit+1);a.max=a.limit-1}for(var c=a.min||0;c<=a.max;c++)b+=this.button({id:c,index:c+1,selected:c==a.page?"_selected":""});return b},page:function(a){return a.page+1},first:function(){return this.button({id:"first",index:" << ",selected:""})},last:function(){return this.button({id:"last",index:" >> ", selected:""})},prev:function(){return this.button({id:"prev",index:"<",selected:""})},next:function(){return this.button({id:"next",index:">",selected:""})},button:dhtmlx.Template.fromHTML("
{obj.index}
")}},refresh:function(){var a=this.a;a.limit=Math.ceil(a.count/a.size);if(a.limit&&a.limit!=a.old_limit)a.page=Math.min(a.limit-1,a.page);var b=a.page;if(b!=-1&&b!=a.old_page||a.limit!=a.old_limit){this.render();this.callEvent("onRefresh", []);a.old_limit=a.limit;a.old_page=a.page}},template_item_start:dhtmlx.Template.fromHTML("
"),template_item_end:dhtmlx.Template.fromHTML("
")};dhtmlx.SingleRender={g:function(){},D:function(a){return this.type.ya(a,this.type)+this.type.template(a,this.type)+this.type.xa},render:function(){if(!this.callEvent||this.callEvent("onBeforeRender",[this.data])){if(this.data)this.c.innerHTML=this.D(this.data);this.callEvent&&this.callEvent("onAfterRender",[])}}}; dhtmlx.ui.Tooltip=function(a){this.name="Tooltip";this.version="3.0";if(typeof a=="string")a={template:a};dhtmlx.extend(this,dhtmlx.Settings);dhtmlx.extend(this,dhtmlx.SingleRender);this.O(a,{type:"default",dy:0,dx:20});this.c=this.b=document.createElement("DIV");this.b.className="dhx_tooltip";dhtmlx.html.insertBefore(this.b,document.body.firstChild)}; dhtmlx.ui.Tooltip.prototype={show:function(a,b){if(this.data!=a){this.data=a;this.render(a)}this.b.style.top=b.y+this.a.dy+"px";this.b.style.left=b.x+this.a.dx+"px";this.b.style.display="block"},hide:function(){this.data=null;this.b.style.display="none"},types:{"default":dhtmlx.Template.fromHTML("{obj.id}")},template_item_start:dhtmlx.Template.empty,template_item_end:dhtmlx.Template.empty}; dhtmlx.AutoTooltip={tooltip_setter:function(a,b){var c=new dhtmlx.ui.Tooltip(b);this.attachEvent("onMouseMove",function(d,e){c.show(this.get(d),dhtmlx.html.pos(e))});this.attachEvent("onMouseOut",function(){c.hide()});this.attachEvent("onMouseMoving",function(){c.hide()});return c}};dhtmlx.compat=function(a,b){dhtmlx.compat[a]&&dhtmlx.compat[a](b)}; (function(){if(!window.dhtmlxError){var a=function(){};window.dhtmlxError={catchError:a,throwError:a};window.convertStringToBoolean=function(c){return!!c};window.dhtmlxEventable=function(c){dhtmlx.extend(c,dhtmlx.EventSystem)};var b={getXMLTopNode:function(){},doXPath:function(c){return dhtmlx.DataDriver.xml.xpath(this.xml,c)},xmlDoc:{responseXML:true}};dhtmlx.compat.dataProcessor=function(c){var d="_sendData",e="_in_progress",g="_tMode",i="_waitMode";c[d]=function(l,j){if(l){if(j)this[e][j]=(new Date).valueOf(); if(!this.callEvent("onBeforeDataSending",j?[j,this.getState(j)]:[]))return false;var m=this,p=this.serverProcessor;this[g]!="POST"?dhtmlx.ajax().get(p+(p.indexOf("?")!=-1?"&":"?")+this.serialize(l,j),"",function(q,n){b.xml=dhtmlx.DataDriver.xml.checkResponse(q,n);m.afterUpdate(m,null,null,null,b)}):dhtmlx.ajax().post(p,this.serialize(l,j),function(q,n){b.xml=dhtmlx.DataDriver.xml.checkResponse(q,n);m.afterUpdate(m,null,null,null,b)});this[i]++}}}}})(); dhtmlx.DataProcessor={Ra:function(a){var b="_methods";a[b]=["setItemStyle","","changeId","remove"];this.attachEvent("onAfterAdd",function(c){a.setUpdated(c,true,"inserted")});this.data.attachEvent("onStoreLoad",dhtmlx.bind(function(c,d){c.getUserData&&c.getUserData(d,this.ga)},this));this.attachEvent("onBeforeDelete",function(c){var d=a.getState(c);if(d=="inserted"){a.setUpdated(c,false);return true}if(d=="deleted")return false;if(d=="true_deleted")return true;a.setUpdated(c,true,"deleted");return false}); this.attachEvent("onAfterEditStop",function(c){a.setUpdated(c,true,"updated")});b="_getRowData";a[b]=function(c){c=this.obj.data.get(c);var d={};for(var e in c)if(e.indexOf("_")!==0)d[e]=c[e];return d};b="_clearUpdateFlag";a[b]=function(){};this.ga={};a.attachEvent("insertCallback",this.ma);a.attachEvent("updateCallback",this.ma);a.attachEvent("deleteCallback",function(c,d){this.obj.setUserData(d,this.action_param,"true_deleted");this.obj.remove(d)});dhtmlx.compat("dataProcessor",a)},ma:function(a, b){this.obj.data.set(b,dhtmlx.DataDriver.xml.getDetails(a.firstChild));this.obj.data.refresh(b)},setItemStyle:function(a,b){if(a=this.m(a))a.style.cssText+=";"+b},changeId:function(a,b){this.data.order[this.data.indexById(a)]=b;this.data.pull[b]=this.data.pull[a];this.data.get(b).id=b;delete this.data.pull[a];this.data.refresh()},setUserData:function(a,b,c){if(a)this.data.get(a)[b]=c;else this.ga[b]=c},getUserData:function(a,b){return a?this.data.get(a)[b]:this.ga[b]}}; (function(){var a="_dp_init";dhtmlx.DataProcessor[a]=dhtmlx.DataProcessor.Ra})(); dhtmlx.compat.dnd=function(){if(window.dhtmlDragAndDropObject){var a="_dragged",b=dhtmlDragAndDropObject.prototype.checkLanding;dhtmlDragAndDropObject.prototype.checkLanding=function(j,m,p){b.apply(this,arguments);if(!p){dhtmlx.DragControl.o=dhtmlx.DragControl.o||{};dhtmlx.DragControl.K(j,m,true)}};var c=dhtmlDragAndDropObject.prototype.stopDrag;dhtmlDragAndDropObject.prototype.stopDrag=function(j,m,p){if(!p)if(dhtmlx.DragControl.i){dhtmlx.DragControl.n=d.dragStartNode;dhtmlx.DragControl.R(j,true)}c.apply(this, arguments)};var d=new dhtmlDragAndDropObject,e=dhtmlx.DragControl.da;dhtmlx.DragControl.da=function(){e.apply(this,arguments);var j=dhtmlx.DragControl.o;if(j){for(var m=[],p=[],q=0;q"+a.innerHTML+""}}; dhtmlx.DragItem={g:function(){if(!this.a||this.a.drag)dhtmlx.DragItem.wa(this);else if(this.a)this.drag_setter=function(a,b){if(b){this.wa(this);delete this.drag_setter}return b};if(this.dragMarker){this.attachEvent("onBeforeDragIn",this.dragMarker);this.attachEvent("onDragOut",this.dragMarker)}},wa:function(a){dhtmlx.DragControl.addDrop(a.b,a,true);dhtmlx.DragControl.addDrag(a.b,a)},onDragIn:function(a,b,c){b=this.locate(c)||null;var d=dhtmlx.DragControl.o,e=dhtmlx.DragControl.getMaster(a);a=this.m(b)|| this.b;if(a==dhtmlx.DragControl.A)return a;d.target=b;d.to=e;if(!this.callEvent("onBeforeDragIn",[d,c]))return d.id=null;dhtmlx.html.addCss(a,"dhx_drag_over");return a},onDragOut:function(a,b,c,d){a=this.locate(d)||null;c=this.m(a)||(c?dhtmlx.DragControl.getMaster(c).b:window.undefined);if(c==dhtmlx.DragControl.A)return null;c=dhtmlx.DragControl.o;dhtmlx.html.removeCss(dhtmlx.DragControl.A,"dhx_drag_over");c.target=c.to=null;this.callEvent("onDragOut",[c,d]);return null},onDrop:function(a,b,c,d){b= dhtmlx.DragControl.o;b.from=dhtmlx.DragControl.getMaster(a);b.to=this;b.index=b.target?this.indexById(b.target):this.dataCount();b.new_id=dhtmlx.uid();if(this.callEvent("onBeforeDrop",[b,d])){if(b.from==b.to)this.move(b.source,b.index);else b.from&&b.from.move(b.source,b.index,b.to,b.new_id);this.callEvent("onAfterDrop",[b,d])}},onDrag:function(a,b){a=this.locate(b);var c=[a];if(a){if(this.getSelected){var d=this.getSelected();if(dhtmlx.PowerArray.find.call(d,a)!=-1)c=d}var e=dhtmlx.DragControl.o= {source:c,start:a};e.from=this;if(this.callEvent("onBeforeDrag",[e,b]))return e.html||this.D(this.get(a))}return null}}; dhtmlx.EditAbility={g:function(){this.L=this.p=null;this.attachEvent("onEditKeyPress",function(a,b,c){if(a==13&&!c)this.stopEdit();else a==27&&this.stopEdit(true)});this.attachEvent("onBeforeRender",function(){this.stopEdit()})},isEdit:function(){return this.p},edit:function(a){if(this.stopEdit(false,a))if(this.callEvent("onBeforeEditStart",[a])){var b=this.data.get(a);if(!b.$template){b.$template="edit";this.data.refresh(a);this.p=a;this.pb(a);this.L(true,b);this.callEvent("onAfterEditStart",[a])}}}, stopEdit:function(a,b){if(!this.p)return true;if(this.p==b)return false;if(!this.callEvent("onBeforeEditStop",[this.p]))return false;var c=this.data.get(this.p);c.$template=null;a||this.L(false,c);a=this.p;this.L=this.p=null;this.data.refresh(a);this.callEvent("onAfterEditStop",[a]);return true},pb:function(a){var b=this.m(a),c="",d="",e=[];if(b){var g=b.getElementsByTagName("*"),i="";for(a=0;a100||a.length>this.data.dataCount/2},ba:function(a){if(typeof a!="object")a=[a];if(a.length){if(this.ab(a))this.data.refresh(); else for(var b=0;bc.Y)break;for(var d=a;!this.u[d];)d--;var e=this.u[d],g=a*c.W+(this.data.min||0);if(g>(this.data.max||Infinity))break;var i=Math.min(g+c.W-1,this.data.max||Infinity),l=this.U(c.S),j=this.data.getIndexRange(g,i);if(!j.length)break;l.innerHTML=j.map(this.D,this).join("");for(var m= 0;m0){e.style.height=n+"px";this.u[a+1]=e}else{if(q<0)dhtmlx.html.remove(e);else e.style.height=q+"px";if(n>0){var w=this.u[a+1]=this.U(n);dhtmlx.html.insertBefore(w,l.nextSibling,this.c)}}a++}if(this.I.length){a=this.indexById(this.I[0]);l=this.indexById(this.I.pop())+1;if(l>a){if(!this.callEvent("onDataRequest", [a,l-a]))return false;this.data.feed.call(this,a,l-a)}}},ua:function(){var a=this.c.scrollTop,b=Math.max(this.c.scrollWidth,this.c.offsetWidth)-18,c=this.c.offsetHeight,d=this.X(),e=Math.floor(b/d.x)||1,g=Math.floor(a/d.y);c=Math.ceil((c+a)/d.y)-1;var i=this.data.max?this.data.max-this.data.min:this.data.dataCount(),l=Math.ceil(i/e)*d.y;return{s:g,Y:c,xb:a,cb:l,S:d.y,W:e}}}; dhtmlx.DataStore=function(){this.name="DataStore";dhtmlx.extend(this,dhtmlx.EventSystem);this.setDriver("xml");this.pull={};this.order=dhtmlx.toArray()}; dhtmlx.DataStore.prototype={setDriver:function(a){this.driver=dhtmlx.DataDriver[a]},jb:function(a){for(var b=this.driver.getInfo(a),c=this.driver.getRecords(a),d=(b.s||0)*1,e=0,g=0;gb){var c=b;b=a;a=c}}else{a=this.min||0;b=Math.min(this.max||Infinity,this.dataCount()-1)}return this.getIndexRange(a,b)},getIndexRange:function(a,b){b=Math.min(b,this.dataCount()- 1);var c=dhtmlx.toArray();for(a=a;a<=b;a++)c.push(this.get(this.order[a]));return c},dataCount:function(){return this.order.length},exists:function(a){return!!this.pull[a]},move:function(a,b){if(!(a<0||b<0)){var c=this.idByIndex(a),d=this.get(c);this.order.removeAt(a);this.order.insertAt(c,Math.min(this.order.length,b));this.callEvent("onStoreUpdated",[c,d,"move"])}},add:function(a,b){var c=this.id(a),d=this.dataCount();if(dhtmlx.isNotDefined(b)||b<0)b=d;if(b>d)b=Math.min(this.order.length,b);if(this.callEvent("onbeforeAdd", [c,b])){if(this.exists(c))return null;this.pull[c]=a;this.order.insertAt(c,b);if(this.q){var e=this.q.length;if(!b&&this.order.length)e=0;this.q.insertAt(c,e)}this.callEvent("onafterAdd",[c,b]);this.callEvent("onStoreUpdated",[c,a,"add"]);return c}},remove:function(a){if(a instanceof Array)for(var b=0;bb?1:ab?1:ab?1:a0&&a-c*0.75d+e)d+=c;this.b.scrollTop=d}return true}, j:"dhx_f_id",on_click:{dhx_dataview_item:function(a,b){if(this.stopEdit(false,b))if(this.a.select)this.a.select=="multiselect"?this.select(b,a.ctrlKey,a.shiftKey):this.select(b)}},on_dblclick:{dhx_dataview_item:function(a,b){this.a.edit&&this.edit(b)}},on_mouse_move:{},types:{"default":{css:"default",template:dhtmlx.Template.fromHTML("
{obj.text}
"),template_edit:dhtmlx.Template.fromHTML("
"), template_loading:dhtmlx.Template.fromHTML("
Loading...
"),width:210,height:115,margin:0,padding:10,border:1}},template_item_start:dhtmlx.Template.fromHTML("
"),template_item_end:dhtmlx.Template.fromHTML("
")}; dhtmlx.compat("layout");dhtmlx.math={};dhtmlx.math.tb=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F"];dhtmlx.math.toHex=function(a,b){a=parseInt(a,10);for(str="";a>0;){str=this.tb[a%16]+str;a=Math.floor(a/16)}for(;str.length")},addSector:function(a,b,c,d,e,g,i){var l=[];l.push(d);l.push(Math.floor(e*i));for(var j=b;j"+this.B.join("\n")+"";a.d=b;this.B=[]}};if(!dhtmlx.chart)dhtmlx.chart={}; dhtmlx.chart.line={pvt_render_line:function(a,b,c,d){var e,g,i,l,j,m,p=new dhtmlx.ui.Map(this.j),q=!!this.a.yAxis;if(q&&typeof this.a.yAxis.end!="undefied"&&typeof this.a.yAxis.start!="undefied"&&this.a.yAxis.step){e=parseFloat(this.a.yAxis.end);g=parseFloat(this.a.yAxis.start)}else{e=this.max(this.a.value);g=this.min(this.a.value)}this.ra(a,b,c,d,g,e);if(q){e=parseFloat(this.a.yAxis.end);g=parseFloat(this.a.yAxis.start)}var n=parseInt(this.a.padding.top,10),w=parseInt(this.a.padding.left,10),z=parseInt(this.a.padding.bottom, 10),A=parseInt(this.a.padding.right,10),r=d-n-z;if(g!=e){var D=this.ta(g,e);l=D[0];i=D[1];j=r/l;if(!q){m=j>10?j:10;j=(r-m)/l}}else{i=1;m=0;j=(r-10)/e}var O=Math.round((c-w-A)/b.length),K=Math.floor(O/2);if(b.length){for(var P=function(G){G=this.a.value(G);var H=(parseFloat(G)-g)*i;q||(H+=m/j);if(g==e)H=e;var x=d-Math.floor(j*H)-z;if(H<0)x=d-n;if(G>e)x=n;if(G10?j:10;j=(r-m)/l}}else{i=1;m=0;j=(r-10)/e}l=Math.floor((c-z-parseInt(this.a.padding.right,10))/b.length);var D=parseInt(this.a.width,10);if(D>l)D=l-2;var O=Math.floor((l-D)/2),K=typeof this.a.radius!="undefined"?parseInt(this.a.radius,10):Math.round(D/5),P=false,v=this.a.gradient;if(v===true){P=true;v=false}else if(v){v=a.createLinearGradient(0,d-w,0,A);this.a.gradient(v)}var B=0;if(A&&!n){B=d- A;this.w(a,0,B+0.5,c,B+0.5,"#000000",1)}for(n=0;ne)r=e;r-=g;r*=i;if(g==e)r=e;var C=z+O+n*l,I=d-A;this.qa(C+Math.floor(D/2),b[n]);if(r<0||this.a.yAxis&&r===0)this.renderTextAt(true,true,C+Math.floor(D/2),I,this.a.label(b[n]));else{q||(r+=m/j);var Q=v||this.a.color.call(this,b[n]);if(this.a.border){a.beginPath();a.fillStyle=Q;this.Q(a,C,I,D,K,j,r,0);a.lineTo(C,0);a.fill();a.fillStyle="#000000";a.globalAlpha=0.37;a.beginPath();this.Q(a,C,I,D,K,j,r, 0);a.fill()}a.globalAlpha=this.a.alpha.call(this,b[n]);a.fillStyle=v||this.a.color.call(this,b[n]);a.beginPath();var G=this.Q(a,C,I,D,K,j,r,this.a.border?1:0);if(v&&!P)a.lineTo(C+(this.a.border?1:0),0);a.fill();a.globalAlpha=1;if(P){var H=a.createLinearGradient(0,I-j*r+2,0,I);H.addColorStop(0,Q);H.addColorStop(0.1,Q);H.addColorStop(1,"#FFFFFF");a.fillStyle=H;a.beginPath();G=this.Q(a,C+2,I,D-4,K,j,r,1);a.fill()}this.renderTextAt(true,true,C+Math.floor(D/2),G[1],this.a.label(b[n]));p.addRect(b[n].id, [C,G[1],G[0],I])}}this.pa(a,b,c,d);p.render(this.b)},Q:function(a,b,c,d,e,g,i,l){var j=0;if(e>g*i){var m=(e-g*i)/e;j=-Math.acos(m)+Math.PI/2}a.moveTo(b+l,c);var p=c-Math.floor(g*i)+e+(e?0:l);eg.total_height)c+=d-g.total_height-a.lineWidth/2;if(g.valign=="middle"&&d>g.total_height)c+=(d-g.total_height)/2-a.lineWidth/2;c+=e*g.height;a.moveTo(i,c);d=i+g.marker.width-g.marker.height+1;a.lineTo(d,c);a.stroke();this.renderText(d+g.marker.width/2+5,c-g.marker.height/2,g.template(b))},Xa:function(a,b){var c=0;if(this.a.legend)c=this.a.legend.width*(this.a.legend.align== "right"?-1:1);a=(a+c)/2;b/=2;c=Math.min(a,b)-this.a.padding.top;return{x:a,y:b,radius:c}},ja:function(a,b,c,d,e,g,i){a.lineWidth=1;if(d<=0&&e>=0||d>=0&&e<=Math.PI||d<=Math.PI&&e>=Math.PI){if(d<0&&e>0){d=0;this.oa(a,b,c,g,d,e)}if(dMath.PI){e=Math.PI;this.oa(a,b,c,g,d,e)}var l=(this.a.height||Math.floor(g/4))/this.a.cant;a.beginPath();a.arc(b,c,g,d,e,false);a.lineTo(b+g*Math.cos(e),c+g*Math.sin(e)+l);a.arc(b,c+l,g,e,d,true);a.lineTo(b+g*Math.cos(d),c+g*Math.sin(d));a.fill();i&&a.stroke()}}, oa:function(a,b,c,d,e,g){a.beginPath();a.arc(b,c,d,e,g,false);a.stroke()},Ma:function(a,b,c,d){for(var e=["#676767","#7b7b7b","#a0a0a0","#bcbcbc","#d1d1d1","#d6d6d6"],g=e.length-1;g>-1;g--){a.beginPath();a.fillStyle=e[g];a.arc(b+2,c+2,d+g,0,Math.PI*2,true);a.fill()}},Wa:function(a){a.addColorStop(0,"#ffffff");a.addColorStop(0.7,"#7a7a7a");a.addColorStop(1,"#000000");return a},rb:function(a,b,c,d,e,g){a.globalAlpha=0.3;a.beginPath();var i;if(typeof this.a.gradient!="function"){i=a.createRadialGradient(e, g,d/4,b,c,d);i=this.Wa(i)}else i=this.a.gradient(i);a.fillStyle=i;a.arc(b,c,d,0,Math.PI*2,true);a.fill();a.globalAlpha=1},na:function(a,b,c,d,e,g,i,l){if(i=this.renderText(0,0,i,0,1)){var j=i.scrollWidth;i.style.width=j+"px";if(j>a)j=a;var m=8;if(l)m=j/1.8;var p=d+(e-d)/2;c-=(m-8)/2;var q=-m,n=-8,w="left";if(p>=Math.PI/2&&p=Math.PI){q=-j-q+1;w="right"}d=(b+Math.floor(c*Math.sin(p)))*g+n;m=a+Math.floor((c+m/2)*Math.cos(p))+q;var z=eb*g)d+=this.a.height||Math.floor(c/4);i.style.top=d+"px";i.style.left=m+"px";i.style.width=j+"px";i.style.textAlign=w;i.style.whiteSpace="nowrap"}}}; dhtmlx.Group={g:function(){this.data.attachEvent("onStoreLoad",dhtmlx.bind(function(){this.a.group&&this.group(this.a.group,false)},this));this.attachEvent("onBeforeRender",dhtmlx.bind(function(a){if(this.a.sort){a.block();a.sort(this.a.sort);a.unblock()}},this));this.attachEvent("onBeforeSort",dhtmlx.bind(function(){this.a.sort=null},this))},Za:function(a,b){a.attachEvent("onClearAll",dhtmlx.bind(function(){this.ungroup(false)},b))},sum:function(a,b){a=dhtmlx.Template.setter(0,a);b=b||this.data; var c=0;b.each(function(d){c+=a(d)*1});return c},min:function(a,b){a=dhtmlx.Template.setter(0,a);b=b||this.data;var c=Infinity;b.each(function(d){if(a(d)*1c)c=a(d)*1});return c},sb:function(a){var b=function(j,m){j=dhtmlx.Template.setter(0,j);return j(m[0])},c=dhtmlx.Template.setter(0,a.by);a.map[c]||(a.map[c]=[c,b]);var d={},e=[];this.data.each(function(j){var m=c(j); if(!d[m]){e.push({id:m});d[m]=dhtmlx.toArray()}d[m].push(j)});for(var g in a.map){var i=a.map[g][1]||b;if(typeof i!="function")i=this[i];for(var l=0;l5?10:5;c=parseInt(l,10)*i;if(c>Math.abs(a))d=a<=0||a','","");this.element_.insertAdjacentHTML("BeforeEnd",S.join(""))};x.stroke=function(f){var h=[],k=l(f?this.fillStyle:this.strokeStyle),o=k.color,s=k.alpha*this.globalAlpha,u=k=10;h.push("u.x)u.x=t.x;if(k.y==null||t.yu.y)u.y=t.y}}h.push(' ">');if(f)if(typeof this.fillStyle=="object"){var F=this.fillStyle,M=0,J={x:0,y:0};o=0;var L=1;if(F.type_=="gradient"){k=F.x0_/this.arcScaleX_;u=F.y0_/ this.arcScaleY_;y=F.x1_/this.arcScaleX_;t=F.y1_/this.arcScaleY_;var E=this.getCoords_(k,u),S=this.getCoords_(y,t);k=S.x-E.x;u=S.y-E.y;M=Math.atan2(k,u)*180/Math.PI;if(M<0)M+=360;if(M<1.0E-6)M=0}else{E=this.getCoords_(F.x0_,F.y0_);o=u.x-k.x;u=u.y-k.y;J={x:(E.x-k.x)/o,y:(E.y-k.y)/u};o/=this.arcScaleX_*v;u/=this.arcScaleY_*v;var T=A.max(o,u);o=2*F.r0_/T;L=2*F.r1_/T-o}var N=F.colors_;N.sort(function(aa,ba){return aa.offset-ba.offset});k=N.length;var U=N[0].color,V=N[k-1].color,W=N[0].alpha*this.globalAlpha, X=N[k-1].alpha*this.globalAlpha,Z=[];for(y=0;y')}else h.push('');else{var Y=this.lineScale_*this.lineWidth;if(Y<1)s*=Y;h.push("')}h.push("");this.element_.insertAdjacentHTML("beforeEnd",h.join(""))};x.fill=function(){this.stroke(true)};x.closePath=function(){this.currentPath_.push({type:"close"})};x.getCoords_=function(f,h){var k=this.m_;return{x:v*(f*k[0][0]+h*k[1][0]+k[2][0])-B,y:v*(f*k[0][1]+h*k[1][1]+k[2][1])-B}};x.save=function(){var f={};i(this,f);this.aStack_.push(f);this.mStack_.push(this.m_); this.m_=g(e(),this.m_)};x.restore=function(){i(this.aStack_.pop(),this);this.m_=this.mStack_.pop()};x.translate=function(f,h){f=[[1,0,0],[0,1,0],[f,h,1]];n(this,g(f,this.m_),false)};x.rotate=function(f){var h=O(f),k=D(f);h=[[h,k,0],[-k,h,0],[0,0,1]];n(this,g(h,this.m_),false)};x.scale=function(f,h){this.arcScaleX_*=f;this.arcScaleY_*=h;f=[[f,0,0],[0,h,0],[0,0,1]];n(this,g(f,this.m_),true)};x.transform=function(f,h,k,o,s,u){s=[[f,h,0],[k,o,0],[s,u,1]];n(this,g(s,this.m_),true)};x.setTransform=function(f, h,k,o,s,u){f=[[f,h,0],[k,o,0],[s,u,1]];n(this,f,true)};x.clip=function(){};x.arcTo=function(){};x.createPattern=function(){return new z};w.prototype.addColorStop=function(f,h){h=l(h);this.colors_.push({offset:f,color:h.color,alpha:h.alpha})};G_vmlCanvasManager=I;CanvasRenderingContext2D=m;CanvasGradient=w;CanvasPattern=z}();if(dhtmlx&&dhtmlx.N)dhtmlx.N["thirdparty/excanvas/excanvas.js"]=true;