addLoadEvent(function() {
	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"; 
	} 
})

addLoadEvent(function() {
	if (getObject('siteNav')) {
		var navItems = document.getElementById("siteNav").getElementsByTagName("li");
		for (var i=0; i<navItems.length; i++) {
			if (navItems[i].getElementsByTagName("ul")[0]) {
				navItems[i].className = "menuparent";
				navItems[i].onmouseover=function() { 
					this.className += " over"; 
					var nestedUL = this.getElementsByTagName('ul')[0];
					if (nestedUL) { 
						var nestedLIs = nestedUL.getElementsByTagName("li");
						var nestedLICount = 0;
						for (var t=0; t<nestedLIs.length; t++) {
							if (nestedLIs[t].parentNode == nestedUL) {
								nestedLICount++
							}
						}
						if (nestedUL.parentNode.getElementsByTagName("div").length < 1) {
							var shadow = document.createElement('div');
							shadow.className = "navShadow";
							shadow.style.width = "167px";
							if (nestedUL.parentNode.parentNode.id == 'siteNav') {
								shadow.style.height = ((23*nestedLICount)+14)+"px";	
							} else {
								shadow.style.height = ((23*nestedLICount)+3)+"px";	
							}
							nestedUL.parentNode.appendChild(shadow);
						}
					}	
				}
				navItems[i].onmouseout=function() { 
					this.className = "menuparent"; 
				}
			}
		}
	}
})

