//v.3.6 build 131108
/*
Copyright DHTMLX LTD. http://www.dhtmlx.com
You allowed to use this component or parts of it under GPL terms
To use it on other terms or get Professional edition of the component please contact us at sales@dhtmlx.com
*/
dhtmlXMenuObject.prototype.extendedModule="DHXMENUEXT";dhtmlXMenuObject.prototype.setItemEnabled=function(a){this._changeItemState(a,"enabled",this._getItemLevelType(a))};dhtmlXMenuObject.prototype.setItemDisabled=function(a){this._changeItemState(a,"disabled",this._getItemLevelType(a))};dhtmlXMenuObject.prototype.isItemEnabled=function(a){return this.itemPull[this.idPrefix+a]!=null?this.itemPull[this.idPrefix+a].state=="enabled":!1};
dhtmlXMenuObject.prototype._changeItemState=function(a,c,b){var d=!1,e=this.idPrefix+a;if(this.itemPull[e]!=null&&this.idPull[e]!=null&&this.itemPull[e].state!=c)this.itemPull[e].state=c,this.idPull[e].className=this.itemPull[e].parent==this.idPrefix+this.topId&&!this.context?"dhtmlxMenu_"+this.skin+"_TopLevel_Item_"+(this.itemPull[e].state=="enabled"?"Normal":"Disabled"):"sub_item"+(this.itemPull[e].state=="enabled"?"":"_dis"),this._updateItemComplexState(this.idPrefix+a,this.itemPull[this.idPrefix+
a].complex,!1),this._updateItemImage(a,b),this.idPrefix+this.menuLastClicked==e&&b!="TopLevel"&&this._redistribSubLevelSelection(e,this.itemPull[e].parent);return d};dhtmlXMenuObject.prototype.getItemText=function(a){return this.itemPull[this.idPrefix+a]!=null?this.itemPull[this.idPrefix+a].title:""};
dhtmlXMenuObject.prototype.setItemText=function(a,c){a=this.idPrefix+a;if(this.itemPull[a]!=null&&this.idPull[a]!=null)if(this._clearAndHide(),this.itemPull[a].title=c,this.itemPull[a].parent==this.idPrefix+this.topId&&!this.context){for(var b=null,d=0;d0?this.idPull[a].insertBefore(b,this.idPull[a].childNodes[0]):this.idPull[a].appendChild(b);b.innerHTML=this.itemPull[a].title}}else{b=null;for(d=0;d=0)){var b=this._rtl?0:2;if(this.idPull[a].childNodes[b]&&this.idPull[a].childNodes[b].childNodes[0]){var d=this.idPull[a].childNodes[b].childNodes[0];if(String(d.className).search("complex_arrow")===0)d.className="complex_arrow"+(c?"_loading":"")}}};
dhtmlXMenuObject.prototype.getItemImage=function(a){var c=[null,null],a=this.idPrefix+a;if(this.itemPull[a].type=="item")c[0]=this.itemPull[a].imgen,c[1]=this.itemPull[a].imgdis;return c};dhtmlXMenuObject.prototype.setItemImage=function(a,c,b){if(this.itemPull[this.idPrefix+a].type=="item")this.itemPull[this.idPrefix+a].imgen=c,this.itemPull[this.idPrefix+a].imgdis=b,this._updateItemImage(a,this._getItemLevelType(a))};dhtmlXMenuObject.prototype.clearItemImage=function(a){this.setItemImage(a,"","")};
dhtmlXMenuObject.prototype.setAutoShowMode=function(a){this.contextAutoShow=a==!0?!0:!1};dhtmlXMenuObject.prototype.setAutoHideMode=function(a){this.contextAutoHide=a==!0?!0:!1};dhtmlXMenuObject.prototype.setContextMenuHideAllMode=function(a){this.contextHideAllMode=a==!0?!0:!1};dhtmlXMenuObject.prototype.getContextMenuHideAllMode=function(){return this.contextHideAllMode};
dhtmlXMenuObject.prototype.setVisibleArea=function(a,c,b,d){this._isVisibleArea=!0;this.menuX1=a;this.menuX2=c;this.menuY1=b;this.menuY2=d};dhtmlXMenuObject.prototype.setTooltip=function(a,c){a=this.idPrefix+a;if(this.itemPull[a]!=null&&this.idPull[a]!=null)this.idPull[a].title=c.length>0?c:null,this.itemPull[a].tip=c};dhtmlXMenuObject.prototype.getTooltip=function(a){return this.itemPull[this.idPrefix+a]==null?null:this.itemPull[this.idPrefix+a].tip};
dhtmlXMenuObject.prototype.setHotKey=function(a,c){a=this.idPrefix+a;if(this.itemPull[a]!=null&&this.idPull[a]!=null&&(this.itemPull[a].parent!=this.idPrefix+this.topId||this.context)&&!this.itemPull[a].complex){var b=this.itemPull[a].type;if(b=="item"||b=="checkbox"||b=="radio"){var d=null;try{if(this.idPull[a].childNodes[this._rtl?0:2].childNodes[0].className=="sub_item_hk")d=this.idPull[a].childNodes[this._rtl?0:2].childNodes[0]}catch(e){}if(c.length==0)this.itemPull[a].hotkey_backup=this.itemPull[a].hotkey,
this.itemPull[a].hotkey="",d!=null&&d.parentNode.removeChild(d);else{this.itemPull[a].hotkey=c;this.itemPull[a].hotkey_backup=null;if(d==null){d=document.createElement("DIV");d.className="sub_item_hk";for(var f=this.idPull[a].childNodes[this._rtl?0:2];f.childNodes.length>0;)f.removeChild(f.childNodes[0]);f.appendChild(d)}d.innerHTML=c}}}};dhtmlXMenuObject.prototype.getHotKey=function(a){return this.itemPull[this.idPrefix+a]==null?null:this.itemPull[this.idPrefix+a].hotkey};
dhtmlXMenuObject.prototype.setItemSelected=function(a){if(this.itemPull[this.idPrefix+a]==null)return null};dhtmlXMenuObject.prototype.setTopText=function(a){if(!this.context){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=a}};
dhtmlXMenuObject.prototype.setAlign=function(a){if(this._align!=a&&(a=="left"||a=="right")){this._align=a;if(this.cont)this.cont.className=this._align=="right"?"align_right":"align_left";if(this._topText!=null)this._topText.className="dhtmlxMenu_TopLevel_Text_"+(this._align=="left"?"right":"left")}};dhtmlXMenuObject.prototype.setHref=function(a,c,b){if(this.itemPull[this.idPrefix+a]!=null)this.itemPull[this.idPrefix+a].href_link=c,b!=null&&(this.itemPull[this.idPrefix+a].href_target=b)};
dhtmlXMenuObject.prototype.clearHref=function(a){this.itemPull[this.idPrefix+a]!=null&&(delete this.itemPull[this.idPrefix+a].href_link,delete this.itemPull[this.idPrefix+a].href_target)};dhtmlXMenuObject.prototype.getCircuit=function(a){for(var c=Array(a);this.getParentId(a)!=this.topId;)a=this.getParentId(a),c[c.length]=a;return c.reverse()};
dhtmlXMenuObject.prototype._clearAllSelectedSubItemsInPolygon=function(a){for(var c=this._getSubItemToDeselectByPolygon(a),b=0;b