//v.2.0 build 81107 /* Copyright DHTMLX LTD. http://www.dhtmlx.com To use this component please contact sales@dhtmlx.com to obtain license */ function dhtmlXMenuObject(baseId, skin) {var main_self = this;this.addBaseIdAsContextZone = null;this.skin = (skin!=null?skin:"dhx_blue");this.skinPath = "imgs/"+this.skin;this.imagePath = this.skinPath;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";this.base._autoSkinUpdate = true;this.addBaseIdAsContextZone = baseId}else {this.base = document.body}};this.topId = "dhxWebMenuTopId";this.menu = new Array();this.subMenuData = new Array();this.menuSelected = -1;this.menuLastClicked = -1;this.idPrefix = "";this.itemTagName = "item";this.itemTextTagName = "itemtext";this.userDataTagName = "userdata";this.itemTipTagName = "tooltip";this.itemHotKeyTagName = "hotkey";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.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._arrowFFFix = (_isIE ? 0 : -4);this.setSkin = function(skin) {var oldSkin = this.skin;this.skin = skin;switch (this.skin){case "standard": this._topLevelBottomMargin = 1;this._arrowFFFix = (_isIE ? 0 : -4);break;case "clear_blue": case "clear_green": case "clear_silver": this._topLevelBottomMargin = 3;this._arrowFFFix = (_isIE ? 0 : -4);break;case "aqua_orange": case "aqua_sky": case "aqua_dark": this._topLevelBottomMargin = 1;this._arrowFFFix = (_isIE ? 0 : -2);break;case "modern_blue": case "modern_red": case "modern_black": this._topLevelBottomMargin = 3;this._arrowFFFix = (_isIE ? 0 : -2);break;case "glassy_blue": this._topLevelBottomMargin = 0;break;case "dhx_black": case "dhx_blue": this._topLevelBottomMargin = 2;this._topLevelRightMargin = 1;break};if (this.base._autoSkinUpdate){this.base.className = this.base.className.replace("dhtmlxMenu_"+oldSkin+"_Middle", "")+" dhtmlxMenu_"+this.skin+"_Middle"}};this.setSkin(this.skin);this.dLoad = false;this.dLoadUrl = "";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.sxDacProc = null;this.dacSpeed = 30;this.dacCycles = [];for (var q=0;q<10;q++){this.dacCycles[q] = q};this.dacSpeedIE = 60;this.dacCyclesIE = [];for (var q=0;q<3;q++){this.dacCyclesIE[q] = q*2+1};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 0 && this.limit < itemCount){var auId = "arrowup_"+id;var adId = "arrowdown_"+id;if (this.idPull["arrowup_"+id] != null){arrowUp = this.idPull["arrowup_"+id];arrowUp.style.visibility = "hidden";arrowUp.style.display = "";arrowUp.style.zIndex = this.zInd;arrUpH = arrowUp.offsetHeight};if (this.idPull["arrowdown_"+id] != null){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.display = "";this.idPull[pId].style.zIndex = this.zInd;if (this.limit > 0 && this.limit < itemCount){this.idPull[pId].style.height = this.idPull[pId].childNodes[0].offsetHeight*this.limit;this.idPull[pId].scrollTop = 0};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 scrTp = (this.idPull[parPoly] != null ? this.idPull[parPoly].scrollTop : 0);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]) - scrTp;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"){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 == "top"){x = srcX - 1;y = srcY - h + 2};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){x = srcX - w + 2};if (y+h > my && this.menuY2 != null){y = srcY + srcH - h + 2};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;document.body.appendChild(ifr) 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 = ""};this.callEvent("_onPolyShow",[id.replace(this.idPrefix,"")])}}};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 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 0){main_self._openedPolygons.pop()};for (var q=0;q0));if (this.dLoad && item["complex"]){item["loaded"] = "no"};this.itemPull[item["id"]] = item;for (var w=0;w 1){item._menuOpenTM = window.oldSetTimeout(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();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(){if (main_self.context){main_self._hideContextMenu()}else {main_self._clearAndHide()}});dhtmlxEvent(document.body, "contextmenu", function(e) {if (main_self._skip_hide){main_self._skip_hide = false;return};e = e||event;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.dhx_Event();return this};dhtmlXMenuObject.prototype.init = function() {if (this._isInited == true){return};if (this.dLoad){this.callEvent("onXLS", []);this._xmlLoader.loadXML(this.dLoadUrl+"?action=loadMenu&etc="+new Date().getTime())}else {this._initTopLevelMenu();this._isInited = true}};dhtmlXMenuObject.prototype._initTopLevelMenu = function() {this.dirTopLevel = "bottom";this.dirSubLevel = "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 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";arrow.style.display = "none";arrow.over = 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.oldSetTimeout(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)};document.body.appendChild(arrow);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 = "
";arrow.style.display = "none";arrow.over = 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.oldSetTimeout(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)};document.body.appendChild(arrow);this.idPull[arrow.id] = arrow};dhtmlXMenuObject.prototype._removeUpArrow = function(id) {};dhtmlXMenuObject.prototype._removeDownArrow = function(id) {};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.oldSetTimeout(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.oldSetTimeout(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};if (this.limit == 0 && itemsNum > 0){var needHeight = true;for (var a in this.idPull){if (a.match(/^polygon_/gi)!= null) {var id = a.replace("polygon_"+this.idPrefix, "");var itemCount = this._countPolygonItems(id);if (itemCount > itemsNum){this._addDownArrow(id);this._addUpArrow(id)}}};this.limit = itemsNum;return};if (this.limit > 0 && itemsNum > 0){for (var a in this.idPull){if (a.match(/^polygon_/gi)!= null) {var id = a.replace("polygon_"+this.idPrefix, "");var itemCount = this._countPolygonItems(id);if (this._isArrowExists && itemCount <= itemsNum){this._removeDownArrow(id);this._removeUpArrow(id)};if (!this._isArrowExists && itemCount > itemsNum){this._addDownArrow(id);this._addUpArrow(id)}}};this.limit = itemsNum};if (this.limit > 0 && itemsNum <= 0){return}};dhtmlXMenuObject.prototype._redistribTopLevelPositions = function() {var w = 0;for (var q=0;q 0){if (imgObj != null){imgObj.src = (this.itemPull[this.idPrefix+id]["type"]=="checkbox"||this.itemPull[this.idPrefix+id]["type"]=="radio"?this.skinPath:this.imagePath) + imgSrc}else {var newImgObj = document.createElement("IMG");newImgObj.className = "dhtmlxMenu_"+this.skin+"_"+levelType+"_Item_Icon";newImgObj.src = this.imagePath + imgSrc;newImgObj.id = "image_"+this.idPrefix+id;newImgObj.border = 0;this.idPull[this.idPrefix+id].appendChild(newImgObj);if (levelType == "TopLevel"){this.idPull[this.idPrefix+id].style.paddingLeft = this.topLevelItemPaddingIconExists+"px"}}}else {if (imgObj != null){this.idPull[this.idPrefix+id].removeChild(imgObj);if (levelType == "TopLevel"){this.idPull[this.idPrefix+id].style.paddingLeft = this.topLevelItemPaddingIconNotExists+"px"}}}};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.setWebModeTimeout = function(tm) {this.menuTimeoutMsec = (!isNaN(tm)?tm:400)};dhtmlXMenuObject.prototype._getRadioImgObj = function(id) {var imgObj = null;for (var q=0;q 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 = "";m.innerHTML = imgTop+m.innerHTML;m.style.paddingLeft = this.topLevelItemPaddingIconExists+"px"}};m.onselectstart = function(e) {e = e || event;e.returnValue = false};var w = 0;for (var q=0;q 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)};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"}else {var j_nodes = ""};if (j_icon.length > 0){j_icon = ""};k.innerHTML = j_icon + this.itemPull[id]["title"] + j_nodes;if (this.itemPull[id]["hotkey"].length > 0 && !this.itemPull[id]["complex"]){var p = "";for (var q=0;q"+this.itemPull[id]["hotkey"]+""+p+""};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.oldSetTimeout(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;tc = (main_self.itemPull[this.id]["complex"]?"c":"-");td = (main_self.itemPull[this.id]["state"]=="enabled"?"-":"d");switch (main_self.itemPull[this.id]["type"]) {case "checkbox": main_self._checkboxOnClickHandler(this.id.replace(main_self.idPrefix, ""), tc+td+"n");break;case "radio": main_self._radioOnClickHandler(this.id.replace(main_self.idPrefix, ""), tc+td+"n");break;case "item": main_self._doOnClick(this.id.replace(main_self.idPrefix, ""), tc+td+"n");break}};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 main_self = this;var k = document.createElement("DIV");k.id = "separator_"+id;k.className = "dhtmlxMenu_"+this.skin+"_SubLevelArea_Separator";k.onselectstart = function(e) {e = e || event;e.returnValue = false};k.onclick = function(e) {e = e || event;e.cancelBubble = true;main_self._doOnClick(this.id.replace("separator_" + main_self.idPrefix, ""), "--s")};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.hide = function() {this._clearAndHide()};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 ? this.itemPull[id]["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){return};if (this.itemPull[id]["complex"]){return};if (this.itemPull[id]["type"] != "item"){return};var hkObj = null;var spnObj = null;for (var q=0;q