<!--
var menuIds = new Array("Meni") //Enter id(s) of UL menus, separated by commas
var submenuOffset = -2 //Offset of submenus from main menu. Default is -2 pixels.

function CreateVerticalMenu()
{
    for (var i = 0; i < menuIds.length; i++)
    {
        var ulTags = document.getElementById(menuIds[i]).getElementsByTagName("ul")
        for (var t = 0; t < ulTags.length; t++)
        {
            // add arrow to items that have submenu.
            var arrowSpan = document.createElement("span");
            arrowSpan.className = "SubmenuArrow"
            arrowSpan.innerHTML = "&nbsp;&nbsp;"; // since arrow goes to background, it has to have enough space
            ulTags[t].parentNode.getElementsByTagName("a")[0].appendChild(arrowSpan);
            if (t == 0) //if this is a first level submenu
            {
                ulTags[t].style.left = ulTags[t].parentNode.offsetWidth + "px"; //dynamically position first level submenus to be width of main menu item
            }
            else //else if this is a sub level submenu (ul)
            {
                ulTags[t].style.left = ulTags[t-1].getElementsByTagName("a")[0].offsetWidth + "px"; //position menu to the right of menu item that activated it
            }
            ulTags[t].parentNode.onmouseover = function()
            {
                this.getElementsByTagName("ul")[0].style.display = "block"
            }
            ulTags[t].parentNode.onmouseout = function()
            {
                this.getElementsByTagName("ul")[0].style.display = "none"
            }
        }
        for (var t = ulTags.length - 1; t >= 0; t--)//loop through all sub menus again, and use "display:none" to hide menus (to prevent possible page scrollbars
        { 
            ulTags[t].style.visibility = "visible"
            ulTags[t].style.display = "none"
        }
    }
}

if (window.addEventListener)
    window.addEventListener("load", CreateVerticalMenu, false)
else if (window.attachEvent)
    window.attachEvent("onload", CreateVerticalMenu)
-->
