/* ********************************************************
   Script that teaches Internet Explorer <= 6.0 to support
   hover events for anchors and list items.

   Other browsers are able to show popups with help of
   simple CSS 2.0 commands. For IE this script serves as
   work around.
   ******************************************************** */

activateHover = function(nav)
{
  /* currentStyle restricts the Javascript to IE only */
  if (document.all && document.getElementById(nav).currentStyle) {
    var navroot = document.getElementById(nav);

    /* Get all the list items with a nested popup */
    var lis = navroot.getElementsByTagName("LI");
    for (i = 0; i < lis.length; i++) {

      /* If the LI has SPAN or TABLE that is hidden,
         add an hover event */
      if (lis[i].lastChild) {
        if (lis[i].lastChild.tagName == "SPAN") {
          /* assign the function to the LI */

          /* Mouse-over event */
          lis[i].onmouseover = function() {
              /* display */
              this.lastChild.style.display = "block";
          }

          /* Mouse-out event */
          lis[i].onmouseout = function() {
              /* hide */
              this.lastChild.style.display = "none";
          }
        }
      }
    } // end loop over all list items
  } // end IE detection
} // end function

