// sopperisce alla mancanza dell'attributo target degli <a>
function externalLinks() {
	if (document.getElementsByTagName) {
		var anchors = document.getElementsByTagName("a");
		for (var i=0; i<anchors.length; i++) {
			var thisanchor = anchors[i];
			if (thisanchor.getAttribute("href") && thisanchor.getAttribute("rel") == "external")
				thisanchor.target = "_blank";
		}
	}
}

// permette al menu CSS di funzionare
function startList() {
	if (document.all && document.getElementById) {
		navRoot = document.getElementById("nav");
		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", "");
				}
			}
		}
	}
}

// funzione che viene invocata alla fine del caricamento
onLoadHandler = function() {
	externalLinks();
	startList();
}
window.onload=onLoadHandler;

