var myNavBar = new NavBar(680);
var tempMenu;

myNavBar.setSizes(3, 3, 1);
myNavBar.setColors("#003366", "#FFFFFF", "#006699", "#003366", "#CCCCCC", "#003366", "#CCCCCC", "#003366", "#FFFFFF");
myNavBar.setFonts("verdana, arial, helvetica, sans-serif", "plain", "bold", "12px", "verdana, arial, helvetica, sans-serif", "plain", "none", "11px");
myNavBar.setAlign("center");

tempMenu = new NavBarMenu(0, 146);
tempMenu.addItem(new NavBarMenuItem("About Us", ""));
tempMenu.addItem(new NavBarMenuItem("Who We Are", "http://www.americafirst.com/aboutus/index.html"));
tempMenu.addItem(new NavBarMenuItem("Our Mission", "http://www.americafirst.com/aboutus/mission.html"));
tempMenu.addItem(new NavBarMenuItem("Branch Locations", "http://www.americafirst.com/branches/index.html"));
tempMenu.addItem(new NavBarMenuItem("Privacy/Security", "http://www.americafirst.com/privacy_security/index.html"));
tempMenu.addItem(new NavBarMenuItem("Employment", "http://www.americafirst.com/employment/index.html"));
tempMenu.addItem(new NavBarMenuItem("Contact Us", "http://www.americafirst.com/contact/index.html"));
tempMenu.addItem(new NavBarMenuItem("2000 Financials", "http://www.americafirst.com/aboutus/financial_statement.html"));
myNavBar.addMenu(tempMenu);

tempMenu = new NavBarMenu(0, 146);
tempMenu.addItem(new NavBarMenuItem("Events & Seminars", "http://www.americafirst.com/events_seminars"));
myNavBar.addMenu(tempMenu);

tempMenu = new NavBarMenu(0, 146);
tempMenu.addItem(new NavBarMenuItem("Products & Services", ""));
tempMenu.addItem(new NavBarMenuItem("Savings", "http://www.americafirst.com/products_services/savings/index.html"));
tempMenu.addItem(new NavBarMenuItem("Checking", "http://www.americafirst.com/products_services/checking/index.html"));
tempMenu.addItem(new NavBarMenuItem("Loans", "http://www.americafirst.com/products_services/loans/index.html"));
tempMenu.addItem(new NavBarMenuItem("Visa","http://www.americafirst.com/products_services/visa/index.html"));
tempMenu.addItem(new NavBarMenuItem("Business Services","http://www.americafirst.com/products_services/additional_services/business_accounts.html"));
tempMenu.addItem(new NavBarMenuItem("Additional Services","http://www.americafirst.com/products_services/additional_services/additional_services.html"));
myNavBar.addMenu(tempMenu);

tempMenu = new NavBarMenu(0, 146);
tempMenu.addItem(new NavBarMenuItem("Current Rates", ""));
tempMenu.addItem(new NavBarMenuItem("Savings Rates", "http://www.americafirst.com/rates/savingsrates.html"));
tempMenu.addItem(new NavBarMenuItem("Loan Rates", "http://www.americafirst.com/rates/loanrates.html"));
tempMenu.addItem(new NavBarMenuItem("Mortgage Rates", "http://www.americafirst.com/rates/mortgagerates.html"));
tempMenu.addItem(new NavBarMenuItem("Rate Specials", "http://www.americafirst.com/rates/rate_specials.html"));
myNavBar.addMenu(tempMenu);

tempMenu = new NavBarMenu(0, 146);
tempMenu.addItem(new NavBarMenuItem("Apply Online", ""));
tempMenu.addItem(new NavBarMenuItem("Loan Application", "http://www.americafirst.com/agree"));
tempMenu.addItem(new NavBarMenuItem("Membership", "http://www.americafirst.com/membership/index.html"));
tempMenu.addItem(new NavBarMenuItem("Visa Products", "http://www.americafirst.com/agree"));
tempMenu.addItem(new NavBarMenuItem("Auto Loan", "http://www.americafirst.com/agree"));
tempMenu.addItem(new NavBarMenuItem("Certificate Account", "https://www.americafirst.com/applications/cd_application.html"));
tempMenu.addItem(new NavBarMenuItem("IRA Certificate", "https://www.americafirst.com/applications/ira_application.html"));
tempMenu.addItem(new NavBarMenuItem("Dedicated Savings", "https://www.americafirst.com/applications/ds_application.html"));
myNavBar.addMenu(tempMenu);

tempMenu = new NavBarMenu(0, 146);
tempMenu.addItem(new NavBarMenuItem("Automated Services", ""));
tempMenu.addItem(new NavBarMenuItem("Web Access", "http://www.americafirst.com/autoserv/webaccess/index.html"));
tempMenu.addItem(new NavBarMenuItem("Check View", "http://www.americafirst.com/autoserv/checkview/index.html"));
tempMenu.addItem(new NavBarMenuItem("Payment Partner", "http://www.americafirst.com/autoserv/paypartner/index.html"));
tempMenu.addItem(new NavBarMenuItem("AccessLine", "http://www.americafirst.com/autoserv/accessline/index.html"));
tempMenu.addItem(new NavBarMenuItem("ATM's", "http://www.americafirst.com/autoserv/atm/index.html"));
tempMenu.addItem(new NavBarMenuItem("Direct Deposit", "http://www.americafirst.com/autoserv/direct_deposit/index.html"));
tempMenu.addItem(new NavBarMenuItem("Online Investing", "http://www.americafirst.com/investment_insurance/index.html"));
tempMenu.addItem(new NavBarMenuItem("Wireless Banking", "http://www.americafirst.com/autoserv/wireless/index.html"));
tempMenu.addItem(new NavBarMenuItem("e-Statement", "http://www.americafirst.com/autoserv/estatement/index.html"));
myNavBar.addMenu(tempMenu);

window.onload = init;

//Set up page onload event.

function init() {

var img;

//Find the position of the embedded image and move bar accordingly

  img = getImage("placeholder");
  myNavBar.moveTo(getImagePageLeft(img), getImagePageTop(img));  
//myNavBar.resize(getWindowWidth());
  myNavBar.create();
//updatePosition();
}

/*function updatePosition() {

  var y;

  y = getPageScrollY();
  if (myNavBar.top != y)
  myNavBar.moveTo(0, y);

  setTimeout('updatePosition()', 25);
}*/