	opMenu = []; //  = Array para as opções da barra principal
	tdMenu = []; //  = Array para as td da barra principal

function montaMenu() {
	
//  DECLARANDO VARIAVEIS
//  --------------------------------------------------------------------
	var opSubMenu = []; // = Array para as opções das opções desta barra
	var opSubMenu2 = []; // = Array para manipular as opções das opções

	for(i=0; i<8; i++) {
		opSubMenu[i] = []; // [0][0] = OPÇÕES // [0][1] = LINK DAS OPÇÕES
	}
	for(i=0; i<8; i++) {
		opSubMenu2[i] = [];
	}
	
	// COLUNA 01
		opSubMenu[0][0] = ["Area riservata","Mappa del sito","E-mail","Parola di Vita","Il Movimento dei Focolari","Chiara Lubich"];
		opSubMenu[0][1] = ["IntraPassword.php","MontaFrameHOME.php?IDCat=1&IDSubCat=57&IDLng=IT&FCentro=FrameMappaDelSito.php","MontaFrameHOME.php?IDCat=1&IDSubCat=56&IDLng=IT&FCentro=MontaScrivici.php","http://www.focolare.org/articolopdv.php?codart=4054&pdv=2","http://www.focolare.org/","http://www.focolare.org/page.php?codcat2=102&codcat1=98&lingua=IT&titolo=il%20movimento%20dei%20foco"]; 
		
	// COLUNA 02
		opSubMenu[1][0] = ["Polo Lionello","Azur","Fantasy","Ceramica","Gigli del Campo","Fattoria Loppiano","Gibi & DoppiaW","Energia Centro Nord","Dulcis in Fundo","Ambulatorio Dentistico","Cooperativa Ideale"];
		opSubMenu[1][1] = ["http://www.edicspa.com/","http://www.azurline.it/","http://www.fantasyloppiano.it/","http://www.loppiano.it/centroavec.htm","http://www.giglidelcampo.it/","http://www.loppiano.it/Fattoria/Fattoria.html","http://www.gibiedoppiaw.com/","http://www.energiacentronord.com/","http://www.loppiano.it/dulcis/dulcis.htm","http://www.loppiano.it/LaboratorioDentistico/LaboratorioDentistico.html","http://www.loppiano.it/ideale/default.htm"];
		
	// COLUNA 03
		opSubMenu[2][0] = ["E-mail","È sucesso","1º Maggio","Prenotazioni","Prossimi appuntamenti","Ospitalità","Agenda"];
		opSubMenu[2][1] = ["MontaFrameHOME.php?IDCat=3&IDSubCat=17&IDLng=IT&FCentro=MontaScrivici.php","MontaFrameHOME.php?IDCat=3&IDSubCat=16&IDLng=IT&FCentro=SubMenu365Giorni.php","MontaFrameHOME.php?IDCat=3&IDSubCat=15&IDLng=IT&FCentro=SubMenuGenerale.php","MontaFrameHOME.php?IDCat=3&IDSubCat=14&IDLng=IT&FCentro=MontaPrenotazione.php","MontaFrameHOME.php?IDCat=3&IDSubCat=13&IDLng=IT&FCentro=SubMenuEventi.php","MontaFrameHOME.php?IDCat=3&IDSubCat=12&IDLng=IT&FCentro=SubMenuGenerale.php","MontaFrameHOME.php?IDCat=3&IDSubCat=59&IDLng=IT&FCentro=SubMenuGenerale.php"];
		
	// COLUNA 04
		opSubMenu[3][0] = ["Santuario Maria Theotokos","Cappella Ecumenica"];
		opSubMenu[3][1] = ["MontaFrameHOME.php?IDCat=4&IDSubCat=22&IDLng=IT&FCentro=SubMenuGenerale.php","MontaFrameHOME.php?IDCat=4&IDSubCat=23&IDLng=IT&FCentro=SubMenuGenerale.php"];
		
	// COLUNA 05
		opSubMenu[4][0] = ["Renata Borlone","Albertina","Campo Santo"];
		opSubMenu[4][1] = ["MontaFrameHOME.php?IDCat=5&IDSubCat=18&IDLng=IT&FCentro=SubMenuGenerale.php","MontaFrameHOME.php?IDCat=5&IDSubCat=19&IDLng=IT&FCentro=SubMenuGenerale.php","MontaFrameHOME.php?IDCat=5&IDSubCat=20&IDLng=IT&FCentro=SubMenuCampoSanto.php"];

	// COLUNA 06
		opSubMenu[5][0] = ["Progetto Uno","Azioni Musicali","Centro Ave Arte","Hung","Ciro","GenVerde","GenRosso"];
		opSubMenu[5][1] = ["http://www.loppiano.it/progetto1/","http://www.azionimusicali.com/","http://www.loppiano.it/centroave.htm","http://www.atelierhung.com/","http://www.labottegadiciro.it/","http://www.genverde.it/","http://www.genrosso.com/"];
		
	// COLUNA 07
		opSubMenu[6][0] = ["Gen (San Giovanni Battista)"];
		opSubMenu[6][1] = ["http://scuolagen.webs.com"];
		
	// COLUNA 08
		opSubMenu[7][0] = ["Hanno detto","Esperienze di vita","Chiara su Loppiano","La storia","Loppiano Notizie","Cartina","In breve","Archivio foto","News","Rassegna stampa","Notizie utili"];
		opSubMenu[7][1] = ["MontaFrameHOME.php?IDCat=8&IDSubCat=52&IDLng=IT&FCentro=SubMenuGenerale.php","MontaFrameHOME.php?IDCat=8&IDSubCat=51&IDLng=IT&FCentro=SubMenuGenerale.php","MontaFrameHOME.php?IDCat=8&IDSubCat=50&IDLng=IT&FCentro=SubMenuGenerale.php","MontaFrameHOME.php?IDCat=8&IDSubCat=49&IDLng=IT&FCentro=SubMenuGenerale.php","MontaFrameHOME.php?IDCat=8&IDSubCat=48&IDLng=IT&FCentro=SubMenuGenerale.php","MontaFrameHOME.php?IDCat=8&IDSubCat=48&IDLng=IT&FCentro=SubMenuGenerale.php","MontaFrameHOME.php?IDCat=8&IDSubCat=46&IDLng=IT&FCentro=SubMenuGenerale.php","MontaFrameHOME.php?IDCat=8&IDSubCat=45&IDLng=IT&FCentro=PhotoViewer.php","MontaFrameHOME.php?IDCat=8&IDSubCat=44&IDLng=IT&FCentro=SubMenuNews.php","MontaFrameHOME.php?IDCat=8&IDSubCat=43&IDLng=IT&FCentro=SubMenuGenerale.php","MontaFrameHOME.php?IDCat=8&IDSubCat=42&IDLng=IT&FCentro=SubMenuGenerale.php"];
	
	// Verificação se o navegador tem suporte a DOM(Document Object Model)
	if(document.getElementById){
		
		opMenu[0] = document.getElementById("Div00");
		opMenu[1] = document.getElementById("Div01");
		opMenu[2] = document.getElementById("Div02");
		opMenu[3] = document.getElementById("Div03");
		opMenu[4] = document.getElementById("Div04");
		opMenu[5] = document.getElementById("Div05");
		opMenu[6] = document.getElementById("Div06");
		opMenu[7] = document.getElementById("Div07");
			 
		tdMenu[0] = document.getElementById("td00");
		tdMenu[1] = document.getElementById("td01");
		tdMenu[2] = document.getElementById("td02");
		tdMenu[3] = document.getElementById("td03");
		tdMenu[4] = document.getElementById("td04");
		tdMenu[5] = document.getElementById("td05");
		tdMenu[6] = document.getElementById("td06");
		tdMenu[7] = document.getElementById("td07");

		
	// FUNÇÕES PARA ALTERAR O ESTILO
		function over(){ this.style.backgroundColor = '#CACACA'; }
		function out(){ this.style.backgroundColor = '#FF0000'; }
		//function out(){ this.style.backgroundColor = '#E2E2E2'; }
		
		for(j=0; j<opSubMenu.length; j++){
			for (i=0; i<opSubMenu[j][0].length; i++){
			// SE Ñ TIVER OP
				if (opSubMenu[j][0][i]!="") {
				// CRIANDO LINK
					function leftTrim(sString) {
						while (sString.substring(0,1) == ' ')
						{
						sString = sString.substring(1, sString.length);
						}
					return sString;
					}

					var urlcomeco = "http";
					if (urlcomeco == opSubMenu[j][1][i].substr(0,4)) {
					opSubMenu[j][0][i] = "<a href='#' onclick='window.open(\""+opSubMenu[j][1][i]+"\");'><font color='#666666'>" + opSubMenu[j][0][i] + "</font></a>";
					} else {
					opSubMenu[j][0][i] = "<a href=\""+opSubMenu[j][1][i]+"\"><font color='#666666'>" + opSubMenu[j][0][i] + "</font></a>";
					}
					
				// CRIANDO UMA DIV E SETANDO OS ATRIBUTOS
					opSubMenu2[j][i] = document.createElement("div");
					if (j==7) {
					opSubMenu2[j][i].setAttribute("class", "menu-ult");
					} else {
					opSubMenu2[j][i].setAttribute("class", "menu-sublink");
					}
					opSubMenu2[j][i].innerHTML = opSubMenu[j][0][i];
					//opSubMenu2[j][i].style.padding = "5px";
					opSubMenu2[j][i].onMouseOver = over;
					opSubMenu2[j][i].onMouseOut = out;
				
					opMenu[j].appendChild(opSubMenu2[j][i]);
					/*if (i<opSubMenu[j][0].length-1) {
					//	opMenu[j].innerHTML = opMenu[j].innerHTML + "<p style='margin-top:1px'></p>";
					}*/
				}
			}
		//  SE NÃO TIVER OPÇÕES, FUNDO TRANSPARENTE
			if (opMenu[j].innerHTML=="") {
				opMenu[j].innerHTML = "";
			}
			opMenu[j].innerHTML = "<p style='margin-top: 0; margin-bottom: 0px'>" + opMenu[j].innerHTML + "</p>"
		}
	}
}
function MenuOnMouseOver(numero) {
	for(i=0; i<8; i++) {
		MenuOnMouseOut(i);
	}
	opMenu[numero].style.visibility = 'visible';
	tdMenu[numero].bgColor = '#FFCC00';
}
function MenuOnMouseOut(numero) {
	opMenu[numero].style.visibility='hidden';
	tdMenu[numero].bgColor = '';
}
window.onload = montaMenu;