startList = function() {
	var tags = document.getElementById("links").getElementsByTagName("img");
	for (var i = 0; i <  tags.length  ; i++) {
		var tag = tags[i];
		tag.onmouseover = function() {
			var thisId = this.id;
			//alert(thisId);
			document.getElementById(thisId).src = "img/" + thisId + "_on.gif";
		}
		tag.onmouseout = function() {
			var thisId = this.id;
			//alert(thisId);
			document.getElementById(thisId).src = "img/" + thisId + ".gif";
		}
	}
	
	if (document.getElementById("upperLinks")) {
		var tags = document.getElementById("upperLinks").getElementsByTagName("img");
		for (var i = 0; i <  tags.length  ; i++) {
			var tag = tags[i];
			if (tag.id != "indietro") {
				tag.onmouseover = function() {
					var thisId = this.id;
					//alert(thisId);
					document.getElementById(thisId).src = "img/" + thisId + "_on.gif";
				}
				tag.onmouseout = function() {
					var thisId = this.id;
					//alert(thisId);
					document.getElementById(thisId).src = "img/" + thisId + ".gif";
				}
			}
		}
	}
	
	var tags = document.getElementById("links").getElementsByTagName("a");
	for (var i = 0; i <  tags.length  ; i++) {
		var tag = tags[i];
		tag.onclick = function() {
			var thisId = this.id;
			//alert(thisId);
			if (document.getElementById("sub_" + thisId)) {
				document.getElementById("sub_" + thisId).style.display = "block";
			}
		}
	}
}
window.onload = startList;
