// Navigation bar
var myNavBar = new NavBar(0);
var tempMenu;

// Add Path for subdirs
var addPath;
if (window.location.pathname.indexOf('/', 1) > 1)
    addPath = '../';
else
    addPath = '';

// Set Menu Options
myNavBar.setSizes(1, 2, 1);
myNavBar.setColors("#FFFFFF", "#FFFFFF", "#800000", "#FFDD00", "#800000", "#ffffff", "#800000", "FFDD00", "#800000");

// Netscape font is smaller
if (isMinNS4)
myNavBar.setFonts("Verdana", "plain", "bold", "9pt", "Verdana", "plain", "bold", "8pt");
else
myNavBar.setFonts("Verdana", "plain", "bold", "8pt", "Verdana", "plain", "bold", "7pt");
myNavBar.setAlign("left");

// Set Menu Items
tempMenu = new NavBarMenu(90, 120);
if (document.title == "Welcome to MACO International")
tempMenu.addItem(new NavBarMenuItem("<center><font color='#FFDD00'>Home</font></center>", addPath + "home.html"));
else
tempMenu.addItem(new NavBarMenuItem("<center>Home</center>", addPath + "home.html"));
myNavBar.addMenu(tempMenu);

tempMenu = new NavBarMenu(90, 120);
if (document.title == "MACO")
tempMenu.addItem(new NavBarMenuItem("<center><font color='#FFDD00'>Maco</font></center>", addPath + "maco_mission.html"));
else
tempMenu.addItem(new NavBarMenuItem("<center>Maco</center>", addPath + "maco_mission.html"));
tempMenu.addItem(new NavBarMenuItem("Mission", addPath + "maco_mission.html"));
tempMenu.addItem(new NavBarMenuItem("Key Competencies", addPath + "maco_key_competencies.html"));
tempMenu.addItem(new NavBarMenuItem("Guiding Principles", addPath + "maco_guiding_principles.html"));
tempMenu.addItem(new NavBarMenuItem("References", "maco_references.html"));
myNavBar.addMenu(tempMenu);


tempMenu = new NavBarMenu(100, 0);
if (document.title == "About")
tempMenu.addItem(new NavBarMenuItem("<center><font color='#FFDD00'>About Us</font></center>", addPath + "about.html"));
else
tempMenu.addItem(new NavBarMenuItem("<center>About Us</center>", addPath + "about.html"));
tempMenu.addItem(new NavBarMenuItem("Organisation", addPath + "about.html#organisation"));
tempMenu.addItem(new NavBarMenuItem("The Maco Team", addPath + "about.html#team"));
tempMenu.addItem(new NavBarMenuItem("Principals", addPath + "about.html#principals"));
myNavBar.addMenu(tempMenu);


tempMenu = new NavBarMenu(170, 120);
if (document.title == "Locate and contact us")
tempMenu.addItem(new NavBarMenuItem("<center><font color='#FFDD00'>Directions & Contact Us</font></center>", addPath + "location.html"));
else
tempMenu.addItem(new NavBarMenuItem("<center>Directions & Contact Us</center>", addPath + "location.html"));
tempMenu.addItem(new NavBarMenuItem("Locate Us", addPath + "location.html"));
tempMenu.addItem(new NavBarMenuItem("Contact Us", addPath + "contact.html"));
myNavBar.addMenu(tempMenu);

tempMenu = new NavBarMenu(120, 120);
if (document.title == "Readers Corner")
tempMenu.addItem(new NavBarMenuItem("<center><font color='#FFDD00'>Readers Corner</font></center>", addPath + "readerscorner/index.asp"));
else
tempMenu.addItem(new NavBarMenuItem("<center>Readers Corner</center>", addPath + "readerscorner/index.asp"));
myNavBar.addMenu(tempMenu);

tempMenu = new NavBarMenu(90, 120);
if (document.title == "Frequently Asked Questions")
tempMenu.addItem(new NavBarMenuItem("<center><font color='#FFDD00'>FAQ</font></center>", addPath + "faq.html"));
else
tempMenu.addItem(new NavBarMenuItem("<center>FAQ</center>", addPath + "faq.html"));
myNavBar.addMenu(tempMenu);

// top border
document.writeln("<table border='0' cellpadding='0' cellspacing='0' width='100%'>");
document.writeln("<tr height='85'><td><img border='0' name='banner' src='../images/banner_maco.gif' hspace='5'></td>");
document.writeln("<td><img border='0'name='logo' src='../images/logo_maco.gif' align='right'></td>");
document.writeln("</tr><tr height='35'><td>&nbsp;</td><td>&nbsp;</td></tr></table>");


// left border
document.writeln("<div align='left'>");
document.writeln("  <table border='0' cellpadding='0' cellspacing='0' width='100%' height='70%'>");
document.writeln("    <tr>");
document.writeln("      <td width='60'>&nbsp;</td>");
document.writeln("      <td valign='top'>");

window.onload=init;

function init() {

  myNavBar.resize(getWindowWidth());
  myNavBar.create();
  // Netscape border is larger
  if (isMinNS4)
  myNavBar.moveBy(0, 90);
  else
  myNavBar.moveBy(0, 85);
}
