⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ncbi_menu.js

📁 ncbi源码
💻 JS
📖 第 1 页 / 共 3 页
字号:
                }                var sep = container.document.all["menuSeparator" + menuCount];                if (sep) {                    sep.style.clip = "rect(0 " + (proto.menuItemWidth - 3) + " 1 0)";                    sep.style.backgroundColor = proto.bgColor;                    sep = container.document.all["menuSeparatorLite" + menuCount];                    sep.style.clip = "rect(1 " + (proto.menuItemWidth - 3) + " 2 0)";                    sep.style.backgroundColor = proto.menuLiteBgColor;                    l.style.pixelHeight = proto.menuItemHeight/2;                    l.isSeparator = true                }                menuCount++;            }            proto.menuHeight = (l.style.pixelTop + l.style.pixelHeight);            var lite = container.document.all["menuLite" + x];            lite.style.pixelHeight = proto.menuHeight +2;            lite.style.pixelWidth = proto.menuItemWidth + 2;            lite.style.backgroundColor = proto.menuLiteBgColor;            var body = container.document.all["menuFg" + x];            body.style.pixelHeight = proto.menuHeight + 1;            body.style.pixelWidth = proto.menuItemWidth + 1;            body.style.backgroundColor = proto.bgColor;            container.menus[x].menuLayer.style.pixelWidth  = proto.menuWidth || proto.menuItemWidth + (proto.menuBorder * 2) +2;            container.menus[x].menuLayer.style.pixelHeight = proto.menuHeight + (proto.menuBorder * 2) +2;            if (menu.Menu.enableTracker) {                menu.Menu.disableHide = true;                setMenuTracker(menu.Menu);            }	}        container.document.all("menuContainer").style.backgroundColor = container.menus[0].menuContainerBgColor;        container.document.saveBgColor = container.document.bgColor;      } else if (document.getElementById) {        var menuCount = 0;        for (var x=0; x<container.menus.length; x++) {            var menu = document.getElementById("menuLayer" + x);            container.menus[x].menuLayer = menu;            container.menus[x].menuLayer.Menu = container.menus[x];            container.menus[x].menuLayer.Menu.container = menu;            proto = container.menus[x].prototypeStyles || this.prototypeStyles || container.menus[x];            proto.menuItemWidth = proto.menuItemWidth || 200;            menu.style.backgroundColor = proto.menuBorderBgColor;            for (var i=0; i<container.menus[x].items.length; i++) {                var l = document.getElementById("menuItem" + menuCount);                l.Menu = container.menus[x];                proto = container.menus[x].prototypeStyles || this.prototypeStyles || container.menus[x];                l.style.width = proto.menuItemWidth;                l.style.height = proto.menuItemHeight;                if (i>0) l.style.top = document.getElementById("menuItem" + (menuCount -1)).style.pixelTop + document.getElementById("menuItem" + (menuCount -1)).style.height + proto.menuItemBorder;                l.style.fontSize = proto.fontSize;                l.style.backgroundColor = proto.menuItemBgColor;                l.style.visibility = "inherit";                l.saveColor = proto.menuItemBgColor;                l.menuHiliteBgColor = proto.menuHiliteBgColor;                l.action = container.menus[x].actions[i];                l.hilite = document.getElementById("menuItemHilite" + menuCount);                l.focusItem = document.getElementById("focusItem" + x);                l.focusItem.style.top = -30;                l.mouseover = l.Menu.mouseovers[x];                l.mouseout  = l.Menu.mouseouts[x];                l.onmouseover = proto.onMenuItemOver;                var childItem = document.getElementById("childMenu" + menuCount);                if (childItem) {                    l.childMenu = container.menus[x].items[i].menuLayer;                    childItem.style.left = l.style.width -11;                    childItem.style.top = (l.style.height /2) -4;                    childItem.style.width = 30 || 7;                    childItem.style.clip = "rect(0,7,7,3)";                    l.Menu.childMenus[l.Menu.childMenus.length] = l.childMenu;                }                var sep = document.getElementById("menuSeparator" + menuCount);                if (sep) {                    sep.style.clip = "rect(0," + (proto.menuItemWidth - 3) + ",1,0)";                    sep.style.backgroundColor = proto.bgColor;                    sep = document.getElementById("menuSeparatorLite" + menuCount);                    sep.style.clip = "rect(1," + (proto.menuItemWidth - 3) + ",2,0)";                    sep.style.backgroundColor = proto.menuLiteBgColor;                    l.style.height = proto.menuItemHeight/2;                    l.isSeparator = true                }                menuCount++;            }            proto.menuHeight = (parseInt(l.style.top) + parseInt(l.style.height));            var lite = document.getElementById("menuLite" + x);            lite.style.height = proto.menuHeight +2;            lite.style.width = proto.menuItemWidth + 2;            lite.style.backgroundColor = proto.menuLiteBgColor;            var body = document.getElementById("menuFg" + x);            body.style.height = proto.menuHeight + 1;            body.style.width = proto.menuItemWidth + 1;            body.style.backgroundColor = proto.bgColor;            container.menus[x].menuLayer.style.width  = proto.menuWidth || proto.menuItemWidth + (proto.menuBorder * 2) +2;            container.menus[x].menuLayer.style.height = proto.menuHeight + (proto.menuBorder * 2) +2;            if (menu.Menu.enableTracker) {                menu.Menu.disableHide = true;                setMenuTracker(menu.Menu);            }}        container.style.backgroundColor = container.menus[0].menuContainerBgColor;        container.saveBgColor = container.bgColor;    }    window.wroteMenu = true;}function onMenuItemOver(e, l, a) {    l = l || this;    a = a || window.ActiveMenuItem;    if (document.layers) {        if (a) {            a.document.bgColor = a.saveColor;            if (a.hilite) a.hilite.visibility = "hidden";            if (a.childMenu) a.document.layers[1].document.images[0].src = a.icon;        } else {            a = new Object();        }        if (this.mouseover && this.id != a.id) {            if (this.mouseover.length > 4) {                var ext = this.mouseover.substring(this.mouseover.length-4);                if (ext == ".gif" || ext == ".jpg") {                    this.document.layers[1].document.images[0].src = this.mouseover;                } else {                    eval("" + this.mouseover);                }            }        }        if (l.hilite) {            l.document.bgColor = l.menuHiliteBgColor;            l.zIndex = 1;            l.hilite.visibility = "inherit";            l.hilite.zIndex = 2;            l.document.layers[1].zIndex = 1;            l.focusItem.zIndex = this.zIndex +2;        }        l.focusItem.top = this.top;        l.Menu.hideChildMenu(l);    } else if (l.style) {        document.onmousedown=l.Menu.onMenuItemDown;        if (a) {            a.style.backgroundColor = a.saveColor;            if (a.hilite) a.hilite.style.visibility = "hidden";        } else {            a = new Object();		}        if (l.mouseover && l.id != a.id) {            if (l.mouseover.length > 4) {                var ext = l.mouseover.substring(l.mouseover.length-4);                if (ext == ".gif" || ext == ".jpg") {                    l.document.images[l.id + "Img"].src = l.mouseover;                } else {                    eval("" + l.mouseover);                }            }        }		if (l.isSeparator) return;        l.style.backgroundColor = l.menuHiliteBgColor;        if (l.hilite) {            l.style.backgroundColor = l.menuHiliteBgColor;            l.hilite.style.visibility = "inherit";        }	if (l.style.pixelTop) {          l.focusItem.style.pixelTop = l.style.pixelTop;	} else {          l.focusItem.style.top = l.style.top;        }        if (isNaN(l.zIndex)) {           l.zIndex = 1;        }        l.focusItem.style.zIndex = l.zIndex +1;        l.zIndex = 1;        l.Menu.hideChildMenu(l);    }    window.ActiveMenuItem = l;}function onMenuItemOut(e, l, a) {    l = l || this;    a = a || window.ActiveMenuItem;    if (l.id.indexOf("focusItem")) {        if (a && l.top) {          l.top = -30;	  if (a.mouseout && a.id != l.id) {	    if (a.mouseout.length > 4) {	      var ext = a.mouseout.substring(a.mouseout.length-4);	      if (ext == ".gif" || ext == ".jpg") {		a.document.layers[1].document.images[0].src = a.mouseout;	      } else {		eval("" + a.mouseout);	      }	    }	  }        } else if (a && l.style) {          document.onmousedown=null;          window.event.cancelBubble=true;	  if (l.mouseout) {	    if (l.mouseout.length > 4) {	      var ext = l.mouseout.substring(l.mouseout.length-4);	      if (ext == ".gif" || ext == ".jpg") {		l.document.images[l.id + "Img"].src = l.mouseout;	      } else {		eval("" + l.mouseout);	      }	    }	  }        }    }}function onMenuItemAction(e, l) {    l = window.ActiveMenuItem;    if (!l) return;    if (!ActiveMenu.Menu.disableHide) hideActiveMenus(ActiveMenu.menuLayer);    if (l.action) {        eval("" + l.action);    }}function showMenu(menu, x, y, child) {    if (!window.wroteMenu) return;    if (document.layers) {        if (menu) {            var l = menu.menuLayer || menu;            if (typeof(menu) == "string") {                for (var n=0; n < menuContainers.length; n++) {                    l = menuContainers[n].menus[menu];                    for (var i=0; i<menuContainers[n].menus.length; i++) {                        if (menu == menuContainers[n].menus[i].label) l = menuContainers[n].menus[i].menuLayer;                        if (l) break;                    }                }				if (!l) return;            }            l.Menu.container.document.bgColor = null;            l.left = 1;            l.top = 1;            hideActiveMenus(l);            if (this.visibility) l = this;            window.ActiveMenu = l;            window.releaseEvents(Event.MOUSEMOVE|Event.MOUSEUP);            setTimeout('if(window.ActiveMenu)window.ActiveMenu.Menu.setMouseTracker();', 300);        } else {            var l = child;        }        if (!l) return;        for (var i=0; i<l.layers.length; i++) {            if (!l.layers[i].isHilite)                l.layers[i].visibility = "inherit";            if (l.layers[i].document.layers.length > 0)                showMenu(null, "relative", "relative", l.layers[i]);        }        if (l.parentLayer) {  			offX = 14; offY = 0;            if (x != "relative")                l.parentLayer.left = x || window.pageX || 0;            if (y != "relative")                l.parentLayer.top = y || window.pageY || 0;            if (l.parentLayer.left + l.clip.width + offX > window.pageXOffset + window.innerWidth)                 l.parentLayer.left = (window.pageXOffset + window.innerWidth - l.clip.width - offX);            if (l.parentLayer.top + l.clip.height + offY > window.pageYOffset + window.innerHeight)                l.parentLayer.top = (window.pageYOffset + window.innerHeight - l.clip.height - offY);            if (l.parentLayer.isContainer) {                l.Menu.xOffset = window.pageXOffset;                l.Menu.yOffset = window.pageYOffset;                l.parentLayer.clip.width = window.ActiveMenu.clip.width +2;                l.parentLayer.clip.height = window.ActiveMenu.clip.height +2;                if (l.parentLayer.menuContainerBgColor) l.parentLayer.document.bgColor = l.parentLayer.menuContainerBgColor;            }        }        l.visibility = "inherit";        if (l.Menu) l.Menu.container.visibility = "inherit";    } else if (document.all) {        var l = menu.menuLayer || menu;        hideActiveMenus(l);        if (typeof(menu) == "string") {            l = document.all[menu];            for (var n=0; n < menuContainers.length; n++) {                l = menuContainers[n].menus[menu];                for (var i=0; i<menuContainers[n].menus.length; i++) {                    if (menu == menuContainers[n].menus[i].label) l = menuContainers[n].menus[i].menuLayer;                    if (l) break;                }            }        }        window.ActiveMenu = l;        l.style.visibility = "inherit";        if (x != "relative")            l.style.pixelLeft = x || (window.pageX + document.body.scrollLeft) || 0;        if (y != "relative")            l.style.pixelTop = y || (window.pageY + document.body.scrollTop) || 0;		if ( l.style.pixelLeft + l.style.pixelWidth > document.body.scrollLeft + document.body.clientWidth) {

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -