// JavaScript Document

function addEvent(obj, evType, fn) { 
	if (obj.addEventListener){ 
		obj.addEventListener(evType, fn, false); 
		return true; 
	} else if (obj.attachEvent){ 
		var r = obj.attachEvent("on"+evType, fn); 
		return r; 
	} else { 
		return false; 
	} 
}

var selectMenuItem = function() {
	var sfEls = document.getElementById("menu").getElementsByTagName("A");
	for (var i=0; i<sfEls.length; i++) {
		if ((i + 1) == pageNum) {
			sfEls[i].className = "current";	
		}
		
		sfEls[i].onmouseover=function() {
			if (this.className != "current") {
				this.className = "current";
				
				this.onmouseout=function() {
					this.className = "";
				}
			}
		}
	}
}
addEvent(window,'load',selectMenuItem);
