function menu(menuLbl,menuLnk,menuDir) {
	this.menuLabel = menuLbl
	this.menuLink = menuLnk
	this.menuDir = menuDir
	this.subLabel = new Array()
	this.subLabelLink = new Array()
	this.addSubItem = addSubItem
}

function addSubItem(subLbl,subLnk) {
	this.subLabel[this.subLabel.length] = subLbl
	this.subLabelLink[this.subLabelLink.length] = subLnk
}

var az_menu = new Array();

	az_menu[0] = new menu("Home","default.asp","..");

	az_menu[1] = new menu("Garda Trentino Triathlon","home_gtt.asp?Area=1","../gardaTrentino");
		az_menu[1].addSubItem("Novit&agrave; 2008","articoli.asp?Area=1&id_articolo=5")
		az_menu[1].addSubItem("Statuto","articoli.asp?Area=1&id_articolo=2")
		az_menu[1].addSubItem("Il ciclismo nel triathlon","articoli.asp?Area=1&id_articolo=4")
		az_menu[1].addSubItem("Patologie del ciclista","articoli.asp?Area=1&id_articolo=3")
		az_menu[1].addSubItem("Informazioni","informazioni.asp?Area=1")
	
	az_menu[2] = new menu("MTB Triathlon","home_mtbth.asp?Area=2","../mtbTriathlon");
		az_menu[2].addSubItem("Nuoto","nuoto.asp")
		az_menu[2].addSubItem("MTB","mtb.asp")
		az_menu[2].addSubItem("Corsa","corsa.asp")
		az_menu[2].addSubItem("Percorso","aerea.asp")		
	
	az_menu[3] = new menu("Foto Gallery","home_foto.asp","../fotoGallery");
		az_menu[3].addSubItem("XTriathlon 2006","icone.asp?tipo=MTB_TH&anno=2006")
		az_menu[3].addSubItem("MTB Triathlon 2005","icone.asp?tipo=MTB_TH&anno=2005")
		az_menu[3].addSubItem("MTB Triathlon 2004","icone.asp?tipo=MTB_TH&anno=2004")
		az_menu[3].addSubItem("MTB Triathlon 2003","icone.asp?tipo=MTB_TH&anno=2003")
		az_menu[3].addSubItem("MTB Triathlon 2001","icone.asp?tipo=MTB_TH&anno=2001")
		az_menu[3].addSubItem("Gita Scortepotassio","icone.asp?tipo=SP&anno=2004")
		az_menu[3].addSubItem("Gare del GTT 2004","icone.asp?tipo=GTT_TH&anno=2004")
	



function scriviMenu(posizione) {
	for ( var i = 0; i < az_menu.length; i++ ) {
			if ( i == posizione ) {
			document.writeln("<div class='principale'><a href='" + az_menu[i].menuLink  + "' class='link-menu'>" + az_menu[i].menuLabel + "</a></div>")			
				for ( var ii = 0; ii < az_menu[i].subLabel.length; ii++) {
					document.writeln("<div class='secondario'><a href='" + az_menu[i].subLabelLink[ii]  + "' class='link-menu'>" + az_menu[i].subLabel[ii] + "</a></div>")}}
			else {
				document.writeln("<div class='principale'><a href='" + az_menu[i].menuDir + "/" + az_menu[i].menuLink + "' class='link-menu'>" + az_menu[i].menuLabel + "</a></div>")
			}
	}
} 