function imageswap(obj, folder, action) {
    if (action == 'over') {
        obj.src = '/images/' + folder + '/' + obj.id + '_on.gif';
    }
    if (action == 'out') {
        obj.src = '/images/' + folder + '/' + obj.id + '.gif';
    }
}

//SuckerTree Horizontal Menu (Sept 14th, 06)
//By Dynamic Drive: http://www.dynamicdrive.com/style/

var menuids = ["Tree7", "Tree4", "Tree24", "Section1"] //Enter id(s) of SuckerTree UL menus, separated by commas
//var menuids=["xTree1","xTree4", "Tree7","Tree24"] //Enter id(s) of SuckerTree UL menus, separated by commas
//, "NavUL3067","NavUL3086", "NavUL3085"
function buildsubmenus_horizontal() {

    for (var i = 0; i < menuids.length; i++) {

        if (document.getElementById(menuids[i]) != null) {
            //Get each child UL tag
            var ultags = document.getElementById(menuids[i]).getElementsByTagName("ul")
            
            for (var t = 0; t < ultags.length; t++) {

                //If the parent tag is the name of the TOP level UL tag then we're at the first level submenu
                if (ultags[t].parentNode.parentNode.id == menuids[i]) {

                    //dynamically position first level submenus to be height of main menu item
                    ultags[t].style.top = (ultags[t].parentNode.offsetHeight) + "px"
                    ultags[t].style.left = "0px"
                    //ultags[t].parentNode.getElementsByTagName("a")[0].className="mainfoldericon"
                }
                else { //else if this is a sub level menu (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.getElementsByTagName("a")[0].className="subfoldericon"
                }

                ultags[t].parentNode.onmouseover = function() {

                    this.getElementsByTagName("ul")[0].style.visibility = "visible"
                }

                ultags[t].parentNode.onmouseout = function() {

                    this.getElementsByTagName("ul")[0].style.visibility = "hidden"
                }
            }
        }

    }
}

if (window.addEventListener)
    window.addEventListener("load", buildsubmenus_horizontal, false)
else if (window.attachEvent)
    window.attachEvent("onload", buildsubmenus_horizontal)

