// submenu.js
// Phil Pochrzast, ATLAS, August 2006
//
// Reads the current page title and set the "current" class on submenu anchor links


function setSubmenuItem() {
	if (!document.getElementsByTagName) return;
	
	var submenu = document.getElementById('sub-menu');
	var anchors = submenu.getElementsByTagName("a");
	for (var i=0; i<anchors.length; i++) {
		var anchor = anchors[i];
		
		if (anchor.getAttribute("href") && anchor.getAttribute("title") == document.title) {
			anchor.className = "current";
	 	}
	}
}
addEvent(window,'load',setSubmenuItem);