// JavaScript Document

function showSubMenu(id_menu){
document.getElementById(id_menu).style.display = "block";
}
function hideSubMenu(id_menu){
document.getElementById(id_menu).style.display = "none";
}

function showMenu(){
var mf = parent.document.getElementById('mainFrame');
var txt = "";
mf.contentWindow.document.getElementById('smenul').innerHTML = txt;
var a = showMenu.arguments;
for (i=0;i<a.length;i++){
txt += mf.contentWindow.document.getElementById(a[i]).innerHTML;
}
mf.contentWindow.document.getElementById('smenul').innerHTML += txt;
}

function mMenu(){
var txt = "";
document.getElementById('smenul').innerHTML = txt;
var a = mMenu.arguments;
for (i=0;i<a.length;i++){
txt += document.getElementById(a[i]).innerHTML;
}
document.getElementById('smenul').innerHTML += txt;
}

function colorMenu(mid){
	//var mi = new Array("m_home","m_institucional","m_congresso","m_cpacotes","m_produtos","m_tarifarios","m_cg","m_dicas","m_contato");
	//mi = ["m_home","m_institucional","m_congresso","m_cpacotes","m_produtos","m_tarifarios","m_cg","m_dicas","m_contato"];
	//mids = document.getElementsByClassName('xxx');
	//for(i=0;i<mi.length;i++){
		//document.getElementById(mi[i]).className = "";
		//alert(mi[i]);
	//}
	mids = document.getElementsByClassName('amp');
	for(i=0;i<mids.length;i++){
		mids[i].childNodes[0].className = "";
		//alert(mi[i]);
	}
	document.getElementById(mid).className = "mactive";
}
