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

function FW_clearTimeout()
{
    if (fwHideMenuTimer) clearTimeout(fwHideMenuTimer);
    fwHideMenuTimer = null;
    fwDHFlag = false;
}
function FW_startTimeout()
{
    fwStart = new Date();
    fwDHFlag = true;
    fwHideMenuTimer = setTimeout("fwDoHide()", 1000);
}

function fwDoHide()
{
    if (!fwDHFlag) return;
    var elapsed = new Date() - fwStart;
    if (elapsed < 1000) {
        fwHideMenuTimer = setTimeout("fwDoHide()", 1100-elapsed);
        return;
    }
    fwDHFlag = false;
    hideActiveMenus();
    window.ActiveMenuItem = 0;
}

function FW_showMenu(menu, x, y, child) {
    if (!window.fwWroteMenu) return;
    FW_clearTimeout();
    if (document.layers) {
        if (menu) {
            var l = menu.menuLayer || menu;
            l.left = 1;
            l.top = 1;
            hideActiveMenus();
            if (this.visibility) l = this;
            window.ActiveMenu = l;
        } 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)  
                FW_showMenu(null, "relative", "relative", l.layers[i]);
        }
        if (l.parentLayer) {
            if (x != "relative")  
                l.parentLayer.left = x || window.pageX || 0;
            if (l.parentLayer.left + l.clip.width > window.innerWidth)  
                l.parentLayer.left -= (l.parentLayer.left + l.clip.width - window.innerWidth);
            if (y != "relative")  
                l.parentLayer.top = y || window.pageY || 0;
            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 (FIND("menuItem0")) {
        var l = menu.menuLayer || menu;     
        hideActiveMenus();
        if (typeof(l) == "string") {
            l = FIND(l);
        }
        window.ActiveMenu = l;
        var s = l.style;
        s.visibility = "inherit";
        if (x != "relative")  
            s.left = s.pixelLeft = x || (window.pageX + document.body.scrollLeft) || 0;
        if (y != "relative")  
            s.top = s.pixelTop = y || (window.pageY + document.body.scrollTop) || 0;
        l.Menu.xOffset = document.body.scrollLeft;
        l.Menu.yOffset = document.body.scrollTop;
    }
    if (menu) {
        window.activeMenus[window.activeMenus.length] = l;
    }
}

function onMenuItemDown(e, l) {
    var a = window.ActiveMenuItem;
    if (document.layers) {
        if (a) {
            a.eX = e.pageX;
            a.eY = e.pageY;
            a.clicked = true;
        }
    }
}

function mouseupMenu(e)
{
    hideMenu(true, e);
    hideActiveMenus();
    return true;
}

function mouseoutMenu()
{
    hideMenu(false, false);
    return true;
}


function hideMenu(mouseup, e) {
    var a = window.ActiveMenuItem;
    if (a && document.layers) {
        a.document.bgColor = a.saveColor;
        a.focusItem.top = -30;
        if (a.hilite) a.hilite.visibility = "hidden";
        if (mouseup && a.action && a.clicked && window.ActiveMenu) {
             if (a.eX <= e.pageX+15 && a.eX >= e.pageX-15 && a.eY <= e.pageY+10 && a.eY >= e.pageY-10) {
                setTimeout('window.ActiveMenu.Menu.onMenuItemAction();', 2);
            }
        }
        a.clicked = false;
        if (a.Menu.bgImageOver) {
            a.background.src = a.Menu.bgImageUp;
        }
    } else if (window.ActiveMenu && FIND("menuItem0")) {
        if (a) {
            a.style.backgroundColor = a.saveColor;
            if (a.hilite) a.hilite.style.visibility = "hidden";
            if (a.Menu.bgImageUp) {
                a.style.background = "url(" + a.M

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


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