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
    //Hyungju disabled this function Oct.1, 2008
    /*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.home h2", 
					sFlashSrc:"flash/metaMediumLFRoman.swf", 
					sColor:"#000000", 
					nPaddingTop:0, 
					nPaddingBottom:0, 
					sFlashVars:""
                } 
            )
        );
        
        sIFR.replaceElement(
    		named(
    				{
    					sSelector:"#section-header #main-title", 
    					sFlashSrc:"flash/metaMediumLFRoman.swf", 
    					sColor:"#FFFFFF", 
    					sWmode:"transparent", 
    					nPaddingTop:0, 
    					nPaddingBottom:0, 
    					sFlashVars:""
    				}
    			)
    		);
        
       /* sIFR.replaceElement(
        		named(
        				{
        					sSelector:"body div.section-header p", 
        					sFlashSrc:"flash/metaMediumLFRoman.swf", 
        					sColor:"#FFFFFF", 
        					sWmode:"transparent", 
        					nPaddingTop:0, 
        					nPaddingBottom:0, 
        					sFlashVars:""
        				}
        			)
        		);*/
        
    };
 
}