ComponentUs.WebControls.ContextMenuSet = new Array(); ComponentUs.WebControls.PageContextMenu = new Array(); ComponentUs.WebControls.CanDrag = false; ComponentUs.WebControls.CanDragKey = true; ComponentUs.WebControls.Menu = function(props) { this.zgzhcl = props; this.Id = props[0]; this.Orientation = props[1]; this.Width = props[2]; this.Height = props[3]; this.SkinBaseUrl = props[4]; this.zgzhR = props[5]; this.zgzhA = props[6]; this.CollapseDelay = props[7]; this.CollapseAnimation = props[8]; this.CollapseDuration = props[9]; this.ExpandAnimation = props[10]; this.ExpandDuration = props[11]; this.ExpandOnClick = props[12]; this.IsContext = props[13]; this.AccessKey = props[14]; this.Opacity = props[15]; this.zgzhaz = props[16]; this.zgzhbJ = props[17]; this.zgzhdO = props[18]; this.EnableDraging = props[19]; this.EnableFloating = props[20]; this.FloatDirection = props[21]; this.FloatSpeed = props[22]; this.zgzhcN = props[23]; this.ContextControlID = props[24]; this.ContextEventMode = props[25]; this.AutoResizeAlign = props[26]; this.EnableMnemonics = props[27]; this.Name = props[28]; this.zpAzA = props[29]; this.zgzhbK = props[30]; this.Groups = new Array(); this.zgzhcF = new Object(); this.Items = new Array(); this._shortcuts = new Array(); this.zgzhas = new Object(); this.zgzhdo = null; this.Ref = null; this.Depth = 0; this.zgzhbb = null; this.zgzhcp = null; this.LastHovered = null; this.zgzhbD = false; this.zgzhbr = false; this.zgzhU = false; this.zgzhV; this.zgzhbt = false; this.zgzhcv = false; this.zgzhax = false; this.zgzhaf = 0; this.zgzhag = 0; this.zgzhbU = 0; this.zgzhbV = 0; this.zgzhdw = 0; this.zgzhdv = 0; this.zgzhcL = null; this.zgzhcM = null; this.LastClicked = null; this.Skin = this.zgzhaS(); this.zgzhct(this.Id, null); this.zgzhac(); }; ComponentUs.WebControls.Menu.prototype.AttachEventHandler = function(name, handler) { if (!this.zgzhas[name]) { this.zgzhas[name] = new Array(); } this.zgzhas[name][this.zgzhas[name].length] = this.zgzhaX(handler); }; ComponentUs.WebControls.Menu.prototype.IsEventHandlerExist = function(name, handler) { if (this.zgzhas && this.zgzhas[name]) { var zgzhfI = this.zgzhaX(handler); for (var evt in this.zgzhas[name]) { if (this.zgzhas[name][evt] == zgzhfI) { return true; } } } return false; }; ComponentUs.WebControls.Menu.prototype.DetachEventHandler = function(name, handler) { if (this.zgzhas && this.zgzhas[name]) { var zgzhfI = this.zgzhaX(handler); for (var evt in this.zgzhas[name]) { if (this.zgzhas[name][evt] == zgzhfI) { delete this.zgzhas[name][evt]; return true; } } } return false; }; ComponentUs.WebControls.Menu.prototype.zgzhaX = function(handler) { if (typeof (handler) == "function") { return handler; } else if (typeof (window[handler]) == "function") { return window[handler]; } else { return eval(handler); } }; ComponentUs.WebControls.Menu.prototype.zgzhco = function(name, handler) { var zgzhfl = true; if (this[name]) { var zgzhfI = this.zgzhaX(this[name]); if (zgzhfI != null && zgzhfI != "undefined") { if (zgzhfI(this, handler) == false) { zgzhfl = false; } } } return zgzhfl; }; ComponentUs.WebControls.Menu.prototype.RaiseEvent = function(name, handler) { var zgzhfl = this.zgzhco(name, handler); for (var evt in this.zgzhas[name]) { try { var zgzhfI = this.zgzhas[name][evt]; if (zgzhfI == null || zgzhfI == "undefined") { continue; } if (typeof (zgzhfI) == "function") { if (zgzhfI(this, handler) == false) { zgzhfl = false; } } } catch (e) { } } return zgzhfl; }; ComponentUs.WebControls.Menu.prototype.zgzhct = function(id, zgzhfh) { if (zgzhfh != null && !zgzhfh.HasSubMenu) { return; } if (zgzhfh != null && zgzhfh.SubMenu && zgzhfh.SubMenu.zgzhcv) { return; } var data = this.zgzhaF(id); if (data == null) { return; } this.zgzhcu(data, zgzhfh); if (!this.zgzhcv) { this.zgzhbk(); } this.zgzhcv = true; }; ComponentUs.WebControls.Menu.prototype.zgzhaF = function(index) { var data = this.zgzhbK; var i = data.length - 1; do { if (typeof (data[i]) == "undefined") { continue; } if (data[i][0] == index) { return data[i]; } } while (i--); return null; }; ComponentUs.WebControls.Menu.prototype.zgzhcu = function(data, zgzhfh) {
    var index = ComponentUs.WebControls.STARTITEMINDEX; var id = data[0]; var zgzhdU = (id != this.Id) ? this.Id + "_" + id : id; //-->
    var zgzhey = document.createElement("div"); zgzhey.id = zgzhdU + "zgzhbG"; var zgzheW = document.getElementById(this.Id + "_window"); if (id != this.Id || this.IsContext || this.EnableDraging || this.EnableFloating) { document.forms[this.zgzhaz].appendChild(zgzhey); } else { zgzheW.appendChild(zgzhey); } if (id != this.Id) { zgzhey.style.visibility = "hidden"; zgzhey.style.overflow = "hidden"; zgzhey.style.position = "absolute"; zgzhey.style.left = -9999 + "px"; zgzhey.style.top = -9999 + "px"; zgzhey.style.zIndex = 990; } var table = document.createElement("table"); table.id = zgzhdU + "zgzhdF"; table.setAttribute("cellPadding", "0"); table.setAttribute("cellSpacing", "0"); table.style.position = "relative"; table.style.top = 0 + "px"; table.style.left = 0 + "px"; var tbody = document.createElement("tbody"); table.appendChild(tbody); var zgzheJ = document.createElement("div"); zgzheJ.style.overflow = "hidden"; zgzheJ.style.position = "relative"; zgzheJ.id = zgzhdU; zgzheJ.appendChild(table); zgzhey.appendChild(zgzheJ); var zgzhez = new ComponentUs.WebControls.zgzhn(zgzhey.id, zgzhfh, this); var zgzhex = new ComponentUs.WebControls.MenuGroup(data, zgzheJ.id, zgzhfh, zgzhez, this); zgzhez.zgzhbj(zgzhex); //-->
    var zgzheO = 0; var zgzheB = zgzhex.DefaultLook; var zgzhfc = zgzhex.Orientation.toLowerCase(); var zgzhdR = 1; if (zgzhfc == ComponentUs.WebControls.HORIZONTAL) { tr = document.createElement("tr"); tbody.appendChild(tr); } do { if (data[index] == null) { break; } if (zgzhfc == ComponentUs.WebControls.VERTICAL) { tr = document.createElement("tr"); tbody.appendChild(tr); } var zgzheN = data[index][8]; var zgzhdV = this.zgzhW(); var td = document.createElement("td"); tr.appendChild(td); var item = (!zgzheN) ? this.zgzhH(data[index], zgzhex, td, zgzhdV) : this.zgzhJ(data[index], zgzhex, td); if (!zgzheN) { if (zgzhdR < parseInt(item.Ref.offsetWidth)) { zgzhdR = item.Ref.offsetWidth; } item.zgzhae(); if (zgzheO == 0) { item.SetAttribute("idx", "first"); } if (index == data.length - 1) { item.SetAttribute("idx", "last"); } zgzheO++; item.SetDefault(); this.zgzhv(item); } index++; } while (index < data.length); table.setAttribute("groupwidth", parseInt(zgzhdR * zgzheO) + "px"); this.zgzhu(zgzhex);
}; ComponentUs.WebControls.Menu.prototype.zgzhac = function() { var zgzheW = document.getElementById(this.Id + "_window"); var link = document.getElementById(this.Id + "_focusgetter"); if (link == null) { link = document.createElement("a"); zgzheW.appendChild(link); link.id = this.Id + "_focusgetter"; link.style.position = "absolute"; link.style.top = -9999 + "px"; link.style.left = -9999 + "px"; link.href = "#"; this.zgzhaw = new ComponentUs.WebControls.zgzhm(link.id, this); } }; ComponentUs.WebControls.Menu.prototype.zgzhav = function() { this.zgzhaw.zgzhav(); }; ComponentUs.WebControls.Menu.prototype.zgzhF = function() { this.zgzhaw.zgzhF(); }; ComponentUs.WebControls.Menu.prototype.zgzhW = function() { var table = document.createElement("table"); var tbody = document.createElement("tbody"); var tr = document.createElement("tr"); var zgzheU = document.createElement("td"); var zgzhfF = zgzheU.cloneNode(true); var zgzhfw = zgzheU.cloneNode(true); var zgzhfn = zgzheU.cloneNode(true); table.appendChild(tbody); tbody.appendChild(tr); tr.appendChild(zgzheU); tr.appendChild(zgzhfF); tr.appendChild(zgzhfw); tr.appendChild(zgzhfn); var zgzheT = document.createElement("img"); zgzheT.alt = ""; zgzheU.appendChild(zgzheT); zgzheT.style.display = "none"; var zgzhfm = document.createElement("img"); zgzhfm.alt = ""; zgzhfn.appendChild(zgzhfm); zgzhfm.style.display = "none"; table.setAttribute("width", "100%"); table.setAttribute("height", "100%"); table.setAttribute("cellPadding", "0"); table.setAttribute("cellSpacing", "0"); var zgzhfx = this.Skin.Name; zgzhfw.setAttribute("align", "right"); zgzhfw.style.display = "none"; return table; }; ComponentUs.WebControls.Menu.prototype.zgzhH = function(data, zgzhff, td, table) { var item = new ComponentUs.WebControls.MenuItem(data, zgzhff, this); td.id = item.Id; table.id = item.Id + "_tbl"; td.appendChild(table); item.Ref = td; item.zgzhbj(); zgzhff.zgzhs(item); var zgzheI = item.DefaultLook.ImageUrl; if (ComponentUs.WebControls.zgzhk(zgzheI)) { item.zgzhI(table); } else { item.zgzhG(table); } return item; }; ComponentUs.WebControls.Menu.prototype.zgzhJ = function(data, zgzhex, zgzhfk) { var item = new ComponentUs.WebControls.MenuItem(data, zgzhex, this); var table = document.createElement("table"); var tbody = document.createElement("tbody"); var tr = document.createElement("tr"); var td = document.createElement("td"); var zgzhfv = item.SeparatorLook; var zgzhfx = this.Skin.Name; table.setAttribute("width", "100%"); table.setAttribute("height", "100%"); table.setAttribute("cellPadding", "0"); table.setAttribute("cellSpacing", "0"); tr.setAttribute("valign", "middle"); tr.setAttribute("align", "center"); table.appendChild(tbody); tbody.appendChild(tr); tr.appendChild(td); table.className = (zgzhfv && zgzhfv.CssClass) ? zgzhfv.CssClass : zgzhfx + "_separator"; zgzhfk.appendChild(table); return table; }; ComponentUs.WebControls.Menu.prototype.zgzhby = function() { if (this.zgzhR) { if (typeof (Page_ClientValidate) != 'function' || Page_ClientValidate()) { return true; } } return false; }; ComponentUs.WebControls.Menu.prototype.zgzhx = function(e) { if (!e) { e = window.event; } if (ComponentUs.WebControls.ActiveMenu == null) { return; } var zgzhei = this.zgzhaQ(); var zgzheh = this.zgzhaP(); var zgzhfa = e.clientY + zgzhei; var zgzheZ = e.clientX + zgzheh; var zgzhfL = ComponentUs.WebControls.zgzhi(); var zgzhek = zgzheh + zgzhfL.Width; var zgzhef = zgzhei + zgzhfL.Height; var top = zgzhfa - this.zgzhaG(); var left = zgzheZ - this.zgzhaZ(); this.SetY(zgzhfa); this.SetX(zgzheZ); var zgzheX = ComponentUs.WebControls.zgzhh(this.zgzhcE.zgzhbG.zgzhdF); this.SetY((zgzheX.zgzhdL + zgzheX.Height + this.zgzhaQ() >= zgzhef) ? top : zgzhfa); this.SetX((zgzheX.zgzhbH + zgzheX.Width + this.zgzhaP() >= zgzhek) ? left : zgzheZ); if (zgzheX.zgzhbH < 0) { this.SetX(0); } if (zgzheX.zgzhdL < 0) { this.SetY(0); } this.zgzhcE.zgzhbG.zgzhcZ(); this.zgzhdl(true); }; ComponentUs.WebControls.Menu.prototype.zgzhcc = function(e) { if (!e) { e = window.event; } var shiftKey = !e.altKey && e.shiftKey && !e.ctrlKey; if (e.type == "click" && shiftKey) { this.oncontextmenu(e); } }; ComponentUs.WebControls.Menu.prototype.zgzhaI = function() { var zgzheW = document.getElementById(this.Id + "_window"); if (zgzheW) { return ComponentUs.WebControls.zgzhh(zgzheW); } }; ComponentUs.WebControls.Menu.prototype.zgzhbX = function(e) { if (!e) { e = window.event; } this.zgzhaa = true; for (var i = 0; i < ComponentUs.WebControls.ContextMenuSet.length; i++) { ComponentUs.WebControls.ActiveMenu = eval(ComponentUs.WebControls.ContextMenuSet[i]); if (ComponentUs.WebControls.ActiveMenu) { var zgzhdY = ComponentUs.WebControls.ActiveMenu.ContextEventMode.toLowerCase(); var shiftKey = !e.altKey && e.shiftKey && !e.ctrlKey; if ((e.type == "click" && e.button != 2 && zgzhdY == "leftclick") || (e.type == "contextmenu" && zgzhdY == "rightclick" || ComponentUs.WebControls.ActiveMenu.ContextEventMode != "leftclick" && ComponentUs.WebControls.Browser.zgzhbw() && e.type == "click" && shiftKey && e.button != 2)) { var zgzheZ = e.clientX + ComponentUs.WebControls.ActiveMenu.zgzhaP(); var zgzhfa = e.clientY + ComponentUs.WebControls.ActiveMenu.zgzhaQ(); var control = document.getElementById(ComponentUs.WebControls.ActiveMenu.ContextControlID); ComponentUs.WebControls.OnHideContext(e); if (control) { var rect = ComponentUs.WebControls.zgzhh(control); if ((zgzheZ > rect.zgzhbH) && (zgzheZ < rect.zgzhbH + rect.Width) && (zgzhfa > rect.zgzhdL) && (zgzhfa < rect.zgzhdL + rect.Height)) { ComponentUs.WebControls.ActiveMenu.zgzhx(e); this.zgzhaa = false; if (e.stopPropagation) { e.preventDefault(); } else { e.cancelBubble = true; } return false; } } } } } if (ComponentUs.WebControls.PageContextMenu.length > 0 && ComponentUs.WebControls.PageContextMenu[0].ContextControlID == null) { ComponentUs.WebControls.ActiveMenu = eval(ComponentUs.WebControls.PageContextMenu[0]); if ((ComponentUs.WebControls.ActiveMenu.zgzhcE.zgzhbG.zgzhbB()) && (!this.zgzhaa)) { ComponentUs.WebControls.OnHideContext(e); } ComponentUs.WebControls.ActiveMenu.zgzhx(e); if (e.stopPropagation) { e.preventDefault(); } else { e.cancelBubble = true; } return false; } return true; }; ComponentUs.WebControls.Menu.prototype.zgzhX = function() { var key = ComponentUs.WebControls.KeyboardItem; if (key) { if (key.SubMenu) { key.SubMenu.zgzhbG.zgzhbc(); } for (var item = key; item != null; item = item.ParentGroup.ParentItem) { if (item.ParentGroup.ParentItem) { item.ParentGroup.ParentItem.SetDefault(); } item.ParentGroup.zgzhbG.zgzhbc(); } key.SetDefault(); ComponentUs.WebControls.KeyboardItem = null; } }; ComponentUs.WebControls.Menu.prototype.zgzhbe = function(e) { if (!e) { e = window.event; } ComponentUs.WebControls.ActiveMenu.zgzhX(); this.zgzhdl(false); var zgzhfd = document.getElementById(this.zgzhcE.zgzhbG.Id + "zgzhce"); if (zgzhfd) { zgzhfd.style.visibility = "hidden"; } }; ComponentUs.WebControls.Menu.prototype.zgzhde = function() { var width = this.zgzhcE.Width; if (width && parseInt(width) > 0) { this.zgzhcE.zgzhbG.zgzhdm(width); if (ComponentUs.WebControls.Browser.zgzhbu() || ComponentUs.WebControls.Browser.zgzhbw()) { this.zgzhcE.zgzhbG.zgzhdF.style.width = parseInt(this.zgzhcE.zgzhbG.zgzhdF.getAttribute("groupwidth")) + "px"; } this.zgzhcE.zgzhbG.zgzhbn = true; } this.zgzhcE.zgzhbG.zgzhN(); }; ComponentUs.WebControls.Menu.prototype.zgzhdd = function() { this.zgzhcE.zgzhbG.zgzhL(); }; ComponentUs.WebControls.Menu.prototype.zgzhcU = function() { if (!this.IsContext) { var zgzhfq = this.zgzhcE.Ref.firstChild; var zgzhfr = zgzhfq.firstChild.firstChild; var tbody = document.createElement("tbody"); var tr = document.createElement("tr"); var td = document.createElement("td"); var zgzhfx = this.Skin.Name; td.className = zgzhfx + "_grip"; td.style.height = 16 + "px"; td.onmousedown = ComponentUs.WebControls.Menu.zgzhq; td.onmouseup = ComponentUs.WebControls.Menu.ReleaseDrag; td.setAttribute("menu", this.Id); td.setAttribute("noWrap", "nowrap"); if (this.zgzhcE.Orientation.toLowerCase() != ComponentUs.WebControls.VERTICAL) { td.style.width = 9 + "px"; zgzhfr.insertBefore(td, zgzhfr.firstChild); } else { tbody.appendChild(tr); tr.appendChild(td); zgzhfq.insertBefore(tbody, zgzhfq.firstChild); } } }; ComponentUs.WebControls.Menu.prototype.zgzhbk = function() { this.zgzhdl((this.zgzhdO) ? true : false); this.zgzhcE.zgzhbG.zgzhbv = true; this.zgzhcE.zgzhbG.zgzhbx = true; this.Ref = this.zgzhcE.zgzhbG.Ref; this.zgzhcE.Ref.name = this.Name; if (this.EnableDraging || this.EnableFloating || this.IsContext) { this.zgzhda("absolute"); this.SetX(this.zgzhaI().zgzhbH); this.SetY(this.zgzhaI().zgzhdL); this.SetZ(980); if (this.EnableDraging) { this.zgzhcU(); } if (this.EnableFloating) { this.zgzhdx(); } if (this.IsContext) { this.zgzhab(); } } this.zgzhde(); this.zgzhdd(); this.zgzhcE.zgzhbG.zgzhcZ(); this.zgzhcv = true; }; ComponentUs.WebControls.Menu.prototype.zgzhaS = function() { return eval(this.Id.toLowerCase() + "_skin"); }; ComponentUs.WebControls.Menu.prototype.zgzhaL = function() { var options = eval(this.Id.toLowerCase() + "_postBackOptions"); if (typeof (options[1]) == "undefined") { options[1] = "" }; if (typeof (options[2]) == "undefined") { options[2] = "" }; options[0] = (options[0] == 1) ? true : false; options[3] = (options[3] == 1) ? true : false; return options; }; ComponentUs.WebControls.Menu.prototype.InvokeContext = function(e, id) { if (ComponentUs.WebControls.zgzhk(id)) { return; } this.ContextControlID = id; this.zgzhbX(e); }; ComponentUs.WebControls.Menu.prototype.zgzhab = function() { if (this.ContextControlID) { var elm = document.getElementById(this.ContextControlID); if (elm) { if (ComponentUs.WebControls.Browser.zgzhbw()) { elm.onclick = this.zgzhbX; } else { ComponentUs.WebControls.Events.zgzht(elm, (this.ContextEventMode.toLowerCase() == "rightclick") ? "contextmenu" : "click", this.zgzhbX); } } } else { document.oncontextmenu = this.zgzhbX; if (ComponentUs.WebControls.Browser.zgzhbw()) { ComponentUs.WebControls.Events.zgzht(document, "click", this.zgzhcc); } } this.zgzhda("absolute"); this.zgzhdl(false); this.SetX(-9999); this.SetY(-9999); this.zgzhcE.zgzhbG.zgzhcZ(); this.SetZ(990); this.ExpandOnClick = false; }; ComponentUs.WebControls.Menu.prototype.zgzhu = function(zgzhex) { this.Groups[this.Groups.length] = zgzhex; }; ComponentUs.WebControls.Menu.prototype.zgzhQ = function(e, extra) { if (!e) { return true; } if (!e.stopPropagation) { if (extra) { e.returnValue = false; } e.cancelBubble = true; return e; } else { e.stopPropagation(); if (extra) { e.preventDefault(); } return e; } }; ComponentUs.WebControls.Menu.prototype.zgzhaR = function(index) { var data = this.zgzhbK; var i = data.length - 1; do { if (typeof (data[i]) == "undefined") { continue; } for (var j = ComponentUs.WebControls.STARTITEMINDEX; j < data[i].length; j++) { var pref = "i_" + this.Id + "_"; if (pref + data[i][j][0] == index) { this.zgzhad(data[i][j]); } } } while (i--); return null; }; ComponentUs.WebControls.Menu.prototype.GetItemByValue = function(val) { for (var i = 0; i < this.Items.length; i++) { if (this.Items[i].Value == val) { return this.Items[i]; } } return null; }; ComponentUs.WebControls.Menu.prototype.zgzhaQ = function() { var scrollY = 0; if (document.documentElement && document.documentElement.scrollTop) { scrollY = document.documentElement.scrollTop; } else if (document.body && document.body.scrollTop) { scrollY = document.body.scrollTop; } else if (window.pageYOffset) { scrollY = window.pageYOffset; } else if (window.scrollY) { scrollY = window.scrollY; } return scrollY; }; ComponentUs.WebControls.Menu.prototype.zgzhaP = function() { var scrollX = 0; if (document.documentElement && document.documentElement.scrollLeft) { scrollX = document.documentElement.scrollLeft; } else if (document.body && document.body.scrollLeft) { scrollX = document.body.scrollLeft; } else if (window.pageXOffset) { scrollX = window.pageXOffset; } else if (window.scrollX) { scrollX = window.scrollX; } return scrollX; }; ComponentUs.WebControls.Menu.prototype.zgzhar = function(e, next) { var item = ComponentUs.WebControls.KeyboardItem; if (item) { item.zgzhca(e); if (next && item.SubMenu && item.Enabled) { ComponentUs.WebControls.KeyboardItem = item.SubMenu.Items[0]; ComponentUs.WebControls.KeyboardItem.zgzhca(e); } } return false; }; ComponentUs.WebControls.Menu.prototype.zgzhbP = function(e) { var item = ComponentUs.WebControls.KeyboardItem; if (item) { item.zgzhbZ(e); if (item.SubMenu == null && this.Depth > 0 && item.zgzhcD()) { this.Depth = 0; ComponentUs.WebControls.KeyboardItem = item.zgzhcD().zgzhbT(); this.zgzhar(e, true); return; } if (item.SubMenu && this.Depth >= 0) { this.zgzhar(e, true); return; } if (this.Depth == 0) { ComponentUs.WebControls.KeyboardItem = item.zgzhbT(); this.zgzhar(e, true); } } }; ComponentUs.WebControls.Menu.prototype.zgzhbO = function(e) { var item = ComponentUs.WebControls.KeyboardItem; if (item) { item.zgzhbZ(e); if (this.Depth == 1 && item.zgzhcD()) { this.Depth = 0; ComponentUs.WebControls.KeyboardItem = item.zgzhcD().zgzhcj(); this.zgzhar(e, true); return; } if (this.Depth > 1) { ComponentUs.WebControls.KeyboardItem = item.ParentGroup.ParentItem; this.zgzhar(e, false); return; } if (this.Depth == 0) { ComponentUs.WebControls.KeyboardItem = item.zgzhcj(); this.zgzhar(e, true); } } }; ComponentUs.WebControls.Menu.prototype.zgzhbQ = function(e) { var zgzhfc = this.zgzhcE.Orientation.toLowerCase(); if (zgzhfc != ComponentUs.WebControls.VERTICAL && this.Depth == 0) { return; } if (ComponentUs.WebControls.KeyboardItem) { this.zgzhdM(e, ComponentUs.WebControls.KeyboardItem.zgzhcj()); } }; ComponentUs.WebControls.Menu.prototype.zgzhbN = function(e) { if (ComponentUs.WebControls.KeyboardItem) { this.zgzhdM(e, ComponentUs.WebControls.KeyboardItem.zgzhbT()); } }; ComponentUs.WebControls.Menu.prototype.zgzhdM = function(e, parent) { ComponentUs.WebControls.KeyboardItem.zgzhbZ(e); ComponentUs.WebControls.KeyboardItem = parent; if (ComponentUs.WebControls.KeyboardItem.zgzhP()) { ComponentUs.WebControls.KeyboardItem.zgzhca(e); } ComponentUs.WebControls.KeyboardItem.ParentGroup.zgzhdz(); }; ComponentUs.WebControls.Menu.prototype.zgzhap = function(e) { if (ComponentUs.WebControls.zgzhl && ComponentUs.WebControls.KeyboardItem) { var zgzhex = ComponentUs.WebControls.KeyboardItem.ParentGroup; var dir = -1; var zgzhfc = zgzhex.Orientation.toLowerCase(); if (e.keyCode == 40 && zgzhfc == ComponentUs.WebControls.VERTICAL) { dir = 0; } if (e.keyCode == 39 && zgzhfc == ComponentUs.WebControls.HORIZONTAL) { dir = 3; } if (e.keyCode == 38 && zgzhfc == ComponentUs.WebControls.VERTICAL) { dir = 1; } if (e.keyCode == 37 && zgzhfc == ComponentUs.WebControls.HORIZONTAL) { dir = 4; } if (dir == 1 || dir == 4) { zgzhex.zgzhdN.zgzhaq(dir); } else if (dir == 0 || dir == 3) { zgzhex.zgzhan.zgzhaq(dir); } else { zgzhex.zgzhan.zgzhaq((zgzhfc == ComponentUs.WebControls.VERTICAL) ? 0 : 3); } } ComponentUs.WebControls.zgzhl = false; }; ComponentUs.WebControls.Menu.prototype.zgzham = function(e, zgzhex) { if (this.EnableMnemonics) { this.zgzhT(e); } var i = zgzhex.length - 1; do { var item = zgzhex[i]; var zgzhft = this.zgzhaO(item.Shortcut); if (item.Modifier && zgzhft == e.keyCode) { switch (item.Modifier.toLowerCase()) { case "ctrl": var key = (e.ctrlKey || e.metaKey) && !e.altKey && !e.shiftKey; if (!key) { continue; } break; case "alt": var key = e.altKey && !e.shiftKey && (!e.ctrlKey || !e.metaKey); if (!key) { continue; } break; case "shift": var key = !e.altKey && e.shiftKey && (!e.ctrlKey || !e.metaKey); if (!key) { continue; } break; case "ctrl+alt+shift": var key = e.shiftKey && (e.ctrlKey || e.metaKey) && e.altKey; if (!key) { continue; } break; case "shift+ctrl": case "ctrl+shift": var key = e.shiftKey && (e.ctrlKey || e.metaKey) && !e.altKey; if (!key) { continue; } break; case "alt+ctrl": case "ctrl+alt": var key = (e.ctrlKey || e.metaKey) && e.altKey && !e.shiftKey; if (!key) { continue; } break; case "alt+shift": case "shift+alt": var key = e.shiftKey && e.altKey && (!e.ctrlKey || !e.metaKey); if (!key) { continue; } break; } item.zgzhbW(e); } if (item.Modifier == null && zgzhft == e.keyCode && !e.shiftKey && !e.altKey && (!e.ctrlKey || !e.metaKey)) { item.zgzhbW(e); } } while (i--) }; ComponentUs.WebControls.Menu.prototype.zgzhT = function(e) { var item = ComponentUs.WebControls.KeyboardItem; if (item == null) { return; } var zgzhex = (item.HasSubMenu) ? item.ParentGroup : item.ParentGroup; for (var i = 0; i < zgzhex.Items.length; i++) { var zgzhdZ = zgzhex.Items[i]; if (zgzhdZ.Mnemonic != -1 && !e.shiftKey && !e.altKey && (!e.ctrlKey || !e.metaKey)) { var zgzhft = this.zgzhaO(zgzhdZ.Text.charAt(zgzhdZ.Mnemonic - 1)); if (zgzhft == e.keyCode) { this.zgzhX(); ComponentUs.WebControls.KeyboardItem = zgzhdZ; zgzhdZ.zgzhbW(e); break; } } } }; ComponentUs.WebControls.Menu.prototype.zgzhaO = function(zgzhft) { if (zgzhft == null) { return; } var zgzhdT = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; var zgzhec = "0123456789"; var zgzheu = "F1F2F3F4F5F6F7F8F9"; var zgzhet = "F10F11F12"; zgzhft = zgzhft.toString().toUpperCase(); if (zgzhft.length == 1 && zgzhdT.indexOf(zgzhft) >= 0) { zgzhft = parseInt(65 + zgzhdT.indexOf(zgzhft)); } if (zgzhft.length == 1 && zgzhec.indexOf(zgzhft) >= 0) { zgzhft = parseInt(48 + zgzhec.indexOf(zgzhft)); } if (zgzhft.length == 2 && zgzheu.indexOf(zgzhft) >= 0) { zgzhft = parseInt(112 + (zgzheu.indexOf(zgzhft) / 2)); } if (zgzhft.length == 3 && zgzhet.indexOf(zgzhft) >= 0) { zgzhft = parseInt(121 + (zgzhet.indexOf(zgzhft) / 3)); } if (zgzhft == "Enter") { zgzhft = 13; } if (zgzhft == "Space") { zgzhft = 8; } if (zgzhft == "Del") { zgzhft = 46; } if (zgzhft == "Ins") { zgzhft = 45; } return zgzhft; }; ComponentUs.WebControls.Menu.prototype.zgzhdx = function() { this.zgzhp = null; this.zgzhdw = parseInt(this.GetY()) - this.zgzhaQ(); this.zgzhdv = parseInt(this.GetX()) - this.zgzhaP(); if (this.zgzhp) { window.clearInterval(this.zgzhp); } this.zgzhp = window.setInterval(this.Id + ".zgzhdf()", 10); }; ComponentUs.WebControls.Menu.prototype.zgzhdf = function() { var menu = this.zgzhcE.zgzhbG.Ref.style; if (!this.IsContext && this.zgzhaK() == "absolute") { var top = parseInt(menu.top); var left = parseInt(menu.left); if (isNaN(top)) { this.SetY(0); } if (isNaN(left)) { this.SetX(0); } if (this.FloatSpeed <= 0) { this.FloatSpeed = 1; } zgzhfC = (this.zgzhdw - top + this.zgzhaQ()) / this.FloatSpeed; zgzhfB = (this.zgzhdv - left + this.zgzhaP()) / this.FloatSpeed; zgzhee = (zgzhfC > 0) ? Math.ceil(zgzhfC) : Math.floor(zgzhfC); zgzhed = (zgzhfB > 0) ? Math.ceil(zgzhfB) : Math.floor(zgzhfB); if (zgzhee != 0 || zgzhed != 0) { var dir = this.FloatDirection.toLowerCase(); if (dir == "both" || dir == "y") { this.SetY(parseInt(top + zgzhee)); } if (dir == "both" || dir == "x") { this.SetX(parseInt(left + zgzhed)); } this.zgzhcE.zgzhbG.zgzhcZ(); ComponentUs.WebControls.CanDragKey = false; this.zgzhbr = true; } else { this.zgzhbr = false; ComponentUs.WebControls.CanDragKey = true; } } }; ComponentUs.WebControls.Menu.prototype.zgzhv = function(item) { this.Items[this.Items.length] = item; }; ComponentUs.WebControls.Menu.prototype.zgzhad = function(data) { var item = new ComponentUs.WebControls.MenuItem(data, this.zgzhdo, this); this.zgzhdo.zgzhs(item); }; ComponentUs.WebControls.Menu.prototype._createShortcutGroup = function() { this.zgzhdo = new ComponentUs.WebControls.MenuGroup(null, this.Id + "_shortcuts", null, null, this); for (var i = 0; i < this._shortcuts.length; i++) { if (this._shortcuts[i] != null) { this.zgzhaR(this._shortcuts[i]); } } }; ComponentUs.WebControls.Menu.prototype.zgzhaM = function() { return ComponentUs.WebControls.zgzhh(this.zgzhcE.zgzhbG.Ref); }; ComponentUs.WebControls.Menu.prototype.GetX = function() { return this.zgzhaM().zgzhbH; }; ComponentUs.WebControls.Menu.prototype.GetY = function() { return this.zgzhaM().zgzhdL; }; ComponentUs.WebControls.Menu.prototype.zgzhaZ = function() { return this.zgzhaM().Width; }; ComponentUs.WebControls.Menu.prototype.zgzhaG = function() { return this.zgzhaM().Height; }; ComponentUs.WebControls.Menu.prototype.zgzhaK = function() { return this.zgzhcE.zgzhbG.Ref.style.position; }; ComponentUs.WebControls.Menu.prototype.zgzhaY = function() { return this.zgzhcE.zgzhbG.Ref.style.visibility; }; ComponentUs.WebControls.Menu.prototype.SetX = function(x) { this.zgzhcE.zgzhbG.SetX(parseInt(x)); }; ComponentUs.WebControls.Menu.prototype.SetY = function(y) { this.zgzhcE.zgzhbG.SetY(parseInt(y)); }; ComponentUs.WebControls.Menu.prototype.SetZ = function(z) { this.zgzhcE.zgzhbG.SetZ(z); }; ComponentUs.WebControls.Menu.prototype.zgzhdl = function(visibility) { this.zgzhcE.zgzhbG.zgzhdl(visibility); }; ComponentUs.WebControls.Menu.prototype.zgzhda = function(position) { this.zgzhcE.zgzhbG.zgzhda(position); }; ComponentUs.WebControls.Menu.prototype.zgzhdm = function(w) { this.zgzhcE.zgzhbG.zgzhdm(parseInt(w)); }; ComponentUs.WebControls.Menu.prototype.zgzhcV = function(h) { this.zgzhcE.zgzhbG.zgzhcV(parseInt(h)); }; ComponentUs.WebControls.Menu.prototype.FindItemByText = function(text) { for (var i = 0; i < this.Items.length; i++) { var item = this.Items[i]; if (text.toLowerCase() == item.Text.toLowerCase()) { return item; } } return null; }; ComponentUs.WebControls.Menu.prototype.zgzhbf = function(parent) { var zgzheE = this.zgzhcF; for (var zgzhex in zgzheE) { if (zgzheE[zgzhex].Id != parent.zgzhbG.Id && zgzheE[zgzhex].Menu.Id == parent.zgzhbG.Menu.Id) { this.zgzhdb(parent); zgzheE[zgzhex].zgzhbc(); } } }; ComponentUs.WebControls.Menu.prototype.zgzhdb = function(zgzhex) { this.zgzhcp = zgzhex; }; ComponentUs.WebControls.Menu.prototype.zgzhcq = function() { if (!this.zgzhbR) { if (this.zgzhbF) { if (this.zgzhbF.SubMenu) { this.zgzhdb(this.zgzhbF.SubMenu); this.zgzhcp.zgzhbG.zgzhbc(); } else { this.zgzhdb(this.zgzhbF.ParentGroup); this.zgzhcp.zgzhbG.zgzhbc(); } } } }; ComponentUs.WebControls.Menu.prototype.zgzhv = function(item) { this.Items[this.Items.length] = item; }; ComponentUs.WebControls.Menu.prototype.zgzhaA = function() { return eval(this.Id.toLowerCase() + "_arrow"); }; ComponentUs.WebControls.Menu.zgzhr = function(e) { if (ComponentUs.WebControls.ActiveMenu && ComponentUs.WebControls.CanDrag) { if (!e) { var e = window.event; } var menu = ComponentUs.WebControls.ActiveMenu; var zgzhfp = menu.zgzhcE.zgzhbG; var zgzhej = document.documentElement.scrollWidth || document.body.scrollWidth; var zgzheg = document.documentElement.scrollHeight || document.body.scrollHeight; var zgzhfJ = ComponentUs.WebControls.zgzhi().Height; if (zgzheg < zgzhfJ) { zgzheg = zgzhfJ; } var maxHeight = zgzheg - menu.zgzhaG() - 10; var maxWidth = zgzhej - menu.zgzhaZ() - 10; menu.SetX((menu.GetX() >= maxWidth && e.clientX >= maxWidth) ? parseInt(maxWidth) : parseInt(menu.zgzhaf + e.clientX - menu.zgzhbU)); menu.SetY((menu.GetY() >= maxHeight && e.clientY >= maxHeight) ? parseInt(maxHeight) : parseInt(menu.zgzhag + e.clientY - menu.zgzhbV)); menu.zgzhdw = zgzhfp.Ref.offsetTop - menu.zgzhaQ(); menu.zgzhdv = zgzhfp.Ref.offsetLeft - menu.zgzhaP(); zgzhfp.zgzhcZ(); return false; } }; ComponentUs.WebControls.Menu.zgzhq = function(e) { if (!e) var e = window.event; var menu = eval(this.getAttribute("menu")); if (menu) { ComponentUs.WebControls.CanDrag = true; ComponentUs.WebControls.ActiveMenu = menu; ComponentUs.WebControls.ActiveMenu.zgzhX(); var zgzhfp = menu.zgzhcE.zgzhbG.Ref; menu.zgzhbU = parseInt(e.clientX + menu.zgzhaP()); menu.zgzhbV = parseInt(e.clientY + menu.zgzhaQ()); menu.zgzhaf = parseInt(menu.GetX() + menu.zgzhaP()); menu.zgzhag = parseInt(menu.GetY() + menu.zgzhaQ()); if (isNaN(menu.zgzhaf)) { menu.zgzhaf = 0 + "px" }; if (isNaN(menu.zgzhag)) { menu.zgzhag = 0 + "px" }; } return false; }; ComponentUs.WebControls.Menu.ReleaseDrag = function() { ComponentUs.WebControls.CanDrag = false; }; ComponentUs.WebControls.Events.zgzht(document, "mousemove", ComponentUs.WebControls.Menu.zgzhr); ComponentUs.WebControls.Events.zgzht(document, "mouseup", ComponentUs.WebControls.Menu.ReleaseDrag);