/*
' -------------------------------------------------------
' Bos Web Application Environment
' Copyright (c) 2003 bos web management 
' -------------------------------------------------------
'
' Top Navigation Bar
' JavaScript Run-time Library
'
' The topnav object must draw the PluginTopNavClearAllMenus()
' and set each menu item to visibility = 'hidden'
'
' -------------------------------------------------------
*/

   var timeoutID;
   var isNS = !(navigator.appName == "Microsoft Internet Explorer");

   var offset = 0;

   // Makes a menu layer visible
   //
   function changeLayer(button, layerName, topOffSet, rightOffSet)
   {
       window.clearTimeout(timeoutID);
       if(!isNS) 
       {
          PluginTopNavClearAllMenus();
          document.all[layerName].style.left = rightOffSet + button.offsetLeft;
          document.all[layerName].style.top = topOffSet + offset;
          document.all[layerName].className = 'topnavmenuOn';
       }
   }




   // Delay hiding the menu
   //
   function mdelay(layerName)
   {
       timeoutID = window.setTimeout("changeLayerOff('" + layerName + "')", 250);
   }


   // Hide the menu layer
   //
   function changeLayerOff(layerName)
   {
       if (!isNS) 
       {
          document.all[layerName].className = 'topnavmenuOff';
       }
   }


   // Clear the window timeout and show the selected menu layer
   //
   function selectedMenu(layerName)
   {
       window.clearTimeout(timeoutID);
       document.all[layerName].className = 'topnavmenuOn';
       //if(document.all.selectlink)
       //{
       //   document.all.selectlink.className = 'topnavmenuOff';
      // }
   }
