/*
 * DO NOT REMOVE THIS NOTICE
 *
 * PROJECT:   mygosuMenu
 * VERSION:   1.1.6
 * COPYRIGHT: (c) 2003,2004 Cezary Tomczak
 * LINK:      http://gosu.pl/dhtml/mygosumenu.html
 * LICENSE:   BSD (revised)
 */

/*
  Todo, bugs to fix:
  - delay.show = 400 , delay.hide = 400
    go Product Three -> Live Demo -> Test Drive -> Test Three , go fast to Product Four.
    Result: 2 elements highlighted in the same section
  - delay.show = 0 , delay.hide = 400
    go Product Three -> Live Demo , section out , section over, seciont out.
    Result: Live Demo is not highlighted
  - active className changing, unnecessary blink
  - opera: hideSection() exceptions are throwed
*/

function DropDownMenuX(id) {

    /* Type of the menu: "horizontal" or "vertical" */
    this.type = "horizontal";

    /* Delay (in miliseconds >= 0): show-hide menu
     * Hide must be > 0 */
    this.delay = {
        "show": 0,
        "hide": 400
    }
    /* Change the default position of sub-menu by Y pixels from top and X pixels from left
     * Negative values are allowed */
    this.position = {
        "level1": { "top": 0, "left": 0},
        "levelX": { "top": 0, "left": 0}
    }

    /* fix ie selectbox bug ? */
    this.fixIeSelectBoxBug = true;

    /* Z-index property for .section */
    this.zIndex = {
        "visible": 500,
        "hidden": -1
    };

    // Browser detection
    this.browser = {
        "ie": Boolean(document.body.currentStyle),
        "ie5": (navigator.appVersion.indexOf("MSIE 5.5") != -1 || navigator.appVersion.indexOf("MSIE 5.0") != -1),
        "ie6": (navigator.appVersion.indexOf("MSIE 6.0") != -1)
    };
    
    if (!this.browser.ie) {
        this.browser.ie5 = false;
        this.browser.ie6 = false;
    }

    /* Initialize the menu */
    this.init = function() {
        if (!document.getElementById(this.id)) { return alert("DropDownMenuX.init() failed. Element '"+ this.id +"' does not exist."); }
        if (this.type != "horizontal" && this.type != "vertical") { return alert("DropDownMenuX.init() failed. Unknown menu type: '"+this.type+"'"); }
        if (this.browser.ie && this.browser.ie5) { fixWrap(); }
        fixSections();
        parse(document.getElementById(this.id).childNodes, this.tree, this.id);
    }

    /* Search for .section elements and set width for them */
    function fixSections() {
        var arr = document.getElementById(self.id).getElementsByTagName("div");
        var sections = new Array();
        var widths = new Array();
        
        for (var i = 0; i < arr.length; i++) {
            if (arr[i].className == "section") {
                sections.push(arr[i]);
            }
        }
        for (var i = 0; i < sections.length; i++) {
            widths.push(getMaxWidth(sections[i].childNodes));
        }
        for (var i = 0; i < sections.length; i++) {
            sections[i].style.width = (widths[i]) + "px";
        }
        if (self.browser.ie) {
            for (var i = 0; i < sections.length; i++) {
                setMaxWidth(sections[i].childNodes, widths[i]);
            }
        }
    }

    function fixWrap() {
        var elements = document.getElementById(self.id).getElementsByTagName("a");
        for (var i = 0; i < elements.length; i++) {
            if (/item2/.test(elements[i].className)) {
                elements[i].innerHTML = '<div nowrap="nowrap">'+elements[i].innerHTML+'</div>';
            }
        }
    }

    /* Search for an element with highest width among given nodes, return that width */
    function getMaxWidth(nodes) {
        var maxWidth = 0;
        for (var i = 0; i < nodes.length; i++) {
            if (nodes[i].nodeType != 1 || /section/.test(nodes[i].className)) { continue; }
            if (nodes[i].offsetWidth > maxWidth) { maxWidth = nodes[i].offsetWidth; }
        }
        return maxWidth;
    }

    /* Set width for item2 elements */
    function setMaxWidth(nodes, maxWidth) {
        for (var i = 0; i < nodes.length; i++) {
            if (nodes[i].nodeType == 1 && /item2/.test(nodes[i].className) && nodes[i].currentStyle) {
                if (self.browser.ie5) {
                    nodes[i].style.width = (maxWidth) + "px";
                } else {
                    nodes[i].style.width = (maxWidth - parseInt(nodes[i].currentStyle.paddingLeft) - parseInt(nodes[i].currentStyle.paddingRight)) + "px";
                }
            }
        }
    }

    /* Parse nodes, create events, position elements */
    function parse(nodes, tree, id) {
        for (var i = 0; i < nodes.length; i++) {
            if (1 != nodes[i].nodeType) {
                continue;
            }
            switch (true) {
                // .item1
                case /\bitem1\b/.test(nodes[i].className):
                    nodes[i].id = id + "-" + tree.length;
                    tree.push(new Array());
                    nodes[i].onmouseover = itemOver;
                    nodes[i].onmouseout = itemOut;
                    break;
                // .item2
                case /\bitem2\b/.test(nodes[i].className):
                    nodes[i].id = id + "-" + tree.length;
                    tree.push(new Array());
                    nodes[i].onmouseover = itemOver;
                    nodes[i].onmouseout = itemOut;
                    break;
                // .section
                case /\bsection\b/.test(nodes[i].className):
                    // id, events
                    nodes[i].id = id + "-" + (tree.length - 1) + "-section";
                    nodes[i].onmouseover = sectionOver;
                    nodes[i].onmouseout = sectionOut;
                    // position
                    var box1 = document.getElementById(id + "-" + (tree.length - 1));
                    var box2 = document.getElementById(nodes[i].id);
                    var el = new Element(box1.id);
                    if (1 == el.level) {
                        if ("horizontal" == self.type) {
                            box2.style.top = box1.offsetTop + box1.offsetHeight + self.position.level1.top + "px";
                            if (self.browser.ie5) {
                                box2.style.left = self.position.level1.left + "px";
                            } else {
                                box2.style.left = box1.offsetLeft + self.position.level1.left + "px";
                            }
                        } else if ("vertical" == self.type) {
                            box2.style.top = box1.offsetTop + self.position.level1.top + "px";
                            if (self.browser.ie5) {
                                box2.style.left = box1.offsetWidth + self.position.level1.left + "px";
                            } else {
                                box2.style.left = box1.offsetLeft + box1.offsetWidth + self.position.level1.left + "px";
                            }
                        }
                    } else {
                        box2.style.top = box1.offsetTop + self.position.levelX.top + "px";
                        box2.style.left = box1.offsetLeft + box1.offsetWidth + self.position.levelX.left + "px";
                    }
                    // sections, sectionsShowCnt, sectionsHideCnt
                    self.sections.push(nodes[i].id);
                    self.sectionsShowCnt.push(0);
                    self.sectionsHideCnt.push(0);
                    if (self.fixIeSelectBoxBug && self.browser.ie6) {
                        nodes[i].innerHTML = nodes[i].innerHTML + '<iframe id="'+nodes[i].id+'-iframe" src="javascript:false;" scrolling="no" frameborder="0" style="position: absolute; top: 0px; left: 0px; display: none; filter:alpha(opacity=0);"></iframe>';
                    }
                    break;
            }
            if (nodes[i].childNodes) {
                if (/\bsection\b/.test(nodes[i].className)) {
                    parse(nodes[i].childNodes, tree[tree.length - 1], id + "-" + (tree.length - 1));
                } else {
                    parse(nodes[i].childNodes, tree, id);
                }
            }
        }
    }

    /* event, item:onmouseover */
    function itemOver() {
		
		//rollover HACK! by rptesoro
		switch(this.id)
		{
			case "menu1-0":
				MM_swapImage(this.id,'','images/v4/topbar-aboutus02.gif',1);		
				break;
			case "menu1-1":
				MM_swapImage(this.id,'','images/v4/topbar-services02.gif',1);		
				break;
			case "menu1-2":
				MM_swapImage(this.id,'','images/v4/topbar-projects02.gif',1);		
				break;
			case "menu1-3":
				MM_swapImage(this.id,'','images/v4/topbar-careers02.gif',1);		
				break;
			case "menu1-4":
				MM_swapImage(this.id,'','images/v4/topbar-news02.gif',1);		
				break;
			case "menu1-5":
				MM_swapImage(this.id,'','images/v4/topbar-locations02.gif',1);		
				break;
			case "menu1-6":
				MM_swapImage(this.id,'','images/v4/topbar-login02.gif',1);		
				break;
				
			//ewp				
			case "ewp-0":
				MM_swapImage(this.id,'','images/v5/ewp/topbar-ewp-aboutus02.gif',1);		
				break;
			case "ewp-1":
				MM_swapImage(this.id,'','images/v5/ewp/topbar-ewp-services02.gif',1);		
				break;
			case "ewp-2":
				MM_swapImage(this.id,'','images/v5/ewp/topbar-ewp-ourwork02.gif',1);		
				break;
			case "ewp-3":
				MM_swapImage(this.id,'','images/v5/ewp/topbar-ewp-careers02.gif',1);		
				break;
			case "ewp-4":
				MM_swapImage(this.id,'','images/v5/ewp/topbar-ewp-news02.gif',1);		
				break;
			case "ewp-5":
				MM_swapImage(this.id,'','images/v5/ewp/topbar-ewp-locations02.gif',1);		
				break;
			case "ewp-6":
				MM_swapImage(this.id,'','images/v5/ewp/topbar-ewp-login02.gif',1);		
				break;				
				

			//green				
			case "green-0":
				MM_swapImage(this.id,'','images/v5/green/topbar-green-aboutus02.gif',1);		
				break;
			case "green-1":
				MM_swapImage(this.id,'','images/v5/green/topbar-green-services02.gif',1);		
				break;
			case "green-2":
				MM_swapImage(this.id,'','images/v5/green/topbar-green-ourwork02.gif',1);		
				break;
			case "green-3":
				MM_swapImage(this.id,'','images/v5/green/topbar-green-careers02.gif',1);		
				break;
			case "green-4":
				MM_swapImage(this.id,'','images/v5/green/topbar-green-news02.gif',1);		
				break;
			case "green-5":
				MM_swapImage(this.id,'','images/v5/green/topbar-green-loc02.gif',1);		
				break;
			case "green-6":
				MM_swapImage(this.id,'','images/v5/green/topbar-green-login02.gif',1);		
				break;	
				
			//about				
			case "about-0":
				MM_swapImage(this.id,'','images/v5/aboutus/topbar-aboutus-aboutus02.gif',1);		
				break;
			case "about-1":
				MM_swapImage(this.id,'','images/v5/aboutus/topbar-aboutus-services02.gif',1);		
				break;
			case "about-2":
				MM_swapImage(this.id,'','images/v5/aboutus/topbar-aboutus-ourwork02.gif',1);		
				break;
			case "about-3":
				MM_swapImage(this.id,'','images/v5/aboutus/topbar-aboutus-careers02.gif',1);		
				break;
			case "about-4":
				MM_swapImage(this.id,'','images/v5/aboutus/topbar-aboutus-news02.gif',1);		
				break;
			case "about-5":
				MM_swapImage(this.id,'','images/v5/aboutus/topbar-aboutus-loc02.gif',1);		
				break;
			case "about-6":
				MM_swapImage(this.id,'','images/v5/aboutus/topbar-aboutus-login02.gif',1);		
				break;
				
			//contact				
			case "contact-0":
				MM_swapImage(this.id,'','images/v5/contact/topbar-contact-aboutus02.gif',1);		
				break;
			case "contact-1":
				MM_swapImage(this.id,'','images/v5/contact/topbar-contact-services02.gif',1);		
				break;
			case "contact-2":
				MM_swapImage(this.id,'','images/v5/contact/topbar-contact-ourwork02.gif',1);		
				break;
			case "contact-3":
				MM_swapImage(this.id,'','images/v5/contact/topbar-contact-careers02.gif',1);		
				break;
			case "contact-4":
				MM_swapImage(this.id,'','images/v5/contact/topbar-contact-news02.gif',1);		
				break;
			case "contact-5":
				MM_swapImage(this.id,'','images/v5/contact/topbar-contact-locations02.gif',1);		
				break;
			case "contact-6":
				MM_swapImage(this.id,'','images/v5/contact/topbar-contact-login02.gif',1);		
				break;	
				
			//lighting				
			case "lighting-0":
				MM_swapImage(this.id,'','images/v5/branding-lighting/topbar-light-aboutus02.gif',1);		
				break;
			case "lighting-1":
				MM_swapImage(this.id,'','images/v5/branding-lighting/topbar-light-services02.gif',1);		
				break;
			case "lighting-2":
				MM_swapImage(this.id,'','images/v5/branding-lighting/topbar-light-ourwork02.gif',1);		
				break;
			case "lighting-3":
				MM_swapImage(this.id,'','images/v5/branding-lighting/topbar-light-careers02.gif',1);		
				break;
			case "lighting-4":
				MM_swapImage(this.id,'','images/v5/branding-lighting/topbar-light-news02.gif',1);		
				break;
			case "lighting-5":
				MM_swapImage(this.id,'','images/v5/branding-lighting/topbar-light-locations02.gif',1);		
				break;
			case "lighting-6":
				MM_swapImage(this.id,'','images/v5/branding-lighting/topbar-light-login02.gif',1);		
				break;	
				
				
			//brand				
			case "brand-0":
				MM_swapImage(this.id,'','images/v5/branding-lighting/topbar-brand-aboutus02.gif',1);		
				break;
			case "brand-1":
				MM_swapImage(this.id,'','images/v5/branding-lighting/topbar-brand-services02.gif',1);		
				break;
			case "brand-2":
				MM_swapImage(this.id,'','images/v5/branding-lighting/topbar-brand-ourwork02.gif',1);		
				break;
			case "brand-3":
				MM_swapImage(this.id,'','images/v5/branding-lighting/topbar-brand-careers02.gif',1);		
				break;
			case "brand-4":
				MM_swapImage(this.id,'','images/v5/branding-lighting/topbar-brand-news02.gif',1);		
				break;
			case "brand-5":
				MM_swapImage(this.id,'','images/v5/branding-lighting/topbar-brand-locations02.gif',1);		
				break;
			case "brand-6":
				MM_swapImage(this.id,'','images/v5/branding-lighting/topbar-brand-login02.gif',1);		
				break;	
				
				
			//lob_strategies				
			case "lob_strategies-0":
				MM_swapImage(this.id,'','images/v5/lob/topbar-strat-aboutus02.gif',1);		
				break;
			case "lob_strategies-1":
				MM_swapImage(this.id,'','images/v5/lob/topbar-strat-services02.gif',1);		
				break;
			case "lob_strategies-2":
				MM_swapImage(this.id,'','images/v5/lob/topbar-strat-ourwork02.gif',1);		
				break;
			case "lob_strategies-3":
				MM_swapImage(this.id,'','images/v5/lob/topbar-strat-careers02.gif',1);		
				break;
			case "lob_strategies-4":
				MM_swapImage(this.id,'','images/v5/lob/topbar-strat-news02.gif',1);		
				break;
			case "lob_strategies-5":
				MM_swapImage(this.id,'','images/v5/lob/topbar-strat-locations02.gif',1);		
				break;
			case "lob_strategies-6":
				MM_swapImage(this.id,'','images/v5/lob/topbar-strat-login02.gif',1);		
				break;	
				
			//lob_interior				
			case "lob_interior-0":
				MM_swapImage(this.id,'','images/v5/lob/topbar-id-aboutus02.gif',1);		
				break;
			case "lob_interior-1":
				MM_swapImage(this.id,'','images/v5/lob/topbar-id-services02.gif',1);		
				break;
			case "lob_interior-2":
				MM_swapImage(this.id,'','images/v5/lob/topbar-id-ourwork02.gif',1);		
				break;
			case "lob_interior-3":
				MM_swapImage(this.id,'','images/v5/lob/topbar-id-careers02.gif',1);		
				break;
			case "lob_interior-4":
				MM_swapImage(this.id,'','images/v5/lob/topbar-id-news02.gif',1);		
				break;
			case "lob_interior-5":
				MM_swapImage(this.id,'','images/v5/lob/topbar-id-locations02.gif',1);		
				break;
			case "lob_interior-6":
				MM_swapImage(this.id,'','images/v5/lob/topbar-id-login02.gif',1);		
				break;		
				
			//lob_arch				
			case "lob_arch-0":
				MM_swapImage(this.id,'','images/v5/lob/topbar-arch-aboutus02.gif',1);		
				break;
			case "lob_arch-1":
				MM_swapImage(this.id,'','images/v5/lob/topbar-arch-services02.gif',1);		
				break;
			case "lob_arch-2":
				MM_swapImage(this.id,'','images/v5/lob/topbar-arch-ourwork02.gif',1);		
				break;
			case "lob_arch-3":
				MM_swapImage(this.id,'','images/v5/lob/topbar-arch-careers02.gif',1);		
				break;
			case "lob_arch-4":
				MM_swapImage(this.id,'','images/v5/lob/topbar-arch-news02.gif',1);		
				break;
			case "lob_arch-5":
				MM_swapImage(this.id,'','images/v5/lob/topbar-arch-locations02.gif',1);		
				break;
			case "lob_arch-6":
				MM_swapImage(this.id,'','images/v5/lob/topbar-arch-login02.gif',1);		
				break;		
				
			//lob_work				
			case "lob_work-0":
				MM_swapImage(this.id,'','images/v5/lob/topbar-work-aboutus02.gif',1);		
				break;
			case "lob_work-1":
				MM_swapImage(this.id,'','images/v5/lob/topbar-work-services02.gif',1);		
				break;
			case "lob_work-2":
				MM_swapImage(this.id,'','images/v5/lob/topbar-work-ourwork02.gif',1);		
				break;
			case "lob_work-3":
				MM_swapImage(this.id,'','images/v5/lob/topbar-work-careers02.gif',1);		
				break;
			case "lob_work-4":
				MM_swapImage(this.id,'','images/v5/lob/topbar-work-news02.gif',1);		
				break;
			case "lob_work-5":
				MM_swapImage(this.id,'','images/v5/lob/topbar-work-locations02.gif',1);		
				break;
			case "lob_work-6":
				MM_swapImage(this.id,'','images/v5/lob/topbar-work-login02.gif',1);		
				break;		

			//lob_info				
			case "lob_info-0":
				MM_swapImage(this.id,'','images/v5/lob/topbar-info-aboutus02.gif',1);		
				break;
			case "lob_info-1":
				MM_swapImage(this.id,'','images/v5/lob/topbar-info-services02.gif',1);		
				break;
			case "lob_info-2":
				MM_swapImage(this.id,'','images/v5/lob/topbar-info-ourwork02.gif',1);		
				break;
			case "lob_info-3":
				MM_swapImage(this.id,'','images/v5/lob/topbar-info-careers02.gif',1);		
				break;
			case "lob_info-4":
				MM_swapImage(this.id,'','images/v5/lob/topbar-info-news02.gif',1);		
				break;
			case "lob_info-5":
				MM_swapImage(this.id,'','images/v5/lob/topbar-info-locations02.gif',1);		
				break;
			case "lob_info-6":
				MM_swapImage(this.id,'','images/v5/lob/topbar-info-login02.gif',1);		
				break;	
				
			//lob_eng				
			case "lob_eng-0":
				MM_swapImage(this.id,'','images/v5/lob/topbar-eng-aboutus02.gif',1);		
				break;
			case "lob_eng-1":
				MM_swapImage(this.id,'','images/v5/lob/topbar-eng-services02.gif',1);		
				break;
			case "lob_eng-2":
				MM_swapImage(this.id,'','images/v5/lob/topbar-eng-ourwork02.gif',1);		
				break;
			case "lob_eng-3":
				MM_swapImage(this.id,'','images/v5/lob/topbar-eng-careers02.gif',1);		
				break;
			case "lob_eng-4":
				MM_swapImage(this.id,'','images/v5/lob/topbar-eng-news02.gif',1);		
				break;
			case "lob_eng-5":
				MM_swapImage(this.id,'','images/v5/lob/topbar-eng-locations02.gif',1);		
				break;
			case "lob_eng-6":
				MM_swapImage(this.id,'','images/v5/lob/topbar-eng-login02.gif',1);		
				break;	
				
				
				
			//news				
			case "news-0":
				MM_swapImage(this.id,'','images/v5/news/topbar-news-aboutus02.gif',1);		
				break;
			case "news-1":
				MM_swapImage(this.id,'','images/v5/news/topbar-news-services02.gif',1);		
				break;
			case "news-2":
				MM_swapImage(this.id,'','images/v5/news/topbar-news-ourwork02.gif',1);		
				break;
			case "news-3":
				MM_swapImage(this.id,'','images/v5/news/topbar-news-careers02.gif',1);		
				break;
			case "news-4":
				MM_swapImage(this.id,'','images/v5/news/topbar-news-news02.gif',1);		
				break;
			case "news-5":
				MM_swapImage(this.id,'','images/v5/news/topbar-news-locations02.gif',1);		
				break;
			case "news-6":
				MM_swapImage(this.id,'','images/v5/news/topbar-news-login02.gif',1);		
				break;	
				
				
				
			//locations				
			case "locations-0":
				MM_swapImage(this.id,'','images/v5/locations/topbar-locations-aboutus02.gif',1);		
				break;
			case "locations-1":
				MM_swapImage(this.id,'','images/v5/locations/topbar-locations-services02.gif',1);		
				break;
			case "locations-2":
				MM_swapImage(this.id,'','images/v5/locations/topbar-locations-ourwork02.gif',1);		
				break;
			case "locations-3":
				MM_swapImage(this.id,'','images/v5/locations/topbar-locations-careers02.gif',1);		
				break;
			case "locations-4":
				MM_swapImage(this.id,'','images/v5/locations/topbar-locations-news02.gif',1);		
				break;
			case "locations-5":
				MM_swapImage(this.id,'','images/v5/locations/topbar-locations-loc02.gif',1);		
				break;
			case "locations-6":
				MM_swapImage(this.id,'','images/v5/locations/topbar-locations-login02.gif',1);		
				break;	
				
				
				
			//ourwork				
			case "ourwork-0":
				MM_swapImage(this.id,'','images/v5/ourwork/topbar-ourwork-aboutus02.gif',1);		
				break;
			case "ourwork-1":
				MM_swapImage(this.id,'','images/v5/ourwork/topbar-ourwork-services02.gif',1);		
				break;
			case "ourwork-2":
				MM_swapImage(this.id,'','images/v5/ourwork/topbar-ourwork-ourwork02.gif',1);		
				break;
			case "ourwork-3":
				MM_swapImage(this.id,'','images/v5/ourwork/topbar-ourwork-careers02.gif',1);		
				break;
			case "ourwork-4":
				MM_swapImage(this.id,'','images/v5/ourwork/topbar-ourwork-news02.gif',1);		
				break;
			case "ourwork-5":
				MM_swapImage(this.id,'','images/v5/ourwork/topbar-ourwork-locations02.gif',1);		
				break;
			case "ourwork-6":
				MM_swapImage(this.id,'','images/v5/ourwork/topbar-ourwork-login02.gif',1);		
				break;
				
				
				
			//careers
			case "careers-0":
				MM_swapImage(this.id,'','images/v5/careers/topbar-careers-aboutus02.gif',1);		
				break;
			case "careers-1":
				MM_swapImage(this.id,'','images/v5/careers/topbar-careers-services02.gif',1);		
				break;
			case "careers-2":
				MM_swapImage(this.id,'','images/v5/careers/topbar-careers-ourwork02.gif',1);		
				break;
			case "careers-3":
				MM_swapImage(this.id,'','images/v5/careers/topbar-careers-careers02.gif',1);		
				break;
			case "careers-4":
				MM_swapImage(this.id,'','images/v5/careers/topbar-careers-news02.gif',1);		
				break;
			case "careers-5":
				MM_swapImage(this.id,'','images/v5/careers/topbar-careers-locations02.gif',1);		
				break;
			case "careers-6":
				MM_swapImage(this.id,'','images/v5/careers/topbar-careers-login02.gif',1);		
				break;	
				
				
				
			//resources
			case "resources-0":
				MM_swapImage(this.id,'','images/v5/other/topbar-resources-aboutus02.gif',1);		
				break;
			case "resources-1":
				MM_swapImage(this.id,'','images/v5/other/topbar-resources-services02.gif',1);		
				break;
			case "resources-2":
				MM_swapImage(this.id,'','images/v5/other/topbar-resources-ourwork02.gif',1);		
				break;
			case "resources-3":
				MM_swapImage(this.id,'','images/v5/other/topbar-resources-careers02.gif',1);		
				break;
			case "resources-4":
				MM_swapImage(this.id,'','images/v5/other/topbar-resources-news02.gif',1);		
				break;
			case "resources-5":
				MM_swapImage(this.id,'','images/v5/other/topbar-resources-loc02.gif',1);		
				break;
			case "resources-6":
				MM_swapImage(this.id,'','images/v5/other/topbar-resources-login02.gif',1);		
				break;	
				
				
				
			//sitemap
			case "sitemap-0":
				MM_swapImage(this.id,'','images/v5/other/topbar-sitemap-aboutus02.gif',1);		
				break;
			case "sitemap-1":
				MM_swapImage(this.id,'','images/v5/other/topbar-sitemap-services02.gif',1);		
				break;
			case "sitemap-2":
				MM_swapImage(this.id,'','images/v5/other/topbar-sitemap-ourwork02.gif',1);		
				break;
			case "sitemap-3":
				MM_swapImage(this.id,'','images/v5/other/topbar-sitemap-careers02.gif',1);		
				break;
			case "sitemap-4":
				MM_swapImage(this.id,'','images/v5/other/topbar-sitemap-news02.gif',1);		
				break;
			case "sitemap-5":
				MM_swapImage(this.id,'','images/v5/other/topbar-sitemap-locations02.gif',1);		
				break;
			case "sitemap-6":
				MM_swapImage(this.id,'','images/v5/other/topbar-sitemap-login02.gif',1);		
				break;		
				
				
				
			//privacy
			case "privacy-0":
				MM_swapImage(this.id,'','images/v5/other/topbar-privacy-aboutus02.gif',1);		
				break;
			case "privacy-1":
				MM_swapImage(this.id,'','images/v5/other/topbar-privacy-services02.gif',1);		
				break;
			case "privacy-2":
				MM_swapImage(this.id,'','images/v5/other/topbar-privacy-ourwork02.gif',1);		
				break;
			case "privacy-3":
				MM_swapImage(this.id,'','images/v5/other/topbar-privacy-careers02.gif',1);		
				break;
			case "privacy-4":
				MM_swapImage(this.id,'','images/v5/other/topbar-privacy-news02.gif',1);		
				break;
			case "privacy-5":
				MM_swapImage(this.id,'','images/v5/other/topbar-privacy-locations02.gif',1);		
				break;
			case "privacy-6":
				MM_swapImage(this.id,'','images/v5/other/topbar-privacy-login02.gif',1);		
				break;
				
				
				
			//search
			case "search-0":
				MM_swapImage(this.id,'','images/v5/other/topbar-search-aboutus02.gif',1);		
				break;
			case "search-1":
				MM_swapImage(this.id,'','images/v5/other/topbar-search-services02.gif',1);		
				break;
			case "search-2":
				MM_swapImage(this.id,'','images/v5/other/topbar-search-ourwork02.gif',1);		
				break;
			case "search-3":
				MM_swapImage(this.id,'','images/v5/other/topbar-search-careers02.gif',1);		
				break;
			case "search-4":
				MM_swapImage(this.id,'','images/v5/other/topbar-search-news02.gif',1);		
				break;
			case "search-5":
				MM_swapImage(this.id,'','images/v5/other/topbar-search-locations02.gif',1);		
				break;
			case "search-6":
				MM_swapImage(this.id,'','images/v5/other/topbar-search-login02.gif',1);		
				break;																																																	





			//30years
			case "T30_overview-0":
				MM_swapImage(this.id,'','images/v5/30years/topbar-30-30-about02.gif',1);		
				break;
			case "T30_overview-1":
				MM_swapImage(this.id,'','images/v5/30years/topbar-30-30-services02.gif',1);		
				break;
			case "T30_overview-2":
				MM_swapImage(this.id,'','images/v5/30years/topbar-30-30-ourwork02.gif',1);		
				break;
			case "T30_overview-3":
				MM_swapImage(this.id,'','images/v5/30years/topbar-30-30-careers02.gif',1);		
				break;
			case "T30_overview-4":
				MM_swapImage(this.id,'','images/v5/30years/topbar-30-30-news02.gif',1);		
				break;
			case "T30_overview-5":
				MM_swapImage(this.id,'','images/v5/30years/topbar-30-30-loc02.gif',1);		
				break;
			case "T30_overview-6":
				MM_swapImage(this.id,'','images/v5/30years/topbar-30-30-login02.gif',1);		
				break;		
				
			case "T30_brand-0":
				MM_swapImage(this.id,'','images/v5/30years/topbar-30-brand-about02.gif',1);		
				break;
			case "T30_brand-1":
				MM_swapImage(this.id,'','images/v5/30years/topbar-30-brand-services02.gif',1);		
				break;
			case "T30_brand-2":
				MM_swapImage(this.id,'','images/v5/30years/topbar-30-brand-ourwork02.gif',1);		
				break;
			case "T30_brand-3":
				MM_swapImage(this.id,'','images/v5/30years/topbar-30-brand-careers02.gif',1);		
				break;
			case "T30_brand-4":
				MM_swapImage(this.id,'','images/v5/30years/topbar-30-brand-news02.gif',1);		
				break;
			case "T30_brand-5":
				MM_swapImage(this.id,'','images/v5/30years/topbar-30-brand-loc02.gif',1);		
				break;
			case "T30_brand-6":
				MM_swapImage(this.id,'','images/v5/30years/topbar-30-brand-login02.gif',1);		
				break;	
				
			case "T30_timeline-0":
				MM_swapImage(this.id,'','images/v5/30years/topbar-30-time-about02.gif',1);		
				break;
			case "T30_timeline-1":
				MM_swapImage(this.id,'','images/v5/30years/topbar-30-time-services02.gif',1);		
				break;
			case "T30_timeline-2":
				MM_swapImage(this.id,'','images/v5/30years/topbar-30-time-ourwork02.gif',1);		
				break;
			case "T30_timeline-3":
				MM_swapImage(this.id,'','images/v5/30years/topbar-30-time-careers02.gif',1);		
				break;
			case "T30_timeline-4":
				MM_swapImage(this.id,'','images/v5/30years/topbar-30-time-news02.gif',1);		
				break;
			case "T30_timeline-5":
				MM_swapImage(this.id,'','images/v5/30years/topbar-30-time-loc02.gif',1);		
				break;
			case "T30_timeline-6":
				MM_swapImage(this.id,'','images/v5/30years/topbar-30-time-login02.gif',1);		
				break;	
				
			case "T30_comm-0":
				MM_swapImage(this.id,'','images/v5/30years/topbar-30-com-about02.gif',1);		
				break;
			case "T30_comm-1":
				MM_swapImage(this.id,'','images/v5/30years/topbar-30-com-services02.gif',1);		
				break;
			case "T30_comm-2":
				MM_swapImage(this.id,'','images/v5/30years/topbar-30-com-ourwork02.gif',1);		
				break;
			case "T30_comm-3":
				MM_swapImage(this.id,'','images/v5/30years/topbar-30-com-careers02.gif',1);		
				break;
			case "T30_comm-4":
				MM_swapImage(this.id,'','images/v5/30years/topbar-30-com-news02.gif',1);		
				break;
			case "T30_comm-5":
				MM_swapImage(this.id,'','images/v5/30years/topbar-30-com-loc02.gif',1);		
				break;
			case "T30_comm-6":
				MM_swapImage(this.id,'','images/v5/30years/topbar-30-com-login02.gif',1);		
				break;	
				
			case "T30_involvement-0":
				MM_swapImage(this.id,'','images/v5/30years/topbar-30-camp-about02.gif',1);		
				break;
			case "T30_involvement-1":
				MM_swapImage(this.id,'','images/v5/30years/topbar-30-camp-services02.gif',1);		
				break;
			case "T30_involvement-2":
				MM_swapImage(this.id,'','images/v5/30years/topbar-30-camp-ourwork02.gif',1);		
				break;
			case "T30_involvement-3":
				MM_swapImage(this.id,'','images/v5/30years/topbar-30-camp-careers02.gif',1);		
				break;
			case "T30_involvement-4":
				MM_swapImage(this.id,'','images/v5/30years/topbar-30-camp-news02.gif',1);		
				break;
			case "T30_involvement-5":
				MM_swapImage(this.id,'','images/v5/30years/topbar-30-camp-loc02.gif',1);		
				break;
			case "T30_involvement-6":
				MM_swapImage(this.id,'','images/v5/30years/topbar-30-camp-login02.gif',1);		
				break;																																																															

																								
		}
		
    
        //debug("itemOver("+this.id+") , visible = " + self.visible);
        self.itemShowCnt++;
        var id_section = this.id + "-section";
        if (self.visible.length) {
            var el = new Element(self.visible.getLast());
            el = document.getElementById(el.getParent().id);
            if (/item\d-active/.test(el.className)) {
                el.className = el.className.replace(/(item\d)-active/, "$1");
            }
        }
        if (self.sections.contains(id_section)) {
            clearTimers();
            self.sectionsHideCnt[self.sections.indexOf(id_section)]++;
            var cnt = self.sectionsShowCnt[self.sections.indexOf(id_section)];
            var timerId = setTimeout(function(a, b) { return function() { self.showSection(a, b); } } (id_section, cnt), self.delay.show);
            self.timers.push(timerId);
        } else {
            if (self.visible.length) {
                clearTimers();
                var timerId = setTimeout(function(a, b) { return function() { self.showItem(a, b); } } (this.id, self.itemShowCnt), self.delay.show);
                self.timers.push(timerId);
            }
        }
    }

    /* event, item:onmouseout */
    function itemOut() {
    
		MM_swapImgRestore(); //ADDED BY RPTESORO
    
        //debug("itemOut("+this.id+") , visible = " + self.visible);
        self.itemShowCnt++;
        var id_section = this.id + "-section";
        if (self.sections.contains(id_section)) {
            self.sectionsShowCnt[self.sections.indexOf(id_section)]++;
            if (self.visible.contains(id_section)) {
                var cnt = self.sectionsHideCnt[self.sections.indexOf(id_section)];
                var timerId = setTimeout(function(a, b) { return function() { self.hideSection(a, b); } }(id_section, cnt), self.delay.hide);
                self.timers.push(timerId);
            }
        }
    }

    /* event, section:onmouseover */
    function sectionOver() {
    
		//rollover HACK! by rptesoro
		switch(this.id)
		{
			case "menu1-0-section":
				MM_swapImage('menu1-0','','images/v4/topbar-aboutus02.gif',1);		
				break;
			case "menu1-1-section":
				MM_swapImage('menu1-1','','images/v4/topbar-services02.gif',1);		
				break;
			case "menu1-2-section":
				MM_swapImage('menu1-2','','images/v4/topbar-projects02.gif',1);		
				break;
			case "menu1-3-section":
				MM_swapImage('menu1-3','','images/v4/topbar-careers02.gif',1);		
				break;
			case "menu1-4-section":
				MM_swapImage('menu1-4','','images/v4/topbar-news02.gif',1);		
				break;
			case "menu1-5-section":
				MM_swapImage('menu1-5','','images/v4/topbar-locations02.gif',1);		
				break;
			case "menu1-6-section":
				MM_swapImage('menu1-6','','images/v4/topbar-login02.gif',1);		
				break;
				
			//ewp				
			case "ewp-0-section":
				MM_swapImage(this.id.replace('-section',''),'','images/v5/ewp/topbar-ewp-aboutus02.gif',1);		
				break;
			case "ewp-1-section":
				MM_swapImage(this.id.replace('-section',''),'','images/v5/ewp/topbar-ewp-services02.gif',1);		
				break;
			case "ewp-2-section":
				MM_swapImage(this.id.replace('-section',''),'','images/v5/ewp/topbar-ewp-ourwork02.gif',1);		
				break;
			case "ewp-3-section":
				MM_swapImage(this.id.replace('-section',''),'','images/v5/ewp/topbar-ewp-careers02.gif',1);		
				break;
			case "ewp-4-section":
				MM_swapImage(this.id.replace('-section',''),'','images/v5/ewp/topbar-ewp-news02.gif',1);		
				break;
			case "ewp-5-section":
				MM_swapImage(this.id.replace('-section',''),'','images/v5/ewp/topbar-ewp-locations02.gif',1);		
				break;
			case "ewp-6-section":
				MM_swapImage(this.id.replace('-section',''),'','images/v5/ewp/topbar-ewp-login02.gif',1);		
				break;	
				
			//green				
			case "green-0-section":
				MM_swapImage(this.id.replace('-section',''),'','images/v5/green/topbar-green-aboutus02.gif',1);		
				break;
			case "green-1-section":
				MM_swapImage(this.id.replace('-section',''),'','images/v5/green/topbar-green-services02.gif',1);		
				break;
			case "green-2-section":
				MM_swapImage(this.id.replace('-section',''),'','images/v5/green/topbar-green-ourwork02.gif',1);		
				break;
			case "green-3-section":
				MM_swapImage(this.id.replace('-section',''),'','images/v5/green/topbar-green-careers02.gif',1);		
				break;
			case "green-4-section":
				MM_swapImage(this.id.replace('-section',''),'','images/v5/green/topbar-green-news02.gif',1);		
				break;
			case "green-5-section":
				MM_swapImage(this.id.replace('-section',''),'','images/v5/green/topbar-green-locations02.gif',1);		
				break;
			case "green-6-section":
				MM_swapImage(this.id.replace('-section',''),'','images/v5/green/topbar-green-login02.gif',1);		
				break;	
				
			//about				
			case "about-0-section":
				MM_swapImage(this.id.replace('-section',''),'','images/v5/aboutus/topbar-aboutus-aboutus02.gif',1);		
				break;
			case "about-1-section":
				MM_swapImage(this.id.replace('-section',''),'','images/v5/aboutus/topbar-aboutus-services02.gif',1);		
				break;
			case "about-2-section":
				MM_swapImage(this.id.replace('-section',''),'','images/v5/aboutus/topbar-aboutus-ourwork02.gif',1);		
				break;
			case "about-3-section":
				MM_swapImage(this.id.replace('-section',''),'','images/v5/aboutus/topbar-aboutus-careers02.gif',1);		
				break;
			case "about-4-section":
				MM_swapImage(this.id.replace('-section',''),'','images/v5/aboutus/topbar-aboutus-news02.gif',1);		
				break;
			case "about-5-section":
				MM_swapImage(this.id.replace('-section',''),'','images/v5/aboutus/topbar-aboutus-locations02.gif',1);		
				break;
			case "about-6-section":
				MM_swapImage(this.id.replace('-section',''),'','images/v5/aboutus/topbar-aboutus-login02.gif',1);		
				break;	
				

			//contact				
			case "contact-0-section":
				MM_swapImage(this.id.replace('-section',''),'','images/v5/contact/topbar-contact-aboutus02.gif',1);		
				break;
			case "contact-1-section":
				MM_swapImage(this.id.replace('-section',''),'','images/v5/contact/topbar-contact-services02.gif',1);		
				break;
			case "contact-2-section":
				MM_swapImage(this.id.replace('-section',''),'','images/v5/contact/topbar-contact-ourwork02.gif',1);		
				break;
			case "contact-3-section":
				MM_swapImage(this.id.replace('-section',''),'','images/v5/contact/topbar-contact-careers02.gif',1);		
				break;
			case "contact-4-section":
				MM_swapImage(this.id.replace('-section',''),'','images/v5/contact/topbar-contact-news02.gif',1);		
				break;
			case "contact-5-section":
				MM_swapImage(this.id.replace('-section',''),'','images/v5/contact/topbar-contact-locations02.gif',1);		
				break;
			case "contact-6-section":
				MM_swapImage(this.id.replace('-section',''),'','images/v5/contact/topbar-contact-login02.gif',1);		
				break;	
				
				
			//lighting				
			case "lighting-0-section":
				MM_swapImage(this.id.replace('-section',''),'','images/v5/branding-lighting/topbar-light-aboutus02.gif',1);		
				break;
			case "lighting-1-section":
				MM_swapImage(this.id.replace('-section',''),'','images/v5/branding-lighting/topbar-light-services02.gif',1);		
				break;
			case "lighting-2-section":
				MM_swapImage(this.id.replace('-section',''),'','images/v5/branding-lighting/topbar-light-ourwork02.gif',1);		
				break;
			case "lighting-3-section":
				MM_swapImage(this.id.replace('-section',''),'','images/v5/branding-lighting/topbar-light-careers02.gif',1);		
				break;
			case "lighting-4-section":
				MM_swapImage(this.id.replace('-section',''),'','images/v5/branding-lighting/topbar-light-news02.gif',1);		
				break;
			case "lighting-5-section":
				MM_swapImage(this.id.replace('-section',''),'','images/v5/branding-lighting/topbar-light-locations02.gif',1);		
				break;
			case "lighting-6-section":
				MM_swapImage(this.id.replace('-section',''),'','images/v5/branding-lighting/topbar-light-login02.gif',1);		
				break;	
				
				
			//brand				
			case "brand-0-section":
				MM_swapImage(this.id.replace('-section',''),'','images/v5/branding-lighting/topbar-brand-aboutus02.gif',1);		
				break;
			case "brand-1-section":
				MM_swapImage(this.id.replace('-section',''),'','images/v5/branding-lighting/topbar-brand-services02.gif',1);		
				break;
			case "brand-2-section":
				MM_swapImage(this.id.replace('-section',''),'','images/v5/branding-lighting/topbar-brand-ourwork02.gif',1);		
				break;
			case "brand-3-section":
				MM_swapImage(this.id.replace('-section',''),'','images/v5/branding-lighting/topbar-brand-careers02.gif',1);		
				break;
			case "brand-4-section":
				MM_swapImage(this.id.replace('-section',''),'','images/v5/branding-lighting/topbar-brand-news02.gif',1);		
				break;
			case "brand-5-section":
				MM_swapImage(this.id.replace('-section',''),'','images/v5/branding-lighting/topbar-brand-locations02.gif',1);		
				break;
			case "brand-6-section":
				MM_swapImage(this.id.replace('-section',''),'','images/v5/branding-lighting/topbar-brand-login02.gif',1);		
				break;		
				
				
			//lob_strategies				
			case "lob_strategies-0-section":
				MM_swapImage(this.id.replace('-section',''),'','images/v5/lob/topbar-strat-aboutus02.gif',1);		
				break;
			case "lob_strategies-1-section":
				MM_swapImage(this.id.replace('-section',''),'','images/v5/lob/topbar-strat-services02.gif',1);		
				break;
			case "lob_strategies-2-section":
				MM_swapImage(this.id.replace('-section',''),'','images/v5/lob/topbar-strat-ourwork02.gif',1);		
				break;
			case "lob_strategies-3-section":
				MM_swapImage(this.id.replace('-section',''),'','images/v5/lob/topbar-strat-careers02.gif',1);		
				break;
			case "lob_strategies-4-section":
				MM_swapImage(this.id.replace('-section',''),'','images/v5/lob/topbar-strat-news02.gif',1);		
				break;
			case "lob_strategies-5-section":
				MM_swapImage(this.id.replace('-section',''),'','images/v5/lob/topbar-strat-locations02.gif',1);		
				break;
			case "lob_strategies-6-section":
				MM_swapImage(this.id.replace('-section',''),'','images/v5/lob/topbar-strat-login02.gif',1);		
				break;	
				
			//lob_interior				
			case "lob_interior-0-section":
				MM_swapImage(this.id.replace('-section',''),'','images/v5/lob/topbar-id-aboutus02.gif',1);		
				break;
			case "lob_interior-1-section":
				MM_swapImage(this.id.replace('-section',''),'','images/v5/lob/topbar-id-services02.gif',1);		
				break;
			case "lob_interior-2-section":
				MM_swapImage(this.id.replace('-section',''),'','images/v5/lob/topbar-id-ourwork02.gif',1);		
				break;
			case "lob_interior-3-section":
				MM_swapImage(this.id.replace('-section',''),'','images/v5/lob/topbar-id-careers02.gif',1);		
				break;
			case "lob_interior-4-section":
				MM_swapImage(this.id.replace('-section',''),'','images/v5/lob/topbar-id-news02.gif',1);		
				break;
			case "lob_interior-5-section":
				MM_swapImage(this.id.replace('-section',''),'','images/v5/lob/topbar-id-locations02.gif',1);		
				break;
			case "lob_interior-6-section":
				MM_swapImage(this.id.replace('-section',''),'','images/v5/lob/topbar-id-login02.gif',1);		
				break;					
				
			//lob_arch				
			case "lob_arch-0-section":
				MM_swapImage(this.id.replace('-section',''),'','images/v5/lob/topbar-arch-aboutus02.gif',1);		
				break;
			case "lob_arch-1-section":
				MM_swapImage(this.id.replace('-section',''),'','images/v5/lob/topbar-arch-services02.gif',1);		
				break;
			case "lob_arch-2-section":
				MM_swapImage(this.id.replace('-section',''),'','images/v5/lob/topbar-arch-ourwork02.gif',1);		
				break;
			case "lob_arch-3-section":
				MM_swapImage(this.id.replace('-section',''),'','images/v5/lob/topbar-arch-careers02.gif',1);		
				break;
			case "lob_arch-4-section":
				MM_swapImage(this.id.replace('-section',''),'','images/v5/lob/topbar-arch-news02.gif',1);		
				break;
			case "lob_arch-5-section":
				MM_swapImage(this.id.replace('-section',''),'','images/v5/lob/topbar-arch-locations02.gif',1);		
				break;
			case "lob_arch-6-section":
				MM_swapImage(this.id.replace('-section',''),'','images/v5/lob/topbar-arch-login02.gif',1);		
				break;	
				
			//lob_work				
			case "lob_work-0-section":
				MM_swapImage(this.id.replace('-section',''),'','images/v5/lob/topbar-work-aboutus02.gif',1);		
				break;
			case "lob_work-1-section":
				MM_swapImage(this.id.replace('-section',''),'','images/v5/lob/topbar-work-services02.gif',1);		
				break;
			case "lob_work-2-section":
				MM_swapImage(this.id.replace('-section',''),'','images/v5/lob/topbar-work-ourwork02.gif',1);		
				break;
			case "lob_work-3-section":
				MM_swapImage(this.id.replace('-section',''),'','images/v5/lob/topbar-work-careers02.gif',1);		
				break;
			case "lob_work-4-section":
				MM_swapImage(this.id.replace('-section',''),'','images/v5/lob/topbar-work-news02.gif',1);		
				break;
			case "lob_work-5-section":
				MM_swapImage(this.id.replace('-section',''),'','images/v5/lob/topbar-work-locations02.gif',1);		
				break;
			case "lob_work-6-section":
				MM_swapImage(this.id.replace('-section',''),'','images/v5/lob/topbar-work-login02.gif',1);		
				break;	
				
			//lob_info				
			case "lob_info-0-section":
				MM_swapImage(this.id.replace('-section',''),'','images/v5/lob/topbar-info-aboutus02.gif',1);		
				break;
			case "lob_info-1-section":
				MM_swapImage(this.id.replace('-section',''),'','images/v5/lob/topbar-info-services02.gif',1);		
				break;
			case "lob_info-2-section":
				MM_swapImage(this.id.replace('-section',''),'','images/v5/lob/topbar-info-ourwork02.gif',1);		
				break;
			case "lob_info-3-section":
				MM_swapImage(this.id.replace('-section',''),'','images/v5/lob/topbar-info-careers02.gif',1);		
				break;
			case "lob_info-4-section":
				MM_swapImage(this.id.replace('-section',''),'','images/v5/lob/topbar-info-news02.gif',1);		
				break;
			case "lob_info-5-section":
				MM_swapImage(this.id.replace('-section',''),'','images/v5/lob/topbar-info-locations02.gif',1);		
				break;
			case "lob_info-6-section":
				MM_swapImage(this.id.replace('-section',''),'','images/v5/lob/topbar-info-login02.gif',1);		
				break;		
				
			//lob_eng				
			case "lob_eng-0-section":
				MM_swapImage(this.id.replace('-section',''),'','images/v5/lob/topbar-eng-aboutus02.gif',1);		
				break;
			case "lob_eng-1-section":
				MM_swapImage(this.id.replace('-section',''),'','images/v5/lob/topbar-eng-services02.gif',1);		
				break;
			case "lob_eng-2-section":
				MM_swapImage(this.id.replace('-section',''),'','images/v5/lob/topbar-eng-ourwork02.gif',1);		
				break;
			case "lob_eng-3-section":
				MM_swapImage(this.id.replace('-section',''),'','images/v5/lob/topbar-eng-careers02.gif',1);		
				break;
			case "lob_eng-4-section":
				MM_swapImage(this.id.replace('-section',''),'','images/v5/lob/topbar-eng-news02.gif',1);		
				break;
			case "lob_eng-5-section":
				MM_swapImage(this.id.replace('-section',''),'','images/v5/lob/topbar-eng-locations02.gif',1);		
				break;
			case "lob_eng-6-section":
				MM_swapImage(this.id.replace('-section',''),'','images/v5/lob/topbar-eng-login02.gif',1);		
				break;	
				
				
				
			//news				
			case "news-0-section":
				MM_swapImage(this.id.replace('-section',''),'','images/v5/news/topbar-news-aboutus02.gif',1);		
				break;
			case "news-1-section":
				MM_swapImage(this.id.replace('-section',''),'','images/v5/news/topbar-news-services02.gif',1);		
				break;
			case "news-2-section":
				MM_swapImage(this.id.replace('-section',''),'','images/v5/news/topbar-news-ourwork02.gif',1);		
				break;
			case "news-3-section":
				MM_swapImage(this.id.replace('-section',''),'','images/v5/news/topbar-news-careers02.gif',1);		
				break;
			case "news-4-section":
				MM_swapImage(this.id.replace('-section',''),'','images/v5/news/topbar-news-news02.gif',1);		
				break;
			case "news-5-section":
				MM_swapImage(this.id.replace('-section',''),'','images/v5/news/topbar-news-locations02.gif',1);		
				break;
			case "news-6-section":
				MM_swapImage(this.id.replace('-section',''),'','images/v5/news/topbar-news-login02.gif',1);		
				break;			
				
				
			//locations				
			case "locations-0-section":
				MM_swapImage(this.id.replace('-section',''),'','images/v5/locations/topbar-locations-aboutus02.gif',1);		
				break;
			case "locations-1-section":
				MM_swapImage(this.id.replace('-section',''),'','images/v5/locations/topbar-locations-services02.gif',1);		
				break;
			case "locations-2-section":
				MM_swapImage(this.id.replace('-section',''),'','images/v5/locations/topbar-locations-ourwork02.gif',1);		
				break;
			case "locations-3-section":
				MM_swapImage(this.id.replace('-section',''),'','images/v5/locations/topbar-locations-careers02.gif',1);		
				break;
			case "locations-4-section":
				MM_swapImage(this.id.replace('-section',''),'','images/v5/locations/topbar-locations-news02.gif',1);		
				break;
			case "locations-5-section":
				MM_swapImage(this.id.replace('-section',''),'','images/v5/locations/topbar-locations-locations02.gif',1);		
				break;
			case "locations-6-section":
				MM_swapImage(this.id.replace('-section',''),'','images/v5/locations/topbar-locations-login02.gif',1);		
				break;	
				
				
				
			//ourwork				
			case "ourwork-0-section":
				MM_swapImage(this.id.replace('-section',''),'','images/v5/ourwork/topbar-ourwork-aboutus02.gif',1);		
				break;
			case "ourwork-1-section":
				MM_swapImage(this.id.replace('-section',''),'','images/v5/ourwork/topbar-ourwork-services02.gif',1);		
				break;
			case "ourwork-2-section":
				MM_swapImage(this.id.replace('-section',''),'','images/v5/ourwork/topbar-ourwork-ourwork02.gif',1);		
				break;
			case "ourwork-3-section":
				MM_swapImage(this.id.replace('-section',''),'','images/v5/ourwork/topbar-ourwork-careers02.gif',1);		
				break;
			case "ourwork-4-section":
				MM_swapImage(this.id.replace('-section',''),'','images/v5/ourwork/topbar-ourwork-news02.gif',1);		
				break;
			case "ourwork-5-section":
				MM_swapImage(this.id.replace('-section',''),'','images/v5/ourwork/topbar-ourwork-locations02.gif',1);		
				break;
			case "ourwork-6-section":
				MM_swapImage(this.id.replace('-section',''),'','images/v5/ourwork/topbar-ourwork-login02.gif',1);		
				break;	
				
				
				
			//careers				
			case "careers-0-section":
				MM_swapImage(this.id.replace('-section',''),'','images/v5/careers/topbar-careers-aboutus02.gif',1);		
				break;
			case "careers-1-section":
				MM_swapImage(this.id.replace('-section',''),'','images/v5/careers/topbar-careers-services02.gif',1);		
				break;
			case "careers-2-section":
				MM_swapImage(this.id.replace('-section',''),'','images/v5/careers/topbar-careers-ourwork02.gif',1);		
				break;
			case "careers-3-section":
				MM_swapImage(this.id.replace('-section',''),'','images/v5/careers/topbar-careers-careers02.gif',1);		
				break;
			case "careers-4-section":
				MM_swapImage(this.id.replace('-section',''),'','images/v5/careers/topbar-careers-news02.gif',1);		
				break;
			case "careers-5-section":
				MM_swapImage(this.id.replace('-section',''),'','images/v5/careers/topbar-careers-locations02.gif',1);		
				break;
			case "careers-6-section":
				MM_swapImage(this.id.replace('-section',''),'','images/v5/careers/topbar-careers-login02.gif',1);		
				break;	
				


			//resources				
			case "resources-0-section":
				MM_swapImage(this.id.replace('-section',''),'','images/v5/other/topbar-resources-aboutus02.gif',1);		
				break;
			case "resources-1-section":
				MM_swapImage(this.id.replace('-section',''),'','images/v5/other/topbar-resources-services02.gif',1);		
				break;
			case "resources-2-section":
				MM_swapImage(this.id.replace('-section',''),'','images/v5/other/topbar-resources-ourwork02.gif',1);		
				break;
			case "resources-3-section":
				MM_swapImage(this.id.replace('-section',''),'','images/v5/other/topbar-resources-careers02.gif',1);		
				break;
			case "resources-4-section":
				MM_swapImage(this.id.replace('-section',''),'','images/v5/other/topbar-resources-news02.gif',1);		
				break;
			case "resources-5-section":
				MM_swapImage(this.id.replace('-section',''),'','images/v5/other/topbar-resources-locations02.gif',1);		
				break;
			case "resources-6-section":
				MM_swapImage(this.id.replace('-section',''),'','images/v5/other/topbar-resources-login02.gif',1);		
				break;			
				
				
				
			//sitemap				
			case "sitemap-0-section":
				MM_swapImage(this.id.replace('-section',''),'','images/v5/other/topbar-sitemap-aboutus02.gif',1);		
				break;
			case "sitemap-1-section":
				MM_swapImage(this.id.replace('-section',''),'','images/v5/other/topbar-sitemap-services02.gif',1);		
				break;
			case "sitemap-2-section":
				MM_swapImage(this.id.replace('-section',''),'','images/v5/other/topbar-sitemap-ourwork02.gif',1);		
				break;
			case "sitemap-3-section":
				MM_swapImage(this.id.replace('-section',''),'','images/v5/other/topbar-sitemap-careers02.gif',1);		
				break;
			case "sitemap-4-section":
				MM_swapImage(this.id.replace('-section',''),'','images/v5/other/topbar-sitemap-news02.gif',1);		
				break;
			case "sitemap-5-section":
				MM_swapImage(this.id.replace('-section',''),'','images/v5/other/topbar-sitemap-locations02.gif',1);		
				break;
			case "sitemap-6-section":
				MM_swapImage(this.id.replace('-section',''),'','images/v5/other/topbar-sitemap-login02.gif',1);		
				break;										
				
																																																		

			//privacy				
			case "privacy-0-section":
				MM_swapImage(this.id.replace('-section',''),'','images/v5/other/topbar-privacy-aboutus02.gif',1);		
				break;
			case "privacy-1-section":
				MM_swapImage(this.id.replace('-section',''),'','images/v5/other/topbar-privacy-services02.gif',1);		
				break;
			case "privacy-2-section":
				MM_swapImage(this.id.replace('-section',''),'','images/v5/other/topbar-privacy-ourwork02.gif',1);		
				break;
			case "privacy-3-section":
				MM_swapImage(this.id.replace('-section',''),'','images/v5/other/topbar-privacy-careers02.gif',1);		
				break;
			case "privacy-4-section":
				MM_swapImage(this.id.replace('-section',''),'','images/v5/other/topbar-privacy-news02.gif',1);		
				break;
			case "privacy-5-section":
				MM_swapImage(this.id.replace('-section',''),'','images/v5/other/topbar-privacy-locations02.gif',1);		
				break;
			case "privacy-6-section":
				MM_swapImage(this.id.replace('-section',''),'','images/v5/other/topbar-privacy-login02.gif',1);		
				break;	
				
				
				
			//search				
			case "search-0-section":
				MM_swapImage(this.id.replace('-section',''),'','images/v5/other/topbar-search-aboutus02.gif',1);		
				break;
			case "search-1-section":
				MM_swapImage(this.id.replace('-section',''),'','images/v5/other/topbar-search-services02.gif',1);		
				break;
			case "search-2-section":
				MM_swapImage(this.id.replace('-section',''),'','images/v5/other/topbar-search-ourwork02.gif',1);		
				break;
			case "search-3-section":
				MM_swapImage(this.id.replace('-section',''),'','images/v5/other/topbar-search-careers02.gif',1);		
				break;
			case "search-4-section":
				MM_swapImage(this.id.replace('-section',''),'','images/v5/other/topbar-search-news02.gif',1);		
				break;
			case "search-5-section":
				MM_swapImage(this.id.replace('-section',''),'','images/v5/other/topbar-search-locations02.gif',1);		
				break;
			case "search-6-section":
				MM_swapImage(this.id.replace('-section',''),'','images/v5/other/topbar-search-login02.gif',1);		
				break;
				
				
				
				
				
			//30years				
			case "T30_overview-0-section":
				MM_swapImage(this.id.replace('-section',''),'','images/v5/30years/topbar-30-30-about02.gif',1);		
				break;
			case "T30_overview-1-section":
				MM_swapImage(this.id.replace('-section',''),'','images/v5/30years/topbar-30-30-services02.gif',1);		
				break;
			case "T30_overview-2-section":
				MM_swapImage(this.id.replace('-section',''),'','images/v5/30years/topbar-30-30-ourwork02.gif',1);		
				break;
			case "T30_overview-3-section":
				MM_swapImage(this.id.replace('-section',''),'','images/v5/30years/topbar-30-30-careers02.gif',1);		
				break;
			case "T30_overview-4-section":
				MM_swapImage(this.id.replace('-section',''),'','images/v5/30years/topbar-30-30-news02.gif',1);		
				break;
			case "T30_overview-5-section":
				MM_swapImage(this.id.replace('-section',''),'','images/v5/30years/topbar-30-30-locations02.gif',1);		
				break;
			case "T30_overview-6-section":
				MM_swapImage(this.id.replace('-section',''),'','images/v5/30years/topbar-30-30-login02.gif',1);		
				break;	
				
			case "T30_brand-0-section":
				MM_swapImage(this.id.replace('-section',''),'','images/v5/30years/topbar-30-brand-about02.gif',1);		
				break;
			case "T30_brand-1-section":
				MM_swapImage(this.id.replace('-section',''),'','images/v5/30years/topbar-30-brand-services02.gif',1);		
				break;
			case "T30_brand-2-section":
				MM_swapImage(this.id.replace('-section',''),'','images/v5/30years/topbar-30-brand-ourwork02.gif',1);		
				break;
			case "T30_brand-3-section":
				MM_swapImage(this.id.replace('-section',''),'','images/v5/30years/topbar-30-brand-careers02.gif',1);		
				break;
			case "T30_brand-4-section":
				MM_swapImage(this.id.replace('-section',''),'','images/v5/30years/topbar-30-brand-news02.gif',1);		
				break;
			case "T30_brand-5-section":
				MM_swapImage(this.id.replace('-section',''),'','images/v5/30years/topbar-30-brand-loc02.gif',1);		
				break;
			case "T30_brand-6-section":
				MM_swapImage(this.id.replace('-section',''),'','images/v5/30years/topbar-30-brand-login02.gif',1);		
				break;	
				
			case "T30_timeline-0-section":
				MM_swapImage(this.id.replace('-section',''),'','images/v5/30years/topbar-30-time-about02.gif',1);		
				break;
			case "T30_timeline-1-section":
				MM_swapImage(this.id.replace('-section',''),'','images/v5/30years/topbar-30-time-services02.gif',1);		
				break;
			case "T30_timeline-2-section":
				MM_swapImage(this.id.replace('-section',''),'','images/v5/30years/topbar-30-time-ourwork02.gif',1);		
				break;
			case "T30_timeline-3-section":
				MM_swapImage(this.id.replace('-section',''),'','images/v5/30years/topbar-30-time-careers02.gif',1);		
				break;
			case "T30_timeline-4-section":
				MM_swapImage(this.id.replace('-section',''),'','images/v5/30years/topbar-30-time-news02.gif',1);		
				break;
			case "T30_timeline-5-section":
				MM_swapImage(this.id.replace('-section',''),'','images/v5/30years/topbar-30-time-loc02.gif',1);		
				break;
			case "T30_timeline-6-section":
				MM_swapImage(this.id.replace('-section',''),'','images/v5/30years/topbar-30-time-login02.gif',1);		
				break;	
				
			case "T30_comm-0-section":
				MM_swapImage(this.id.replace('-section',''),'','images/v5/30years/topbar-30-com-about02.gif',1);		
				break;
			case "T30_comm-1-section":
				MM_swapImage(this.id.replace('-section',''),'','images/v5/30years/topbar-30-com-services02.gif',1);		
				break;
			case "T30_comm-2-section":
				MM_swapImage(this.id.replace('-section',''),'','images/v5/30years/topbar-30-com-ourwork02.gif',1);		
				break;
			case "T30_comm-3-section":
				MM_swapImage(this.id.replace('-section',''),'','images/v5/30years/topbar-30-com-careers02.gif',1);		
				break;
			case "T30_comm-4-section":
				MM_swapImage(this.id.replace('-section',''),'','images/v5/30years/topbar-30-com-news02.gif',1);		
				break;
			case "T30_comm-5-section":
				MM_swapImage(this.id.replace('-section',''),'','images/v5/30years/topbar-30-com-loc02.gif',1);		
				break;
			case "T30_comm-6-section":
				MM_swapImage(this.id.replace('-section',''),'','images/v5/30years/topbar-30-com-login02.gif',1);		
				break;	
				
			case "T30_involvement-0-section":
				MM_swapImage(this.id.replace('-section',''),'','images/v5/30years/topbar-30-camp-about02.gif',1);		
				break;
			case "T30_involvement-1-section":
				MM_swapImage(this.id.replace('-section',''),'','images/v5/30years/topbar-30-camp-services02.gif',1);		
				break;
			case "T30_involvement-2-section":
				MM_swapImage(this.id.replace('-section',''),'','images/v5/30years/topbar-30-camp-ourwork02.gif',1);		
				break;
			case "T30_involvement-3-section":
				MM_swapImage(this.id.replace('-section',''),'','images/v5/30years/topbar-30-camp-careers02.gif',1);		
				break;
			case "T30_involvement-4-section":
				MM_swapImage(this.id.replace('-section',''),'','images/v5/30years/topbar-30-camp-news02.gif',1);		
				break;
			case "T30_involvement-5-section":
				MM_swapImage(this.id.replace('-section',''),'','images/v5/30years/topbar-30-camp-loc02.gif',1);		
				break;
			case "T30_involvement-6-section":
				MM_swapImage(this.id.replace('-section',''),'','images/v5/30years/topbar-30-camp-login02.gif',1);		
				break;										
				
																						
		}
		    
        //debug("sectionOver("+this.id+") , visible = " + self.visible);
        self.sectionsHideCnt[self.sections.indexOf(this.id)]++;
        var el = new Element(this.id);
        var parent = document.getElementById(el.getParent().id);
        if (!/item\d-active/.test(parent.className)) {
            parent.className = parent.className.replace(/(item\d)/, "$1-active");
        }
    }

    /* event, section:onmouseout */
    function sectionOut() {
    
		MM_swapImgRestore(); //ADDED BY RPTESORO
    
        //debug("sectionOut("+this.id+") , visible = " + self.visible);
        self.sectionsShowCnt[self.sections.indexOf(this.id)]++;
        var cnt = self.sectionsHideCnt[self.sections.indexOf(this.id)];
        var timerId = setTimeout(function(a, b) { return function() { self.hideSection(a, b); } }(this.id, cnt), self.delay.hide);
        self.timers.push(timerId);
    }

    /* Show section (1 argument passed)
     * Try to show section (2 arguments passed) - check cnt with sectionShowCnt */
    this.showSection = function(id, cnt) {
        if (typeof cnt != "undefined") {
            if (cnt != this.sectionsShowCnt[this.sections.indexOf(id)]) { return; }
        }
        //debug("showSection("+id+", "+cnt+") , visible = " + this.visible);
        this.sectionsShowCnt[this.sections.indexOf(id)]++;
        if (this.visible.length) {
            if (id == this.visible.getLast()) { return; }
            var el = new Element(id);
            var parents = el.getParentSections();
            //debug("getParentSections("+el.id+") = " + parents);
            for (var i = this.visible.length - 1; i >= 0; i--) {
                if (parents.contains(this.visible[i])) {
                    break;
                } else {
                    this.hideSection(this.visible[i]);
                }
            }
        }
        var el = new Element(id);
        var parent = document.getElementById(el.getParent().id);
        if (!/item\d-active/.test(parent.className)) {
            parent.className = parent.className.replace(/(item\d)/, "$1-active");
        }
        if (document.all) { document.getElementById(id).style.display = "block"; }
        document.getElementById(id).style.visibility = "visible";
        document.getElementById(id).style.zIndex = this.zIndex.visible;
        if (this.fixIeSelectBoxBug && this.browser.ie6) {
            var div = document.getElementById(id);
            var iframe = document.getElementById(id+"-iframe");
            iframe.style.width = div.offsetWidth + parseInt(div.currentStyle.borderLeftWidth) + parseInt(div.currentStyle.borderRightWidth);
            iframe.style.height = div.offsetHeight + parseInt(div.currentStyle.borderTopWidth) + parseInt(div.currentStyle.borderBottomWidth);
            iframe.style.top = -parseInt(div.currentStyle.borderTopWidth);
            iframe.style.left = -parseInt(div.currentStyle.borderLeftWidth);
            iframe.style.zIndex = div.style.zIndex - 1;
            iframe.style.display = "block";
        }
        this.visible.push(id);
    }

    /* Emulating an empty non-existent section, we have to hide elements, works like showSection() */
    this.showItem = function(id, cnt) {
        if (typeof cnt != "undefined") {
            if (cnt != this.itemShowCnt) { return; }
        }
        this.itemShowCnt++;
        if (this.visible.length) {
            var el = new Element(id + "-section");
            var parents = el.getParentSections();
            //debug("showItem() getParentSections("+el.id+") = " + parents);
            for (var i = this.visible.length - 1; i >= 0; i--) {
                if (parents.contains(this.visible[i])) {
                    break;
                } else {
                    this.hideSection(this.visible[i]);
                }
            }
        }
    }

    /* Hide section (1 argument passed)
     * Try to hide section (2 arguments passed) - check cnt with sectionHideCnt */
    this.hideSection = function(id, cnt) {
        if (typeof cnt != "undefined") {
            if (cnt != this.sectionsHideCnt[this.sections.indexOf(id)]) { return; }
            if (id == this.visible.getLast()) {
                //debug("hideSectionAll("+id+", "+cnt+") , visible = " + this.visible);
                for (var i = this.visible.length - 1; i >= 0; i--) {
                    this.hideSection(this.visible[i]);
                }
                return;
            }
        }
        //debug("hideSection("+id+", "+cnt+") , visible = " + this.visible);
        var el = new Element(id);
        var parent = document.getElementById(el.getParent().id);
        if (/item\d-active/.test(parent.className)) {
            parent.className = parent.className.replace(/(item\d)-active/, "$1");
        }
        document.getElementById(id).style.zIndex = this.zIndex.hidden;
        document.getElementById(id).style.visibility = "hidden";
        if (document.all) { document.getElementById(id).style.display = "none"; }
        if (this.fixIeSelectBoxBug && this.browser.ie6) {
            var iframe = document.getElementById(id+"-iframe");
            iframe.style.display = "none";
        }
        if (this.visible.contains(id)) {
            if (id == this.visible.getLast()) {
                this.visible.pop();
            } else {
                //throw "DropDownMenuX.hideSection('"+id+"', "+cnt+") failed, trying to hide a section that is not the deepest visible section";
                return;
            }
        } else {
            //throw "DropDownMenuX.hideSection('"+id+"', "+cnt+") failed, cannot hide element that is not visible";
            return;
        }
        this.sectionsHideCnt[this.sections.indexOf(id)]++;
    }

    /* Element (.section, .item2 etc) */
    function Element(id) {
        
        this.menu = self;
        this.id = id;

        /* Get Level of given id
         * Examples: menu-1 (1 level), menu-1-4 (2 level) */
        this.getLevel = function() {
            var s = this.id.substr(this.menu.id.length);
            return s.substrCount("-");
        }

        /* Get parent Element */
        this.getParent = function() {
            var s = this.id.substr(this.menu.id.length);
            var a = s.split("-");
            a.pop();
            return new Element(this.menu.id + a.join("-"));
        }

        /* Check whether an element has a parent element */
        this.hasParent = function() {
            var s = this.id.substr(this.menu.id.length);
            var a = s.split("-");
            return a.length > 2;
        }

        /* Check whether an element has a sub-section */
        this.hasChilds = function() {
            return Boolean(document.getElementById(this.id + "-section"));
        }

        /* Get parent section elements for current section */
        this.getParentSections = function() {
            var s = this.id.substr(this.menu.id.length);
            s = s.substr(0, s.length - "-section".length);
            var a = s.split("-");
            a.shift();
            a.pop();
            var s = this.menu.id;
            var parents = [];
            for (var i = 0; i < a.length; i++) {
                s += ("-" + a[i]);
                parents.push(s + "-section");
            }
            return parents;
        }
        
        this.level = this.getLevel();
    }

    /* Clear all timers set with setTimeout() */
    function clearTimers() {
        for (var i = self.timers.length - 1; i >= 0; i--) {
            clearTimeout(self.timers[i]);
            self.timers.pop();
        }
    }

    var self = this;
    this.id = id; /* menu id */
    this.tree = []; /* tree structure of menu */
    this.sections = []; /* all sections, required for timeout */
    this.sectionsShowCnt = [];
    this.sectionsHideCnt = [];
    this.itemShowCnt = 0;
    this.timers = []; // timeout ids
    this.visible = []; /* visible section, ex. Array("menu-0-section", ..) , succession is important: top to bottom */
}

/* Finds the index of the first occurence of item in the array, or -1 if not found */
if (typeof Array.prototype.indexOf == "undefined") {
    Array.prototype.indexOf = function(item) {
        for (var i = 0; i < this.length; i++) {
            if (this[i] === item) {
                return i;
            }
        }
        return -1;
    }
}

/* Check whether array contains given string */
if (typeof Array.prototype.contains == "undefined") {
    Array.prototype.contains = function(s) {
        for (var i = 0; i < this.length; i++) {
            if (this[i] === s) {
                return true;
            }
        }
        return false;
    }
}

/* Counts the number of substring occurrences */
if (typeof String.prototype.substrCount == "undefined") {
    String.prototype.substrCount = function(s) {
        return this.split(s).length - 1;
    }
}

/* Get the last element from the array */
if (typeof Array.prototype.getLast == "undefined") {
    Array.prototype.getLast = function() {
        return this[this.length-1];
    }
}