/* This is the script used for altering settings the Navigation Bar on each page. It is in the form of a external javascript. Please call this script yilfm_config.js and yilfm_navcond.js in the HEAD portion of your document. Designed by Webdynamix Corporation C Aug 2001 - All Rights Reserved*/

var myNavBar = new NavBar(820);
var tempMenu;
//myNavBar.setSizes(menuTablePadding,menuCellHeight,SubmenuVertPadding);
myNavBar.setSizes(1,2,1);
//myNavBar.setColors(brder, txt, bkgrnd, TopmenuOnmouseTxt, TopmenuOnmouseBkgrnd, SubmenuTxt,SubmenuBkgrnd, SubmenuOnmouseTxt, SubmenuOnmouseBkgrnd);
myNavBar.setColors("#ffffff", "#000000", "#DDDDF4", "#ffffff", "#1a1cb7", "#000000", "#DDDDF4", "#ffffff", "#6a6bc5");
myNavBar.setFonts("Arial, Helvetica", "plain", "regular", "8pt", "Arial, Helvetica", "plain", "regular", "8pt");
myNavBar.setAlign("left");

tempMenu = new NavBarMenu(90, 110);
tempMenu.addItem(new NavBarMenuItem("<B>Profile", ""));
tempMenu.addItem(new NavBarMenuItem("History", "History"));
tempMenu.addItem(new NavBarMenuItem("Infrastructure", "Infra"));
tempMenu.addItem(new NavBarMenuItem("Awards", "Awards"));
myNavBar.addMenu(tempMenu);

tempMenu = new NavBarMenu(120, 110);
tempMenu.addItem(new NavBarMenuItem("<B>Product Range", ""));
tempMenu.addItem(new NavBarMenuItem("Automobiles", "Automobile"));
tempMenu.addItem(new NavBarMenuItem("Barrels", "Barrels"));
tempMenu.addItem(new NavBarMenuItem("Innovations", "innovation"));
tempMenu.addItem(new NavBarMenuItem("Hippo", "Hippo"));
tempMenu.addItem(new NavBarMenuItem("Jerry", "Jerry"));
tempMenu.addItem(new NavBarMenuItem("Sturdy", "Sturdy"));
tempMenu.addItem(new NavBarMenuItem("Standard", "Standard"));
tempMenu.addItem(new NavBarMenuItem("Others", "Others"));
myNavBar.addMenu(tempMenu);

tempMenu = new NavBarMenu(90, 115);
tempMenu.addItem(new NavBarMenuItem("<B>Contact us", ""));
tempMenu.addItem(new NavBarMenuItem("Enquiry", "Enquiry"));
myNavBar.addMenu(tempMenu);



tempMenu = new NavBarMenu(90, 120);
tempMenu.addItem(new NavBarMenuItem("<B>Downloads", ""));
tempMenu.addItem(new NavBarMenuItem("Tutorials", "Tutorials"));
tempMenu.addItem(new NavBarMenuItem("Literature", "Literature"));
tempMenu.addItem(new NavBarMenuItem("Wallpaper", "Desktop"));
tempMenu.addItem(new NavBarMenuItem("Games", "polygame"));
myNavBar.addMenu(tempMenu);

tempMenu = new NavBarMenu(90, 120);
tempMenu.addItem(new NavBarMenuItem("<B>Site Map", ""));
tempMenu.addItem(new NavBarMenuItem("Map", "Map"));
myNavBar.addMenu(tempMenu);

window.onload = init;    

function init() {

  myNavBar.setzIndex(30);
  myNavBar.create();
  myNavBar.moveTo(1,1);
  updatePosition();
  updatePosition2();
}

function updatePosition() {

  var viewTop, viewBottom;
  var dy;

  viewTop = getPageScrollY();
  viewBottom = viewTop + getWindowHeight();

  if (myNavBar.bottom < viewTop)
    myNavBar.moveTo(0, viewTop - myNavBar.height);
  if (myNavBar.top > viewBottom)
    myNavBar.moveTo(0, viewBottom);

  dy = Math.round(Math.abs(viewTop - myNavBar.y) / 2);
  if (viewTop < myNavBar.y)
    dy = -dy;
  myNavBar.setzIndex(30);
  myNavBar.moveBy(0, dy);
  setTimeout('updatePosition()', 25);
}

function updatePosition2() {

  var viewTop, viewBottom;
  var dy;

  viewTop = getPageScrollY();
  viewBottom = viewTop + getWindowHeight();


  
  setTimeout('updatePosition2()', 25);
}