// this apparently does not work in IE 7
// (function() {
// modified from osCommerce script  -  jeffs
// 
// addEventListener("load", function( event ) {
//   var which = "navigationMenu";
//   if ( document.getElementById( which ) ) {
//     var listItems = document.getElementById( which ).getElementsByTagName( "li" );
//     for ( i=0; i < listItems.length; i++ ) {
//       for ( j=0; j < listItems[ i ].getElementsByTagName( "ul" ).length; j++ ) {
//         listItems[ i ].onmouseover = function() {
//           this.getElementsByTagName( "ul" )[ j ].style.visibility = 'visible';
//         }
//         listItems[ i ].onmouseout = function() {
//           this.getElementsByTagName( "ul" )[ j ].style.visibility = 'hidden';
//         }
//       }
//     }
//   }
// }, false);
// 
// })();

// so we have to do this instead
// modified from osCommerce script  -  jeffs
function cssMenu( which ) {
  if ( document.getElementById( which ) ) {
    var myRoot = document.getElementById( which );
    var listItems = myRoot.getElementsByTagName( "li" );
    for ( i=0; i < listItems.length; i++ ) {
      for ( j=0; j < listItems[ i ].getElementsByTagName( "ul" ).length; j++ ) {
        listItems[ i ].onmouseover = function() {
          this.getElementsByTagName( "ul" )[ j ].style.visibility = 'visible';
        }
        listItems[ i ].onmouseout = function() {
          this.getElementsByTagName( "ul" )[ j ].style.visibility = 'hidden';
        }
      }
    }
  }
}

function revealList( which ) {
  which.style.visibility = 'visible';
}

function hideList( which ) {
  which.style.visibility = 'hidden';
}
