/* none of these functions work in older (e.g. Netscape 4) browsers! */

/* this function gets all elements with a given tag name and given class on the page. (and puts it in a handy array, if you are the geeky type.) */

function getElementsWithClassName(tagname, classname) {
if (document.getElementById) {var allElements = document.getElementsByTagName(tagname);var elementsWithClassName = new Array();for (i=0; i<allElements.length; i++) {  if (allElements[i].className == classname) {    elementsWithClassName[elementsWithClassName.length] = allElements[i];    } }  return elementsWithClassName;  }
}

/* this function merely changes the display style to state ("none", "block" etc) */

function showhide(elem,state) {
if (document.getElementById) {
document.getElementById(elem).style.display=state;
  }
}

/* this function shows and hides all elements with a given tag name and given class name on the page. */

function showhideclass(tagname,classname,displaystate) { toshowhide = getElementsWithClassName(tagname,classname);  for (k=0; k < toshowhide.length; k++) {   toshowhide[k].style.display = displaystate;   } } /* this function calls the function showhideclass(). Note the detection of the
document.getElementById - this means this function and all others on this page will NOT work with older browsers! */
function init() {if (document.getElementById) {showhideclass('div','menu','none'); }else return;}