window.onload = function() {
	if(document.getElementById) {
		
		// locate the alumni classes <ul>
		var classes = document.getElementById("alumni_classes");
		
		// get a list of all <ul> tags within the alumni classes <ul>
		var uls = classes.getElementsByTagName("ul");
		for(var i=0; i<uls.length; i++) {
			uls[i].className = "hide";
		}
		
		// get a list of all <a> tags within the alumni classes <ul>
		var as = classes.getElementsByTagName("a");
		for(i=0; i<as.length; i++) {
			// tell the link what to do when clicked
			as[i].onclick = function() {
				// locate the immediately following <ul>
				var next_ul = getNextElement(this.nextSibling);
				// if it's hidden show it, and vice versa
				if(next_ul.className == "hide") {
					next_ul.className = "show";
					return false;
				} else {
					next_ul.className = "hide";
					return false;
				}
			};
		}
		
		// function to determine next element
		function getNextElement(node) {
			if(node.nodeType == 1) {
				return node;
			}
			if(node.nextSibling) {
				return getNextElement(node.nextSibling);
			}
			return null;
		}
	}
};