/* Function:	overlapHack
 * 
 * Description:	Handler for making sure the drop-down menus don't get obscured by select lists.
 *				This hack is only useful for IE 5.5 and above.
 *
 * History: 	2004-05-08 - Initial Version (adam)
 * 
 */
 
overlapHack = function() {
	var isMac = navigator.userAgent.indexOf("Mac") != -1;
	
	if(document.all && document.getElementById && !isMac) {
		
	}
	
	return true;
}
 

/* Function:	startList
 * 
 * Description:	Handler for drop-down menus in IE
 *
 * History: 	http://www.alistapart.com/articles/dropdowns
 * 
 */

startList = function() {
	var isMac = navigator.userAgent.indexOf("Mac") != -1;
	
	if(document.all && document.getElementById && !isMac) {
		navRoot = document.getElementById("menubar");
		
		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", "");
				}
			}
		}
	}
}

/* Function:	externalLinks
 * 
 * Description:	Sets links with rel="external" tags to launch hyperlinks in separate windows
 *
 * History:		Code from Alex King
 *
 */
 
function externalLinks() { 
	if (!document.getElementsByTagName) return;
	var anchors = document.getElementsByTagName("a"); 
	for (var i=0; i<anchors.length; i++) {
		var anchor = anchors[i];
		if (anchor.getAttribute("href") && anchor.getAttribute("rel") == "external") {
			anchor.target = "_blank";
			anchor.className = "external";
		}
	}
}

/* Function:	initialize
 * 
 * Description:	Calls the externalLinks and startList functions.
 *
 * History:		2004-03-25 - Initial version (atow)
 *
 */
 
initialize = function() {
	startList();
	externalLinks();
}


window.onload = initialize;
