您现在的位置: 军旅同心-旅游自驾-军旅文学 >> 读书赏析 >> 学习园地 >> 电脑网络 >> 技术文章 >> 正文
BBS(php & mysql)完整版(六)
作者:采集员 文章来源:来源于网络 点击数: 更新时间:2005-9-10 14:29:29
enu.bgImageUp +")";;
            }
        }
    }
    if (!mouseup && window.ActiveMenu) {
        if (window.ActiveMenu.Menu) {
            if (window.ActiveMenu.Menu.hideOnMouseOut) {
                FW_startTimeout();
            }
            return(true);
        }
    }
    return(true);
}

function PxToNum(pxStr)
{ // pxStr == 27px, we want 27.
    if (pxStr.length > 2) {
        n = Number(pxStr.substr(0, pxStr.length-2));
        return(n);
    }
    return(0);
}

function hideChildMenu(hcmLayer) {
    FW_clearTimeout();
    var l = hcmLayer;
    for (var i=0; i < l.Menu.childMenus.length; i++) {
        var theLayer = l.Menu.childMenus[i];
        if (document.layers) {
            theLayer.visibility = "hidden";
        } else {
            theLayer = FIND(theLayer);
            theLayer.style.visibility = "hidden";
        }
        theLayer.Menu.hideChildMenu(theLayer);
    }

    if (l.childMenu) {
        var childMenu = l.childMenu;
        if (document.layers) {
            l.Menu.FW_showMenu(null,null,null,childMenu.layers[0]);
            childMenu.zIndex = l.parentLayer.zIndex +1;
            childMenu.top = l.top + l.parentLayer.top + l.Menu.menuLayer.top + l.Menu.menuItemHeight/3;
            if (childMenu.left + childMenu.clip.width > window.innerWidth) {
                childMenu.left = l.parentLayer.left - childMenu.clip.width + l.Menu.menuLayer.left + 15;
                l.Menu.container.clip.left -= childMenu.clip.width;
            } else {
                childMenu.left = l.parentLayer.left + l.parentLayer.clip.width  + l.Menu.menuLayer.left -5;
            }
            var w = childMenu.clip.width+childMenu.left-l.Menu.container.clip.left;
            if (w > l.Menu.container.clip.width)   
                l.Menu.container.clip.width = w;
            var h = childMenu.clip.height+childMenu.top-l.Menu.container.clip.top;
            if (h > l.Menu.container.clip.height) l.Menu.container.clip.height = h;
            l.document.layers[1].zIndex = 0;
            childMenu.visibility = "inherit";
        } else if (FIND("menuItem0")) {
            childMenu = FIND(l.childMenu);
            var menuLayer = FIND(l.Menu.menuLayer);
            var s = childMenu.style;
            s.zIndex = menuLayer.style.zIndex+1;
            if (document.all) { // ie case.
                s.pixelTop = l.style.pixelTop + menuLayer.style.pixelTop + l.Menu.menuItemHeight/3;
                s.left = s.pixelLeft = (menuLayer.style.pixelWidth) + menuLayer.style.pixelLeft -5;
            } else { // zilla case
                var top = PxToNum(l.style.top) + PxToNum(menuLayer.style.top) + l.Menu.menuItemHeight/3;
                var left = (PxToNum(menuLayer.style.width)) + PxToNum(menuLayer.style.left) -5;
                s.top = top;
                s.left = left;
            }
            childMenu.style.visibility = "inherit";
        } else {
            return;
        }
        window.activeMenus[window.activeMenus.length] = childMenu;
    }
}

function hideActiveMenus() {
    if (!window.activeMenus) return;
    for (var i=0; i < window.activeMenus.length; i++) {
        if (!activeMenus[i]) continue;
        if (activeMenus[i].visibility && activeMenus[i].Menu) {
            activeMenus[i].visibility = "hidden";
            activeMenus[i].Menu.container.visibility = "hidden";
            activeMenus[i].Menu.container.clip.left = 0;
        } else if (activeMenus[i].style) {
            var s = activeMenus[i].style;
            s.visibility = "hidden";
            s.left = -200;
            s.top = -200;
        }
    }
    if (window.ActiveMenuItem) {
        hideMenu(false, false);
    }
    window.activeMenus.length = 0;

上一页  [1] [2] [3] [4] 


更多
免责声明:作品版权归所属媒体与作者所有!!本站刊载此文不代表同意其说法或描述,仅为提供更多信息。如果您认为我们侵犯了您的版权,请告知!本站立即删除。有异议请联系我们。
文章录入:烟灰缸    责任编辑:烟灰缸 
网友评论:(只显示最新10条。评论内容只代表网友观点,与本站立场无关!)
| 设为首页 | 加入收藏 | 联系站长 | 友情链接 | 网站地图 | 版权申明 | 网站公告 | 管理登录 |