
dhtmlx=function(obj){for (var a in obj)dhtmlx[a]=obj[a];return dhtmlx};dhtmlx.extend_api=function(name,map,ext){var t = window[name];if (!t)return;window[name]=function(obj){if (obj && typeof obj == "object" && !obj.tagName){var that = t.apply(this,(map._init?map._init(obj):arguments));for (var a in dhtmlx)if (map[a])this[map[a]](dhtmlx[a]);for (var a in obj){if (map[a])this[map[a]](obj[a]);else if (a.indexOf("on")==0){this.attachEvent(a,obj[a])}}}else
 var that = t.apply(this,arguments);if (map._patch)map._patch(this);return that||this};window[name].prototype=t.prototype;if (ext)dhtmlXHeir(window[name].prototype,ext)};dhtmlxAjax={get:function(url,callback){var t=new dtmlXMLLoaderObject(true);t.async=(arguments.length<3);t.waitCall=callback;t.loadXML(url)
 return t},
 post:function(url,post,callback){var t=new dtmlXMLLoaderObject(true);t.async=(arguments.length<4);t.waitCall=callback;t.loadXML(url,true,post)
 return t},
 getSync:function(url){return this.get(url,null,true)
 },
 postSync:function(url,post){return this.post(url,post,null,true)}};function dtmlXMLLoaderObject(funcObject, dhtmlObject, async, rSeed){this.xmlDoc="";if (typeof (async)!= "undefined")
 this.async=async;else
 this.async=true;this.onloadAction=funcObject||null;this.mainObject=dhtmlObject||null;this.waitCall=null;this.rSeed=rSeed||false;return this};dtmlXMLLoaderObject.prototype.waitLoadFunction=function(dhtmlObject){var once = true;this.check=function (){if ((dhtmlObject)&&(dhtmlObject.onloadAction != null)){if ((!dhtmlObject.xmlDoc.readyState)||(dhtmlObject.xmlDoc.readyState == 4)){if (!once)return;once=false;if (typeof dhtmlObject.onloadAction == "function")dhtmlObject.onloadAction(dhtmlObject.mainObject, null, null, null, dhtmlObject);if (dhtmlObject.waitCall){dhtmlObject.waitCall.call(this,dhtmlObject);dhtmlObject.waitCall=null}}}};return this.check};dtmlXMLLoaderObject.prototype.getXMLTopNode=function(tagName, oldObj){if (this.xmlDoc.responseXML){var temp = this.xmlDoc.responseXML.getElementsByTagName(tagName);if(temp.length==0 && tagName.indexOf(":")!=-1)
 var temp = this.xmlDoc.responseXML.getElementsByTagName((tagName.split(":"))[1]);var z = temp[0]}else
 var z = this.xmlDoc.documentElement;if (z){this._retry=false;return z};if ((_isIE)&&(!this._retry)){var xmlString = this.xmlDoc.responseText;var oldObj = this.xmlDoc;this._retry=true;this.xmlDoc=new ActiveXObject("Microsoft.XMLDOM");this.xmlDoc.async=false;this.xmlDoc["loadXM"+"L"](xmlString);return this.getXMLTopNode(tagName, oldObj)};dhtmlxError.throwError("LoadXML", "Incorrect XML", [
 (oldObj||this.xmlDoc),
 this.mainObject
 ]);return document.createElement("DIV")};dtmlXMLLoaderObject.prototype.loadXMLString=function(xmlString){{
 try{var parser = new DOMParser();this.xmlDoc=parser.parseFromString(xmlString, "text/xml")}catch (e){this.xmlDoc=new ActiveXObject("Microsoft.XMLDOM");this.xmlDoc.async=this.async;this.xmlDoc["loadXM"+"L"](xmlString)}};this.onloadAction(this.mainObject, null, null, null, this);if (this.waitCall){this.waitCall();this.waitCall=null}};dtmlXMLLoaderObject.prototype.loadXML=function(filePath, postMode, postVars, rpc){if (this.rSeed)filePath+=((filePath.indexOf("?") != -1) ? "&" : "?")+"a_dhx_rSeed="+(new Date()).valueOf();this.filePath=filePath;if ((!_isIE)&&(window.XMLHttpRequest))
 this.xmlDoc=new XMLHttpRequest();else {if (document.implementation&&document.implementation.createDocument){this.xmlDoc=document.implementation.createDocument("", "", null);this.xmlDoc.onload=new this.waitLoadFunction(this);this.xmlDoc.load(filePath);return}else
 this.xmlDoc=new ActiveXObject("Microsoft.XMLHTTP")};if (this.async)this.xmlDoc.onreadystatechange=new this.waitLoadFunction(this);this.xmlDoc.open(postMode ? "POST" : "GET", filePath, this.async);if (rpc){this.xmlDoc.setRequestHeader("User-Agent", "dhtmlxRPC v0.1 ("+navigator.userAgent+")");this.xmlDoc.setRequestHeader("Content-type", "text/xml")}else if (postMode)this.xmlDoc.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');this.xmlDoc.setRequestHeader("X-Requested-With","XMLHttpRequest");this.xmlDoc.send(null||postVars);if (!this.async)(new this.waitLoadFunction(this))()};dtmlXMLLoaderObject.prototype.destructor=function(){this.onloadAction=null;this.mainObject=null;this.xmlDoc=null;return null};dtmlXMLLoaderObject.prototype.xmlNodeToJSON = function(node){var t={};for (var i=0;i<node.attributes.length;i++)t[node.attributes[i].name]=node.attributes[i].value;t["_tagvalue"]=node.firstChild?node.firstChild.nodeValue:"";for (var i=0;i<node.childNodes.length;i++){var name=node.childNodes[i].tagName;if (name){if (!t[name])t[name]=[];t[name].push(this.xmlNodeToJSON(node.childNodes[i]))}};return t};function callerFunction(funcObject, dhtmlObject){this.handler=function(e){if (!e)e=window.event;funcObject(e, dhtmlObject);return true};return this.handler};function getAbsoluteLeft(htmlObject){return getOffset(htmlObject).left};function getAbsoluteTop(htmlObject){return getOffset(htmlObject).top};function getOffsetSum(elem) {var top=0, left=0;while(elem){top = top + parseInt(elem.offsetTop);left = left + parseInt(elem.offsetLeft);elem = elem.offsetParent};return {top: top, left: left}};function getOffsetRect(elem) {var box = elem.getBoundingClientRect();var body = document.body;var docElem = document.documentElement;var scrollTop = window.pageYOffset || docElem.scrollTop || body.scrollTop;var scrollLeft = window.pageXOffset || docElem.scrollLeft || body.scrollLeft;var clientTop = docElem.clientTop || body.clientTop || 0;var clientLeft = docElem.clientLeft || body.clientLeft || 0;var top = box.top + scrollTop - clientTop;var left = box.left + scrollLeft - clientLeft;return {top: Math.round(top), left: Math.round(left) }};function getOffset(elem) {if (elem.getBoundingClientRect && !_isChrome){return getOffsetRect(elem)}else {return getOffsetSum(elem)}};function convertStringToBoolean(inputString){if (typeof (inputString)== "string")
 inputString=inputString.toLowerCase();switch (inputString){case "1":
 case "true":
 case "yes":
 case "y":
 case 1:
 case true:
 return true;break;default: return false}};function getUrlSymbol(str){if (str.indexOf("?")!= -1)
 return "&"
 else
 return "?"
};function dhtmlDragAndDropObject(){if (window.dhtmlDragAndDrop)return 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;return this};dhtmlDragAndDropObject.prototype.removeDraggableItem=function(htmlNode){htmlNode.onmousedown=null;htmlNode.dragStarter=null;htmlNode.dragLanding=null};dhtmlDragAndDropObject.prototype.addDraggableItem=function(htmlNode, dhtmlObject){htmlNode.onmousedown=this.preCreateDragCopy;htmlNode.dragStarter=dhtmlObject;this.addDragLanding(htmlNode, dhtmlObject)};dhtmlDragAndDropObject.prototype.addDragLanding=function(htmlNode, dhtmlObject){htmlNode.dragLanding=dhtmlObject};dhtmlDragAndDropObject.prototype.preCreateDragCopy=function(e){if ((e||event)&& (e||event).button == 2)
 return;if (window.dhtmlDragAndDrop.waitDrag){window.dhtmlDragAndDrop.waitDrag=0;document.body.onmouseup=window.dhtmlDragAndDrop.tempDOMU;document.body.onmousemove=window.dhtmlDragAndDrop.tempDOMM;return false};window.dhtmlDragAndDrop.waitDrag=1;window.dhtmlDragAndDrop.tempDOMU=document.body.onmouseup;window.dhtmlDragAndDrop.tempDOMM=document.body.onmousemove;window.dhtmlDragAndDrop.dragStartNode=this;window.dhtmlDragAndDrop.dragStartObject=this.dragStarter;document.body.onmouseup=window.dhtmlDragAndDrop.preCreateDragCopy;document.body.onmousemove=window.dhtmlDragAndDrop.callDrag;window.dhtmlDragAndDrop.downtime = new Date().valueOf();if ((e)&&(e.preventDefault)){e.preventDefault();return false};return false};dhtmlDragAndDropObject.prototype.callDrag=function(e){if (!e)e=window.event;dragger=window.dhtmlDragAndDrop;if ((new Date()).valueOf()-dragger.downtime<100) return;if ((e.button == 0)&&(_isIE))
 return dragger.stopDrag();if (!dragger.dragNode&&dragger.waitDrag){dragger.dragNode=dragger.dragStartObject._createDragNode(dragger.dragStartNode, e);if (!dragger.dragNode)return dragger.stopDrag();dragger.dragNode.onselectstart=function(){return false};dragger.gldragNode=dragger.dragNode;document.body.appendChild(dragger.dragNode);document.body.onmouseup=dragger.stopDrag;dragger.waitDrag=0;dragger.dragNode.pWindow=window;dragger.initFrameRoute()};if (dragger.dragNode.parentNode != window.document.body){var grd = dragger.gldragNode;if (dragger.gldragNode.old)grd=dragger.gldragNode.old;grd.parentNode.removeChild(grd);var oldBody = dragger.dragNode.pWindow;if (_isIE){var div = document.createElement("Div");div.innerHTML=dragger.dragNode.outerHTML;dragger.dragNode=div.childNodes[0]}else
 dragger.dragNode=dragger.dragNode.cloneNode(true);dragger.dragNode.pWindow=window;dragger.gldragNode.old=dragger.dragNode;document.body.appendChild(dragger.dragNode);oldBody.dhtmlDragAndDrop.dragNode=dragger.dragNode};dragger.dragNode.style.left=e.clientX+15+(dragger.fx
 ? dragger.fx*(-1)
 : 0)
 +(document.body.scrollLeft||document.documentElement.scrollLeft)+"px";dragger.dragNode.style.top=e.clientY+3+(dragger.fy
 ? dragger.fy*(-1)
 : 0)
 +(document.body.scrollTop||document.documentElement.scrollTop)+"px";if (!e.srcElement)var z = e.target;else
 z=e.srcElement;dragger.checkLanding(z, e)};dhtmlDragAndDropObject.prototype.calculateFramePosition=function(n){if (window.name){var el = parent.frames[window.name].frameElement.offsetParent;var fx = 0;var fy = 0;while (el){fx+=el.offsetLeft;fy+=el.offsetTop;el=el.offsetParent};if ((parent.dhtmlDragAndDrop)){var ls = parent.dhtmlDragAndDrop.calculateFramePosition(1);fx+=ls.split('_')[0]*1;fy+=ls.split('_')[1]*1};if (n)return fx+"_"+fy;else
 this.fx=fx;this.fy=fy};return "0_0"};dhtmlDragAndDropObject.prototype.checkLanding=function(htmlObject, e){if ((htmlObject)&&(htmlObject.dragLanding)){if (this.lastLanding)this.lastLanding.dragLanding._dragOut(this.lastLanding);this.lastLanding=htmlObject;this.lastLanding=this.lastLanding.dragLanding._dragIn(this.lastLanding, this.dragStartNode, e.clientX,
 e.clientY, e);this.lastLanding_scr=(_isIE ? e.srcElement : e.target)}else {if ((htmlObject)&&(htmlObject.tagName != "BODY"))
 this.checkLanding(htmlObject.parentNode, e);else {if (this.lastLanding)this.lastLanding.dragLanding._dragOut(this.lastLanding, e.clientX, e.clientY, e);this.lastLanding=0;if (this._onNotFound)this._onNotFound()}}};dhtmlDragAndDropObject.prototype.stopDrag=function(e, mode){dragger=window.dhtmlDragAndDrop;if (!mode){dragger.stopFrameRoute();var temp = dragger.lastLanding;dragger.lastLanding=null;if (temp)temp.dragLanding._drag(dragger.dragStartNode, dragger.dragStartObject, temp, (_isIE
 ? event.srcElement
 : e.target))};dragger.lastLanding=null;if ((dragger.dragNode)&&(dragger.dragNode.parentNode == document.body))
 dragger.dragNode.parentNode.removeChild(dragger.dragNode);dragger.dragNode=0;dragger.gldragNode=0;dragger.fx=0;dragger.fy=0;dragger.dragStartNode=0;dragger.dragStartObject=0;document.body.onmouseup=dragger.tempDOMU;document.body.onmousemove=dragger.tempDOMM;dragger.tempDOMU=null;dragger.tempDOMM=null;dragger.waitDrag=0};dhtmlDragAndDropObject.prototype.stopFrameRoute=function(win){if (win)window.dhtmlDragAndDrop.stopDrag(1, 1);for (var i = 0;i < window.frames.length;i++){try{if ((window.frames[i] != win)&&(window.frames[i].dhtmlDragAndDrop))
 window.frames[i].dhtmlDragAndDrop.stopFrameRoute(window)}catch(e){}};try{if ((parent.dhtmlDragAndDrop)&&(parent != window)&&(parent != win))
 parent.dhtmlDragAndDrop.stopFrameRoute(window)}catch(e){}};dhtmlDragAndDropObject.prototype.initFrameRoute=function(win, mode){if (win){window.dhtmlDragAndDrop.preCreateDragCopy();window.dhtmlDragAndDrop.dragStartNode=win.dhtmlDragAndDrop.dragStartNode;window.dhtmlDragAndDrop.dragStartObject=win.dhtmlDragAndDrop.dragStartObject;window.dhtmlDragAndDrop.dragNode=win.dhtmlDragAndDrop.dragNode;window.dhtmlDragAndDrop.gldragNode=win.dhtmlDragAndDrop.dragNode;window.document.body.onmouseup=window.dhtmlDragAndDrop.stopDrag;window.waitDrag=0;if (((!_isIE)&&(mode))&&((!_isFF)||(_FFrv < 1.8)))
 window.dhtmlDragAndDrop.calculateFramePosition()};try{if ((parent.dhtmlDragAndDrop)&&(parent != window)&&(parent != win))
 parent.dhtmlDragAndDrop.initFrameRoute(window)}catch(e){};for (var i = 0;i < window.frames.length;i++){try{if ((window.frames[i] != win)&&(window.frames[i].dhtmlDragAndDrop))
 window.frames[i].dhtmlDragAndDrop.initFrameRoute(window, ((!win||mode) ? 1 : 0))}catch(e){}}};var _isFF = false;var _isIE = false;var _isOpera = false;var _isKHTML = false;var _isMacOS = false;var _isChrome = false;if (navigator.userAgent.indexOf('Macintosh')!= -1)
 _isMacOS=true;if (navigator.userAgent.toLowerCase().indexOf('chrome')>-1)
 _isChrome=true;if ((navigator.userAgent.indexOf('Safari')!= -1)||(navigator.userAgent.indexOf('Konqueror') != -1)){var _KHTMLrv = parseFloat(navigator.userAgent.substr(navigator.userAgent.indexOf('Safari')+7, 5));if (_KHTMLrv > 525){_isFF=true;var _FFrv = 1.9}else
 _isKHTML=true}else if (navigator.userAgent.indexOf('Opera')!= -1){_isOpera=true;_OperaRv=parseFloat(navigator.userAgent.substr(navigator.userAgent.indexOf('Opera')+6, 3))}else if (navigator.appName.indexOf("Microsoft")!= -1){_isIE=true;if (navigator.appVersion.indexOf("MSIE 8.0")!= -1 && document.compatMode != "BackCompat") _isIE=8}else {_isFF=true;var _FFrv = parseFloat(navigator.userAgent.split("rv:")[1])
};dtmlXMLLoaderObject.prototype.doXPath=function(xpathExp, docObj, namespace, result_type){if (_isKHTML || (!_isIE && !window.XPathResult))
 return this.doXPathOpera(xpathExp, docObj);if (_isIE){if (!docObj)if (!this.xmlDoc.nodeName)docObj=this.xmlDoc.responseXML
 else
 docObj=this.xmlDoc;if (!docObj)dhtmlxError.throwError("LoadXML", "Incorrect XML", [
 (docObj||this.xmlDoc),
 this.mainObject
 ]);if (namespace != null)docObj.setProperty("SelectionNamespaces", "xmlns:xsl='"+namespace+"'");if (result_type == 'single'){return docObj.selectSingleNode(xpathExp)}else {return docObj.selectNodes(xpathExp)||new Array(0)}}else {var nodeObj = docObj;if (!docObj){if (!this.xmlDoc.nodeName){docObj=this.xmlDoc.responseXML
 }else {docObj=this.xmlDoc}};if (!docObj)dhtmlxError.throwError("LoadXML", "Incorrect XML", [
 (docObj||this.xmlDoc),
 this.mainObject
 ]);if (docObj.nodeName.indexOf("document")!= -1){nodeObj=docObj}else {nodeObj=docObj;docObj=docObj.ownerDocument};var retType = XPathResult.ANY_TYPE;if (result_type == 'single')retType=XPathResult.FIRST_ORDERED_NODE_TYPE
 var rowsCol = new Array();var col = docObj.evaluate(xpathExp, nodeObj, function(pref){return namespace
 }, retType, null);if (retType == XPathResult.FIRST_ORDERED_NODE_TYPE){return col.singleNodeValue};var thisColMemb = col.iterateNext();while (thisColMemb){rowsCol[rowsCol.length]=thisColMemb;thisColMemb=col.iterateNext()};return rowsCol}};function _dhtmlxError(type, name, params){if (!this.catches)this.catches=new Array();return this};_dhtmlxError.prototype.catchError=function(type, func_name){this.catches[type]=func_name};_dhtmlxError.prototype.throwError=function(type, name, params){if (this.catches[type])return this.catches[type](type, name, params);if (this.catches["ALL"])return this.catches["ALL"](type, name, params);alert("Error type: "+arguments[0]+"\nDescription: "+arguments[1]);return null};window.dhtmlxError=new _dhtmlxError();dtmlXMLLoaderObject.prototype.doXPathOpera=function(xpathExp, docObj){var z = xpathExp.replace(/[\/]+/gi, "/").split('/');var obj = null;var i = 1;if (!z.length)return [];if (z[0] == ".")obj=[docObj];else if (z[0] == ""){obj=(this.xmlDoc.responseXML||this.xmlDoc).getElementsByTagName(z[i].replace(/\[[^\]]*\]/g, ""));i++}else
 return [];for (i;i < z.length;i++)obj=this._getAllNamedChilds(obj, z[i]);if (z[i-1].indexOf("[")!= -1)
 obj=this._filterXPath(obj, z[i-1]);return obj};dtmlXMLLoaderObject.prototype._filterXPath=function(a, b){var c = new Array();var b = b.replace(/[^\[]*\[\@/g, "").replace(/[\[\]\@]*/g, "");for (var i = 0;i < a.length;i++)if (a[i].getAttribute(b))
 c[c.length]=a[i];return c};dtmlXMLLoaderObject.prototype._getAllNamedChilds=function(a, b){var c = new Array();if (_isKHTML)b=b.toUpperCase();for (var i = 0;i < a.length;i++)for (var j = 0;j < a[i].childNodes.length;j++){if (_isKHTML){if (a[i].childNodes[j].tagName&&a[i].childNodes[j].tagName.toUpperCase()== b)
 c[c.length]=a[i].childNodes[j]}else if (a[i].childNodes[j].tagName == b)c[c.length]=a[i].childNodes[j]};return c};function dhtmlXHeir(a, b){for (var c in b)if (typeof (b[c])== "function")
 a[c]=b[c];return a};function dhtmlxEvent(el, event, handler){if (el.addEventListener)el.addEventListener(event, handler, false);else if (el.attachEvent)el.attachEvent("on"+event, handler)};dtmlXMLLoaderObject.prototype.xslDoc=null;dtmlXMLLoaderObject.prototype.setXSLParamValue=function(paramName, paramValue, xslDoc){if (!xslDoc)xslDoc=this.xslDoc

 if (xslDoc.responseXML)xslDoc=xslDoc.responseXML;var item =
 this.doXPath("/xsl:stylesheet/xsl:variable[@name='"+paramName+"']", xslDoc,
 "http:/\/www.w3.org/1999/XSL/Transform", "single");if (item != null)item.firstChild.nodeValue=paramValue
};dtmlXMLLoaderObject.prototype.doXSLTransToObject=function(xslDoc, xmlDoc){if (!xslDoc)xslDoc=this.xslDoc;if (xslDoc.responseXML)xslDoc=xslDoc.responseXML

 if (!xmlDoc)xmlDoc=this.xmlDoc;if (xmlDoc.responseXML)xmlDoc=xmlDoc.responseXML

 
 if (!_isIE){if (!this.XSLProcessor){this.XSLProcessor=new XSLTProcessor();this.XSLProcessor.importStylesheet(xslDoc)};var result = this.XSLProcessor.transformToDocument(xmlDoc)}else {var result = new ActiveXObject("Msxml2.DOMDocument.3.0");try{xmlDoc.transformNodeToObject(xslDoc, result)}catch(e){result = xmlDoc.transformNode(xslDoc)}};return result};dtmlXMLLoaderObject.prototype.doXSLTransToString=function(xslDoc, xmlDoc){var res = this.doXSLTransToObject(xslDoc, xmlDoc);if(typeof(res)=="string")
 return res;return this.doSerialization(res)};dtmlXMLLoaderObject.prototype.doSerialization=function(xmlDoc){if (!xmlDoc)xmlDoc=this.xmlDoc;if (xmlDoc.responseXML)xmlDoc=xmlDoc.responseXML
 if (!_isIE){var xmlSerializer = new XMLSerializer();return xmlSerializer.serializeToString(xmlDoc)}else
 return xmlDoc.xml};dhtmlxEventable=function(obj){obj.dhx_SeverCatcherPath="";obj.attachEvent=function(name, catcher, callObj){name='ev_'+name.toLowerCase();if (!this[name])this[name]=new this.eventCatcher(callObj||this);return(name+':'+this[name].addEvent(catcher))};obj.callEvent=function(name, arg0){name='ev_'+name.toLowerCase();if (this[name])return this[name].apply(this, arg0);return true};obj.checkEvent=function(name){return (!!this['ev_'+name.toLowerCase()])
 };obj.eventCatcher=function(obj){var dhx_catch = [];var z = function(){var res = true;for (var i = 0;i < dhx_catch.length;i++){if (dhx_catch[i] != null){var zr = dhx_catch[i].apply(obj, arguments);res=res&&zr}};return res};z.addEvent=function(ev){if (typeof (ev)!= "function")
 ev=eval(ev);if (ev)return dhx_catch.push(ev)-1;return false};z.removeEvent=function(id){dhx_catch[id]=null};return z};obj.detachEvent=function(id){if (id != false){var list = id.split(':');this[list[0]].removeEvent(list[1])}}};function dhtmlXLayoutPanel(){};function dhtmlXLayoutObject(base, view, skin) {if (!dhtmlXContainer){alert("dhtmlxcontainer.js is missed on the page");return};var that = this;this._autodetectSkin = function() {var t = document.createElement("DIV");t.className = "dhxlayout_skin_detect";if (document.body.childNodes.length > 0)document.body.insertBefore(t, document.body.childNodes[0]);else document.body.appendChild(t);var w = t.offsetWidth;document.body.removeChild(t);t = null;if (w == 199)return "dhx_skyblue";if (w == 299)return "dhx_blue";if (w == 399)return "dhx_black";return "dhx_skyblue"};this.skin = (skin!=null?skin:this._autodetectSkin());this.setSkin = function(skin) {if (!this.skinParams[skin])return;this.skin = skin;this._CPanelHeight = this.skinParams[this.skin]["cpanel_height"];this._collapsedW = this.skinParams[this.skin]["cpanel_collapsed_width"];this._collapsedH = this.skinParams[this.skin]["cpanel_collapsed_height"];this.tpl.className = "dhtmlxLayoutPolyContainer_"+this.skin+(this._r?" dhxlayout_rtl":"");this.sizer.className = "dhxLayout_Sizer_"+this.skin;if (this.dhxWins)this.dhxWins.setSkin(this.skin);for (var a in this.polyObj)this.polyObj[a].skin = this.skin;this.base.skin = this.skin;this._fixIcons();this.setSizes()};this._dblClickTM = 200;this._mTop = 0;this._mBottom = 0;if (typeof(base)== "string") {base = document.getElementById(base)};if ((base._isWindow == true || base._isCell)&& !this.base) {if (base._isCell && base.attachLayout)return base.attachLayout(view, skin);if (base.isWindow)return base.attachLayout(view, skin);this.base = base};if (base == document.body && !this.base){document.body.style.overflow = "hidden"};if ((typeof(base)== "object" || base == document.body) && !this.base) {var contObj = document.createElement("DIV");contObj.className = "dhxcont_global_layout_area";base.appendChild(contObj);base._isLayout = true;this.cont = new dhtmlXContainer(base);this.cont.setContent(contObj);if (base == document.body){if (this.skin == "dhx_skyblue"){this.cont.obj._offsetTop = 2;this.cont.obj._offsetLeft = 2;this.cont.obj._offsetHeight = -4;this.cont.obj._offsetWidth = -4};document.body.className += " dhxlayout_fullscreened"};base.adjustContent(base, this._mTop, null, null, this._mBottom);this.base = document.createElement("DIV");this.base.style.overflow = "hidden";this.base.style.position = "absolute";this.base.style.left = "0px";this.base.style.top = "0px";this.base.style.width = contObj.childNodes[0].style.width;this.base.style.height = contObj.childNodes[0].style.height;contObj.childNodes[0].appendChild(this.base);if (base == document.body){this._tmTime = null;this._doOnResizeStart = function() {window.clearTimeout(this._tmTime);this._tmTime = window.setTimeout(function(){that._doOnResizeEnd()},200)};this._doOnResizeEnd = function() {var dim = this._defineWindowMinDimension(this.base, true);document.body.setMinContentSize(dim[1], dim[2]);document.body.adjustContent(document.body, 0);this.setSizes(false)};if (_isIE){window.attachEvent("onresize", that._doOnResizeStart)}else {window.addEventListener("resize", that._doOnResizeStart, false)}}};this.items = new Array();this.cells = function(id) {if (this.polyObj[id] != null){return this.polyObj[id]};return null};this.getIdByIndex = function(ind) {if (ind < 0)return null;if (ind >= this.items.length)return null;return this.items[ind]._idd};this.getIndexById = function(id) {if (this.cells(id)!= null) return this.cells(id).getIndex();return null};this.imagePath = dhtmlx.image_path||"codebase/imgs/";this.setImagePath = function(path) {this.imagePath = path};this.polyObj = {};this.sepHor = new Array();this.sepVer = new Array();this._layoutView = (view!=null?String(view).toUpperCase():"3E");this._minWidth = 40;this._minHeight = 40;this._CPanelBtnsWidth = 32;this.skinParams = {"glassy_blue" : {"hor_sep_height": 4, "ver_sep_width": 4, "cpanel_height": 23, "cpanel_collapsed_width": 7, "cpanel_collapsed_height": (_isFF?7:8)},
 "glassy_caramel" : {"hor_sep_height": 4, "ver_sep_width": 4, "cpanel_height": 23, "cpanel_collapsed_width": 7, "cpanel_collapsed_height": (_isFF?7:8)},
 "glassy_greenapple" : {"hor_sep_height": 4, "ver_sep_width": 4, "cpanel_height": 23, "cpanel_collapsed_width": 7, "cpanel_collapsed_height": (_isFF?7:8)},
 "glassy_rainy" : {"hor_sep_height": 4, "ver_sep_width": 4, "cpanel_height": 23, "cpanel_collapsed_width": 7, "cpanel_collapsed_height": (_isFF?7:8)},
 "glassy_raspberries": {"hor_sep_height": 4, "ver_sep_width": 4, "cpanel_height": 23, "cpanel_collapsed_width": 7, "cpanel_collapsed_height": (_isFF?7:8)},
 "glassy_yellow" : {"hor_sep_height": 4, "ver_sep_width": 4, "cpanel_height": 23, "cpanel_collapsed_width": 7, "cpanel_collapsed_height": (_isFF?7:8)},
 
 
 "aqua_dark" : {"hor_sep_height": 5, "ver_sep_width": 5, "cpanel_height": 24, "cpanel_collapsed_width": 18, "cpanel_collapsed_height": 18},
 "aqua_orange" : {"hor_sep_height": 5, "ver_sep_width": 5, "cpanel_height": 24, "cpanel_collapsed_width": 18, "cpanel_collapsed_height": 18},
 "aqua_sky" : {"hor_sep_height": 5, "ver_sep_width": 5, "cpanel_height": 24, "cpanel_collapsed_width": 18, "cpanel_collapsed_height": 18},
 
 "clear_blue" : {"hor_sep_height": 5, "ver_sep_width": 5, "cpanel_height": 26, "cpanel_collapsed_width": 18, "cpanel_collapsed_height": 18},
 "clear_green" : {"hor_sep_height": 5, "ver_sep_width": 5, "cpanel_height": 26, "cpanel_collapsed_width": 18, "cpanel_collapsed_height": 18},
 "clear_silver" : {"hor_sep_height": 5, "ver_sep_width": 5, "cpanel_height": 26, "cpanel_collapsed_width": 18, "cpanel_collapsed_height": 18},
 
 "modern_black" : {"hor_sep_height": 5, "ver_sep_width": 5, "cpanel_height": 31, "cpanel_collapsed_width": 18, "cpanel_collapsed_height": 18},
 "modern_blue" : {"hor_sep_height": 5, "ver_sep_width": 5, "cpanel_height": 31, "cpanel_collapsed_width": 18, "cpanel_collapsed_height": 18},
 "modern_red" : {"hor_sep_height": 5, "ver_sep_width": 5, "cpanel_height": 31, "cpanel_collapsed_width": 18, "cpanel_collapsed_height": 18},
 
 "dhx_black" : {"hor_sep_height": 5, "ver_sep_width": 5, "cpanel_height": 34, "cpanel_collapsed_width": 18, "cpanel_collapsed_height": 18},
 "dhx_blue" : {"hor_sep_height": 5, "ver_sep_width": 5, "cpanel_height": 34, "cpanel_collapsed_width": 18, "cpanel_collapsed_height": 18},
 "dhx_skyblue" : {"hor_sep_height": 5, "ver_sep_width": 5, "cpanel_height": 26, "cpanel_collapsed_width": 18, "cpanel_collapsed_height": 18},
 
 "standard" : {"hor_sep_height": 5, "ver_sep_width": 5, "cpanel_height": 28, "cpanel_collapsed_width": 20, "cpanel_collapsed_height": (_isFF?20:22)}};this._CPanelHeight = this.skinParams[this.skin]["cpanel_height"];this._collapsedW = this.skinParams[this.skin]["cpanel_collapsed_width"];this._collapsedH = this.skinParams[this.skin]["cpanel_collapsed_height"];this.tpl = document.createElement("TABLE");this.tpl.dir = "ltr";this.tpl.className = "dhtmlxLayoutPolyContainer_"+this.skin;this.tpl.cellSpacing = 0;this.tpl.cellPadding = 0;var bd = document.createElement("TBODY");this.tpl.appendChild(bd);this.tpl.border = 0;this.tplSizes = {};this._effects = {"collapse": false, "resize": false, "highlight": true };this.sizer = document.createElement("DIV");this.sizer.className = "dhxLayout_Sizer_"+this.skin;this.sizer.style.display = "none";document.body.appendChild(this.sizer);this._attachSizer = function(obj) {that.sizer.style.left = getAbsoluteLeft(obj)+"px";that.sizer.style.top = getAbsoluteTop(obj)+"px";that.sizer.style.width = obj.offsetWidth+"px";that.sizer.style.height = obj.offsetHeight+"px";if (that._sizerML != null)that.sizer.style.marginLeft = that._sizerML+"px";if (that._sizerMT != null)that.sizer.style.marginTop = that._sizerMT+"px";that.sizer.style.display = "";that.sizer.className = "dhxLayout_Sizer_"+that.skin;if (obj._dir != null){that.sizer.className += " "+(obj._dir=="hor"?"dhxCursorNResize":"dhxCursorWResize")}};this.listViews = function() {var views = new Array();for (var a in this.tplData){views[views.length] = a};return views};this._init = function() {this.obj = document.createElement("DIV");this.obj.className = "dhtmlxLayoutObject";this.base.appendChild(this.obj);this.obj.appendChild(this.tpl);this.w = this.obj.offsetWidth;this.h = this.obj.offsetHeight;this._xmlLoader.loadXMLString(this.tplData[this._layoutView]!=null?this.tplData[this._layoutView]:this.tplData["3E"]);this._initWindows()};this._autoHor = new Array();this._autoVer = new Array();this._dimension = new Array(320, 200);this._rowsRatio = 100;this._colsRatio = 100;this._xmlParser = function() {var tableDataH = new Array();var tableDataV = new Array();var tableSeps = {};var root = this.getXMLTopNode("layout");for (var q=0;q<root.childNodes.length;q++){if (root.childNodes[q].tagName == "row"){var row = root.childNodes[q];var tr = document.createElement("TR");that.tpl.childNodes[0].appendChild(tr);for (var w=0;w<row.childNodes.length;w++){if (row.childNodes[w].tagName == "cell"){var cell = row.childNodes[w];var td = document.createElement("TD");td._dir = "null";if (cell.getAttribute("obj")!= null) {var obj = cell.getAttribute("obj");var wh = String(cell.getAttribute("wh")).split(",");var f = isNaN(wh[0]);var tdW = (isNaN(wh[0])?parseInt(that.polyObj[wh[0]].style.width):0);for (var q1=0;q1<tableDataH.length;q1++){for (var w1=0;w1<tableDataH[q1].length;w1++){if (tableDataH[q1][w1] == obj){if (!f){f = true;var mw = that.base.offsetWidth - tableSeps[obj][0]*that.skinParams[that.skin]["ver_sep_width"];for (var r=0;r<tableDataH[q1].length;r++){if (!isNaN(tableDataH[q1][r])) {mw -= tableDataH[q1][r];wh[0] -= 1}};tdW = Math.ceil(mw/wh[0])};tableDataH[q1][w1] = tdW}}};td.style.width = tdW+"px";var f = isNaN(wh[1]);var tdH = (isNaN(wh[1])?parseInt(that.polyObj[wh[1]].style.height):0);for (var q1=0;q1<tableDataV.length;q1++){for (var w1=0;w1<tableDataV[q1].length;w1++){if (tableDataV[q1][w1] == obj){if (!f){f = true;var mh = that.base.offsetHeight - tableSeps[obj][1]*that.skinParams[that.skin]["hor_sep_height"];for (var r=0;r<tableDataV.length;r++){if (!isNaN(tableDataV[r][w1])) {mh -= tableDataV[r][w1];wh[1] -= 1}};tdH = Math.ceil(mh/wh[1])};tableDataV[q1][w1] = tdH}}};td.style.height = tdH+"px";td.className = "dhtmlxLayoutSinglePoly";td.innerHTML = "";td._minW = (cell.getAttribute("minWidth") != null ? Number(cell.getAttribute("minWidth")):that._minWidth);td._minH = (cell.getAttribute("minHeight") != null ? Number(cell.getAttribute("minHeight")):that._minHeight);td._initCPanel = (cell.getAttribute("cpanel") != null ? (cell.getAttribute("cpanel")=="false"?false:true):true);td._resize = cell.getAttribute("resize");var rd = String(cell.getAttribute("neighbors")).split(";");for (var e=0;e<rd.length;e++){var p = String(rd[e]).split(",");if (p.length > 1){rd[e] = p}};td._rowData = rd;that.polyObj[obj] = td};if (cell.getAttribute("sep")!= null) {var sep = cell.getAttribute("sep");if (sep == "hor"){td.className = "dhtmlxLayoutPolySplitterHor";td._dir = "hor";var top = cell.getAttribute("top").split(";");for (var e=0;e<top.length;e++){var p = String(top[e]).split(",");if (p.length > 1){top[e] = p}};td._top = top;var bottom = cell.getAttribute("bottom").split(";");for (var e=0;e<bottom.length;e++){var p = String(bottom[e]).split(",");if (p.length > 1){bottom[e] = p}};td._bottom = bottom;that.sepHor[that.sepHor.length] = td}else {td.className = "dhtmlxLayoutPolySplitterVer";td._dir = "ver";var left = cell.getAttribute("left").split(";");for (var e=0;e<left.length;e++){var p = String(left[e]).split(",");if (p.length > 1){left[e] = p}};td._left = left;var right = cell.getAttribute("right").split(";");for (var e=0;e<right.length;e++){var p = String(right[e]).split(",");if (p.length > 1){right[e] = p}};td._right = right;that.sepVer[that.sepVer.length] = td};td._dblClick = cell.getAttribute("dblclick");td._isSep = true;td.innerHTML = "&nbsp;"};if (cell.getAttribute("colspan")!= null) {td.colSpan = cell.getAttribute("colspan")};if (cell.getAttribute("rowspan")!= null) {td.rowSpan = cell.getAttribute("rowspan")};tr.appendChild(td)}}};if (root.childNodes[q].tagName == "autosize"){that._autoHor = (root.childNodes[q].getAttribute("hor")).split(";");that._autoVer = (root.childNodes[q].getAttribute("ver")).split(";");that._totalCols = root.childNodes[q].getAttribute("cols");that._totalRows = root.childNodes[q].getAttribute("rows");that._dimension[0] = that._totalCols * that._colsRatio;that._dimension[1] = that._totalRows * that._rowsRatio};if (root.childNodes[q].tagName == "table"){var data = root.childNodes[q].getAttribute("data");var r = String(data).split(";");for (var q1=0;q1<r.length;q1++){tableDataH[q1] = new Array();tableDataV[q1] = new Array();var c = String(r[q1]).split(",");for (var w1=0;w1<c.length;w1++){tableDataH[q1][w1] = c[w1];tableDataV[q1][w1] = c[w1];if (tableSeps[c[w1]] == null){tableSeps[c[w1]] = new Array(0, 0)}}};for (var a in tableSeps){var f = false;for (var q1=0;q1<tableDataH.length;q1++){for (var w1=0;w1<tableDataH[q1].length;w1++){if (tableDataH[q1][w1] == a && !f){f = true;for (var e1=0;e1<tableDataH[q1].length;e1++){if (tableDataH[q1][e1]!=a)tableSeps[a][0]++};for (var e1=0;e1<tableDataH.length;e1++){if (tableDataH[e1][w1]!=a)tableSeps[a][1]++}}}}}}};tableDataH = null;tableDataV = null;that._buildSurface();this.destructor()};this._xmlLoader = new dtmlXMLLoaderObject(this._xmlParser, window);this.listAutoSizes = function() {var hor = this._availAutoSize[this._layoutView+"_hor"];var ver = this._availAutoSize[this._layoutView+"_ver"];var currentHor = (this._autoHor).join(";");var currentVer = (this._autoVer).join(";");return new Array(currentHor, currentVer, hor, ver)};this.setAutoSize = function(hor, ver) {if (hor != null){var allow = false;var data = this._availAutoSize[this._layoutView+"_hor"];for (var q=0;q<data.length;q++){allow = allow || (data[q] == hor)};if (allow == true){this._autoHor = hor.split(";")}};if (ver != null){var allow = false;var data = this._availAutoSize[this._layoutView+"_ver"];for (var q=0;q<data.length;q++){allow = allow || (data[q] == ver)};if (allow == true){this._autoVer = ver.split(";")}}};this._buildSurface = function() {for (var r=0;r<this.tpl.childNodes[0].childNodes.length;r++){var tr = this.tpl.childNodes[0].childNodes[r];for (var c=0;c<tr.childNodes.length;c++){var td = tr.childNodes[c];var that = this;if (!td._isSep){td._isCell = true;td.skin = this.skin;td.getId = function() {return this._idd};td.getIndex = function() {return this._ind};td.showHeader = function() {that.showPanel(this._idd)};td.hideHeader = function() {that.hidePanel(this._idd)};td.isHeaderVisible = function() {return that.isPanelVisible(this._idd)};td.setText = function(text) {that.setText(this._idd, text)};td.getText = function() {return that.getText(this._idd)};td.expand = function() {if (!that._isCollapsed(this._idd)) return;that._expand(this._idd, "hide")};td.collapse = function() {if (that._isCollapsed(this._idd)) return;that._collapse(this._idd, "hide")};td.isCollapsed = function() {return that._isCollapsed(this._idd)};td.dock = function() {if (!that._isCollapsed(this._idd)) return;that._expand(this._idd, "dock");that.dockWindow(this._idd)};td.undock = function() {if (that._isCollapsed(this._idd)) return;that.unDockWindow(this._idd);that._collapse(this._idd, "dock")};td.setWidth = function(width) {if (!Number(width)) return;that._setWidth(this._idd, width)};td.getWidth = function() {return parseInt(this.style.width)};td.setHeight = function(height) {if (!Number(height)) return;that._setHeight(this._idd, height)};td.getHeight = function() {return parseInt(this.style.height)};td.fixSize = function(width, height) {that._fixSize(this._idd, width, height)};td.progressOn = function() {that._progressControl(this._idd, true)};td.progressOff = function() {that._progressControl(this._idd, false)};td._doOnAttachMenu = function() {this.adjustContent(this.childNodes[0], (this._noHeader?0:that.skinParams[that.skin]["cpanel_height"]));this.updateNestedObjects()};td._doOnAttachToolbar = function() {this.adjustContent(this.childNodes[0], (this._noHeader?0:that.skinParams[that.skin]["cpanel_height"]));this.updateNestedObjects()};td._doOnAttachStatusBar = function() {this.adjustContent(this.childNodes[0], (this._noHeader?0:that.skinParams[that.skin]["cpanel_height"]));this.updateNestedObjects()};td._doOnAttachURL = function(addIFrameEvents) {that._doOnAttachURL(this._idd, addIFrameEvents)}};if (td._dir == "ver"){td.onselectstart = function(e) {e = e||event;e.returnValue = false};td.onmousedown = function(e) {e = e||event;if (!this._lastClick){this._lastClick = new Date().getTime()}else {var t = this._lastClick;this._lastClick = new Date().getTime();if (t + that._dblClickTM >= this._lastClick){if (that._doOnDoubleClick(this)=== true) return}};var p = that._findDockCellsVer(this);that._resAreaData = new Array();if (p[0] != null && p[1] != null){if (String(document.body.className).search("dhxCursorWResize") == -1) {document.body.className += " dhxCursorWResize"};that._resObj = this;that._anyExpL = p[0];that._anyExpR = p[1];that._collectResAreaData(p);that._resX = e.clientX;if (that._effects["resize"] == false){that._attachSizer(this);that.sizer._leftXStart = parseInt(that.sizer.style.left);var objLeft = that.polyObj[that._anyExpL[0]];that._resXMaxWidthLeft = parseInt(objLeft.style.width)-that._minWidth;var objRight = that.polyObj[that._anyExpR[0]];that._resXMaxWidthRight = parseInt(objRight.style.width)-that._minWidth;if (that._alterSizes.length > 0){for (var q=0;q<that._alterSizes.length;q++){for (var w=0;w<that._anyExpL.length;w++){if (that._alterSizes[q][0] == that._anyExpL[w]){var newVal = that._resXMaxWidthLeft = parseInt(objLeft.style.width)-that._alterSizes[q][1];if (newVal < that._resXMaxWidthLeft){that._resXMaxWidthLeft = newVal}}};for (var w=0;w<that._anyExpR.length;w++){if (that._alterSizes[q][0] == that._anyExpR[w]){newVal = parseInt(objRight.style.width)-that._alterSizes[q][1];if (newVal < that._resXMaxWidthRight){that._resXMaxWidthRight = newVal}}}}};that._resXStart = that._resX};that._resFunc = that._resizeVer;that._showCovers()}};td.onmouseup = function() {if (that._effects["resize"] == true){that._resizeStop();that._anyExpL = null;that._anyExpR = null}}};if (td._dir == "hor"){td.onselectstart = function(e) {e = e||event;e.returnValue = false};td.onmousedown = function(e) {e = e||event;if (!this._lastClick){this._lastClick = new Date().getTime()}else {var t = this._lastClick;this._lastClick = new Date().getTime();if (t + that._dblClickTM >= this._lastClick){if (that._doOnDoubleClick(this)=== true) return}};var p = that._findDockCellsHor(this);that._resAreaData = new Array();if (p[0] != null && p[1] != null){if (String(document.body.className).search("dhxCursorNResize") == -1) {document.body.className += " dhxCursorNResize"};that._resObj = this;that._anyExpT = p[0];that._anyExpB = p[1];that._collectResAreaData(p);that._resY = e.clientY;if (that._effects["resize"] == false){that._attachSizer(this);that.sizer._topYStart = parseInt(that.sizer.style.top);var objTop = that.polyObj[that._anyExpT[0]];that._resYMaxHeightTop = parseInt(objTop.style.height)-that._minHeight;var objBottom = that.polyObj[that._anyExpB[0]];that._resYMaxHeightBottom = parseInt(objBottom.style.height)-that._minHeight;if (that._alterSizes.length > 0){for (var q=0;q<that._alterSizes.length;q++){for (var w=0;w<that._anyExpT.length;w++){if (that._alterSizes[q][0] == that._anyExpT[w]){var newVal = parseInt(objTop.style.height)-that._alterSizes[q][2]-(objTop.childNodes[0].style.display!="none"?that.skinParams[that.skin]["cpanel_height"]:0);if (newVal < that._resYMaxHeightTop){that._resYMaxHeightTop = newVal}}};for (var w=0;w<that._anyExpB.length;w++){if (that._alterSizes[q][0] == that._anyExpB[w]){var newVal = parseInt(objBottom.style.height)-that._alterSizes[q][2]-(objBottom.childNodes[0].style.display!="none"?that.skinParams[that.skin]["cpanel_height"]:0);if (newVal < that._resYMaxHeightBottom){that._resYMaxHeightBottom = newVal}}}}};that._resYStart = that._resY};that._resFunc = that._resizeHor;that._showCovers()}};td.onmouseup = function() {if (that._effects["resize"] == true){that._resizeStop();that._anyExpT = null;that._anyExpB = null}}}}};for (var a in this.polyObj){this.polyObj[a]._collapsed = false;this.polyObj[a]._idd = a;this.polyObj[a]._ind = this.items.length;this.items[this.items.length] = this.polyObj[a];var nod = document.createElement("DIV");nod.style.position = "relative";nod.style.left = "0px";nod.style.top = "0px";nod.style.width = this.polyObj[a].style.width;nod.style.height = this.polyObj[a].style.height;nod.style.overflow = "hidden";this.polyObj[a].appendChild(nod);var bar = document.createElement("DIV");bar._dockCell = a;bar._resize = this.polyObj[a]._resize;bar.className = "dhtmlxPolyInfoBar";bar.innerHTML = "<div class='dhtmlxInfoBarLabel'>"+a+"</div>"+
 "<div class='dhtmlxInfoBarButtonsFake'><div class='dhtmlxInfoBarButtonsFake2'></div></div>"+
 "<div class='dhtmlxInfoButtonDock' title='Dock'></div>"+
 "<div class='dhtmlxInfoButtonUnDock' style='display: none;' title='UnDock'></div>"+
 "<div class='dhtmlxInfoButtonShowHide_"+bar._resize+"' title='Collapse'></div>"+
 "<div class='dhtmlxLineL'></div>"+
 "<div class='dhtmlxLineR'></div>";if (this.polyObj[a]._initCPanel == true){bar._h = this._CPanelHeight;bar.style.display = ""}else {bar._h = 0;bar.style.display = "none"};this.polyObj[a].childNodes[0].appendChild(bar);bar.ondblclick = function() {that.callEvent("onDblClick", [this._dockCell])};bar.childNodes[4].onclick = function() {var pId = this.parentNode._dockCell;if (that._isCollapsed(pId)) {that._expand(pId, "hide")}else {that._collapse(pId, "hide")}};for (var r=0;r<bar.childNodes.length;r++){bar.childNodes[r].onselectstart = function(e) {e = e||event;e.returnValue = false}};var contObj = document.createElement("DIV");contObj.className = "dhxcont_global_content_area";this.polyObj[a].childNodes[0].appendChild(contObj);var cont = new dhtmlXContainer(this.polyObj[a]);cont.setContent(contObj);this.polyObj[a].adjustContent(this.polyObj[a].childNodes[0], this.skinParams[this.skin]["cpanel_height"])};this._fixIcons()};this._resX = null;this._resY = null;this._resObj = null;this._resFunc = null;this._anyExpL = null;this._anyExpR = null;this._anyExpT = null;this._anyExpB = null;this._expand = function(pId, mode) {this._doExpand(this.polyObj[pId]._resize, pId, this.polyObj[pId]._rowData, mode)};this._collapse = function(pId, mode) {if (this._isCollapsed(pId)) return;this.polyObj[pId]._savedW = parseInt(this.polyObj[pId].style.width);this.polyObj[pId]._savedH = parseInt(this.polyObj[pId].style.height);this._doCollapse(this.polyObj[pId]._resize, pId, this.polyObj[pId]._rowData, mode)};this._isCollapsed = function(pId) {return this.polyObj[pId]._collapsed};this._checkAlterMinSize = function(data) {this._alterSizes = new Array();for (var q=0;q<data.length;q++){for (var w=0;w<data[q].length;w++){if (this.polyObj[data[q][w]].layout != null){var dims = this.polyObj[data[q][w]].layout._defineWindowMinDimension(this.polyObj[data[q][w]], true);dims[0] = data[q][w];this._alterSizes[this._alterSizes.length] = dims}}}};this._findDockCellsVer = function(resObj) {var res = new Array(null, null);if (resObj == null){return res};var anyExpL = null;for (var q=resObj._left.length-1;q>=0;q--){if (anyExpL == null){if (typeof(resObj._left[q])== "object") {var isBlocked = false;for (var w=0;w<resObj._left[q].length;w++){isBlocked = isBlocked || (this.polyObj[resObj._left[q][w]]._isBlockedWidth||false)};if (!isBlocked){anyExpL = resObj._left[q]}}else if(this.polyObj[resObj._left[q]]._collapsed == false){if (!this.polyObj[resObj._left[q]]._isBlockedWidth){anyExpL = resObj._left[q]}}}};var anyExpR = null;for (var q=0;q<resObj._right.length;q++){if (anyExpR == null){if (typeof(resObj._right[q])== "object") {var isBlocked = false;for (var w=0;w<resObj._right[q].length;w++){isBlocked = isBlocked || (this.polyObj[resObj._right[q][w]]._isBlockedWidth||false)};if (!isBlocked){anyExpR = resObj._right[q]}}else if(this.polyObj[resObj._right[q]]._collapsed == false){if (!this.polyObj[resObj._right[q]]._isBlockedWidth){anyExpR = resObj._right[q]}}}};if (anyExpL == null || anyExpR == null){return res};if (typeof(anyExpL)== "string") {anyExpL = new Array(anyExpL)};if (typeof(anyExpR)== "string") {anyExpR = new Array(anyExpR)};res[0] = anyExpL;res[1] = anyExpR;this._checkAlterMinSize(res);this._minWLAlter = 0;this._minWRAlter = 0;if (this._alterSizes.length > 0 && this._effects["resize"] == true){var objL = new Array();var objR = new Array();for (var q=0;q<anyExpL.length;q++){objL[q] = this.polyObj[anyExpL[q]]};for (var q=0;q<anyExpR.length;q++){objR[q] = this.polyObj[anyExpR[q]]};for (var q=0;q<objL.length;q++){for (var w=0;w<this._alterSizes.length;w++){if (this._alterSizes[w][0] == objL[q]._idd && this._minWLAlter < this._alterSizes[w][1]){this._minWLAlter = this._alterSizes[w][1]}}};for (var q=0;q<objR.length;q++){for (var w=0;w<this._alterSizes.length;w++){if (this._alterSizes[w][0] == objR[q]._idd && this._maxWRAlter < this._alterSizes[w][1]){this._minWRAlter = this._alterSizes[w][1]}}}};return res};this._findDockCellsHor = function(resObj) {var res = new Array(null, null);if (resObj == null){return res};var anyExpT = null;for (var q=resObj._top.length-1;q>=0;q--){if (anyExpT == null){if (typeof(resObj._top[q])== "object") {var isBlocked = false;for (var w=0;w<resObj._top[q].length;w++){isBlocked = isBlocked || (this.polyObj[resObj._top[q][w]]._isBlockedHeight||false)};if (!isBlocked){anyExpT = resObj._top[q]}}else if(this.polyObj[resObj._top[q]]._collapsed == false){if (!this.polyObj[resObj._top[q]]._isBlockedHeight){anyExpT = resObj._top[q]}}}};var anyExpB = null;for (var q=0;q<resObj._bottom.length;q++){if (anyExpB == null){if (typeof(resObj._bottom[q])== "object") {var isBlocked = false;for (var w=0;w<resObj._bottom[q].length;w++){isBlocked = isBlocked || (this.polyObj[resObj._bottom[q][w]]._isBlockedHeight||false)};if (!isBlocked){anyExpB = resObj._bottom[q]}}else if(this.polyObj[resObj._bottom[q]]._collapsed == false){if (!this.polyObj[resObj._bottom[q]]._isBlockedHeight){anyExpB = resObj._bottom[q]}}}};if (anyExpT == null || anyExpB == null){return res};if (typeof(anyExpT)== "string") {anyExpT = new Array(anyExpT)};if (typeof(anyExpB)== "string") {anyExpB = new Array(anyExpB)};res[0] = anyExpT;res[1] = anyExpB;this._checkAlterMinSize(res);this._minHTAlter = 0;this._minHBAlter = 0;if (this._alterSizes.length > 0 && this._effects["resize"] == true){var objT = new Array();var objB = new Array();for (var q=0;q<anyExpT.length;q++){objT[q] = this.polyObj[anyExpT[q]]};for (var q=0;q<anyExpB.length;q++){objB[q] = this.polyObj[anyExpB[q]]};for (var q=0;q<objT.length;q++){for (var w=0;w<this._alterSizes.length;w++){if (this._alterSizes[w][0] == objT[q]._idd && this._minHTAlter < this._alterSizes[w][2]){this._minHTAlter = this._alterSizes[w][2]}}};for (var q=0;q<objB.length;q++){for (var w=0;w<this._alterSizes.length;w++){if (this._alterSizes[w][0] == objB[q]._idd && this._minHBAlter < this._alterSizes[w][2]){this._minHBAlter = this._alterSizes[w][2]}}}};return res};this._resizeVer = function(e) {if (this._resObj == null || this._anyExpL == null || this._anyExpR == null)return;if (this._effects["resize"] == false){this._resX = e.clientX;var offsetX = e.clientX - this._resXStart;if (-offsetX > this._resXMaxWidthLeft && offsetX < 0){offsetX = -this._resXMaxWidthLeft;this._resX = offsetX+this._resXStart};if (offsetX > this._resXMaxWidthRight && offsetX > 0){offsetX = this._resXMaxWidthRight;this._resX = offsetX+this._resXStart};this.sizer.style.left = this.sizer._leftXStart+offsetX+"px";return};var anyExpL = this._anyExpL;var anyExpR = this._anyExpR;var newX = e.clientX;var offsetX = e.clientX - that._resX;var objL = new Array();var objR = new Array();for (var q=0;q<anyExpL.length;q++){objL[q] = this.polyObj[anyExpL[q]]};for (var q=0;q<anyExpR.length;q++){objR[q] = this.polyObj[anyExpR[q]]};var wL = parseInt(objL[0].style.width);var wR = parseInt(objR[0].style.width);if (offsetX < 0){var newWL = wL + offsetX;if (newWL > objL[0]._minW && newWL > this._minWLAlter){var newWR = wR + wL - newWL;for (var q=0;q<objL.length;q++)this._setW(objL[q], newWL);for (var q=0;q<objR.length;q++)this._setW(objR[q], newWR);this._resX = newX}}else if (offsetX > 0){var newWR = wR - offsetX;if (newWR > objR[0]._minW && newWR > this._minWRAlter){var newWL = wL + wR - newWR;for (var q=0;q<objL.length;q++)this._setW(objL[q], newWL);for (var q=0;q<objR.length;q++)this._setW(objR[q], newWR);this._resX = newX}}};this._resizeHor = function(e) {if (this._resObj == null || this._anyExpT == null || this._anyExpB == null)return;if (this._effects["resize"] == false){this._resY = e.clientY;var offsetY = e.clientY - this._resYStart;if (-offsetY > this._resYMaxHeightTop && offsetY < 0){offsetY = -this._resYMaxHeightTop;this._resY = offsetY + this._resYStart};if (offsetY > this._resYMaxHeightBottom && offsetY > 0){offsetY = this._resYMaxHeightBottom;this._resY = offsetY + this._resYStart};this.sizer.style.top = this.sizer._topYStart+offsetY+"px";return};var anyExpT = this._anyExpT;var anyExpB = this._anyExpB;var newY = e.clientY;var offsetY = e.clientY - that._resY;var objT = new Array();var objB = new Array();for (var q=0;q<anyExpT.length;q++){objT[q] = this.polyObj[anyExpT[q]]};for (var q=0;q<anyExpB.length;q++){objB[q] = this.polyObj[anyExpB[q]]};var hT = parseInt(objT[0].style.height);var hB = parseInt(objB[0].style.height);if (offsetY < 0){var newHT = hT + offsetY;if (newHT > objT[0]._minH + this._minHTAlter){var newHB = hB + hT - newHT;for (var q=0;q<objT.length;q++)this._setH(objT[q], newHT);for (var q=0;q<objB.length;q++)this._setH(objB[q], newHB);this._resY = newY}}else if (offsetY > 0){var newHB = hB - offsetY;if (newHB > objB[0]._minH + this._minHBAlter){var newHT = hT + hB - newHB;for (var q=0;q<objT.length;q++)this._setH(objT[q], newHT);for (var q=0;q<objB.length;q++)this._setH(objB[q], newHB);this._resY = newY}}};this._resizeStop = function() {var p = document.body.className;if (p.search("dhxCursorWResize")!== -1 || p.search("dhxCursorNResize") !== -1) {document.body.className = String(document.body.className).replace(/dhxCursorWResize/g,"").replace(/dhxCursorNResize/g,"")};if (this._resObj == null)return;if (this._effects["resize"] == false){this.sizer.style.display = "none";if (this._resObj._dir == "hor"){var objTop = (typeof(this._anyExpT[0])=="object"?this._anyExpT[0][0]:this._anyExpT[0]);var offsetY = this._resY-this._resYStart;var newH = parseInt(this.polyObj[objTop].style.height)+offsetY;this._setHeight(objTop, newH)}else {var objLeft = (typeof(this._anyExpL[0])=="object"?this._anyExpL[0][0]:this._anyExpL[0]);var offsetX = this._resX-this._resXStart;var newW = parseInt(this.polyObj[objLeft].style.width)+offsetX;this._setWidth(objLeft, newW)};var objs = {};var parseData = function(data) {for (var a in data){if (typeof(data[a])=="object") {parseData(data[a])};objs[data[a]] = true}};parseData(this._anyExpT);parseData(this._anyExpB);parseData(this._anyExpL);parseData(this._anyExpR);var ids = new Array();for (var a in objs){ids[ids.length] = a};if (typeof(this._anyExpT)== "object" && this._anyExpT != null) {this.updateNestedObjectsArray(this._anyExpT);this._anyExpT = null};if (typeof(this._anyExpB)== "object" && this._anyExpB != null) {this.updateNestedObjectsArray(this._anyExpB);this._anyExpB = null};if (typeof(this._anyExpL)== "object" && this._anyExpL != null) {this.updateNestedObjectsArray(this._anyExpL);this._anyExpL = null};if (typeof(this._anyExpR)== "object" && this._anyExpR != null) {this.updateNestedObjectsArray(this._anyExpR);this._anyExpR = null};this._resObj = null;this._resFunc = null;this._hideCovers();this.callEvent("onPanelResizeFinish", [ids]);return};var poly = new Array();if (this._resObj._left != null){for (var q=0;q<this._resObj._left.length;q++){poly[poly.length] = this._resObj._left[q]}};if (this._resObj._right != null){for (var q=0;q<this._resObj._right.length;q++){poly[poly.length] = this._resObj._right[q]}};if (this._resObj._top != null){for (var q=0;q<this._resObj._top.length;q++){poly[poly.length] = this._resObj._top[q]}};if (this._resObj._bottom != null){for (var q=0;q<this._resObj._bottom.length;q++){poly[poly.length] = this._resObj._bottom[q]}};this._resFunc = null;this._resObj = null;this._hideCovers();var cells = new Array();for (var q=0;q<poly.length;q++){if (typeof(poly[q])== "object") {for (var w=0;w<poly[q].length;w++){cells[cells.length] = this.polyObj[poly[q][w]]}}else {cells[cells.length] = this.polyObj[poly[q]]}};for (var q=0;q<cells.length;q++)cells[q].updateNestedObjects();this.callEvent("onPanelResizeFinish", [])};this._showCovers = function() {for (var a in this.polyObj){if (this._effects["highlight"] && this._isResizable(a)) {this.polyObj[a].showCoverBlocker()}}};this._hideCovers = function() {for (var a in this.polyObj){this.polyObj[a].hideCoverBlocker()}};this._isResizable = function(pId) {var need = false;for (var q=0;q<this._resAreaData.length;q++){need = need || (this._resAreaData[q] == pId)};return need};this._collectResAreaData = function(obj) {for (var q=0;q<obj.length;q++){if (typeof(obj[q])== "string") {this._resAreaData[this._resAreaData.length] = obj[q]}else if (typeof(obj[q])== "object") {this._collectResAreaData(obj[q])}}};this._doOnDoubleClick = function(sep) {if (sep._dblClick == null)return;if (this.polyObj[sep._dblClick] == null)return;if (this.polyObj[sep._dblClick]._noHeader)return;var obj = this.polyObj[sep._dblClick];if (obj.childNodes[0].style.display == "none")return;if (obj._collapsed == true){this._doExpand(obj._resize, sep._dblClick, obj._rowData, "hide")}else {obj._savedW = parseInt(obj.style.width);obj._savedH = parseInt(obj.style.height);this._doCollapse(obj._resize, sep._dblClick, obj._rowData, "hide")};return true};this._doOnSelectStart = function(e) {e = e||event;if (that._resObj != null)e.returnValue = false};this._doOnMouseMove = function(e) {e = e||event;if (that._resObj != null && that._resFunc != null)that._resFunc(e)};this._doOnMouseUp = function() {that._resizeStop()};if (_isIE){document.body.attachEvent("onselectstart", that._doOnSelectStart);document.body.attachEvent("onmousemove", that._doOnMouseMove);document.body.attachEvent("onmouseup", that._doOnMouseUp)}else {document.body.addEventListener("mousemove", that._doOnMouseMove, false);document.body.addEventListener("mouseup", that._doOnMouseUp, false)};this._doExpand = function(dir, pId, rowData, mode) {if (rowData.length <= 1)return;var ind = -1;for (var q=0;q<rowData.length;q++){if (rowData[q] == pId){ind = q}};if (ind == -1)return;var anyExp = null;for (var q=ind+1;q<rowData.length;q++){if (anyExp == null){if (typeof(rowData[q])== "string") {if (this.polyObj[rowData[q]]._collapsed == false){anyExp = rowData[q]}}else {anyExp = rowData[q]}}};if (anyExp == null){for (var q=ind-1;q>=0;q--){if (anyExp == null){if (typeof(rowData[q])== "string") {if (this.polyObj[rowData[q]]._collapsed == false){anyExp = rowData[q]}}else {anyExp = rowData[q]}}}};if (anyExp == null)return;if (typeof(anyExp)!= "object") {anyExp = new Array(anyExp)};if (dir == "hor"){var availSpace = parseInt(this.polyObj[anyExp[0]].style.width) - this._minWidth;var maxSize = this.polyObj[pId]._savedW;if (maxSize > availSpace){maxSize = availSpace};if (maxSize < this._minWidth)return;var step = Math.round(maxSize/3)}else {var availSpace = parseInt(this.polyObj[anyExp[0]].style.height) - this._minHeight;var maxSize = this.polyObj[pId]._savedH;if (maxSize > availSpace){maxSize = availSpace};if (maxSize < this._minHeight)return;var step = Math.round(maxSize/3)};this.polyObj[pId].childNodes[0].childNodes[1].style.display = "";this.polyObj[pId].childNodes[0].childNodes[0].className = "dhtmlxPolyInfoBar";this.polyObj[pId].childNodes[0].childNodes[0].childNodes[1].style.display = "";this.polyObj[pId].childNodes[0].childNodes[0].childNodes[2].style.display = "";this.polyObj[pId].childNodes[0].childNodes[0].childNodes[4].style.display = "";var obj2 = new Array();for (var q=0;q<anyExp.length;q++){obj2[q] = this.polyObj[anyExp[q]]};if (this.polyObj[pId].className == "dhtmlxLayoutSinglePolyTabbarCollapsed"){this.polyObj[pId].className = "dhtmlxLayoutSinglePolyTabbar"};this._expandEffect(this.polyObj[pId], obj2, maxSize, mode, (this._effects["collapse"]==true?step:1000000), dir)};this._doCollapse = function(dir, pId, rowData, mode) {if (rowData.length <= 1)return;var ind = -1;for (var q=0;q<rowData.length;q++){if (rowData[q] == pId){ind = q}};if (ind == -1)return;var anyExp = null;for (var q=ind+1;q<rowData.length;q++){if (anyExp == null){if (typeof(rowData[q])== "string") {if (this.polyObj[rowData[q]]._collapsed == false){anyExp = rowData[q]}}else {anyExp = rowData[q]}}};if (anyExp == null){for (var q=ind-1;q>=0;q--){if (anyExp == null){if (typeof(rowData[q])== "string") {if (this.polyObj[rowData[q]]._collapsed == false){anyExp = rowData[q]}}else {anyExp = rowData[q]}}}};if (anyExp == null){if (rowData[ind+1] != null){anyExp = rowData[ind+1]}};if (anyExp == null){if (ind-1 >= 0){if (rowData[ind-1] != null){anyExp = rowData[ind-1]}}};if (anyExp != null){if (typeof(anyExp)!= "object") {if (this.polyObj[anyExp]._collapsed == true){this.polyObj[anyExp].childNodes[0].childNodes[1].style.display = "";this.polyObj[anyExp]._collapsed = false;this.polyObj[anyExp].childNodes[0].childNodes[0].className = "dhtmlxPolyInfoBar";this.polyObj[anyExp].childNodes[0].childNodes[0].childNodes[1].style.display = "";this.polyObj[anyExp].childNodes[0].childNodes[0].childNodes[4].title = "Collapse";this.polyObj[anyExp].childNodes[0].childNodes[0].childNodes[2].style.display = "";this.polyObj[anyExp].childNodes[0].childNodes[0].childNodes[3].style.display = "none";this.polyObj[anyExp].childNodes[0].childNodes[0].childNodes[4].style.display = "";if (this.polyObj[anyExp]._isUnDocked === true){this.dockWindow(anyExp)};if (this.polyObj[anyExp].className == "dhtmlxLayoutSinglePolyTabbarCollapsed"){this.polyObj[anyExp].className = "dhtmlxLayoutSinglePolyTabbar"};this._fixSplitters();this._fixIcons();this.callEvent("onExpand", [anyExp])};anyExp = new Array(anyExp)};var obj2 = new Array();for (var q=0;q<anyExp.length;q++){obj2[q] = this.polyObj[anyExp[q]]};if (dir == "hor"){var step = Math.round(Math.max(this.polyObj[pId].offsetWidth, this.polyObj[anyExp[0]].offsetWidth)/3)}else {var step = Math.round(Math.max(this.polyObj[pId].offsetHeight, this.polyObj[anyExp[0]].offsetHeight)/3)};this.polyObj[pId].childNodes[0].childNodes[1].style.display = "none";this._collapseEffect(this.polyObj[pId], obj2, mode, (this._effects["collapse"]==true?step:1000000), dir)}};this.setEffect = function(efName, efValue) {if (this._effects[efName] != null && typeof(efValue)== "boolean") {this._effects[efName] = efValue}};this.getEffect = function(efName) {if (this._effects[efName] != null){return this._effects[efName]};return null};this._expandEffect = function(obj, obj2, maxSize, mode, step, dir) {if (dir == "hor"){var s = parseInt(obj.style.width);var s2 = parseInt(obj2[0].style.width)}else {var s = parseInt(obj.style.height);var s2 = parseInt(obj2[0].style.height)};var newS = s + step;if (newS > maxSize){newS = maxSize};if (dir == "hor"){obj.style.width = newS+"px";obj.childNodes[0].style.width = obj.style.width}else {obj.style.height = newS+"px";obj.childNodes[0].style.height = obj.style.height};obj.adjustContent(obj.childNodes[0], (obj._noHeader?0:this.skinParams[this.skin]["cpanel_height"]));for (var q=0;q<obj2.length;q++){if (dir == "hor"){obj2[q].style.width = s2+s-newS+"px";obj2[q].childNodes[0].style.width = obj2[q].style.width}else {obj2[q].style.height = s2+s-newS+"px";obj2[q].childNodes[0].style.height = obj2[q].style.height};obj2[q].adjustContent(obj2[q].childNodes[0], (obj2[q]._noHeader?0:this.skinParams[this.skin]["cpanel_height"]))};if (newS != maxSize){window.setTimeout(function(){that._expandEffect(obj, obj2, maxSize, mode, step, dir)}, 4)}else {obj._collapsed = false;for (var q=0;q<obj2.length;q++){obj2[q].updateNestedObjects()};this.polyObj[obj._idd].updateNestedObjects();this.polyObj[obj._idd].childNodes[0].childNodes[0].childNodes[4].title = "Collapse";this._fixSplitters();this._fixIcons();this.callEvent("onExpand", [obj._idd])}};this._collapseEffect = function(obj, obj2, mode, step, dir) {if (dir == "hor"){var s = parseInt(obj.style.width);var s2 = parseInt(obj2[0].style.width)}else {var s = parseInt(obj.style.height);var s2 = parseInt(obj2[0].style.height)};var newS = s - step;if (dir == "hor"){if (newS < this._collapsedW){newS = this._collapsedW};obj.style.width = newS+"px";obj.childNodes[0].style.width = obj.style.width}else {if (newS < this._collapsedH){newS = this._collapsedH};obj.style.height = newS+"px";obj.childNodes[0].style.height = obj.style.height};for (var q=0;q<obj2.length;q++){if (dir == "hor"){obj2[q].style.width = s2+(s-newS)+"px";obj2[q].childNodes[0].style.width = obj2[q].style.width}else {obj2[q].style.height = s2+(s-newS)+"px";obj2[q].childNodes[0].style.height = obj2[q].style.height};obj2[q].adjustContent(obj2[q].childNodes[0], (obj2[q]._noHeader?0:this.skinParams[this.skin]["cpanel_height"]))};if ((newS > this._collapsedW && dir == "hor")|| (newS > this._collapsedH && dir == "ver")) {window.setTimeout(function(){that._collapseEffect(obj, obj2, mode, step, dir)}, 4)}else {for (var q=0;q<obj2.length;q++){if (dir == "hor"){obj2[q].style.width = s2+(s-newS)+"px";obj2[q].childNodes[0].style.width = obj2[q].style.width}else {obj2[q].style.height = s2+(s-newS)+"px";obj2[q].childNodes[0].style.height = obj2[q].style.height};obj2[q].adjustContent(obj2[q].childNodes[0], (obj2[q]._noHeader?0:this.skinParams[this.skin]["cpanel_height"]))};obj._collapsed = true;if (dir == "hor"){obj.childNodes[0].childNodes[0].className = "dhtmlxPolyInfoBarCollapsedVer"}else {obj.childNodes[0].childNodes[0].className = "dhtmlxPolyInfoBarCollapsedHor"};for (var q=0;q<obj2.length;q++){obj2[q].updateNestedObjects()};if (mode == "hide"){obj.childNodes[0].childNodes[0].childNodes[1].style.display = "";obj.childNodes[0].childNodes[0].childNodes[2].style.display = "none";obj.childNodes[0].childNodes[0].childNodes[3].style.display = "none";obj.childNodes[0].childNodes[0].childNodes[4].style.display = ""}else {obj.childNodes[0].childNodes[0].childNodes[1].style.display = "";obj.childNodes[0].childNodes[0].childNodes[2].style.display = "";obj.childNodes[0].childNodes[0].childNodes[3].style.display = "none";obj.childNodes[0].childNodes[0].childNodes[4].style.display = "none"};if (obj.className == "dhtmlxLayoutSinglePolyTabbar"){obj.className = "dhtmlxLayoutSinglePolyTabbarCollapsed"};this.polyObj[obj._idd].childNodes[0].childNodes[0].childNodes[4].title = "Expand";this._fixSplitters();this._fixIcons();this.callEvent("onCollapse", [obj._idd])}};this._setW = function(cellObj, w) {cellObj.style.width = w + "px";cellObj.childNodes[0].style.width = cellObj.style.width;cellObj.adjustContent(cellObj.childNodes[0], (cellObj._noHeader?0:this.skinParams[this.skin]["cpanel_height"]))};this._setH = function(cellObj, h) {cellObj.style.height = h + "px";cellObj.childNodes[0].style.height = cellObj.style.height;cellObj.adjustContent(cellObj.childNodes[0], (cellObj._noHeader?0:this.skinParams[this.skin]["cpanel_height"]))};this._setWidth = function(pId, width) {if (this.polyObj[pId] == null)return;if (!Number(width)) return;var sep = null;for (var q=0;q<this.sepVer.length;q++){var p = this.sepVer[q]._left;if (p[p.length-1] == pId){sep = new Array(this.sepVer[q], "left")}else if (typeof(p[p.length-1])== "object") {var k = p[p.length-1];for (var e=0;e<k.length;e++){if (k[e] == pId){sep = new Array(this.sepVer[q], "left")}}};var p = this.sepVer[q]._right;if (p[0] == pId){sep = new Array(this.sepVer[q], "right")}else if (typeof(p[0])== "object") {var k = p[0];for (var e=0;e<k.length;e++){if (k[e] == pId){sep = new Array(this.sepVer[q], "right")}}}};if (sep != null){var set = this._findDockCellsVer(sep[0]);var anyExpL = set[0];var anyExpR = set[1];if (anyExpL == null || anyExpR == null)return;var sumSize = parseInt(this.polyObj[anyExpL[0]].style.width) + parseInt(this.polyObj[anyExpR[0]].style.width);if (width < this._minWidth){width = this._minWidth}else if (width > sumSize - this._minWidth){width = sumSize - this._minWidth};var width2 = sumSize - width;for (var q=0;q<anyExpL.length;q++){this._setW(this.polyObj[anyExpL[q]],(sep[1]=="left"?width:width2));this.polyObj[anyExpL[q]].updateNestedObjects()};for (var q=0;q<anyExpR.length;q++){this._setW(this.polyObj[anyExpR[q]],(sep[1]=="right"?width:width2));this.polyObj[anyExpR[q]].updateNestedObjects()}}};this._setHeight = function(pId, height) {if (this.polyObj[pId] == null)return;if (!Number(height)) return;var sep = null;for (var q=0;q<this.sepHor.length;q++){var p = this.sepHor[q]._top;if (p[p.length-1] == pId){sep = new Array(this.sepHor[q], "top")}else if (typeof(p[p.length-1])== "object") {var k = p[p.length-1];for (var e=0;e<k.length;e++){if (k[e] == pId){sep = new Array(this.sepHor[q], "top")}}};var p = this.sepHor[q]._bottom;if (p[0] == pId){sep = new Array(this.sepHor[q], "bottom")}else if (typeof(p[0])== "object") {var k = p[0];for (var e=0;e<k.length;e++){if (k[e] == pId){sep = new Array(this.sepHor[q], "bottom")}}}};if (sep != null){var set = this._findDockCellsHor(sep[0]);var anyExpT = set[0];var anyExpB = set[1];if (anyExpT == null || anyExpB == null)return;var sumSize = parseInt(this.polyObj[anyExpT[0]].style.height) + parseInt(this.polyObj[anyExpB[0]].style.height);if (height < this._minHeight){height = this._minHeight}else if (height > sumSize - this._minHeight){height = sumSize - this._minHeight};var height2 = sumSize - height;for (var q=0;q<anyExpT.length;q++){this._setH(this.polyObj[anyExpT[q]],(sep[1]=="top"?height:height2));this.polyObj[anyExpT[q]].updateNestedObjects()};for (var q=0;q<anyExpB.length;q++){this._setH(this.polyObj[anyExpB[q]],(sep[1]=="bottom"?height:height2));this.polyObj[anyExpB[q]].updateNestedObjects()}}};this.updateNestedObjectsArray = function(obj) {for (var q=0;q<obj.length;q++){if (typeof(obj[q])=="object") {this.updateNestedObjectsArray(obj[q])}else {this.polyObj[obj[q]].updateNestedObjects()}}};this.dockWindow = function(id) {if (!this.dhxWins)return;if (!this.dhxWins.window(this.dhxWinsIdPrefix+id)) return;this.dhxWins.window(this.dhxWinsIdPrefix+id).close();this.dhxWins.window(this.dhxWinsIdPrefix+id).moveContentTo(this.polyObj[id]);this.polyObj[id]._isUnDocked = false;this.callEvent("onDock", [id])};this.unDockWindow = function(id) {this._initWindows(id);this.polyObj[id].moveContentTo(this.dhxWins.window(this.dhxWinsIdPrefix+id));this.polyObj[id]._isUnDocked = true;this.callEvent("onUnDock", [id])};this._initWindows = function(id) {if (!window.dhtmlXWindows)return;if (!this.dhxWins){this.dhxWins = new dhtmlXWindows();this.dhxWins.setSkin(this.skin);this.dhxWins.setImagePath(this.imagePath);this.dhxWinsIdPrefix = "";if (!id)return};var idd = this.dhxWinsIdPrefix+id;if (!this.dhxWins.window(idd)) {var self = this;var w1 = this.dhxWins.createWindow(idd, 20, 20, 320, 200);w1.setText(this.polyObj[id].getText());w1.button("close").hide();w1.attachEvent("onClose", function(win){win.hide()});w1.addUserButton("dock", 99, "Dock", "dock");w1.button("dock").attachEvent("onClick", function(win){self.polyObj[id].dock()});w1.dockedCell = this.polyObj[id]}else {this.dhxWins.window(idd).show()}};this.isPanelVisible = function(pId) {return (!this.polyObj[pId]._noHeader)};this.showPanel = function(pId) {if (this.polyObj[pId] == null)return;if (this.polyObj[pId]._collapsed == true)return;var bar = this.polyObj[pId].childNodes[0].childNodes[0];bar.style.display = "";this.polyObj[pId]._noHeader = false;this.polyObj[pId].adjustContent(this.polyObj[pId].childNodes[0], this.skinParams[this.skin]["cpanel_height"]);this.polyObj[pId].updateNestedObjects()};this.hidePanel = function(pId) {if (this.polyObj[pId] == null)return;if (this.polyObj[pId]._collapsed == true)return;var bar = this.polyObj[pId].childNodes[0].childNodes[0];bar.style.display = "none";this.polyObj[pId]._noHeader = true;this.polyObj[pId].adjustContent(this.polyObj[pId].childNodes[0], 0);this.polyObj[pId].updateNestedObjects()};this.setText = function(pId, text) {this._changeCPanelText(pId, text)};this.getText = function(pId) {return this.polyObj[pId].childNodes[0].childNodes[0].childNodes[0].innerHTML};this._changeCPanelText = function(pId, text) {var layout = that;if (layout.polyObj[pId] == null)return;layout.polyObj[pId].childNodes[0].childNodes[0].childNodes[0].innerHTML = text;if (that.dhxWins != null){if (that.dhxWins.window(that.dhxWinsIdPrefix+pId)!= null) {that.dhxWins.window(that.dhxWinsIdPrefix+pId).setText(text)}}};this.forEachItem = function(handler) {for (var q=0;q<this.items.length;q++){handler(this.items[q])}};this._fixPositionInWin = function(w, h) {this.base.style.width = w+"px";this.base.style.height = h+"px"};this.attachMenu = function() {if (this.base._isWindow){this.menu = this.base._window.attachMenu()}else {this.cont.obj.skin = this.skin;this.menu = this.cont.obj.attachMenu();this.cont.obj.adjustContent(this.cont.obj, 0);this.setSizes()};return this.menu};this.detachMenu = function() {if (!this.menu)return;this.cont.obj.detachMenu();this.setSizes();this.menu = null};this.showMenu = function() {if (!this.menu)return;this.cont.obj.showMenu();this.setSizes()};this.hideMenu = function() {if (!this.menu)return;this.cont.obj.hideMenu();this.setSizes()};this.attachToolbar = function() {if (this.base._isWindow){this.toolbar = this.base._window.attachToolbar()}else {this.cont.obj.skin = this.skin;this.toolbar = this.cont.obj.attachToolbar();this.cont.obj.adjustContent(this.cont.obj, 0);this.setSizes()};return this.toolbar};this.detachToolbar = function() {if (!this.toolbar)return;this.cont.obj.detachToolbar();this.setSizes();this.toolbar = null};this.showToolbar = function() {if (!this.toolbar)return;this.cont.obj.showToolbar();this.setSizes()};this.hideToolbar = function() {if (!this.toolbar)return;this.cont.obj.hideToolbar();this.setSizes()};this.attachStatusBar = function() {if (this.base._isWindow){this.statusbar = this.base._window.attachStatusBar()}else {this.statusbar = this.cont.obj.attachStatusBar();this.cont.obj.adjustContent(this.cont.obj, 0);this.setSizes()};return this.statusbar};this.detachStatusBar = function() {if (!this.sb)return;this.cont.obj.detachStatusBar();this.setSizes();this.sb = null};this.showStatusBar = function() {if (!this.sb)return;this.cont.obj.showStatusBar();this.setSizes()};this.hideStatusBar = function() {if (!this.sb)return;this.cont.obj.hideStatusBar();this.setSizes()};this.progressOn = function() {this._progressControlGlobal(true)};this.progressOff = function() {this._progressControlGlobal(false)};this._progressControl = function(id, state) {if (this.polyObj[id] == null)return;if (this.polyObj[id]._progressCover == null){var p1 = document.createElement("DIV");p1.className = "dhtmlxLayoutPolyProgress";this.polyObj[id].childNodes[0].appendChild(p1);var p2 = document.createElement("DIV");p2.className = "dhtmlxLayoutPolyProgressBGIMG";this.polyObj[id].childNodes[0].appendChild(p2);this.polyObj[id]._progressCover = new Array(p1,p2)};this.polyObj[id]._progressCover[0].style.display = (state==true?"":"none");this.polyObj[id]._progressCover[1].style.display = this.polyObj[id]._progressCover[0].style.display};this._progressControlGlobal = function(state) {if (this._progressCover == null){var p1 = document.createElement("DIV");p1.className = "dhtmlxLayoutPolyProgressGlobal_"+this.skin;this.obj.appendChild(p1);var p2 = document.createElement("DIV");p2.className = "dhtmlxLayoutPolyProgressBGIMGGlobal_"+this.skin;this.obj.appendChild(p2);this._progressCover = new Array(p1,p2)};this._progressCover[0].style.display = (state==true?"":"none");this._progressCover[1].style.display = this._progressCover[0].style.display};this._fixSize = function(pId, width, height) {if (this.polyObj[pId] == null)return;this.polyObj[pId]._isBlockedWidth = width;this.polyObj[pId]._isBlockedHeight = height;this._fixSplitters()};this._fixSplitters = function() {for (var q=0;q<this.sepVer.length;q++){var data = this._findDockCellsVer(this.sepVer[q]);if (data[0] == null || data[1] == null){if (this.sepVer[q].className != "dhtmlxLayoutPolySplitterVerInactive"){this.sepVer[q].className = "dhtmlxLayoutPolySplitterVerInactive"}}else {if (this.sepVer[q].className != "dhtmlxLayoutPolySplitterVer"){this.sepVer[q].className = "dhtmlxLayoutPolySplitterVer"}}};for (var q=0;q<this.sepHor.length;q++){var data = this._findDockCellsHor(this.sepHor[q]);if (data[0] == null || data[1] == null){if (this.sepHor[q].className != "dhtmlxLayoutPolySplitterHorInactive"){this.sepHor[q].className = "dhtmlxLayoutPolySplitterHorInactive"}}else {if (this.sepHor[q].className != "dhtmlxLayoutPolySplitterHor"){this.sepHor[q].className = "dhtmlxLayoutPolySplitterHor"}}}};this._fixIcons = function() {for (var a in this.polyObj){var data = this.polyObj[a]._rowData;var cps = this.polyObj[a]._collapsed;var idx = -1;for (var q=0;q<data.length;q++){if (typeof(data[q])== "object") {}else {if (data[q] == a){idx = q}}};var newIcon = null;if (idx != -1){for (var q=idx+1;q<data.length;q++){if (typeof(data[q])== "object") {newIcon = (this.polyObj[a]._resize=="ver"?(cps?"b":"t"):(cps?"r":"l"))}else if (this.polyObj[data[q]]._collapsed == false){newIcon = (this.polyObj[a]._resize=="ver"?(cps?"b":"t"):(cps?"r":"l"))}};if (newIcon == null && idx >= 1){for (var q=idx-1;q>=0;q--){if (typeof(data[q])== "object") {newIcon = (this.polyObj[a]._resize=="ver"?(cps?"t":"b"):(cps?"l":"r"))}else if (this.polyObj[data[q]]._collapsed == false){newIcon = (this.polyObj[a]._resize=="ver"?(cps?"t":"b"):(cps?"l":"r"))}}}};if (newIcon != null){var dir = this.polyObj[a]._resize;this.polyObj[a].childNodes[0].childNodes[0].childNodes[4].className = "dhtmlxInfoButtonShowHide_"+dir+" dhxLayoutButton_"+this.skin+"_"+dir+(this.polyObj[a]._collapsed?"2":"1")+newIcon}}};this._defineWindowMinDimension = function(win, inLayout) {if (inLayout == true){var dim = new Array();dim[0] = parseInt(win.style.width);dim[1] = parseInt(win.style.height)}else {var dim = win.getDimension();if (dim[0] == "100%"){dim[0] = win.offsetWidth};if (dim[1] == "100%"){dim[1] = win.offsetHeight}};var hor = that._getNearestParents("hor");var ver = that._getNearestParents("ver");if (!inLayout){var resH = new Array();var resV = new Array();for (var a in hor){resH[resH.length] = a};for (var a in ver){resV[resV.length] = a};that._checkAlterMinSize(new Array(resH, resV));var hor2 = {};var ver2 = {};for (var q=0;q<that._alterSizes.length;q++){var a = that._alterSizes[q][0];var w = that._alterSizes[q][1];var h = that._alterSizes[q][2];if (hor2[a] == null){hor2[a] = w}else {if (w > hor2[a]){hor2[a] = w}};if (ver2[a] == null){ver2[a] = h}else {if (h > ver2[a]){ver2[a] = h}}};for (var a in hor){if (hor2[a] != null){hor[a] = hor[a]-hor2[a]+that._minWidth}};for (var a in ver){if (ver2[a] != null){ver[a] = ver[a]-ver2[a]+that._minHeight-(that.polyObj[a].childNodes[0].style.display!="none"?that.skinParams[that.skin]["cpanel_height"]:0)}}};var minWidth = 65536;for (var a in hor){if (hor[a] < minWidth){minWidth = hor[a]}};minWidth = minWidth - that._minWidth;minWidth = dim[0] - minWidth;if (minWidth < that._dimension[0] && !inLayout){minWidth = that._dimension[0]};var minHeight = 65536;for (var a in ver){if (ver[a] < minHeight){minHeight = ver[a]}};minHeight = minHeight - that._minHeight;minHeight = dim[1] - minHeight;if (minHeight < that._dimension[1] && !inLayout){minHeight = that._dimension[1]};if (inLayout == true){return new Array("", minWidth, minHeight)}else {win.setMinDimension(minWidth, minHeight)}};this._getNearestParents = function(resize) {var data = (resize=="hor"?this._autoHor:this._autoVer);var pool = {};for (var q=0;q<data.length;q++){var id = data[q];if (this.polyObj[id]._collapsed == true && this.polyObj[id]._resize == resize){var rowData = this.polyObj[id]._rowData;var e = -1;for (var w=0;w<rowData.length;w++){if (typeof(rowData[w])== "object") {e = w}else {if (rowData[w] == id)e = w}};var r = e;id = null;if (e > 0){for (var w=e-1;w>=0;w--){if (typeof(rowData[w])== "object") {id = rowData[w]}else {if (this.polyObj[rowData[w]]._collapsed == false && id == null){id = rowData[w]}}}};if (id == null){for (var w=r;w<rowData.length;w++){if (typeof(rowData[w])== "object") {id = rowData[w]}else {if (this.polyObj[rowData[w]]._collapsed == false && id == null){id = rowData[w]}}}}};if (id != null){if (typeof(id)== "string") {id = new Array(id)};for (var w=0;w<id.length;w++){pool[id[w]] = parseInt(resize=="hor"?this.polyObj[id[w]].style.width:this.polyObj[id[w]].style.height)}}};return pool};this.setSizes = function(skipAdjust) {if (this.cont && skipAdjust !== false)this.cont.obj.adjustContent(this.cont.obj, this._mTop, null, null, this._mBottom);var xw = this.base.offsetParent.offsetWidth-this.base.offsetWidth+(this._baseWFix!=null?this._baseWFix:0);var xh = this.base.offsetParent.offsetHeight-this.base.offsetHeight+(this._baseHFix!=null?this._baseHFix:0);this.base.style.width = parseInt(this.base.style.width)+xw+"px";this.base.style.height = parseInt(this.base.style.height)+xh+"px";var both = {};for (var a in this._getNearestParents("hor")) {this.polyObj[a].style.width = Math.max(0,parseInt(this.polyObj[a].style.width)+xw)+"px";this.polyObj[a].childNodes[0].style.width = this.polyObj[a].style.width;both[a] = 1};for (var a in this._getNearestParents("ver")) {this.polyObj[a].style.height = Math.max(0,parseInt(this.polyObj[a].style.height)+xh)+"px";this.polyObj[a].childNodes[0].style.height = this.polyObj[a].style.height;both[a] = 1};for (var a in both){this.polyObj[a].adjustContent(this.polyObj[a].childNodes[0], (this.polyObj[a]._noHeader?0:this.skinParams[this.skin]["cpanel_height"]));this.polyObj[a].updateNestedObjects()};this.callEvent("onResizeFinish", []);return};dhtmlxEventable(this);this._init()};dhtmlXLayoutObject.prototype.unload = function(removeParent) {for (var a in this.polyObj){var p = this.polyObj[a];p._isCell = null;p.skin = null;p.getId = null;p.getIndex = null;p.showHeader = null;p.hideHeader = null;p.isHeaderVisible = null;p.setText = null;p.getText = null;p.expand = null;p.collapse = null;p.isCollapsed = null;p.dock = null;p.undock = null;p.setWidth = null;p.getWidth = null;p.setHeight = null;p.getHeight = null;p.fixSize = null;p.progressOn = null;p.progressOff = null;p._doOnAttachMenu = null;p._doOnAttachToolbar = null;p._doOnAttachStatusBar = null;p._collapsed = null;p._idd = null;p._ind = null;p._rowData = null;p.ondblclick = null;var bar = p.childNodes[0].childNodes[0];bar.className = "";bar._dockCell = null;bar._resize = null;bar._h = null;bar.ondblclick = null;bar.childNodes[4].onclick = null;for (var r=0;r<bar.childNodes.length;r++)bar.childNodes[r].onselectstart = null;while (bar.childNodes.length > 0)bar.removeChild(bar.childNodes[0]);bar.parentNode.removeChild(bar);p._dhxContDestruct();p._dhxContDestruct = null;p.childNodes[0].removeChild(p.childNodes[0].childNodes[0]);p.removeChild(p.childNodes[0]);p.parentNode.removeChild(p);p = null};for (var a in this.polyObj)this.polyObj[a] = null;for (var q=0;q<this.items.length;q++)this.items[q] = null;this.polyObj = null;this.items = null;var t = this.tpl.childNodes[0];while (t.childNodes.length > 0){while (t.childNodes[0].childNodes.length > 0){var r = t.childNodes[0].childNodes[0];r._top = null;r._bottom = null;r._left = null;r._right = null;r._dblClick = null;r._isSep = null;r._dir = null;r.ondblclick = null;r.onmousedown = null;r.onmouseup = null;r.onselectstart = null;while (r.childNodes.length > 0)r.removeChild(r.childNodes[0]);r.parentNode.removeChild(r);r = null};t.removeChild(t.childNodes[0])};t.parentNode.removeChild(t);t = null;this.tpl.parentNode.removeChild(this.tpl);this.tpl = null;for (var a in this.sepHor)this.sepHor[a] = null;for (var a in this.sepVer)this.sepVer[a] = null;this.sepHor = null;this.sepVer = null;this._autoHor = null;this._autoVer = null;this._availAutoSize = null;this._dimension = null;this._effects = null;this._layoutView = null;this._mBottom = null;this._mTop = null;this._minWidth = null;this._minHeight = null;this._resFunc = null;this._resObj = null;this._resX = null;this._resY = null;this._rowsRatio = null;this._totalCols = null;this._totalRows = null;this._xmlLoader = null;this.w = null;this.h = null;this.imagePath = null;this.skin = null;this.skinParams = null;this.tplData = null;this.tplSizes = null;if (this.sizer.parentNode)this.sizer.parentNode.removeChild(this.sizer);this.sizer = null;this._alterSizes = null;this._attachSizer = null;this._buildSurface = null;this._changeCPanelText = null;this._checkAlterMinSize = null;this._collapse = null;this._collapseEffect = null;this._collectResAreaData = null;this._defineWindowMinDimension = null;this._doCollapse = null;this._doExpand = null;this._expand = null;this._expandEffect = null;this._findDockCellsHor = null;this._findDockCellsVer = null;this._fixIcons = null;this._fixPositionInWin = null;this._fixSize = null;this._fixSplitters = null;this._getNearestParents = null;this._hideCovers = null;this._init = null;this._initWindows = null;this._isCollapsed = null;this._isResizable = null;this._progressControl = null;this._progressControlGlobal = null;this._resizeHor = null;this._resizeStop = null;this._resizeVer = null;this._resAreaData = null;this._setH = null;this._setHeight = null;this._setW = null;this._setWidth = null;this._showCovers = null;this._xmlParser = null;this.attachEvent = null;this.attachMenu = null;this.attachStatusBar = null;this.attachToolbar = null;this.callEvent = null;this.cells = null;this.checkEvent = null;this.detachEvent = null;this.dockWindow = null;this.eventCatcher = null;this.forEachItem = null;this.getEffect = null;this.getIdByIndex = null;this.getIndexById = null;this.getText = null;this.hidePanel = null;this.isPanelVisible = null;this.listAutoSizes = null;this.listViews = null;this.progressOff = null;this.progressOn = null;this.setAutoSize = null;this.setEffect = null;this.setImagePath = null;this.setSizes = null;this.setSkin = null;this.setText = null;this.showPanel = null;this.unDockWindow = null;this.unload = null;this.updateNestedObjectsArray = null;if (this.obj){this.obj.parentNode.removeChild(this.obj);this.obj = null};if (this.base){if (this.base == document.body){}else {this.base.parentNode.removeChild(this.base);this.base = null}};if (this.cont){this.cont.obj._dhxContDestruct();this.cont.obj._dhxContDestruct = null;if (this.cont.dhxcont.parentNode)this.cont.dhxcont.parentNode.removeChild(this.cont.dhxcont);this.cont.dhxcont = null;this.cont.setContent = null;if (this.cont.obj.parentNode && removeParent === true)this.cont.obj.parentNode.removeChild(this.cont.obj);this.cont.obj = null;this.cont = null};if (this.dhxWins){this.dhxWins.unload();this.dhxWins = null};if (this._doOnResizeStart){if (_isIE){window.detachEvent("onresize", this._doOnResizeStart)}else {window.removeEventListener("resize", this._doOnResizeStart, false)};this._doOnResizeStart = null;this._doOnResizeEnd = null;this._tmTime = null};if (_isIE){document.body.detachEvent("onselectstart", this._doOnSelectStart);document.body.detachEvent("onmousemove", this._doOnMouseMove);document.body.detachEvent("onmouseup", this._doOnMouseUp)}else {document.body.removeEventListener("mousemove", this._doOnMouseMove, false);document.body.removeEventListener("mouseup", this._doOnMouseUp, false)};this._doOnSelectStart = null;this._doOnMouseMove = null;this._doOnMouseUp = null;that = null};dhtmlXLayoutObject.prototype.tplData = {"1C": '<layout><autosize hor="a" ver="a" rows="1" cols="1"/><table data="a"/><row><cell obj="a" wh="1,1" resize="ver" neighbors="a"/></row></layout>',
 "2E": '<layout><autosize hor="a;b" ver="b" rows="2" cols="1"/><table data="a;b"/><row><cell obj="a" wh="1,2" resize="ver" neighbors="a;b"/></row><row sep="true"><cell sep="hor" top="a" bottom="b" dblclick="a"/></row><row><cell obj="b" wh="1,2" resize="ver" neighbors="a;b"/></row></layout>',
 "2U": '<layout><autosize hor="b" ver="a;b" rows="1" cols="2"/><table data="a,b"/><row><cell obj="a" wh="2,1" resize="hor" neighbors="a;b"/><cell sep="ver" left="a" right="b"/><cell obj="b" wh="2,1" resize="hor" neighbors="a;b"/></row></layout>',
 
 "3E": '<layout><autosize hor="a;b;c" ver="c" rows="3" cols="1"/><table data="a;b;c"/><row><cell obj="a" wh="1,3" resize="ver" neighbors="a;b;c"/></row><row sep="yes"><cell sep="hor" top="a" bottom="b;c" dblclick="a"/></row><row><cell obj="b" wh="1,3" resize="ver" neighbors="a;b;c"/></row><row sep="yes"><cell sep="hor" top="a;b" bottom="c" dblclick="b"/></row><row><cell obj="c" wh="1,3" resize="ver" neighbors="a;b;c"/></row></layout>',
 "3W": '<layout><autosize hor="c" ver="a;b;c" rows="1" cols="3"/><table data="a,b,c"/><row><cell obj="a" wh="3,1" resize="hor" neighbors="a;b;c"/><cell sep="ver" left="a" right="b;c" dblclick="a"/><cell obj="b" wh="3,1" resize="hor" neighbors="a;b;c"/><cell sep="ver" left="a;b" right="c" dblclick="b"/><cell obj="c" wh="3,1" resize="hor" neighbors="a;b;c"/></row></layout>',
 "3J": '<layout><autosize hor="b" ver="b;c" rows="2" cols="2"/><table data="a,b;c,b"/><row><cell obj="a" wh="2,2" resize="ver" neighbors="a;c"/><cell sep="ver" left="a,c" right="b" dblclick="b" rowspan="3"/><cell obj="b" wh="2,1" resize="hor" neighbors="a,c;b" rowspan="3"/></row><row sep="yes"><cell sep="hor" top="a" bottom="c" dblclick="a"/></row><row><cell obj="c" wh="2,2" resize="ver" neighbors="a;c"/></row></layout>',
 "3T": '<layout><autosize hor="a;c" ver="b;c" rows="2" cols="2"/><table data="a,a;b,c"/><row><cell obj="a" wh="1,2" resize="ver" neighbors="a;b,c" colspan="3"/></row><row sep="true"><cell sep="hor" top="a" bottom="b,c" dblclick="a" colspan="3"/></row><row><cell obj="b" wh="2,2" resize="hor" neighbors="b;c"/><cell sep="ver" left="b" right="c" dblclick="b"/><cell obj="c" wh="2,2" resize="hor" neighbors="b;c"/></row></layout>',
 "3L": '<layout><autosize hor="b;c" ver="a;c" rows="2" cols="2"/><table data="a,b;a,c"/><row><cell obj="a" wh="2,1" resize="hor" neighbors="a;b,c" rowspan="3"/><cell sep="ver" left="a" right="b,c" dblclick="a" rowspan="3"/><cell obj="b" wh="2,2" resize="ver" neighbors="b;c"/></row><row sep="true"><cell sep="hor" top="b" dblclick="b" bottom="c"/></row><row><cell obj="c" wh="b,2" resize="ver" neighbors="b;c"/></row></layout>',
 "3U": '<layout><autosize hor="b;c" ver="c" rows="2" cols="2"/><table data="a,b;c,c"/><row><cell obj="a" wh="2,2" resize="hor" neighbors="a;b"/><cell sep="ver" left="a" right="b" dblclick="a"/><cell obj="b" wh="2,2" resize="hor" neighbors="a;b"/></row><row sep="true"><cell sep="hor" top="a,b" bottom="c" dblclick="c" colspan="3"/></row><row><cell obj="c" wh="1,2" resize="ver" neighbors="a,b;c" colspan="3"/></row></layout>',
 
 "4H": '<layout><autosize hor="d" ver="a;c;d" rows="2" cols="3"/><table data="a,b,d;a,c,d"/><row><cell obj="a" wh="3,1" resize="hor" neighbors="a;b,c;d" rowspan="3"/><cell sep="ver" left="a" right="b,c;d" dblclick="a" rowspan="3"/><cell obj="b" wh="3,2" resize="ver" neighbors="b;c"/><cell sep="ver" left="a;b,c" right="d" dblclick="d" rowspan="3"/><cell obj="d" wh="3,1" resize="hor" neighbors="a;b,c;d" rowspan="3"/></row><row sep="true"><cell sep="hor" top="b" dblclick="b" bottom="c"/></row><row><cell obj="c" wh="3,2" resize="ver" neighbors="b;c"/></row></layout>',
 "4I": '<layout><autosize hor="a;c;d" ver="d" rows="3" cols="2"/><table data="a,a;b,c;d,d"/><row><cell obj="a" wh="1,3" resize="ver" neighbors="a;b,c;d" colspan="3"/></row><row sep="true"><cell sep="hor" top="a" bottom="b,c;d" dblclick="a" colspan="3"/></row><row><cell obj="b" wh="2,3" resize="hor" neighbors="b;c"/><cell sep="ver" left="b" dblclick="b" right="c"/><cell obj="c" wh="2,3" resize="hor" neighbors="b;c"/></row><row sep="true"><cell sep="hor" top="a;b,c" bottom="d" dblclick="d" colspan="3"/></row><row><cell obj="d" wh="1,3" resize="ver" neighbors="a;b,c;d" colspan="3"/></row></layout>',
 "4T": '<layout><autosize hor="a;d" ver="b;c;d" rows="2" cols="3"/><table data="a,a,a;b,c,d"/><row><cell obj="a" wh="1,2" resize="ver" neighbors="a;b,c,d" colspan="5"/></row><row sep="true"><cell sep="hor" top="a" bottom="b,c,d" dblclick="a" colspan="5"/></row><row><cell obj="b" wh="3,2" resize="hor" neighbors="b;c;d"/><cell sep="ver" left="b" right="c;d" dblclick="b"/><cell obj="c" wh="3,2" resize="hor" neighbors="b;c;d"/><cell sep="ver" left="b;c" right="d" dblclick="c"/><cell obj="d" wh="3,2" resize="hor" neighbors="b;c;d"/></row></layout>',
 "4U": '<layout><autosize hor="c;d" ver="d" rows="2" cols="3"/><table data="a,b,c;d,d,d"/><row><cell obj="a" wh="3,2" resize="hor" neighbors="a;b;c"/><cell sep="ver" left="a" right="b;c" dblclick="a"/><cell obj="b" wh="3,2" resize="hor" neighbors="a;b;c"/><cell sep="ver" left="a;b" right="c" dblclick="b"/><cell obj="c" wh="3,2" resize="hor" neighbors="a;b;c"/></row><row sep="true"><cell sep="hor" top="a,b,c" bottom="d" dblclick="d" colspan="5"/></row><row><cell obj="d" wh="1,2" resize="ver" neighbors="a,b,c;d" colspan="5"/></row></layout>',
 
 "5H": '<layout><autosize hor="b;c;d" ver="a;c;e" rows="3" cols="3"/><table data="a,b,e;a,c,e;a,d,e"/><row><cell obj="a" wh="3,1" resize="hor" neighbors="a;b,c,d" rowspan="5"/><cell sep="ver" left="a" right="b,c,d;e" dblclick="a" rowspan="5"/><cell obj="b" wh="3,3" resize="ver" neighbors="b;c;d"/><cell sep="ver" left="a;b,c,d" right="e" dblclick="e" rowspan="5"/><cell obj="e" wh="3,1" resize="hor" neighbors="b,c,d;e" rowspan="5"/></row><row sep="true"><cell sep="hor" top="b" dblclick="b" bottom="c;d"/></row><row><cell obj="c" wh="3,3" resize="ver" neighbors="b;c;d"/></row><row sep="true"><cell sep="hor" top="b;c" dblclick="c" bottom="d"/></row><row><cell obj="d" wh="3,3" resize="ver" neighbors="b;c;d"/></row></layout>',
 "5I": '<layout><autosize hor="a;d;e" ver="e" rows="3" cols="3"/><table data="a,a,a;b,c,d;e,e,e"/><row><cell obj="a" wh="1,3" resize="ver" neighbors="a;b,c,d;e" colspan="5"/></row><row sep="match"><cell sep="hor" top="a" bottom="b,c,d;e" dblclick="a" colspan="5"/></row><row><cell obj="b" wh="3,3" resize="hor" neighbors="b;c;d"/><cell sep="ver" left="b" right="c;d" dblclick="b"/><cell obj="c" wh="3,3" resize="hor" neighbors="b;c;d"/><cell sep="ver" left="b;c" right="d" dblclick="c"/><cell obj="d" wh="3,3" resize="hor" neighbors="b;c;d"/></row><row sep="match"><cell sep="hor" top="a;b,c,d" bottom="e" dblclick="e" colspan="5"/></row><row><cell obj="e" wh="1,3" resize="ver" neighbors="a;b,c,d;e" colspan="5"/></row></layout>',
 
 "6I": '<layout><autosize hor="a;e;f" ver="f" rows="3" cols="4"/><table data="a,a,a,a;b,c,d,e;f,f,f,f"/><row><cell obj="a" wh="1,3" resize="ver" neighbors="a;b,c,d,e;f" colspan="7"/></row><row sep="true"><cell sep="hor" top="a" bottom="b,c,d,e;f" dblclick="a" colspan="7"/></row><row><cell obj="b" wh="4,3" resize="hor" neighbors="b;c;d;e"/><cell sep="ver" left="b" right="c;d;e" dblclick="b"/><cell obj="c" wh="4,3" resize="hor" neighbors="b;c;d;e"/><cell sep="ver" left="b;c" right="d;e" dblclick="c"/><cell obj="d" wh="4,3" resize="hor" neighbors="b;c;d;e"/><cell sep="ver" left="b;c;d" right="e" dblclick="d"/><cell obj="e" wh="4,3" resize="hor" neighbors="b;c;d;e"/></row><row sep="true"><cell sep="hor" top="a;b,c,d,e" bottom="f" dblclick="f" colspan="7"/></row><row><cell obj="f" wh="1,3" resize="ver" neighbors="a;b,c,d,e;f" colspan="7"/></row></layout>'
};dhtmlXLayoutObject.prototype._availAutoSize = {"1C_hor": new Array("a"),
 "1C_ver": new Array("a"),
 "2E_hor": new Array("a;b"),
 "2E_ver": new Array("a", "b"),
 "2U_hor": new Array("a", "b"),
 "2U_ver": new Array("a;b"),
 "3E_hor": new Array("a;b;c"),
 "3E_ver": new Array("a", "b", "c"),
 "3W_hor": new Array("a", "b", "c"),
 "3W_ver": new Array("a;b;c"),
 "3J_hor": new Array("a;c", "b"),
 "3J_ver": new Array("a;b", "c;b"),
 "3T_hor": new Array("a;b", "a;c"),
 "3T_ver": new Array("a", "b;c"),
 "3L_hor": new Array("a", "b;c"),
 "3L_ver": new Array("a;b", "a;c"),
 "3U_hor": new Array("a;c", "b;c"),
 "3U_ver": new Array("a;b", "c"),
 "4H_hor": new Array("a", "b;c", "d"),
 "4H_ver": new Array("a;b;d", "a;c;d"),
 "4I_hor": new Array("a;b;d", "a;c;d"),
 "4I_ver": new Array("a", "b;c", "d"),
 "4T_hor": new Array("a;b", "a;c", "a;d"),
 "4T_ver": new Array("a", "b;c;d"),
 "4U_hor": new Array("a;d", "b;d", "c;d"),
 "4U_ver": new Array("a;b;c", "d"),
 "5H_hor": new Array("a", "b;c;d", "e"),
 "5H_ver": new Array("a;b;e", "a;c;e", "a;d;e"),
 "5I_hor": new Array("a;b;e", "a;c;e", "a;d;e"),
 "5I_ver": new Array("a", "b;c;d", "e"),
 "6I_hor": new Array("a;b;f", "a;c;f", "a;d;f", "a;e;f"),
 "6I_ver": new Array("a", "b;c;d;e", "f")
};dhtmlXLayoutObject.prototype.setCollapsedText = function(cell, text) {if (!this.polyObj[cell])return;var p;var bar = dhxLayout.polyObj[cell].childNodes[0].childNodes[0];if (bar.childNodes[bar.childNodes.length-1]._ct === true){var p = bar.childNodes[bar.childNodes.length-1]}else {var p = document.createElement("DIV");p._ct = true;p.className = "dhtmlxInfoBarLabel_collapsed_"+this.polyObj[cell]._resize;bar.appendChild(p)};p.innerHTML = text;bar = null};dhtmlXLayoutObject.prototype._doOnAttachURL = function(id, addIFrameEvents) {if (!addIFrameEvents){this.callEvent("onContentLoaded", [id]);return};var t = this;var f = this.cells(id)._frame;if (_isIE){f.onreadystatechange = function(a) {if (f.readyState == "complete")try {t.callEvent("onContentLoaded",[id])}catch(e){}}}else {f.onload = function() {t.callEvent("onContentLoaded",[id])}}};(function(){dhtmlx.extend_api("dhtmlXLayoutObject",{_init:function(obj){return [obj.parent, obj.pattern, obj.skin]},
 image_path:"setImagePath",
 effect:"_effect",
 cells:"_cells",
 autosize:"_autosize"
 },{_cells:function(arr){for (var q=0;q<arr.length;q++){var data = arr[q];var cell = this.cells(data.id);if (cell){if (data.height)cell.setHeight(data.height);if (data.width)cell.setWidth(data.width);if (data.text)cell.setText(data.text);if (data.collapse)cell.collapse();if (data.fix_size)cell.fixSize(data.fix_size[0], data.fix_size[1]);if (data.header === false)cell.hideHeader()}}},
 _autosize:function(arr){this.setAutoSize(arr[0],arr[1])},
 _effect:function(data){if (data.collapse)this.setEffect("collapse", data.collapse);if (data.resize)this.setEffect("resize", data.resize);if (data.highlight)this.setEffect("highlight", data.highlight)}})})();function dhtmlXMenuObject(baseId, skin) {var main_self = this;this.addBaseIdAsContextZone = null;this.isDhtmlxMenuObject = true;this._unloaded = false;this.skin = (skin!=null?skin:"dhx_skyblue");this.imagePath = "";this._isIE6 = false;if (_isIE){this._isIE6 = (window.XMLHttpRequest==null?true:false)};if (baseId == null){this.base = document.body}else {if (document.getElementById(baseId)!= null) {this.base = document.getElementById(baseId);while (this.base.childNodes.length > 0){this.base.removeChild(this.base.childNodes[0])};this.base.className += " dhtmlxMenu_"+this.skin+"_Middle dir_left";this.base._autoSkinUpdate = true;this.addBaseIdAsContextZone = baseId;this.base.onselectstart = function(e) {e = e || event;e.returnValue = false;return false};this.base.oncontextmenu = function(e) {e = e || event;e.returnValue = false;return false}}else {this.base = document.body}};this.topId = "dhxWebMenuTopId";if (!this.extendedModule){var t = function(){alert("dhtmlxmenu_ext.js required")};var extMethods = new Array("setItemEnabled", "setItemDisabled", "isItemEnabled", "_changeItemState", "getItemText", "setItemText",
 "loadFromHTML", "hideItem", "showItem", "isItemHidden", "_changeItemVisible", "setUserData", "getUserData",
 "setOpenMode", "setWebModeTimeout", "enableDynamicLoading", "_updateLoaderIcon", "getItemImage", "setItemImage",
 "clearItemImage", "setAutoShowMode", "setAutoHideMode", "setContextMenuHideAllMode", "getContextMenuHideAllMode",
 "setVisibleArea", "setTooltip", "getTooltip", "setHotKey", "getHotKey", "setItemSelected", "setTopText", "setRTL",
 "setAlign", "setHref", "clearHref", "getCircuit", "_clearAllSelectedSubItemsInPolygon", "_checkArrowsState",
 "_addUpArrow", "_addDownArrow", "_removeUpArrow", "_removeDownArrow", "_isArrowExists", "_doScrollUp", "_doScrollDown",
 "_countPolygonItems", "setOverflowHeight", "_getRadioImgObj", "_setRadioState", "_radioOnClickHandler",
 "getRadioChecked", "setRadioChecked", "addRadioButton", "_getCheckboxState", "_setCheckboxState", "_readLevel",
 "_updateCheckboxImage", "_checkboxOnClickHandler", "setCheckboxState", "getCheckboxState", "addCheckbox", "serialize");for (var q=0;q<extMethods.length;q++)this[extMethods[q]] = t;extMethods = null};this.fixedPosition = false;this.menuSelected = -1;this.menuLastClicked = -1;this.idPrefix = "";this.itemTagName = "item";this.itemTextTagName = "itemtext";this.userDataTagName = "userdata";this.itemTipTagName = "tooltip";this.itemHotKeyTagName = "hotkey";this.itemHrefTagName = "href";this.dirTopLevel = "bottom";this.dirSubLevel = "right";this.menuX1 = null;this.menuX2 = null;this.menuY1 = null;this.menuY2 = null;this.menuMode = "web";this.menuTimeoutMsec = 400;this.menuTimeoutHandler = null;this.idPull = {};this.itemPull = {};this.userData = {};this.radio = {};this._rtl = false;this._align = "left";this.menuTouched = false;this.zIndInit = 1200;this.zInd = this.zIndInit;this.zIndStep = 50;this.menuModeTopLevelTimeout = true;this.menuModeTopLevelTimeoutTime = 200;this.topLevelItemPaddingIconExists = 27;this.topLevelItemPaddingIconNotExists = 6;this._topLevelBottomMargin = 1;this._topLevelRightMargin = 0;this._topLevelOffsetLeft = 1;this._arrowFFFix = (_isIE?(document.compatMode=="BackCompat"?0:-4):-4);this.setSkin = function(skin) {var oldSkin = this.skin;this.skin = skin;switch (this.skin){case "standard":
 this._topLevelBottomMargin = 1;this._topLevelOffsetLeft = 0;this._arrowFFFix = (_isIE?(document.compatMode=="BackCompat"?0:(this._isIE6?-5:-4)):-4);break;case "clear_blue":
 case "clear_green":
 case "clear_silver":
 this._topLevelBottomMargin = 3;this._topLevelOffsetLeft = 0;this._arrowFFFix = (_isIE?(document.compatMode=="BackCompat"?0:-4):-4);break;case "aqua_orange":
 case "aqua_sky":
 case "aqua_dark":
 this._topLevelBottomMargin = 1;this._topLevelOffsetLeft = 0;this._arrowFFFix = (_isIE?(document.compatMode=="BackCompat"?0:-2):-2);break;case "modern_blue":
 case "modern_red":
 case "modern_black":
 this._topLevelBottomMargin = 3;this._topLevelOffsetLeft = 0;this._arrowFFFix = (_isIE?(document.compatMode=="BackCompat"?0:-2):-2);break;case "glassy_blue":
 this._topLevelBottomMargin = 0;this._topLevelOffsetLeft = 0;this._arrowFFFix = (_isIE?(document.compatMode=="BackCompat"?0:-4):-4);break;case "dhx_black":
 case "dhx_blue":
 case "dhx_skyblue":
 this._topLevelBottomMargin = 2;this._topLevelRightMargin = 1;this._topLevelOffsetLeft = 1;this._arrowFFFix = (_isIE?(document.compatMode=="BackCompat"?0:-4):-4);break};if (this.base._autoSkinUpdate){this.base.className = this.base.className.replace("dhtmlxMenu_"+oldSkin+"_Middle", "")+" dhtmlxMenu_"+this.skin+"_Middle"};for (var a in this.idPull){this.idPull[a].className = String(this.idPull[a].className).replace(oldSkin, this.skin)}};this.setSkin(this.skin);this.dLoad = false;this.dLoadUrl = "";this.dLoadSign = "?";this.loaderIcon = false;this.limit = 0;this._scrollUpTM = null;this._scrollUpTMTime = 20;this._scrollUpTMStep = 3;this._scrollDownTM = null;this._scrollDownTMTime = 20;this._scrollDownTMStep = 3;this.context = false;this.contextZones = {};this.contextMenuZoneId = false;this.contextAutoShow = true;this.contextAutoHide = true;this.contextHideAllMode = true;this.sxDacProc = null;this.dacSpeed = 10;this.dacCycles = [];for (var q=0;q<10;q++){this.dacCycles[q] = q};this.dacSpeedIE = 10;this.dacCyclesIE = [];for (var q=0;q<10;q++){this.dacCyclesIE[q] = q};this._enableDacSupport = function(dac) {this.sxDacProc = dac};this._selectedSubItems = new Array();this._openedPolygons = new Array();this._addSubItemToSelected = function(item, polygon) {var t = true;for (var q=0;q<this._selectedSubItems.length;q++){if ((this._selectedSubItems[q][0] == item)&& (this._selectedSubItems[q][1] == polygon)) {t = false}};if (t == true){this._selectedSubItems.push(new Array(item, polygon))};return t};this._removeSubItemFromSelected = function(item, polygon) {var m = new Array();var t = false;for (var q=0;q<this._selectedSubItems.length;q++){if ((this._selectedSubItems[q][0] == item)&& (this._selectedSubItems[q][1] == polygon)) {t = true}else {m[m.length] = this._selectedSubItems[q]}};if (t == true){this._selectedSubItems = m};return t};this._getSubItemToDeselectByPolygon = function(polygon) {var m = new Array();for (var q=0;q<this._selectedSubItems.length;q++){if (this._selectedSubItems[q][1] == polygon){m[m.length] = this._selectedSubItems[q][0];m = m.concat(this._getSubItemToDeselectByPolygon(this._selectedSubItems[q][0]));var t = true;for (var w=0;w<this._openedPolygons.length;w++){if (this._openedPolygons[w] == this._selectedSubItems[q][0]){t = false}};if (t == true){this._openedPolygons[this._openedPolygons.length] = this._selectedSubItems[q][0]};this._selectedSubItems[q][0] = -1;this._selectedSubItems[q][1] = -1}};return m};this._hidePolygon = function(id) {if (this.idPull["polygon_" + id] != null){if ((this.sxDacProc != null)&& (this.idPull["sxDac_" + id] != null)) {this.idPull["sxDac_"+id]._hide()}else {if (this.idPull["polygon_"+id].style.display == "none")return;this.idPull["polygon_"+id].style.display = "none";if (this.idPull["arrowup_"+id] != null){this.idPull["arrowup_"+id].style.display = "none"};if (this.idPull["arrowdown_"+id] != null){this.idPull["arrowdown_"+id].style.display = "none"};this._updateItemComplexState(id, true, false);if (this._isIE6){if (this.idPull["polygon_"+id+"_ie6cover"] != null){this.idPull["polygon_"+id+"_ie6cover"].style.display = "none"}};id = String(id).replace(this.idPrefix, "");if (id == this.topId)id = null;this.callEvent("onHide", [id])}}};this._showPolygon = function(id, openType) {var itemCount = this._countVisiblePolygonItems(id);if (itemCount == 0)return;var pId = "polygon_"+id;if ((this.idPull[pId] != null)&& (this.idPull[id] != null)) {if (this.menuModeTopLevelTimeout && this.menuMode == "web" && !this.context){if (!this.idPull[id]._mouseOver && openType == this.dirTopLevel)return};if (!this.fixedPosition)this._autoDetectVisibleArea();var arrUpH = 0;var arrDownH = 0;var arrowUp = null;var arrowDown = null;if (this.limit > 0 && this.limit < itemCount){var auId = "arrowup_"+id;var adId = "arrowdown_"+id;if (this.idPull["arrowup_"+id] == null)this._addUpArrow(String(id).replace(this.idPrefix,""));if (this.idPull["arrowdown_"+id] == null)this._addDownArrow(String(id).replace(this.idPrefix,""));arrowUp = this.idPull["arrowup_"+id];arrowUp.style.visibility = "hidden";arrowUp.style.display = "";arrowUp.style.zIndex = this.zInd;arrUpH = arrowUp.offsetHeight;arrowDown = this.idPull["arrowdown_"+id];arrowDown.style.visibility = "hidden";arrowDown.style.display = "";arrowDown.style.zIndex = this.zInd;arrDownH = arrowDown.offsetHeight};this.idPull[pId].style.visibility = "hidden";this.idPull[pId].style.left = "0px";this.idPull[pId].style.top = "0px";this.idPull[pId].style.display = "";this.idPull[pId].style.zIndex = this.zInd;if (this.limit > 0){if (this.limit < itemCount){this.idPull[pId].style.height = this.idPull[pId].childNodes[0].offsetHeight*this.limit+"px";this.idPull[pId].scrollTop = 0}else {this.idPull[pId].style.height = ""}};this.zInd += this.zIndStep;if (this.itemPull[id] != null){var parPoly = "polygon_"+this.itemPull[id]["parent"]}else if (this.context){var parPoly = this.idPull[this.idPrefix+this.topId]};var srcX = (this.idPull[id].tagName != null ? getAbsoluteLeft(this.idPull[id]) : this.idPull[id][0]);var srcY = (this.idPull[id].tagName != null ? getAbsoluteTop(this.idPull[id]) : this.idPull[id][1]);var srcW = (this.idPull[id].tagName != null ? this.idPull[id].offsetWidth : 0);var srcH = (this.idPull[id].tagName != null ? this.idPull[id].offsetHeight + arrUpH + arrDownH : 0);var x = 0;var y = 0;var w = this.idPull[pId].offsetWidth;var h = this.idPull[pId].offsetHeight;if (openType == "bottom"){if (this._rtl){x = srcX + (srcW!=null?srcW:0) - w}else {if (this._align == "right"){x = srcX + srcW - w}else {x = srcX - 1 + (openType==this.dirTopLevel?this._topLevelRightMargin:0)}};y = srcY - 1 + srcH - arrUpH - arrDownH + this._topLevelBottomMargin};if (openType == "right"){x = srcX + srcW - 1;y = srcY + 2};if (openType == "left"){x = srcX - this.idPull[pId].offsetWidth + 2;y = srcY + 2};if (openType == "top"){x = srcX - 1;y = srcY - h + 2};if (this.fixedPosition){var mx = 65536;var my = 65536}else {var mx = (this.menuX2!=null?this.menuX2:0);var my = (this.menuY2!=null?this.menuY2:0);if (mx == 0){if (window.innerWidth){mx = window.innerWidth;my = window.innerHeight}else {mx = document.body.offsetWidth;my = document.body.scrollHeight}}};if (x+w > mx && !this._rtl){x = srcX - w + 2};if (x < this.menuX1 && this._rtl){x = srcX + srcW - 2};if (x < 0){x = 0};if (y+h > my && this.menuY2 != null){y = srcY + srcH - h + 2;if (this.itemPull[id] != null && !this.context){if (this.itemPull[id]["parent"] == this.idPrefix+this.topId)y = y - this.base.offsetHeight}};this.idPull[pId].style.left = x+"px";this.idPull[pId].style.top = y+arrUpH+"px";if ((this.sxDacProc != null)&& (this.idPull["sxDac_" + id] != null)) {this.idPull["sxDac_"+id]._show()}else {this.idPull[pId].style.visibility = "";if (this.limit > 0 && this.limit < itemCount){arrowUp.style.left = x+"px";arrowUp.style.top = y+"px";arrowUp.style.width = w+this._arrowFFFix+"px";arrowUp.style.visibility = "";arrowDown.style.left = x+"px";arrowDown.style.top = y+arrUpH+h+"px";arrowDown.style.width = w+this._arrowFFFix+"px";arrowDown.style.visibility = "";this._checkArrowsState(id)};if (this._isIE6){var pIdIE6 = pId+"_ie6cover";if (this.idPull[pIdIE6] == null){var ifr = document.createElement("IFRAME");ifr.className = "dhtmlxMenu_IE6CoverFix_"+this.skin;ifr.frameBorder = 0;ifr.setAttribute("src", "javascript:false;");document.body.insertBefore(ifr, document.body.firstChild);this.idPull[pIdIE6] = ifr};this.idPull[pIdIE6].style.left = this.idPull[pId].style.left;this.idPull[pIdIE6].style.top = this.idPull[pId].style.top;this.idPull[pIdIE6].style.width = this.idPull[pId].offsetWidth+"px";this.idPull[pIdIE6].style.height = this.idPull[pId].offsetHeight+"px";this.idPull[pIdIE6].style.zIndex = this.idPull[pId].style.zIndex-1;this.idPull[pIdIE6].style.display = ""};id = String(id).replace(this.idPrefix, "");if (id == this.topId)id = null;this.callEvent("onShow", [id])}}};this._redistribSubLevelSelection = function(id, parentId) {while (this._openedPolygons.length > 0){this._openedPolygons.pop()};var i = this._getSubItemToDeselectByPolygon(parentId);this._removeSubItemFromSelected(-1, -1);for (var q=0;q<i.length;q++){if ((this.idPull[i[q]] != null)&& (i[q] != id)) {if (this.itemPull[i[q]]["state"] == "enabled"){this.idPull[i[q]].className = "dhtmlxMenu_"+this.skin+"_SubLevelArea_Item_Normal"}}};for (var q=0;q<this._openedPolygons.length;q++){if (this._openedPolygons[q] != parentId){this._hidePolygon(this._openedPolygons[q])}};if (this.itemPull[id]["state"] == "enabled"){this.idPull[id].className = "dhtmlxMenu_"+this.skin+"_SubLevelArea_Item_Selected";if (this.itemPull[id]["complex"] && this.dLoad && (this.itemPull[id]["loaded"]=="no")) {if (this.loaderIcon == true){this._updateLoaderIcon(id, true)};var xmlLoader = new dtmlXMLLoaderObject(this._xmlParser, window);this.itemPull[id]["loaded"] = "get";this.callEvent("onXLS", []);xmlLoader.loadXML(this.dLoadUrl+this.dLoadSign+"action=loadMenu&parentId="+id.replace(this.idPrefix,"")+"&etc="+new Date().getTime())};if (this.itemPull[id]["complex"] || (this.dLoad && (this.itemPull[id]["loaded"] == "yes"))) {if ((this.itemPull[id]["complex"])&& (this.idPull["polygon_" + id] != null)) {this._updateItemComplexState(id, true, true);this._showPolygon(id, this.dirSubLevel)}};this._addSubItemToSelected(id, parentId);this.menuSelected = id}};this._doOnClick = function(id, type, casState) {this.menuLastClicked = id;if (this.itemPull[this.idPrefix+id]["href_link"] != null){var form = document.createElement("FORM");form.action = this.itemPull[this.idPrefix+id]["href_link"];if (this.itemPull[this.idPrefix+id]["href_target"] != null){form.target = this.itemPull[this.idPrefix+id]["href_target"]};form.style.display = "none";document.body.appendChild(form);form.submit();if (form != null){document.body.removeChild(form);form = null};return};if (type.charAt(0)=="c") return;if (type.charAt(1)=="d") return;if (type.charAt(2)=="s") return;if (this.checkEvent("onClick")) {this._clearAndHide();if (this._isContextMenuVisible()&& this.contextAutoHide) this._hideContextMenu();this.callEvent("onClick", [id, this.contextMenuZoneId, casState])}else {if ((type.charAt(1)== "d") || (this.menuMode == "win" && type.charAt(2) == "t")) return;this._clearAndHide();if (this._isContextMenuVisible()&& this.contextAutoHide) this._hideContextMenu()}};this._doOnTouchMenu = function(id) {if (this.menuTouched == false){this.menuTouched = true;if (this.checkEvent("onTouch")) {this.callEvent("onTouch", [id])}}};this._searchMenuNode = function(node, menu) {var m = new Array();for (var q=0;q<menu.length;q++){if (typeof(menu[q])== "object") {if (menu[q].length == 5){if (typeof(menu[q][0])!= "object") {if ((menu[q][0].replace(this.idPrefix, "")== node) && (q == 0)) {m = menu}}};var j = this._searchMenuNode(node, menu[q]);if (j.length > 0){m = j}}};return m};this._getMenuNodes = function(node) {var m = new Array;for (var a in this.itemPull){if (this.itemPull[a]["parent"] == node){m[m.length] = a}};return m};this._genStr = function(w) {var s = "";var z = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";for (var q=0;q<w;q++){s = s + z.charAt(Math.round(Math.random() * z.length))};return s};this.getItemType = function(id) {id = this.idPrefix+id;if (this.itemPull[id] == null){return null};return this.itemPull[id]["type"]};this.forEachItem = function(handler) {for (var a in this.itemPull){handler(String(a).replace(this.idPrefix, ""))}};this._clearAndHide = function() {main_self.menuSelected = -1;main_self.menuLastClicked = -1;while (main_self._openedPolygons.length > 0){main_self._openedPolygons.pop()};for (var q=0;q<main_self._selectedSubItems.length;q++){var id = main_self._selectedSubItems[q][0];if (main_self.idPull[id] != null){if (main_self.itemPull[id]["state"] == "enabled"){if (main_self.idPull[id].className == "dhtmlxMenu_"+main_self.skin+"_SubLevelArea_Item_Selected"){main_self.idPull[id].className = "dhtmlxMenu_"+main_self.skin+"_SubLevelArea_Item_Normal"};if (main_self.idPull[id].className == "dhtmlxMenu_"+main_self.skin+"_TopLevel_Item_Selected"){if (main_self.itemPull[id]["cssNormal"] != null){main_self.idPull[id].className = main_self.itemPull[id]["cssNormal"]}else {main_self.idPull[id].className = "dhtmlxMenu_"+main_self.skin+"_TopLevel_Item_Normal"}}}};main_self._hidePolygon(id)};main_self.menuTouched = false;if (main_self.context){if (main_self.contextHideAllMode){main_self._hidePolygon(main_self.idPrefix+main_self.topId);main_self.zInd = main_self.zIndInit}else {main_self.zInd = main_self.zIndInit+main_self.zIndStep}}};this._doOnLoad = function() {};this.loadXML = function(xmlFile, onLoadFunction) {if (onLoadFunction)this._doOnLoad = function() {onLoadFunction()};this.callEvent("onXLS", []);this._xmlLoader.loadXML(xmlFile)};this.loadXMLString = function(xmlString, onLoadFunction) {if (onLoadFunction)this._doOnLoad = function() {onLoadFunction()};this._xmlLoader.loadXMLString(xmlString)};this._buildMenu = function(t, parentId) {var u = 0;for (var q=0;q<t.childNodes.length;q++){if (t.childNodes[q].tagName == this.itemTagName){var r = t.childNodes[q];var item = {};item["id"] = this.idPrefix+(r.getAttribute("id")||this._genStr(24));item["title"] = r.getAttribute("text")||"";item["imgen"] = r.getAttribute("img")||"";item["imgdis"] = r.getAttribute("imgdis")||"";item["tip"] = "";item["hotkey"] = "";if (r.getAttribute("cssNormal")!= null) {item["cssNormal"] = r.getAttribute("cssNormal")};item["type"] = r.getAttribute("type")||"item";if (item["type"] == "checkbox"){item["checked"] = (r.getAttribute("checked")!=null);item["imgen"] = "chbx_"+(item["checked"]?"1":"0");item["imgdis"] = "chbxdis_"+(item["checked"]?"1":"0")};if (item["type"] == "radio"){item["checked"] = (r.getAttribute("checked")!=null);item["imgen"] = "rdbt_"+(item["checked"]?"1":"0");item["imgdis"] = "rdbtdis_"+(item["checked"]?"1":"0");item["group"] = r.getAttribute("group")||this._genStr(24);if (this.radio[item["group"]]==null){this.radio[item["group"]] = new Array()};this.radio[item["group"]][this.radio[item["group"]].length] = item["id"]};item["state"] = (r.getAttribute("enabled")!=null||r.getAttribute("disabled")!=null?(r.getAttribute("enabled")=="false"||r.getAttribute("disabled")=="true"?"disabled":"enabled"):"enabled");item["parent"] = (parentId!=null?parentId:this.idPrefix+this.topId);item["complex"] = (this.dLoad?(r.getAttribute("complex")!=null?true:false):(this._buildMenu(r,item["id"])>0));if (this.dLoad && item["complex"]){item["loaded"] = "no"};this.itemPull[item["id"]] = item;for (var w=0;w<r.childNodes.length;w++){var tagNm = r.childNodes[w].tagName;if (tagNm != null){tagNm = tagNm.toLowerCase()};if (tagNm == this.userDataTagName){var d = r.childNodes[w];if (d.getAttribute("name")!=null) {this.userData[item["id"]+"_"+d.getAttribute("name")] = (d.firstChild.nodeValue!=null?d.firstChild.nodeValue:"")}};if (tagNm == this.itemTextTagName){item["title"] = r.childNodes[w].firstChild.nodeValue};if (tagNm == this.itemTipTagName){item["tip"] = r.childNodes[w].firstChild.nodeValue};if (tagNm == this.itemHotKeyTagName){item["hotkey"] = r.childNodes[w].firstChild.nodeValue};if (tagNm == this.itemHrefTagName && item["type"] == "item"){item["href_link"] = r.childNodes[w].firstChild.nodeValue;if (r.childNodes[w].getAttribute("target")!= null) {item["href_target"] = r.childNodes[w].getAttribute("target")}}};u++}};return u};this._xmlParser = function() {if (main_self.dLoad){var t = this.getXMLTopNode("menu");parentId = (t.getAttribute("parentId")!=null?t.getAttribute("parentId"):null);if (parentId == null){main_self._buildMenu(t, null);main_self._initTopLevelMenu()}else {main_self._buildMenu(t, main_self.idPrefix+parentId);main_self._addSubMenuPolygon(main_self.idPrefix+parentId, main_self.idPrefix+parentId);if (main_self.menuSelected == main_self.idPrefix+parentId){var pId = main_self.idPrefix+parentId;var isTop = main_self.itemPull[main_self.idPrefix+parentId]["parent"]==main_self.idPrefix+main_self.topId;var level = ((isTop&&(!main_self.context))?main_self.dirTopLevel:main_self.dirSubLevel);var isShow = false;if (isTop && main_self.menuModeTopLevelTimeout && main_self.menuMode == "web" && !main_self.context){var item = main_self.idPull[main_self.idPrefix+parentId];if (item._mouseOver == true){var delay = main_self.menuModeTopLevelTimeoutTime - (new Date().getTime()-item._dynLoadTM);if (delay > 1){item._menuOpenTM = window.setTimeout(function(){main_self._showPolygon(pId, level)}, delay);isShow = true}}};if (!isShow){main_self._showPolygon(pId, level)}};main_self.itemPull[main_self.idPrefix+parentId]["loaded"] = "yes";if (main_self.loaderIcon == true){main_self._updateLoaderIcon(main_self.idPrefix+parentId, false)}};this.destructor();main_self.callEvent("onXLE",[])}else {var t = this.getXMLTopNode("menu");main_self._buildMenu(t, null);main_self.init();if (!main_self.context)main_self._redistribTopLevelPositions();main_self.callEvent("onXLE",[]);main_self._doOnLoad()}};this._xmlLoader = new dtmlXMLLoaderObject(this._xmlParser, window);this._showSubLevelItem = function(id,back) {if (document.getElementById("arrow_" + this.idPrefix + id)!= null) {document.getElementById("arrow_" + this.idPrefix + id).style.display = (back?"none":"")};if (document.getElementById("image_" + this.idPrefix + id)!= null) {document.getElementById("image_" + this.idPrefix + id).style.display = (back?"none":"")};if (document.getElementById(this.idPrefix + id)!= null) {document.getElementById(this.idPrefix + id).style.display = (back?"":"none")}};this._hideSubLevelItem = function(id) {this._showSubLevelItem(id,true)
 };this.idPrefix = this._genStr(12);dhtmlxEvent(document.body, "click", function(e){if (main_self._unloaded)return;if (main_self.context){e = e||event;if (!_isOpera){if (main_self.contextAutoHide)main_self._hideContextMenu()}else {if (main_self.contextAutoHide && !e.ctrlKey)main_self._hideContextMenu()}}else {main_self._clearAndHide()}});dhtmlxEvent(document.body, "contextmenu", function(e) {if (main_self._unloaded)return;e = e||event;var t = (e.srcElement||e.target).className;if (t.search("dhtmlxMenu")!= -1 && t.search("SubLevelArea") != -1) return;var toHide = true;var testZone = e.target || e.srcElement;if (testZone.id != null){if (main_self.isContextZone(testZone.id)) {toHide = false}};if (toHide)main_self.hideContextMenu()});this._UID = this._genStr(32);dhtmlxMenuObjectLiveInstances[this._UID] = this;dhtmlxEventable(this);return this};dhtmlXMenuObject.prototype.init = function() {if (this._isInited == true){return};if (this.dLoad){this.callEvent("onXLS", []);this._xmlLoader.loadXML(this.dLoadUrl+this.dLoadSign+"action=loadMenu&etc="+new Date().getTime())}else {this._initTopLevelMenu();this._isInited = true}};dhtmlXMenuObject.prototype._countVisiblePolygonItems = function(id) {var count = 0;for (var a in this.itemPull){var par = this.itemPull[a]["parent"];var tp = this.itemPull[a]["type"];if (this.idPull[a] != null){if (par == id && (tp == "item" || tp == "radio" || tp == "checkbox")&& this.idPull[a].style.display != "none") {count++}}};return count};dhtmlXMenuObject.prototype._redefineComplexState = function(id) {if (this.idPrefix+this.topId == id){return};if ((this.idPull["polygon_"+id] != null)&& (this.idPull[id] != null)) {var u = this._countVisiblePolygonItems(id);if ((u > 0)&& (!this.itemPull[id]["complex"])) {this._updateItemComplexState(id, true, false)};if ((u == 0)&& (this.itemPull[id]["complex"])) {this._updateItemComplexState(id, false, false)}}};dhtmlXMenuObject.prototype._updateItemComplexState = function(id, state, over) {if ((!this.context)&& (this._getItemLevelType(id.replace(this.idPrefix,"")) == "TopLevel")) {this.itemPull[id]["complex"] = state;return};if ((this.idPull[id] == null)|| (this.itemPull[id] == null)) {return};this.itemPull[id]["complex"] = state;var arrowObj = null;if (id == this.idPrefix+this.topId){return};for (var q=0;q<this.idPull[id].childNodes.length;q++){var node = this.idPull[id].childNodes[q];if (node.id != null){if (node.id == "arrow_"+id){arrowObj = node}}};if (this.itemPull[id]["complex"]){if (arrowObj == null){arrowObj = document.createElement("DIV");var arw = "arrow"+(this._rtl?"r":"l")+"_"+(this.itemPull[id]["state"]=="enabled"?"en":"dis");arrowObj.className = "dhtmlxMenu_SubLevelArea_Item_Arrow "+arw;arrowObj.id = "arrow_"+id;this.idPull[id].appendChild(arrowObj)};if (this.dLoad && (this.itemPull[id]["loaded"] == "get")&& this.loaderIcon) {if (arrowObj.className != "dhtmlxMenu_SubLevelArea_Item_Arrow_Loading")arrowObj.className = "dhtmlxMenu_SubLevelArea_Item_Arrow_Loading"}else {var genName = "arrow"+(this._rtl?"r":"l")+"_"+(this.itemPull[id]["state"]=="enabled"?(over?"over":"en"):"dis");arrowObj.className = "dhtmlxMenu_SubLevelArea_Item_Arrow "+genName};return};if ((!this.itemPull[id]["complex"])&& (arrowObj!=null)) {this.idPull[id].removeChild(arrowObj);if (this.itemPull[id]["hotkey_backup"] != null && this.setHotKey){this.setHotKey(id.replace(this.idPrefix, ""), this.itemPull[id]["hotkey_backup"])}}};dhtmlXMenuObject.prototype._getItemLevelType = function(id) {return (this.itemPull[this.idPrefix+id]["parent"]==this.idPrefix+this.topId?"TopLevel":"SubLevelArea")};dhtmlXMenuObject.prototype._redistribTopLevelPositions = function() {if (this.context)return;var w = this._topLevelOffsetLeft;if (this._align == "left"){for (var q=0;q<this.base.childNodes.length;q++){if (this.base.childNodes[q].tagName == "DIV"){if (String(this.base.childNodes[q].className).search("TopLevel_Text") == -1) {if (!this._rtl){this.base.childNodes[q].style.right = "";this.base.childNodes[q].style.left = w + "px"}else {this.base.childNodes[q].style.left = "";this.base.childNodes[q].style.right = w + "px"};w += this.base.childNodes[q].offsetWidth;if (this.skin == "dhx_skyblue" && String(this.base.childNodes[q].className).search("Separator") == -1) w += 2}}}}else {for (var q=this.base.childNodes.length-1;q>=0;q--){if (String(this.base.childNodes[q].className).search("TopLevel_Text") == -1) {this.base.childNodes[q].style.left = "";this.base.childNodes[q].style.right = w + "px";w += this.base.childNodes[q].offsetWidth}}}};dhtmlXMenuObject.prototype._redistribTopLevelSelection = function(id, parent) {var i = this._getSubItemToDeselectByPolygon("parent");this._removeSubItemFromSelected(-1, -1);for (var q=0;q<i.length;q++){if (i[q] != id){this._hidePolygon(i[q])};if ((this.idPull[i[q]] != null)&& (i[q] != id)) {this.idPull[i[q]].className = this.idPull[i[q]].className.replace(/Selected/g, "Normal")}};if (this.itemPull[this.idPrefix+id]["state"] == "enabled"){this.idPull[this.idPrefix+id].className = "dhtmlxMenu_"+this.skin+"_TopLevel_Item_Selected";this._addSubItemToSelected(this.idPrefix+id, "parent");this.menuSelected = (this.menuMode=="win"?(this.menuSelected!=-1?id:this.menuSelected):id);if ((this.itemPull[this.idPrefix+id]["complex"])&& (this.menuSelected != -1)) {this._showPolygon(this.idPrefix+id, this.dirTopLevel)}}};dhtmlXMenuObject.prototype._initTopLevelMenu = function() {this.dirTopLevel = "bottom";this.dirSubLevel = (this._rtl?"left":"right");if (this.context){this.idPull[this.idPrefix+this.topId] = new Array(0,0);this._addSubMenuPolygon(this.idPrefix+this.topId, this.idPrefix+this.topId);this._attachEvents()}else {var m = this._getMenuNodes(this.idPrefix + this.topId);for (var q=0;q<m.length;q++){if (this.itemPull[m[q]]["type"] == "item")this._renderToplevelItem(m[q], null);if (this.itemPull[m[q]]["type"] == "separator")this._renderSeparator(m[q], null)}}};dhtmlXMenuObject.prototype._attachEvents = function() {var main_self = this;dhtmlxEvent(document.body, "click", function(e){if (main_self._unloaded)return;e = e||event;if (_isOpera && e.ctrlKey == true)return;if (main_self._isContextMenuVisible()&& main_self.contextAutoHide) main_self._hideContextMenu()})};dhtmlXMenuObject.prototype._renderToplevelItem = function(id, pos) {var main_self = this;var m = document.createElement("DIV");m.id = id;if (this.itemPull[id]["state"] == "enabled" && this.itemPull[id]["cssNormal"] != null){m.className = this.itemPull[id]["cssNormal"]}else {m.className = "dhtmlxMenu_"+this.skin+"_TopLevel_Item_"+(this.itemPull[id]["state"]=="enabled"?"Normal":"Disabled")};m.innerHTML = this.itemPull[id]["title"];if (this.itemPull[id]["tip"].length > 0){m.title = this.itemPull[id]["tip"]};if ((this.itemPull[id]["imgen"]!="")||(this.itemPull[id]["imgdis"]!="")) {var imgTop=this.itemPull[id][(this.itemPull[id]["state"]=="enabled")?"imgen":"imgdis"];if (imgTop){var imgTop = "<img id='image_"+id+"' src='"+this.imagePath+imgTop+"' class='dhtmlxMenu_TopLevel_Item_Icon_"+(this._rtl?"right":"left")+"' border='0'>";m.innerHTML = imgTop+m.innerHTML;m.style.paddingLeft = this.topLevelItemPaddingIconExists+"px"}};m.onselectstart = function(e) {e = e || event;e.returnValue = false;return false};m.oncontextmenu = function(e) {e = e || event;e.returnValue = false;return false};if (!this._rtl){var w = 0;for (var q=0;q<this.base.childNodes.length;q++){if (String(this.base.childNodes[q].className).search("TopLevel_Text") == -1) {if (!isNaN(this.base.childNodes[q].offsetWidth)) {w = w + this.base.childNodes[q].offsetWidth}}};m.style.left = w + "px"};if (pos != null){pos++;if (pos < 0){pos = 0};if (pos > this.base.childNodes.length - 1){pos = null}};if (pos != null){this.base.insertBefore(m, this.base.childNodes[pos]);this._redistribTopLevelPositions()}else {this.base.appendChild(m);if (this._rtl){this._redistribTopLevelPositions()}};this.idPull[m.id] = m;if (this.itemPull[id]["complex"] && (!this.dLoad)) {this._addSubMenuPolygon(this.itemPull[id]["id"], this.itemPull[id]["id"])};m.onmouseover = function() {if (main_self.menuMode == "web"){window.clearTimeout(main_self.menuTimeoutHandler)};var i = main_self._getSubItemToDeselectByPolygon("parent");main_self._removeSubItemFromSelected(-1, -1);for (var q=0;q<i.length;q++){if (i[q] != this.id){main_self._hidePolygon(i[q])};if ((main_self.idPull[i[q]] != null)&& (i[q] != this.id)) {if (main_self.itemPull[i[q]]["cssNormal"] != null){main_self.idPull[i[q]].className = main_self.itemPull[i[q]]["cssNormal"]}else {main_self.idPull[i[q]].className = main_self.idPull[i[q]].className.replace(/Selected/g, "Normal")}}};if (main_self.itemPull[this.id]["state"] == "enabled"){this.className = "dhtmlxMenu_"+main_self.skin+"_TopLevel_Item_Selected";main_self._addSubItemToSelected(this.id, "parent");main_self.menuSelected = (main_self.menuMode=="win"?(main_self.menuSelected!=-1?this.id:main_self.menuSelected):this.id);if (main_self.dLoad && (main_self.itemPull[this.id]["loaded"]=="no")) {if (main_self.menuModeTopLevelTimeout && main_self.menuMode == "web" && !main_self.context){this._mouseOver = true;this._dynLoadTM = new Date().getTime()};var xmlLoader = new dtmlXMLLoaderObject(main_self._xmlParser, window);main_self.itemPull[this.id]["loaded"] = "get";main_self.callEvent("onXLS", []);xmlLoader.loadXML(main_self.dLoadUrl+main_self.dLoadSign+"action=loadMenu&parentId="+this.id.replace(main_self.idPrefix,"")+"&etc="+new Date().getTime())};if ((!main_self.dLoad)|| (main_self.dLoad && (main_self.itemPull[this.id]["loaded"]=="yes"))) {if ((main_self.itemPull[this.id]["complex"])&& (main_self.menuSelected != -1)) {if (main_self.menuModeTopLevelTimeout && main_self.menuMode == "web" && !main_self.context){this._mouseOver = true;var showItemId = this.id;this._menuOpenTM = window.setTimeout(function(){main_self._showPolygon(showItemId, main_self.dirTopLevel)}, main_self.menuModeTopLevelTimeoutTime)}else {main_self._showPolygon(this.id, main_self.dirTopLevel)}}}};main_self._doOnTouchMenu(this.id.replace(main_self.idPrefix, ""))};m.onmouseout = function() {if (!((main_self.itemPull[this.id]["complex"])&& (main_self.menuSelected != -1)) && (main_self.itemPull[this.id]["state"]=="enabled")) {if (main_self.itemPull[this.id]["cssNormal"] != null){m.className = main_self.itemPull[this.id]["cssNormal"]}else {m.className = "dhtmlxMenu_"+main_self.skin+"_TopLevel_Item_Normal"}};if (main_self.menuMode == "web"){window.clearTimeout(main_self.menuTimeoutHandler);main_self.menuTimeoutHandler = window.setTimeout(function(){main_self._clearAndHide()}, main_self.menuTimeoutMsec, "JavaScript")};if (main_self.menuModeTopLevelTimeout && main_self.menuMode == "web" && !main_self.context){this._mouseOver = false;window.clearTimeout(this._menuOpenTM)}};m.onclick = function(e) {if (main_self.menuMode == "web"){window.clearTimeout(main_self.menuTimeoutHandler)};if (main_self.menuMode != "web" && main_self.itemPull[this.id]["state"] == "disabled"){return};e = e || event;e.cancelBubble = true;e.returnValue = false;if (main_self.menuMode == "win"){if (main_self.itemPull[this.id]["complex"]){if (main_self.menuSelected == this.id){main_self.menuSelected = -1;var s = false}else {main_self.menuSelected = this.id;var s = true};if (s){main_self._showPolygon(this.id, main_self.dirTopLevel)}else {main_self._hidePolygon(this.id)}}};var tc = (main_self.itemPull[this.id]["complex"]?"c":"-");var td = (main_self.itemPull[this.id]["state"]!="enabled"?"d":"-");var cas = {"ctrl": e.ctrlKey, "alt": e.altKey, "shift": e.shiftKey};main_self._doOnClick(this.id.replace(main_self.idPrefix, ""), tc+td+"t", cas);return false}};dhtmlXMenuObject.prototype.setImagePath = function() {};dhtmlXMenuObject.prototype.setIconsPath = function(path) {this.imagePath = path};dhtmlXMenuObject.prototype.setIconPath = dhtmlXMenuObject.prototype.setIconsPath;dhtmlXMenuObject.prototype._updateItemImage = function(id, levelType) {var imgObj = null;for (var q=0;q<this.idPull[this.idPrefix+id].childNodes.length;q++){var node = this.idPull[this.idPrefix+id].childNodes[q];if (node.id != null){if (node.id == "image_"+this.idPrefix+id){imgObj = node}}};if (this.itemPull[this.idPrefix+id]["type"] == "radio"){var imgSrc = this.itemPull[this.idPrefix+id][(this.itemPull[this.idPrefix+id]["state"]=="enabled"?"imgen":"imgdis")]}else {var imgSrc = this.itemPull[this.idPrefix+id][(this.itemPull[this.idPrefix+id]["state"]=="enabled"?"imgen":"imgdis")]};if (imgSrc.length > 0){if (imgObj != null){var tp = this.itemPull[this.idPrefix+id]["type"];if (tp == "checkbox"|| tp == "radio"){imgObj.className = "dhtmlxMenu_SubLevelArea_Item_Icon "+imgSrc}else {if (String(imgObj.className).search("dhtmlxMenu_TopLevel_Item_Icon") === 0) {imgObj.src = this.imagePath+imgSrc}else {imgObj.style.backgroundImage = "url('"+this.imagePath+imgSrc+"')"}}}else {if (levelType == "TopLevel"){var newImgObj = document.createElement("IMG");newImgObj.className = "dhtmlxMenu_"+levelType+"_Item_Icon_"+(this._rtl?"right":"left")
 newImgObj.src = this.imagePath+imgSrc;newImgObj.border = "0";newImgObj.id = "image_"+this.idPrefix+id;this.idPull[this.idPrefix+id].appendChild(newImgObj);this.idPull[this.idPrefix+id].style.paddingLeft = (this._rtl?this.topLevelItemPaddingIconNotExists:this.topLevelItemPaddingIconExists)+"px";this.idPull[this.idPrefix+id].style.paddingRight = (this._rtl?this.topLevelItemPaddingIconExists:this.topLevelItemPaddingIconNotExists)+"px"}else {var newImgObj = document.createElement("DIV");newImgObj.className = "dhtmlxMenu_"+levelType+"_Item_Icon";newImgObj.style.backgroundImage = "url('"+this.imagePath+imgSrc+"')";newImgObj.id = "image_"+this.idPrefix+id;this.idPull[this.idPrefix+id].appendChild(newImgObj)}}}else {if (imgObj != null){this.idPull[this.idPrefix+id].removeChild(imgObj);if (levelType == "TopLevel"){this.idPull[this.idPrefix+id].style.paddingLeft = this.topLevelItemPaddingIconNotExists+"px";this.idPull[this.idPrefix+id].style.paddingRight = this.topLevelItemPaddingIconNotExists+"px"}}}};dhtmlXMenuObject.prototype.removeItem = function(id) {id = this.idPrefix + id;if (this.itemPull[id] == null){return};var parentId = this.itemPull[id]["parent"];if (this.itemPull[id]["type"] == "separator"){this.idPull["separator_"+id].parentNode.removeChild(this.idPull["separator_"+id]);delete this.idPull["separator_"+id];delete this.itemPull[id]}else {if (this.itemPull[id]["complex"]){var items = this._getAllParents(id);items[items.length] = id;var polygons = new Array();for (var q=0;q<items.length;q++){if (this.itemPull[items[q]]["type"] == "separator"){this.removeItem(items[q].replace(this.idPrefix,""))}else {if (this.itemPull[items[q]]["complex"]){polygons[polygons.length] = items[q]};this.idPull[items[q]].parentNode.removeChild(this.idPull[items[q]]);delete this.idPull[items[q]];delete this.itemPull[items[q]]}};for (var q=0;q<polygons.length;q++){this.idPull["polygon_"+polygons[q]].parentNode.removeChild(this.idPull["polygon_"+polygons[q]]);if (this._isIE6){var pId = "polygon_"+polygons[q]+"_ie6cover";if (this.idPull[pId] != null){document.body.removeChild(this.idPull[pId]);delete this.idPull[pId]}};delete this.idPull["polygon_"+polygons[q]];delete this.itemPull[polygons[q]]};if (!this.context){this._redistribTopLevelPositions()}}else {this.idPull[id].parentNode.removeChild(this.idPull[id]);delete this.idPull[id];delete this.itemPull[id]}};if (this.idPull["polygon_"+parentId] != null){if (this.idPull["polygon_"+parentId].childNodes.length == 0){document.body.removeChild(this.idPull["polygon_"+parentId]);if (this._isIE6){var pId = "polygon_"+parentId+"_ie6cover";if (this.idPull[pId] != null){document.body.removeChild(this.idPull[pId]);delete this.idPull[pId]}};delete this.idPull["polygon_"+parentId];this._updateItemComplexState(parentId, false, false)}}};dhtmlXMenuObject.prototype._getAllParents = function(id) {var parents = new Array();for (var a in this.itemPull){if (this.itemPull[a]["parent"] == id){parents[parents.length] = this.itemPull[a]["id"];if (this.itemPull[a]["complex"]){var t = this._getAllParents(this.itemPull[a]["id"]);for (var q=0;q<t.length;q++){parents[parents.length] = t[q]}}}};return parents};dhtmlXMenuObject.prototype.renderAsContextMenu = function() {this.context = true;if (this.base._autoSkinUpdate == true){this.base.className = this.base.className.replace("dhtmlxMenu_"+this.skin+"_Middle","");this.base._autoSkinUpdate = false};if (this.addBaseIdAsContextZone != null){this.addContextZone(this.addBaseIdAsContextZone)}};dhtmlXMenuObject.prototype.addContextZone = function(zoneId) {var zone = document.getElementById(zoneId);var zoneExists = false;for (var a in this.contextZones){zoneExists = zoneExists || (a == zoneId) || (this.contextZones[a] == zone)};if (zoneExists == true)return false;this.contextZones[zoneId] = zone;var main_self = this;if (_isOpera){zone.attachEvent("mouseup", function(e) {for (var q in dhtmlxMenuObjectLiveInstances){if (q != main_self._UID){if (dhtmlxMenuObjectLiveInstances[q].context){dhtmlxMenuObjectLiveInstances[q]._hideContextMenu()}}};e.cancelBubble = true;e.returnValue = false;if (e.button == 0 && e.ctrlKey == true){main_self._doOnContextBeforeCall(e, this)};return false})}else {if (zone.oncontextmenu != null){zone._oldContextMenuHandler = zone.oncontextmenu};zone.oncontextmenu = function(e) {for (var q in dhtmlxMenuObjectLiveInstances){if (q != main_self._UID){if (dhtmlxMenuObjectLiveInstances[q].context){dhtmlxMenuObjectLiveInstances[q]._hideContextMenu()}}};e = e||event;e.cancelBubble = true;e.returnValue = false;main_self._doOnContextBeforeCall(e, this);return false}}};dhtmlXMenuObject.prototype.removeContextZone = function(zoneId) {if (!this.isContextZone(zoneId)) return false;var zone = this.contextZones[zoneId];if (_isOpera){zone.onmouseup = null}else {zone.oncontextmenu = (zone._oldContextMenuHandler!=null?zone._oldContextMenuHandler:null)};delete this.contextZones[zoneId];return true};dhtmlXMenuObject.prototype.isContextZone = function(zoneId) {var isZone = false;if (this.contextZones[zoneId] != null){if (this.contextZones[zoneId] == document.getElementById(zoneId)) isZone = true};return isZone};dhtmlXMenuObject.prototype._isContextMenuVisible = function() {if (this.idPull["polygon_"+this.idPrefix+this.topId] == null)return false;return (this.idPull["polygon_"+this.idPrefix+this.topId].style.display == "")};dhtmlXMenuObject.prototype._showContextMenu = function(x, y, zoneId) {this._clearAndHide();if (this.idPull["polygon_"+this.idPrefix+this.topId] == null)return false;window.clearTimeout(this.menuTimeoutHandler);this.idPull[this.idPrefix+this.topId] = new Array(x, y);this._showPolygon(this.idPrefix+this.topId, "bottom");this.callEvent("onContextMenu", [zoneId])};dhtmlXMenuObject.prototype._hideContextMenu = function() {if (this.idPull["polygon_"+this.idPrefix+this.topId] == null)return false;this._clearAndHide();this._hidePolygon(this.idPrefix+this.topId);this.zInd = this.zIndInit};dhtmlXMenuObject.prototype._doOnContextBeforeCall = function(e, cZone) {this.contextMenuZoneId = cZone.id;this._clearAndHide();this._hideContextMenu();var p = (e.srcElement||e.target);var px = (_isIE||_isOpera||_KHTMLrv?e.offsetX:e.layerX);var py = (_isIE||_isOpera||_KHTMLrv?e.offsetY:e.layerY);var mx = getAbsoluteLeft(p)+px;var my = getAbsoluteTop(p)+py;if (this.checkEvent("onBeforeContextMenu")) {if (this.callEvent("onBeforeContextMenu", [cZone.id])) {if (this.contextAutoShow){this._showContextMenu(mx, my);this.callEvent("onAfterContextMenu", [cZone.id])}}}else {if (this.contextAutoShow){this._showContextMenu(mx, my);this.callEvent("onAfterContextMenu", [cZone.id])}}};dhtmlXMenuObject.prototype.showContextMenu = function(x, y) {this._showContextMenu(x, y, false)};dhtmlXMenuObject.prototype.hideContextMenu = function() {this._hideContextMenu()};dhtmlXMenuObject.prototype._autoDetectVisibleArea = function() {if (this._isVisibleArea)return;this.menuX1 = document.body.scrollLeft;this.menuX2 = this.menuX1+(window.innerWidth||document.body.clientWidth);this.menuY1 = Math.max((_isIE?document.documentElement:document.getElementsByTagName("html")[0]).scrollTop, document.body.scrollTop);this.menuY2 = this.menuY1+(_isIE?Math.max(document.documentElement.clientHeight||0,document.documentElement.offsetHeight||0,document.body.clientHeight||0):window.innerHeight)};dhtmlXMenuObject.prototype.getItemPosition = function(id) {id = this.idPrefix+id;var pos = -1;if (this.itemPull[id] == null){return pos};var parent = this.itemPull[id]["parent"];var obj = (this.idPull["polygon_"+parent]!=null?this.idPull["polygon_"+parent]:this.base);for (var q=0;q<obj.childNodes.length;q++){if (obj.childNodes[q]==this.idPull["separator_"+id]||obj.childNodes[q]==this.idPull[id]){pos = q}};return pos};dhtmlXMenuObject.prototype.setItemPosition = function(id, pos) {id = this.idPrefix+id;if (this.idPull[id] == null){return};var isOnTopLevel = (this.itemPull[id]["parent"] == this.idPrefix+this.topId);var itemData = this.idPull[id];var itemPos = this.getItemPosition(id.replace(this.idPrefix,""));var parent = this.itemPull[id]["parent"];var obj = (this.idPull["polygon_"+parent]!=null?this.idPull["polygon_"+parent]:this.base);obj.removeChild(obj.childNodes[itemPos]);if (pos < 0){pos = 0};if (isOnTopLevel && pos < 1){pos = 1};if (pos < obj.childNodes.length){obj.insertBefore(itemData, obj.childNodes[pos])}else {obj.appendChild(itemData)};if (isOnTopLevel){this._redistribTopLevelPositions()}};dhtmlXMenuObject.prototype.getParentId = function(id) {id = this.idPrefix+id;if (this.itemPull[id] == null){return null};return ((this.itemPull[id]["parent"]!=null?this.itemPull[id]["parent"]:this.topId).replace(this.idPrefix,""))};dhtmlXMenuObject.prototype.addNewSibling = function(nextToId, itemId, itemText, disabled, imgEnabled, imgDisabled) {var id = this.idPrefix+(itemId!=null?itemId:this._genStr(24));var parentId = this.idPrefix+(nextToId!=null?this.getParentId(nextToId):this.topId);this._addItemIntoGlobalStrorage(id, parentId, itemText, "item", disabled, imgEnabled, imgDisabled);if ((parentId == this.idPrefix+this.topId)&& (!this.context)) {this._renderToplevelItem(id, this.getItemPosition(nextToId));this._redistribTopLevelPositions()}else {this._renderSublevelItem(id, this.getItemPosition(nextToId))}};dhtmlXMenuObject.prototype.addNewChild = function(parentId, pos, itemId, itemText, disabled, imgEnabled, imgDisabled) {if (parentId == null){if (this.context){parentId = this.topId}else {this.addNewSibling(parentId, itemId, itemText, disabled, imgEnabled, imgDisabled);if (pos != null)this.setItemPosition(itemId, pos);return}};itemId = this.idPrefix+(itemId!=null?itemId:this._genStr(24));if (this.setHotKey)this.setHotKey(parentId, "");parentId = this.idPrefix+parentId;this._addItemIntoGlobalStrorage(itemId, parentId, itemText, "item", disabled, imgEnabled, imgDisabled);if (this.idPull["polygon_"+parentId] == null){this._renderSublevelPolygon(parentId, parentId)};this._renderSublevelItem(itemId, pos-1);this._redefineComplexState(parentId)};dhtmlXMenuObject.prototype._addItemIntoGlobalStrorage = function(itemId, itemParentId, itemText, itemType, disabled, img, imgDis) {var item = {id: itemId,
 title: itemText,
 imgen: (img!=null?img:""),
 imgdis: (imgDis!=null?imgDis:""),
 type: itemType,
 state: (disabled==true?"disabled":"enabled"),
 parent: itemParentId,
 complex:false,
 hotkey: "",
 tip: ""};this.itemPull[item.id] = item};dhtmlXMenuObject.prototype._addSubMenuPolygon = function(id, parentId) {var s = this._renderSublevelPolygon(id, parentId);var j = this._getMenuNodes(parentId);for (q=0;q<j.length;q++){if (this.itemPull[j[q]]["type"] == "separator"){this._renderSeparator(j[q], null)}else {this._renderSublevelItem(j[q], null)}};if (id == parentId){var level = "topLevel"}else {var level = "subLevel"};for (var q=0;q<j.length;q++){if (this.itemPull[j[q]]["complex"]){this._addSubMenuPolygon(id, this.itemPull[j[q]]["id"])}}};dhtmlXMenuObject.prototype._renderSublevelPolygon = function(id, parentId) {var s = document.createElement("DIV");s.className = "dhtmlxMenu_"+this.skin+"_SubLevelArea_Polygon_"+(this._rtl?"right":"left");s.oncontextmenu = function(e) {e = e||event;e.returnValue = false;e.canceBubble = true;return false};s.id = "polygon_" + parentId;s.onclick = function(e) {e = e || event;e.cancelBubble = true};s.style.display = "none";document.body.insertBefore(s, document.body.firstChild);this.idPull[s.id] = s;if (this.sxDacProc != null){this.idPull["sxDac_" + parentId] = new this.sxDacProc(s, s.className);if (_isIE){this.idPull["sxDac_" + parentId]._setSpeed(this.dacSpeedIE);this.idPull["sxDac_" + parentId]._setCustomCycle(this.dacCyclesIE)}else {this.idPull["sxDac_" + parentId]._setSpeed(this.dacSpeed);this.idPull["sxDac_" + parentId]._setCustomCycle(this.dacCycles)}};return s};dhtmlXMenuObject.prototype._renderSublevelItem = function(id, pos) {var main_self = this;var k = document.createElement("DIV");if (this.itemPull[id]["state"] == "enabled"){k.className = "dhtmlxMenu_"+this.skin+"_SubLevelArea_Item_Normal";var arw = "arrow"+(this._rtl?"r":"l")+"_en";j_icon = this.itemPull[id]["imgen"]}else {k.className = "dhtmlxMenu_"+this.skin+"_SubLevelArea_Item_Disabled";var arw = "arrow"+(this._rtl?"r":"l")+"_dis";j_icon = this.itemPull[id]["imgdis"]};if (this.itemPull[id]["complex"]){var j_nodes = "<div class='dhtmlxMenu_SubLevelArea_Item_Arrow "+arw+"' id='arrow_"+this.itemPull[id]["id"]+"'>"}else {var j_nodes = ""};if (j_icon.length > 0){var tp = this.itemPull[id]["type"];if (tp == "checkbox" || tp == "radio")j_icon = "<div id='image_"+this.itemPull[id]["id"]+"' class='dhtmlxMenu_SubLevelArea_Item_Icon "+j_icon+"'></div>";if (!(tp == "checkbox" || tp == "radio")) j_icon = "<div id='image_"+this.itemPull[id]["id"]+"' class='dhtmlxMenu_SubLevelArea_Item_Icon' style='background-image:url(\""+this.imagePath+j_icon+"\");'></div>"};k.innerHTML = j_icon + this.itemPull[id]["title"] + j_nodes;if (this.itemPull[id]["hotkey"].length > 0 && !this.itemPull[id]["complex"]){var p = "";k.innerHTML += "<div class='dhtmlxMenu_SubLevelArea_Item_HotKey'>"+this.itemPull[id]["hotkey"]+"</div>"};k.id = this.itemPull[id]["id"];k.parent = this.itemPull[id]["parent"];if (this.itemPull[id]["tip"].length > 0){k.title = this.itemPull[id]["tip"]};k.onselectstart = function(e) {e = e || event;e.returnValue = false};k.onmouseover = function() {if (main_self.menuMode == "web"){window.clearTimeout(main_self.menuTimeoutHandler)};main_self._redistribSubLevelSelection(this.id, this.parent)};if (main_self.menuMode == "web"){k.onmouseout = function() {window.clearTimeout(main_self.menuTimeoutHandler);main_self.menuTimeoutHandler = window.setTimeout(function(){main_self._clearAndHide()}, main_self.menuTimeoutMsec, "JavaScript")}};k.onclick = function(e) {if (!main_self.checkEvent("onClick")&& main_self.itemPull[this.id]["complex"]) {return};e = e || event;e.cancelBubble = true;e.returnValue = false;tc = (main_self.itemPull[this.id]["complex"]?"c":"-");td = (main_self.itemPull[this.id]["state"]=="enabled"?"-":"d");var cas = {"ctrl": e.ctrlKey, "alt": e.altKey, "shift": e.shiftKey};switch (main_self.itemPull[this.id]["type"]) {case "checkbox":
 main_self._checkboxOnClickHandler(this.id.replace(main_self.idPrefix, ""), tc+td+"n", cas);break;case "radio":
 main_self._radioOnClickHandler(this.id.replace(main_self.idPrefix, ""), tc+td+"n", cas);break;case "item":
 main_self._doOnClick(this.id.replace(main_self.idPrefix, ""), tc+td+"n", cas);break};return false};var polygon = this.idPull["polygon_"+this.itemPull[id]["parent"]];if (pos != null){pos++;if (pos < 0){pos = 0};if (pos > polygon.childNodes.length - 1){pos = null}};if (pos != null){polygon.insertBefore(k, polygon.childNodes[pos])}else {polygon.appendChild(k)};this.idPull[k.id] = k};dhtmlXMenuObject.prototype._renderSeparator = function(id, pos) {var level = (this.context?"SubLevelArea":(this.itemPull[id]["parent"]==this.idPrefix+this.topId?"TopLevel":"SubLevelArea"));if (level == "topLevel" && this.context)return;var main_self = this;var k = document.createElement("DIV");k.id = "separator_"+id;k.className = "dhtmlxMenu_"+this.skin+"_"+level+"_Separator";k.onselectstart = function(e) {e = e || event;e.returnValue = false};k.onclick = function(e) {e = e || event;e.cancelBubble = true;var cas = {"ctrl": e.ctrlKey, "alt": e.altKey, "shift": e.shiftKey};main_self._doOnClick(this.id.replace("separator_" + main_self.idPrefix, ""), "--s", cas)};if (level == "TopLevel"){if (pos != null){pos++;if (pos < 0){pos = 0};if (this.base.childNodes[pos] != null){this.base.insertBefore(k, this.base.childNodes[pos])}else {this.base.appendChild(k)};this._redistribTopLevelPositions()}else {var last = this.base.childNodes[this.base.childNodes.length-1];if (String(last).search("TopLevel_Text") == -1) {this.base.appendChild(k)}else {this.base.insertBefore(k, last)}}}else {var polygon = this.idPull["polygon_"+this.itemPull[id]["parent"]];if (pos != null){pos++;if (pos < 0){pos = 0};if (pos > polygon.childNodes.length - 1){pos = null}};if (pos != null){polygon.insertBefore(k, polygon.childNodes[pos])}else {polygon.appendChild(k)}};this.idPull[k.id] = k};dhtmlXMenuObject.prototype.addNewSeparator = function(nextToId, itemId) {itemId = this.idPrefix+(itemId!=null?itemId:this._genStr(24));var parentId = this.idPrefix+this.getParentId(nextToId);this._addItemIntoGlobalStrorage(itemId, parentId, "", "separator", false, "", "");this._renderSeparator(itemId, this.getItemPosition(nextToId))};dhtmlXMenuObject.prototype.hide = function() {this._clearAndHide()};dhtmlXMenuObject.prototype.clearAll = function() {for (var a in this.itemPull){if (this.itemPull[a]["parent"] == this.idPrefix+this.topId){this.removeItem(String(a).replace(this.idPrefix,""))}};this._isInited = false};dhtmlXMenuObject.prototype.unload = function() {var obj = this.idPull;for (var a in obj){var el = obj[a];el.onmouseover = null;el.onmouseout = null;el.onclick = null;el.onselectstart = null;el.oncontextmenu = null;if (el.parentNode)el.parentNode.removeChild(el);el = null;obj[a] = null;try {delete obj[a]}catch(e){}};this.idPull = null;for (var a in this.itemPull)this.itemPull[a] = null;this.itemPull = null;if (this.base != null){this.base.className = "";this.base.oncontextmenu = null;this.base.onselectstart = null;this.base = null};this.setSkin = null;var basicMethods = new Array("_enableDacSupport", "_selectedSubItems", "_openedPolygons", "_addSubItemToSelected", "_removeSubItemFromSelected",
 "_getSubItemToDeselectByPolygon", "_hidePolygon", "_showPolygon", "_redistribSubLevelSelection", "_doOnClick",
 "_doOnTouchMenu", "_searchMenuNode", "_getMenuNodes", "_genStr", "getItemType", "forEachItem", "_clearAndHide",
 "_doOnLoad", "loadXML", "loadXMLString", "_buildMenu", "_xmlParser", "_xmlLoader", "_showSubLevelItem",
 "_hideSubLevelItem", "init", "_countVisiblePolygonItems", "_redefineComplexState", "_updateItemComplexState",
 "_getItemLevelType", "_redistribTopLevelPositions", "_redistribTopLevelSelection", "_initTopLevelMenu", "hide",
 "_attachEvents", "_renderToplevelItem", "setImagePath", "setIconsPath", "setIconPath", "_updateItemImage",
 "removeItem", "_getAllParents", "renderAsContextMenu", "addContextZone", "removeContextZone", "isContextZone",
 "_isContextMenuVisible", "_showContextMenu", "_doOnContextBeforeCall", "showContextMenu", "hideContextMenu",
 "_autoDetectVisibleArea", "getItemPosition", "setItemPosition", "getParentId", "addNewSibling", "addNewChild",
 "_addItemIntoGlobalStrorage", "_addSubMenuPolygon", "_renderSublevelPolygon", "_renderSublevelItem", "clearAll",
 "_renderSeparator", "addNewSeparator", "attachEvent", "callEvent", "checkEvent", "eventCatcher", "detachEvent",
 "dhx_Event", "unload", "_hideContextMenu", "items", "radio", "dacCycles", "dacCyclesIE");for (var q=0;q<basicMethods.length;q++)this[basicMethods[q]] = null;basicMethods = null;var extMethods = new Array("setItemEnabled", "setItemDisabled", "isItemEnabled", "_changeItemState", "getItemText", "setItemText",
 "loadFromHTML", "hideItem", "showItem", "isItemHidden", "_changeItemVisible", "setUserData", "getUserData",
 "setOpenMode", "setWebModeTimeout", "enableDynamicLoading", "_updateLoaderIcon", "getItemImage", "setItemImage",
 "clearItemImage", "setAutoShowMode", "setAutoHideMode", "setContextMenuHideAllMode", "getContextMenuHideAllMode",
 "setVisibleArea", "setTooltip", "getTooltip", "setHotKey", "getHotKey", "setItemSelected", "setTopText", "setRTL",
 "setAlign", "setHref", "clearHref", "getCircuit", "_clearAllSelectedSubItemsInPolygon", "_checkArrowsState", "contextZones",
 "_addUpArrow", "_addDownArrow", "_removeUpArrow", "_removeDownArrow", "_isArrowExists", "_doScrollUp", "_doScrollDown",
 "_countPolygonItems", "setOverflowHeight", "_getRadioImgObj", "_setRadioState", "_radioOnClickHandler", "userData",
 "getRadioChecked", "setRadioChecked", "addRadioButton", "_getCheckboxState", "_setCheckboxState", "_readLevel",
 "_updateCheckboxImage", "_checkboxOnClickHandler", "setCheckboxState", "getCheckboxState", "addCheckbox", "serialize");for (var q=0;q<extMethods.length;q++)this[extMethods[q]] = null;extMethods = null;this.extendedModule = null;this._unloaded = true;dhtmlxMenuObjectLiveInstances[this._UID] = null;this._UID = null};var dhtmlxMenuObjectLiveInstances = {};(function(){dhtmlx.extend_api("dhtmlXMenuObject",{_init:function(obj){return [obj.parent, obj.skin]},
 align:"setAlign",
 top_text:"setTopText",
 context:"renderAsContextMenu",
 icon_path:"setIconsPath",
 open_mode:"setOpenMode",
 rtl:"setRTL",
 skin:"setSkin",
 dynamic:"enableDynamicLoading",
 xml:"loadXML",
 items:"items",
 overflow:"setOverflowHeight"
 },{items:function(arr,parent){var pos = 100000;var lastItemId = null;for (var i=0;i < arr.length;i++){var item=arr[i];if (item.type == "separator"){this.addNewSeparator(lastItemId, pos, item.id);lastItemId = item.id}else {this.addNewChild(parent, pos, item.id, item.text, item.disabled, item.img, item.img_disabled);lastItemId = item.id;if (item.items)this.items(item.items,item.id)}}}})})();dhtmlXMenuObject.prototype.extendedModule = "DHXMENUEXT";dhtmlXMenuObject.prototype.setItemEnabled = function(id) {this._changeItemState(id, "enabled", this._getItemLevelType(id))};dhtmlXMenuObject.prototype.setItemDisabled = function(id) {this._changeItemState(id, "disabled", this._getItemLevelType(id))};dhtmlXMenuObject.prototype.isItemEnabled = function(id) {return (this.itemPull[this.idPrefix+id]!=null?(this.itemPull[this.idPrefix+id]["state"]=="enabled"):false)};dhtmlXMenuObject.prototype._changeItemState = function(id, newState, levelType) {var t = false;var j = this.idPrefix + id;if ((this.itemPull[j] != null)&& (this.idPull[j] != null)) {if (this.itemPull[j]["state"] != newState){this.itemPull[j]["state"] = newState;this.idPull[j].className = "dhtmlxMenu_"+this.skin+"_"+(!this.context?levelType:"SubLevelArea")+"_Item_"+(this.itemPull[j]["state"]=="enabled"?"Normal":"Disabled");this._updateItemComplexState(this.idPrefix+id, this.itemPull[this.idPrefix+id]["complex"], false);this._updateItemImage(id, levelType);if ((this.idPrefix + this.menuLastClicked == j)&& (levelType != "TopLevel")) {this._redistribSubLevelSelection(j, this.itemPull[j]["parent"])};if (levelType == "TopLevel" && !this.context){this._redistribTopLevelPositions()}}};return t};dhtmlXMenuObject.prototype.getItemText = function(id) {return (this.itemPull[this.idPrefix+id]!=null?this.itemPull[this.idPrefix+id]["title"]:"")};dhtmlXMenuObject.prototype.setItemText = function(id, text) {id = this.idPrefix + id;if ((this.itemPull[id] != null)&& (this.idPull[id] != null)) {this._clearAndHide();this.idPull[id].innerHTML = this.idPull[id].innerHTML.replace(this.itemPull[id]["title"], text);this.itemPull[id]["title"] = text;if (this.idPrefix + this.menuLastClicked == id){this._redistribSubLevelSelection(id, this.itemPull[id]["parent"])};if (this.itemPull[id]["parent"] == this.idPrefix+this.topId){this._redistribTopLevelPositions()}}};dhtmlXMenuObject.prototype.loadFromHTML = function(objId, clearAfterAdd, onLoadFunction) {this.itemTagName = "DIV";if (typeof(objId)== "string") {objId = document.getElementById(objId)};this._buildMenu(objId, null);this.init();if (clearAfterAdd){objId.parentNode.removeChild(objId)};if (onLoadFunction != null){onLoadFunction()}};dhtmlXMenuObject.prototype.hideItem = function(id) {this._changeItemVisible(id, false)};dhtmlXMenuObject.prototype.showItem = function(id) {this._changeItemVisible(id, true)};dhtmlXMenuObject.prototype.isItemHidden = function(id) {var isHidden = null;if (this.idPull[this.idPrefix+id] != null){isHidden = (this.idPull[this.idPrefix+id].style.display == "none")};return isHidden};dhtmlXMenuObject.prototype._changeItemVisible = function(id, visible) {itemId = this.idPrefix+id;if (this.itemPull[itemId] == null)return;if (this.itemPull[itemId]["type"] == "separator"){itemId = "separator_"+itemId};if (this.idPull[itemId] == null)return;this.idPull[itemId].style.display = (visible?"":"none");if (this._getItemLevelType(id)== "TopLevel") {this._redistribTopLevelPositions()};this._redefineComplexState(this.itemPull[this.idPrefix+id]["parent"])};dhtmlXMenuObject.prototype.setUserData = function(id, name, value) {this.userData[this.idPrefix+id+"_"+name] = value};dhtmlXMenuObject.prototype.getUserData = function(id, name) {return (this.userData[this.idPrefix+id+"_"+name]!=null?this.userData[this.idPrefix+id+"_"+name]:null)};dhtmlXMenuObject.prototype.setOpenMode = function(mode) {if (mode == "win" || mode == "web")this.menuMode = mode;else this.menuMode == "web"};dhtmlXMenuObject.prototype.setWebModeTimeout = function(tm) {this.menuTimeoutMsec = (!isNaN(tm)?tm:400)};dhtmlXMenuObject.prototype.enableDynamicLoading = function(url, icon) {this.dLoad = true;this.dLoadUrl = url;this.dLoadSign = (String(this.dLoadUrl).search(/\?/)==-1?"?":"&");this.loaderIcon = icon;this.init()};dhtmlXMenuObject.prototype._updateLoaderIcon = function(id, state) {if (this.idPull[id] == null)return;for (var q=0;q<this.idPull[id].childNodes.length;q++){if (String(this.idPull[id].childNodes[q].tagName).toLowerCase() == "div") {if (this.idPull[id].childNodes[q].className == "dhtmlxMenu_SubLevelArea_Item_Arrow_Loading"){var arw = "arrow"+(this._rtl?"r":"l")+"_"+(this.itemPull[id]["state"]=="enabled"?"en":"dis");this.idPull[id].childNodes[q].className = "dhtmlxMenu_SubLevelArea_Item_Arrow "+arw}else {this.idPull[id].childNodes[q].className = "dhtmlxMenu_SubLevelArea_Item_Arrow_Loading"}}}};dhtmlXMenuObject.prototype.getItemImage = function(id) {var imgs = new Array(null, null);id = this.idPrefix+id;if (this.itemPull[id]["type"] == "item"){imgs[0] = this.itemPull[id]["imgen"];imgs[1] = this.itemPull[id]["imgdis"]};return imgs};dhtmlXMenuObject.prototype.setItemImage = function(id, img, imgDis) {if (this.itemPull[this.idPrefix+id]["type"] != "item")return;this.itemPull[this.idPrefix+id]["imgen"] = img;this.itemPull[this.idPrefix+id]["imgdis"] = imgDis;this._updateItemImage(id, this._getItemLevelType(id));this._redistribTopLevelPositions()};dhtmlXMenuObject.prototype.clearItemImage = function(id) {this.setItemImage(id, "", "")};dhtmlXMenuObject.prototype.setAutoShowMode = function(mode) {this.contextAutoShow = (mode==true?true:false)};dhtmlXMenuObject.prototype.setAutoHideMode = function(mode) {this.contextAutoHide = (mode==true?true:false)};dhtmlXMenuObject.prototype.setContextMenuHideAllMode = function(mode) {this.contextHideAllMode = (mode==true?true:false)};dhtmlXMenuObject.prototype.getContextMenuHideAllMode = function() {return this.contextHideAllMode};dhtmlXMenuObject.prototype.setVisibleArea = function(x1, x2, y1, y2) {this._isVisibleArea = true;this.menuX1 = x1;this.menuX2 = x2;this.menuY1 = y1;this.menuY2 = y2};dhtmlXMenuObject.prototype.setTooltip = function(id, tip) {id = this.idPrefix+id;if (!(this.itemPull[id] != null && this.idPull[id] != null)) return;this.idPull[id].title = (tip.length > 0 ? tip : null);this.itemPull[id]["tip"] = tip};dhtmlXMenuObject.prototype.getTooltip = function(id) {if (this.itemPull[this.idPrefix+id] == null)return null;return this.itemPull[this.idPrefix+id]["tip"]};dhtmlXMenuObject.prototype.setHotKey = function(id, hkey) {id = this.idPrefix+id;if (!(this.itemPull[id] != null && this.idPull[id] != null)) return;if (this.itemPull[id]["parent"] == this.idPrefix+this.topId && !this.context)return;if (this.itemPull[id]["complex"])return;if (this.itemPull[id]["type"] != "item")return;var hkObj = null;for (var q=0;q<this.idPull[id].childNodes.length;q++){if (this.idPull[id].childNodes[q].tagName == "DIV" && this.idPull[id].childNodes[q].className == "dhtmlxMenu_SubLevelArea_Item_HotKey"){hkObj = this.idPull[id].childNodes[q]}};if (hkey.length == 0){this.itemPull[id]["hotkey_backup"] = this.itemPull[id]["hotkey"];this.itemPull[id]["hotkey"] = "";if (hkObj != null){this.idPull[id].removeChild(hkObj)}}else {this.itemPull[id]["hotkey"] = hkey;this.itemPull[id]["hotkey_backup"] = null;if (hkObj == null){hkObj = document.createElement("DIV");hkObj.className = "dhtmlxMenu_SubLevelArea_Item_HotKey";this.idPull[id].appendChild(hkObj)};hkObj.innerHTML = hkey}};dhtmlXMenuObject.prototype.getHotKey = function(id) {if (this.itemPull[this.idPrefix+id] == null)return null;return this.itemPull[this.idPrefix+id]["hotkey"]};dhtmlXMenuObject.prototype.setItemSelected = function(id) {if (this.itemPull[this.idPrefix+id] == null)return null};dhtmlXMenuObject.prototype.setTopText = function(text) {if (this.context)return;if (this._topText == null){this._topText = document.createElement("DIV");this._topText.className = "dhtmlxMenu_TopLevel_Text_"+(this._rtl?"left":(this._align=="left"?"right":"left"));this.base.appendChild(this._topText)};this._topText.innerHTML = text};dhtmlXMenuObject.prototype.setRTL = function(state) {if (this._rtl == state)return;this.setAlign("left");this._rtl = state;if (!this.context && this.base != null){this.base.className = "dhtmlxMenu_"+this.skin+"_Middle "+(this._rtl?"dir_right":"dir_left")};for (var a in this.idPull){if (String(a).search("polygon_") == 0) {this.idPull[a].className = "dhtmlxMenu_"+this.skin+"_SubLevelArea_Polygon_"+(this._rtl?"right":"left")}};for (var a in this.itemPull){if (this.itemPull[a]["parent"] == this.idPrefix+this.topId){if ((this.itemPull[a]["state"]=="enabled"?this.itemPull[a]["imgen"]:this.itemPull[a]["imgdis"])!= "") {this.idPull[a].style.paddingLeft = (this._rtl?this.topLevelItemPaddingIconNotExists:this.topLevelItemPaddingIconExists);this.idPull[a].style.paddingRight = (this._rtl?this.topLevelItemPaddingIconExists:this.topLevelItemPaddingIconNotExists);for (var q=0;q<this.idPull[a].childNodes.length;q++){if (String(this.idPull[a].childNodes[q].tagName).toLowerCase() == "img") {this.idPull[a].childNodes[q].className = "dhtmlxMenu_TopLevel_Item_Icon_"+(this._rtl?"right":"left")}}}};if (this.itemPull[a]["complex"]){this._updateItemComplexState(a, true, false)}};if (this._topText != null){this._topText.className = "dhtmlxMenu_TopLevel_Text_"+(this._rtl?"left":"right")};this.dirSubLevel = (this._rtl?"left":"right");this._redistribTopLevelPositions()};dhtmlXMenuObject.prototype.setAlign = function(align) {if (this._align == align)return;if (align == "left" || align == "right"){this.setRTL(false);this._align = align;if (this._topText != null)this._topText.className = "dhtmlxMenu_TopLevel_Text_"+(this._align=="left"?"right":"left");this._redistribTopLevelPositions()}};dhtmlXMenuObject.prototype.setHref = function(itemId, href, target) {if (this.itemPull[this.idPrefix+itemId] == null)return;this.itemPull[this.idPrefix+itemId]["href_link"] = href;if (target != null)this.itemPull[this.idPrefix+itemId]["href_target"] = target};dhtmlXMenuObject.prototype.clearHref = function(itemId) {if (this.itemPull[this.idPrefix+itemId] == null)return;delete this.itemPull[this.idPrefix+itemId]["href_link"];delete this.itemPull[this.idPrefix+itemId]["href_target"]};dhtmlXMenuObject.prototype.getCircuit = function(id) {var parents = new Array(id);while (this.getParentId(id)!= this.topId) {id = this.getParentId(id);parents[parents.length] = id};return parents.reverse()};dhtmlXMenuObject.prototype._clearAllSelectedSubItemsInPolygon = function(polygon) {var subIds = this._getSubItemToDeselectByPolygon(polygon);for (var q=0;q<this._openedPolygons.length;q++){if (this._openedPolygons[q] != polygon){this._hidePolygon(this._openedPolygons[q])}};for (var q=0;q<subIds.length;q++){if (this.idPull[subIds[q]] != null){if (this.itemPull[subIds[q]]["state"] == "enabled"){this.idPull[subIds[q]].className = "dhtmlxMenu_"+this.skin+"_SubLevelArea_Item_Normal"}}}};dhtmlXMenuObject.prototype._checkArrowsState = function(id) {var polygon = this.idPull["polygon_"+id];var arrowUp = this.idPull["arrowup_"+id];var arrowDown = this.idPull["arrowdown_"+id];if (polygon.scrollTop == 0){arrowUp.className = "dhtmlxMenu_"+this.skin+"_SubLevelArea_ArrowUp_Disabled"}else {arrowUp.className = "dhtmlxMenu_"+this.skin+"_SubLevelArea_ArrowUp" + (arrowUp.over ? "_Over" : "")};if (polygon.scrollTop + polygon.offsetHeight < polygon.scrollHeight){arrowDown.className = "dhtmlxMenu_"+this.skin+"_SubLevelArea_ArrowDown" + (arrowDown.over ? "_Over" : "")}else {arrowDown.className = "dhtmlxMenu_"+this.skin+"_SubLevelArea_ArrowDown_Disabled"}};dhtmlXMenuObject.prototype._addUpArrow = function(id) {var main_self = this;var arrow = document.createElement("DIV");arrow.pId = this.idPrefix+id;arrow.id = "arrowup_"+this.idPrefix+id;arrow.className = "dhtmlxMenu_"+this.skin+"_SubLevelArea_ArrowUp";arrow.innerHTML = "<div class='dhtmlxMenu_"+this.skin+"_SubLevelArea_Arrow'><div class='dhtmlxMenu_SubLevelArea_Arrow_Icon'></div></div>";arrow.style.display = "none";arrow.over = false;arrow.onselectstart = function(e) {e = e||event;e.returnValue = false;return false};arrow.oncontextmenu = function(e) {e = e||event;e.returnValue = false;return false};arrow.onmouseover = function() {if (main_self.menuMode == "web"){window.clearTimeout(main_self.menuTimeoutHandler)};main_self._clearAllSelectedSubItemsInPolygon(this.pId);if (this.className == "dhtmlxMenu_"+main_self.skin+"_SubLevelArea_ArrowUp_Disabled")return;this.className = "dhtmlxMenu_"+main_self.skin+"_SubLevelArea_ArrowUp_Over";this.over = true;main_self._canScrollUp = true;main_self._doScrollUp(this.pId, true)};arrow.onmouseout = function() {if (main_self.menuMode == "web"){window.clearTimeout(main_self.menuTimeoutHandler);main_self.menuTimeoutHandler = window.setTimeout(function(){main_self._clearAndHide()}, main_self.menuTimeoutMsec, "JavaScript")};this.over = false;main_self._canScrollUp = false;if (this.className == "dhtmlxMenu_"+main_self.skin+"_SubLevelArea_ArrowUp_Disabled")return;this.className = "dhtmlxMenu_"+main_self.skin+"_SubLevelArea_ArrowUp";window.clearTimeout(main_self._scrollUpTM)};arrow.onclick = function(e) {e = e||event;e.returnValue = false;e.cancelBubble = true;return false};document.body.insertBefore(arrow, document.body.firstChild);this.idPull[arrow.id] = arrow};dhtmlXMenuObject.prototype._addDownArrow = function(id) {var main_self = this;var arrow = document.createElement("DIV");arrow.pId = this.idPrefix+id;arrow.id = "arrowdown_"+this.idPrefix+id;arrow.className = "dhtmlxMenu_"+this.skin+"_SubLevelArea_ArrowDown";arrow.innerHTML = "<div class='dhtmlxMenu_"+this.skin+"_SubLevelArea_Arrow'><div class='dhtmlxMenu_SubLevelArea_Arrow_Icon'></div></div>";arrow.style.display = "none";arrow.over = false;arrow.onselectstart = function(e) {e = e||event;e.returnValue = false;return false};arrow.oncontextmenu = function(e) {e = e||event;e.returnValue = false;return false};arrow.onmouseover = function() {if (main_self.menuMode == "web"){window.clearTimeout(main_self.menuTimeoutHandler)};main_self._clearAllSelectedSubItemsInPolygon(this.pId);if (this.className == "dhtmlxMenu_"+main_self.skin+"_SubLevelArea_ArrowDown_Disabled")return;this.className = "dhtmlxMenu_"+main_self.skin+"_SubLevelArea_ArrowDown_Over";this.over = true;main_self._canScrollDown = true;main_self._doScrollDown(this.pId, true)};arrow.onmouseout = function() {if (main_self.menuMode == "web"){window.clearTimeout(main_self.menuTimeoutHandler);main_self.menuTimeoutHandler = window.setTimeout(function(){main_self._clearAndHide()}, main_self.menuTimeoutMsec, "JavaScript")};this.over = false;main_self._canScrollDown = false;if (this.className == "dhtmlxMenu_"+main_self.skin+"_SubLevelArea_ArrowDown_Disabled")return;this.className = "dhtmlxMenu_"+main_self.skin+"_SubLevelArea_ArrowDown";window.clearTimeout(main_self._scrollDownTM)};arrow.onclick = function(e) {e = e||event;e.returnValue = false;e.cancelBubble = true;return false};document.body.insertBefore(arrow, document.body.firstChild);this.idPull[arrow.id] = arrow};dhtmlXMenuObject.prototype._removeUpArrow = function(id) {var fullId = "arrowup_"+this.idPrefix+id;this._removeArrow(fullId)};dhtmlXMenuObject.prototype._removeDownArrow = function(id) {var fullId = "arrowdown_"+this.idPrefix+id;this._removeArrow(fullId)};dhtmlXMenuObject.prototype._removeArrow = function(fullId) {var arrow = this.idPull[fullId];arrow.onselectstart = null;arrow.oncontextmenu = null;arrow.onmouseover = null;arrow.onmouseout = null;arrow.onclick = null;if (arrow.parentNode)arrow.parentNode.removeChild(arrow);arrow = null;this.idPull[fullId] = null;try {delete this.idPull[fullId]}catch(e) {}};dhtmlXMenuObject.prototype._isArrowExists = function(id) {if (this.idPull["arrowup_"+id] != null && this.idPull["arrowdown_"+id] != null)return true;return false};dhtmlXMenuObject.prototype._doScrollUp = function(id, checkArrows) {var polygon = this.idPull["polygon_"+id];if (this._canScrollUp && polygon.scrollTop > 0){var theEnd = false;var nextScrollTop = polygon.scrollTop - this._scrollUpTMStep;if (nextScrollTop < 0){theEnd = true;nextScrollTop = 0};polygon.scrollTop = nextScrollTop;if (!theEnd){var that = this;this._scrollUpTM = window.setTimeout(function() {that._doScrollUp(id, false)}, this._scrollUpTMTime)}}else {this._canScrollUp = false;this._checkArrowsState(id)};if (checkArrows){this._checkArrowsState(id)}};dhtmlXMenuObject.prototype._doScrollDown = function(id, checkArrows) {var polygon = this.idPull["polygon_"+id];if (this._canScrollDown && polygon.scrollTop + polygon.offsetHeight <= polygon.scrollHeight){var theEnd = false;var nextScrollTop = polygon.scrollTop + this._scrollDownTMStep;if (nextScrollTop + polygon.offsetHeight > polygon.scollHeight){theEnd = true;nextScrollTop = polygon.scollHeight - polygon.offsetHeight};polygon.scrollTop = nextScrollTop;if (!theEnd){var that = this;this._scrollDownTM = window.setTimeout(function() {that._doScrollDown(id, false)}, this._scrollDownTMTime)}}else {this._canScrollDown
 this._checkArrowsState(id)};if (checkArrows){this._checkArrowsState(id)}};dhtmlXMenuObject.prototype._countPolygonItems = function(id) {var count = 0;for (var a in this.itemPull){var par = this.itemPull[a]["parent"];var tp = this.itemPull[a]["type"];if (par == this.idPrefix+id && (tp == "item" || tp == "radio" || tp == "checkbox")) {count++}};return count};dhtmlXMenuObject.prototype.setOverflowHeight = function(itemsNum) {if (this.limit == 0 && itemsNum <= 0)return;this._clearAndHide();if (this.limit >= 0 && itemsNum > 0){this.limit = itemsNum;return};if (this.limit > 0 && itemsNum <= 0){for (var a in this.itemPull){if (this._isArrowExists(a)) {var b = String(a).replace(this.idPrefix, "");this._removeUpArrow(b);this._removeDownArrow(b);this.idPull["polygon_"+a].style.height = ""}};this.limit = 0;return}};dhtmlXMenuObject.prototype._getRadioImgObj = function(id) {var imgObj = null;for (var q=0;q<this.idPull[this.idPrefix+id].childNodes.length;q++){var node = this.idPull[this.idPrefix+id].childNodes[q];if (node.id != null)if (node.id == "image_"+this.idPrefix+id)imgObj = node};return imgObj};dhtmlXMenuObject.prototype._setRadioState = function(id, state) {var imgObj = this._getRadioImgObj(id);if (imgObj != null){var rObj = this.itemPull[this.idPrefix+id];rObj["checked"] = state;rObj["imgen"] = "rdbt_"+(rObj["checked"]?"1":"0");rObj["imgdis"] = "rdbtdis_"+(rObj["checked"]?"1":"0");imgObj.className = "dhtmlxMenu_SubLevelArea_Item_Icon "+(rObj["state"]=="disabled"?rObj["imgdis"]:rObj["imgen"])}};dhtmlXMenuObject.prototype._radioOnClickHandler = function(id, type, casState) {if (type.charAt(1)=="d" || this.itemPull[this.idPrefix+id]["group"]==null) return;var group = this.itemPull[this.idPrefix+id]["group"];if (this.checkEvent("onRadioClick")) {if (this.callEvent("onRadioClick", [group, this.getRadioChecked(group), id, this.contextMenuZoneId, casState])) {this.setRadioChecked(group, id)}}else {this.setRadioChecked(group, id)};if (this.checkEvent("onClick")) this.callEvent("onClick", [id])};dhtmlXMenuObject.prototype.getRadioChecked = function(group) {var id = null;for (var q=0;q<this.radio[group].length;q++){var itemId = this.radio[group][q].replace(this.idPrefix, "");var imgObj = this._getRadioImgObj(itemId);if (imgObj != null){var checked = (imgObj.className).match(/rdbt_1$/gi);if (checked != null)id = itemId}};return id};dhtmlXMenuObject.prototype.setRadioChecked = function(group, id) {if (this.radio[group] == null)return;for (var q=0;q<this.radio[group].length;q++){var itemId = this.radio[group][q].replace(this.idPrefix, "");this._setRadioState(itemId, (itemId==id))}};dhtmlXMenuObject.prototype.addRadioButton = function(mode, nextToId, pos, itemId, itemText, group, state, disabled) {if (this.context && nextToId == this.topId){}else {if (this.itemPull[this.idPrefix+nextToId] == null)return;if (mode == "child" && this.itemPull[this.idPrefix+nextToId]["type"] != "item")return};var id = this.idPrefix+(itemId!=null?itemId:this._genStr(24));var img = "rdbt_"+(state?"1":"0");var imgDis = "rdbtdis_"+(state?"1":"0");if (mode == "sibling"){var parentId = this.idPrefix+this.getParentId(nextToId);this._addItemIntoGlobalStrorage(id, parentId, itemText, "radio", disabled, img, imgDis);this._renderSublevelItem(id, this.getItemPosition(nextToId))}else {var parentId = this.idPrefix+nextToId;this._addItemIntoGlobalStrorage(id, parentId, itemText, "radio", disabled, img, imgDis);if (this.idPull["polygon_"+parentId] == null){this._renderSublevelPolygon(parentId, parentId)};this._renderSublevelItem(id, pos-1);this._redefineComplexState(parentId)};var gr = (group!=null?group:this._genStr(24));this.itemPull[id]["group"] = gr;if (this.radio[gr]==null){this.radio[gr] = new Array()};this.radio[gr][this.radio[gr].length] = id;if (state == true)this.setRadioChecked(gr, String(id).replace(this.idPrefix, ""))};dhtmlXMenuObject.prototype._getCheckboxState = function(id) {if (this.itemPull[this.idPrefix+id] == null)return null;return this.itemPull[this.idPrefix+id]["checked"]};dhtmlXMenuObject.prototype._setCheckboxState = function(id, state) {if (this.itemPull[this.idPrefix+id] == null)return;this.itemPull[this.idPrefix+id]["checked"] = state};dhtmlXMenuObject.prototype._updateCheckboxImage = function(id) {if (this.idPull[this.idPrefix+id] == null)return;this.itemPull[this.idPrefix+id]["imgen"] = "chbx_"+(this._getCheckboxState(id)?"1":"0");this.itemPull[this.idPrefix+id]["imgdis"] = "chbxdis_"+(this._getCheckboxState(id)?"1":"0");this.idPull[this.idPrefix+id].childNodes[0].className = "dhtmlxMenu_SubLevelArea_Item_Icon "+(this.itemPull[this.idPrefix+id]["state"]=="enabled"?this.itemPull[this.idPrefix+id]["imgen"]:this.itemPull[this.idPrefix+id]["imgdis"])};dhtmlXMenuObject.prototype._checkboxOnClickHandler = function(id, type, casState) {if (type.charAt(1)=="d") return;if (this.itemPull[this.idPrefix+id] == null)return;var state = this._getCheckboxState(id);if (this.checkEvent("onCheckboxClick")) {if (this.callEvent("onCheckboxClick", [id, state, this.contextMenuZoneId, casState])) {this.setCheckboxState(id, !state)}}else {this.setCheckboxState(id, !state)};if (this.checkEvent("onClick")) this.callEvent("onClick", [id])};dhtmlXMenuObject.prototype.setCheckboxState = function(id, state) {this._setCheckboxState(id, state);this._updateCheckboxImage(id)};dhtmlXMenuObject.prototype.getCheckboxState = function(id) {return this._getCheckboxState(id)};dhtmlXMenuObject.prototype.addCheckbox = function(mode, nextToId, pos, itemId, itemText, state, disabled) {if (this.context && nextToId == this.topId){}else {if (this.itemPull[this.idPrefix+nextToId] == null)return;if (mode == "child" && this.itemPull[this.idPrefix+nextToId]["type"] != "item")return};var img = "chbx_"+(state?"1":"0");var imgDis = "chbxdis_"+(state?"1":"0");if (mode == "sibling"){var id = this.idPrefix+(itemId!=null?itemId:this._genStr(24));var parentId = this.idPrefix+this.getParentId(nextToId);this._addItemIntoGlobalStrorage(id, parentId, itemText, "checkbox", disabled, img, imgDis);this.itemPull[id]["checked"] = state;this._renderSublevelItem(id, this.getItemPosition(nextToId))}else {var id = this.idPrefix+(itemId!=null?itemId:this._genStr(24));var parentId = this.idPrefix+nextToId;this._addItemIntoGlobalStrorage(id, parentId, itemText, "checkbox", disabled, img, imgDis);this.itemPull[id]["checked"] = state;if (this.idPull["polygon_"+parentId] == null){this._renderSublevelPolygon(parentId, parentId)};this._renderSublevelItem(id, pos-1);this._redefineComplexState(parentId)}};dhtmlXMenuObject.prototype._readLevel = function(parentId) {var xml = "";for (var a in this.itemPull){if (this.itemPull[a]["parent"] == parentId){var imgEn = "";var imgDis = "";var hotKey = "";var itemId = String(this.itemPull[a]["id"]).replace(this.idPrefix,"");var itemType = "";var itemText = (this.itemPull[a]["title"]!=""?' text="'+this.itemPull[a]["title"]+'"':"");var itemState = "";if (this.itemPull[a]["type"] == "item"){if (this.itemPull[a]["imgen"] != "")imgEn = ' img="'+this.itemPull[a]["imgen"]+'"';if (this.itemPull[a]["imgdis"] != "")imgDis = ' imgdis="'+this.itemPull[a]["imgdis"]+'"';if (this.itemPull[a]["hotkey"] != "")hotKey = '<hotkey>'+this.itemPull[a]["hotkey"]+'</hotkey>'};if (this.itemPull[a]["type"] == "separator"){itemType = ' type="separator"'}else {if (this.itemPull[a]["state"] == "disabled")itemState = ' enabled="false"'};if (this.itemPull[a]["type"] == "checkbox"){itemType = ' type="checkbox"'+(this.itemPull[a]["checked"]?' checked="true"':"")};if (this.itemPull[a]["type"] == "radio"){itemType = ' type="radio" group="'+this.itemPull[a]["group"]+'" '+(this.itemPull[a]["checked"]?' checked="true"':"")};xml += "<item id='"+itemId+"'"+itemText+itemType+imgEn+imgDis+itemState+">";xml += hotKey;if (this.itemPull[a]["complex"])xml += this._readLevel(a);xml += "</item>"}};return xml};dhtmlXMenuObject.prototype.serialize = function() {var xml = "<menu>"+this._readLevel(this.idPrefix+this.topId)+"</menu>";return xml};function dhtmlXToolbarObject(baseId, skin) {var main_self = this;this.cont = (typeof(baseId)!="object")?document.getElementById(baseId):baseId;while (this.cont.childNodes.length > 0)this.cont.removeChild(this.cont.childNodes[0]);this.cont.innerHTML += "<div class='dhxtoolbar_hdrline_ll'></div><div class='dhxtoolbar_hdrline_rr'></div>"+
 "<div class='dhxtoolbar_hdrline_l'></div><div class='dhxtoolbar_hdrline_r'></div>";this.base = document.createElement("DIV");this.cont.appendChild(this.base);this.setRTL = function(mode) {this.rtl = (mode==true?true:false);this.cont.className = "dhx_toolbar_base_"+this.skin+(this.rtl?" rtl":"");this.base.className = (this.rtl?"float_right":"float_left");for (var a in this.objPull){var item = this.objPull[a];if (item["type"] == "buttonSelect")item.polygon.className = "dhx_toolbar_poly_"+this.skin+(this.rtl?" rtl":"");if (item["type"] == "slider")item.label.className = className = "dhx_toolbar_slider_label_"+this.skin+(this.rtl?" rtl":"")}};this.setAlign = function(align) {this.base.className = (align=="right"?"float_right":"float_left")};this._isIE6 = false;if (_isIE)this._isIE6 = (window.XMLHttpRequest==null?true:false);this.selectPolygonOffsetTop = 0;this.selectPolygonOffsetLeft = 0;this.setSkin = function(skin) {this.skin = skin;if (this.skin == "dhx_skyblue"){this.selectPolygonOffsetTop = 1;this.selectPolygonOffsetLeft = 1};this.cont.className = "dhx_toolbar_base_"+this.skin+(this.rtl?" rtl":"");for (var a in this.objPull){var item = this.objPull[a];if (item["type"] == "slider"){item.pen._detectLimits();item.pen._definePos();item.label.className = "dhx_toolbar_slider_label_"+this.skin+(this.rtl?" rtl":"")};if (item["type"] == "buttonSelect"){item.polygon.className = "dhx_toolbar_poly_"+this.skin+(this.rtl?" rtl":"")}}};this.setSkin(skin==null?"dhx_skyblue":skin);this.objPull = {};this.anyUsed = "none";this.imagePath = "";this.setIconsPath = function(path) {this.imagePath = path};this.setIconPath = this.setIconsPath;this._doOnLoad = function() {};this.loadXML = function(xmlFile, onLoadFunction) {if (onLoadFunction != null)this._doOnLoad = function() {onLoadFunction()};this.callEvent("onXLS", []);this._xmlLoader = new dtmlXMLLoaderObject(this._xmlParser, window);this._xmlLoader.loadXML(xmlFile)};this.loadXMLString = function(xmlString, onLoadFunction) {if (onLoadFunction != null){this._doOnLoad = function() {onLoadFunction()}};this._xmlLoader = new dtmlXMLLoaderObject(this._xmlParser, window);this._xmlLoader.loadXMLString(xmlString)};this._xmlParser = function() {var root = this.getXMLTopNode("toolbar");for (var q=0;q<root.childNodes.length;q++)if (root.childNodes[q].tagName == "item")main_self._addItemToStorage(root.childNodes[q]);main_self.callEvent("onXLE", []);main_self._doOnLoad();this.destructor()};this._addItemToStorage = function(itemData, pos) {var id = (itemData.getAttribute("id")!=null?itemData.getAttribute("id"):this._genStr(24));var type = (itemData.getAttribute("type")!=null?itemData.getAttribute("type"):"");if (type != ""){if (this["_"+type+"Object"] != null){this.objPull[this.idPrefix+id] = new this["_"+type+"Object"](this, id, itemData);this.objPull[this.idPrefix+id]["type"] = type;this.setPosition(id, pos)}}};this._genStr = function(w) {var s = "";var z = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";for (var q=0;q<w;q++){s = s + z.charAt(Math.round(Math.random() * z.length))};return s};this.rootTypes = new Array("button", "buttonSelect", "buttonTwoState", "separator", "label", "slider", "text", "buttonInput");this.idPrefix = this._genStr(12);dhtmlxEventable(this);this._getObj = function(obj, tag) {var targ = null;for (var q=0;q<obj.childNodes.length;q++){if (obj.childNodes[q].tagName != null){if (String(obj.childNodes[q].tagName).toLowerCase() == String(tag).toLowerCase()) targ = obj.childNodes[q]}};return targ};this._addImgObj = function(obj) {var imgObj = document.createElement("IMG");if (obj.childNodes.length > 0)obj.insertBefore(imgObj, obj.childNodes[0]);else obj.appendChild(imgObj);return imgObj};this._setItemImage = function(item, url, dis) {if (dis == true)item.imgEn = url;else item.imgDis = url;if ((!item.state && dis == true)|| (item.state && dis == false)) return;var imgObj = this._getObj(item.obj, "img");if (imgObj == null)imgObj = this._addImgObj(item.obj);imgObj.src = this.imagePath+url};this._clearItemImage = function(item, dis) {if (dis == true)item.imgEn = "";else item.imgDis = "";if ((!item.state && dis == true)|| (item.state && dis == false)) return;var imgObj = this._getObj(item.obj, "img");if (imgObj != null)imgObj.parentNode.removeChild(imgObj)};this._setItemText = function(item, text) {var txtObj = this._getObj(item.obj, "div");if (text == null || text.length == 0){if (txtObj != null)txtObj.parentNode.removeChild(txtObj);return};if (txtObj == null){txtObj = document.createElement("DIV");item.obj.appendChild(txtObj)};txtObj.innerHTML = text};this._getItemText = function(item) {var txtObj = this._getObj(item.obj, "div");if (txtObj != null)return txtObj.innerHTML;return ""};this._enableItem = function(item) {if (item.state)return;item.state = true;if (this.objPull[item.id]["type"] == "buttonTwoState" && this.objPull[item.id]["obj"]["pressed"] == true){item.obj.className = "dhx_toolbar_btn pres";item.obj.renderAs = "dhx_toolbar_btn over"}else {item.obj.className = "dhx_toolbar_btn def";item.obj.renderAs = item.obj.className};if (item.arw)item.arw.className = String(item.obj.className).replace("btn","arw");var imgObj = this._getObj(item.obj, "img");if (item.imgEn != ""){if (imgObj == null)imgObj = this._addImgObj(item.obj);imgObj.src = this.imagePath+item.imgEn}else {if (imgObj != null)imgObj.parentNode.removeChild(imgObj)}};this._disableItem = function(item) {if (!item.state)return;item.state = false;item.obj.className = "dhx_toolbar_btn dis";item.obj.renderAs = "dhx_toolbar_btn def";if (item.arw)item.arw.className = String(item.obj.className).replace("btn","arw");var imgObj = this._getObj(item.obj, "img");if (item.imgDis != ""){if (imgObj == null)imgObj = this._addImgObj(item.obj);imgObj.src = this.imagePath+item.imgDis}else {if (imgObj != null)imgObj.parentNode.removeChild(imgObj)};if (item.polygon != null){if (item.polygon.style.display != "none"){item.polygon.style.display = "none";if (item.polygon._ie6cover)item.polygon._ie6cover.style.display = "none"}};this.anyUsed = "none"};this.clearAll = function() {for (var a in this.objPull)this.removeItem(String(a).replace(this.idPrefix,""))};this._isWebToolbar = true;dhtmlxEvent(document.body, "click", function(e){if (!main_self.base)return;main_self.forEachItem(function(itemId){if (main_self.objPull[main_self.idPrefix+itemId]["type"] == "buttonSelect"){var item = main_self.objPull[main_self.idPrefix+itemId];if (item.polygon.style.display != "none"){item.obj.renderAs = "dhx_toolbar_btn def";item.obj.className = item.obj.renderAs;item.arw.className = String(item.obj.renderAs).replace("btn","arw");main_self.anyUsed = "none";item.polygon.style.display = "none";if (item.polygon._ie6cover)item.polygon._ie6cover.style.display = "none"}}})});return this};dhtmlXToolbarObject.prototype.getType = function(itemId) {if (this.objPull[this.idPrefix+itemId] == null){return ""};return this.objPull[this.idPrefix+itemId]["type"]};dhtmlXToolbarObject.prototype.getTypeExt = function(itemId) {if (this.getType(itemId)!= "buttonSelectNode") {return ""};return this.objPull[this.idPrefix+itemId]["typeext"]};dhtmlXToolbarObject.prototype.inArray = function(array, value) {for (var q=0;q<array.length;q++){if (array[q]==value)return true};return false};dhtmlXToolbarObject.prototype._string2xml = function(xmlString) {try {var parser = new DOMParser();var xmlDoc = parser.parseFromString(xmlString, "text/xml")}catch(e) {var xmlDoc = new ActiveXObject("Microsoft.XMLDOM");xmlDoc.async = this.async;xmlDoc["loadXM"+"L"](xmlString)};return (xmlDoc!=null?xmlDoc:null)};dhtmlXToolbarObject.prototype._addItem = function(str, pos) {var data = this._string2xml(str);this._addItemToStorage(data.childNodes[0], pos)};dhtmlXToolbarObject.prototype.addButton = function(id, pos, text, imgEnabled, imgDisabled) {var itemText = (text!=null?(text.length==0?null:text):null);var str = '<item id="'+id+'" type="button"'+(imgEnabled!=null?' img="'+imgEnabled+'"':'')+(imgDisabled!=null?' imgdis="'+imgDisabled+'"':'')+(itemText!=null?' text="'+itemText+'"':"")+'/>';this._addItem(str, pos)};dhtmlXToolbarObject.prototype.addText = function(id, pos, text) {var str = '<item id="'+id+'" type="text" text="'+text+'"/>';this._addItem(str, pos)};dhtmlXToolbarObject.prototype.addButtonSelect = function(id, pos, text, opts, imgEnabled, imgDisabled) {var itemText = (text!=null?(text.length==0?null:text):null);var str = '<item id="'+id+'" type="buttonSelect"'+(imgEnabled!=null?' img="'+imgEnabled+'"':'')+(imgDisabled!=null?' imgdis="'+imgDisabled+'"':'')+(itemText!=null?' text="'+itemText+'"':"")+'>';for (var q=0;q<opts.length;q++){if (opts[q].id && opts[q].type){if (opts[q].type == "obj"){str += '<item type="button" id="'+opts[q].id+'" text="'+opts[q].text+'"'+(opts[q].img!=null?' img="'+opts[q].img+'"':'')+'/>'}else if (opts[q].type == "sep"){str += '<item id="'+opts[q].id+'" type="separator"/>'}}else {if (opts[q][1] == "obj"){str += '<item type="button" id="'+opts[q][0]+'" text="'+opts[q][2]+'"'+(opts[q][3]!=null?' img="'+opts[q][3]+'"':'')+'/>'}else if (opts[q][1] == "sep"){str += '<item id="'+opts[q][0]+'" type="separator"/>'}}};str += '</item>';this._addItem(str, pos)};dhtmlXToolbarObject.prototype.addButtonTwoState = function(id, pos, text, imgEnabled, imgDisabled) {var itemText = (text!=null?(text.length==0?null:text):null);var str = '<item id="'+id+'" type="buttonTwoState"'+(imgEnabled!=null?' img="'+imgEnabled+'"':'')+(imgDisabled!=null?' imgdis="'+imgDisabled+'"':'')+(itemText!=null?' text="'+itemText+'"':"")+'/>';this._addItem(str, pos)};dhtmlXToolbarObject.prototype.addSeparator = function(id, pos) {var str = '<item id="'+id+'" type="separator"/>';this._addItem(str, pos)};dhtmlXToolbarObject.prototype.addSlider = function(id, pos, len, valueMin, valueMax, valueNow, textMin, textMax, tip) {var itemTextMin = (textMin!=null?(textMin.length==0?null:textMin):null);var itemTextMax = (textMax!=null?(textMax.length==0?null:textMax):null);var str = '<item id="'+id+'" type="slider" length="'+len+'" valueMin="'+valueMin+'" valueMax="'+valueMax+'" valueNow="'+valueNow+'"'+(itemTextMin!=null?' textMin="'+itemTextMin+'"':'')+(itemTextMax!=null?' textMax="'+itemTextMax+'"':'')+' toolTip="'+tip+'"/>';this._addItem(str, pos)};dhtmlXToolbarObject.prototype.addInput = function(id, pos, value, width) {var str = '<item id="'+id+'" type="buttonInput" value="'+value+'" width="'+width+'"/>';this._addItem(str, pos)};dhtmlXToolbarObject.prototype.forEachItem = function(handler) {for (var a in this.objPull){if (this.inArray(this.rootTypes, this.objPull[a]["type"])) {handler(this.objPull[a]["id"].replace(this.idPrefix,""))}}};(function(){var list="showItem,hideItem,isVisible,enableItem,disableItem,isEnabled,setItemText,getItemText,setItemToolTip,getItemToolTip,setItemImage,setItemImageDis,clearItemImage,clearItemImageDis,setItemState,getItemState,setItemToolTipTemplate,getItemToolTipTemplate,setValue,getValue,setMinValue,getMinValue,setMaxValue,getMaxValue,setWidth,getWidth".split(",")
 var ret=["","",false,"","",false,"","","","","","","","","",false,"","","",null,"",[null,null],"",[null,null],"",null]
 var functor=function(name,res){return function(itemId,a,b){itemId = this.idPrefix+itemId;if (this.objPull[itemId][name] != null)return this.objPull[itemId][name].call(this.objPull[itemId],a,b)
 else 
 return res}};for (var i=0;i<list.length;i++){var name=list[i];var res=ret[i];dhtmlXToolbarObject.prototype[name] = functor(name,res)}})()























































dhtmlXToolbarObject.prototype.setPosition = function(itemId, pos) {this._setPosition(itemId, pos)};dhtmlXToolbarObject.prototype.getPosition = function(itemId) {return this._getPosition(itemId)};dhtmlXToolbarObject.prototype._setPosition = function(id, pos) {if (this.objPull[this.idPrefix+id] == null)return;if (isNaN(pos)) pos = this.base.childNodes.length;if (pos < 0)pos = 0;var item = this.objPull[this.idPrefix+id];this.base.removeChild(item.obj);if (item.arw)this.base.removeChild(item.arw);var newPos = this._getIdByPosition(pos, true);if (newPos[0] == null){this.base.appendChild(item.obj);if (item.arw)this.base.appendChild(item.arw)}else {this.base.insertBefore(item.obj, this.base.childNodes[newPos[1]]);if (item.arw)this.base.insertBefore(item.arw, this.base.childNodes[newPos[1]+1])}};dhtmlXToolbarObject.prototype._getPosition = function(id, retRealPos) {if (this.objPull[this.idPrefix+id] == null)return null;var pos = 0;var posFound = false;var realPos = 0;var realPosFound = false;for (var q=0;q<this.base.childNodes.length;q++){if (!posFound && this.base.childNodes[q]["idd"] != null){if (this.base.childNodes[q]["idd"] == id)posFound = true;else pos++};if (!realPosFound){if (this.base.childNodes[q]["idd"] == id)realPosFound = true;else realPos++}};pos = (posFound?pos:null);realPos = (realPosFound?realPos:null);return (retRealPos==true?new Array(pos, realPos):pos)};dhtmlXToolbarObject.prototype._getIdByPosition = function(pos, retRealPos) {var id = null;var w = 0;var realPos = 0;for (var q=0;q<this.base.childNodes.length;q++){if (this.base.childNodes[q]["idd"] != null && id == null){if ((w++)== pos) id = this.base.childNodes[q]["idd"]};if (id == null)realPos++};realPos = (id==null?null:realPos);return (retRealPos==true?new Array(id, realPos):id)};dhtmlXToolbarObject.prototype.removeItem = function(itemId) {if (this.objPull[this.idPrefix+itemId] == null)return;var t = this.getType(itemId);var obj = this.objPull[this.idPrefix+itemId].obj;obj.parentNode.removeChild(obj);if (this.objPull[this.idPrefix+itemId].arw != null){var arw = this.objPull[this.idPrefix+itemId].arw;arw.parentNode.removeChild(arw);arw = null};if (this.objPull[this.idPrefix+itemId].polygon != null){var polygon = this.objPull[this.idPrefix+itemId].polygon;polygon.parentNode.removeChild(polygon);polygon = null};if (this.objPull[this.idPrefix+itemId].obj != null){if (this.objPull[this.idPrefix+itemId].obj.label != null){var label = this.objPull[this.idPrefix+itemId].obj.label;label.parentNode.removeChild(label);label = null}};obj = null;delete this.objPull[this.idPrefix+itemId]};(function(){var list="addListOption,removeListOption,showListOption,hideListOption,isListOptionVisible,enableListOption,disableListOption,isListOptionEnabled,setListOptionPosition,getListOptionPosition,setListOptionText,getListOptionText,setListOptionToolTip,getListOptionToolTip,setListOptionImage,getListOptionImage,clearListOptionImage,forEachListOption,getAllListOptions,setListOptionSelected,getListOptionSelected".split(",")
 var functor = function(name){return function(parentId,a,b,c,d,e){parentId = this.idPrefix+parentId;if (this.objPull[parentId] == null)return;if (this.objPull[parentId]["type"] != "buttonSelect")return;return this.objPull[parentId][name].call(this.objPull[parentId],a,b,c,d,e)}};for (var i=0;i<list.length;i++){var name=list[i];dhtmlXToolbarObject.prototype[name]=functor(name)
 }})()













































dhtmlXToolbarObject.prototype._separatorObject = function(that, id, data) {this.id = that.idPrefix+id;this.obj = document.createElement("DIV");this.obj.className = "dhx_toolbar_sep";this.obj.idd = String(id);this.obj.title = (data.getAttribute("title")!=null?data.getAttribute("title"):"");this.obj.onselectstart = function(e) {e = e||event;e.returnValue = false};that.base.appendChild(this.obj);this.showItem = function() {this.obj.style.display = ""};this.hideItem = function() {this.obj.style.display = "none"};this.isVisible = function() {return (this.obj.style.display == "")};return this};dhtmlXToolbarObject.prototype._textObject = function(that, id, data) {this.id = that.idPrefix+id;this.obj = document.createElement("DIV");this.obj.className = "dhx_toolbar_text";this.obj.idd = String(id);this.obj.title = (data.getAttribute("title")!=null?data.getAttribute("title"):"");this.obj.onselectstart = function(e) {e = e||event;e.returnValue = false};this.obj.innerHTML = data.getAttribute("text");that.base.appendChild(this.obj);this.showItem = function() {this.obj.style.display = ""};this.hideItem = function() {this.obj.style.display = "none"};this.isVisible = function() {return (this.obj.style.display == "")};this.setItemText = function(text) {this.obj.innerHTML = text};this.getItemText = function() {return this.obj.innerHTML};this.setWidth = function(width) {this.obj.style.width = width+"px"};return this};dhtmlXToolbarObject.prototype._buttonObject = function(that, id, data) {this.id = that.idPrefix+id;this.state = (data.getAttribute("enabled")!=null?false:true);this.imgEn = (data.getAttribute("img")!=null?data.getAttribute("img"):"");this.imgDis = (data.getAttribute("imgdis")!=null?data.getAttribute("imgdis"):"");this.img = (this.state?(this.imgEn!=""?this.imgEn:""):(this.imgDis!=""?this.imgDis:""));this.obj = document.createElement("DIV");this.obj.className = "dhx_toolbar_btn "+(this.state?"def":"dis");this.obj.allowClick = false;this.obj.renderAs = this.obj.className;this.obj.idd = String(id);this.obj.title = (data.getAttribute("title")!=null?data.getAttribute("title"):"");this.obj.pressed = false;this.obj.innerHTML = (this.img!=""?"<img src='"+that.imagePath+this.img+"'>":"")+
 (data.getAttribute("text")!=null?"<div>"+data.getAttribute("text")+"</div>":"");var obj = this;this.obj.onselectstart = function(e) {e = e||event;e.returnValue = false};this.obj.onmouseover = function() {this._doOnMouseOver()};this.obj.onmouseout = function() {this._doOnMouseOut()};this.obj._doOnMouseOver = function() {this.allowClick = true;if (obj.state == false)return;if (that.anyUsed != "none")return;this.className = "dhx_toolbar_btn over";this.renderAs = this.className};this.obj._doOnMouseOut = function() {this.allowClick = false;if (obj.state == false)return;if (that.anyUsed != "none")return;this.className = "dhx_toolbar_btn def";this.renderAs = this.renderAs};this.obj.onclick = function(e) {if (obj.state == false)return;if (this.allowClick == false)return;e = e||event;that.callEvent("onClick", [this.idd.replace(that.idPrefix,"")])};this.obj.onmousedown = function(e) {if (obj.state == false)return;if (that.anyUsed != "none")return;that.anyUsed = this.idd;this.className = "dhx_toolbar_btn pres";this.pressed = true;this.onmouseover = function() {this._doOnMouseOver()};this.onmouseout = function() {that.anyUsed = "none";this._doOnMouseOut()};return false};this.obj.onmouseup = function(e) {if (obj.state == false)return;if (that.anyUsed != "none"){if (that.anyUsed != this.idd)return};this._doOnMouseUp()};this.obj._doOnMouseUp = function() {that.anyUsed = "none";this.className = this.renderAs;this.pressed = false};this.obj._doOnMouseUpOnceAnywhere = function() {this._doOnMouseUp();this.onmouseover = function() {this._doOnMouseOver()};this.onmouseout = function() {this._doOnMouseOut()}};that.base.appendChild(this.obj);this.enableItem = function() {that._enableItem(this)};this.disableItem = function() {that._disableItem(this)};this.isEnabled = function() {return this.state};this.showItem = function() {this.obj.style.display = ""};this.hideItem = function() {this.obj.style.display = "none"};this.isVisible = function() {return (this.obj.style.display == "")};this.setItemText = function(text) {that._setItemText(this, text)};this.getItemText = function() {return that._getItemText(this)};this.setItemImage = function(url) {that._setItemImage(this, url, true)};this.clearItemImage = function() {that._clearItemImage(this, true)};this.setItemImageDis = function(url) {that._setItemImage(this, url, false)};this.clearItemImageDis = function() {that._clearItemImage(this, false)};this.setItemToolTip = function(tip) {this.obj.title = tip};this.getItemToolTip = function() {return this.obj.title};return this};dhtmlXToolbarObject.prototype._buttonSelectObject = function(that, id, data) {this.id = that.idPrefix+id;this.state = (data.getAttribute("enabled")!=null?(data.getAttribute("enabled")=="true"?true:false):true);this.imgEn = (data.getAttribute("img")!=null?data.getAttribute("img"):"");this.imgDis = (data.getAttribute("imgdis")!=null?data.getAttribute("imgdis"):"");this.img = (this.state?(this.imgEn!=""?this.imgEn:""):(this.imgDis!=""?this.imgDis:""));this.obj = document.createElement("DIV");this.obj.allowClick = false;this.obj.className = "dhx_toolbar_btn def";this.obj.renderAs = this.obj.className;this.obj.onselectstart = function(e) {e = e||event;e.returnValue = false};this.obj.idd = String(id);this.obj.title = (data.getAttribute("title")!=null?data.getAttribute("title"):"");this.obj.pressed = false;this.renderSelect = (data.getAttribute("renderSelect")!=null?(data.getAttribute("renderSelect")=="false"||data.getAttribute("renderSelect")=="disabled"?false:true):true);this.obj.innerHTML = (this.img!=""?"<img src='"+that.imagePath+this.img+"'>":"")+
 (data.getAttribute("text")!=null?"<div>"+data.getAttribute("text")+"</div>":"");that.base.appendChild(this.obj);this.arw = document.createElement("DIV");this.arw.className = "dhx_toolbar_arw def";this.arw.innerHTML = "<div class='arwimg'>&nbsp;</div>";this.arw.title = this.obj.title;this.arw.onselectstart = function(e) {e = e||event;e.returnValue = false};that.base.appendChild(this.arw);var self = this;this.obj.onmouseover = function(e) {e = e||event;if (that.anyUsed != "none")return;if (!self.state)return;self.obj.renderAs = "dhx_toolbar_btn over";self.obj.className = self.obj.renderAs;self.arw.className = String(self.obj.renderAs).replace("btn","arw")};this.obj.onmouseout = function() {self.obj.allowClick = false;if (that.anyUsed != "none")return;if (!self.state)return;self.obj.renderAs = "dhx_toolbar_btn def";self.obj.className = self.obj.renderAs;self.arw.className = String(self.obj.renderAs).replace("btn","arw")};this.arw.onmouseover = this.obj.onmouseover;this.arw.onmouseout = this.obj.onmouseout;this.obj.onclick = function(e) {e = e||event;if (!self.obj.allowClick)return;if (!self.state)return;if (that.anyUsed != "none")return;that.callEvent("onClick", [self.obj.idd.replace(that.idPrefix,"")])};this.obj.onmousedown = function(e) {e = e||event;if (that.anyUsed != "none")return;if (!self.state)return;self.obj.allowClick = true;self.obj.className = "dhx_toolbar_btn pres";self.arw.className = "dhx_toolbar_arw pres"};this.obj.onmouseup = function(e) {e = e||event;e.cancelBubble = true;if (that.anyUsed != "none")return;if (!self.state)return;self.obj.className = self.obj.renderAs;self.arw.className = String(self.obj.renderAs).replace("btn","arw")};this.arw.onmousedown = function(e) {e = e||event;if (!self.state)return;if (that.anyUsed == self.obj.idd){self.obj.className = self.obj.renderAs;self.arw.className = String(self.obj.renderAs).replace("btn","arw");that.anyUsed = "none";self.polygon.style.display = "none";if (self.polygon._ie6cover)self.polygon._ie6cover.style.display = "none"}else {if (that.anyUsed != "none"){if (that.objPull[that.idPrefix+that.anyUsed]["type"] == "buttonSelect"){var item = that.objPull[that.idPrefix+that.anyUsed];if (item.polygon.style.display != "none"){item.obj.renderAs = "dhx_toolbar_btn def";item.obj.className = item.obj.renderAs;item.arw.className = String(self.obj.renderAs).replace("btn","arw");item.polygon.style.display = "none";if (item.polygon._ie6cover)item.polygon._ie6cover.style.display = "none"}}};self.obj.className = "dhx_toolbar_btn over";self.arw.className = "dhx_toolbar_arw pres";that.anyUsed = self.obj.idd;self.polygon.style.top = "0px";self.polygon.style.visibility = "hidden";self.polygon.style.display = "";that._autoDetectVisibleArea();var newTop = getAbsoluteTop(self.obj)+self.obj.offsetHeight+that.selectPolygonOffsetTop;var newH = self.polygon.offsetHeight;if (newTop + newH > that.tY2){newTop = getAbsoluteTop(self.obj)-newH-that.selectPolygonOffsetTop;if (newTop < 0)newTop = 0};self.polygon.style.top = newTop+"px";if (that.rtl){self.polygon.style.left = getAbsoluteLeft(self.obj)+self.obj.offsetWidth-self.polygon.offsetWidth+that.selectPolygonOffsetLeft+"px"}else {self.polygon.style.left = getAbsoluteLeft(self.obj)+that.selectPolygonOffsetLeft+"px"};self.polygon.style.visibility = "visible";if (self.polygon._ie6cover){self.polygon._ie6cover.style.left = self.polygon.style.left;self.polygon._ie6cover.style.top = self.polygon.style.top;self.polygon._ie6cover.style.width = self.polygon.offsetWidth+"px";self.polygon._ie6cover.style.height = self.polygon.offsetHeight+"px";self.polygon._ie6cover.style.display = ""}};return false};this.arw.onclick = function(e) {e = e||event;e.cancelBubble = true};this.arw.onmouseup = function(e) {e = e||event;e.cancelBubble = true};this.obj.iddPrefix = that.idPrefix;this._listOptions = {};this._separatorButtonSelectObject = function(id, data, pos) {this.obj = document.createElement("DIV");this.obj.className = "btn_sep";this.obj.onselectstart = function(e) {e = e||event;e.returnValue = false};if (isNaN(pos)) {self.polygon.appendChild(this.obj)}else {if (pos < 1)pos = 1;if (pos > self.polygon.childNodes.length){self.polygon.appendChild(this.obj)}else {self.polygon.insertBefore(this.obj, self.polygon.childNodes[pos-1])}};self._listOptions[id] = this.obj;return this};this._buttonButtonSelectObject = function(id, data, pos) {this.obj = document.createElement("DIV");this.obj.en = (data.getAttribute("enabled")=="false"?false:true);this.obj._selected = (data.getAttribute("selected")!=null);this.obj.className = "btn_item"+(this.obj.en?(this.obj._selected&&self.renderSelect?" sel":""):" dis");this.obj.onselectstart = function(e) {e = e||event;e.returnValue = false};var itemText = (data.getAttribute("text")!= null?data.getAttribute("text"):null);if (itemText == null){var itm = data.getElementsByTagName("itemText");itemText = (itm[0]!=null?itm[0].firstChild.nodeValue:"")};this.obj.innerHTML = (data.getAttribute("img")!=null?"<img src='"+that.imagePath+data.getAttribute("img")+"' border='0'>":"")+
 "<span>"+itemText+"</span>";this.obj.onmouseover = function(e) {if (!this.en)return;this.className = "btn_item over"};this.obj.onmouseout = function(e) {if (!this.en)return;this.className = "btn_item"+(this._selected&&self.renderSelect?" sel":"")};this.obj.idd = String(id);this.obj.onclick = function(e) {e = e||event;e.cancelBubble = true;if (!this.en)return;self.setListOptionSelected(this.idd.replace(that.idPrefix,""));self.obj.renderAs = "dhx_toolbar_btn def";self.obj.className = self.obj.renderAs;self.arw.className = String(self.obj.renderAs).replace("btn","arw");self.polygon.style.display = "none";if (self.polygon._ie6cover)self.polygon._ie6cover.style.display = "none";that.anyUsed = "none";that.callEvent("onClick", [this.idd.replace(that.idPrefix,"")])};if (isNaN(pos)) {self.polygon.appendChild(this.obj)}else {if (pos < 1){pos = 1};if (pos > self.polygon.childNodes.length){self.polygon.appendChild(this.obj)}else {self.polygon.insertBefore(this.obj, self.polygon.childNodes[pos-1])}};self._listOptions[id] = this.obj;return this};this.polygon = document.createElement("DIV");this.polygon.style.display = "none";this.polygon.style.zIndex = 101;this.polygon.className = "dhx_toolbar_poly_"+that.skin+(that.rtl?" rtl":"");this.polygon.onselectstart = function(e) {e = e||event;e.returnValue = false};for (var q=0;q<data.childNodes.length;q++){if (data.childNodes[q].tagName == "item"){var id = (data.childNodes[q].getAttribute("id")!=null?data.childNodes[q].getAttribute("id"):that._genStr(24));var type = (data.childNodes[q].getAttribute("type")!=null?"_"+data.childNodes[q].getAttribute("type")+"ButtonSelectObject":that._genStr(24));if (this[type] != null){that.objPull[that.idPrefix+id] = new this[type](id, data.childNodes[q]);that.objPull[that.idPrefix+id]["type"] = "buttonSelectNode";that.objPull[that.idPrefix+id]["typeext"] = (String(type).search("separator")!=-1?"separator":"button")}}};document.body.appendChild(this.polygon);if (that._isIE6){this.polygon._ie6cover = document.createElement("IFRAME");this.polygon._ie6cover.frameBorder = 0;this.polygon._ie6cover.style.position = "absolute";this.polygon._ie6cover.style.border = "none";this.polygon._ie6cover.style.backgroundColor = "#000000";this.polygon._ie6cover.style.filter = "alpha(opacity=100)";this.polygon._ie6cover.style.display = "none";this.polygon._ie6cover.setAttribute("src","javascript:false;");document.body.appendChild(this.polygon._ie6cover)};this.setWidth = function(width) {this.obj.style.width = width-this.arw.offsetWidth+"px";this.polygon.style.width = this.obj.offsetWidth+this.arw.offsetWidth-2+"px"};this.enableItem = function() {that._enableItem(this)};this.disableItem = function() {that._disableItem(this)};this.isEnabled = function() {return this.state};this.showItem = function() {this.obj.style.display = "";this.arw.style.display = ""};this.hideItem = function() {this.obj.style.display = "none";this.arw.style.display = "none"};this.isVisible = function() {return (this.obj.style.display == "")};this.setItemText = function(text) {that._setItemText(this, text)};this.getItemText = function() {return that._getItemText(this)};this.setItemImage = function(url) {that._setItemImage(this, url, true)};this.clearItemImage = function() {that._clearItemImage(this, true)};this.setItemImageDis = function(url) {that._setItemImage(this, url, false)};this.clearItemImageDis = function() {that._clearItemImage(this, false)};this.setItemToolTip = function(tip) {this.obj.title = tip;this.arw.title = tip};this.getItemToolTip = function() {return this.obj.title};this.addListOption = function(id, pos, type, text, img) {if (!(type == "button" || type == "separator")) return;var str = '<item id="'+id+'" type="'+type+'"'+(type=="button"?' text="'+text+'"'+(img!=null?' img="'+img+'"':''):'')+'/>';var data = that._string2xml(str);that.objPull[that.idPrefix+id] = new this["_"+type+"ButtonSelectObject"](id, data.childNodes[0], pos);that.objPull[that.idPrefix+id]["type"] = "buttonSelectNode";that.objPull[that.idPrefix+id]["typeext"] = type};this.removeListOption = function(id) {if (that.objPull[that.idPrefix+id] == null)return;var obj = that.objPull[that.idPrefix+id].obj;obj.onmouseover = null;obj.onmouseout = null;obj.onselectstart = null;obj.onclick = null;obj.className = null;obj.en = null;while (obj.childNodes.length > 0)obj.removeChild(obj.childNodes[0]);obj.parentNode.removeChild(obj);obj = null;try {that.objPull[that.idPrefix+id] = null;this._listOptions[id] = null;delete that.objPull[that.idPrefix+id];delete this._listOptions[id]}catch(e) {}};this.showListOption = function(id) {id = that.idPrefix + id;if (that.objPull[id] == null)return;that.objPull[id].obj.style.display = ""};this.hideListOption = function(id) {id = that.idPrefix + id;if (that.objPull[id] == null)return;that.objPull[id].obj.style.display = "none"};this.isListOptionVisible = function(id) {id = that.idPrefix + id;if (that.objPull[id] == null)return;return (that.objPull[id].obj.style.display != "none")};this.enableListOption = function(id) {id = that.idPrefix + id;if (that.objPull[id] == null)return;if (that.objPull[id].obj.className == "btn_sep")return;that.objPull[id].obj.en = true;that.objPull[id].obj.className = "btn_item"};this.disableListOption = function(id) {id = that.idPrefix + id;if (that.objPull[id] == null)return;if (that.objPull[id].obj.className == "btn_sep")return;that.objPull[id].obj.en = false;that.objPull[id].obj.className = "btn_item dis"};this.isListOptionEnabled = function(id) {id = that.idPrefix + id;if (that.objPull[id] == null)return;if (that.objPull[id].obj.className == "btn_sep")return;return that.objPull[id].obj.en};this.setListOptionPosition = function(id, pos) {if (this.getListOptionPosition(id)== pos) return;id = that.idPrefix + id;if (that.objPull[id] == null)return;if (pos < 1){pos = 1};this.polygon.removeChild(that.objPull[id].obj);if (pos > this.polygon.childNodes.length){this.polygon.appendChild(that.objPull[id].obj)}else {this.polygon.insertBefore(that.objPull[id].obj, this.polygon.childNodes[pos-1])}};this.getListOptionPosition = function(id) {id = that.idPrefix + id;var pos = -1;if (that.objPull[id] == null)return pos;for (var q=0;q<this.polygon.childNodes.length;q++)if (this.polygon.childNodes[q] == that.objPull[id].obj)pos = q+1;return pos};this.setListOptionImage = function(id, img) {id = that.idPrefix + id;if (that.objPull[id] == null)return;if (that.objPull[id].obj.className == "btn_sep")return;var imgObj = null;if ((that.objPull[id].obj.childNodes[0].tagName).toLowerCase() == "img") {imgObj = that.objPull[id].obj.childNodes[0]}else {imgObj = document.createElement("IMG");imgObj.className = "buttonImage";imgObj.border = "0";that.objPull[id].obj.insertBefore(imgObj, that.objPull[id].obj.childNodes[0])};imgObj.src = that.imagePath+img};this.getListOptionImage = function(id) {id = that.idPrefix + id;if (that.objPull[id] == null)return;if (that.objPull[id].obj.className == "btn_sep")return;var img = null;if ((that.objPull[id].obj.childNodes[0].tagName).toLowerCase() == "img") {img = that.objPull[id].obj.childNodes[0].src};return img};this.clearListOptionImage = function(id) {id = that.idPrefix + id;if (that.objPull[id] == null)return;if (that.objPull[id].obj.className == "btn_sep")return;if ((that.objPull[id].obj.childNodes[0].tagName).toLowerCase() == "img") {var imgObj = that.objPull[id].obj.childNodes[0];that.objPull[id].obj.removeChild(imgObj);imgObj = null}};this.setListOptionText = function(id, text) {id = that.idPrefix + id;if (that.objPull[id] == null)return;if (that.objPull[id].obj.className == "btn_sep")return;var obj = that.objPull[id].obj;for (var q=0;q<obj.childNodes.length;q++)if (String(obj.childNodes[q].tagName).toLowerCase() == "span") obj.childNodes[q].innerHTML = text};this.getListOptionText = function(id) {var text = "";id = that.idPrefix + id;if (that.objPull[id] == null)return;if (that.objPull[id].obj.className == "btn_sep")return;var obj = that.objPull[id].obj;for (var q=0;q<obj.childNodes.length;q++)if (String(obj.childNodes[q].tagName).toLowerCase() == "span") text = obj.childNodes[q].innerHTML;return text};this.setListOptionToolTip = function(id, tip) {id = that.idPrefix + id;if (that.objPull[id] == null)return;if (that.objPull[id].obj.className == "btn_sep")return;that.objPull[id].obj.title = tip};this.getListOptionToolTip = function(id) {id = that.idPrefix + id;if (that.objPull[id] == null)return;if (that.objPull[id].obj.className == "btn_sep")return;return that.objPull[id].obj.title};this.forEachListOption = function(handler) {for (var a in this._listOptions)handler(a)};this.getAllListOptions = function() {var listData = new Array();for (var a in this._listOptions)listData[listData.length] = a;return listData};this.setListOptionSelected = function(id) {for (var a in this._listOptions){var item = this._listOptions[a];if (a == id){item._selected = true;if (item.className == "btn_item")item.className = "btn_item"+(this.renderSelect?" sel":"")}else {item._selected = false;if (String(item.className).search("sel") != -1) item.className = "btn_item"};item = null}};this.getListOptionSelected = function() {var id = null;for (var a in this._listOptions)if (this._listOptions[a]._selected == true)id = a;return id};return this};dhtmlXToolbarObject.prototype._buttonInputObject = function(that, id, data) {this.id = that.idPrefix+id;this.obj = document.createElement("DIV");this.obj.className = "dhx_toolbar_btn def";this.obj.idd = String(id);this.obj.w = (data.getAttribute("width")!=null?data.getAttribute("width"):100);this.obj.title = (data.getAttribute("title")!=null?data.getAttribute("title"):"");this.obj.innerHTML = "<input class='inp' type='text' style='-moz-user-select:text;width:"+this.obj.w+"px;'"+(data.getAttribute("value")!=null?"' value='"+data.getAttribute("value")+"'":"")+">";var th = that;var self = this;this.obj.childNodes[0].onkeydown = function(e) {e = e||event;if (e.keyCode == 13){th.callEvent("onEnter", [self.obj.idd, this.value])}};that.base.appendChild(this.obj);this.enableItem = function() {this.obj.childNodes[0].disabled = false};this.disableItem = function() {this.obj.childNodes[0].disabled = true};this.isEnabled = function() {return (!this.obj.childNodes[0].disabled)};this.showItem = function() {this.obj.style.display = ""};this.hideItem = function() {this.obj.style.display = "none"};this.isVisible = function() {return (this.obj.style.display != "none")};this.setValue = function(value) {this.obj.childNodes[0].value = value};this.getValue = function() {return this.obj.childNodes[0].value};this.setWidth = function(width) {this.obj.w = width;this.obj.childNodes[0].style.width = this.obj.w+"px"};this.getWidth = function() {return this.obj.w};this.setItemToolTip = function(tip) {this.obj.title = tip};this.getItemToolTip = function() {return this.obj.title};return this};dhtmlXToolbarObject.prototype._buttonTwoStateObject = function(that, id, data) {this.id = that.idPrefix+id;this.state = (data.getAttribute("enabled")!=null?false:true);this.imgEn = (data.getAttribute("img")!=null?data.getAttribute("img"):"");this.imgDis = (data.getAttribute("imgdis")!=null?data.getAttribute("imgdis"):"");this.img = (this.state?(this.imgEn!=""?this.imgEn:""):(this.imgDis!=""?this.imgDis:""));this.obj = document.createElement("DIV");this.obj.pressed = (data.getAttribute("selected")!=null);this.obj.className = "dhx_toolbar_btn "+(this.obj.pressed?(this.state?"pres":"dis"):(this.state?"def":"dis"));this.obj.renderAs = this.obj.className;this.obj.idd = String(id);this.obj.title = (data.getAttribute("title")!=null?data.getAttribute("title"):"");if (this.obj.pressed){this.obj.renderAs = "dhx_toolbar_btn over"};this.obj.innerHTML = (this.img!=""?"<img src='"+that.imagePath+this.img+"'>":"")+
 (data.getAttribute("text")!=null?"<div>"+data.getAttribute("text")+"</div>":"");that.base.appendChild(this.obj);var obj = this;this.obj.onselectstart = function(e) {e = e||event;e.returnValue = false};this.obj.onmouseover = function() {this._doOnMouseOver()};this.obj.onmouseout = function() {this._doOnMouseOut()};this.obj._doOnMouseOver = function() {if (obj.state == false)return;if (that.anyUsed != "none")return;if (this.pressed)return;this.className = "dhx_toolbar_btn over";this.renderAs = this.className};this.obj._doOnMouseOut = function() {if (obj.state == false)return;if (that.anyUsed != "none")return;if (this.pressed)return;this.className = "dhx_toolbar_btn def";this.renderAs = this.className};this.obj.onmousedown = function(e) {if (that.checkEvent("onBeforeStateChange")) if (!that.callEvent("onBeforeStateChange", [this.idd.replace(that.idPrefix, ""), this.pressed])) return;if (obj.state == false)return;if (that.anyUsed != "none")return;this.pressed = !this.pressed;this.className = (this.pressed?"dhx_toolbar_btn pres":this.renderAs);that.callEvent("onStateChange", [this.idd.replace(that.idPrefix, ""), this.pressed]);return false};this.setItemState = function(state, callEvent) {if (this.obj.pressed != state){if (state == true){this.obj.pressed = true;this.obj.className = "dhx_toolbar_btn pres";this.obj.renderAs = "dhx_toolbar_btn over"}else {this.obj.pressed = false;this.obj.className = "dhx_toolbar_btn def";this.obj.renderAs = this.obj.className};if (callEvent == true)that.callEvent("onStateChange", [this.obj.idd.replace(that.idPrefix, ""), this.obj.pressed])}};this.getItemState = function() {return this.obj.pressed};this.enableItem = function() {that._enableItem(this)};this.disableItem = function() {that._disableItem(this)};this.isEnabled = function() {return this.state};this.showItem = function() {this.obj.style.display = ""};this.hideItem = function() {this.obj.style.display = "none"};this.isVisible = function() {return (this.obj.style.display == "")};this.setItemText = function(text) {that._setItemText(this, text)};this.getItemText = function() {return that._getItemText(this)};this.setItemImage = function(url) {that._setItemImage(this, url, true)};this.clearItemImage = function() {that._clearItemImage(this, true)};this.setItemImageDis = function(url) {that._setItemImage(this, url, false)};this.clearItemImageDis = function() {that._clearItemImage(this, false)};this.setItemToolTip = function(tip) {this.obj.title = tip};this.getItemToolTip = function() {return this.obj.title};return this};dhtmlXToolbarObject.prototype._sliderObject = function(that, id, data) {this.id = that.idPrefix+id;this.state = (data.getAttribute("enabled")!=null?false:true);this.obj = document.createElement("DIV");this.obj.className = "dhx_toolbar_btn def";this.obj.onselectstart = function(e) {e = e||event;e.returnValue = false};this.obj.idd = String(id);this.obj.len = (data.getAttribute("length")!=null?Number(data.getAttribute("length")):50);this.obj.innerHTML = "<div>"+(data.getAttribute("textMin")!=null?data.getAttribute("textMin"):"")+"</div>"+
 "<div class='sl_bg_l'></div>"+
 "<div class='sl_bg_m' style='width:"+this.obj.len+"px;'></div>"+
 "<div class='sl_bg_r'></div>"+
 "<div>"+(data.getAttribute("textMax")!=null?data.getAttribute("textMax"):"")+"</div>";that.base.appendChild(this.obj);var self = this;this.pen = document.createElement("DIV");this.pen.className = "sl_pen";this.obj.appendChild(this.pen);var pen = this.pen;this.label = document.createElement("DIV");this.label.className = "dhx_toolbar_slider_label_"+that.skin+(that.rtl?" rtl":"");this.label.style.display = "none";this.label.tip = (data.getAttribute("toolTip")!=null?data.getAttribute("toolTip"):"%v");document.body.appendChild(this.label);var label = this.label;this.pen.valueMin = (data.getAttribute("valueMin")!=null?Number(data.getAttribute("valueMin")):0);this.pen.valueMax = (data.getAttribute("valueMax")!=null?Number(data.getAttribute("valueMax")):100);if (this.pen.valueMin > this.pen.valueMax)this.pen.valueMin = this.pen.valueMax;this.pen.valueNow = (data.getAttribute("valueNow")!=null?Number(data.getAttribute("valueNow")):this.pen.valueMax);if (this.pen.valueNow > this.pen.valueMax)this.pen.valueNow = this.pen.valueMax;if (this.pen.valueNow < this.pen.valueMin)this.pen.valueNow = this.pen.valueMin;this.pen._detectLimits = function() {this.minX = self.obj.childNodes[1].offsetLeft-4;this.maxX = self.obj.childNodes[3].offsetLeft-this.offsetWidth+1};this.pen._detectLimits();this.pen._definePos = function() {this.nowX = Math.round((this.valueNow-this.valueMin)*(this.maxX-this.minX)/(this.valueMax-this.valueMin)+this.minX);this.style.left = this.nowX+"px";this.newNowX = this.nowX};this.pen._definePos();this.pen.initXY = 0;this.pen.allowMove = false;this.pen.onmousedown = function(e) {if (self.state == false)return;e = e||event;this.initXY = e.clientX;this.newValueNow = this.valueNow;this.allowMove = true;this.className = "sl_pen over";if (label.tip != ""){label.style.visibility = "hidden";label.style.display = "";label.innerHTML = label.tip.replace("%v", this.valueNow);label.style.left = Math.round(getAbsoluteLeft(this)+this.offsetWidth/2-label.offsetWidth/2)+"px";label.style.top = getAbsoluteTop(this)-label.offsetHeight-3+"px";label.style.visibility = ""}};this.pen._doOnMouseMoveStart = function(e) {e=e||event;if (!pen.allowMove)return;var ofst = e.clientX - pen.initXY;if (e.clientX < getAbsoluteLeft(pen)+Math.round(pen.offsetWidth/2) && pen.nowX == pen.minX) return;if (e.clientX > getAbsoluteLeft(pen)+Math.round(pen.offsetWidth/2) && pen.nowX == pen.maxX) return;pen.newNowX = pen.nowX + ofst;if (pen.newNowX < pen.minX)pen.newNowX = pen.minX;if (pen.newNowX > pen.maxX)pen.newNowX = pen.maxX;pen.nowX = pen.newNowX;pen.style.left = pen.nowX+"px";pen.initXY = e.clientX;pen.newValueNow = Math.round((pen.valueMax-pen.valueMin)*(pen.newNowX-pen.minX)/(pen.maxX-pen.minX)+pen.valueMin);if (label.tip != ""){label.innerHTML = label.tip.replace(/%v/gi, pen.newValueNow);label.style.left = Math.round(getAbsoluteLeft(pen)+pen.offsetWidth/2-label.offsetWidth/2)+"px";label.style.top = getAbsoluteTop(pen)-label.offsetHeight-3+"px"}};this.pen._doOnMouseMoveEnd = function() {if (!pen.allowMove)return;pen.className = "sl_pen";pen.allowMove = false;pen.nowX = pen.newNowX;pen.valueNow = pen.newValueNow;if (label.tip != "")label.style.display = "none";that.callEvent("onValueChange", [self.obj.idd.replace(that.idPrefix, ""), pen.valueNow])};if (_isIE){document.body.attachEvent("onmousemove", pen._doOnMouseMoveStart);document.body.attachEvent("onmouseup", pen._doOnMouseMoveEnd)}else {window.addEventListener("mousemove", pen._doOnMouseMoveStart, false);window.addEventListener("mouseup", pen._doOnMouseMoveEnd, false)};this.enableItem = function() {if (this.state)return;this.state = true;this.obj.className = "dhx_toolbar_btn def"};this.disableItem = function() {if (!this.state)return;this.state = false;this.obj.className = "dhx_toolbar_btn dis"};this.isEnabled = function() {return this.state};this.showItem = function() {this.obj.style.display = ""};this.hideItem = function() {this.obj.style.display = "none"};this.isVisible = function() {return (this.obj.style.display == "")};this.setValue = function(value, callEvent) {value = Number(value);if (value < this.pen.valueMin)value = this.pen.valueMin;if (value > this.pen.valueMax)value = this.pen.valueMax;this.pen.valueNow = value;this.pen._definePos();if (callEvent == true)that.callEvent("onValueChange", [this.idd.replace(that.idPrefix, ""), this.pen.valueNow])};this.getValue = function() {return this.pen.valueNow};this.setMinValue = function(value, label) {value = Number(value);if (value > this.pen.valueMax)return;this.obj.childNodes[0].innerHTML = label;this.obj.childNodes[0].style.display = (label.length>0?"":"none");this.pen.valueMin = value;if (this.pen.valueNow < this.pen.valueMin)this.pen.valueNow = this.pen.valueMin;this.pen._detectLimits();this.pen._definePos()};this.setMaxValue = function(value, label) {value = Number(value);if (value < this.pen.valueMin)return;this.obj.childNodes[4].innerHTML = label;this.obj.childNodes[4].style.display = (label.length>0?"":"none");this.pen.valueMax = value;if (this.pen.valueNow > this.pen.valueMax)this.pen.valueNow = this.pen.valueMax;this.pen._detectLimits();this.pen._definePos()};this.getMinValue = function() {var label = this.obj.childNodes[0].innerHTML;var value = this.pen.valueMin;return new Array(value, label)};this.getMaxValue = function() {var label = this.obj.childNodes[4].innerHTML;var value = this.pen.valueMax;return new Array(value, label)};this.setItemToolTipTemplate = function(template) {this.label.tip = template};this.getItemToolTipTemplate = function() {return this.label.tip};return this};dhtmlXToolbarObject.prototype.unload = function() {var obj = this.objPull;for (var a in obj){var el = obj[a];if (el["type"] == "separator"){el.hideItem = null;el.isVisible = null;el.showItem = null;el.obj.onselectstart = null;if (el.obj.parentNode)el.obj.parentNode.removeChild(el.obj);el.obj = null;el.tr = null};if (el["type"] == "button"){el.clearItemImage = null;el.clearItemImageDis = null;el.disableItem = null;el.enableItem = null;el.getItemText = null;el.getItemToolTip = null;el.hideItem = null;el.isEnabled = null;el.isVisible = null;el.setItemImage = null;el.setItemImageDis = null;el.setItemText = null;el.setItemToolTip = null;el.showItem = null;el.obj.onselectstart = null;el.obj.onmouseover = null;el.obj.onmouseout = null;el.obj._doOnMouseOver = null;el.obj._doOnMouseOut = null;el.obj.onclick = null;el.obj.onmousedown = null;el.obj.onmouseover = null;el.obj.onmouseout = null;el.obj.onmouseup = null;el.obj._doOnMouseUp = null;el.obj._doOnMouseUpOnceAnywhere = null;if (el.obj.parentNode)el.obj.parentNode.removeChild(el.obj);el.obj = null;el.tr = null};if (el["type"] == "text"){el.getItemText = null;el.hideItem = null;el.isVisible = null;el.setItemText = null;el.setWidth = null;el.showItem = null;el.obj.onselectstart = null;if (el.obj.parentNode)el.obj.parentNode.removeChild(el.obj);el.obj = null;el.tr = null};if (el["type"] == "buttonSelect"){el._buttonButtonSelectObject = null;el._separatorButtonSelectObject = null;el.addListOption = null;el.clearItemImage = null;el.clearItemImageDis = null;el.clearListOptionImage = null;el.disableItem = null;el.disableListOption = null;el.enableItem = null;el.enableListOption = null;el.forEachListOption = null;el.getAllListOptions = null;el.getItemText = null;el.getItemToolTip = null;el.getListOptionImage = null;el.getListOptionPosition = null;el.getListOptionSelected = null;el.getListOptionText = null;el.getListOptionToolTip = null;el.hideItem = null;el.hideListOption = null;el.isEnabled = null;el.isListOptionEnabled = null;el.isListOptionVisible = null;el.isVisible = null;el.removeListOption = null;el.setItemImage = null;el.setItemImageDis = null;el.setItemText = null;el.setItemToolTip = null;el.setListOptionImage = null;el.setListOptionPosition = null;el.setListOptionSelected = null;el.setListOptionText = null;el.setListOptionToolTip = null;el.setWidth = null;el.showItem = null;el.showListOption = null;for (var k in el._listOptions){var op = el._listOptions[k];op.onmouseover = null;op.onmouseout = null;op.onclick = null;op.onselectstart = null;if (op.parentNode)op.parentNode.removeChild(op);op = null;try {el._listOptions[k] = null;delete el._listOptions[k]}catch(e) {}};el._listOptions = null;if (el.polygon._ie6cover){if (el.polygon._ie6cover.parentNode)el.polygon._ie6cover.parentNode.removeChild(el.polygon._ie6cover);el.polygon._ie6cover = null};if (el.polygon.parentNode)el.polygon.parentNode.removeChild(el.polygon);el.polygon = null;el.obj.onmouseover = null;el.obj.onmouseout = null;el.obj.onclick = null;el.obj.onmousedown = null;el.obj.onmouseup = null;if (el.obj.parentNode)el.obj.parentNode.removeChild(el.obj);el.obj = null;el.arw.onmouseover = null;el.arw.onmouseout = null;el.arw.onclick = null;el.arw.onmousedown = null;el.arw.onmouseup = null;if (el.arw.parentNode)el.arw.parentNode.removeChild(el.arw);el.arw = null};if (el["type"] == "buttonInput"){el.disableItem = null;el.enableItem = null;el.getItemToolTip = null;el.getValue = null;el.getWidth = null;el.hideItem = null;el.isEnabled = null;el.isVisible = null;el.setItemToolTip = null;el.setValue = null;el.setWidth = null;el.showItem = null;el.obj.childNodes[0].onkeydown = null;if (el.obj.parentNode)el.obj.parentNode.removeChild(el.obj);el.obj = null;el.tr = null};if (el["type"] == "buttonTwoState"){el.clearItemImage = null;el.clearItemImageDis = null;el.disableItem = null;el.enableItem = null;el.getItemState = null;el.getItemText = null;el.getItemToolTip = null;el.hideItem = null;el.isEnabled = null;el.isVisible = null;el.setItemImage = null;el.setItemImageDis = null;el.setItemState = null;el.setItemText = null;el.setItemToolTip = null;el.showItem = null;el.state = null;el.obj.onselectstart = null;el.obj.onmouseover = null;el.obj.onmouseout = null;el.obj.onmousedown = null;el.obj.onmouseup = null;el.obj._doOnMouseOver = null;el.obj._doOnMouseOut = null;if (el.obj.parentNode)el.obj.parentNode.removeChild(el.obj);el.obj = null;el.tr = null};if (el["type"] == "slider"){el.disableItem = null;el.enableItem = null;el.getItemToolTipTemplate = null;el.getMaxValue = null;el.getMinValue = null;el.getValue = null;el.hideItem = null;el.isEnabled = null;el.isVisible = null;el.setItemToolTipTemplate = null;el.setMaxValue = null;el.setMinValue = null;el.setValue = null;el.showItem = null;el.obj.onselectstart = null;var pen = el.pen;if (_isIE){document.body.detachEvent("onmousemove", pen._doOnMouseMoveStart);document.body.detachEvent("onmouseup", pen._doOnMouseMoveEnd)}else {window.removeEventListener("mousemove", pen._doOnMouseMoveStart, false);window.removeEventListener("mouseup", pen._doOnMouseMoveEnd, false)};pen = null;el.pen.allowMove = null;el.pen.onmousedown = null;el.pen._detectLimits = null;el.pen._definePos = null;el.pen._doOnMouseMoveStart = null;el.pen._doOnMouseMoveEnd = null;el.pen.valueMin = null;el.pen.valueMax = null;el.pen.valueNow = null;el.label.tip = null;if (el.pen.parentNode)el.pen.parentNode.removeChild(el.pen);el.pen = null;if (el.label.parentNode)el.label.parentNode.removeChild(el.label);el.label = null;if (el.obj.parentNode)el.obj.parentNode.removeChild(el.obj);el.obj = null};el["id"] = null;el["type"] = null;el = null;try {obj[a] = null;delete obj[a]}catch(e) {}};obj = null;this.objPull = null;this._hkPool = null;this.rootTypes = null;this.base.innerHTML = "";this.base.className = "";this.base = null;this.tr = null;var list = new Array("showItem","hideItem","isVisible","enableItem","disableItem","isEnabled","setItemText","getItemText","setItemToolTip","getItemToolTip","setItemImage","setItemImageDis",
 "clearItemImage","clearItemImageDis","setItemState","getItemState","setItemToolTipTemplate","getItemToolTipTemplate","setValue","getValue","setMinValue","getMinValue",
 "setMaxValue","getMaxValue","setWidth","getWidth", "_addItem","_doOnLoad","_setLayout","_string2xml","_xmlLoader","getType","getTypeExt","inArray","addButton",
 "addText","addButtonSelect","addButtonTwoState","addSeparator","addSlider","addInput","forEachItem","_addItemToStorage","_buttonInputObject","_buttonObject","_buttonSelectObject",
 "_buttonTwoStateObject","_genStr","_getPosition","_separatorObject","_setPosition","_sliderObject","_textObject","_xmlParser","addListOption","attachEvent",
 "callEvent","checkEvent","clearListOptionImage","detachEvent","disableListOption","enableListOption","eventCatcher","forEachListOption","getAllListOptions","getListOptionImage",
 "getListOptionPosition","getListOptionSelected","getListOptionText","getListOptionToolTip","getPosition","hideListOption", "isListOptionEnabled", "_getIdByPosition",
 "isListOptionVisible","loadXML","loadXMLString","removeItem","removeListOption","setIconPath","setIconsPath","setListOptionImage","setListOptionPosition","setListOptionSelected",
 "setListOptionText","setListOptionToolTip","setPosition","showListOption","dhx_Event");for (var q=0;q<list.length;q++)this[list[q]] = null;list = null;this.cont.innerHTML = "";this.cont.className = "";this.cont = null;this.unload = null};dhtmlXToolbarObject.prototype._autoDetectVisibleArea = function() {this.tX1 = document.body.scrollLeft;this.tX2 = this.tX1+(window.innerWidth||document.body.clientWidth);this.tY1 = Math.max((_isIE?document.documentElement:document.getElementsByTagName("html")[0]).scrollTop, document.body.scrollTop);this.tY2 = this.tY1+(_isIE?Math.max(document.documentElement.clientHeight||0,document.documentElement.offsetHeight||0,document.body.clientHeight||0):window.innerHeight)};(function(){dhtmlx.extend_api("dhtmlXToolbarObject",{_init:function(obj){return [obj.parent, obj.skin]},
 icon_path:"setIconsPath",
 xml:"loadXML",
 items:"items",
 align:"setAlign",
 rtl:"setRTL",
 skin:"setSkin"
 },{items:function(arr){for (var i=0;i < arr.length;i++){var item=arr[i];if (item.type == "button")this.addButton(item.id, null, item.text, item.img, item.img_disabled);if (item.type == "separator")this.addSeparator(item.id, null);if (item.type == "text")this.addText(item.id, null, item.text);if (item.type == "buttonSelect")this.addButtonSelect(item.id, null, item.text, item.options, item.img, item.img_disabled);if (item.type == "buttonTwoState")this.addButtonTwoState(item.id, null, item.text, item.img, item.img_disabled);if (item.type == "buttonInput")this.addInput(item.id, null, item.text);if (item.type == "slider")this.addSlider(item.id, null, item.length, item.value_min, item.value_max, item.value_now, item.text_min, item.text_max, item.tip_template);if (item.width)this.setWidth(item.id, item.width);if (item.disabled)this.disableItem(item.id);if (item.tooltip)this.setItemToolTip(item.id, item.tooltip);if (item.pressed === true)this.setItemState(item.id, true)}}})})();function dhtmlXWindowsSngl(){};function dhtmlXWindowsBtn(){};function dhtmlXWindows() {if (!dhtmlXContainer){alert("dhtmlxcontainer.js is missed on the page");return};this.engine = "dhx";var engineFunc = "_"+this.engine+"_Engine";if (!this[engineFunc]){alert("No dhtmlxWindows engine was found.");return}else {this[engineFunc]()};var that = this;this.pathPrefix = "dhxwins_";this.imagePath = dhtmlx.image_path||"codebase/imgs/";this.setImagePath = function(path) {this.imagePath = path};this.skin = "dhx_skyblue";this.skinParams = {"standard" : {"header_height": 32, "border_left_width": 6, "border_right_width": 7, "border_bottom_height": 6 },
 
 "aqua_dark" : {"header_height": 31, "border_left_width": 3, "border_right_width": 3, "border_bottom_height": 3 },
 "aqua_orange" : {"header_height": 31, "border_left_width": 3, "border_right_width": 3, "border_bottom_height": 3 },
 "aqua_sky" : {"header_height": 31, "border_left_width": 3, "border_right_width": 3, "border_bottom_height": 3 },
 
 "clear_blue" : {"header_height": 32, "border_left_width": 6, "border_right_width": 6, "border_bottom_height": 6 },
 "clear_green" : {"header_height": 32, "border_left_width": 6, "border_right_width": 6, "border_bottom_height": 6 },
 "clear_silver" : {"header_height": 32, "border_left_width": 6, "border_right_width": 6, "border_bottom_height": 6 },
 
 "glassy_blue" : {"header_height": 26, "border_left_width": 4, "border_right_width": 4, "border_bottom_height": 4 },
 "glassy_blue_light" : {"header_height": 26, "border_left_width": 3, "border_right_width": 3, "border_bottom_height": 3 },
 "glassy_caramel" : {"header_height": 26, "border_left_width": 4, "border_right_width": 4, "border_bottom_height": 4 },
 "glassy_greenapple" : {"header_height": 26, "border_left_width": 4, "border_right_width": 4, "border_bottom_height": 4 },
 "glassy_rainy" : {"header_height": 26, "border_left_width": 4, "border_right_width": 4, "border_bottom_height": 4 },
 "glassy_raspberries": {"header_height": 26, "border_left_width": 4, "border_right_width": 4, "border_bottom_height": 4 },
 "glassy_yellow" : {"header_height": 26, "border_left_width": 4, "border_right_width": 4, "border_bottom_height": 4 },
 
 "modern_black" : {"header_height": 39, "border_left_width": 2, "border_right_width": 2, "border_bottom_height": 2 },
 "modern_blue" : {"header_height": 39, "border_left_width": 2, "border_right_width": 2, "border_bottom_height": 2 },
 "modern_red" : {"header_height": 39, "border_left_width": 2, "border_right_width": 2, "border_bottom_height": 2 },
 
 "web" : {"header_height": 21, "border_left_width": 2, "border_right_width": 2, "border_bottom_height": 2 },
 
 "vista_blue" : {"header_height": 28, "border_left_width": 8, "border_right_width": 8, "border_bottom_height": 8 },
 
 "dhx_black" : {"header_height": 21, "border_left_width": 2, "border_right_width": 2, "border_bottom_height": 2 },
 "dhx_blue" : {"header_height": 21, "border_left_width": 2, "border_right_width": 2, "border_bottom_height": 2 },
 "dhx_skyblue" : {"header_height": 21, "border_left_width": 2, "border_right_width": 2, "border_bottom_height": 2 }};this.setSkin = function(skin) {this.skin = skin;this._engineRedrawSkin()};this.isWindow = function(id) {var t = (this.wins[id] != null);return t};this.findByText = function(text) {var wins = new Array();for (var a in this.wins){if (this.wins[a].getText().search(text, "gi") >= 0) {wins[wins.length] = this.wins[a]}};return wins};this.window = function(id) {var win = null;if (this.wins[id] != null){win = this.wins[id]};return win};this.forEachWindow = function(handler) {for (var a in this.wins){handler(this.wins[a])}};this.getBottommostWindow = function() {var bottommost = this.getTopmostWindow();for (var a in this.wins){if (this.wins[a].zi < bottommost.zi){bottommost = this.wins[a]}};return (bottommost.zi != 0 ? bottommost : null)};this.getTopmostWindow = function(visibleOnly) {var topmost = {"zi": 0};for (var a in this.wins){if (this.wins[a].zi > topmost.zi){if (visibleOnly == true && !this._isWindowHidden(this.wins[a])) {topmost = this.wins[a]};if (visibleOnly != true){topmost = this.wins[a]}}};return (topmost.zi != 0 ? topmost : null)};this.wins = {};for (var a in this.wins)delete this.wins[a];this.autoViewport = true;this._createViewport = function() {this.vp = document.body;this.vp._css = (String(this.vp.className).length > 0 ? this.vp.className : "");this.vp.className += " dhtmlx_skin_"+this.skin+(this._r?" dhx_wins_rtl":"");this.modalCoverI = document.createElement("IFRAME");this.modalCoverI.frameBorder = "0";this.modalCoverI.className = "dhx_modal_cover_ifr";this.modalCoverI.setAttribute("src","javascript:false;");this.modalCoverI.style.display = "none";this.modalCoverI.style.zIndex = 0;this.vp.appendChild(this.modalCoverI);this.modalCoverD = document.createElement("DIV");this.modalCoverD.className = "dhx_modal_cover_dv";this.modalCoverD.style.display = "none";this.modalCoverD.style.zIndex = 0;this.vp.appendChild(this.modalCoverD);this._vpcover = document.createElement("DIV");this._vpcover.className = "dhx_content_vp_cover";this._vpcover.style.display = "none";this.vp.appendChild(this._vpcover);this._carcass = document.createElement("DIV");this._carcass.className = "dhx_carcass_resmove";this._carcass.style.display = "none";if (_isIE){this._carcass.innerHTML = "<iframe border=0 frameborder=0 style='filter: alpha(opacity=0);width: 100%;height:100%;position: absolute;top: 0px;left: 0px;width: 100%;height: 100%;'></iframe><div style='position: absolute;top: 0px;left: 0px;width: 100%;height: 100%;'></div>";this._carcass.childNodes[0].setAttribute("src","javascript:false;")};this._carcass.onselectstart = function(e) {e = e||event;e.returnValue = false};this.vp.appendChild(this._carcass)};this._autoResizeViewport = function() {for (var a in this.wins){if (this.wins[a]._isFullScreened){this.wins[a]._content.style.width = document.body.offsetWidth-(_isIE?4:0)+"px";if (document.body.offsetHeight == 0){if (window.innerHeight){this.wins[a]._content.style.height = window.innerHeight+"px"}else {this.wins[a]._content.style.height = document.body.scrollHeight+"px"}}else {this.wins[a]._content.style.height = document.body.offsetHeight-(_isIE?4:0)+"px"};if (this.wins[a].layout != null && _isOpera){this.wins[a].layout._fixCellsContentOpera950()};this.wins[a].updateNestedObjects()};if (this.wins[a]._isMaximized && this.wins[a].style.display != "none"){this._restoreWindow(this.wins[a]);this._maximizeWindow(this.wins[a])}};if (this.vp == document.body)return;if (this.autoViewport == false)return;this.vp.style.width = (_isIE ? document.body.offsetWidth - 4 : window.innerWidth) + "px";this.vp.style.height = (_isIE ? document.body.offsetHeight - 4 : window.innerHeight) + "px";for (var a in this.wins){var win = this.wins[a];var overX = false;var overY = false;if (win.x > this.vp.offsetWidth - 10){win.x = this.vp.offsetWidth - 10;overX = true};var skinParams = (win._skinParams!=null?win._skinParams:this.skinParams[this.skin]);if (win.y + skinParams["header_height"] > this.vp.offsetHeight){win.y = this.vp.offsetHeight - skinParams["header_height"];overY = true};if (overX || overY){this._engineRedrawWindowPos(win)}}};this.enableAutoViewport = function(state) {if (this.vp != document.body)return;this.autoViewport = state;if (state == false){document.body.className = this.vp._css;this.vp = document.createElement("DIV");this.vp.autocreated = true;this.vp.className = "dhtmlx_winviewport dhtmlx_skin_"+this.skin+(this._r?" dhx_wins_rtl":"");this.vp.style.left = "0px";this.vp.style.top = "0px";document.body.appendChild(this.vp);this.vp.ax = 0;this.vp.ay = 0;this._autoResizeViewport();this.vp.appendChild(this.modalCoverI);this.vp.appendChild(this.modalCoverD);this.vp.appendChild(this._carcass)}};this.attachViewportTo = function(objId) {if (this.autoViewport == false){if (this.vp != document.body){this.vp.parentNode.removeChild(this.vp)};this.vp = document.getElementById(objId);this.vp.autocreated = false;this.vp.className += " dhtmlx_skin_"+this.skin+(this._r?" dhx_wins_rtl":"");this.vp.style.position = "relative";this.vp.style.overflow = "hidden";this.vp.ax = 0;this.vp.ay = 0;this.vp.appendChild(this.modalCoverI);this.vp.appendChild(this.modalCoverD);this.vp.appendChild(this._carcass)}};this.setViewport = function(x, y, width, height, parentObj) {if (this.autoViewport == false){this.vp.style.left = x + "px";this.vp.style.top = y + "px";this.vp.style.width = width + "px";this.vp.style.height = height + "px";if (parentObj != null){parentObj.appendChild(this.vp)};this.vp.ax = getAbsoluteLeft(this.vp);this.vp.ay = getAbsoluteTop(this.vp)}};this._effects = {"move" : false, "resize" : false};this.setEffect = function(efName, efValue) {if ((this._effects[efName] != null)&& (typeof(efValue) == "boolean")) {this._effects[efName] = efValue}};this.getEffect = function(efName) {return this._effects[efName]};this.createWindow = function(id, x, y, width, height) {var win = document.createElement("DIV");win.className = "dhtmlx_window_inactive";win.dir = "ltr";for (var a in this.wins){this.wins[a].zi += this.zIndexStep;this.wins[a].style.zIndex = this.wins[a].zi};win.zi = this.zIndexStep;win.style.zIndex = win.zi;win.active = false;win._isWindow = true;win.isWindow = true;win.w = width;win.h = height;win.x = x;win.y = y;this._engineFixWindowPosInViewport(win);win._isModal = false;win._allowResize = true;win.maxW = "auto";win.maxH = "auto";win.minW = 200;win.minH = 140;win.iconsPresent = true;win.icons = new Array(this.imagePath+this.pathPrefix+this.skin+"/active/icon_normal.gif", this.imagePath+this.pathPrefix+this.skin+"/inactive/icon_normal.gif");win._allowMove = true;win._allowMoveGlobal = true;win._allowResizeGlobal = true;win._keepInViewport = false;var skin = this.skinParams[this.skin];win.idd = id;this.vp.appendChild(win);this._engineSetWindowBody(win);this._engineRedrawWindowPos(win);this._engineRedrawWindowSize(win);this._engineUpdateWindowIcon(win, win.icons[0]);this._engineDiableOnSelectInWindow(win, true);this.wins[id] = win;dhtmlxEventable(win);this._engineGetWindowHeader(win).onmousedown = function(e) {var w = that.wins[this.idd];w.bringToTop();if (that._engineGetWindowHeaderState(w)) return;e = e||event;if (!that._engineCheckHeaderMouseDown(w, e)) {return};if (!w._allowMove || !w._allowMoveGlobal){return};w.oldMoveX = w.x;w.oldMoveY = w.y;w.moveOffsetX = w.x - e.clientX;w.moveOffsetY = w.y - e.clientY;that.movingWin = w;if (that._effects["move"] == false){that._carcass.x = that.movingWin.x;that._carcass.y = that.movingWin.y;that._carcass.w = parseInt(that.movingWin.style.width)+(_isIE?0:-2);that._carcass.h = parseInt(that.movingWin.style.height)+(_isIE?0:-2);that._carcass.style.left = that._carcass.x+"px";that._carcass.style.top = that._carcass.y+"px";that._carcass.style.width = that._carcass.w+"px";that._carcass.style.height = that._carcass.h+"px";that._carcass.style.zIndex = that._getTopZIndex(true)+1;that._carcass._keepInViewport = win._keepInViewport};that._blockSwitcher(true);that._vpcover.style.zIndex = that.movingWin.style.zIndex-1;that._vpcover.style.display = "";e.returnValue = false;e.cancelBubble = true;w = null;return false};this._engineGetWindowHeader(win).ondblclick = function(e) {var w = that.wins[this.idd];if (!that._engineCheckHeaderMouseDown(w, e||event)) {return};if (w._allowResizeGlobal && !w._isParked){if (w._isMaximized == true){that._restoreWindow(w)}else {that._maximizeWindow(w)}}};win.setText = function(text) {that._engineGetWindowLabel(this).innerHTML = text};win.getText = function() {return that._engineGetWindowLabel(this).innerHTML};win.getId = function() {return this.idd};win.show = function() {that._showWindow(this)};win.hide = function() {that._hideWindow(this)};win.minimize = function() {that._restoreWindow(this)};win.maximize = function() {that._maximizeWindow(this)};win.close = function() {that._closeWindow(this)};win.park = function() {if (this._isParkedAllowed){that._parkWindow(this)}};win.stick = function() {that._stickWindow(this)};win.unstick = function() {that._unstickWindow(this)};win.isSticked = function() {return this._isSticked};win.setIcon = function(iconEnabled, iconDisabled) {that._setWindowIcon(win, iconEnabled, iconDisabled)};win.getIcon = function() {return that._getWindowIcon(this)};win.clearIcon = function() {that._clearWindowIcons(this)};win.restoreIcon = function() {that._restoreWindowIcons(this)};win.keepInViewport = function(state) {this._keepInViewport = state};win.setModal = function(state) {if (state == true){if (that.modalWin != null || that.modalWin == this)return;that._setWindowModal(this, true)}else {if (that.modalWin != this)return;that._setWindowModal(this, false)}};win.isModal = function() {return this._isModal};win.isHidden = function() {return that._isWindowHidden(this)};win.isMaximized = function() {return this._isMaximized};win.isParked = function() {return this._isParked};win.allowPark = function() {that._allowParking(this)};win.denyPark = function() {that._denyParking(this)};win.isParkable = function() {return this._isParkedAllowed};win.allowResize = function() {that._allowReszieGlob(this)};win.denyResize = function() {that._denyResize(this)};win.isResizable = function() {return this._allowResizeGlobal};win.allowMove = function() {if (!this._isMaximized){this._allowMove = true};this._allowMoveGlobal = true};win.denyMove = function() {this._allowMoveGlobal = false};win.isMovable = function() {return this._allowMoveGlobal};win.bringToTop = function() {that._bringOnTop(this);that._makeActive(this)};win.bringToBottom = function() {that._bringOnBottom(this)};win.isOnTop = function() {return that._isWindowOnTop(this)};win.isOnBottom = function() {return that._isWindowOnBottom(this)};win.setPosition = function(x, y) {this.x = x;this.y = y;that._engineFixWindowPosInViewport(this);that._engineRedrawWindowPos(this)};win.getPosition = function() {return new Array(this.x, this.y)};win.setDimension = function(width, height) {if (width != null){this.w = width};if (height != null){this.h = height};that._fixWindowDimensionInViewport(this);that._engineFixWindowPosInViewport(this);that._engineRedrawWindowSize(this);this.updateNestedObjects()};win.getDimension = function() {return new Array(this.w, this.h)};win.setMaxDimension = function(maxWidth, maxHeight) {this.minW = "auto";this.minH = "auto";that._engineRedrawWindowSize(this)};win.getMaxDimension = function() {return new Array(this.maxW, this.maxH)};win.setMinDimension = function(minWidth, minHeight) {if (minWidth != null){this.minW = minWidth};if (minHeight != null){this.minH = minHeight};that._fixWindowDimensionInViewport(this);that._engineRedrawWindowPos(this)};win.getMinDimension = function() {return new Array(this.minW, this.minH)};win._adjustToContent = function(cw, ch) {that._engineAdjustWindowToContent(this, cw, ch)};win._doOnAttachMenu = function() {that._engineRedrawWindowSize(this);this.updateNestedObjects()};win._doOnAttachToolbar = function() {that._engineRedrawWindowSize(this);this.updateNestedObjects()};win._doOnAttachStatusBar = function() {that._engineRedrawWindowSize(this);this.updateNestedObjects()};win._doOnAttachURL = function(addIFrameEvents) {if (!addIFrameEvents){that.callEvent("onContentLoaded", [this]);return};if (_isIE){var w = this;var f = this._frame;f.onreadystatechange = function(a) {if (f.readyState == "complete"){try{f.contentWindow.document.body.onmousedown = function(){try{w.bringToTop()}catch(e){}}}catch(e){};try{that.callEvent("onContentLoaded",[w])}catch(e){}}}}else {var w = this;var f = this._frame;f.onload = function() {try {f.contentWindow.onmousedown = function(){try{w.bringToTop()}catch(e){}}}catch(e){};that.callEvent("onContentLoaded",[w])}}};win.addUserButton = function(id, pos, title, label) {var userBtn = that._addUserButton(this, id, pos, title, label);return userBtn};win.removeUserButton = function(id) {if (!((id == "minmax1")|| (id == "minmax2") || (id == "park") || (id == "close") || (id == "stick") || (id == "unstick") || (id == "help"))) {if (btn != null){that._removeUserButton(this, id)}}};win.progressOn = function() {that._engineSwitchWindowProgress(this, true)};win.progressOff = function() {that._engineSwitchWindowProgress(this, false)};win.setToFullScreen = function(state) {that._setWindowToFullScreen(this, state)};win.showHeader = function() {that._engineSwitchWindowHeader(this, true)};win.hideHeader = function() {that._engineSwitchWindowHeader(this, false)};win.progressOff();win.canStartResize = false;win.onmousemove = function(e) {e = e || event;var targetObj = e.target || e.srcElement;if ((!this._allowResize)|| (this._allowResizeGlobal == false)) {if (targetObj.style.cursor != "")targetObj.style.cursor = "";if (this.style.cursor != "")this.style.cursor = "";this.canStartResize = false;return false};if (that.resizingWin != null)return;if (that.movingWin != null)return;if (this._isParked)return;var px = (_isIE||_isOpera?e.offsetX:e.layerX);var py = (_isIE||_isOpera?e.offsetY:e.layerY);var resDir = that._engineAllowWindowResize(win, targetObj, px, py);if (resDir == null){this.canStartResize = false;this.style.cursor = "";return};that.resizingDirs = resDir;switch (that.resizingDirs) {case "border_left":
 targetObj.style.cursor = "w-resize";this.resizeOffsetX = this.x - e.clientX;break;case "border_right":
 targetObj.style.cursor = "e-resize";this.resizeOffsetXW = this.x + this.w - e.clientX;break;case "border_top":
 targetObj.style.cursor = "n-resize";this.resizeOffsetY = this.y - e.clientY;break;case "border_bottom":
 targetObj.style.cursor = "n-resize";this.resizeOffsetYH = this.y + this.h - e.clientY;break;case "corner_left":
 targetObj.style.cursor = "sw-resize";this.resizeOffsetX = this.x - e.clientX;this.resizeOffsetYH = this.y + this.h - e.clientY;break;case "corner_up_left":
 targetObj.style.cursor = "nw-resize";this.resizeOffsetY = this.y - e.clientY;this.resizeOffsetX = this.x - e.clientX;break;case "corner_right":
 targetObj.style.cursor = "nw-resize";this.resizeOffsetXW = this.x + this.w - e.clientX;this.resizeOffsetYH = this.y + this.h - e.clientY;break;case "corner_up_right":
 targetObj.style.cursor = "sw-resize";this.resizeOffsetY = this.y - e.clientY;this.resizeOffsetXW = this.x + this.w - e.clientX;break};this.canStartResize = true;this.style.cursor = targetObj.style.cursor;return false};win.onmousedown = function(e) {that._makeActive(this);that._bringOnTop(this);if (this.canStartResize){that._blockSwitcher(true);that.resizingWin = this;if (!that._effects["resize"]){that._carcass.x = that.resizingWin.x;that._carcass.y = that.resizingWin.y;that._carcass.w = that.resizingWin.w+(_isIE?0:-2);that._carcass.h = that.resizingWin.h+(_isIE?0:-2);that._carcass.style.left = that._carcass.x+"px";that._carcass.style.top = that._carcass.y+"px";that._carcass.style.width = that._carcass.w+"px";that._carcass.style.height = that._carcass.h+"px";that._carcass.style.zIndex = that._getTopZIndex(true)+1;that._carcass.style.cursor = this.style.cursor;that._carcass._keepInViewport = this._keepInViewport;that._carcass.style.display = ""};that._vpcover.style.zIndex = that.resizingWin.style.zIndex-1;that._vpcover.style.display = "";if (this.layout){this.callEvent("_onBeforeTryResize", [this])};e = e||event;e.returnValue = false;e.cancelBubble = true;return false}};this._addDefaultButtons(win);win.button = function(id) {var b = null;if (this.btns[id] != null){b = this.btns[id]};return b};win.center = function() {that._centerWindow(this, false)};win.centerOnScreen = function() {that._centerWindow(this, true)};win._attachContent("empty", null);win._redraw = function() {that._engineRedrawWindowSize(this)};win.bringToTop();this._engineRedrawWindowSize(win);return this.wins[id]};this.zIndexStep = 50;this._getTopZIndex = function(ignoreSticked) {var topZIndex = 0;for (var a in this.wins){if (ignoreSticked == true){if (this.wins[a].zi > topZIndex){topZIndex = this.wins[a].zi}}else {if (this.wins[a].zi > topZIndex && !this.wins[a]._isSticked){topZIndex = this.wins[a].zi}}};return topZIndex};this.movingWin = null;this._moveWindow = function(e) {if (this.movingWin != null){if (!this.movingWin._allowMove || !this.movingWin._allowMoveGlobal){return};if (this._effects["move"] == true){if (this._engineGetWindowHeader(this.movingWin).style.cursor != "move") {this._engineGetWindowHeader(this.movingWin).style.cursor = "move"};this.movingWin.oldMoveX = this.movingWin.x;this.movingWin.oldMoveY = this.movingWin.y;this.movingWin.x = e.clientX + this.movingWin.moveOffsetX;this.movingWin.y = e.clientY + this.movingWin.moveOffsetY;this._engineFixWindowPosInViewport(this.movingWin);this._engineRedrawWindowPos(this.movingWin)}else {if (this._carcass.style.display != ""){this._carcass.style.display = ""};if (this._carcass.style.cursor != "move"){this._carcass.style.cursor = "move"};if (this._engineGetWindowHeader(this.movingWin).style.cursor != "move") {this._engineGetWindowHeader(this.movingWin).style.cursor = "move"};this._carcass.x = e.clientX + this.movingWin.moveOffsetX;this._carcass.y = e.clientY + this.movingWin.moveOffsetY;this._engineFixWindowPosInViewport(this._carcass);this._carcass.style.left = this._carcass.x+"px";this._carcass.style.top = this._carcass.y+"px"}};if (this.resizingWin != null){if (!this.resizingWin._allowResize){return};if (this.resizingDirs == "border_left" || this.resizingDirs == "corner_left" || this.resizingDirs == "corner_up_left"){if (this._effects["resize"]){var ofs = e.clientX + this.resizingWin.resizeOffsetX;var sign = (ofs > this.resizingWin.x ? -1 : 1);newW = this.resizingWin.w + Math.abs(ofs - this.resizingWin.x)*sign;if ((newW < this.resizingWin.minW)&& (sign < 0)) {this.resizingWin.x = this.resizingWin.x + this.resizingWin.w - this.resizingWin.minW;this.resizingWin.w = this.resizingWin.minW}else {this.resizingWin.w = newW;this.resizingWin.x = ofs};this._engineRedrawWindowPos(this.resizingWin);this._engineRedrawWindowSize(this.resizingWin)}else {var ofs = e.clientX + this.resizingWin.resizeOffsetX;var sign = (ofs > this._carcass.x ? -1 : 1);newW = this._carcass.w + Math.abs(ofs - this._carcass.x)*sign;if ((newW < this.resizingWin.minW)&& (sign < 0)) {this._carcass.x = this._carcass.x + this._carcass.w - this.resizingWin.minW;this._carcass.w = this.resizingWin.minW}else {this._carcass.w = newW;this._carcass.x = ofs};this._carcass.style.left = this._carcass.x+"px";this._carcass.style.width = this._carcass.w+"px"}};if (this.resizingDirs == "border_right" || this.resizingDirs == "corner_right" || this.resizingDirs == "corner_up_right"){if (this._effects["resize"]){var ofs = e.clientX - (this.resizingWin.x + this.resizingWin.w) + this.resizingWin.resizeOffsetXW;newW = this.resizingWin.w + ofs;if (newW < this.resizingWin.minW){newW = this.resizingWin.minW};this.resizingWin.w = newW;this._engineRedrawWindowPos(this.resizingWin);this._engineRedrawWindowSize(this.resizingWin)}else {var ofs = e.clientX - (this._carcass.x + this._carcass.w) + this.resizingWin.resizeOffsetXW;newW = this._carcass.w + ofs;if (newW < this.resizingWin.minW){newW = this.resizingWin.minW};this._carcass.w = newW;this._carcass.style.width = this._carcass.w+"px"}};if (this.resizingDirs == "border_bottom" || this.resizingDirs == "corner_left" || this.resizingDirs == "corner_right"){if (this._effects["resize"]){var ofs = e.clientY - (this.resizingWin.y + this.resizingWin.h) + this.resizingWin.resizeOffsetYH;newH = this.resizingWin.h + ofs;if (newH < this.resizingWin.minH){newH = this.resizingWin.minH};this.resizingWin.h = newH;this._engineRedrawWindowPos(this.resizingWin);this._engineRedrawWindowSize(this.resizingWin)}else {var ofs = e.clientY - (this._carcass.y + this._carcass.h) + this.resizingWin.resizeOffsetYH;newH = this._carcass.h + ofs;if (newH < this.resizingWin.minH){newH = this.resizingWin.minH};this._carcass.h = newH;this._carcass.style.height = this._carcass.h+"px"}};if (this.resizingDirs == "border_top" || this.resizingDirs == "corner_up_right" || this.resizingDirs == "corner_up_left"){if (this._effects["resize"]){}else {var ofs = e.clientY + this.resizingWin.resizeOffsetY;var sign = (ofs > this.resizingWin.y ? -1 : 1);newH = this.resizingWin.h + Math.abs(ofs - this.resizingWin.y)*sign;if ((newH < this.resizingWin.minH)&& (sign < 0)) {this._carcass.y = this._carcass.y + this._carcass.h - this.resizingWin.minH;this._carcass.h = this.resizingWin.minH}else {this._carcass.h = newH+(_isIE?0:-2);this._carcass.y = ofs};this._carcass.style.top = this._carcass.y+"px";this._carcass.style.height = this._carcass.h+"px"}}}};this._stopMove = function() {if (this.movingWin != null){if (this._effects["move"]){var win = this.movingWin;this.movingWin = null;this._blockSwitcher(false);this._engineGetWindowHeader(win).style.cursor = "";if (_isFF){win.h++;that._engineRedrawWindowPos(win);win.h--;that._engineRedrawWindowPos(win)}}else {this._carcass.style.cursor = "";this._carcass.style.display = "none";var win = this.movingWin;this._engineGetWindowHeader(win).style.cursor = "";this.movingWin = null;this._blockSwitcher(false);win.setPosition(parseInt(this._carcass.style.left), parseInt(this._carcass.style.top))};this._vpcover.style.display = "none";if (!(win.oldMoveX == win.x && win.oldMoveY == win.y)) {if (win.checkEvent("onMoveFinish")) {win.callEvent("onMoveFinish",[win])}else {this.callEvent("onMoveFinish",[win])}}};if (this.resizingWin != null){var win = this.resizingWin;this.resizingWin = null;this._blockSwitcher(false);if (!this._effects["resize"]){this._carcass.style.display = "none";win.setPosition(this._carcass.x, this._carcass.y);win.setDimension(this._carcass.w+(_isIE?0:2), this._carcass.h+(_isIE?0:2))}else {win.updateNestedObjects()};if (win.layout){win.layout.callEvent("onResize", [])};this._vpcover.style.display = "none";if (win.checkEvent("onResizeFinish")) {win.callEvent("onResizeFinish",[win])}else {this.callEvent("onResizeFinish",[win])}}};this._fixWindowDimensionInViewport = function(win) {if (win.w < win.minW){win.w = win.minW};if (win._isParked)return;if (win.h < win.minH){win.h = win.minH}};this._bringOnTop = function(win) {var cZIndex = win.zi;var topZIndex = this._getTopZIndex(win._isSticked);for (var a in this.wins){if (this.wins[a] != win){if (win._isSticked || (!win._isSticked && !this.wins[a]._isSticked)) {if (this.wins[a].zi > cZIndex){this.wins[a].zi = this.wins[a].zi - this.zIndexStep;this.wins[a].style.zIndex = this.wins[a].zi}}}};win.zi = topZIndex;win.style.zIndex = win.zi};this._makeActive = function(win, ignoreFocusEvent) {for (var a in this.wins){if (this.wins[a] == win){var needEvent = false;if (this.wins[a].className != "dhtmlx_window_active" && !ignoreFocusEvent){needEvent = true};this.wins[a].className = "dhtmlx_window_active";this._engineUpdateWindowIcon(this.wins[a], this.wins[a].icons[0]);if (needEvent == true){if (win.checkEvent("onFocus")) {win.callEvent("onFocus",[win])}else {this.callEvent("onFocus",[win])}}}else {this.wins[a].className = "dhtmlx_window_inactive";this._engineUpdateWindowIcon(this.wins[a], this.wins[a].icons[1])}}};this._getActive = function() {var win = null;for (var a in this.wins){if (this.wins[a].className == "dhtmlx_window_active"){win = this.wins[a]}};return win};this._centerWindow = function(win, onScreen) {if (win._isMaximized == true){return};if (win._isParked == true){return};if (onScreen == true){var vpw = (_isIE?document.body.offsetWidth:window.innerWidth);var vph = (_isIE?document.body.offsetHeight:window.innerHeight)}else {var vpw = (this.vp==document.body?document.body.offsetWidth:(Number(parseInt(this.vp.style.width))&&String(this.vp.style.width).search("%")==-1?parseInt(this.vp.style.width):this.vp.offsetWidth));var vph = (this.vp==document.body?document.body.offsetHeight:(Number(parseInt(this.vp.style.height))&&String(this.vp.style.height).search("%")==-1?parseInt(this.vp.style.height):this.vp.offsetHeight))};var newX = Math.round((vpw/2) - (win.w/2));var newY = Math.round((vph/2) - (win.h/2));win.x = newX;win.y = newY;this._engineFixWindowPosInViewport(win);this._engineRedrawWindowPos(win)};this._addDefaultButtons = function(win) {var btnStick = this._engineGetWindowButton(win, "stick");btnStick.title = "Stick";btnStick.isVisible = false;btnStick.style.display = "none";btnStick._isEnabled = true;btnStick.isPressed = false;btnStick.label = "stick";btnStick._doOnClick = function() {this.isPressed = true;that._stickWindow(win)};var btnSticked = this._engineGetWindowButton(win, "sticked");btnSticked.title = "Unstick";btnSticked.isVisible = false;btnSticked.style.display = "none";btnSticked._isEnabled = true;btnSticked.isPressed = false;btnSticked.label = "sticked";btnSticked._doOnClick = function() {this.isPressed = false;that._unstickWindow(win)};var btnHelp = this._engineGetWindowButton(win, "help");btnHelp.title = "Help";btnHelp.isVisible = false;btnHelp.style.display = "none";btnHelp._isEnabled = true;btnHelp.isPressed = false;btnHelp.label = "help";btnHelp._doOnClick = function() {that._needHelp(win)};var btnPark = this._engineGetWindowButton(win, "park");btnPark.titleIfParked = "Park Down";btnPark.titleIfNotParked = "Park Up";btnPark.title = btnPark.titleIfNotParked;btnPark.isVisible = true;btnPark._isEnabled = true;btnPark.isPressed = false;btnPark.label = "park";btnPark._doOnClick = function() {that._parkWindow(win)};var btnMinMax1 = this._engineGetWindowButton(win, "minmax1");btnMinMax1.title = "Maximize";btnMinMax1.isVisible = true;btnMinMax1._isEnabled = true;btnMinMax1.isPressed = false;btnMinMax1.label = "minmax1";btnMinMax1._doOnClick = function() {that._maximizeWindow(win)};var btnMinMax2 = this._engineGetWindowButton(win, "minmax2");btnMinMax2.title = "Restore";btnMinMax2.isVisible = false;btnMinMax2.style.display = "none";btnMinMax2._isEnabled = true;btnMinMax2.isPressed = false;btnMinMax2.label = "minmax2";btnMinMax2._doOnClick = function() {that._restoreWindow(win)};var btnClose = this._engineGetWindowButton(win, "close");btnClose.title = "Close";btnClose.isVisible = true;btnClose._isEnabled = true;btnClose.isPressed = false;btnClose.label = "close";btnClose._doOnClick = function() {that._closeWindow(win)};var btnDock = this._engineGetWindowButton(win, "dock");btnDock.title = "Dock";btnDock.style.display = "none";btnDock.isVisible = false;btnDock._isEnabled = true;btnDock.isPressed = false;btnDock.label = "dock";btnDock._doOnClick = function() {};win._isSticked = false;win._isParked = false;win._isParkedAllowed = true;win._isMaximized = false;win._isDocked = false;win.btns = {};win.btns["stick"] = btnStick;win.btns["sticked"] = btnSticked;win.btns["help"] = btnHelp;win.btns["park"] = btnPark;win.btns["minmax1"] = btnMinMax1;win.btns["minmax2"] = btnMinMax2;win.btns["close"] = btnClose;win.btns["dock"] = btnDock;for (var a in win.btns){this._attachEventsOnButton(win, win.btns[a])}};this._attachEventsOnButton = function(win, btn) {btn.onmouseover = function() {if (this._isEnabled){this.className = "dhtmlx_wins_btns_button dhtmlx_button_"+this.label+"_over_"+(this.isPressed?"pressed":"default")}else {this.className = "dhtmlx_wins_btns_button dhtmlx_button_"+this.label+"_disabled"}};btn.onmouseout = function() {if (this._isEnabled){this.isPressed = false;this.className = "dhtmlx_wins_btns_button dhtmlx_button_"+this.label+"_default"}else {this.className = "dhtmlx_wins_btns_button dhtmlx_button_"+this.label+"_disabled"}};btn.onmousedown = function() {if (this._isEnabled){this.isPressed = true;this.className = "dhtmlx_wins_btns_button dhtmlx_button_"+this.label+"_over_pressed"}else {this.className = "dhtmlx_wins_btns_button dhtmlx_button_"+this.label+"_disabled"}};btn.onmouseup = function() {if (this._isEnabled){var wasPressed = this.isPressed;this.isPressed = false;this.className = "dhtmlx_wins_btns_button dhtmlx_button_"+this.label+"_over_default";if (wasPressed){if (this.checkEvent("onClick")) {this.callEvent("onClick", [win, this])}else {this._doOnClick()}}}else {this.className = "dhtmlx_wins_btns_button dhtmlx_button_"+this.label+"_disabled"}};btn.show = function() {that._showButton(win, this.label)};btn.hide = function() {that._hideButton(win, this.label)};btn.enable = function() {that._enableButton(win, this.label)};btn.disable = function() {that._disableButton(win, this.label)};btn.isEnabled = function() {return this._isEnabled};btn.isHidden = function() {return (!this.isVisible)};dhtmlxEventable(btn)};this._parkWindow = function(win, parkBeforeMinMax) {if (!win._isParkedAllowed)return;if (this.enableParkEffect && win.parkBusy)return;if (win._isParked){if (this.enableParkEffect && !parkBeforeMinMax){win.parkBusy = true;this._doParkDown(win)}else {win.h = win.lastParkH;this._engineRedrawWindowSize(win);this._engineDoOnWindowParkDown(win);win.updateNestedObjects();win.btns["park"].title = win.btns["park"].titleIfNotParked;if (win._allowResizeGlobal == true){this._enableButton(win, "minmax1");this._enableButton(win, "minmax2")};win._isParked = false;if (!parkBeforeMinMax)if (win.checkEvent("onParkDown")) win.callEvent("onParkDown", [win]);else this.callEvent("onParkDown", [win])}}else {if (this.enableParkEffect && !parkBeforeMinMax){win.lastParkH = (String(win.h).search(/\%$/)==-1?win.h:win.offsetHeight);if (win._allowResizeGlobal == true){this._disableButton(win, "minmax1");this._disableButton(win, "minmax2")};if (this.enableParkEffect){win.parkBusy = true;this._doParkUp(win)}else {var skinParams = (win._skinParams!=null?win._skinParams:this.skinParams[this.skin]);win.h = skinParams["header_height"] + skinParams["border_bottom_height"];win.btns["park"].title = win.btns["park"].titleIfParked}}else {win.lastParkH = (String(win.h).search(/\%$/)==-1?win.h:win.offsetHeight);win.h = this._engineGetWindowParkedHeight(win);this._engineRedrawWindowSize(win);this._engineDoOnWindowParkUp(win);win.btns["park"].title = win.btns["park"].titleIfParked;win._isParked = true;if (!parkBeforeMinMax)if (win.checkEvent("onParkUp")) win.callEvent("onParkUp", [win]);else this.callEvent("onParkUp", [win])}}};this._allowParking = function(win) {win._isParkedAllowed = true;this._enableButton(win, "park")};this._denyParking = function(win) {win._isParkedAllowed = false;this._disableButton(win, "park")};this.enableParkEffect = false;this.parkStartSpeed = 80;this.parkSpeed = this.parkStartSpeed;this.parkTM = null;this.parkTMTime = 5;this._doParkUp = function(win) {if (String(win.h).search(/\%$/) != -1) {win.h = win.offsetHeight};win.h -= this.parkSpeed;var hh = this._engineGetWindowParkedHeight(win);if (win.h <= hh){win.h = hh;this._engineGetWindowButton(win, "park").title = this._engineGetWindowButton(win, "park").titleIfParked;win._isParked = true;win.parkBusy = false;this._engineRedrawWindowSize(win);this._engineDoOnWindowParkUp(win);if (win.checkEvent("onParkUp")) win.callEvent("onParkUp", [win]);else this.callEvent("onParkUp", [win])}else {this._engineRedrawWindowSize(win);this.parkTM = window.setTimeout(function(){that._doParkUp(win)}, this.parkTMTime)}};this._doParkDown = function(win) {win.h += this.parkSpeed;if (win.h >= win.lastParkH){win.h = win.lastParkH;this._engineGetWindowButton(win, "park").title = this._engineGetWindowButton(win, "park").titleIfNotParked;if (win._allowResizeGlobal == true){this._enableButton(win, "minmax1");this._enableButton(win, "minmax2")};win._isParked = false;win.parkBusy = false;this._engineRedrawWindowSize(win);win.updateNestedObjects();this._engineDoOnWindowParkDown(win);if (win.checkEvent("onParkDown")) win.callEvent("onParkDown", [win]);else this.callEvent("onParkDown", [win])}else {this._engineRedrawWindowSize(win);this.parkTM = window.setTimeout(function(){that._doParkDown(win)}, this.parkTMTime)}};this._enableButton = function(win, btn) {var button = this._engineGetWindowButton(win, btn);if (!button)return;button._isEnabled = true;button.className = "dhtmlx_wins_btns_button dhtmlx_button_"+button.label+"_default"};this._disableButton = function(win, btn) {var button = this._engineGetWindowButton(win, btn);if (!button)return;button._isEnabled = false;button.className = "dhtmlx_wins_btns_button dhtmlx_button_"+win.btns[btn].label+"_disabled"};this._allowReszieGlob = function(win) {win._allowResizeGlobal = true;this._enableButton(win, "minmax1");this._enableButton(win, "minmax2")};this._denyResize = function(win) {win._allowResizeGlobal = false;this._disableButton(win, "minmax1");this._disableButton(win, "minmax2")};this._maximizeWindow = function(win) {if (win._allowResizeGlobal == false)return;var isParkedBeforeMinMax = win._isParked;if (isParkedBeforeMinMax)this._parkWindow(win, true);win.lastMaximizeX = win.x;win.lastMaximizeY = win.y;win.lastMaximizeW = win.w;win.lastMaximizeH = win.h;win.x = 0;win.y = 0;win._isMaximized = true;win._allowMove = false;win._allowResize = false;win.w = (win.maxW == "auto" ? (this.vp == document.body ? "100%" : (this.vp.style.width != "" && String(this.vp.style.width).search("%") == -1 ? parseInt(this.vp.style.width) : this.vp.offsetWidth)) : win.maxW);win.h = (win.maxH == "auto" ? (this.vp == document.body ? "100%" : (this.vp.style.height != "" && String(this.vp.style.width).search("%") == -1 ? parseInt(this.vp.style.height) : this.vp.offsetHeight)) : win.maxH);this._hideButton(win, "minmax1");this._showButton(win, "minmax2");this._engineRedrawWindowPos(win);if (isParkedBeforeMinMax){this._parkWindow(win, true)}else {this._engineRedrawWindowSize(win);win.updateNestedObjects()};if (win.checkEvent("onMaximize")) win.callEvent("onMaximize", [win]);else this.callEvent("onMaximize", [win])};this._restoreWindow = function(win) {if (win._allowResizeGlobal == false)return;if (win.layout)win.layout._defineWindowMinDimension(win);var isParkedBeforeMinMax = win._isParked;if (isParkedBeforeMinMax)this._parkWindow(win, true);win.x = win.lastMaximizeX;win.y = win.lastMaximizeY;win.w = win.lastMaximizeW;win.h = win.lastMaximizeH;win._isMaximized = false;win._allowMove = win._allowMoveGlobal;win._allowResize = true;this._fixWindowDimensionInViewport(win);this._hideButton(win, "minmax2");this._showButton(win, "minmax1");this._engineRedrawWindowPos(win);if (isParkedBeforeMinMax){this._parkWindow(win, true)}else {this._engineRedrawWindowSize(win);win.updateNestedObjects()};if (win.checkEvent("onMinimize")) win.callEvent("onMinimize", [win]);else this.callEvent("onMinimize", [win])};this._showButton = function(win, btn) {var button = this._engineGetWindowButton(win, btn);if (!button)return;button.isVisible = true;button.style.display = "";this._engineRedrawWindowTitle(win)};this._hideButton = function(win, btn) {var button = this._engineGetWindowButton(win, btn);if (!button)return;button.isVisible = false;button.style.display = "none";this._engineRedrawWindowTitle(win)};this._showWindow = function(win) {win.style.display = "";if (win.checkEvent("onShow")) {win.callEvent("onShow", [win])}else {this.callEvent("onShow", [win])};var w = this._getActive();if (w == null){this._bringOnTop(win);this._makeActive(win)}else if (this._isWindowHidden(w)) {this._bringOnTop(win);this._makeActive(win)}};this._hideWindow = function(win) {win.style.display = "none";if (win.checkEvent("onHide")) {win.callEvent("onHide", [win])}else {this.callEvent("onHide", [win])};var w = this.getTopmostWindow(true);if (w != null){this._bringOnTop(w);this._makeActive(w)}};this._isWindowHidden = function(win) {var isHidden = (win.style.display == "none");return isHidden};this._closeWindow = function(win) {if (this._focusFixIE){this._focusFixIE.style.top = (this.vp==document.body?0:getAbsoluteTop(this.vp))+"px";this._focusFixIE.focus()};if (win.checkEvent("onClose")) {if (!win.callEvent("onClose", [win])) return}else {if(!this.callEvent("onClose", [win])) return};this._removeWindowGlobal(win);var latest = {"zi": 0 };for (var a in this.wins){if (this.wins[a].zi > latest.zi){latest = this.wins[a]}};if (latest != null){this._makeActive(latest)}};this._needHelp = function(win) {if (win.checkEvent("onHelp")) {win.callEvent("onHelp", [win])}else {this.callEvent("onHelp", [win])}};this._setWindowIcon = function(win, iconEnabled, iconDisabled) {win.iconsPresent = true;win.icons[0] = this.imagePath + iconEnabled;win.icons[1] = this.imagePath + iconDisabled;this._engineUpdateWindowIcon(win, win.icons[win.isOnTop()?0:1])};this._getWindowIcon = function(win) {if (win.iconsPresent){return new Array(win.icons[0], win.icons[1])}else {return new Array(null, null)}};this._clearWindowIcons = function(win) {win.iconsPresent = false;win.icons[0] = this.imagePath + this.pathPrefix + this.skin + "/active/icon_blank.gif";win.icons[1] = this.imagePath + this.pathPrefix + this.skin + "/inactive/icon_blank.gif";this._engineUpdateWindowIcon(win, win.icons[win.isOnTop()?0:1])};this._restoreWindowIcons = function(win) {win.iconsPresent = true;win.icons[0] = this.imagePath + this.pathPrefix + this.skin + "/active/icon_normal.gif";win.icons[1] = this.imagePath + this.pathPrefix + this.skin + "/inactive/icon_normal.gif";this._engineUpdateWindowIcon(win, win.icons[win.className=="dhtmlx_window_active"?0:1])};this._attachWindowContentTo = function(win, obj, w, h) {var data = this._engineGetWindowContent(win).parentNode;data.parentNode.removeChild(data);win.hide();data.style.left = "0px";data.style.top = "0px";data.style.width = (w!=null?w:obj.offsetWidth)+"px";data.style.height = (h!=null?h:obj.offsetHeight)+"px";data.style.position = "relative";obj.appendChild(data);this._engineGetWindowContent(win).style.width = data.style.width;this._engineGetWindowContent(win).style.height = data.style.height};this._setWindowToFullScreen = function(win, state) {if (state == true){var data = win._content;data.parentNode.removeChild(data);win.hide();win._isFullScreened = true;data.style.left = "0px";data.style.top = "0px";data.style.width = document.body.offsetWidth-(_isIE?4:0)+"px";if (document.body.offsetHeight == 0){if (window.innerHeight){data.style.height = window.innerHeight+"px"}else {data.style.height = document.body.scrollHeight+"px"}}else {data.style.height = document.body.offsetHeight-(_isIE?4:0)+"px"};data.style.position = "absolute";document.body.appendChild(data)}else if (state == false){var data = win.childNodes[0].childNodes[0].childNodes[1].childNodes[0].childNodes[0].childNodes[0].childNodes[0].childNodes[1];var base = win._content;document.body.removeChild(base);data.appendChild(base);win._isFullScreened = false;win.setDimension(win.w, win.h);win.show();win.bringToTop();win.center()};win.updateNestedObjects()};this._isWindowOnTop = function(win) {var state = (this.getTopmostWindow() == win);return state};this._bringOnBottom = function(win) {for (var a in this.wins){if (this.wins[a].zi < win.zi){this.wins[a].zi += this.zIndexStep;this.wins[a].style.zIndex = this.wins[a].zi}};win.zi = 50;win.style.zIndex = win.zi;this._makeActive(this.getTopmostWindow())};this._isWindowOnBottom = function(win) {var state = true;for (var a in this.wins){if (this.wins[a] != win){state = state && (this.wins[a].zi > win.zi)}};return state};this._stickWindow = function(win) {win._isSticked = true;this._hideButton(win, "stick");this._showButton(win, "sticked");this._bringOnTop(win)};this._unstickWindow = function(win) {win._isSticked = false;this._hideButton(win, "sticked");this._showButton(win, "stick");this._bringOnTopAnyStickedWindows()};this._addUserButton = function(win, id, pos, title) {var userButton = this._engineAddUserButton(win, id, pos);userButton.title = title;userButton.isVisible = true;userButton._isEnabled = true;userButton.isPressed = false;userButton.label = id;win.btns[id] = userButton;userButton._doOnClick = function() {};this._attachEventsOnButton(win, userButton)};this._removeUserButton = function(win, buttonId) {this._removeButtonGlobal(win, buttonId)};this._blockSwitcher = function(state) {for (var a in this.wins){if (state == true){this.wins[a].showCoverBlocker()}else {this.wins[a].hideCoverBlocker()}}};this.resizingWin = null;this.modalWin = null;this.resizingDirs = "none";if (_isIE){this._focusFixIE = document.createElement("INPUT");this._focusFixIE.className = "dhx_windows_ieonclosefocusfix";document.body.appendChild(this._focusFixIE)};this._createViewport();this._doOnMouseUp = function() {if (that != null)that._stopMove()};this._doOnMoseMove = function(e) {e = e||event;if (that != null)that._moveWindow(e)};this._resizeTM = null;this._resizeTMTime = 200;this._doOnResize = function() {window.clearTimeout(that._resizeTM);that._resizeTM = window.setTimeout(function(){that._autoResizeViewport()}, that._resizeTMTime)};this._doOnUnload = function() {that.unload()};this._doOnSelectStart = function(e) {e = e||event;if (that.movingWin != null || that.resizingWin != null)e.returnValue = false};if (_isIE){document.body.attachEvent("onselectstart", this._doOnSelectStart)};dhtmlxEvent(window, "resize", this._doOnResize);dhtmlxEvent(document.body, "unload", this._doOnUnload);dhtmlxEvent(document.body, "mouseup", this._doOnMouseUp);dhtmlxEvent(this.vp, "mousemove", this._doOnMoseMove);dhtmlxEvent(this.vp, "mouseup", this._doOnMouseUp);this._setWindowModal = function(win, state) {if (state == true){this._makeActive(win);this._bringOnTop(win);this.modalWin = win;win._isModal = true;this.modalCoverI.style.zIndex = win.zi - 2;this.modalCoverI.style.display = "";this.modalCoverD.style.zIndex = win.zi - 2;this.modalCoverD.style.display = ""}else {this.modalWin = null;win._isModal = false;this.modalCoverI.style.zIndex = 0;this.modalCoverI.style.display = "none";this.modalCoverD.style.zIndex = 0;this.modalCoverD.style.display = "none"}};this._bringOnTopAnyStickedWindows = function() {var wins = new Array();for (var a in this.wins){if (this.wins[a]._isSticked){wins[wins.length] = this.wins[a]}};for (var q=0;q<wins.length;q++){this._bringOnTop(wins[q])};if (wins.length == 0){for (var a in this.wins){if (this.wins[a].className == "dhtmlx_window_active"){this._bringOnTop(this.wins[a])}}}};this.unload = function() {this._clearAll()};this._removeButtonGlobal = function(win, buttonId) {if (!win.btns[buttonId])return;var btn = win.btns[buttonId];btn.title = null;btn.isVisible = null;btn._isEnabled = null;btn.isPressed = null;btn.label = null;btn._doOnClick = null;btn.attachEvent = null;btn.callEvent = null;btn.checkEvent = null;btn.detachEvent = null;btn.disable = null;btn.enable = null;btn.eventCatcher = null;btn.hide = null;btn.isEnabled = null;btn.isHidden = null;btn.show = null;btn.onmousedown = null;btn.onmouseout = null;btn.onmouseover = null;btn.onmouseup = null;if (btn.parentNode)btn.parentNode.removeChild(btn);btn = null;win.btns[buttonId] = null};this._removeWindowGlobal = function(win) {if (this.modalWin == win)this._setWindowModal(win, false);var idd = win.idd;if (win._frame){if (_isIE){try {win._frame.onreadystatechange = null;win._frame.contentWindow.document.body.onmousedown = null;win._frame.onload = null}catch(e) {}}else {try {win._frame.contentWindow.onmousedown = null;win._frame.onload = null}catch(e) {}}};win.coverBlocker().onselectstart = null;win._dhxContDestruct();this._engineDiableOnSelectInWindow(win, false);this._engineGetWindowHeader(win).onmousedown = null;this._engineGetWindowHeader(win).ondblclick = null;this.movingWin = null;this.resizingWin = null;for (var a in win.btns)this._removeButtonGlobal(win, a);win.btns = null;win._adjustToContent = null;win._doOnAttachMenu = null;win._doOnAttachStatusBar = null;win._doOnAttachToolbar = null;win._doOnAttachURL = null;win._redraw = null;win.addUserButton = null;win.allowMove = null;win.allowPark = null;win.allowResize = null;win.attachEvent = null;win.bringToBottom = null;win.bringToTop = null;win.callEvent = null;win.center = null;win.centerOnScreen = null;win.checkEvent = null;win.clearIcon = null;win.close = null;win.denyMove = null;win.denyPark = null;win.denyResize = null;win.detachEvent = null;win.eventCatcher = null;win.getDimension = null;win.getIcon = null;win.getId = null;win.getMaxDimension = null;win.getMinDimension = null;win.getPosition = null;win.getText = null;win.hide = null;win.hideHeader = null;win.isHidden = null;win.isMaximized = null;win.isModal = null;win.isMovable = null;win.isOnBottom = null;win.isOnTop = null;win.isParkable = null;win.isParked = null;win.isResizable = null;win.isSticked = null;win.keepInViewport = null;win.maximize = null;win.minimize = null;win.park = null;win.progressOff = null;win.progressOn = null;win.removeUserButton = null;win.restoreIcon = null;win.setDimension = null;win.setIcon = null;win.setMaxDimension = null;win.setMinDimension = null;win.setModal = null;win.setPosition = null;win.setText = null;win.setToFullScreen = null;win.show = null;win.showHeader = null;win.stick = null;win.unstick = null;win.onmousemove = null;win.onmousedown = null;win.icons = null;win.button = null;win._dhxContDestruct = null;win.dhxContGlobal.obj = null;win.dhxContGlobal.setContent = null;win.dhxContGlobal.dhxcont = null;win.dhxContGlobal = null;if (win._frame){while (win._frame.childNodes.length > 0)win._frame.removeChild(win._frame.childNodes[0]);win._frame = null};this._parseNestedForEvents(win);win._content = null;win.innerHTML = "";win.parentNode.removeChild(win);win = null;this.wins[idd] = null;delete this.wins[idd];idd = null};this._removeEvents = function(obj) {obj.onmouseover = null;obj.onmouseout = null;obj.onmousemove = null;obj.onclick = null;obj.ondblclick = null;obj.onmouseenter = null;obj.onmouseleave = null;obj.onmouseup = null;obj.onmousewheel = null;obj.onmousedown = null;obj.onselectstart = null;obj.onfocus = null;obj.style.display = ""};this._parseNestedForEvents = function(obj) {this._removeEvents(obj);for (var q=0;q<obj.childNodes.length;q++){if (obj.childNodes[q].tagName != null){this._parseNestedForEvents(obj.childNodes[q])}}};this._clearAll = function() {this._clearDocumentEvents();for (var a in this.wins)this._removeWindowGlobal(this.wins[a]);this.wins = null;this._parseNestedForEvents(this._carcass);while (this._carcass.childNodes.length > 0)this._carcass.removeChild(this._carcass.childNodes[0]);this._carcass.onselectstart = null;this._carcass.parentNode.removeChild(this._carcass);this._carcass = null;this._parseNestedForEvents(this._vpcover);this._vpcover.parentNode.removeChild(this._vpcover);this._vpcover = null;this._parseNestedForEvents(this.modalCoverD);this.modalCoverD.parentNode.removeChild(this.modalCoverD);this.modalCoverD = null;this._parseNestedForEvents(this.modalCoverI);this.modalCoverI.parentNode.removeChild(this.modalCoverI);this.modalCoverI = null;if (this.vp.autocreated == true)this.vp.parentNode.removeChild(this.vp);this.vp = null;for (var a in this.skinParams){delete this.skinParams[a]};this.skinParams = null;this._effects = null;this._engineSkinParams = null;wins = null;this._addDefaultButtons = null;this._addUserButton = null;this._allowParking = null;this._allowReszieGlob = null;this._attachEventsOnButton = null;this._attachWindowContentTo = null;this._autoResizeViewport = null;this._blockSwitcher = null;this._bringOnBottom = null;this._bringOnTop = null;this._bringOnTopAnyStickedWindows = null;this._centerWindow = null;this._clearAll = null;this._clearDocumentEvents = null;this._clearWindowIcons = null;this._closeWindow = null;this._createViewport = null;this._denyParking = null;this._denyResize = null;this._dhx_Engine = null;this._disableButton = null;this._doOnMoseMove = null;this._doOnMouseUp = null;this._doOnResize = null;this._doOnSelectStart = null;this._doOnUnload = null;this._doParkDown = null;this._doParkUp = null;this._enableButton = null;this._engineAddUserButton = null;this._engineAdjustWindowToContent = null;this._engineAllowWindowResize = null;this._engineCheckHeaderMouseDown = null;this._engineDiableOnSelectInWindow = null;this._engineDoOnWindowParkDown = null;this._engineDoOnWindowParkUp = null;this._engineFixWindowPosInViewport = null;this._engineGetWindowButton = null;this._engineGetWindowContent = null;this._engineGetWindowHeader = null;this._engineGetWindowHeaderState = null;this._engineGetWindowLabel = null;this._engineGetWindowParkedHeight = null;this._engineRedrawSkin = null;this._engineRedrawWindowPos = null;this._engineRedrawWindowSize = null;this._engineRedrawWindowTitle = null;this._engineSetWindowBody = null;this._engineSwitchWindowHeader = null;this._engineSwitchWindowProgress = null;this._engineUpdateWindowIcon = null;this._fixWindowDimensionInViewport = null;this._genStr = null;this._getActive = null;this._getTopZIndex = null;this._getWindowIcon = null;this._hideButton = null;this._hideWindow = null;this._isWindowHidden = null;this._isWindowOnBottom = null;this._isWindowOnTop = null;this._makeActive = null;this._maximizeWindow = null;this._moveWindow = null;this._needHelp = null;this._parkWindow = null;this._parseNestedForEvents = null;this._removeButtonGlobal = null;this._removeEvents = null;this._removeUserButton = null;this._removeWindowGlobal = null;this._restoreWindow = null;this._restoreWindowIcons = null;this._setWindowIcon = null;this._setWindowModal = null;this._setWindowToFullScreen = null;this._showButton = null;this._showWindow = null;this._stickWindow = null;this._stopMove = null;this._unstickWindow = null;this.attachEvent = null;this.attachViewportTo = null;this.callEvent = null;this.checkEvent = null;this.createWindow = null;this.detachEvent = null;this.enableAutoViewport = null;this.eventCatcher = null;this.findByText = null;this.forEachWindow = null;this.getBottommostWindow = null;this.getEffect = null;this.getTopmostWindow = null;this.isWindow = null;this.setEffect = null;this.setImagePath = null;this.setSkin = null;this.setViewport = null;this.unload = null;this.window = null;that = null};this._clearDocumentEvents = function() {if (_isIE){window.detachEvent("onresize", this._doOnResize);document.body.detachEvent("onselectstart", this._doOnSelectStart);document.body.detachEvent("onmouseup", this._doOnMouseUp);document.body.detachEvent("onunload", this._doOnUnload);this.vp.detachEvent("onmousemove", this._doOnMoseMove);this.vp.detachEvent("onmouseup", this._doOnMouseUp)}else {window.removeEventListener("resize", this._doOnResize, false);document.body.removeEventListener("mouseup", this._doOnMouseUp, false);document.body.removeEventListener("unload", this._doOnUnload, false);this.vp.removeEventListener("mousemove", this._doOnMoseMove, false);this.vp.removeEventListener("mouseup", this._doOnMouseUp, false)}};this._genStr = function(w) {var s = "";var z = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";for (var q=0;q<w;q++){s = s + z.charAt(Math.round(Math.random() * z.length))};return s};dhtmlxEventable(this);return this};dhtmlXWindows.prototype._dhx_Engine = function() {this._engineEnabled = true;this._engineName = "dhx";this._engineSkinParams = {"dhx_blue": {"hh": 21, "lbw": 2, "rbw": 2, "lch": 2, "lcw": 14, "rch": 14, "rcw": 14, "bbh": 2, "mnh": 23, "tbh": 25, "sbh": 20, "noh_t": null, "noh_h": null},
 "dhx_black": {"hh": 21, "lbw": 2, "rbw": 2, "lch": 2, "lcw": 14, "rch": 14, "rcw": 14, "bbh": 2, "mnh": 23, "tbh": 25, "sbh": 20, "noh_t": null, "noh_h": null},
 "dhx_skyblue":{"hh": 29, "lbw": 2, "rbw": 2, "lch": 2, "lcw": 14, "rch": 14, "rcw": 14, "bbh": 2, "mnh": 23, "tbh": 25, "sbh": 20, "noh_t": 5, "noh_h": -10}};this._engineSetWindowBody = function(win) {win.innerHTML = "<div iswin='1' class='dhtmlx_wins_body_outer'>"+
 (_isIE?"<iframe frameborder='0' class='dhtmlx_wins_ie6_cover_fix' onload='this.contentWindow.document.body.style.overflow=\"hidden\";'></iframe>":"")+
 "<div class='dhtmlx_wins_icon'></div>"+
 "<div class='dhtmlx_wins_progress'></div>"+
 "<div class='dhtmlx_wins_title'>dhtmlxWindow</div>"+
 "<div class='dhtmlx_wins_btns'>"+
 "<div class='dhtmlx_wins_btns_button dhtmlx_button_dock_default'></div>"+
 "<div class='dhtmlx_wins_btns_button dhtmlx_button_close_default'></div>"+
 "<div class='dhtmlx_wins_btns_button dhtmlx_button_minmax1_default'></div>"+
 "<div class='dhtmlx_wins_btns_button dhtmlx_button_minmax2_default'></div>"+
 "<div class='dhtmlx_wins_btns_button dhtmlx_button_park_default'></div>"+
 "<div class='dhtmlx_wins_btns_button dhtmlx_button_help_default'></div>"+
 "<div class='dhtmlx_wins_btns_button dhtmlx_button_stick_default'></div>"+
 "<div class='dhtmlx_wins_btns_button dhtmlx_button_sticked_default'></div>"+
 "</div>"+
 "<div class='dhtmlx_wins_body_inner'></div>"+
 "<div winResT='yes' class='dhtmlx_wins_resizer_t' style='display:none;'></div>"+
 "<div winResL='yes' class='dhtmlx_wins_resizer_l'></div>"+
 "<div winResR='yes' class='dhtmlx_wins_resizer_r'></div>"+
 "<div winResB='yes' class='dhtmlx_wins_resizer_b'></div>"+
 "<div class='white_line'></div>"+
 "<div class='white_line2'></div>"+
 "</div>";win.dhxContGlobal = new dhtmlXContainer(win);if (this.skin == "dhx_skyblue"){win.dhxContGlobal.obj._offsetWidth = -10;win.dhxContGlobal.obj._offsetHeight = -5;win.dhxContGlobal.obj._offsetLeft = 5;win.dhxContGlobal.obj._offsetHeightSaved = win.dhxContGlobal.obj._offsetHeight};win.skin = this.skin;win.dhxContGlobal.setContent(win.childNodes[0].childNodes[(_isIE?5:4)]);win.coverBlocker().onselectstart = function(e) {e = e||event;e.returnValue = false;e.cancelBubble = true}};this._engineDiableOnSelectInWindow = function(win, state) {var data = new Array();data[0] = win.childNodes[0].childNodes[(_isIE?1:0)];data[1] = win.childNodes[0].childNodes[(_isIE?2:1)];data[2] = win.childNodes[0].childNodes[(_isIE?3:2)];data[3] = win.childNodes[0].childNodes[(_isIE?4:3)];data[4] = win.childNodes[0].childNodes[(_isIE?6:5)];data[5] = win.childNodes[0].childNodes[(_isIE?7:6)];data[6] = win.childNodes[0].childNodes[(_isIE?8:7)];data[7] = win.childNodes[0].childNodes[(_isIE?9:8)];for (var q=0;q<data.length;q++){data[q].onselectstart = (state?function(e){e=e||event;e.returnValue=false;return false}:null)}};this._engineGetWindowHeader = function(win) {win.childNodes[0].idd = win.idd;return win.childNodes[0]};this._engineRedrawWindowSize = function(win) {win.style.width = (String(win.w).search("%")==-1?win.w+"px":win.w);win.style.height = (String(win.h).search("%")==-1?win.h+"px":win.h);var body = win.childNodes[0];body.style.width = win.clientWidth+"px";body.style.height = win.clientHeight+"px";if (body.offsetWidth > win.clientWidth){body.style.width = win.clientWidth*2-body.offsetWidth+"px"};if (body.offsetHeight > win.clientHeight){var px = win.clientHeight*2-body.offsetHeight;if (px < 0)px = 0;body.style.height = px+"px"};var hh = (win._noHeader==true?win._hdrSize:this._engineSkinParams[this.skin]["hh"]);this._engineRedrawWindowTitle(win);win.adjustContent(body, hh)};this._engineRedrawWindowPos = function(win) {if (win._isFullScreened)return;win.style.left = win.x + "px";win.style.top = win.y + "px"};this._engineFixWindowPosInViewport = function(win) {var hh = (win._noHeader==true?win._hdrSize:this._engineSkinParams[this.skin]["hh"]);if (win._keepInViewport){if (win.x < 0){win.x = 0};if (win.x + win.w > this.vp.offsetWidth){win.x = this.vp.offsetWidth - win.w};if (win.y + win.h > this.vp.offsetHeight){win.y = this.vp.offsetHeight - win.h};if (win.y < 0){win.y = 0}}else {if (win.y + hh > this.vp.offsetHeight){win.y = this.vp.offsetHeight - hh};if (win.y < 0){win.y = 0};if (win.x + win.w - 10 < 0){win.x = 10 - win.w};if (win.x > this.vp.offsetWidth - 10){win.x = this.vp.offsetWidth - 10}}};this._engineCheckHeaderMouseDown = function(win, ev) {var x = (_isIE||_isOpera?ev.offsetX:ev.layerX);var y = (_isIE||_isOpera?ev.offsetY:ev.layerY);var obj = ev.target||ev.srcElement;var hh = (win._noHeader==true?win._hdrSize:this._engineSkinParams[this.skin]["hh"]);if (y <= hh && (obj == win.childNodes[0] || obj == win.childNodes[0].childNodes[(_isIE?1:0)] || obj == win.childNodes[0].childNodes[(_isIE?3:2)] || obj == win.childNodes[0].childNodes[(_isIE?4:3)])) return true;return false};this._engineGetWindowContent = function(win) {alert("_engineGetWindowContent")};this._engineGetWindowButton = function(win, buttonName) {var buttonObj = null;var buttonStyle = "dhtmlx_button_"+String(buttonName).toLowerCase()+"_";for (var q=0;q<win.childNodes[0].childNodes[(_isIE?4:3)].childNodes.length;q++) {var buttonTemp = win.childNodes[0].childNodes[(_isIE?4:3)].childNodes[q];if (String(buttonTemp.className).search(buttonStyle) != -1) {buttonObj = buttonTemp}};return buttonObj};this._engineAddUserButton = function(win, buttonName, buttonPos) {if (isNaN(buttonPos)) buttonPos = 0;var button = document.createElement("DIV");button.className = "dhtmlx_wins_btns_button dhtmlx_button_"+buttonName+"_default";var buttonPoly = win.childNodes[0].childNodes[(_isIE?4:3)];buttonPos = buttonPoly.childNodes.length - buttonPos;if (buttonPos < 0)buttonPos = 0;if (buttonPos >= buttonPoly.childNodes.length){buttonPoly.appendChild(button)}else {buttonPoly.insertBefore(button, buttonPoly.childNodes[buttonPos])};this._engineRedrawWindowTitle(win);return button};this._engineGetWindowParkedHeight = function(win) {return this._engineSkinParams[this.skin]["hh"]+1};this._engineDoOnWindowParkDown = function(win) {win.childNodes[0].childNodes[(_isIE?6:5)].style.display = (win._noHeader==true?"":"none");win.childNodes[0].childNodes[(_isIE?7:6)].style.display = "";win.childNodes[0].childNodes[(_isIE?8:7)].style.display = "";win.childNodes[0].childNodes[(_isIE?9:8)].style.display = ""};this._engineDoOnWindowParkUp = function(win) {win.childNodes[0].childNodes[(_isIE?6:5)].style.display = "none";win.childNodes[0].childNodes[(_isIE?7:6)].style.display = "none";win.childNodes[0].childNodes[(_isIE?8:7)].style.display = "none";win.childNodes[0].childNodes[(_isIE?9:8)].style.display = "none"};this._engineUpdateWindowIcon = function(win, icon) {win.childNodes[0].childNodes[(_isIE?1:0)].style.backgroundImage = "url('"+icon+"')"};this._engineAllowWindowResize = function(win, targetObj, mouseX, mouseY) {if (!targetObj.getAttribute)return;var sk = this._engineSkinParams[this.skin];var hh = (win._noHeader==true?win._hdrSize:this._engineSkinParams[this.skin]["hh"]);if (targetObj.getAttribute("winResL")!= null) {if (targetObj.getAttribute("winResL")== "yes") {if (mouseY >= hh){if (mouseY >= win.h - sk["lch"])return "corner_left";if (mouseY <= sk["lch"] && win._noHeader == true)return "corner_up_left";return "border_left"}}};if (targetObj.getAttribute("winResR")!= null) {if (targetObj.getAttribute("winResR")== "yes") {if (mouseY >= hh){if (mouseY >= win.h - sk["rch"])return "corner_right";if (mouseY <= sk["rch"] && win._noHeader == true)return "corner_up_right";return "border_right"}}};if (targetObj.getAttribute("winResT")!= null) {if (targetObj.getAttribute("winResT")== "yes" && win._noHeader == true) {if (mouseX <= sk["lcw"])return "corner_up_left";if (mouseX >= win.w - sk["rcw"])return "corner_up_right";return "border_top"}};if (targetObj.getAttribute("winResB")!= null) {if (targetObj.getAttribute("winResB")== "yes") {if (mouseX <= sk["lcw"])return "corner_left";if (mouseX >= win.w - sk["rcw"])return "corner_right";return "border_bottom"}};return null};this._engineAdjustWindowToContent = function(win, w, h) {var newW = w+win.w-win.dhxcont.clientWidth;var newH = h+win.h-win.dhxcont.clientHeight;win.setDimension(newW, newH)};this._engineRedrawSkin = function() {this.vp.className = "dhtmlx_winviewport dhtmlx_skin_"+this.skin+(this._r?" dhx_wins_rtl":"");var sk = this._engineSkinParams[this.skin];for (var a in this.wins){if (this.skin == "dhx_skyblue"){this.wins[a].dhxContGlobal.obj._offsetTop = (this.wins[a]._noHeader?sk["noh_t"]:null);this.wins[a].dhxContGlobal.obj._offsetWidth = -10;this.wins[a].dhxContGlobal.obj._offsetHeight = (this.wins[a]._noHeader?sk["noh_h"]:-5);this.wins[a].dhxContGlobal.obj._offsetLeft = 5;this.wins[a].dhxContGlobal.obj._offsetHeightSaved = -5}else {this.wins[a].dhxContGlobal.obj._offsetWidth = null;this.wins[a].dhxContGlobal.obj._offsetHeight = null;this.wins[a].dhxContGlobal.obj._offsetLeft = null;this.wins[a].dhxContGlobal.obj._offsetTop = null;this.wins[a].dhxContGlobal.obj._offsetHeightSaved = null};this.wins[a].skin = this.skin;this._restoreWindowIcons(this.wins[a]);this._engineRedrawWindowSize(this.wins[a])}};this._engineSwitchWindowProgress = function(win, state) {if (state == true){win.childNodes[0].childNodes[(_isIE?1:0)].style.display = "none";win.childNodes[0].childNodes[(_isIE?2:1)].style.display = ""}else {win.childNodes[0].childNodes[(_isIE?2:1)].style.display = "none";win.childNodes[0].childNodes[(_isIE?1:0)].style.display = ""}};this._engineSwitchWindowHeader = function(win, state) {if (!win._noHeader)win._noHeader = false;if (state != win._noHeader)return;win._noHeader = (state==true?false:true);win._hdrSize = 0;win.childNodes[0].childNodes[(_isIE?5:4)].className = "dhtmlx_wins_body_inner"+(win._noHeader?" dhtmlx_wins_no_header":"");win.childNodes[0].childNodes[(_isIE?6:5)].style.display = (win._noHeader?"":"none");win.childNodes[0].childNodes[(_isIE?1:0)].style.display = (win._noHeader?"none":"");win.childNodes[0].childNodes[(_isIE?3:2)].style.display = (win._noHeader?"none":"");win.childNodes[0].childNodes[(_isIE?4:3)].style.display = (win._noHeader?"none":"");var sk = this._engineSkinParams[this.skin];if (win._noHeader){win.dhxContGlobal.obj._offsetHeightSaved = win.dhxContGlobal.obj._offsetHeight;win.dhxContGlobal.obj._offsetHeight = sk["noh_h"];win.dhxContGlobal.obj._offsetTop = sk["noh_t"]}else {win.dhxContGlobal.obj._offsetHeight = win.dhxContGlobal.obj._offsetHeightSaved;win.dhxContGlobal.obj._offsetTop = null};this._engineRedrawWindowSize(win)};this._engineGetWindowHeaderState = function(win) {return (win._noHeader?true:false)};this._engineGetWindowLabel = function(win) {return win.childNodes[0].childNodes[(_isIE?3:2)]};this._engineRedrawWindowTitle = function(win) {if (win._noHeader!==true){var p2 = win.childNodes[0].childNodes[(_isIE?1:0)].offsetWidth;var p3 = win.childNodes[0].childNodes[(_isIE?4:3)].offsetWidth;var newW = win.offsetWidth-p2-p3-24;if (newW < 0)newW = "100%";else newW += "px";win.childNodes[0].childNodes[(_isIE?3:2)].style.width = newW}}};(function(){dhtmlx.extend_api("dhtmlXWindows",{_init:function(obj){return []},
 _patch:function(obj){obj.old_createWindow=obj.createWindow;obj.createWindow=function(obj){if (arguments.length>1)return this.old_createWindow.apply(this,arguments);var res = this.old_createWindow(obj.id,obj.x,obj.y,obj.width,obj.height);res.allowMoveA=function(mode){if (mode)this.allowMove();else this.denyMove()};res.allowParkA=function(mode){if (mode)this.allowPark();else this.denyPark()};res.allowResizeA=function(mode){if (mode)this.allowResize();else this.denyResize()};for (var a in obj){if (map[a])res[map[a]](obj[a]);else if (a.indexOf("on")==0){res.attachEvent(a,obj[a])}};return res}},
 animation:"setEffect",
 image_path:"setImagePath",
 skin:"setSkin",
 viewport:"_viewport",
 wins:"_wins"
 },{_viewport:function(data){if (data.object){this.enableAutoViewport(false);this.attachViewportTo(data.object)}else {this.enableAutoViewport(false);this.setViewport(data.left, data.top, data.width, data.height, data.parent)}},
 _wins:function(arr){for (var q=0;q<arr.length;q++){var win = arr[q];this.createWindow(win.id, win.left, win.top, win.width, win.height);if (win.text)this.window(win.id).setText(win.text);if (win.keep_in_viewport)this.window(win.id).keepInViewport(true);if (win.deny_resize)this.window(win.id).denyResize();if (win.deny_park)this.window(win.id).denyPark();if (win.deny_move)this.window(win.id).denyMove()}}});var map={move:"allowMoveA",
 park:"allowParkA",
 resize:"allowResizeA",
 center:"center",
 modal:"setModal",
 caption:"setText",
 header:"showHeader"
 }})();function dhtmlXContainer(obj) {var that = this;this.obj = obj;this.dhxcont = null;this.setContent = function(data) {this.dhxcont = data;this.dhxcont.innerHTML = "<div id='dhxMainCont' style='position: relative;left: 0px;top: 0px;overflow: hidden;'></div>"+
 "<div id='dhxContBlocker' class='dhxcont_content_blocker' style='display: none;'></div>";this.dhxcont.mainCont = this.dhxcont.childNodes[0];this.obj.dhxcont = this.dhxcont};this.obj._genStr = function(w) {var s = "";var z = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";for (var q=0;q<w;q++){s = s + z.charAt(Math.round(Math.random() * z.length))};return s};this.obj.setMinContentSize = function(w, h) {this._minDataSizeW = w;this._minDataSizeH = h};this.obj.moveContentTo = function(cont) {var pref = null;if (this.grid)pref = "grid";if (this.tree)pref = "tree";if (this.tabbar)pref = "tabbar";if (this.folders)pref = "folders";if (this.layout)pref = "layout";if (pref != null){if (pref == "layout" && this._isCell && cont._isWindow){var aDim = this.layout._defineWindowMinDimension(this, true);var bDim = cont.getDimension();cont.setDimension((aDim[1]>bDim[0]?aDim[1]:null), (aDim[2]>bDim[1]?aDim[2]:null))};if (pref == "tabbar" && cont._isCell)cont.hideHeader();cont.attachObject(this[pref+"Id"]);cont[pref] = this[pref];cont[pref+"Id"] = this[pref+"Id"];cont[pref+"Obj"] = this[pref+"Obj"];if (pref == "layout"){cont.layout._baseWFix = -2;cont.layout._baseHFix = -2;if (cont._isWindow)cont.attachEvent("_onBeforeTryResize", cont.layout._defineWindowMinDimension)};this[pref] = null;this[pref+"Id"] = null;this[pref+"Obj"] = null;if (pref == "tabbar" && this._isCell)this.showHeader()};if (this.menu != null){cont.dhxcont.insertBefore(document.getElementById(this.menuId), cont.dhxcont.childNodes[0]);cont.menu = this.menu;cont.menuId = this.menuId;cont.menuHeight = this.menuHeight;this.menu = null;this.menuId = null;this.menuHeight = null;if (this._doOnAttachMenu)this._doOnAttachMenu("unload");if (cont._doOnAttachMenu)cont._doOnAttachMenu("move")};if (this.toolbar != null){cont.dhxcont.insertBefore(document.getElementById(this.toolbarId), cont.dhxcont.childNodes[(cont.menu != null?1:0)]);cont.toolbar = this.toolbar;cont.toolbarId = this.toolbarId;cont.toolbarHeight = this.toolbarHeight;this.toolbar = null;this.toolbarId = null;this.toolbarHeight = null;if (this._doOnAttachToolbar)this._doOnAttachToolbar("unload");if (cont._doOnAttachToolbar)cont._doOnAttachToolbar("move")};if (this.sb != null){cont.dhxcont.insertBefore(document.getElementById(this.sbId), cont.dhxcont.childNodes[cont.dhxcont.childNodes.length-1]);cont.sb = this.sb;cont.sbId = this.sbId;cont.sbHeight = this.sbHeight;this.sb = null;this.sbId = null;this.sbHeight = null;if (this._doOnAttachToolbar)this._doOnAttachToolbar("unload");if (cont._doOnAttachToolbar)cont._doOnAttachToolbar("move")};var objA = this.dhxcont.childNodes[0];var objB = cont.dhxcont.childNodes[0];while (objA.childNodes.length > 0)objB.appendChild(objA.childNodes[0]);cont.updateNestedObjects()};this.obj.adjustContent = function(parentObj, offsetTop, marginTop, notCalcWidth, offsetBottom) {this.dhxcont.style.left = (this._offsetLeft||0)+"px";this.dhxcont.style.top = (this._offsetTop||0)+offsetTop+"px";var cw = parentObj.clientWidth+(this._offsetWidth||0);if (notCalcWidth !== true)this.dhxcont.style.width = Math.max(0, cw)+"px";if (notCalcWidth !== true)if (this.dhxcont.offsetWidth > cw)this.dhxcont.style.width = Math.max(0, cw*2-this.dhxcont.offsetWidth)+"px";var ch = parentObj.clientHeight+(this._offsetHeight||0);this.dhxcont.style.height = Math.max(0, ch-offsetTop)+(marginTop!=null?marginTop:0)+"px";if (this.dhxcont.offsetHeight > ch - offsetTop)this.dhxcont.style.height = Math.max(0, (ch-offsetTop)*2-this.dhxcont.offsetHeight)+"px";if (offsetBottom)if (!isNaN(offsetBottom)) this.dhxcont.style.height = Math.max(0, parseInt(this.dhxcont.style.height)-offsetBottom)+"px";if (this._minDataSizeH != null){if (parseInt(this.dhxcont.style.height)< this._minDataSizeH) this.dhxcont.style.height = this._minDataSizeH+"px"};if (this._minDataSizeW != null){if (parseInt(this.dhxcont.style.width)< this._minDataSizeW) this.dhxcont.style.width = this._minDataSizeW+"px"};if (notCalcWidth !== true){this.dhxcont.mainCont.style.width = this.dhxcont.clientWidth+"px";if (this.dhxcont.mainCont.offsetWidth > this.dhxcont.clientWidth)this.dhxcont.mainCont.style.width = Math.max(0, this.dhxcont.clientWidth*2-this.dhxcont.mainCont.offsetWidth)+"px"};var menuOffset = (this.menu!=null?(!this.menuHidden?this.menuHeight:0):0);var toolbarOffset = (this.toolbar!=null?(!this.toolbarHidden?this.toolbarHeight:0):0);var statusOffset = (this.sb!=null?(!this.sbHidden?this.sbHeight:0):0);this.dhxcont.mainCont.style.height = this.dhxcont.clientHeight+"px";if (this.dhxcont.mainCont.offsetHeight > this.dhxcont.clientHeight)this.dhxcont.mainCont.style.height = Math.max(0, this.dhxcont.clientHeight*2-this.dhxcont.mainCont.offsetHeight)+"px";this.dhxcont.mainCont.style.height = Math.max(0, parseInt(this.dhxcont.mainCont.style.height)-menuOffset-toolbarOffset-statusOffset)+"px"};this.obj.coverBlocker = function() {return this.dhxcont.childNodes[this.dhxcont.childNodes.length-1]};this.obj.showCoverBlocker = function() {this.coverBlocker().style.display = ""};this.obj.hideCoverBlocker = function() {this.coverBlocker().style.display = "none"};this.obj.updateNestedObjects = function() {if (this.grid){this.grid.setSizes()};if (this.tabbar){this.tabbar.adjustOuterSize()};if (this.folders){this.folders.setSizes()};if (this.editor){if (!_isIE)this.editor._prepareContent(true);this.editor.setSizes()};if (this.layout){this.layoutObj.style.width = this.dhxcont.mainCont.style.width;this.layoutObj.style.height = this.dhxcont.mainCont.style.height;if (this._isAcc && this.skin == "dhx_skyblue"){this.layoutObj.style.width = parseInt(this.dhxcont.mainCont.style.width)+2+"px";this.layoutObj.style.height = parseInt(this.dhxcont.mainCont.style.height)+2+"px"};this.layout.setSizes()};if (this.accordion != null){this.accordionObj.style.width = parseInt(this.dhxcont.mainCont.style.width)+2+"px";this.accordionObj.style.height = parseInt(this.dhxcont.mainCont.style.height)+2+"px";this.accordion.setSizes()};if (this.dockedCell){this.dockedCell.updateNestedObjects()}};this.obj.attachStatusBar = function() {var sbObj = document.createElement("DIV");if (this._isCell){sbObj.className = "dhxcont_sb_container_layoutcell"}else {sbObj.className = "dhxcont_sb_container"};sbObj.id = "sbobj_"+this._genStr(12);sbObj.innerHTML = "<div class='dhxcont_statusbar'></div>";this.dhxcont.insertBefore(sbObj, this.dhxcont.childNodes[this.dhxcont.childNodes.length-1]);sbObj.setText = function(text) {this.childNodes[0].innerHTML = text};sbObj.getText = function() {return this.childNodes[0].innerHTML};sbObj.onselectstart = function(e) {e=e||event;e.returnValue=false;return false};this.sb = sbObj;this.sbHeight = sbObj.offsetHeight;this.sbId = sbObj.id;if (this._doOnAttachStatusBar)this._doOnAttachStatusBar("init");this.adjust();return this.sb};this.obj.detachStatusBar = function() {if (!this.sb)return;this.sb.setText = null;this.sb.getText = null;this.sb.onselectstart = null;this.sb.parentNode.removeChild(this.sb);this.sb = null;this.sbHeight = null;this.sbId = null;if (this._doOnAttachStatusBar)this._doOnAttachStatusBar("unload")};this.obj.attachMenu = function() {var menuObj = document.createElement("DIV");menuObj.style.position = "relative";menuObj.style.overflow = "hidden";menuObj.id = "dhxmenu_"+this._genStr(12);this.dhxcont.insertBefore(menuObj, this.dhxcont.childNodes[0]);this.menu = new dhtmlXMenuObject(menuObj.id, this.skin);this.menuHeight = menuObj.offsetHeight;this.menuId = menuObj.id;if (this._doOnAttachMenu)this._doOnAttachMenu("init");this.adjust();return this.menu};this.obj.detachMenu = function() {if (!this.menu)return;var menuObj = document.getElementById(this.menuId);this.menu.unload();this.menu = null;this.menuId = null;this.menuHeight = null;menuObj.parentNode.removeChild(menuObj);menuObj = null;if (this._doOnAttachMenu)this._doOnAttachMenu("unload")};this.obj.attachToolbar = function() {var toolbarObj = document.createElement("DIV");toolbarObj.style.position = "relative";toolbarObj.style.overflow = "hidden";toolbarObj.id = "dhxtoolbar_"+this._genStr(12);this.dhxcont.insertBefore(toolbarObj, this.dhxcont.childNodes[(this.menu!=null?1:0)]);this.toolbar = new dhtmlXToolbarObject(toolbarObj.id, this.skin);this.toolbarHeight = toolbarObj.offsetHeight+(this._isLayout&&this.skin=="dhx_skyblue"?2:0);this.toolbarId = toolbarObj.id;if (this._doOnAttachToolbar)this._doOnAttachToolbar("init");this.adjust();return this.toolbar};this.obj.detachToolbar = function() {if (!this.toolbar)return;var toolbarObj = document.getElementById(this.toolbarId);this.toolbar.unload();this.toolbar = null;this.toolbarId = null;this.toolbarHeight = null;toolbarObj.parentNode.removeChild(toolbarObj);toolbarObj = null;if (this._doOnAttachToolbar)this._doOnAttachToolbar("unload")};this.obj.attachGrid = function() {if (this._isWindow && this.skin == "dhx_skyblue"){this.dhxcont.mainCont.style.border = "#a4bed4 1px solid";this._redraw()};var obj = document.createElement("DIV");obj.id = "dhxGridObj_"+this._genStr(12);obj.style.width = "100%";obj.style.height = "100%";obj.cmp = "grid";document.body.appendChild(obj);this.attachObject(obj.id);this.grid = new dhtmlXGridObject(obj.id);this.grid.setSkin(this.skin);this.grid.entBox.style.border = "0px solid white";this.grid._sizeFix=0;this.gridId = obj.id;this.gridObj = obj;return this.grid};this.obj.attachScheduler = function(day,mode) {var obj = document.createElement("DIV");obj.innerHTML='<div id="scheduler_here" class="dhx_cal_container" style="width:100%;height:100%;"><div class="dhx_cal_navline"><div class="dhx_cal_prev_button">&nbsp;</div><div class="dhx_cal_next_button">&nbsp;</div><div class="dhx_cal_today_button"></div><div class="dhx_cal_date"></div><div class="dhx_cal_tab" name="day_tab" style="right:204px;"></div><div class="dhx_cal_tab" name="week_tab" style="right:140px;"></div><div class="dhx_cal_tab" name="month_tab" style="right:76px;"></div></div><div class="dhx_cal_header"></div><div class="dhx_cal_data"></div></div>';document.body.appendChild(obj.firstChild);this.attachObject("scheduler_here");this.grid = scheduler;scheduler.setSizes = scheduler.update_view;scheduler.destructor=function(){};scheduler.init("scheduler_here",day,mode);return this.grid};this.obj.attachTree = function(rootId) {if (this._isWindow && this.skin == "dhx_skyblue"){this.dhxcont.mainCont.style.border = "#a4bed4 1px solid";this._redraw()};var obj = document.createElement("DIV");obj.id = "dhxTreeObj_"+this._genStr(12);obj.style.width = "100%";obj.style.height = "100%";obj.cmp = "tree";document.body.appendChild(obj);this.attachObject(obj.id);this.tree = new dhtmlXTreeObject(obj.id, "100%", "100%", (rootId||0));this.tree.setSkin(this.skin);this.tree.allTree.childNodes[0].style.marginTop = "2px";this.tree.allTree.childNodes[0].style.marginBottom = "2px";this.treeId = obj.id;this.treeObj = obj;return this.tree};this.obj.attachTabbar = function(mode) {if (this._isWindow && this.skin == "dhx_skyblue"){this.dhxcont.style.border = "none";this.setDimension(this.w, this.h)};var obj = document.createElement("DIV");obj.id = "dhxTabbarObj_"+this._genStr(12);obj.style.width = "100%";obj.style.height = "100%";obj.style.overflow = "hidden";obj.cmp = "tabbar";document.body.appendChild(obj);this.attachObject(obj.id);if (this.className == "dhtmlxLayoutSinglePoly"){this.hideHeader()};this.tabbar = new dhtmlXTabBar(obj.id, mode||"top", 20);if (!this._isWindow)this.tabbar._s.expand = true;this.tabbar.setSkin(this.skin);this.tabbar.adjustOuterSize();this.tabbarId = obj.id;this.tabbarObj = obj;return this.tabbar};this.obj.attachFolders = function() {if (this._isWindow && this.skin == "dhx_skyblue"){this.dhxcont.mainCont.style.border = "#a4bed4 1px solid";this._redraw()};var obj = document.createElement("DIV");obj.id = "dhxFoldersObj_"+this._genStr(12);obj.style.width = "100%";obj.style.height = "100%";obj.style.overflow = "hidden";obj.cmp = "folders";document.body.appendChild(obj);this.attachObject(obj.id);this.folders = new dhtmlxFolders(obj.id);this.folders.setSizes();this.foldersId = obj.id;this.foldersObj = obj;return this.folders};this.obj.attachAccordion = function() {if (this._isWindow && this.skin == "dhx_skyblue"){this.dhxcont.mainCont.style.border = "#a4bed4 1px solid";this._redraw()};var obj = document.createElement("DIV");obj.id = "dhxAccordionObj_"+this._genStr(12);obj.style.left = "-1px";obj.style.top = "-1px";obj.style.width = parseInt(this.dhxcont.mainCont.style.width)+2+"px";obj.style.height = parseInt(this.dhxcont.mainCont.style.height)+2+"px";obj.style.position = "relative";obj.cmp = "accordion";document.body.appendChild(obj);this.attachObject(obj.id);this.accordion = new dhtmlXAccordion(obj.id, this.skin);this.accordion.setSizes();this.accordionId = obj.id;this.accordionObj = obj;return this.accordion};this.obj.attachLayout = function(view, skin) {if (this._isCell && this.skin == "dhx_skyblue"){this.hideHeader();this.dhxcont.style.border = "0px solid white";this.adjustContent(this.childNodes[0], 0)};var obj = document.createElement("DIV");obj.id = "dhxLayoutObj_"+this._genStr(12);obj.style.overflow = "hidden";obj.style.position = "absolute";obj.style.left = "0px";obj.style.top = "0px";obj.style.width = parseInt(this.dhxcont.mainCont.style.width)+"px";obj.style.height = parseInt(this.dhxcont.mainCont.style.height)+"px";if (this._isAcc && this.skin == "dhx_skyblue"){obj.style.left = "-1px";obj.style.top = "-1px";obj.style.width = parseInt(this.dhxcont.mainCont.style.width)+2+"px";obj.style.height = parseInt(this.dhxcont.mainCont.style.height)+2+"px"};obj.dhxContExists = true;obj.cmp = "layout";document.body.appendChild(obj);this.attachObject(obj.id);this.layout = new dhtmlXLayoutObject(obj, view, this.skin);if (this._isWindow)this.attachEvent("_onBeforeTryResize", this.layout._defineWindowMinDimension);this.layoutId = obj.id;this.layoutObj = obj;return this.layout};this.obj.attachEditor = function(skin) {if (this._isWindow && this.skin == "dhx_skyblue"){this.dhxcont.mainCont.style.border = "#a4bed4 1px solid";this._redraw()};var obj = document.createElement("DIV");obj.id = "dhxEditorObj_"+this._genStr(12);obj.style.position = "relative";obj.style.display = "none";obj.style.overflow = "hidden";obj.style.width = "100%";obj.style.height = "100%";obj.cmp = "editor";document.body.appendChild(obj);this.attachObject(obj.id);this.editor = new dhtmlXEditor(obj.id, this.skin);this.editorId = obj.id;this.editorObj = obj;return this.editor};this.obj.attachObject = function(obj, autoSize) {if (typeof(obj)== "string") obj = document.getElementById(obj);if (autoSize){obj.style.visibility = "hidden";obj.style.display = "";var objW = obj.offsetWidth;var objH = obj.offsetHeight};this._attachContent("obj", obj);if (autoSize && this._isWindow){obj.style.visibility = "visible";this._adjustToContent(objW, objH)}};this.obj.detachObject = function(remove) {var pref = null;if (this.tree)pref = "tree";if (this.grid)pref = "grid";if (this.layout)pref = "layout";if (this.tabbar)pref = "tabbar";if (this.accordion)pref = "accordion";if (this.folders)pref = "folders";if (pref != null){var objHandler = null;var objLink = null;if (remove == true){if (this[pref].unload)this[pref].unload();if (this[pref].destructor)this[pref].destructor();while (this[pref+"Obj"].childNodes.length > 0)this[pref+"Obj"].removeChild(this[pref+"Obj"].childNodes[0])}else {document.body.appendChild(this[pref+"Obj"]);this[pref+"Obj"].style.display = "none";objHandler = this[pref];objLink = this[pref+"Obj"]};this[pref] = null;this[pref+"Id"] = null;this[pref+"Obj"] = null;return new Array(objHandler, objLink)};var objA = this.dhxcont.childNodes[0];while (objA.childNodes.length > 0){if (remove == true){objA.removeChild(objA.childNodes[0])}else {var obj = objA.childNodes[0];document.body.appendChild(obj);obj.style.display = "none"}}};this.obj.appendObject = function(obj) {if (typeof(obj)== "string") {obj = document.getElementById(obj)};this._attachContent("obj", obj, true)};this.obj.attachHTMLString = function(str) {this._attachContent("str", str);var z=str.match(/<script[^>]*>[^\f]*?<\/script>/g)||[];for (var i=0;i<z.length;i++){var s=z[i].replace(/<([\/]{0,1})script[^>]*>/g,"")
 if (window.execScript)window.execScript(s);else window.eval(s)}};this.obj.attachURL = function(url, ajax) {this._attachContent((ajax==true?"urlajax":"url"), url, false)};this.obj.adjust = function() {if (this.skin == "dhx_skyblue"){if (this.menu){if (this._isWindow || this._isLayout){this.menu._topLevelOffsetLeft = 0;document.getElementById(this.menuId).style.height = "26px";this.menuHeight = document.getElementById(this.menuId).offsetHeight;if (this._doOnAttachMenu)this._doOnAttachMenu("show")};if (this._isCell){document.getElementById(this.menuId).className += " in_layoutcell";this.menuHeight = 25};if (this._isAcc){document.getElementById(this.menuId).className += " in_acccell";this.menuHeight = 25};if (this._doOnAttachMenu)this._doOnAttachMenu("adjust")};if (this.toolbar){if (this._isWindow || this._isLayout){document.getElementById(this.toolbarId).style.height = "29px";this.toolbarHeight = document.getElementById(this.toolbarId).offsetHeight;if (this._doOnAttachToolbar)this._doOnAttachToolbar("show")};if (this._isCell){document.getElementById(this.toolbarId).className += " in_layoutcell"};if (this._isAcc){document.getElementById(this.toolbarId).className += " in_acccell"}}}};this.obj._attachContent = function(type, obj, append) {if (append !== true){while (that.dhxcont.mainCont.childNodes.length > 0){that.dhxcont.mainCont.removeChild(that.dhxcont.mainCont.childNodes[0])}};if (type == "url"){if (this._isWindow && obj.cmp == null && this.skin == "dhx_skyblue"){this.dhxcont.mainCont.style.border = "#a4bed4 1px solid";this._redraw()};var fr = document.createElement("IFRAME");fr.frameBorder = 0;fr.border = 0;fr.style.width = "100%";fr.style.height = "100%";fr.setAttribute("src","javascript:false;");that.dhxcont.mainCont.appendChild(fr);fr.src = obj;this._frame = fr;if (this._doOnAttachURL)this._doOnAttachURL(true)}else if (type == "urlajax"){if (this._isWindow && obj.cmp == null && this.skin == "dhx_skyblue"){this.dhxcont.mainCont.style.border = "#a4bed4 1px solid";this.dhxcont.mainCont.style.backgroundColor = "#FFFFFF";this._redraw()};var t = this;var xmlParser = function(){t.attachHTMLString(this.xmlDoc.responseText,this);if (t._doOnAttachURL)t._doOnAttachURL(false);this.destructor()};var xmlLoader = new dtmlXMLLoaderObject(xmlParser, window);xmlLoader.dhxWindowObject = this;xmlLoader.loadXML(obj)}else if (type == "obj"){if (this._isWindow && obj.cmp == null && this.skin == "dhx_skyblue"){this.dhxcont.mainCont.style.border = "#a4bed4 1px solid";this.dhxcont.mainCont.style.backgroundColor = "#FFFFFF";this._redraw()};that.dhxcont._frame = null;that.dhxcont.mainCont.appendChild(obj);that.dhxcont.mainCont.style.overflow = (append===true?"auto":"hidden");obj.style.display = ""}else if (type == "str"){if (this._isWindow && obj.cmp == null && this.skin == "dhx_skyblue"){this.dhxcont.mainCont.style.border = "#a4bed4 1px solid";this.dhxcont.mainCont.style.backgroundColor = "#FFFFFF";this._redraw()};that.dhxcont._frame = null;that.dhxcont.mainCont.innerHTML = obj}};this.obj.showMenu = function() {if (!(this.menu && this.menuId)) return;if (document.getElementById(this.menuId).style.display != "none") return;this.menuHidden = false;if (this._doOnAttachMenu)this._doOnAttachMenu("show");document.getElementById(this.menuId).style.display = ""};this.obj.hideMenu = function() {if (!(this.menu && this.menuId)) return;if (document.getElementById(this.menuId).style.display == "none") return;document.getElementById(this.menuId).style.display = "none";this.menuHidden = true;if (this._doOnAttachMenu)this._doOnAttachMenu("hide")};this.obj.showToolbar = function() {if (!(this.toolbar && this.toolbarId)) return;if (document.getElementById(this.toolbarId).style.display != "none") return;this.toolbarHidden = false;if (this._doOnAttachToolbar)this._doOnAttachToolbar("show");document.getElementById(this.toolbarId).style.display = ""};this.obj.hideToolbar = function() {if (!(this.toolbar && this.toolbarId)) return;if (document.getElementById(this.toolbarId).style.display == "none") return;this.toolbarHidden = true;document.getElementById(this.toolbarId).style.display = "none";if (this._doOnAttachToolbar)this._doOnAttachToolbar("hide")};this.obj.showStatusBar = function() {if (!(this.sb && this.sbId)) return;if (document.getElementById(this.sbId).style.display != "none") return;this.sbHidden = false;if (this._doOnAttachStatusBar)this._doOnAttachStatusBar("show");document.getElementById(this.sbId).style.display = ""};this.obj.hideStatusBar = function() {if (!(this.sb && this.sbId)) return;if (document.getElementById(this.sbId).style.display == "none") return;this.sbHidden = true;document.getElementById(this.sbId).style.display = "none";if (this._doOnAttachStatusBar)this._doOnAttachStatusBar("hide")};this.obj._dhxContDestruct = function() {this.detachMenu();this.detachToolbar();this.detachStatusBar();this.detachObject(true);if (this.layout)this.layout.unlaod();if (this.accordion)this.accordion.unlaod();if (this.grid)this.grid.destructor();if (this.tree)this.tree.destructor();if (this.tabbar)this.tabbar.destructor();this.layout = null;this.accordion = null;this.grid = null;this.tree = null;this.tabbar = null;this.adjust = null;this._genStr = null;this.setMinContentSize = null;this.moveContentTo = null;this.adjustContent = null;this.coverBlocker = null;this.showCoverBlocker = null;this.hideCoverBlocker = null;this.updateNestedObjects = null;this.attachStatusBar = null;this.detachStatusBar = null;this.attachMenu = null;this.detachMenu = null;this.attachToolbar = null;this.detachToolbar = null;this.attachGrid = this.attachTree = this.attachTabbar = this.attachFolders = this.attachAccordion = this.attachLayout = this.attachEditor = this.attachObject = this.detachObject = this.appendObject = this.attachHTMLString = this.attachURL = this._attachContent = this.attachScheduler = null;this.showMenu = null;this.hideMenu = null;this.showToolbar = null;this.hideToolbar = null;this.showStatusBar = null;this.hideStatusBar = null;while (this.dhxcont.mainCont.childNodes.length > 0)this.dhxcont.mainCont.removeChild(this.dhxcont.mainCont.childNodes[0]);this.dhxcont.mainCont.innerHTML = "";this.dhxcont.mainCont = null;try {delete this.dhxcont["mainCont"]}catch(e){};while (this.dhxcont.childNodes.length > 0)this.dhxcont.removeChild(this.dhxcont.childNodes[0]);this.dhxcont.innerHTML = "";this.dhxcont = null;try {delete this["dhxcont"]}catch(e){}}};function dhtmlXComboFromSelect(parent,size){if (typeof(parent)=="string")
 parent=document.getElementById(parent);size=size||parent.getAttribute("width")||(window.getComputedStyle?window.getComputedStyle(parent,null)["width"]:(parent.currentStyle?parent.currentStyle["width"]:0));if ((!size)||(size=="auto"))
 size=parent.offsetWidth||100;var z=document.createElement("SPAN");if(parent.style.direction=="rtl")z.style.direction = "rtl";parent.parentNode.insertBefore(z,parent);parent.style.display='none';var s_type = parent.getAttribute('opt_type');var w= new dhtmlXCombo(z,parent.name,size,s_type,parent.tabIndex);var x=new Array();var sel=0;for (var i=0;i<parent.options.length;i++){if (parent.options[i].selected)sel=i;var label=parent.options[i].innerHTML;var val=parent.options[i].getAttribute("value");if ((typeof(val)=="undefined")||(val===null)) val=label;x[i]={value:val,text:label,img_src:parent.options[i].getAttribute("img_src")}};w.addOption(x);parent.parentNode.removeChild(parent);w.selectOption(sel,null,true);if (parent.onchange)w.attachEvent("onChange",parent.onchange);return w};var dhtmlXCombo_optionTypes = [];function dhtmlXCombo(parent,name,width,optionType,tabIndex){if (typeof(parent)=="string")
 parent=document.getElementById(parent);this.dhx_Event();this.optionType = (optionType != window.undefined && dhtmlXCombo_optionTypes[optionType]) ? optionType : 'default';this._optionObject = dhtmlXCombo_optionTypes[this.optionType];this._disabled = false;if(parent.style.direction == "rtl")this.rtl = true;else this.rtl = false;if (!window.dhx_glbSelectAr){window.dhx_glbSelectAr=new Array();window.dhx_openedSelect=null;window.dhx_SelectId=1;dhtmlxEvent(document.body,"click",this.closeAll);dhtmlxEvent(document.body,"keydown",function(e){try {if ((e||event).keyCode==9) window.dhx_glbSelectAr[0].closeAll()}catch(e) {};return true})};if (parent.tagName=="SELECT")return dhtmlXComboFromSelect(parent);else
 this._createSelf(parent,name,width,tabIndex);dhx_glbSelectAr.push(this)};dhtmlXCombo.prototype.setSize = function(new_size){this.DOMlist.style.width=new_size+"px";if (this.DOMlistF)this.DOMlistF.style.width=new_size+"px";this.DOMelem.style.width=new_size+"px";this.DOMelem_input.style.width = Math.max(0,(new_size-19))+'px'};dhtmlXCombo.prototype.enableFilteringMode = function(mode,url,cache,autosubload){this._filter=convertStringToBoolean(mode);if (url){this._xml=url;this._autoxml=convertStringToBoolean(autosubload)};if (convertStringToBoolean(cache)) this._xmlCache=[]};dhtmlXCombo.prototype.setFilteringParam=function(name,value){if (!this._prs)this._prs=[];this._prs.push([name,value])};dhtmlXCombo.prototype.disable = function(mode){var z=convertStringToBoolean(mode);if (this._disabled==z)return;this.DOMelem_input.disabled=z;this._disabled=z};dhtmlXCombo.prototype.readonly = function(mode,autosearch){this.DOMelem_input.readOnly=mode ? true : false;if(autosearch===false || mode===false){this.DOMelem.onkeyup=function(ev){}}else {var that = this;this.DOMelem.onkeyup=function(ev){ev=ev||window.event;if (ev.keyCode!=9)ev.cancelBubble=true;if((ev.keyCode >= 48 && ev.keyCode <= 57)||(ev.keyCode >= 65 && ev.keyCode <= 90)){for(var i=0;i<that.optionsArr.length;i++){var text = that.optionsArr[i].text;if(text.toString().toUpperCase().indexOf(String.fromCharCode(ev.keyCode)) == 0){that.selectOption(i);break}};ev.cancelBubble=true}}}};dhtmlXCombo.prototype.getOption = function(value)
 {for(var i=0;i<this.optionsArr.length;i++)if(this.optionsArr[i].value==value)return this.optionsArr[i];return null};dhtmlXCombo.prototype.getOptionByLabel = function(value)
 {for(var i=0;i<this.optionsArr.length;i++)if(this.optionsArr[i].text==value || this.optionsArr[i]._ctext==value)return this.optionsArr[i];return null};dhtmlXCombo.prototype.getOptionByIndex = function(ind){return this.optionsArr[ind]};dhtmlXCombo.prototype.clearAll = function(all)
 {if (all)this.setComboText("");this.optionsArr=new Array();this.redrawOptions();if (all)this._confirmSelection()};dhtmlXCombo.prototype.deleteOption = function(value)
 {var ind=this.getIndexByValue(value);if(ind<0)return;if (this.optionsArr[ind]==this._selOption)this._selOption=null;this.optionsArr.splice(ind, 1);this.redrawOptions()};dhtmlXCombo.prototype.render=function(mode){this._skiprender=(!convertStringToBoolean(mode));this.redrawOptions()};dhtmlXCombo.prototype.updateOption = function(oldvalue, avalue, atext, acss)
 {var dOpt=this.getOption(oldvalue);if (typeof(avalue)!="object") avalue={text:atext,value:avalue,css:acss};dOpt.setValue(avalue);this.redrawOptions()};dhtmlXCombo.prototype.addOption = function(options)
 {if (!arguments[0].length || typeof(arguments[0])!="object")
 args = [arguments];else
 args = options;this.render(false);for (var i=0;i<args.length;i++){var attr = args[i];if (attr.length){attr.value = attr[0]||"";attr.text = attr[1]||"";attr.css = attr[2]||""};this._addOption(attr)};this.render(true)};dhtmlXCombo.prototype._addOption = function(attr)
 {dOpt = new this._optionObject();this.optionsArr.push(dOpt);dOpt.setValue.apply(dOpt,[attr]);this.redrawOptions()};dhtmlXCombo.prototype.getIndexByValue = function(val){for(var i=0;i<this.optionsArr.length;i++)if(this.optionsArr[i].value == val)return i;return -1};dhtmlXCombo.prototype.getSelectedValue = function(){return (this._selOption?this._selOption.value:null)};dhtmlXCombo.prototype.getComboText = function(){return this.DOMelem_input.value};dhtmlXCombo.prototype.setComboText = function(text){this.DOMelem_input.value=text};dhtmlXCombo.prototype.setComboValue = function(text){this.setComboText(text);for(var i=0;i<this.optionsArr.length;i++)if (this.optionsArr[i].data()[0]==text)
 return this.selectOption(i,null,true);this.DOMelem_hidden_input.value=text};dhtmlXCombo.prototype.getActualValue = function(){return this.DOMelem_hidden_input.value};dhtmlXCombo.prototype.getSelectedText = function(){return (this._selOption?this._selOption.text:"")};dhtmlXCombo.prototype.getSelectedIndex = function(){for(var i=0;i<this.optionsArr.length;i++)if(this.optionsArr[i] == this._selOption)return i;return -1};dhtmlXCombo.prototype.setName = function(name){this.DOMelem_hidden_input.name = name;this.DOMelem_hidden_input2 = name.replace(/(\]?)$/, "_new_value$1");this.name = name};dhtmlXCombo.prototype.show = function(mode){if (convertStringToBoolean(mode))
 this.DOMelem.style.display = "";else
 this.DOMelem.style.display = "none"};dhtmlXCombo.prototype.destructor = function()
 {var _sID = this._inID;this.DOMParent.removeChild(this.DOMelem);this.DOMlist.parentNode.removeChild(this.DOMlist);var s=dhx_glbSelectAr;this.DOMParent=this.DOMlist=this.DOMelem=0;this.DOMlist.combo=this.DOMelem.combo=0;for(var i=0;i<s.length;i++){if(s[i]._inID == _sID){s[i] = null;s.splice(i,1);return}}};dhtmlXCombo.prototype._createSelf = function(selParent, name, width, tab)
 {if (width.toString().indexOf("%")!=-1){var self = this;var resWidht=parseInt(width)/100;window.setInterval(function(){if (!selParent.parentNode)return;var ts=selParent.parentNode.offsetWidth*resWidht-2;if (ts<0)return;if (ts==self._lastTs)return;self.setSize(self._lastTs=ts)},500);var width=parseInt(selParent.offsetWidth)};var width=parseInt(width||100);this.ListPosition = "Bottom";this.DOMParent = selParent;this._inID = null;this.name = name;this._selOption = null;this.optionsArr = Array();var opt = new this._optionObject();opt.DrawHeader(this,name, width,tab);this.DOMlist = document.createElement("DIV");this.DOMlist.className = 'dhx_combo_list'+(this.rtl?"_rtl":"")+' '+(dhtmlx.skin?dhtmlx.skin+"_list":"");this.DOMlist.style.width=width-(_isIE?0:0)+"px";if (_isOpera || _isKHTML )this.DOMlist.style.overflow="auto";this.DOMlist.style.display = "none";document.body.insertBefore(this.DOMlist,document.body.firstChild);if (_isIE){this.DOMlistF = document.createElement("IFRAME");this.DOMlistF.style.border="0px";this.DOMlistF.className = 'dhx_combo_list';this.DOMlistF.style.width=width-(_isIE?0:0)+"px";this.DOMlistF.style.display = "none";this.DOMlistF.src="javascript:false;";document.body.insertBefore(this.DOMlistF,document.body.firstChild)};this.DOMlist.combo=this.DOMelem.combo=this;this.DOMelem_input.onkeydown = this._onKey;this.DOMelem_input.onkeypress = this._onKeyF;this.DOMelem_input.onblur = this._onBlur;this.DOMelem.onclick = this._toggleSelect;this.DOMlist.onclick = this._selectOption;this.DOMlist.onmousedown = function(){this._skipBlur=true};this.DOMlist.onkeydown = function(e){this.combo.DOMelem_input.focus();(e||event).cancelBubble=true;this.combo.DOMelem_input.onkeydown(e)
 };this.DOMlist.onmouseover = this._listOver};dhtmlXCombo.prototype._listOver = function(e)
 {e = e||event;e.cancelBubble = true;var node = (_isIE?event.srcElement:e.target);var that = this.combo;if ( node.parentNode == that.DOMlist ){if(that._selOption)that._selOption.deselect();if(that._tempSel)that._tempSel.deselect();var i=0;for (i;i<that.DOMlist.childNodes.length;i++){if (that.DOMlist.childNodes[i]==node)break};var z=that.optionsArr[i];that._tempSel=z;that._tempSel.select();if ((that._autoxml)&&((i+1)==that._lastLength)){that._fetchOptions(i+1,that._lasttext||"")}}};dhtmlXCombo.prototype._positList = function()
 {var pos=this.getPosition(this.DOMelem);if(this.ListPosition == 'Bottom'){this.DOMlist.style.top = pos[1]+this.DOMelem.offsetHeight-1+"px";this.DOMlist.style.left = pos[0]+"px"}else if(this.ListPosition == 'Top'){this.DOMlist.style.top = pos[1] - this.DOMlist.offsetHeight+"px";this.DOMlist.style.left = pos[0]+"px"}else{this.DOMlist.style.top = pos[1]+"px";this.DOMlist.style.left = pos[0]+this.DOMelem.offsetWidth+"px"}};dhtmlXCombo.prototype.getPosition = function(oNode,pNode){if (_isChrome){if(!pNode)var pNode = document.body
 
 var oCurrentNode=oNode;var iLeft=0;var iTop=0;while ((oCurrentNode)&&(oCurrentNode!=pNode)){iLeft+=oCurrentNode.offsetLeft-oCurrentNode.scrollLeft;iTop+=oCurrentNode.offsetTop-oCurrentNode.scrollTop;oCurrentNode=oCurrentNode.offsetParent};if (pNode == document.body ){if (_isIE && _isIE<8){if (document.documentElement.scrollTop)iTop+=document.documentElement.scrollTop;if (document.documentElement.scrollLeft)iLeft+=document.documentElement.scrollLeft}else
 if (!_isFF){iLeft+=document.body.offsetLeft;iTop+=document.body.offsetTop}};return new Array(iLeft,iTop)};var pos = getOffset(oNode);return [pos.left, pos.top]};dhtmlXCombo.prototype._correctSelection = function(){if (this.getComboText()!="")
 for (var i=0;i<this.optionsArr.length;i++)if (!this.optionsArr[i].isHidden()){return this.selectOption(i,true,false)};this.unSelectOption()};dhtmlXCombo.prototype.selectNext = function(step){var z=this.getSelectedIndex()+step;while (this.optionsArr[z]){if (!this.optionsArr[z].isHidden())
 return this.selectOption(z,false,false);z+=step}};dhtmlXCombo.prototype._onKeyF = function(e){var that=this.parentNode.combo;var ev=e||event;ev.cancelBubble=true;if (ev.keyCode=="13" || ev.keyCode=="9" ){that._confirmSelection();that.closeAll()}else
 if (ev.keyCode=="27" ){that._resetSelection();that.closeAll()}else that._activeMode=true;if (ev.keyCode=="13" || ev.keyCode=="27" ){that.callEvent("onKeyPressed",[ev.keyCode])
 return false};return true};dhtmlXCombo.prototype._onKey = function(e){var that=this.parentNode.combo;(e||event).cancelBubble=true;var ev=(e||event).keyCode;if (ev>15 && ev<19)return true;if (ev==27)return;if ((that.DOMlist.style.display!="block")&&(ev!="13")&&(ev!="9")&&((!that._filter)||(that._filterAny)))
 that.DOMelem.onclick(e||event);if ((ev!="13")&&(ev!="9")){window.setTimeout(function(){that._onKeyB(ev)},1);if (ev=="40" || ev=="38")return false}else if (ev==9){that.closeAll();(e||event).cancelBubble=false}};dhtmlXCombo.prototype._onKeyB = function(ev)
 {if (ev=="40"){var z=this.selectNext(1)}else if (ev=="38"){this.selectNext(-1)}else{this.callEvent("onKeyPressed",[ev])
 if (this._filter)return this.filterSelf((ev==8)||(ev==46));for(var i=0;i<this.optionsArr.length;i++)if (this.optionsArr[i].data()[1]==this.DOMelem_input.value){this.selectOption(i,false,false);return false};this.unSelectOption()};return true};dhtmlXCombo.prototype._onBlur = function()
 {var self = this.parentNode._self;window.setTimeout(function(){if (self.DOMlist._skipBlur)return !(self.DOMlist._skipBlur=false);self._confirmSelection();self.callEvent("onBlur",[])},100)
 
 };dhtmlXCombo.prototype.redrawOptions = function(){if (this._skiprender)return;for(var i=this.DOMlist.childNodes.length-1;i>=0;i--)this.DOMlist.removeChild(this.DOMlist.childNodes[i]);for(var i=0;i<this.optionsArr.length;i++)this.DOMlist.appendChild(this.optionsArr[i].render())};dhtmlXCombo.prototype.loadXML = function(url,afterCall){this._load=true;this.callEvent("onXLS",[]);if (this._prs)for (var i=0;i<this._prs.length;i++)url+=[getUrlSymbol(url),escape(this._prs[i][0]),"=",escape(this._prs[i][1])].join("");if ((this._xmlCache)&&(this._xmlCache[url])){this._fillFromXML(this,null,null,null,this._xmlCache[url]);if (afterCall)afterCall()}else{var xml=(new dtmlXMLLoaderObject(this._fillFromXML,this,true,true));if (afterCall)xml.waitCall=afterCall;xml._cPath=url;xml.loadXML(url)}};dhtmlXCombo.prototype.loadXMLString = function(astring){var xml=(new dtmlXMLLoaderObject(this._fillFromXML,this,true,true));xml.loadXMLString(astring)};dhtmlXCombo.prototype._fillFromXML = function(obj,b,c,d,xml){if (obj._xmlCache)obj._xmlCache[xml._cPath]=xml;var toptag=xml.getXMLTopNode("complete");if (toptag.tagName!="complete")return;var top=xml.doXPath("//complete");var options=xml.doXPath("//option");var add = false;obj.render(false);if ((!top[0])||(!top[0].getAttribute("add"))){obj.clearAll();obj._lastLength=options.length;if (obj._xml){if ((!options)|| (!options.length)) 
 obj.closeAll();else {if (obj._activeMode){obj._positList();obj.DOMlist.style.display="block";if (_isIE)obj._IEFix(true)}}}}else {obj._lastLength+=options.length;add = true};for (var i=0;i<options.length;i++){var attr = new Object();attr.text = options[i].firstChild?options[i].firstChild.nodeValue:"";for (var j=0;j<options[i].attributes.length;j++){var a = options[i].attributes[j];if (a)attr[a.nodeName] = a.nodeValue};obj._addOption(attr)};obj.render(add!=true || (!!options.length));if ((obj._load)&&(obj._load!==true))
 obj.loadXML(obj._load);else{obj._load=false;if ((!obj._lkmode)&&(!obj._filter))
 obj._correctSelection()};var selected=xml.doXPath("//option[@selected]");if (selected.length)obj.selectOption(obj.getIndexByValue(selected[0].getAttribute("value")),false,true);obj.callEvent("onXLE",[])};dhtmlXCombo.prototype.unSelectOption = function(){if (this._selOption)this._selOption.deselect();if(this._tempSel)this._tempSel.deselect();this._tempSel=this._selOption=null};dhtmlXCombo.prototype._confirmSelection = function(data,status){if(arguments.length==0){var z=this.getOptionByLabel(this.DOMelem_input.value);data = z?z.value:this.DOMelem_input.value;status = (z==null);if (data==this.getActualValue()) return};this.DOMelem_hidden_input.value=data;this.DOMelem_hidden_input2.value = (status?"true":"false");this.callEvent("onChange",[]);this._activeMode=false};dhtmlXCombo.prototype._resetSelection = function(data,status){var z=this.getOption(this.DOMelem_hidden_input.value);this.setComboValue(z?z.data()[0]:this.DOMelem_hidden_input.value)
 this.setComboText(z?z.data()[1]:this.DOMelem_hidden_input.value)
 };dhtmlXCombo.prototype.selectOption = function(ind,filter,conf){if (arguments.length<3)conf=true;this.unSelectOption();var z=this.optionsArr[ind];if (!z)return;this._selOption=z;this._selOption.select();var corr=this._selOption.content.offsetTop+this._selOption.content.offsetHeight-this.DOMlist.scrollTop-this.DOMlist.offsetHeight;if (corr>0)this.DOMlist.scrollTop+=corr;corr=this.DOMlist.scrollTop-this._selOption.content.offsetTop;if (corr>0)this.DOMlist.scrollTop-=corr;var data=this._selOption.data();if (conf){this.setComboText(data[1]);this._confirmSelection(data[0],false)};if ((this._autoxml)&&((ind+1)==this._lastLength))
 this._fetchOptions(ind+1,this._lasttext||"");if (filter){var text=this.getComboText();if (text!=data[1]){this.setComboText(data[1]);dhtmlXRange(this.DOMelem_input,text.length+1,data[1].length)}}else
 this.setComboText(data[1]);this._selOption.RedrawHeader(this);this.callEvent("onSelectionChange",[])};dhtmlXCombo.prototype._selectOption = function(e)
 {(e||event).cancelBubble = true;var node=(_isIE?event.srcElement:e.target);var that=this.combo;while (!node._self){node = node.parentNode;if (!node)return};var i=0;for (i;i<that.DOMlist.childNodes.length;i++){if (that.DOMlist.childNodes[i]==node)break};that.selectOption(i,false,true);that.closeAll();that.callEvent("onBlur",[])
 that._activeMode=false};dhtmlXCombo.prototype.openSelect = function(){if (this._disabled)return;this.closeAll();this._positList();this.DOMlist.style.display="block";this.callEvent("onOpen",[]);if(this._tempSel)this._tempSel.deselect();if(this._selOption)this._selOption.select();if(this._selOption){var corr=this._selOption.content.offsetTop+this._selOption.content.offsetHeight-this.DOMlist.scrollTop-this.DOMlist.offsetHeight;if (corr>0)this.DOMlist.scrollTop+=corr;corr=this.DOMlist.scrollTop-this._selOption.content.offsetTop;if (corr>0)this.DOMlist.scrollTop-=corr};if (_isIE)this._IEFix(true);this.DOMelem_input.focus();if (this._filter)this.filterSelf()};dhtmlXCombo.prototype._toggleSelect = function(e)
 {var that=this.combo;if ( that.DOMlist.style.display == "block" ){that.closeAll()}else {that.openSelect()};(e||event).cancelBubble = true};dhtmlXCombo.prototype._fetchOptions=function(ind,text){if (text==""){this.closeAll();return this.clearAll()};var url=this._xml+((this._xml.indexOf("?")!=-1)?"&":"?")+"pos="+ind+"&mask="+encodeURIComponent(text);this._lasttext=text;if (this._load)this._load=url;else {if (!this.callEvent("onDynXLS",[text,ind])) return;this.loadXML(url)}};dhtmlXCombo.prototype.filterSelf = function(mode)
 {var text=this.getComboText();if (this._xml){this._lkmode=mode;return this._fetchOptions(0,text)};try{var filter=new RegExp("^"+text,"i")}catch (e){var filter=new RegExp("^"+text.replace(/([\[\]\{\}\(\)\+\*\\])/g,"\\$1"))};this.filterAny=false;for(var i=0;i<this.optionsArr.length;i++){var z=filter.test(this.optionsArr[i].text);this.filterAny|=z;this.optionsArr[i].hide(!z)};if (!this.filterAny){this.closeAll();this._activeMode=true}else {if (this.DOMlist.style.display!="block")this.openSelect();if (_isIE)this._IEFix(true)};if (!mode)this._correctSelection();else this.unSelectOption()};dhtmlXCombo.prototype._IEFix = function(mode){this.DOMlistF.style.display=(mode?"block":"none");this.DOMlistF.style.top=this.DOMlist.style.top;this.DOMlistF.style.left=this.DOMlist.style.left};dhtmlXCombo.prototype.closeAll = function()
 {if(window.dhx_glbSelectAr)for (var i=0;i<dhx_glbSelectAr.length;i++){if (dhx_glbSelectAr[i].DOMlist.style.display=="block"){dhx_glbSelectAr[i].DOMlist.style.display = "none";if (_isIE)dhx_glbSelectAr[i]._IEFix(false)};dhx_glbSelectAr[i]._activeMode=false}};function dhtmlXRange(InputId, Start, End)
{var Input = typeof(InputId)=='object' ? InputId : document.getElementById(InputId);try{Input.focus()}catch(e){};var Length = Input.value.length;Start--;if (Start < 0 || Start > End || Start > Length)Start = 0;if (End > Length)End = Length;if (Start==End)return;if (Input.setSelectionRange){Input.setSelectionRange(Start, End)}else if (Input.createTextRange){var range = Input.createTextRange();range.moveStart('character', Start);range.moveEnd('character', End-Length);range.select()}};dhtmlXCombo_defaultOption = function(){this.init()};dhtmlXCombo_defaultOption.prototype.init = function(){this.value = null;this.text = "";this.selected = false;this.css = ""};dhtmlXCombo_defaultOption.prototype.select = function(){if (this.content){this.content.className="dhx_selected_option"+(dhtmlx.skin?" combo_"+dhtmlx.skin+"_sel":"")}};dhtmlXCombo_defaultOption.prototype.hide = function(mode){this.render().style.display=mode?"none":""};dhtmlXCombo_defaultOption.prototype.isHidden = function(){return (this.render().style.display=="none")};dhtmlXCombo_defaultOption.prototype.deselect = function(){if (this.content)this.render();this.content.className=""};dhtmlXCombo_defaultOption.prototype.setValue = function(attr){this.value = attr.value||"";this.text = attr.text||"";this.css = attr.css||"";this.content=null};dhtmlXCombo_defaultOption.prototype.render = function(){if (!this.content){this.content=document.createElement("DIV");this.content._self = this;this.content.style.cssText='width:100%;overflow:hidden;'+this.css;if (_isOpera || _isKHTML )this.content.style.padding="2px 0px 2px 0px";this.content.innerHTML=this.text;this._ctext=_isIE?this.content.innerText:this.content.textContent};return this.content};dhtmlXCombo_defaultOption.prototype.data = function(){if (this.content)return [this.value,this._ctext ? this._ctext : this.text]};dhtmlXCombo_defaultOption.prototype.DrawHeader = function(self, name, width, tab)
{var z=document.createElement("DIV");z.style.width = width+"px";z.className = 'dhx_combo_box '+(dhtmlx.skin||"");z._self = self;self.DOMelem = z;this._DrawHeaderInput(self, name, width,tab);this._DrawHeaderButton(self, name, width);self.DOMParent.appendChild(self.DOMelem)};dhtmlXCombo_defaultOption.prototype._DrawHeaderInput = function(self, name, width,tab)
{if(self.rtl && _isIE){var z=document.createElement('textarea');z.style.overflow = "hidden";z.style.whiteSpace="nowrap"
 }else {var z=document.createElement('input');z.setAttribute("autocomplete","off");z.type = 'text'};z.className = 'dhx_combo_input';if(self.rtl){z.style.left = "18px";z.style.direction = "rtl";z.style.unicodeBidi = "bidi-override"};if (tab)z.tabIndex=tab;z.style.width = (width-19)+'px';self.DOMelem.appendChild(z);self.DOMelem_input = z;z = document.createElement('input');z.type = 'hidden';z.name = name;self.DOMelem.appendChild(z);self.DOMelem_hidden_input = z;z = document.createElement('input');z.type = 'hidden';z.name = (name||"").replace(/(\]?)$/, "_new_value$1");z.value="true";self.DOMelem.appendChild(z);self.DOMelem_hidden_input2 = z};dhtmlXCombo_defaultOption.prototype._DrawHeaderButton = function(self, name, width)
{var z=document.createElement('img');z.className = (self.rtl)?'dhx_combo_img_rtl':'dhx_combo_img';if(dhtmlx.image_path)dhx_globalImgPath = dhtmlx.image_path;z.src = (window.dhx_globalImgPath?dhx_globalImgPath:"")+'combo_select'+(dhtmlx.skin?"_"+dhtmlx.skin:"")+'.gif';self.DOMelem.appendChild(z);self.DOMelem_button=z};dhtmlXCombo_defaultOption.prototype.RedrawHeader = function(self)
{};dhtmlXCombo_optionTypes['default'] = dhtmlXCombo_defaultOption;dhtmlXCombo.prototype.dhx_Event=function()
{this.dhx_SeverCatcherPath="";this.attachEvent = function(original, catcher, CallObj)
 {CallObj = CallObj||this;original = 'ev_'+original;if ( ( !this[original] )|| ( !this[original].addEvent ) ) {var z = new this.eventCatcher(CallObj);z.addEvent( this[original] );this[original] = z};return ( original + ':' + this[original].addEvent(catcher) )};this.callEvent=function(name,arg0){if (this["ev_"+name])return this["ev_"+name].apply(this,arg0);return true};this.checkEvent=function(name){if (this["ev_"+name])return true;return false};this.eventCatcher = function(obj)
 {var dhx_catch = new Array();var m_obj = obj;var func_server = function(catcher,rpc)
 {catcher = catcher.split(":");var postVar="";var postVar2="";var target=catcher[1];if (catcher[1]=="rpc"){postVar='<?xml version="1.0"?><methodCall><methodName>'+catcher[2]+'</methodName><params>';postVar2="</params></methodCall>";target=rpc};var z = function() {};return z};var z = function()
 {if (dhx_catch)var res=true;for (var i=0;i<dhx_catch.length;i++){if (dhx_catch[i] != null){var zr = dhx_catch[i].apply( m_obj, arguments );res = res && zr}};return res};z.addEvent = function(ev)
 {if ( typeof(ev)!= "function" )
 if (ev && ev.indexOf && ev.indexOf("server:")== 0)
 ev = new func_server(ev,m_obj.rpcServer);else
 ev = eval(ev);if (ev)return dhx_catch.push( ev ) - 1;return false};z.removeEvent = function(id)
 {dhx_catch[id] = null};return z};this.detachEvent = function(id)
 {if (id != false){var list = id.split(':');this[ list[0] ].removeEvent( list[1] )}}};(function(){dhtmlx.extend_api("dhtmlXCombo",{_init:function(obj){if (obj.image_path)dhx_globalImgPath=obj.image_path;return [obj.parent, obj.name, (obj.width||"100%"), obj.type, obj.index ]},
 filter:"filter_command",
 auto_height:"enableOptionAutoHeight",
 auto_position:"enableOptionAutoPositioning",
 auto_width:"enableOptionAutoWidth",
 xml:"loadXML",
 readonly:"readonly",
 items:"addOption"
 },{filter_command:function(data){if (typeof data == "string")this.enableFilteringMode(true,data);else
 this.enableFilteringMode(data)}})})();dhtmlXCombo_imageOption = function(){this.init()};dhtmlXCombo_imageOption.prototype = new dhtmlXCombo_defaultOption;dhtmlXCombo_imageOption.prototype.setValue = function(attr){this.value = attr.value||"";this.text = attr.text||"";this.css = attr.css||"";this.img_src = attr.img_src||this.getDefImage()};dhtmlXCombo_imageOption.prototype.render = function(){if (!this.content){this.content=document.createElement("DIV");this.content._self = this;this.content.style.cssText='width:100%;overflow:hidden;'+this.css;var html = '';if (this.img_src != '')html += '<img style="float:left;" src="'+this.img_src+'" />';html += '<div style="float:left">'+this.text+'</div>';this.content.innerHTML=html};return this.content};dhtmlXCombo_imageOption.prototype.data = function(){return [this.value,this.text,this.img_src]};dhtmlXCombo_imageOption.prototype.DrawHeader = function(self, name, width)
{var z=document.createElement("DIV");z.style.width = width+"px";z.className = 'dhx_combo_box';z._self = self;self.DOMelem = z;this._DrawHeaderImage(self, name, width);this._DrawHeaderInput(self, name, width-23);this._DrawHeaderButton(self, name, width);self.DOMParent.appendChild(self.DOMelem)};dhtmlXCombo_imageOption.prototype._DrawHeaderImage = function(self, name, width)
{var z= document.createElement('img');z.className = (self.rtl)? 'dhx_combo_option_img_rtl':'dhx_combo_option_img';z.style.visibility = 'hidden';self.DOMelem.appendChild(z);self.DOMelem_image=z};dhtmlXCombo_imageOption.prototype.RedrawHeader = function(self)
{self.DOMelem_image.style.visibility = 'visible';self.DOMelem_image.src = this.img_src};dhtmlXCombo_imageOption.prototype.getDefImage = function(self){return ""};dhtmlXCombo.prototype.setDefaultImage=function(url){dhtmlXCombo_imageOption.prototype.getDefImage=function(){return url}};dhtmlXCombo_optionTypes['image'] = dhtmlXCombo_imageOption;dhtmlXCombo_checkboxOption = function(){this.init()};dhtmlXCombo_checkboxOption.prototype = new dhtmlXCombo_defaultOption;dhtmlXCombo_checkboxOption.prototype.setValue = function(attr){this.value = attr.value||"";this.text = attr.text||"";this.css = attr.css||"";this.checked = attr.checked||0};dhtmlXCombo_checkboxOption.prototype.render = function(){if (!this.content){this.content=document.createElement("DIV");this.content._self = this;this.content.style.cssText='width:100%;overflow:hidden;'+this.css;var html = '';if(this.checked)html += '<input style="float:left;" type="checkbox" checked />';else html += '<input style="float:left;" type="checkbox" />';html += '<div style="float:left">'+this.text+'</div>';this.content.innerHTML=html;this.content.firstChild.onclick = function(e) {this.parentNode.parentNode.combo.DOMelem_input.focus();(e||event).cancelBubble=true;if(!this.parentNode.parentNode.combo.callEvent("onCheck",[this.parentNode._self.value,this.checked])){this.checked=!this.checked;return false}}};return this.content};dhtmlXCombo_checkboxOption.prototype.data = function(){return [this.value,this.text,this.render().firstChild.checked]};dhtmlXCombo_checkboxOption.prototype.DrawHeader = function(self, name, width)
{self.DOMelem = document.createElement("DIV");self.DOMelem.style.width = width+"px";self.DOMelem.className = 'dhx_combo_box';self.DOMelem._self = self;this._DrawHeaderCheckbox(self, name, width);this._DrawHeaderInput(self, name, width-18);this._DrawHeaderButton(self, name, width);self.DOMParent.appendChild(self.DOMelem)};dhtmlXCombo_checkboxOption.prototype._DrawHeaderCheckbox = function(self, name, width)
{var z= document.createElement('input');z.type='checkbox';z.className = (self.rtl)? 'dhx_combo_option_img_rtl':'dhx_combo_option_img';z.style.visibility = 'hidden';z.onclick = function(e) {(e||event).cancelBubble=true};self.DOMelem.appendChild(z);self.DOMelem_checkbox = z};dhtmlXCombo_checkboxOption.prototype.RedrawHeader = function(self)
{self.DOMelem_checkbox.style.visibility = '';self.DOMelem_checkbox.checked = this.content.firstChild.checked};dhtmlXCombo_optionTypes['checkbox'] = dhtmlXCombo_checkboxOption;dhtmlXCombo.prototype.getChecked=function(){var res=[];for(var i=0;i<this.optionsArr.length;i++)if(this.optionsArr[i].data()[2])
 res.push(this.optionsArr[i].value)
 return res};dhtmlXCombo.prototype.setChecked=function(index,mode){this.optionsArr[index].content.firstChild.checked=(!(mode===false))};dhtmlXCombo.prototype.setCheckedByValue=function(value,mode){return this.setChecked(this.getIndexByValue(value),mode)};dhtmlXCombo.prototype.enableOptionAutoPositioning = function(fl){if(!this.ListAutoPosit)this.ListAutoPosit = 1;this.attachEvent("onOpen",function(){this._setOptionAutoPositioning(fl)})
 this.attachEvent("onXLE",function(){this._setOptionAutoPositioning(fl)})
 
};dhtmlXCombo.prototype._setOptionAutoPositioning = function(fl){if((typeof(fl)!="undefined")&&(!convertStringToBoolean(fl))){this.ListPosition = "Bottom";this.ListAutoPosit = 0;return true
 };var pos = this.getPosition(this.DOMelem);var bottom = this._getClientHeight() - pos[1] - this.DOMelem.offsetHeight;var height = (this.autoHeight)?(this.DOMlist.scrollHeight):parseInt(this.DOMlist.offsetHeight);if((bottom < height)&&(pos[1] > height)){this.ListPosition = "Top"}else this.ListPosition = "Bottom";this._positList()};dhtmlXCombo.prototype._getClientHeight = function(){return ((document.compatMode=='CSS1Compat') &&(!window.opera))?document.documentElement.clientHeight:document.body.clientHeight};dhtmlXCombo.prototype.setOptionWidth = function(width){if(arguments.length > 0){this.DOMlist.style.width = width+"px";if (this.DOMlistF)this.DOMlistF.style.width = width+"px"}};dhtmlXCombo.prototype.setOptionHeight = function(height){if(arguments.length>0){if(_isIE)this.DOMlist.style.height = this.DOMlistF.style.height = height+"px";else
 this.DOMlist.style.height = height+"px";this._positList()}};dhtmlXCombo.prototype.enableOptionAutoWidth = function(fl){if(!this._listWidthConf)this._listWidthConf = parseInt(this.DOMlist.style.width);if(arguments.length == 0){var fl = 1};if(convertStringToBoolean(fl)) {this.autoOptionWidth = 1;this.awOnOpen = this.attachEvent("onOpen",function(){this._setOptionAutoWidth()});this.awOnXLE = this.attachEvent("onXLE",function(){this._setOptionAutoWidth()})}else {if(typeof(this.awOnOpen)!= "undefined"){this.autoOptionWidth = 0;this.detachEvent(this.awOnOpen);this.detachEvent(this.awOnXLE);this.setOptionWidth(this._listWidthConf)}}};dhtmlXCombo.prototype._setOptionAutoWidth = function(){this.setOptionWidth(1);var x = this.DOMlist.offsetWidth;for ( var i=0;i<this.optionsArr.length;i++){var optWidth = (_isFF)?(this.DOMlist.childNodes[i].scrollWidth - 2):this.DOMlist.childNodes[i].scrollWidth;if (optWidth > x){x = this.DOMlist.childNodes[i].scrollWidth}};this.setOptionWidth(x)};dhtmlXCombo.prototype.enableOptionAutoHeight = function(fl,maxHeight){if(!this._listHeightConf)this._listHeightConf = (this.DOMlist.style.height=="")?100:parseInt(this.DOMlist.style.height);if(arguments.length==0)var fl = 1;this.autoHeight = convertStringToBoolean(fl);if(this.autoHeight){this.ahOnOpen = this.attachEvent("onOpen",function(){this._setOptionAutoHeight(fl,maxHeight);if(_isIE)this._setOptionAutoHeight(fl,maxHeight)})
 if(!this.awOnOpen)this.ahOnXLE = this.attachEvent("onXLE",function(){var that = this;window.setTimeout(function(){that.callEvent("onOpen",[])},1)})
 }else {if(typeof(this.ahOnOpen)!= "undefined"){this.detachEvent(this.ahOnOpen);this.detachEvent(this.ahOnXLE);this.setOptionHeight(this._listHeightConf)}}};dhtmlXCombo.prototype._setOptionAutoHeight = function(fl,maxHeight){if(convertStringToBoolean(fl)){this.setOptionHeight(1);var height = 0;if (this.optionsArr.length > 0){if(this.DOMlist.scrollHeight > this.DOMlist.offsetHeight){height= this.DOMlist.scrollHeight + 2}else height= this.DOMlist.offsetHeight;if((arguments.length > 1)&&(maxHeight)){var maxHeight = parseInt(maxHeight);height = (height>maxHeight)?maxHeight:height};this.setOptionHeight(height)
 }}};dhtmlXCombo.prototype.attachChildCombo = function(_chcombo,xml){if(!this._child_combos){this._child_combos = []};this._has_childen = 1;this._child_combos[this._child_combos.length] = _chcombo;_chcombo.show(0);var that = this;var _arg_length = arguments.length;this.attachEvent("onChange",function(){for(var i = 0;i < that._child_combos.length;i++){if(that._child_combos[i]==_chcombo){_chcombo.show(1);_chcombo.callEvent("onMasterChange",[that.getActualValue(),that])}};if(that.getActualValue()=="") {that.showSubCombo(that,0);return};if(_chcombo._xml){if(_arg_length ==1)xml = _chcombo._xml;_chcombo._xml = that.deleteParentVariable(xml);_chcombo._xml += ((_chcombo._xml.indexOf("?")!=-1)?"&":"?")+"parent="+that.getActualValue()}else{if(xml){_chcombo.clearAll(true);_chcombo.loadXML(xml+((xml.indexOf("?")!=-1)?"&":"?")+"parent="+that.getActualValue())}}})
};dhtmlXCombo.prototype.setAutoSubCombo = function(xml,name){if(arguments.length == 1)name = "subcombo";if(!this._parentCombo){var z = new dhtmlXCombo(this.DOMParent,name,this.DOMelem.style.width)
 z._parentCombo = this}else {var z = new dhtmlXCombo(this._parentCombo.DOMParent,name,this._parentCombo.DOMelem.style.width)
 z._parentCombo = this._parentCombo};if(this._filter)z._filter = 1;if(this._xml){if(arguments.length > 0)z._xml = xml;else 
 z._xml = this._xml;xml = z._xml;z._autoxml = this._autoxml;if(this._xmlCache)z._xmlCache=[]};this.attachChildCombo(z,xml) 
 return z};dhtmlXCombo.prototype.detachChildCombo = function(_chcombo){for(var i = 0;i < this._child_combos.length;i++){this._child_combos[i] == _chcombo;this._child_combos.splice(i,1)};_chcombo.show(1)};dhtmlXCombo.prototype.showSubCombo = function(combo,state){if(combo._child_combos){for(var i = 0;i < combo._child_combos.length;i++){combo._child_combos[i].show(state);combo.showSubCombo(combo._child_combos[i],0)}}};dhtmlXCombo.prototype.deleteParentVariable = function(str){str = str.replace(/parent\=[^&]*/g,"").replace(/\?\&/,"?");return str};function dhtmlxFolders(parent){if (typeof(parent)!="object")
 parent=document.getElementById(parent);this.parent=parent;this.imgSrc = window.dhx_globalImgPath||"";this.XMLLoader = null;this._item_type="xml_generic";this._userdataCol = new Array();this.cont=document.createElement("DIV");this.parent.appendChild(this.cont);this.cont.className="dhx_folders_area";if (_isIE)this.cont.className+=" dhx_isIE6";var self=this;this.clickTime = 0;this.clickedID = null;this.cont.onclick=function(e){self.clickedID = self._trackParent(e||event);var retValue = self._onclickHandler(e||event);return true};this.cont.onselectstart=this.stopEvent;if (_isMacOS)this.cont.oncontextmenu = function(e){return self._onmupHandler(e||event,"context")};this.cont.onmousedown = function(e){return self._onmdownHandler(e||event)};this.cont.onmouseup = function(e){var clickTime = (new Date()).valueOf();if(clickTime-self.clickTime<200){var retValue = self._ondblclickHandler(e||event,self.clickedID)};self.clickTime = clickTime;return self._onmupHandler(e||event)};this.cont.onmousemove = function(e){return self._onmmoveHandler(e||event)};this.cont.ondragstart=function(){return false};this.onKeyHandler=function(e){return self._onKeyPressed(e||event)};dhtmlxEventable(this);this.paging = false;this.page = 1;this.itemsPerPage = 0;this.requestServerForPage = false;this.globalPage = 1;this.globalPageSize = 0;this.totalItems = null;this.pagerContainer = null;this._filtersAr = new Array();this._set={editable:false,selectable:1};this.clearAll();return this};dhtmlxFolders.prototype.config=function(data){for (a in data)this._set[a]=data[a]};dhtmlxFolders.prototype._xml={itemTag:"item",
 url:""
 };dhtmlxFolders.prototype.enableEditMode = function(state){this._set.editable = state};dhtmlxFolders.prototype.setImagePath = function(newPath){this.imgSrc = newPath};dhtmlxFolders.prototype.setItemTagName = function(newTagName){this._xml.itemTag = newTagName};dhtmlxFolders.prototype._types={ficon:["dhtmlxFoldersXMLBasedGeneric","xml-xsl","ficon","ficon.xsl","cells"],
 ftable:["dhtmlxFoldersXMLBasedGeneric","xml-xsl","ftable","ftable.xsl","lines"],
 fthumbs:["dhtmlxFoldersXMLBasedGeneric","xml-xsl","fthumbs","fthumbs.xsl","cells"],
 ftiles:["dhtmlxFoldersXMLBasedGeneric","xml-xsl","ftiles","ftiles.xsl","cells"],
 xml_generic:["dhtmlxFoldersXMLBasedGeneric","xml-xsl","generic","","cells"],
 js_generic:["dhtmlxFoldersJSBasedGeneric","script","generic"]
 };dhtmlxFolders.prototype._getCurrentPlacementType = function(){return this._types[this._item_type][4]||"cells"};dhtmlxFolders.prototype.setCSSBaseName = function(cssBaseName){if(!cssBaseName)cssBaseName = this._item_type;this._cssBaseName = cssBaseName};dhtmlxFolders.prototype.getCSSBaseName = function(){if(!this._cssBaseName){return this._item_type}else{return this._cssBaseName
 }};dhtmlxFolders.prototype._ordIns=function(ind,z){if (ind!=this._orderCol.length)this._orderCol=this._orderCol.slice(0,ind).concat([0]).concat(this._orderCol.slice(ind,this._orderCol.length));this._orderCol[ind]=z};dhtmlxFolders.prototype._ordDel=function(pos){this._orderCol.splice(pos,1)};dhtmlxFolders.prototype._ordMov=function(s,e,m){var tz=this._orderCol[e];var sz=this._orderCol[s];if (s<e)this._orderCol=this._orderCol.slice(0,s).concat(this._orderCol.slice(s+1,e)).concat(m=="next"?[tz,sz]:[sz,tz]).concat(this._orderCol.slice(e+1,this._orderCol.length));else
 this._orderCol=this._orderCol.slice(0,e).concat(m=="next"?[tz,sz]:[sz,tz]).concat(this._orderCol.slice(e+1,s)).concat(this._orderCol.slice(s+1,this._orderCol.length))};dhtmlxFolders.prototype.moveItem = function(sid,mode,tid,sObj,tObj) {if (sid==tid)return;sObj=sObj||this;tObj=tObj||this;var sz=sObj._idpullCol[sid].item;var tz=tObj._idpullCol[tid].item;sz.parentNode.removeChild(sz);this.matchId(function(id,ind2){if (mode=="next")if (this._orderCol[ind2+1])tz.parentNode.insertBefore(sz,this._orderCol[ind2+1].item);else
 tz.parentNode.appendChild(sz);else
 tz.parentNode.insertBefore(sz,tz);this.matchId(function(id2,ind){this._ordMov(ind,ind2,mode)},sid)},tid)};dhtmlxFolders.prototype.setItemType=function(name,processor){if ( this._item_type!=name || arguments.length>1){this._item_type=name;if(arguments.length>1 && typeof(arguments[1])=="string"){this.XMLLoader.xslDoc=null;this._types[this._item_type][3] = arguments[1];this.XMLLoader.XSLProcessor = null;var self = this;var tmpLoader = new dtmlXMLLoaderObject(function(){self.XMLLoader.xslDoc = this.xmlDoc;for (var i=0;i<self._orderCol.length;i++){self._orderCol[i].resetType();self._orderCol[i].render()};self.drawFolders()});tmpLoader.loadXML(this._types[this._item_type][3]);return}else if(arguments.length>1 && typeof(arguments[1])=="function"){this.rendererFunction = arguments[1]};if (this._orderCol.length){for (var i=0;i<this._orderCol.length;i++){this._orderCol[i].render(true)}}}};dhtmlxFolders.prototype.getItemDataObject = function(itemId){return this.getItem(itemId).data.dataObj};dhtmlxFolders.prototype.sortItems = function(sortFunc,order){this._orderCol.sort(function(a,b){if(order=='asc')return sortFunc(a,b);else
 return sortFunc(a,b)*-1}) ;this.drawFolders()};dhtmlxFolders.prototype.filterItems = function(filterFunc,mask,preservePrevious){if(!preservePrevious)this.filterClear(true);for (var i=0;i<this._orderCol.length;i++){if(!filterFunc(this._orderCol[i],mask))
 this._orderCol[i].data.filteredOut = true};this._filtersAr[this._filtersAr.length] = new Array(filterFunc,mask);this.goToPage(this.page)};dhtmlxFolders.prototype.filterClear = function(skip_redraw){for (var i=0;i<this._orderCol.length;i++){this._orderCol[i].data.filteredOut = false};this._filtersAr = new Array();if(!skip_redraw)this.goToPage(this.page)};dhtmlxFolders.prototype._getCurrentlyVisibleItemsArray = function(){var outArray = new Array();for (var i=0;i<this._orderCol.length;i++){if(!this._orderCol[i].data.filteredOut)outArray[outArray.length] = this._orderCol[i]
 };return outArray};dhtmlxFolders.prototype._filtersReApply = function(){for (var i=0;i<this._orderCol.length;i++){this._filtersReApplyOnItem(this._orderCol[i])
 }};dhtmlxFolders.prototype._filtersReApplyOnItem = function(itemObj){for(var n=0;n<this._filtersAr.length;n++){if(!this._filtersAr[n][0](itemObj,this._filtersAr[n][1])){itemObj.data.filteredOut = true;break}}};dhtmlxFolders.prototype.getItemsNum = function(){return this._orderCol.length};dhtmlxFolders.prototype.loadJSON=function(data){for(var i=0;i<data.length;i++)this.addItemJSON(data[i])};dhtmlxFolders.prototype.loadXMLString=function(xmlString,xslFileURL){if(!this.XMLLoader)this.XMLLoader = new dtmlXMLLoaderObject(this._parseXML,this);if(xslFileURL!="undefined")this._types[this._item_type][3] = xslFileURL;this.XMLLoader.loadXMLString(xmlString)};dhtmlxFolders.prototype.loadXML=function(url,xslFileURL){if(!this.XMLLoader)this.XMLLoader = new dtmlXMLLoaderObject(this._parseXML,this,true,true);if(xslFileURL!="undefined")this._types[this._item_type][3] = xslFileURL;if(url.indexOf("dhx_global_page")==-1)
 url+=((url.indexOf("?")!=-1)?"&":"?")+"dhx_global_page=1"
 else{var testAr = /dhx_global_page=([0-9]+)/.exec(url);this.globalPage = parseInt(testAr[1])+1;url = url.replace(/dhx_global_page=[0-9]+/,"dhx_global_page="+this.globalPage)
 
 };this._xml.url = url;this.callEvent("onXLS",[]);this.XMLLoader.loadXML(this._xml.url)};dhtmlxFolders.prototype._parseXML=function(obj,a,b,c,xml){if (_isIE && !xml.xmlDoc.documentElement)xml.getXMLTopNode("data",xml);var items=xml.doXPath("//"+obj._xml.itemTag);if(obj.globalPage==1){obj.globalPageSize = items.length;if(obj.totalItems==null){obj.totalItems = xml.doXPath("/"+"*")[0].getAttribute("total_count")}};if(items.length==0)obj.requestServerForPage = false;var hide = false;if(obj.paging){hide = true};if(obj._types[obj._item_type][1]=="script"){for (var i=0;i<items.length;i++){var item = xml.xmlNodeToJSON(items[i]);obj.addItemJSON(item)}}else if(obj._types[obj._item_type][1]=="xml-xsl"){obj._putUserdataToCol(xml);if(obj.XMLLoader.xslDoc==null){var self = obj;var selfXML = xml;var tmpLoader = new dtmlXMLLoaderObject(function(){this.getXMLTopNode("xsl:stylesheet");self.XMLLoader.xslDoc = this.xmlDoc;self._parseXML(self,null,null,null,selfXML)});tmpLoader.loadXML(obj._types[obj._item_type][3]);return};if(obj.smartRefreshMode==true){if(items.length!=obj._orderCol.length){var newContent = true;obj.clearAll()}else{for (var i=0;i<items.length;i++){var itemObj = obj._createFoldersItem(items[i],hide);if(!obj.getItem(itemObj.data.id)){var newContent = true;obj.clearAll();break}}}};if(!obj.smartRefreshMode || newContent==true){for (var i=0;i<items.length;i++){obj.addItemXML(items[i],hide)}}};obj.goToPage(obj.page);obj.callEvent("onXMLLoadingEnd",[]);obj.callEvent("onXLE",[])};dhtmlxFolders.prototype.enableXMLSmartRefresh = function(mode){this.smartRefreshMode = mode};dhtmlxFolders.prototype.enablePaging = function(itemsPerPage,withDynLoading){this.requestServerForPage = withDynLoading==true
 this.paging = itemsPerPage!=0;this.itemsPerPage = itemsPerPage;return this.goToPage(1)};dhtmlxFolders.prototype.goToPage = function(pageNumber){if(this._filtersAr.length>0)var itemsAr = this._getCurrentlyVisibleItemsArray();else
 var itemsAr = this._orderCol;this.page = pageNumber||1;var from = (this.page-1)*this.itemsPerPage;var to = this.page*this.itemsPerPage-1 
 if(itemsAr.length==0){this.drawFolders();return 0};if(to>itemsAr.length && this.requestServerForPage){this.loadXML(this._xml.url)
 return 2};if(from>=itemsAr.length){return this.goToPage(this.page-1)};for(var i=0;i<itemsAr.length;i++){var hide = true;if(this.itemsPerPage==0 || (i>=from && i<=to)){hide = false};itemsAr[i].data.hidden = hide};this.drawFolders();if(this.paging)this.drawPager();return 1};dhtmlxFolders.prototype.getCurrentPage = function(){return this.page};dhtmlxFolders.prototype.getNumberOfPages = function(){if(this._filtersAr.length>0)var itemsAr = this._getCurrentlyVisibleItemsArray();else
 var itemsAr = this._orderCol;return Math.ceil(itemsAr.length/this.itemsPerPage)};dhtmlxFolders.prototype.drawFolders = function(){for(var i=0;i<this._orderCol.length;i++){var itemObj = this._orderCol[i];if((itemObj.data.hidden || itemObj.data.filteredOut)&& itemObj.item.parentNode!=null)
 itemObj.item.parentNode.removeChild(itemObj.item);else if(!itemObj.data.hidden && !itemObj.data.filteredOut){if(itemObj.data.type!=this._item_type){itemObj.resetType();itemObj.render()};this.cont.appendChild(itemObj.item)}}};dhtmlxFolders.prototype.setPagerContainer = function(obj){this.pagerContainer = typeof(obj)=="string"?document.getElementById(obj):obj};dhtmlxFolders.prototype.drawPager = function(){if(this.pagerContainer==null){return};this.pagerContainer.style.display = "";this.pagerContainer.innerHTML="";this.pagerContainer.obj = this;for(var i=0;i<this.getNumberOfPages();i++){var ins = "";if(i+1==this.getCurrentPage())
 var className = "dhxfolders_pagingCurrent"
 else
 var className = "dhxfolders_pagingInact"
 var tmpHTML = "<div style='float:left;' class='"+className+"' onclick='this.parentNode.obj.goToPage("+(i+1)+");'>"+(i+1)+"</div>"
 this.pagerContainer.innerHTML = this.pagerContainer.innerHTML+tmpHTML}};dhtmlxFolders.prototype._putUserdataToCol = function(xmlObj){if(this._userdataCol==null)this._userdataCol = new Array();var items=xmlObj.doXPath("/node()/userdata");if(items!=null && items.length>0)for (var i=0;i<items.length;i++){var item = items[i];this._userdataCol[i] = [item.getAttribute("name"),item.firstChild.nodeValue]}};dhtmlxFolders.prototype.setUserData = function(name,value){if(this._userdataCol==null)this._userdataCol = new Array();this._userdataCol[this._userdataCol.length] = [name,value]};dhtmlxFolders.prototype.clearAll=function(){this.cont.innerHTML="";this._idpullCol={};this._orderCol=[];this._selectedCol=[];this._activeItemId = null};dhtmlxFolders.prototype.deleteItem=function(id){if (!id)return;if (typeof(id)=="object"){for ( var i=0;i<id.length;i++)this.deleteItem(id[i])}else{var item=this._idpullCol[id].item;item.parentNode.removeChild(item)


 this.matchId(function(id,ind){this._ordDel(ind)},id);this.matchSelected(function(id,ind){this._selectedCol.splice(ind,1)},id);this._idpullCol[id]=null};if(this.paging)this.goToPage(this.page);if(id==this._activeItemId)this._activeItemId = null};dhtmlxFolders.prototype.getSelectedId=function(){switch(this._selectedCol.length){case 0: return null;case 1: return this._selectedCol[0];default: return (new Array()).concat(this._selectedCol)}};dhtmlxFolders.prototype.enableSelection=function(mode){this._set.selectable = mode};dhtmlxFolders.prototype._getLineLength=function(){for (var i=0;i<this._orderCol.length;i++)if (this._orderCol[i].item.offsetTop!=this._orderCol[0].item.offsetTop)return i;return this._orderCol.length};dhtmlxFolders.prototype._rectToSelection=function(){var dx=this._orderCol[0].item.offsetWidth;var dy=this._orderCol[0].item.offsetHeight;var x=this._selZone.offsetWidth;var y=this._selZone.offsetHeight;var ay=parseInt(this._selZone.style.top);var ax=parseInt(this._selZone.style.left);var y1=Math.ceil(ay/dy);var x1=Math.ceil(ax/dx);var y2=Math.ceil((y+ay)/dy);var x2=Math.ceil((x+ax)/dx);var l=this._getLineLength();x1=x1<l?x1:l;x2=x2<l?x2:l;this.unselectAll();for (var j=y1-1;j<y2;j++)for (var i=x1-1;i<x2;i++){var ind=this._orderCol[j*l+i];if (ind)this.selectItem(ind.data.id,true)}};dhtmlxFolders.prototype._drawRect=function(){if(this._set.selectable!=1)return;var x=this._sPoint[0]-this._lPoint[0];var y=this._sPoint[1]-this._lPoint[1];this._selZone.style.left=this[x<0?'_sPoint':'_lPoint'][0]+"px";this._selZone.style.top=this[y<0?'_sPoint':'_lPoint'][1]+"px";this._selZone.style.width=Math.abs(x)+"px";this._selZone.style.height=Math.abs(y)+"px"};dhtmlxFolders.prototype.setSizes=function(){this.cont.style.height=this.cont.parentNode.offsetHeight-(_isIE?0:3)+"px"};dhtmlxFolders.prototype._setBSMove=function(e){var id=this._trackParent(e);if (!this._selZone){this._sPoint=[e.clientX-this._cPos[0]+this.cont.scrollLeft,e.clientY-this._cPos[1]+this.cont.scrollTop,id];this._selZone=document.createElement("DIV");this._selZone.className="dhx_folders_block_selection";this.cont.appendChild(this._selZone)};this._lPoint=[e.clientX-this._cPos[0]+this.cont.scrollLeft,e.clientY-this._cPos[1]+this.cont.scrollTop,id];this._drawRect()};dhtmlxFolders.prototype.editItem=function(id){if (!this._set.editable)return;this.selectItem(id);this.stopEdit();this.getItem(id).edit(true);this._editorId=id};dhtmlxFolders.prototype.stopEdit=function(saveFl){if (this._editorId){var it = this.getItem(this._editorId);if(saveFl)it.saveDataFromEditor()
 it.edit(false);this.callEvent("onEditEnd",[this._editorId])
 };this._editorId=null};dhtmlxFolders.prototype.unselectAll=function(){for (var i=0;i<this._selectedCol.length;i++)this.getItem(this._selectedCol[i]).setSelectedState(false);this._selectedCol=[]};dhtmlxFolders.prototype.selectItem=function(id,ctr,shf){this.stopEdit(id);if(this._set.selectable==0)return;if (shf && this._set.selectable==1)return this.forEachId(function(id){this._selectItem(id)},this._selectedCol[this._selectedCol.length-1],id);if (((!ctr)&&(this._selectedCol.length)) || this._set.selectable!=1) 
 this.unselectAll();if (ctr && this._set.selectable==1)if (this.matchSelected(function(sid,sind){this.getItem(sid).setSelectedState(false);this._selectedCol.splice(sind,1)},id)) return true;this._selectItem(id);this.setItemActive(id)};dhtmlxFolders.prototype.setItemActive=function(id){if(this._activeItemId && this.getItem(this._activeItemId))
 this.getItem(this._activeItemId).setActiveState(false);this.getItem(id).setActiveState(true);this._activeItemId = id};dhtmlxFolders.prototype._selectItem=function(id){if(this._set.selectable==0)return;var itemObj = this.getItem(id);if (!itemObj.data.selected && itemObj.setSelectedState(true))
 this._selectedCol.push(id)};dhtmlxFolders.prototype._unicId=function(id){if(!id)id="agid";while (this._idpullCol[id])id+="_"+Math.random().toString().substr(2,14);return id};dhtmlxFolders.prototype.addItemJSON=function(jsonObj,hide,pos){var itemObj = this._createFoldersItem(jsonObj,hide);this.addItem(itemObj.data.id,itemObj,pos)};dhtmlxFolders.prototype.addItemXML = function(xmlNodeObj,hide,pos){var itemObj = this._createFoldersItem(xmlNodeObj,hide);this.addItem(itemObj.data.id,itemObj,pos)};dhtmlxFolders.prototype.addItem=function(id,itemObj,pos){id=this._unicId(id);this._idpullCol[id] = itemObj;var ind=this._orderCol.length;if (!pos)return this.addItemAt(itemObj,this._orderCol.length);var mode=pos.mode||"next";var id=pos.id;this.matchId(function(id,ind){if (mode=="next")ind++;if (ind>this._orderCol.length)ind=this._orderCol.length;this.addItemAt(itemObj,ind)},id);return itemObj};dhtmlxFolders.prototype.addItemAt=function(itemObj,ind){this._ordIns(ind,itemObj)
 return itemObj};dhtmlxFolders.prototype._createFoldersItem=function(dataObj,hide){var fItem = new window[this._types[this._item_type][0]]();fItem.setData(dataObj,this,hide);this._filtersReApplyOnItem(fItem);fItem.render();fItem.item.dragLanding=this;fItem.item.dragStarter=this;return fItem};dhtmlxFolders.prototype.getItem=function(id){return this._idpullCol[id]};dhtmlxFolders.prototype.matchSelected=function(func,id){for (var i=0;i<this._selectedCol.length;i++)if (this._selectedCol[i]==id){if (func)func.apply(this,[id,i]);return true};return false};dhtmlxFolders.prototype.forEachSelected=function(func){for (var i=0;i<this._selectedCol.length;i++)return func.apply(this,[this._selectedCol[i],i])};dhtmlxFolders.prototype.matchId=function(func,a){this.matchObj(func,this._idpullCol[a])};dhtmlxFolders.prototype.forEachId=function(func,a,b){this.forEachObj(func,this._idpullCol[a],this._idpullCol[b])};dhtmlxFolders.prototype.matchObj=function(func,a){for (var i=0;i<this._orderCol.length;i++)if (this._orderCol[i]==a){func.apply(this,[this._orderCol[i].data.id,i]);return true};return false};dhtmlxFolders.prototype.forEachObj=function(func,a,b){var check=a?false:true;var i=0;for (i;i<this._orderCol.length;i++){if (this._orderCol[i]==a){a=null;break};if (this._orderCol[i]==b){b=null;break}};for (i;i<this._orderCol.length;i++){func.apply(this,[this._orderCol[i].data.id,i]);if ((this._orderCol[i]==a)||(this._orderCol[i]==b)) return}};dhtmlxFolders.prototype.applyValue = function(itemObj,newValue){};dhtmlxFolders.prototype._trackParent=function(e){var z=(e.srcElement||e.target);while (z && z!=this.cont){if (z.itemObj && z.itemObj.data.id)return z.itemObj.data.id;z=z.parentNode};return null};dhtmlxFolders.prototype.stopEvent=function(e){(e||event).cancelBubble=true;return false};dhtmlxFolders.prototype._onKeyPressed=function(e){if (e.keyCode==13)return this.stopEdit(true);else if (e.keyCode==27)return this.stopEdit(false)};dhtmlxFolders.prototype._onmmoveHandler=function(e){if (this._state){switch(this._state){case "DND": 
 case "preDND":
 this._state="DND";break;case "BS": 
 case "preBS":
 return;this._state="BS";this._setBSMove(e);return};this._state=""};return false};dhtmlxFolders.prototype._onmdownHandler=function(e){var id=this._trackParent(e);if (id && ((e.srcElement||e.target).tagName=="IMG")){if (this._drager){this._idpullCol[id].item.dragStart=this;this._drager.preCreateDragCopy.apply(this._idpullCol[id].item,[e]);this._cPos=[getAbsoluteLeft(this.cont),getAbsoluteTop(this.cont)]}}else {if(e.originalTarget && (e.offsetX > this.cont.clientWidth || e.originalTarget!=e.target)){return};this._state="preBS";this._cPos=[getAbsoluteLeft(this.cont),getAbsoluteTop(this.cont)]};return false};dhtmlxFolders.prototype._onmupHandler=function(e){var id=this._trackParent(e);switch (this._state){case "BS": 
 if (this._orderCol.length)this._rectToSelection();this._selZone.parentNode.removeChild(this._selZone);this._selZone=null;case "preBS": 
 case "preDND":
 this._state="";break};if ((e.button==2)&&(this._ctmndx)) {if (!(this.callEvent("onBeforeContextMenu",[id]))) return true;var el=this.cont
 if (id)el=this._idpullCol[id];if (_isIE)e.srcElement.oncontextmenu = function(){event.cancelBubble=true;return false};if (this._ctmndx.showContextMenu){this._ctmndx.showContextMenu(e.clientX,e.clientY)
 this.contextID=id;this._ctmndx._skip_hide=true}else {el.contextMenuId=id;el.contextMenu=this._ctmndx;el.a=this._ctmndx._contextStart;el.a(el, ev);el.a=null};return false};if(this._ctmndx){if (this._ctmndx.hideContextMenu)this._ctmndx.hideContextMenu()
 else
 this._ctmndx._contextEnd()};return true};dhtmlxFolders.prototype._onclickHandler=function(e){var id=this._trackParent(e);if (!id)return this.stopEdit();this.stopEdit();if ((e.ctrlKey || e.metaKey)||(e.shiftKey)|| this.getItem(id).data.selected || (!this.matchSelected(function(id,ind){this.unselectAll()},id))){this.selectItem(id,(e.ctrlKey || e.metaKey),e.shiftKey)};this._last_click_time=(new Date()).valueOf();this.callEvent("onclick",[id]);return true};dhtmlxFolders.prototype._ondblclickHandler=function(e,id){var id=id||this._trackParent(e);if (!id)return;this.callEvent("ondblclick",[id])};function dhtmlxFoldersItem(){var self = this;this.master;this.date;this.item;this.setData = function(dataObject,masterObj,hide){if(this.date==undefined){this.data = {dataObj:{},selected:false,active:false,editmode:false,id:null,master:{},hidden:hide,filteredOut:false,type:""};if(this.tmpId)this.data.id = this.tmpId
 else{if(dataObject.id)this.data.id = dataObject.id
 else if(dataObject.nodeName!="" && dataObject.getAttribute("id"))
 this.data.id = dataObject.getAttribute("id");else
 this.data.id = masterObj._unicId()}};this.data.dataObj = dataObject;this.data.master = masterObj;this.resetType();return this.data.id};this.resetType = function(){this.data.type = this.data.master._item_type;var t=this.data.master.getCSSBaseName();this.css = "dhx_folders"+(t?("_"+t.toUpperCase()):"")+(this.data.master._item_type!=""?"_":"")+"item"};this.setId = function(id){if(this.data!=undefined)this.data.id = id;else
 this.tmpId = id};this.getDataItem = function(name){return dataItem};this.render = function(){return this};this.renderToActive = function(){return this};this.setSelectedState = function(state){this.data.selected = state;this.render();return true};this.setActiveState = function(state){this.data.active = state;if(state){this.renderToActive();if (!this.aItem)return false;this.item.parentNode.appendChild(this.aItem);var posArray = getPosition(this.item, this.item.parentNode)
 this.aItem.style.left = posArray[0];this.aItem.style.top = posArray[1];this.aItem.style.margin = "0px";this.item.style.visibility = "hidden"}else{if (!this.aItem)return false;this.aItem.parentNode.removeChild(this.aItem);this.item.style.visibility = "visible"};return true};this.edit = function(mode,newValue){if (this.data.editmode==mode)return false;this.data.editmode = mode;if(!mode && newValue)this.data.master.applyValue(this,newValue)
 this.render()};this.initEditor = function(obj){this.editor = obj;this.editor.focus();this.editor.select();this.editor.onkeypress=this.data.master.onKeyHandler;this.editor.onclick=this.data.master.stopEvent};this.saveDataFromEditor = function(attrName,value){}};function dhtmlxFoldersJSBasedGeneric(){this.getDataItem = function(name){return this.data.dataObj[name]};this.render = function(){if(this.item==null){this.item = document.createElement("DIV");this.item.itemObj = this;this.item.foldersObj = this.data.master};if(this.data.selected){this.item.className=this.css+"_selected"}else{this.item.className=this.css};this.item.innerHTML = this.data.master.rendererFunction(this.data.dataObj,this.data.editmode,this.data.selected,false)
 return this.item};this.renderToActive = function(){this.aItem = document.createElement("DIV");this.aItem.itemObj = this;this.aItem.foldersObj = this.data.master;this.aItem.className=this.css+"_selected";this.aItem.style.position = "absolute";this.aItem.innerHTML = this.data.master.rendererFunction(this.data.dataObj,this.data.editmode,this.data.selected,true)
 
 };this.saveDataFromEditor = function(){this.data.dataObj.text = this.editor.value}};dhtmlxFoldersJSBasedGeneric.prototype = new dhtmlxFoldersItem;function dhtmlxFoldersXMLBasedGeneric(){this.getDataItem = function(name){return};this.render = function(){if(this.item==null){this.item = document.createElement("DIV");this.item.itemObj = this;this.item.foldersObj = this.data.master};if(this.data.selected){this.item.className=this.css+"_selected"}else{this.item.className=this.css};var typeSettingsAr = this.data.master._userdataCol;for(var n=0;n<typeSettingsAr.length;n++){this.data.master.XMLLoader.setXSLParamValue(typeSettingsAr[n][0],typeSettingsAr[n][1])};this.data.master.XMLLoader.setXSLParamValue("editmode",!this.data.master._set.editable?"false":this.data.editmode.toString());this.data.master.XMLLoader.setXSLParamValue("selected",this.data.selected.toString());this.data.master.XMLLoader.setXSLParamValue("active",this.data.active.toString());this.item.innerHTML = this.data.master.XMLLoader.doXSLTransToString(undefined,this.data.dataObj);return this.item}};dhtmlxFoldersXMLBasedGeneric.prototype = new dhtmlxFoldersItem;function getPosition(oNode, pNode){if (!pNode)var pNode = document.body
 
 var oCurrentNode = oNode;var iLeft = 0;var iTop = 0;while ((oCurrentNode)&&(oCurrentNode != pNode)){iLeft+=oCurrentNode.offsetLeft-oCurrentNode.scrollLeft;iTop+=oCurrentNode.offsetTop-oCurrentNode.scrollTop;oCurrentNode=oCurrentNode.offsetParent};if (pNode == document.body){if (_isIE){if (document.documentElement.scrollTop)iTop+=document.documentElement.scrollTop;if (document.documentElement.scrollLeft)iLeft+=document.documentElement.scrollLeft}else if (!_isFF){iLeft+=document.body.offsetLeft;iTop+=document.body.offsetTop}};return new Array(iLeft+"px", iTop+"px")};dtmlXMLLoaderObject.prototype.xmlNodeToJSON = function(node){var t={};for (var i=0;i<node.attributes.length;i++)t[node.attributes[i].name]=node.attributes[i].value;t["_nodevalue"]=node.firstChild?node.firstChild.nodeValue:"";for (var i=0;i<node.childNodes.length;i++){var name=node.childNodes[i].tagName;if (name){if (!t[name])t[name]=[];t[name].push(this.xmlNodeToJSON(node.childNodes[i]))}};return t};dhtmlXFolders = dhtmlxFolders;(function(){dhtmlx.extend_api("dhtmlxFolders",{_init:function(obj){return [obj.parent]},
 context_menu:"enableContextMenu",
 css:"setCSSBaseName",
 drag:"enableDragAndDrop",
 image_path:"setImagePath",
 selection:"enableSelection",
 tag:"setItemTagName",
 type:"setItemType"
 },{})})();dhtmlxFolders.prototype.enableContextMenu=function(menu){this._ctmndx=menu};dhtmlxFolders.prototype.enableDragAndDrop=function(mode){if (convertStringToBoolean(mode)){this._drager=new dhtmlDragAndDropObject();this._drager.addDragLanding(this.cont,this)}else
 this._drager=null};dhtmlxFolders.prototype._createDragNode=function(htmlObject,e){var id=htmlObject.itemObj.data.id;this._dragged=[].concat(this._selectedCol);if (!this.matchSelected(null,id)){this.selectItem(id);this._dragged=[id]};if (this._dragged.length>1){var z=this._idpullCol[this._dragged[1]].item.cloneNode(true);var z2=this._idpullCol[this._dragged[0]].item.cloneNode(true);z2.style.left="10px";z2.style.top="10px";z2.className+=' dhx_DnD_drag';z.appendChild(z2)}else
 var z=htmlObject.cloneNode(true);z.className+=' dhx_DnD_drag';this._idpullCol[id].parentObject={id:id, ex:this, treeNod:{_nonTrivialNode:this._dragInTree,_nonTrivialRow:this._dragInGrid}};htmlObject.parentObject=this._idpullCol[id].parentObject;z._exp_id=id;return z};dhtmlxFolders.prototype._dragInTree=function(tree,tobj,bnod,item){var that=item.ex;for (var i=0;i<that._dragged.length;i++){var id=that._dragged[i];if (!tree.callEvent("onDrag",[id,tobj.id,null,this,tree])) continue;var text="new item";var src="leaf.gif";if (!bnod)tree.insertNewItem(tobj.id,id,text,src,src,src);else
 tree.insertNewNext(bnod.id,id,text,src,src,src);that.deleteItem(id)}};dhtmlxFolders.prototype._dragInGrid=function(grid,row,mode,item){var that=item.ex;for (var i=0;i<that._dragged.length;i++){var id=that._dragged[i];if (!grid.callEvent("onDrag",[id,row,this,tree])) continue;var text="new item";var src="leaf.gif";if (mode=="sibling")grid.addRow(id,[text],grid.getRowIndex(row));else
 tree.addRow(id,[text],null,row);that.deleteItem(id)}};dhtmlxFolders.prototype._drag=function(source,from,target,lastLanding){this.hideDnDSelection(true);var tid = 0;if (target.itemObj)tid=target.itemObj.data.id;if (source.itemObj && target.itemObj){if (!this.matchSelected(null,target.itemObj.data.id))
 this.getItem(target.itemObj.data.id).setSelectedState(false);if (source.itemObj.data.id==target.itemObj.data.id)return false;if (!this.callEvent("onBeforeDrop",[this._dndPos,this._getAllDragItemsIds(source),target.itemObj.data.id])) return false};var sid = null;for (var j=0;j<from._dragged.length;j++){if (from.mytype=="tree" ){sid=from._dragged[j].id}else if (from.rowsBuffer){sid=from._dragged[j].idd}else {sid=from._dragged[j]};if (!this.callEvent("onDrag",[sid,tid,this._dndPos,this,from])) return;if (from.mytype=="tree" ){this.addItem(sid,from.getItemText(sid),{id:target._exp_id,mode:this._dndPos});from.deleteItem(sid)}else if (from.rowsBuffer){this.addItem(sid,from.cells(sid,0).getValue(),{id:target._exp_id,mode:this._dndPos});from.deleteRow(sid)}else {this.moveItem(sid,this._dndPos,(tid||sid),from)}};from._dragged=null};dhtmlxFolders.prototype.hideDnDSelection=function(mode,left,top,dy){if(!this._DnDSel){this._DnDSel = new Array()};var orientat = this._getCurrentPlacementType();if (!this._DnDSel[orientat]){this._DnDSel[orientat]=document.createElement("IMG");this._DnDSel[orientat].className='dhx_DnD_selector';this._DnDSel[orientat].src=this.imgSrc+'dnd_selector_'+orientat+'.png';this._DnDSel[orientat].dragLanding=this;this.cont.appendChild(this._DnDSel[orientat])};if (mode)this._DnDSel[orientat].style.display="none";else {this._DnDSel[orientat].style.display="";this._DnDSel[orientat].style.top=top+"px";this._DnDSel[orientat].style.left=left+"px";this._DnDSel[orientat].style.width = "6px";this._DnDSel[orientat].style.height = "6px";if(orientat=="cells")this._DnDSel[orientat].style.height=dy+"px";else
 this._DnDSel[orientat].style.width=dy+"px"}};dhtmlxFolders.prototype._dragIn=function(htmlObject,shtmlObject,x,y){if (htmlObject.tagName=="IMG")htmlObject=this._lastDH;this._lastDH=htmlObject;if (!htmlObject.itemObj)return htmlObject;if (shtmlObject.itemObj && shtmlObject.itemObj.data.id==htmlObject.itemObj.data.id)return false;tObjWidth = htmlObject.offsetWidth;tObjHeight = htmlObject.offsetHeight;tObjTop = getAbsoluteTop(htmlObject);tObjLeft = getAbsoluteLeft(htmlObject);topCorrector = getAbsoluteTop(this.cont);leftCorrector = getAbsoluteLeft(this.cont);var ids = shtmlObject.itemObj?this._getAllDragItemsIds(shtmlObject):"0";if(this._getCurrentPlacementType()=="cells"){if(x-tObjLeft<tObjWidth/4 && this.callEvent("onBeforeDragIn",["before",ids,htmlObject.itemObj.data.id])){this.hideDnDSelection(false,tObjLeft-leftCorrector,tObjTop-topCorrector,tObjHeight)
 this._dndPos="before"}else if(x-tObjLeft>(tObjWidth/4)*3 && this.callEvent("onBeforeDragIn",["next",ids,htmlObject.itemObj.data.id])){this.hideDnDSelection(false,tObjLeft+tObjWidth-leftCorrector,tObjTop-topCorrector,tObjHeight);this._dndPos="next"}else if(this.callEvent("onBeforeDragIn",["in",ids,htmlObject.itemObj.data.id])){this._dndPos="in";this.hideDnDSelection(true);this.getItem(htmlObject.itemObj.data.id).setSelectedState(true)}}else if(this._getCurrentPlacementType()=="lines"){if(y-tObjTop<tObjHeight/4 && this.callEvent("onBeforeDragIn",["before",ids,htmlObject.itemObj.data.id])){this.hideDnDSelection(false,tObjLeft-leftCorrector,tObjTop-topCorrector,tObjWidth)
 this._dndPos="before"}else if(y-tObjTop>(tObjHeight/4)*3 && this.callEvent("onBeforeDragIn",["next",ids,htmlObject.itemObj.data.id])){this.hideDnDSelection(false,tObjLeft+tObjWidth-leftCorrector,tObjTop-topCorrector,tObjWidth);this._dndPos="next"}else if(this.callEvent("onBeforeDragIn",["in",ids,htmlObject.itemObj.data.id])){this._dndPos="in";this.hideDnDSelection(true);this.getItem(htmlObject.itemObj.data.id).setSelectedState(true)}};return htmlObject};dhtmlxFolders.prototype._dragOut=function(htmlObject){this.hideDnDSelection(true);if (!htmlObject.itemObj)return;if (!this.matchSelected(null,htmlObject.itemObj.data.id))
 this.getItem(htmlObject.itemObj.data.id).setSelectedState(false)};dhtmlxFolders.prototype._getAllDragItemsIds = function(sHTMLObj){var curItemId = sHTMLObj.itemObj.data.id;var selected = this.getSelectedId();if(typeof(selected)=="object"){for(var i=0;i<selected.length;i++){if(curItemId==selected[i])return selected};selected[selected.length] = curItemId;return selected}else if(selected!=null){if(selected!=curItemId)return [selected,curItemId];else
 return selected}else
 return curItemId};function dhtmlXTabBar(parentObject,mode,height){mode=mode||"top"
 dhtmlxEventable(this);this._hrefs = {};this._s={};this._c={};this._s.mode=mode;this._s.scrolls=true;this._s.line_height=(parseInt(height)||20)+3;this._s.skin_line = 1;this._s.tab_margin = 0;this._s.expand = 0;this._s._bMode=(mode=="right"||mode=="bottom")?1:0;this._s._vMode=(mode=="right"||mode=="left")?1:0;this._dx=this._s._vMode?"height":"width";this._dy=this._s._vMode?"width":"height";switch(mode){case "top":
 this._py="top";this._px="left";this._pxc="right";break;case "bottom":
 this._py="bottom";this._px="left";this._pxc="right";break;case "right":
 this._py="right";this._px="top";this._pxc="bottom";break;case "left":
 this._py="left";this._px="top";this._pxc="bottom";break};this._active= null;this._tabs = {};this._content = {};this._href={};this._rows=[];this._s._tabSize=150;this._styles={"default":{left:3, right:3, select_shift:3, select_top:2, margin:1, offset:5, tab_color:"#F4F3EE", data_color:"#F0F8FF" },
 "winbiscarf":{left:18, right:18, select_shift:3, select_top:2, margin:1, offset:5},
 "winscarf":{left:18, right:4, select_shift:3, select_top:2, margin:5, offset:5},
 "modern":{left:5, right:5, select_shift:3, select_top:2, margin:1, offset:5, tab_color:"#F4F3EE", data_color:"#F0F8FF" },
 "silver":{left:7, right:7, select_shift:3, select_top:2, margin:1, offset:5, tab_color:"#F4F3EE", data_color:"#F0F8FF" },
 "dark_blue":{left:2, right:2, select_shift:3, select_top:2, margin:1, offset:5 },
 "glassy_blue":{left:2, right:3, select_shift:3, select_top:2, margin:1, offset:5 },
 
 "dhx_black":{left:2, right:2, select_shift:3, select_top:0, margin:1, offset:5},
 "dhx_blue":{left:2, right:2, select_shift:3, select_top:0, margin:1, offset:5, tab_color:"#F4F3EE", data_color:"#F0F8FF" },
 "dhx_skyblue":{left:3, right:3, select_shift:1, select_top:0, margin:-1, offset:5 , data_color:"white", hover:true }};if (typeof(parentObject)!="object")
 parentObject = document.getElementById(parentObject);this.entBox=parentObject;this.entBox.className+=" dhx_tabbar_zone_"+this._s.mode;if (dhtmlx.image_path)this.setImagePath(dhtmlx.image_path);this.setStyle("default");this.skin = "";this._createSelf();if (_isIE)this.preventIECashing(true);return this};dhtmlXTabBar.prototype={_get_size:function(name,alter){var size = this.entBox.getAttribute(name) || this.entBox.style[name] || (window.getComputedStyle?window.getComputedStyle(this.entBox,null)[name]:(this.entBox.currentStyle?this.entBox.currentStyle[name]:0))
 if ((size||"").indexOf("%")!=-1)
 this.enableAutoReSize(true,true);if (!size||size.indexOf("%")!=-1||size=="auto")
 size=alter+"px";return size},
 
 setStyle:function(name){this.setSkin(name)},
 _getSkin:function(tab){return this._a},
 
 setSkin:function(name){name=name.toLowerCase();if (!this._styles[name])name="default";this._a=this._styles[name];this.skin=name;if (this._tabAll)this._tabAll.className='dhx_tabbar_zone dhx_tabbar_zone_'+this.skin;if (name.indexOf("dhx_")==0) 
 this._s.skin_line=0;if (name.indexOf("dhx_sky")==0) {this._s.line_height=26;this._setRowSizes();if (this._s.expand)this._s.tab_margin = -1;this._s.skin_line_x=true;this._s.skin_line=-3;var r = this._s._rendered;if (r)for (var i=0;i < r.length;i++){r[i].parentNode.removeChild(r[i])};var d1 = document.createElement("DIV");d1.className="dhx_tabbar_lineA";this._tabAll.appendChild(d1);var d2 = document.createElement("DIV");d2.className="dhx_tabbar_lineB";this._tabAll.appendChild(d2);var d3 = document.createElement("DIV");d3.className="dhx_tabbar_lineC";this._tabAll.appendChild(d3);var d4 = document.createElement("DIV");d4.className="dhx_tabbar_lineD";this._tabAll.appendChild(d4);this._getCoverLine();this._s._rendered = [d1,d2,d3,d4];if (this._s.expand){this._conZone.style.borderWidth="0px 0px 0px 0px";this._tabZone.firstChild.style.borderWidth="0px 0px 0px 0px";d3.style.borderWidth="0px 0px 0px 0px";d4.style.left="0px";d3.style.right="0px";d1.style.borderWidth="0px 0px 0px 0px";if (this._s.mode=="top")this._lineA.style.borderWidth="1px 0px 0px 0px";d2.style.left = "1px"
 };var f = function(){this._lineA.style[this._dx]="1px";var _quirks=(_isIE && document.compatMode == "BackCompat");var w = this._tabAll[this._s._vMode?"offsetHeight":"offsetWidth"]+(_quirks?2:0);if (this._lastActive)w=Math.max(w,this._lastActive.parentNode[this._s._vMode?"scrollHeight":"scrollWidth"]);if (w<6)return;d1.style[this._py]=parseInt(this._conZone.style[this._py])-3+"px";d1.style[this._dx]=w-2+"px";d2.style[this._py]=parseInt(this._conZone.style[this._py])-3+"px";d2.style[this._dx]=w-(_quirks?6:4)+(this._s.expand?2:0)+"px";d3.style[this._dy]=parseInt(this._tabZone.style[this._dy])-3+"px";this._lineA.style[this._dx]=w-2+"px"};f.call(this);var bf = this._checkScroll;this._checkScroll=function(){f.apply(this,arguments);bf.apply(this,arguments)};var bs = this._scrollTo;this._scrollTo=function(){bs.apply(this,arguments);f.apply(this,arguments)}};if (this._a.data_color && this._conZone)this._conZone.style.backgroundColor=this._a.data_color},

 
 enableAutoReSize:function(){var self=this;dhtmlxEvent(window,"resize",function(){window.setTimeout(function(){if (self && self._setSizes)self._setSizes()},1) 
 })
 },
 _createSelf:function(){this._tabAll=document.createElement("DIV");this._tabZone=document.createElement("DIV");this._conZone=document.createElement("DIV");this.entBox.appendChild(this._tabAll);this._tabAll.appendChild(this._tabZone);this._tabAll.appendChild(this._conZone);this._tabAll.className='dhx_tabbar_zone dhx_tabbar_zone_'+this.skin;if (this._s._vMode)this._tabAll.className+='V';if (this._s._bMode)this._tabAll.className+='B';this._tabZone.className='dhx_tablist_zone';this._conZone.className='dhx_tabcontent_zone';if (this._a.data_color)this._conZone.style.backgroundColor=this._a.data_color;this._tabZone.onselectstart = function(){return false};this._tabZone.onclick = this._onClickHandler;this._tabZone.onmouseover = this._onMouseOverHandler;this._tabZone[_isFF?"onmouseout":"onmouseleave"] = this._onMouseOutHandler;this._tabZone.tabbar=this;this._createRow()},
 _createRow:function(){var z=document.createElement("DIV");z.className='dhx_tabbar_row';z.tabCount=0;this._tabZone.appendChild(z);this._rows[this._rows.length]=z;this._setRowSizes()},
 _removeRow:function(row){row.parentNode.removeChild(row);var z=[];for (var i=0;i<this._rows.length;i++)if (this._rows[i]!=row)z[z.length]=this._rows[i];this._rows=z},
 _setSizes:function(x,y){var dim=["clientHeight","clientWidth"];if (this._dx!="width")dim.reverse();var _quirks=(_isIE && document.compatMode == "BackCompat");var outerBorder=(this._conZone.offsetWidth-this._conZone.clientWidth);var _h=y||(this.entBox[dim[0]]+(_quirks?outerBorder:0));var _w=x||(this.entBox[dim[1]]+(_quirks?outerBorder:0));var _t=this._rows.length*(this._s.line_height-(this._s.skin_line_x?4:2))+(this._s.skin_line_x?2:0);this._tabZone.style[this._dy]=_t+"px";this._conZone.style[this._dy]=Math.max(0,_h-_t-2-(this._s.skin_line_x?3:0)-this._s.tab_margin)+"px";this._conZone.style[this._dx]=Math.max(0,_w - (this._s.expand?0:2))+"px";this._tabZone.style[this._py]=this._s.tab_margin+"px";this._conZone.style[this._py]=_t+this._s.tab_margin-this._s.skin_line+"px";this._checkScroll();var id = this.getActiveTab();if (id)this.cells(id).activate()},
 _checkScroll:function(){if (this._s._vMode || !this._s.scrolls)return;for (var i=0;i<this._rows.length;i++)if ((this._rows[i].scrollWidth-this._rows[i].offsetWidth)>2)
 this._showScroll(i);else this._hideScroll(i)},

 _showScroll:function(i){if (this._rows[i]._scroll)return;var a=this._rows[i]._scroll=[];var top = Math.max(0,this._s.line_height-23);a[0]=document.createElement("DIV");a[0].style.cssText="background-image:url("+this.imgUrl+this.skin+"/"+this.skin+"_scroll_left.gif);width:20px;height:21px;position:absolute;left:0px;z-index:990;top:"+top+"px;";a[0].className="dhx_tab_scroll_left";this._rows[i].appendChild(a[0]);a[1]=document.createElement("DIV");a[1].style.cssText="background-image:url("+this.imgUrl+this.skin+"/"+this.skin+"_scroll_right.gif);width:20px;height:21px;position:absolute;right:0px;z-index:990;top:"+top+"px;";a[1].className="dhx_tab_scroll_right";this._rows[i].appendChild(a[1])},
 _hideScroll:function(i){if (!this._rows[i]._scroll)return;this._rows[i].removeChild(this._rows[i]._scroll[0])
 this._rows[i].removeChild(this._rows[i]._scroll[1])
 this._rows[i]._scroll=null},

 _setRowSizes:function(){for (var i=0;i<this._rows.length;i++){this._rows[i].style[this._dy]=this._s.line_height+"px";this._rows[i].style[this._py]=i*(this._s.line_height-(this._s.skin_line_x?4:2))-((_isIE && !window.postMessage && this._s._bMode)?0:0)+"px";this._rows[i].style.zIndex=10+i};this._setSizes()},
 _setTabSizes:function(row){var pos=this._a.offset;var px = this._vMode?this._pxc:this._px;for (var i=0;i < row.tabCount;i++){var tab=row.childNodes[i];if (tab.style.display=="none")continue;tab.style[px]=pos-(this._lastActive==tab?this._a.select_shift:0)+"px";pos+=tab._size+this._a.margin}},

 
 addTab:function(id, text, size, position, row){if (!this.skin && dhtmlx.skin)this.setSkin(dhtmlx.skin);row=row||0;for (var i=this._rows.length;i<=row;i++)this._createRow();var z=this._rows[row].tabCount;if ((!position)&&(position!==0)) position=z;var tab=this._createTab(id, text, (size=="*"?10:size||this._s._tabSize));this._addTab(this._rows[row],tab,size,position);this._tabs[id]=tab;this.cells(id).hide();this._checkScroll()},

 
 removeTab:function(id,mode){var tab=this._tabs[id];if (!tab)return;this.cells(id)._dhxContDestruct();this._content[id].parentNode.removeChild(this._content[id]);this._content[id]=null;this._goToAny(tab,mode);var row=tab.parentNode;row.removeChild(tab);row.tabCount--;if ((row.tabCount==0)&&(this._rows.length>1))
 this._removeRow(row);else
 this._setTabSizes(row);delete this._tabs[id];if (this._lastActive==tab)this._lastActive=null;this._setRowSizes()},
 _goToAny:function(tab,mode){if (this._lastActive==tab){if (mode)this.goToNextTab();else this._lastActive=null}},
 _createTab:function(id,text,size){var tab=document.createElement("DIV");tab.className='dhx_tab_element dhx_tab_element_inactive';var thml="<span>"+text+"</span><div></div><div></div><div></div>";if (this._close)thml+="<IMG style='"+this._pxc+":4px;"+this._py+":4px;position:absolute;' src='"+this.imgUrl+this.skin+"/close.png' >"
 tab.innerHTML=thml;tab.setAttribute("tab_id",id);tab._size=parseInt(size);tab.style[this._dx]=parseInt(size)+"px";tab.style[this._dy]=this._s.line_height+"px";tab.style[this._py]=this._a.select_top+"px";tab.skin=this.skin;if (this._a.tab_color)tab.style.backgroundColor=this._a.tab_color;if (this._c[id])tab.childNodes[0].style.cssText=this._c[id].color;this._img_all(tab);if (this._close){var self=this;tab.childNodes[4].onclick=function(e){var id=this.parentNode.getAttribute("tab_id");if (self.callEvent("onTabClose",[id])) self.removeTab(id,true);(e||event).cancelBubble=true}};return tab},
 _img_all:function(tab){var a=this._getSkin(tab);var pf=tab._active?1:4;this._img(tab.childNodes[1],pf,this._px,a.left);this._img(tab.childNodes[2],pf+2,this._pxc,a.right);this._img(tab.childNodes[3],pf+1,this._px,parseInt(tab.style[this._dx])-(a.left+a.right),a.left)},
 _get_img_pos:function(ind){if (this._s._bMode && ind<7)ind=Math.abs(ind-6);ind=-5-ind*45;if (this._s._vMode)return ind+"px 0px";else return "0px "+ind+"px"},
 _img:function(tag,y,pos,a,b){tag.style.backgroundImage="url("+this.imgUrl+this.skin+"/"+this.skin+"_"+this._s.mode+".gif)";tag.style.backgroundPosition=this._get_img_pos(y);tag.style[this._py]="0px";if (pos){tag.style[this._dx]=a+"px";tag.style[pos]=(b||0)+"px"}},
 _addTab:function(row,tab,size,position){var pos=this._a.offset;if (row.tabCount){var last=row.childNodes[row.tabCount-1];var pos=parseInt(last.style[this._s.align?this._pxc:this._px])+parseInt(last._size)+this._a.margin};var next=row.childNodes[position];if (next)row.insertBefore(tab,next)
 else
 row.appendChild(tab);row.tabCount++;if (size=="*"){tab.style.whiteSpace="nowrap";this.adjustTabSize(tab)};tab.style[this._s.align?this._pxc:this._px]=pos+"px";if (position!=row.tabCount-1)this._setTabSizes(row)},
 adjustTabSize:function(tab,size){var a=this._getSkin(a);if (!size){tab.style.fontWeight="bold";size=tab.scrollWidth+10+(this._close?20:0);tab.style.fontWeight=""};tab.style[this._dx]=size+"px";tab._size=size;this._img(tab.childNodes[3],5,this._px,size-(a.left+a.right),a.left)},
 _onMouseOverHandler:function(e){var target = this.tabbar._getTabTarget(e?e.target:event.srcElement);this.tabbar._showHover(target)},
 _onMouseOutHandler:function(e){this.tabbar._showHover()},
 _showHover:function(tab){if (tab==this._lastHower)return;if (this._lastHower && this._lastHower != this._lastActive){var a=this._getSkin(this._lastHower);this._lastHower.className=this._lastHower.className.replace(/[ ]*dhx_tab_hover/gi,"");if (a.hover)this._img_all(this._lastHower);else
 this._img(this._lastHower.childNodes[3],5,this._px,parseInt(this._lastHower.style[this._dx])-(a.left+a.right),a.left);this._lastHower=null};if (tab && ( tab == this._lastActive || tab._disabled)) return;this._lastHower=tab;if(tab){var a=this._getSkin(tab);tab.className+=" dhx_tab_hover";if (a.hover){this._img(tab.childNodes[1],7,this._px,a.left);this._img(tab.childNodes[2],8,this._pxc,a.right)};this._img(tab.childNodes[3],0,this._px,parseInt(tab.style[this._dx])-(a.left+a.right),a.left)}},
 _getTabTarget:function(t){if (!t)return null;while ((!t.className)||(t.className.indexOf("dhx_tab_element")==-1)){if ((t.className)&&(t.className.indexOf("dhx_tabbar_zone")!=-1)) return null;t=t.parentNode;if (!t)return null};return t},
 _onClickHandler:function(e){var src=e?e.target:event.srcElement;var target = this.tabbar._getTabTarget(src);if (target && !target._disabled)this.tabbar._setTabActive(target);else {var tag=null;if (src.className=="dhx_tab_scroll_left"){src.parentNode.scrollLeft=Math.max(0,src.parentNode.scrollLeft-src.parentNode.offsetWidth/2);tag=src;this.tabbar._setTabTop(this.tabbar._lastActive)}else if (src.className=="dhx_tab_scroll_right"){src.parentNode.scrollLeft+=src.parentNode.offsetWidth/2;tag=src.previousSibling;this.tabbar._setTabTop(this.tabbar._lastActive)};if (tag){tag.style.left=tag.parentNode.scrollLeft+"px";if (!_isIE || window.XMLHttpRequest)tag.nextSibling.style.right=tag.parentNode.scrollLeft*(-1)+"px";return false}}},
 _deactivateTab:function(){this._setTabInActive(this._lastActive);this._lastActive=null},
 _setTabInActive:function(tab,mode){if (!tab || tab!=this._lastActive)return true;var a = this._getSkin(tab);var id = tab.getAttribute("tab_id");var px = this._s.align?this._pxc:this._px;tab.className=tab.className.replace("_active","_inactive");tab.style[this._py]=a.select_top+"px";tab.style[px]=parseInt(tab.style[px])+a.select_shift+"px";tab.style[this._dx]=tab._size+"px";tab._active=false;if (a.tab_color)tab.style.backgroundColor=a.tab_color;if (this._c[id])tab.childNodes[0].style.cssText=this._c[id].color;this._img_all(tab);this.cells(id).hide()},
 _setTabActive:function(tab,mode){if (!tab || tab==this._lastActive)return true;var id = tab.getAttribute("tab_id");var last_id = this._lastActive?this._lastActive.getAttribute("tab_id"):null;var a = this._getSkin(tab);if (!mode)if (!this.callEvent("onSelect",[id,last_id])) return;var px = this._s.align?this._pxc:this._px;this._setTabInActive(this._lastActive);tab.className=tab.className.replace("_inactive","_active");tab.style[this._py]="0px";tab.style[px]=parseInt(tab.style[px])-a.select_shift+"px";tab.style[this._dx]=tab._size+a.select_shift*2+"px";tab._active=true;if (a.data_color)tab.style.backgroundColor=a.data_color;if (this._c[id])tab.childNodes[0].style.cssText=this._c[id].scolor;this._img_all(tab);this._setTabTop(tab);this._lastActive=tab;this.cells(id).show();this._scrollTo(tab);return true},
 _scrollTo:function(tab){if (!this._s.scrolls)return;if (tab.offsetLeft<tab.parentNode.scrollLeft || (tab.offsetLeft+tab.offsetWidth)>(tab.parentNode.scrollLeft+tab.parentNode.offsetWidth)){tab.parentNode.scrollLeft = tab.offsetLeft;var tag = tab.parentNode._scroll;if (tag && tag[0]){tag[0].style.left=tag[0].parentNode.scrollLeft+"px";if (!_isIE || window.XMLHttpRequest)tag[1].style.right=tag[1].parentNode.scrollLeft*(-1)+"px"}}},
 _setTabTop:function(tab){var t = this._rows.length-1;for (var i=0;i<this._rows.length;i++)if (this._rows[i]==tab.parentNode){var row=this._rows[i];if (i!=t){this._rows[i]=this._rows[t]
 this._rows[t]=row};var line=this._getCoverLine();row.appendChild(line);line.style[this._dx]="1px";var wh=(this._s._vMode?Math.max(this._tabZone.offsetHeight,row.scrollHeight):Math.max(this._tabZone.offsetWidth,row.scrollWidth));if (wh>0)line.style[this._dx]=wh+"px";tab.style.zIndex=(line._index++);break};this._setRowSizes()},
 _getCoverLine:function(){if (!this._lineA){this._lineA=document.createElement("div");this._lineA.className="dhx_tablist_line";this._lineA.style[this._py]=this._s.line_height-3-(this._s.skin_line_x?1:0)+"px";this._lineA.style[this._dx]="100%";this._lineA._index=1};this._lineA.style.zIndex=(this._lineA._index++);return this._lineA},
 cells:function(id){if (!this._tabs[id])return null;if (!this._content[id]){var d=document.createElement("DIV");d.style.cssText="width:100%;height:100%;visibility:hidden;overflow:hidden;position:absolute;top:0px;left:0px;";d.setAttribute("tab_id",id);d.skin = this.skin;this._conZone.appendChild(d);(new dhtmlXContainer(d)).setContent(d);this._content[id]=d;var self=this;d.show = function(){if (self._s.hide)this.style.display="";this.style.visibility="visible";this.style.zIndex="1";if (self._awdj || self._ahdj){var dim = this._getContentDim();if (self._awdj)self.entBox.style.width=dim[0]+2+"px";if (self._ahdj)self._tabAll.style.height = self.entBox.style.height=dim[1]+self._rows.length*(self._s.line_height-2)+(self._s.expand?0:2)+2+"px";self._setSizes();self._setTabTop(self._lastActive)};this._activate()};d.hide = function(){if (self._s.hide){this.style.visibility="visible";this.style.display="none"}else
 this.style.visibility="hidden";this.style.zIndex=-1;if (self._hrfmode=="iframe")this.attachURL("javascript:false")};d._activate=function(){if (this._delay)this._attachContent.apply(this,this._delay);this.activate();if (self._hrfmode!="iframe")this._delay=null};d.activate=function(){this.adjustContent(this.parentNode,0,0,false,0);d.updateNestedObjects()};d._doOnAttachStatusBar = d.activate;d._doOnAttachMenu = d.activate;d._doOnAttachToolbar = d.activate;d._getContentDim=function(){return [this.mainCont.scrollWidth,this.mainCont.scrollHeight]};d._doOnAttachURL=function(){self.callEvent("onXLE",[]);self.callEvent("onTabContentLoaded",[this.getAttribute("tab_id")])};d._doOnBeforeAttachURL=function(){self.callEvent("onXLS",[])};d.adjustContent(d.parentNode,0,0,false,0)};return this._content[id]},

 
 forceLoad:function(id,href){this.setContentHref(id,href||this._hrefs[id]);this.cells(id)._activate()},
 
 
 

 
 enableAutoSize:function(autoWidth,autoHeight){this._ahdj=convertStringToBoolean(autoHeight);this._awdj=convertStringToBoolean(autoWidth)},
 

 
 clearAll:function(){for (var id in this._tabs)this.removeTab(id,false);var line=this._getCoverLine();if (line.parentNode)line.parentNode.removeChild(line)},

 
 enableTabCloseButton:function(mode){this._close = convertStringToBoolean(mode)}, 
 
 
 preventIECashing:function(mode){this.no_cashe = convertStringToBoolean(mode);if (this.XMLLoader)this.XMLLoader.rSeed=this.no_cashe},

 
 setTabActive:function(id,mode){this._setTabActive(this._tabs[id],mode===false)},

 
 loadXMLString:function(xmlString,call){this.XMLLoader=new dtmlXMLLoaderObject(this._parseXML,this,true,this.no_cashe);this.XMLLoader.waitCall=call||0;this.XMLLoader.loadXMLString(xmlString)},

 
 loadXML:function(url,call){this.callEvent("onXLS",[]);this.XMLLoader=new dtmlXMLLoaderObject(this._parseXML,this,true,this.no_cashe);this.XMLLoader.waitCall=call||0;this.XMLLoader.loadXML(url)},
 _parseXML:function(that,a,b,c,obj){that.clearAll();var selected="";if (!obj)obj=that.XMLLoader;var atop=obj.getXMLTopNode("tabbar");var arows = obj.doXPath("//row",atop);var acs=atop.getAttribute("tabstyle");if (acs)that.setStyle(acs);that._hrfmode=atop.getAttribute("hrefmode")||that._hrfmode;that._a.margin =parseInt((atop.getAttribute("margin")||that._a.margin),10);acs=atop.getAttribute("align");if (acs)that._s.align = (acs=="right"||acs=="bottom");that._a.offset = parseInt((atop.getAttribute("offset")||that._a.offset),10);acs=atop.getAttribute("skinColors");if (acs)that.setSkinColors(acs.split(",")[0],acs.split(",")[1]);for (var i=0;i<arows.length;i++){var atabs = obj.doXPath("./tab",arows[i]);for (var j=0;j<atabs.length;j++){var width=atabs[j].getAttribute("width");var name=that._getXMLContent(atabs[j]);var id=atabs[j].getAttribute("id");that.addTab(id,name,width,"",i);if (atabs[j].getAttribute("selected")) selected=id;if (that._hrfmode)that.setContentHref(id,atabs[j].getAttribute("href"));else
 for (var k=0;k<atabs[j].childNodes.length;k++){var cont=atabs[j].childNodes[k];if (cont.tagName=="content"){if (cont.getAttribute("id"))
 that.setContent(id,cont.getAttribute("id"));else
 that.setContentHTML(id,that._getXMLContent(cont))}}}};if (selected)that.setTabActive(selected);that.callEvent("onXLE",[])},
 adjustOuterSize:function(){this._setSizes()},
 _getXMLContent:function(node){var text="";for (var i=0;i<node.childNodes.length;i++){var z=node.childNodes[i];text+=(z.nodeValue===null?"":z.nodeValue)};return text},

 
 enableContentZone:function(mode){this._conZone.style.display=((convertStringToBoolean(mode))?"":"none");this._setSizes()},

 enableForceHiding:function(mode){this._s.hide=convertStringToBoolean(mode)},


 
 setSize:function(x,y){this.entBox.style.width=x+"px";this.entBox.style.height=y+"px";this._setSizes()},

 
 setSkinColors:function(a,b){if (a)this._a.tab_color=a;if (b)this._a.data_color=b;this._conZone.style.backgroundColor=b},

 
 setCustomStyle:function(id,color,scolor,style){var str="";this._c[id]={color:(";"+(color?("color:"+color+";"):"")+(style||"")),
 scolor:(";"+(scolor?("color:"+scolor+";"):"")+(style||""))
 };if (this._tabs[id])this._tabs[id].childNodes[0].style.cssText=((this._tabs[id]==this._lastActive)?this._c[id].scolor:this._c[id].color)},

 
 setImagePath:function(url){this.imgUrl=url},
 getNext:function(tab,alt){alt=alt||"nextSibling";var next=tab[alt];if (next && next.className.indexOf("dhx_tab_element")==-1) next=null;if (!next && tab.parentNode[alt])next=tab.parentNode[alt].childNodes[0];return next||tab},

 
 goToNextTab:function(tab){do {tab=this.getNext(tab||this._lastActive)}while (!this._setTabActive(tab))},

 
 goToPrevTab:function(tab){do {tab=this.getNext((tab||this._lastActive),"previousSibling")}while (!this._setTabActive(tab))},

 
 disableTab:function(id){this._tabs[id]._disabled=true;this._tabs[id].style.color="silver"},

 
 enableTab:function(id){this._tabs[id]._disabled=false;this._tabs[id].style.color=""},

 
 showTab:function(id){var tab=this._tabs[id];tab.style.display="";this._setTabSizes(tab.parentNode)},

 
 hideTab:function(id){var tab=this._tabs[id];tab.style.display="none";if (tab == this._lastActive)this.goToNextTab();this._setTabSizes(tab.parentNode)},

 
 getActiveTab:function(){if (!this._lastActive)return null;return this._lastActive.getAttribute("tab_id")},

 
 setLabel:function(id,text){this._tabs[id].firstChild.innerHTML=text},

 getLabel:function(id){return this._tabs[id].firstChild.innerHTML}, 

 
 setOffset:function(n){this._a.offset=n*1},

 enableScroll:function(mode){this._s.scrolls=convertStringToBoolean(mode)},

 
 setMargin:function(n){this._a.margin=n*1},

 
 setAlign:function(n){this._s.align=(n=="bottom"||n=="right")},

 tabWindow:function(tab_id){return (this._content[tab_id]?this._content[tab_id]._frame.contentWindow:null)},
 
 setContentHTML:function(id,value){this.cells(id).attachHTMLString(value)},

 
 setContent:function(id,value){this.cells(id).attachObject(value);this.cells(id).activate()},

 
 setHrefMode:function(mode){this._hrfmode=mode}, 

 
 setContentHref:function(id,href){this._hrefs[id]=href;switch (this._hrfmode){case "iframes":
 this.cells(id).attachURL(href);break;case "iframe":
 case "iframes-on-demand":
 this.cells(id)._delay=["url",href,false];break;case "ajax":
 var cell=this.cells(id);var that=this;cell._delay=["urlajax",href,true];cell.attachHTMLStringA=cell.attachHTMLString;cell.attachHTMLString=function(str,xml){if (xml)str=that._getXMLContent(xml.doXPath("//content")[0]);return this.attachHTMLStringA(str)};break;case "ajax-html":
 this.cells(id)._delay=["urlajax",href,true];break};if (this._tabs[id]==this._lastActive)this.cells(id).show(true)},



 normalize:function(limit,full){limit=limit||this._tabZone.offsetWidth;function correct_size(tab,i){tabs[i]._size=tabs[i]._size+prev_size-size;tab.adjustTabSize(tabs[i],tabs[i]._size)};var tabs=[];for (var j=0;j<this._rows.length;j++)for (var i=0;i<this._rows[j].tabCount;i++)tabs.push(this._rows[j].removeChild(this._rows[j].childNodes[0]));this._tabZone.innerHTML="";this._rows=[];var t = this._lastActive;this._lastActive=null;this._createRow();var row=0;var size=this._a.offset;var prev_size=Infinity;var last_tab=null;var i=0;for (i;i<tabs.length;i++)if ((size + tabs[i]._size + this._a.margin)< limit){this._rows[row].appendChild(tabs[i]);this._rows[row].tabCount++;size+=tabs[i]._size + this._a.margin}else {if (full && size<prev_size)correct_size(this,i-1);this._createRow();i--;row++;prev_size=size;size=this._a.offset;continue};if (full && size<prev_size && prev_size!=Infinity)correct_size(this,i-1);for (var j=0;j < this._rows.length;j++)this._setTabSizes(this._rows[j]);this._setSizes();if (this._lastActive=t)this._setTabTop(this._lastActive)},

 showInnerScroll:function(){for (var i in this._tabs)this.cells(i).dhxcont.mainCont.style.overflow="auto"},
 
 
 getNumberOfTabs:function (){var tc = 0;for(var i=0;i<this._rows.length;i++)tc+=this._rows[i].tabCount;return tc}};if (!window.dhtmlXContainer){window.dhtmlXContainer=function(obj) {var that = this;this.obj = obj;this.dhxcont = null;this.setContent = function(data) {this.dhxcont = data;this.dhxcont.innerHTML = "<div id='dhxMainCont' class='dhxcont_main_content'></div>"+
 "<div id='dhxContBlocker' class='dhxcont_content_blocker' style='display: none;'></div>";this.dhxcont.mainCont = this.dhxcont.childNodes[0];this.obj.dhxcont = this.dhxcont};this.obj._genStr = function(w) {var s = "";var z = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";for (var q=0;q<w;q++){s = s + z.charAt(Math.round(Math.random() * z.length))};return s};this.obj.setMinContentSize = function(w, h) {this._minDataSizeW = w;this._minDataSizeH = h};this.obj.moveContentTo = function(cont) {cont.updateNestedObjects()};this.obj.adjustContent = function(parentObj, offsetTop, marginTop, notCalcWidth, offsetBottom) {this.dhxcont.style.top = offsetTop+"px";this.dhxcont.style.left = "0px";if (notCalcWidth == true){}else {this.dhxcont.style.width = parentObj.clientWidth+"px"};var px = parentObj.clientHeight-offsetTop;if (px < 0){px = 0};this.dhxcont.style.height = px+(marginTop!=null?marginTop:0)+"px";if (notCalcWidth == true){}else {if (this.dhxcont.offsetWidth > parentObj.clientWidth){this.dhxcont.style.width = Math.max(0,parentObj.clientWidth*2-this.dhxcont.offsetWidth)+"px"}};if (this.dhxcont.offsetHeight > parentObj.clientHeight - offsetTop){var px = (parentObj.clientHeight-offsetTop)*2-this.dhxcont.offsetHeight;if (px < 0){px = 0};this.dhxcont.style.height = px+"px"};if (offsetBottom){if (!isNaN(offsetBottom)) this.dhxcont.style.height = parseInt(this.dhxcont.style.height)-offsetBottom+"px"};if (this._minDataSizeH != null){if (parseInt(this.dhxcont.style.height)< this._minDataSizeH) {this.dhxcont.style.height = this._minDataSizeH+"px"}};if (this._minDataSizeW != null){if (parseInt(this.dhxcont.style.width)< this._minDataSizeW) {this.dhxcont.style.width = this._minDataSizeW+"px"}};if (notCalcWidth == true){}else {this.dhxcont.mainCont.style.width = this.dhxcont.clientWidth+"px"};var menuOffset = (this.menu!=null?(!this.menuHidden?this.menuHeight:0):0);var toolbarOffset = (this.toolbar!=null?(!this.toolbarHidden?this.toolbarHeight:0):0);var statusOffset = (this.sb!=null?(!this.sbHidden?this.sbHeight:0):0);this.dhxcont.mainCont.style.height = this.dhxcont.clientHeight-menuOffset-toolbarOffset-statusOffset+"px"};this.obj.updateNestedObjects = function() {};this.obj.attachObject = function(obj, autoSize) {if (typeof(obj)== "string") {obj = document.getElementById(obj)};if (autoSize){obj.style.visibility = "hidden";obj.style.display = "";var objW = obj.offsetWidth;var objH = obj.offsetHeight};this._attachContent("obj", obj);if (autoSize && this._isWindow){obj.style.visibility = "visible";this._adjustToContent(objW, objH)}};this.obj.appendObject = function(obj) {if (typeof(obj)== "string") {obj = document.getElementById(obj)};this._attachContent("obj", obj, true)};this.obj.attachHTMLString = function(str) {this._attachContent("str", str);var z=str.match(/<script[^>]*>[^\f]*?<\/script>/g)||[];for (var i=0;i<z.length;i++){var s=z[i].replace(/<([\/]{0,1})script[^>]*>/g,"")
 if (window.execScript)window.execScript(s);else window.eval(s)}};this.obj.attachURL = function(url, ajax) {this._attachContent((ajax==true?"urlajax":"url"), url, false)};this.obj._attachContent = function(type, obj, append) {if (append !== true){while (that.dhxcont.mainCont.childNodes.length > 0){that.dhxcont.mainCont.removeChild(that.dhxcont.mainCont.childNodes[0])}};if (type == "url"){var fr = document.createElement("IFRAME");fr.frameBorder = 0;fr.border = 0;fr.style.width = "100%";fr.style.height = "100%";that.dhxcont.mainCont.appendChild(fr);fr.src = obj;this._frame = fr;if (this._doOnAttachURL)this._doOnAttachURL(true)}else if (type == "urlajax"){var t = this;var xmlParser=function(){t.attachHTMLString(this.xmlDoc.responseText,this);if (t._doOnAttachURL)t._doOnAttachURL(false);this.destructor()};var xmlLoader = new dtmlXMLLoaderObject(xmlParser, window);xmlLoader.loadXML(obj);if (t._doOnBeforeAttachURL)t._doOnBeforeAttachURL(false)}else if (type == "obj"){that.dhxcont._frame = null;that.dhxcont.mainCont.appendChild(obj);that.dhxcont.mainCont.style.overflow = (append===true?"auto":"hidden");obj.style.display = ""}else if (type == "str"){that.dhxcont._frame = null;that.dhxcont.mainCont.innerHTML = obj}};this.obj._dhxContDestruct = function() {}}};(function(){dhtmlx.extend_api("dhtmlXTabBar",{_init:function(obj){return [obj.parent,obj.mode,obj.height]},
 tabs:"tabs",
 skin:"setSkin",
 offset:"setOffset",
 margin:"setMargin",
 image_path:"setImagePath",
 href_mode:"setHrefMode",
 align:"setAlign",
 xml:"loadXML",
 close_button:"enableTabCloseButton",
 scroll:"enableScroll",
 forced:"enableForceHiding",
 content_zone:"enableContentZone",
 size_by_content:"enableAutoSize",
 auto_size:"enableAutoReSize"
 },{tabs:function(arr){for (var i=0;i<arr.length;i++){var t=arr[i];this.addTab(t.id,t.label, t.width, t.index, t.row);if (t.active)this.setTabActive(t.id)}}})})();function dhx_init_tabbars(){var z=document.getElementsByTagName("div");for (var i=0;i<z.length;i++)if(z[i].className.indexOf("dhtmlxTabBar")!=-1){var n=z[i];var id=n.id;n.className="";var k=new Array();for (var j=0;j<n.childNodes.length;j++)if (n.childNodes[j].tagName && n.childNodes[j].tagName!="!")k[k.length]=n.childNodes[j];var w=new dhtmlXTabBar(id,n.getAttribute("mode")||"top",n.getAttribute("tabheight")||20);window[id]=w;acs=n.getAttribute("onbeforeinit");if (acs)eval(acs);if (n.getAttribute("enableForceHiding")) w.enableForceHiding(true);w.setImagePath(n.getAttribute("imgpath"));var acs=n.getAttribute("margin");if (acs!=null)w._margin=acs;acs=n.getAttribute("align");if (acs)w._align=acs;acs=n.getAttribute("hrefmode");if (acs)w.setHrefMode(acs);acs=n.getAttribute("offset");if (acs!=null)w._offset=acs;acs=n.getAttribute("tabstyle");if (acs!=null)w.setStyle(acs);acs=n.getAttribute("select");var clrs=n.getAttribute("skinColors");if (clrs)w.setSkinColors(clrs.split(",")[0],clrs.split(",")[1]);for (var j=0;j<k.length;j++){var m=k[j];m.parentNode.removeChild(m)
 w.addTab(m.id,m.getAttribute("name"),m.getAttribute("width"),null,m.getAttribute("row"));var href=m.getAttribute("href");if (href)w.setContentHref(m.id,href);else w.setContent(m.id,m);if ((!w._dspN)&&(m.style.display=="none"))
 m.style.display=""};if (k.length)w.setTabActive(acs||k[0].id);acs=n.getAttribute("oninit");if (acs)eval(acs)}};dhtmlxEvent(window,"load",dhx_init_tabbars);function dhtmlxSlider(base,size,skin,vertical,min,max,value,step){if (_isIE)try {document.execCommand("BackgroundImageCache", false, true)}catch (e){};var parentNod;if (base && typeof(base)=="object" && !base.nodeName){parentNod=base.parent;skin=base.skin;min=base.min;max=base.max
 step=base.step
 vertical=base.vertical
 value=base.value;size=base.size};if (!base){var z="slider_div_"+(new Date()).valueOf()+Math.random(1000);parentNod = document.createElement ("div");parentNod.setAttribute ("id", z);var child = document.body.lastChild;while (child.lastChild && child.lastChild.nodeType == 1)child=child.lastChild;child.parentNode.insertBefore(parentNod,child)}else if (typeof(base)!="object")
 parentNod=document.getElementById(base);else
 parentNod = base;if (typeof(size)=="object"){skin=size.skin;min=size.min;max=size.max
 step=size.step
 vertical=size.vertical
 value=size.value;size=size.size};this.size = size;this.vMode=vertical||false;this.skin = dhtmlx.skin || skin || "default";this.parent = parentNod;this.isInit = false;this.disabled = false;this.value = value || min || 0;this.inputPriority = true;this.stepping = false;this.imgURL = window.dhx_globalImgPath||dhtmlx.image_path||"";this._skinsImgs = 
 {"default": {ls:1,lz:1,rz:1,rs:1},
 ball: {ls:1,lz:1,rz:1,rs:1},
 zipper: {bg:1,lz:1,rz:1},
 arrow: {bg:1,ls:1,rs:1},
 arrowgreen: {bg:1,ls:1,rs:1},
 simplesilver:{lz:1,ls:1,rs:1,rz:1},
 simplegray: {lz:1,ls:1,rs:1,rz:1},
 bar: {bg:1,ls:1,rs:1},
 dhx_skyblue: {bg:1,ls:1,rs:1}};this._def = [min-0||0,max-0||100,step-0||1,value-0||0,size-0];dhtmlxEventable(this);return this};dhtmlxSlider.prototype.createStructure = function(){if (this.con){this.con.parentNode.removeChild(this.con);this.con = null};if (this.vMode){this._sW="height";this._sH="width";this._sL="top";this._sT="left";var skinImgPath = this.imgURL+"skins/"+this.skin+"/vertical/"}else {this._sW="width";this._sH="height";this._sL="left";this._sT="top";var skinImgPath = this.imgURL+"skins/"+this.skin+"/"};this.con=document.createElement("DIV");this.con.onselectstart=function(){return false};this.con._etype="slider";this.con.className = "dhtmlxSlider" + (this.skin!='default'?"_"+this.skin:"");if (this._skinsImgs[this.skin]['bg'])this.con.style.backgroundImage = "url("+skinImgPath+"bg.gif)";this.drag=document.createElement("DIV");this.drag._etype="drag";this.drag.className = "selector";this.drag.style.backgroundImage = "url("+skinImgPath+"selector.gif)";var leftSide = document.createElement("DIV");leftSide.className = "leftSide";if (this._skinsImgs[this.skin]['ls'])leftSide.style.background = "url("+skinImgPath+"leftside_bg.gif)";this.leftZone = document.createElement("DIV");this.leftZone.className = "leftZone";if (this._skinsImgs[this.skin]['lz'])this.leftZone.style.background = "url("+skinImgPath+"leftzone_bg.gif)";this.leftZone.style.width = this.value + 'px';var rightSide = document.createElement("DIV");rightSide.className = "rightSide";if (this._skinsImgs[this.skin]['rs'])rightSide.style.background = "url("+skinImgPath+"rightside_bg.gif)";this.rightZone = document.createElement("DIV");this.rightZone.className = "rightZone";if (this._skinsImgs[this.skin]['rz'])this.rightZone.style.background = "url("+skinImgPath+"rightzone_bg.gif)";this.con.appendChild(leftSide);this.con.appendChild(this.leftZone);this.con.appendChild(this.rightZone);this.con.appendChild(rightSide);this.con.appendChild(this.drag);this.parent.appendChild(this.con);if (!this.parent.parentNode || !this.parent.parentNode.tagName)document.body.appendChild(this.parent);if (this.vMode){this._sW="height";this._sH="width";this._sL="top";this._sT="left";this.con.style.width = this.con.offsetHeight + 'px';for (var i=0;i<this.con.childNodes.length;i++){this.con.childNodes[i].style.fontSize = "0";var tmp = this.con.childNodes[i].offsetWidth;this.con.childNodes[i].style.width = this.con.childNodes[i].offsetHeight + 'px';this.con.childNodes[i].style.height = tmp + 'px';tmp = this.con.childNodes[i].offsetLeft;this.con.childNodes[i].style.left = this.con.childNodes[i].offsetTop + 'px';this.con.childNodes[i].style.top = tmp + 'px'};rightSide.style.top = this.size - rightSide.offsetHeight + 'px';this.zoneSize = this.size - rightSide.offsetHeight;this.dragLeft = this.drag.offsetTop;this.dragWidth = this.drag.offsetHeight;this.rightZone.style.height = this.zoneSize + 'px'}else {this.zoneSize = this.size - rightSide.offsetWidth;this.dragLeft = this.drag.offsetLeft;this.dragWidth = this.drag.offsetWidth;this.rightZone.style.width = this.zoneSize + 'px'};this.con.style[this._sW] = this.size+"px";this.con.onmousedown=this._onMouseDown;this.con.onmouseup = this.con.onmouseout = function () {clearInterval (this.that._int)};this.con.that = this;this._aCalc(this._def)};dhtmlxSlider.prototype._aCalc=function(def){if (!this.isInit)return;this.shift=def[0];this.limit=def[1]-this.shift;this._mod=(def[4]-this.dragLeft*2-this.dragWidth)/this.limit;this._step=def[2];this.step=this._step*this._mod;this._xlimit=def[4]-this.dragLeft*2-this.dragWidth;if (!this.posX){this.posX=this._xlimit*(def[3]-this.shift)/this.limit};this._applyPos(true);return this};dhtmlxSlider.prototype.setMin=function(val){this._def[0] = val-0;this._aCalc(this._def)};dhtmlxSlider.prototype.setMax=function(val){this._def[1] = val-0;this._aCalc(this._def)};dhtmlxSlider.prototype.setStep=function(val){this._def[2] = val-0;this._aCalc(this._def)};dhtmlxSlider.prototype._applyPos=function(skip){if (!this.isInit)return;if (this.step!=1)this.posX=Math.round(this.posX/this.step)*this.step;if (this.posX<0)this.posX=0;if (this.value < (this._def[0] || 0))
 this.value = this._def[0] || 0;if (this.value > this._def[1])this.value = this._def[1];if (this.posX>this._xlimit)this.posX=this._xlimit;var a_old=this.drag.style[this._sL];this.drag.style[this._sL]=this.posX+this.dragLeft*1+"px";this.leftZone.style[this._sW]=this.posX+this.dragLeft*1+"px";this.rightZone.style[this._sL]=this.posX+this.dragLeft*1+1+"px";this.rightZone.style[this._sW]=this.zoneSize-(this.posX+this.dragLeft*1)+"px";var nw=this.getValue();if (this._link){if (this._linkBoth)this._link.value=nw;else
 this._link.innerHTML=nw};if (!skip&&a_old!=this.drag.style[this._sL])this.callEvent("onChange",[nw,this]);this.value = this.getValue ();if(!this._dttp)this._setTooltip(nw)};dhtmlxSlider.prototype._setTooltip=function(nw){this.con.title=nw};dhtmlxSlider.prototype.setSkin=function(skin) {this.skin = skin||"default";if (this.isInit)this.createStructure()};dhtmlxSlider.prototype.startDrag = function(e) {if (this._busy)return;if ((e.button === 0)|| (e.button === 1)) {this.drag_mx = e.clientX;this.drag_my = e.clientY;this.drag_cx = this.posX;this.d_b_move = document.body.onmousemove;this.d_b_up = document.body.onmouseup;var _c=this;document.body.onmouseup = function(e){_c.stopDrag(e||event);_c=null};document.body.onmousemove = function (e) {_c.onDrag(e||event)};this._busy=true}};dhtmlxSlider.prototype.onDrag = function(e) {if (this._busy){if (!this.vMode)this.posX = this.drag_cx + e.clientX - this.drag_mx;else
 this.posX = this.drag_cx + e.clientY - this.drag_my;this._applyPos()}};dhtmlxSlider.prototype.stopDrag = function(e) {document.body.onmousemove = this.d_b_move?this.d_b_move:null;document.body.onmouseup = this.d_b_up?this.d_b_up:null;this.d_b_move=this.d_b_up=null;this._busy=false;this.callEvent("onSlideEnd",[this.getValue()])
};dhtmlxSlider.prototype.getValue=function(){if ((!this._busy)&& (this.inputPriority))
 return (Math.round (this.value / this._step) * this._step).toFixed(6)-0;return Math.round((Math.round((this.posX/this._mod)/this._step)*this._step+this.shift*1)*10000)/10000};dhtmlxSlider.prototype.setValue=function(val, skip){if (isNaN(val)) return;this._def[3] = this.value = val-0;this.posX=(Math.round(((val||0)-this.shift)*this._mod))
 this._applyPos(skip==null?true:skip)};dhtmlxSlider.prototype._getActionElement=function(nod){if (nod._etype)return nod;if (nod.parentNode)return this._getActionElement(nod.parentNode);return null};dhtmlxSlider.prototype._onMouseDown=function(e){if(this.that.disabled)return;e=e||event;var that=this.that;var nod=that._getActionElement(_isIE?e.srcElement:e.target);switch (nod._etype){case "slider":
 if (that.vMode)var z=e.clientY-(getAbsoluteTop(that.con)-document.body.scrollTop);else
 var z=e.clientX-(getAbsoluteLeft(that.con)-document.body.scrollLeft);var posX = that.posX;that.posX = z-that.dragLeft-that.dragWidth/2;that.direction = that.posX > posX ? 1 : -1;if (that.stepping){clearInterval (that._int);that.setValue (that.value + that._step * that.direction, false);that._int = setInterval (function () {that.setValue (that.value + that._step * that.direction, false)}, 600)}else 
 {that._busy=true;that._applyPos();that._busy = false};break;case "drag":
 that.startDrag(e||event);break};return false};dhtmlxSlider.prototype.setOnChangeHandler=function(func){this.attachEvent("onChange",func)};dhtmlxSlider.prototype._linkFrom=function(){if(this.disabled)return;this.setValue (parseFloat (this._link.value), false)};dhtmlxSlider.prototype.linkTo=function(obj){obj = (typeof(obj) != "object") ? document.getElementById(obj) : obj;this._link = obj;var name=obj.tagName.toString().toLowerCase();this._linkBoth=(((name=="input")||(name=="select")||(name=="textarea"))?1:0);if (this._linkBoth){var self=this;var f=function(){if (this._nextSlider)window.clearTimeout(this._nextSlider);this._nextSlider=window.setTimeout(function(){self._linkFrom()},500)};obj.onblur=obj.onkeypress=obj.onchange=f};this._applyPos()};dhtmlxSlider.prototype.enableTooltip=function(mode){this._dttp=(!convertStringToBoolean(mode));this._setTooltip(this._dttp?"":this.getValue())};dhtmlxSlider.prototype.setImagePath = function(path){this.imgURL = path};dhtmlxSlider.prototype.init = function() {this.isInit = true;this.createStructure()};dhtmlxSlider.prototype.setInputPriority = function (mode) {this.inputPriority = mode};dhtmlxSlider.prototype.setSteppingMode = function (mode) {this.stepping = mode};dhtmlxSlider.prototype.disable = function (mode) {this.disabled = mode};(function(){dhtmlx.extend_api("dhtmlxSlider",{_init:function(obj){return [ obj.parent, obj.size, obj.skin, obj.vertical, obj.min, obj.max, obj.value, obj.step ]},
 link:"linkTo"
 },{})})();dhtmlx.skin='dhx_skyblue';