if (typeof GORECOM == "undefined") {
        GORECOM = {};
}

if (typeof GORECOM.pages == "undefined") {
    GORECOM.pages = {};
}

if (typeof GORECOM.globals == "undefined") {
    GORECOM.globals = {};
}

GORECOM.globals.navButtonOverlap = 27;

GORECOM.pages.home = {};
GORECOM.pages.home.init = function () {

    // Set main navigation overlap
    var overlap = GORECOM.globals.navButtonOverlap;
    var nav = document.getElementById("nav");
    var items = nav.getElementsByTagName("li");
    var subnav = document.getElementById("subnav");
    var totalWidth = 0;
    for (var i=0; items[i]; i++) {
        items[i].onmouseover = function () {
            this.style.zIndex = "1";
        }
        
        items[i].onmouseout = function () {
            this.style.zIndex = "";
        }
        
        items[i].style.position = "absolute";
        items[i].style.left = totalWidth + "px";
        totalWidth += items[i].offsetWidth - overlap;       
    }
    
    nav.style.visibility = "visible"; // was set to hidden in initial-states to avoid a noticible shift while processing
    subnav.style.visibility = "visible"; // was set to hidden in initial-states to avoid a noticible shift while processing
    
  
    
    // Set all section columns to same height
    var sections = YAHOO.util.Dom.getElementsByClassName("section", "div", "sections");
    if (sections.length > 0) {
        var tallest = sections[0].offsetHeight;
        for (var i=1; sections[i]; i++) {
            if (sections[i].offsetHeight > tallest) tallest = sections[i].offsetHeight;
        }
        for (var j=0; sections[j]; j++) {
            sections[j].style.height = tallest + "px";
        }
    }
    
    // sIFR replacement
    if(typeof sIFR == "function"){
        // This is the preferred "named argument" syntax
        sIFR.replaceElement(
            named(
                {
                    sSelector:"body h2",
                    sFlashSrc:"http://www.gore.com/flash/sifr_metaplus_med.swf",
                    sColor:"#000000",
                    sLinkColor:"#000000",
                    sBgColor:"#FFFFFF",
                    sHoverColor:"#CCCCCC",
                    nPaddingTop:0,
                    nPaddingBottom:0,
                    sFlashVars:""
                }
            )
        );
    };
   
}