/**
 * Multi-level Menu.
 * Version: 1.0
 *
 * The use of this script is strictly forbidden without prior written
 * consent. You must obtain permission before copying, modifying, 
 * redistributing, deriving or selling any part of this program.
 *
 * Copyright © 2006 HYPERZOID
 * All Rights Reserved
 */

// Number of milliseconds to wait before hiding a submenu.
var HIDE_INTERVAL = 300;

// Timer for triggering hide submenu events.
var timer;


function hideSubMenu() {
    timer = setTimeout('showSubMenu(false)', HIDE_INTERVAL);
}


function showSubMenu(isVisible) {
    submenuItem = document.getElementById("submenu");
    if (isVisible) {
        if (timer != null) {
            clearTimeout(timer);
        }
        submenuItem.style.visibility = "visible";
        submenuItem.style.zIndex = "10";
    } else {
        submenuItem.style.visibility = "hidden";
    }
}

