var menu = [];
var anterior = "";

menu[0] = Array(
	'Infrastructure|http://www.odebrechtonline.com.br/materias/01001-01100/1077/',
	'Angola|http://www.odebrechtonline.com.br/materias/01001-01100/1078/',
             'Environment|http://www.odebrechtonline.com.br/materias/01001-01100/1080/',
	'Petrochemicals I|http://www.odebrechtonline.com.br/materias/01001-01100/1081/',
	'Petrochemicals II|http://www.odebrechtonline.com.br/materias/01001-01100/1082/',
	'Petrochemicals III|http://www.odebrechtonline.com.br/materias/01001-01100/1083/',
	'Petrochemicals IV|http://www.odebrechtonline.com.br/materias/01001-01100/1084/',
	'Petrochemicals V|http://www.odebrechtonline.com.br/materias/01001-01100/1085/',
	'Pioneers of Plastics|http://www.odebrechtonline.com.br/materias/01001-01100/1086/',
	'Memory|http://www.odebrechtonline.com.br/materias/01001-01100/1087/', 
             'Competitiveness|http://www.odebrechtonline.com.br/materias/01001-01100/1090/', 
             'Sustainable Development|http://www.odebrechtonline.com.br/materias/01001-01100/1092/'
        
);
menu[1] = Array(
	'Editorial|http://www.odebrechtonline.com.br/materias/01001-01100/1075/',
             'Thoughts|http://www.odebrechtonline.com.br/materias/01001-01100/1076/',
             'Profile|http://www.odebrechtonline.com.br/materias/01001-01100/1079/',
             'State of the Art|http://www.odebrechtonline.com.br/secoes/00101-00200/130/',
             'Interview|http://www.odebrechtonline.com.br/materias/01001-01100/1088/',
             'Entrepreneurial Philosophy|http://www.odebrechtonline.com.br/materias/01001-01100/1089/',
             'Organization|http://www.odebrechtonline.com.br/materias/01001-01100/1094/',
             'Chronicle|http://www.odebrechtonline.com.br/secoes/00101-00200/131/',
	'Book Review|http://www.odebrechtonline.com.br/materias/01001-01100/1091/',
	'Message from the Board|http://www.odebrechtonline.com.br/materias/01001-01100/1093/',	
	'Editorial Team|javascript:pop(\"http://www.odebrechtonline.com.br/complementos/00801-00900/882\",\"1234\",\"width=700,height=420\")'
);
menu[2] = Array(
	'Odebrecht Foundation 40 Years|http://www.odebrechtonline.com.br/fundacao/40anos/en/',
	'Odeprev 10 Years|http://www.odebrechtonline.com.br/odeprev/especial/2005/',
	'Especial Issue 60 Years|http://www.odebrechtonline.com.br/edicoes/60anos/en/',
	'2006 Annual Report|http://www.odebrechtonline.com.br/relatorioanual/2006/en/materia.php?ID=426',
	'2005 Annual Report|http://www.odebrechtonline.com.br/relatorioanual/2005/en/',
	'2004 Annual Report|http://www.odebrechtonline.com.br/relatorioanual/2004/',
	'2003 Annual Report|http://www.odebrechtonline.com.br/relatorioanual/2003/',
	'2002 Annual Report|http://www.odebrechtonline.com.br/relatorioanual/2002/',
	'2005 Anual Meeting|http://www.odebrechtonline.com.br/reuniaoanual/2005/en/',
        '2004 Anual Meeting|http://www.odebrechtonline.com.br/reuniaoanual/2004/',
 	'2003 Anual Meeting|http://www.odebrechtonline.com.br/reuniaoanual/2003/'
);

function pegaXAbs(elt) {
	return parseInt(elt.x) ? elt.x : pegaPosAbs(elt,"Left");
}/* retorna o left absoluto */

function pegaPosAbs(elt,posicao) {
	iPos = 0;
	while (elt != null) {
		iPos += elt["offset" + posicao];
		elt = elt.offsetParent;
	}
	return iPos;
}/* funcao chamada para adquirir top ou left absoluto */

function montaMenu(arr, posX, id) {
	if(typeof arr != 'undefined') {
		parseMenu = "<div style='position: absolute; visibility: hidden; left: " + posX + "; top: 115px; cursor: pointer' id='" + id + "'>";
		parseMenu+= "<table width='173' cellspacing='0' cellpadding='0' border='0' onmouseover='menuPrincipal(document.getElementById(\"" + id + "\"), \"visible\");' onmouseout='menuPrincipal(document.getElementById(\"" + id + "\"), \"hidden\");'>";
		parseMenu+= "<tr><td height='1' bgcolor='#FFFFFF'><img src='http://www.odebrechtonline.com.br/imagens/2006/123/od_transp.gif' width='1' height='1' border='0'></td></tr>";
	
		for(i=0; i<arr.length; i++) {
			var dados = arr[ i ].split("|");
			parseMenu+= "	<tr>";
			parseMenu+= "		<td height='20' class='pdl6 op bgOff' onmouseover='menuStatus(this, \"On\");' onmouseout='menuStatus(this, \"Off\");'><a href='" + dados[1] + "' class='a f11 cbr'>" + dados[0] + "</a></td>";
			parseMenu+= "	</tr>";
		}

		parseMenu+= "</table>";
		parseMenu+= "</div>";

		return parseMenu;
	} else {
		alert("Erro: Não existe o array informado!");
		return "";
	}
}

function menuStatus(obj, st) {
	obj.className = "pdl6 op bg" + st;
}

function menuPrincipal(obj, st) {
	if(typeof anterior == 'object') {
		anterior.style.visibility = 'hidden';
	}
	obj.style.visibility = st;
	anterior = obj;
}
