sfHover = function() {
	var sfEls = document.getElementById("nav").getElementsByTagName("LI");
	
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover = function() {
			this.className += " sfhover";
		}
		sfEls[i].onmouseout = function() {
			this.className = this.className.replace(new RegExp(" sfhover\\b"), "");
		}
	}
}

if (window.attachEvent) window.attachEvent("onload", sfHover);

initNavBar = function() {
	var undefined;
	
	// Check for Safari
	var agt = navigator.userAgent.toLowerCase();
	var appVer = navigator.appVersion.toLowerCase();
	var is_safari = (agt.indexOf("safari") != -1);
	var build = appVer.substring(appVer.lastIndexOf("/")+1);
	
	// Disable dropdowns for pre v.86 Safari
	if ( (is_safari) && (build < 86) ) {
		document.write('<style type="text/css">ul#nav li:hover ul {display: none}<\/style>');
	} else {
		// Disable root links
		if (document.getElementById) {
			navRoot = document.getElementById("nav");
			for (i=0; i<navRoot.childNodes.length; i++) {
				node = navRoot.childNodes[i];
				// Disable root level links
				if ( (node.nodeName=="LI") && (node.childNodes.length > 2) ) {
					// remove root level links
					node.firstChild.removeAttribute('href');
					node.firstChild.style.cursor = "default";
				}
			}
		}
	}
}

function disableLinks(myId) {
	link = document.getElementById(myId);
	if (link) {
		link.removeAttribute('href');
		link.className = 'dead_link';
	}
}