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

📄 ncbi_menu_dnd.js

📁 ncbi源码
💻 JS
📖 第 1 页 / 共 3 页
字号:
            if (i>0) l.style.top = document.getElementById("menuItem" + (id-1)).style.pixelTop + document.getElementById("menuItem" + (id-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" + id);            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" + id);            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" + id);            if (sep) {                sep.style.clip = "rect(0," + (proto.menuItemWidth - 3) + ",1,0)";                sep.style.backgroundColor = proto.bgColor;                sep = document.getElementById("menuSeparatorLite" + id);                sep.style.clip = "rect(1," + (proto.menuItemWidth - 3) + ",2,0)";                sep.style.backgroundColor = proto.menuLiteBgColor;//                l.style.height = proto.menuItemHeight/2;                l.isSeparator = true            }        }        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);        }    }}function setContainerProperty(container) {    if (document.layers) {        container.clip.width = window.innerWidth;        container.clip.height = window.innerHeight;        container.onmouseout = this.hideMenu;        container.menuContainerBgColor = this.menuContainerBgColor;	}	if (!useDynamicMenu) {        for (var i=0; i<container.menus.length; i++) {			setMenuProperty(container, i);		}	}    if (document.all) {        container.document.all("menuContainer").style.backgroundColor = container.menus[0].menuContainerBgColor;        container.document.saveBgColor = container.document.bgColor;    } else if (document.getElementById) {        container.style.backgroundColor = container.menus[0].menuContainerBgColor;        container.saveBgColor = container.bgColor;    }}function writeMenus(container) {    if (!window.attemptCount)        window.attemptCount = 1;    if (!container && document.layers) {        if (eval("document.width"))            container = new Layer(1000);    } else if (!container && document.all) {        if  (!document.all["menuContainer"]) {            container = document.createElement("DIV")             container.id = "menuContainer" 	        document.getElementsByTagName("BODY").item(0).appendChild(container)        }        container = document.all["menuContainer"];    } else if (!container && document.getElementById && document.getElementsByTagName("BODY")) {        if (!document.getElementById("menuContainer")) {	        container = document.createElement("DIV") 	        container.id = "menuContainer" 	        document.getElementsByTagName("BODY").item(0).appendChild(container)	        container.style.backgroundColor = this.menuContainerBgColor        } else {	        container = document.getElementById("menuContainer")        }    }    if (!container && window.attemptCount < 10) {        window.delayWriteMenus = this.writeMenus;        window.menuContainerBgColor = this.menuContainerBgColor;        window.attemptCount++;        setTimeout('delayWriteMenus()', 3000);        return;    }    container.isContainer = "menuContainer" + menuContainers.length;    menuContainers[menuContainers.length] = container;    container.menus = new Array();    for (var i=0; i<window.menus.length; i++) {        container.menus[i] = window.menus[i];	}    window.menus.length = 0;	// Get menus html-content    var content = '';	if (window.useDynamicMenu && document.layers) window.useDynamicMenu = false;	if (!useDynamicMenu) {	    for (var i=0; i<container.menus.length; i++) {			content += getMenuContent(container,i);	    }	}    if (container.innerHTML) {        container.innerHTML=content;    } else if (!document.all && document.getElementById) {//	dynamiccontentNS6(container,content)        container.innerHTML=content;    } else {        container.document.open("text/html");        container.document.writeln(content);        container.document.close();    }	// Set containers propertyes	setContainerProperty(container);    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 getMenuLayer(menu) {    var l = menu.menuLayer || menu;	var n_container = 0;	var n_menu;	if (typeof(menu) == "string") {		if (document.all) {	    	l = document.all[menu];		} else if (document.getElementById) {            l = document.getElementById(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) {					if (useDynamicMenu) break;					l = menuContainers[n].menus[i].menuLayer;				 }                 if (l) break;             }			 if (i<menuContainers[n].menus.length) break;        }		if (useDynamicMenu) {			n_container = n;			n_menu = i;		}    } else {		if (useDynamicMenu) {			n_menu = menu.number;		}	}	if (useDynamicMenu) {		var container = menuContainers[n_container];		var content = getMenuContent(container, n_menu);      		container.innerHTML = content;		setMenuProperty(container, n_menu);		l = menuContainers[n_container].menus[n_menu].menuLayer;	}	return l;}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;        }

⌨️ 快捷键说明

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