
function fwLoadMenus() {
// The function "MENU" has the following parameters : Menu(label, menu width, menu height, font, font size, font color, font hilight color, background color, hilight background color)
  if (window.fw_menu_0) return;

  // Menu for About Section
  window.fw_menu_0 = new Menu("root",210,20,"Verdana",10,hexFColor,hexFHColor,hexBgColor,hexBgHColor);
  fw_menu_0.addMenuItem("About the Renco Group","location='about/index.html'");
  fw_menu_0.addMenuItem("Operating Company Management","location='about/operating.html'");
  fw_menu_0.addMenuItem("Historical Highlights","location='about/history.html'");
  fw_menu_0.addMenuItem("FAQ","location='about/faq.html'");
   fw_menu_0.hideOnMouseOut=true;

  // Menu for Companies Section
  window.fw_menu_1 = new Menu("root",200,20,"Verdana",10,hexFColor,hexFHColor,hexBgColor,hexBgHColor);
  fw_menu_1.addMenuItem("AM General LLC","location='companies/amgeneral.html'");
  fw_menu_1.addMenuItem("The Doe Run Company","location='companies/doerun.html'");
  fw_menu_1.addMenuItem("Doe Run Peru S.R.L.","location='companies/doerunperu.html'");
  fw_menu_1.addMenuItem("Unarco Material Handling, Inc.","location='companies/unarco.html'");
  fw_menu_1.addMenuItem("US Magnesium LLC","location='companies/usmagnesium.html'");
  /* fw_menu_1.addMenuItem("WCI Steel, Inc.","location='companies/wcisteel.html'"); */
  fw_menu_1.hideOnMouseOut=true;

  // Menu for Responsibilities Section
  window.fw_menu_2 = new Menu("root",250,20,"Verdana",10,hexFColor,hexFHColor,hexBgColor,hexBgHColor);
  fw_menu_2.addMenuItem("Our Commitment","location='responsibilities/index.html'");
  fw_menu_2.addMenuItem("Environmental Responsibility","location='responsibilities/environment.html'");
  fw_menu_2.addMenuItem("Record of Achievement","location='responsibilities/achievement.html'");
  fw_menu_2.addMenuItem("Environmental Achievements and Awards","location='responsibilities/awards.html'");
  fw_menu_2.addMenuItem("Reducing Environmental Impact","location='responsibilities/reducing.html'");
  fw_menu_2.addMenuItem("Community Commitment","location='responsibilities/community.html'");
  fw_menu_2.addMenuItem("Commitment to Workplace Safety","location='responsibilities/safety.html'");
  fw_menu_2.hideOnMouseOut=true;

  // Menu for Newsroom Section
  window.fw_menu_3 = new Menu("root",135,20,"Verdana",10,hexFColor,hexFHColor,hexBgColor,hexBgHColor);
  fw_menu_3.addMenuItem("Featured News","location='news/featured.html'");
  fw_menu_3.addMenuItem("News Archive","location='news/archive.html'");
  fw_menu_3.addMenuItem("Corporate Profile","location='about/index.html'");
  fw_menu_3.addMenuItem("FAQ","location='about/faq.html'");
  fw_menu_3.addMenuItem("Historical Highlights","location='about/history.html'");
  fw_menu_3.addMenuItem("Press Contacts","location='news/press.html'");
  fw_menu_3.hideOnMouseOut=true;

  fw_menu_3.writeMenus();
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && document.getElementById) x=document.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
 var bName = navigator.appName;
 var bVer = parseInt(navigator.appVersion);
 var NS6 = (bName == "Netscape" && bVer >= 5);
 var NS4 = (bName == "Netscape" && bVer >= 4 && bVer < 5);
 var IE4 = (bName == "Microsoft Internet Explorer" && bVer >= 4);
 var NS3 = (bName == "Netscape" && bVer < 4);
 var IE3 = (bName == "Microsoft Internet Explorer" && bVer < 4);
 if (NS4) {intTop=intTop-1;}

// SHOW MENU
function imgPos(imgName){
 img = getImage(imgName);
 imgLeft = getImagePageLeft(img); // LEFT POSITION
 //intLeft=imgLeft
 return imgLeft+intLeft;
}
function getImage(name) {
  if (NS4 || NS6) {
    return findImage(name, document);
  }
  if (IE4 || NS6)
    return eval('document.all.' + name);
  return null;
}

function findImage(name, doc) {
  var i, img;
  for (i = 0; i < doc.images.length; i++)
    if (doc.images[i].name == name)
      return doc.images[i];
  for (i = 0; i < doc.layers.length; i++)
    if ((img = findImage(name, doc.layers[i].document)) != null) {
      img.container = doc.layers[i];
      return img;
    }
  return null;
}

function getImagePageLeft(img) {
  var x, obj;
  if (NS4 || NS6) {
    if (img.container != null)
      return img.container.pageX + img.x - 1;
    else
      return img.x - 1;
  }
  if (IE4) {
    x = 0;
    obj = img;
    while (obj.offsetParent != null) {
      x += obj.offsetLeft;
      obj = obj.offsetParent;
    }
    x += obj.offsetLeft;
    return x;
  }
  return -1;
}

function getImagePageTop(img) {
  var y, obj;
  if (NS4 || NS6) {
    if (img.container != null)
      return img.container.pageY + img.y;
    else
      return img.y;
  }
  if (IE4) {
    y = 0;
    obj = img;
    while (obj.offsetParent != null) {
      y += obj.offsetTop;
      obj = obj.offsetParent;
    }
    y += obj.offsetTop;
    return y;
  }
  return -1;
}

