/*
dhtmlxGantt v.2.1.1 Standard
This software is covered by GPL license. You also can obtain Commercial or Enterprise license to use it in non-GPL project - please contact sales@dhtmlx.com. Usage without proper license is prohibited.
(c) Dinamenta, UAB.
*/
function dtmlXMLLoaderObject(t,e,n,i){return this.xmlDoc="",this.async="undefined"!=typeof n?n:!0,this.onloadAction=t||null,this.mainObject=e||null,this.waitCall=null,this.rSeed=i||!1,this}function callerFunction(t,e){return this.handler=function(n){return n||(n=window.event),t(n,e),!0},this.handler}function getAbsoluteLeft(t){return getOffset(t).left}function getAbsoluteTop(t){return getOffset(t).top}function getOffsetSum(t){for(var e=0,n=0;t;)e+=parseInt(t.offsetTop),n+=parseInt(t.offsetLeft),t=t.offsetParent;
return{top:e,left:n}}function getOffsetRect(t){var e=t.getBoundingClientRect(),n=document.body,i=document.documentElement,a=window.pageYOffset||i.scrollTop||n.scrollTop,s=window.pageXOffset||i.scrollLeft||n.scrollLeft,r=i.clientTop||n.clientTop||0,o=i.clientLeft||n.clientLeft||0,d=e.top+a-r,l=e.left+s-o;return{top:Math.round(d),left:Math.round(l)}}function getOffset(t){return t.getBoundingClientRect?getOffsetRect(t):getOffsetSum(t)}function convertStringToBoolean(t){switch("string"==typeof t&&(t=t.toLowerCase()),t){case"1":case"true":case"yes":case"y":case 1:case!0:return!0;
default:return!1}}function getUrlSymbol(t){return-1!=t.indexOf("?")?"&":"?"}function dhtmlDragAndDropObject(){return window.dhtmlDragAndDrop?window.dhtmlDragAndDrop:(this.lastLanding=0,this.dragNode=0,this.dragStartNode=0,this.dragStartObject=0,this.tempDOMU=null,this.tempDOMM=null,this.waitDrag=0,window.dhtmlDragAndDrop=this,this)}function _dhtmlxError(){return this.catches||(this.catches=[]),this}function dhtmlXHeir(t,e){for(var n in e)"function"==typeof e[n]&&(t[n]=e[n]);return t}function dhtmlxEvent(t,e,n){t.addEventListener?t.addEventListener(e,n,!1):t.attachEvent&&t.attachEvent("on"+e,n)
}function dhtmlxDetachEvent(t,e,n){t.removeEventListener?t.removeEventListener(e,n,!1):t.detachEvent&&t.detachEvent("on"+e,n)}function dhtmlxDnD(t,e){e&&(this._settings=e),dhtmlxEventable(this),dhtmlxEvent(t,"mousedown",dhtmlx.bind(function(e){this.dragStart(t,e)},this))}function dataProcessor(t){return this.serverProcessor=t,this.action_param="!nativeeditor_status",this.object=null,this.updatedRows=[],this.autoUpdate=!0,this.updateMode="cell",this._tMode="GET",this.post_delim="_",this._waitMode=0,this._in_progress={},this._invalid={},this.mandatoryFields=[],this.messages=[],this.styles={updated:"font-weight:bold;",inserted:"font-weight:bold;",deleted:"text-decoration : line-through;",invalid:"background-color:FFE0E0;",invalid_cell:"border-bottom:2px solid red;",error:"color:red;",clear:"font-weight:normal;text-decoration:none;"},this.enableUTFencoding(!0),dhtmlxEventable(this),this
}window.dhtmlx||(dhtmlx=function(t){for(var e in t)dhtmlx[e]=t[e];return dhtmlx}),dhtmlx.extend_api=function(t,e,n){var i=window[t];i&&(window[t]=function(t){var n;if(t&&"object"==typeof t&&!t.tagName){n=i.apply(this,e._init?e._init(t):arguments);for(var a in dhtmlx)e[a]&&this[e[a]](dhtmlx[a]);for(var a in t)e[a]?this[e[a]](t[a]):0===a.indexOf("on")&&this.attachEvent(a,t[a])}else n=i.apply(this,arguments);return e._patch&&e._patch(this),n||this},window[t].prototype=i.prototype,n&&dhtmlXHeir(window[t].prototype,n))
},dhtmlxAjax={get:function(t,e){var n=new dtmlXMLLoaderObject(!0);return n.async=arguments.length<3,n.waitCall=e,n.loadXML(t),n},post:function(t,e,n){var i=new dtmlXMLLoaderObject(!0);return i.async=arguments.length<4,i.waitCall=n,i.loadXML(t,!0,e),i},getSync:function(t){return this.get(t,null,!0)},postSync:function(t,e){return this.post(t,e,null,!0)}},dtmlXMLLoaderObject.count=0,dtmlXMLLoaderObject.prototype.waitLoadFunction=function(t){var e=!0;return this.check=function(){if(t&&t.onloadAction&&(!t.xmlDoc.readyState||4==t.xmlDoc.readyState)){if(!e)return;
e=!1,dtmlXMLLoaderObject.count++,"function"==typeof t.onloadAction&&t.onloadAction(t.mainObject,null,null,null,t),t.waitCall&&(t.waitCall.call(this,t),t.waitCall=null)}},this.check},dtmlXMLLoaderObject.prototype.getXMLTopNode=function(t,e){var n;if(this.xmlDoc.responseXML){var i=this.xmlDoc.responseXML.getElementsByTagName(t);if(0===i.length&&-1!=t.indexOf(":"))var i=this.xmlDoc.responseXML.getElementsByTagName(t.split(":")[1]);n=i[0]}else n=this.xmlDoc.documentElement;if(n)return this._retry=!1,n;
if(!this._retry&&_isIE){this._retry=!0;var e=this.xmlDoc;return this.loadXMLString(this.xmlDoc.responseText.replace(/^[\s]+/,""),!0),this.getXMLTopNode(t,e)}return dhtmlxError.throwError("LoadXML","Incorrect XML",[e||this.xmlDoc,this.mainObject]),document.createElement("DIV")},dtmlXMLLoaderObject.prototype.loadXMLString=function(t,e){if(_isIE)this.xmlDoc=new ActiveXObject("Microsoft.XMLDOM"),this.xmlDoc.async=this.async,this.xmlDoc.onreadystatechange=function(){},this.xmlDoc.loadXML(t);else{var n=new DOMParser;
this.xmlDoc=n.parseFromString(t,"text/xml")}e||(this.onloadAction&&this.onloadAction(this.mainObject,null,null,null,this),this.waitCall&&(this.waitCall(),this.waitCall=null))},dtmlXMLLoaderObject.prototype.loadXML=function(t,e,n,i){this.rSeed&&(t+=(-1!=t.indexOf("?")?"&":"?")+"a_dhx_rSeed="+(new Date).valueOf()),this.filePath=t,this.xmlDoc=!_isIE&&window.XMLHttpRequest?new XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP"),this.async&&(this.xmlDoc.onreadystatechange=new this.waitLoadFunction(this)),this.xmlDoc.open(e?"POST":"GET",t,this.async),i?(this.xmlDoc.setRequestHeader("User-Agent","dhtmlxRPC v0.1 ("+navigator.userAgent+")"),this.xmlDoc.setRequestHeader("Content-type","text/xml")):e&&this.xmlDoc.setRequestHeader("Content-type","application/x-www-form-urlencoded"),this.xmlDoc.setRequestHeader("X-Requested-With","XMLHttpRequest"),this.xmlDoc.send(null||n),this.async||new this.waitLoadFunction(this)()
},dtmlXMLLoaderObject.prototype.destructor=function(){return this._filterXPath=null,this._getAllNamedChilds=null,this._retry=null,this.async=null,this.rSeed=null,this.filePath=null,this.onloadAction=null,this.mainObject=null,this.xmlDoc=null,this.doXPath=null,this.doXPathOpera=null,this.doXSLTransToObject=null,this.doXSLTransToString=null,this.loadXML=null,this.loadXMLString=null,this.doSerialization=null,this.xmlNodeToJSON=null,this.getXMLTopNode=null,this.setXSLParamValue=null,null},dtmlXMLLoaderObject.prototype.xmlNodeToJSON=function(t){for(var e={},n=0;n_FFrv)&&window.dhtmlDragAndDrop.calculateFramePosition());
try{parent.dhtmlDragAndDrop&&parent!=window&&parent!=t&&parent.dhtmlDragAndDrop.initFrameRoute(window)}catch(n){}for(var i=0;i-1&&(_isChrome=!0),-1!=navigator.userAgent.indexOf("Safari")||-1!=navigator.userAgent.indexOf("Konqueror")?(_KHTMLrv=parseFloat(navigator.userAgent.substr(navigator.userAgent.indexOf("Safari")+7,5)),_KHTMLrv>525?(_isFF=!0,_FFrv=1.9):_isKHTML=!0):-1!=navigator.userAgent.indexOf("Opera")?(_isOpera=!0,_OperaRv=parseFloat(navigator.userAgent.substr(navigator.userAgent.indexOf("Opera")+6,3))):-1!=navigator.appName.indexOf("Microsoft")?(_isIE=!0,-1==navigator.appVersion.indexOf("MSIE 8.0")&&-1==navigator.appVersion.indexOf("MSIE 9.0")&&-1==navigator.appVersion.indexOf("MSIE 10.0")||"BackCompat"==document.compatMode||(_isIE=8)):"Netscape"==navigator.appName&&-1!=navigator.userAgent.indexOf("Trident")?_isIE=8:(_isFF=!0,_FFrv=parseFloat(navigator.userAgent.split("rv:")[1])),dtmlXMLLoaderObject.prototype.doXPath=function(t,e,n,i){if(_isKHTML||!_isIE&&!window.XPathResult)return this.doXPathOpera(t,e);
if(_isIE)return e||(e=this.xmlDoc.nodeName?this.xmlDoc:this.xmlDoc.responseXML),e||dhtmlxError.throwError("LoadXML","Incorrect XML",[e||this.xmlDoc,this.mainObject]),n&&e.setProperty("SelectionNamespaces","xmlns:xsl='"+n+"'"),"single"==i?e.selectSingleNode(t):e.selectNodes(t)||new Array(0);var a=e;e||(e=this.xmlDoc.nodeName?this.xmlDoc:this.xmlDoc.responseXML),e||dhtmlxError.throwError("LoadXML","Incorrect XML",[e||this.xmlDoc,this.mainObject]),-1!=e.nodeName.indexOf("document")?a=e:(a=e,e=e.ownerDocument);
var s=XPathResult.ANY_TYPE;"single"==i&&(s=XPathResult.FIRST_ORDERED_NODE_TYPE);var r=[],o=e.evaluate(t,a,function(){return n},s,null);if(s==XPathResult.FIRST_ORDERED_NODE_TYPE)return o.singleNodeValue;for(var d=o.iterateNext();d;)r[r.length]=d,d=o.iterateNext();return r},_dhtmlxError.prototype.catchError=function(t,e){this.catches[t]=e},_dhtmlxError.prototype.throwError=function(t,e,n){return this.catches[t]?this.catches[t](t,e,n):this.catches.ALL?this.catches.ALL(t,e,n):(window.alert("Error type: "+arguments[0]+"\nDescription: "+arguments[1]),null)
},window.dhtmlxError=new _dhtmlxError,dtmlXMLLoaderObject.prototype.doXPathOpera=function(t,e){var n=t.replace(/[\/]+/gi,"/").split("/"),i=null,a=1;if(!n.length)return[];if("."==n[0])i=[e];else{if(""!==n[0])return[];i=(this.xmlDoc.responseXML||this.xmlDoc).getElementsByTagName(n[a].replace(/\[[^\]]*\]/g,"")),a++}for(a;a