// JavaScript Document
tms=new Array();
var NSubMenus = 0;
//Posiciona os SubMenus  (Deve ser chamada ao carregar a pagina)
function positSubMenus(NumSubMenus){
	this.NSubMenus = NumSubMenus;
	for (n = 1; n <= NumSubMenus; n++){//
		// Testa se é IE ou NS pro causa da didferença de pixels no boxmodel.
		// Internet Explorer
		if(-1 != navigator.userAgent.indexOf("MSIE")){ 
			document.getElementById("s"+n).style.top=document.getElementById("s"+n).offsetTop-2;
	    }
		// Netscape ou Outros
	   else { 
	   document.getElementById("s"+n).style.top=document.getElementById("s"+n).offsetTop-18;
	   }
		
	}

}
//Oculta todos ao passar o mouse
function overAll(){
	for (x = 1; x <= this.NSubMenus; x++){
	document.getElementById("s"+x).style.visibility="hidden";
	}
	
}

//Mostra o submenu no mouseover
function over(n){
	if(typeof(tms[n])!="undefined")clearTimeout(tms[n])
	for (x = 1; x <= this.NSubMenus; x++){
	document.getElementById("s"+x).style.visibility="hidden";
	}
	document.getElementById("s"+n).style.visibility="visible";
	
}
//Esconde o submenu no mouseout
function out(n){
	tms[n]=setTimeout('document.getElementById("s'+n+'").style.visibility="hidden"',200);
}