<!--
  function CreateSubmenu(ID, name, url) {
    this.name = name;
    this.url = url;
    this.ID = ID;
    this.items = new Array();
    this.AddItem = AddItem;
    this.Draw = DrawMenu;
    this.Show = ShowMenu;
    this.Hide = HideMenu;
    
    return this;
  }
  
  function AddItem(ID, name, url) {
    this.items[this.items.length++] = new CreateSubmenuItem(ID, name, url, this.ID);
  }
  
  function CreateSubmenuItem(ID, name, url, parentID) {
    this.ID = ID;
    this.name = name;
    this.url = url;
    this.Draw = DrawSubmenuItem;
    this.parentID = parentID;
    return this;
  }
  
  function DrawMenu() {
    if (this.items.length==0) return;
    if (layers)
      document.write('<layer id="menuitem' + this.ID + '" top="' + this.top + '" left="' + (offsetX + this.left) + '">\n');
    else
      document.write('<span id="menuitem' + this.ID + '" style="z-index: 100; position: absolute; top: ' + this.top + '; left: ' + (offsetX + this.left) + '; display: none">\n');
		
    document.write('<table width=' + this.width + ' cellspacing=0 cellpadding=0 bgcolor=#B3B9C9>\n');
    document.write('<tr><td>\n');
    document.write('  <table width=100% cellspacing=1 cellpadding=5 onmouseover="RefreshMenu();">\n');
    
    for (var i=0; i<this.items.length; i++) {
//      if (i>0)
//        document.write('<tr bgcolor=#ECF4DD ><td><img src="images/lines/blue.gif" width=100% height=1></td></tr>');
      this.items[i].Draw();
    }

    document.write('  </table>\n');
    document.write('</td></tr>\n');
    document.write('</table>\n');
    if (layers)
      document.write('</layer>');
    else
      document.write('</span>');
    if (layers)
      this.container = document.layers[0];
    else
      this.container = findObject('menuitem' + this.ID);
  }
  
  function ShowMenu() {
    if (timeout != null && timeout) {
      window.clearTimeout(timeout);
    }
    if (activeMenu != null) {
      activeMenu.Hide();
    }
    
    if (this.items && this.items.length) {
      ShowHide(this.container, 1);
      activeMenu = this;
    }
  }
  
  function HideMenu() {
    ShowHide(this.container, 0);
  }
  
  function ShowHide(element, flag) {
    if (flag)
      element.style.display = '';
    else
      element.style.display = 'none';
  }
  
  function RefreshMenu() {
    if (timeout != null && timeout) {
      window.clearTimeout(timeout);
    }
  }
  
  function DrawSubmenuItem() {
    document.write('<tr bgcolor=#D4E6F4 style="cursor: hand" onmouseover="RefreshMenu(); this.oldBg=this.style.backgroundColor; this.oldColor=this.children[0].children[0].style.color; this.style.backgroundColor=\'#69696B\'; this.children[0].children[0].style.color=\'#FE0000\'; RequestShowMenu(' + this.parentID + ')" onmouseout="RequestHideMenu(' + this.parentID + '); this.style.backgroundColor=this.oldBg; this.children[0].children[0].style.color=this.oldColor"><td height="23" class="subnav" bgcolor="#ECF2FB" onclick="window.location=\'' + this.url + '\'"><a class=subnav href="' + this.url + '" >' + this.name + '</a></td></tr>\n');  }
  
  function RequestShowMenu(index) {
    if (index<menu.length) {
      menu[index].Show();
    }
  }
  
  function RequestHideMenu(index) {
    if (index<menu.length) {
      menu[index].IsHiding = true;
      timeout = window.setTimeout('menu[' + index + '].Hide()', 500);
    }
  }
  
  function RequestHideActiveMenu() {
    if (activeMenu != null) {
      activeMenu.IsHiding = false;
      timeout = window.setTimeout('activeMenu.Hide()', 500);
    }
  }
  
  function HideActiveMenu() {
    if (activeMenu != null) {
      activeMenu.IsHiding = false;
      activeMenu.Hide();
    }
  }
  
  function InitializeMenu(menu) {
    for (i=0; i<menu.length; i++)
      menu[i].Draw();
  }
  
  function findObject(ID) {
	if (document.all) return(document.all[ID]);
	if (document.getElementById) return(document.getElementById(ID));
	return(false);
  }
  


  var timeout = null;
  var activeMenu = null;
  var top = 200;
  var menuWidth=250;
  var offsetX = 0;
  var layers=false;
  if (document.layers) layers = true;
  
  var flashImg = new Image();
  flashImg.src = 'images/flashStop.jpg';
  
  offsetX = parseInt((document.body.clientWidth-780)/2);
  if (offsetX<0) offsetX = 0;
  
  document.writeln('<style type="text/css">\n.menuitem1 { color: #FFFFFF; font: 9pt Arial, Sans Serif; font-weight: bold; text-decoration: none; }\n</style>\n');
  
  window.onresize=RepositionMenu;
  window.document.body.onclick=HideActiveMenu;
  
  function RepositionMenu() {
    offsetX = parseInt((document.body.clientWidth-780)/2);
    if (offsetX<0) offsetX = 0;
    for (i=0; i<menu.length; i++) {
      menuitem = findObject('menuitem' + i);
      if (menuitem && menuitem.style)
        menuitem.style.left = offsetX + menu[i].left;
    }
  }
  
//-->
