servicosNivel = location.href.split("/");
servicosNivel = servicosNivel[2];
primeiroNivel = location.href.split("/");
primeiroNivel = primeiroNivel[3];
segundoNivel = location.href.split("/");
segundoNivel = segundoNivel[4];
terceiroNivel = location.href.split("/");
terceiroNivel = terceiroNivel[5];
quartoNivel = location.href.split("/");
quartoNivel = quartoNivel[6];

/* MARCA TOPO */

function atribuiOverTopo(idPrincipal){
	try{
		linksTopo = document.getElementById(idPrincipal).getElementsByTagName('a');
		for(i = 0; i < linksTopo.length; i ++){
			if(linksTopo[i].id == primeiroNivel){
				linksTopo[i].className = 'topoOver';
			}
		}
	}
	catch(e){}
}

/* MOSTRA LATERAL */
function atribuiOverPrimeiroNivel(idPrincipal){
	try{
		divs = document.getElementById(idPrincipal).getElementsByTagName('div');
		uls = document.getElementById(idPrincipal).getElementsByTagName('ul');				
		for(i = 0; i < divs.length; i++){			
			if(divs[i].id == primeiroNivel){								
				divs[i].className = "mostra";
			}
			if(primeiroNivel == 'investidores'){
				document.getElementById('investidores').className = 'mostra';
				document.getElementById('crosslink').style.display = "none";
				document.getElementById('fixos').style.display = "none";
			}
			if(segundoNivel == 'menu_iclass.asp'){
				divs[6].className = "mostra";
				divs[7].className = "mostra";
			}
		}
		for(i = 0; i < uls.length; i ++){			
			if(uls[i].id == terceiroNivel){
				uls[i].className = "mostra";
			}
		}
	}
	catch(e){}
	
	try{
		links = document.getElementById(idPrincipal).getElementsByTagName('a');
		for(i = 0; i < links.length; i ++){
			if(links[i].id == segundoNivel){
				links[i].className = "linkMenuOver";
			}
			else if(links[i].id == terceiroNivel){
				links[i].className = "linkMenuOver";
			}
			else if(links[i].id == quartoNivel){
				links[i].className = "linkMenuOver";
			}
		}
	}
	catch(e){}
}
