//hack for CSS dropmenus in IE5x

function iehack(navRoot) {
  for (i=0; i<navRoot.childNodes.length; i++) {
    node = navRoot.childNodes[i];
    if (node.nodeName=="LI") {
      node.onmouseover=function() {
        this.className+="over";
      }
      node.onmouseout=function() {
        this.className=this.className.replace("over", "");
      }
    }
  }
}

startList = function() {
  if (document.all&&document.getElementById) {
    navRoot = document.getElementById("navmenu");
    iehack(navRoot);
 
    if (document.getElementById("menu1")) {
      count=1;
      while (document.getElementById("menu"+count)) {
        navRoot = document.getElementById("menu"+count);
        iehack(navRoot);
        count++;
      }
    }
  }
}

function setCookie(cValue, cookieID) {
	var NameOfCookie = cookieID;
	document.cookie = NameOfCookie + "=" + escape(cValue) + "; path = /; domain = test.lib.virginia.edu";
}

function addOnLoad(newFunction) { 
    var oldOnload = window.onload; 
    if (typeof window.onload != 'function') { 
      window.onload = newFunction; 
    } else { 
      window.onload = function() { oldOnload(); newFunction(); } 
    } 
}
 
addOnLoad(startList);