function showSelectBoxes(){
  selects = document.getElementsByTagName("select");
  for (i = 0; i != selects.length; i++) {
    selects[i].style.visibility = "visible";
  }
}

function hideSelectBoxes(){
  selects = document.getElementsByTagName("select");
  for (i = 0; i != selects.length; i++) {
    selects[i].style.visibility = "hidden";
  }
}

function IEHoverPseudo() {

  var ulNodes = getElementsByClass("nice-menu");
  var j = 0;
  var liNodes = null;

  for (var i = 0; i < ulNodes.length; i++) { 
    liNodes = ulNodes[i].getElementsByTagName("li");
    for (j = 0; j < liNodes.length; j++) {
        liNodes[j].onmouseover=function() { hideSelectBoxes(); addClass(this, 'over'); }
        liNodes[j].onmouseout=function() { showSelectBoxes(); removeClass(this, 'over'); }
    }
  }
}

function getElementsByClass(searchClass,node,tag) {
  var classElements = new Array();
  if (node == null) node = document;
  if (tag == null) tag = '*';
  var els = node.getElementsByTagName(tag);
  var elsLen = els.length;
  var pattern = new RegExp("(^|\\s)"+searchClass+"(\\s|$)");
  for (i = 0, j = 0; i < elsLen; i++) {
    if (pattern.test(els[i].className)) {
      classElements[j] = els[i];
      j++;
    }
  }
  return classElements;
}

// This is the Drupal method of adding a function to the BODY onload event.  (See misc/drupal.js)
addLoadEvent(IEHoverPseudo);
