
function inicia() {
	for (ref = 0; ref < aba.length; ref++) {
		if (aba[ref][1]) {
			acao = "visible";
		} else {
			acao = "hidden";
		}
	document.getElementById(aba[ref][0]).style.visibility = acao;
	}
	document.onmouseup = fechatudo;
}

/*
function inicia_fora() {
	document.onmouseup = fechatudo;
}
*/

function mouseover(menu) {
	for (ref = 0; ref < aba.length; ref++) {
		document.getElementById(aba[ref][0]).style.visibility = "hidden";
	}
	document.getElementById(aba[menu][0]).style.visibility = "visible";
	if (tembisonho) fct_bisonho("abrebisonho");
	aba[menu][2] = 1;
}


function clique(menu) {
	for (ref = 0; ref < aba.length; ref++) {
		document.getElementById(aba[ref][0]).style.visibility = "hidden";
		if (tembisonho) fct_bisonho("fechabisonho");
	}
	if (aba[menu][2]) {
		document.getElementById(aba[menu][0]).style.visibility = "hidden";
		if (tembisonho) fct_bisonho("fechabisonho");
		aba[menu][2] = 0;
	} else {
		document.getElementById(aba[menu][0]).style.visibility = "visible";
		if (tembisonho) fct_bisonho("abrebisonho");
		aba[menu][2] = 1;
	}
}


function fechatudo() {
	for (ref = 0; ref < aba.length; ref++) {
		top.document.frames['principal'].document.getElementById(aba[ref][0]).style.visibility = "hidden";
	}
	if (tembisonho) fct_bisonho("fechabisonho");
}

function fct_bisonho(acao) {
	if (acao == "abrebisonho") {
		document.getElementById('atrasmenu').style.display = "none";
		document.getElementById('bisonho').style.display = "block";
	} else {
		document.getElementById('atrasmenu').style.display = "block";
		document.getElementById('bisonho').style.display = "none";
	}
}


