// Testado no Mozilla 1.7, Netscape 7, IE6 e Opera
//***************************************************************//
// Detecta o tipo de Browser
//***************************************************************//
if (document.all || document.layers) {
	IE4 = (document.all);
	NS4 = (document.layers);
	NS6 = false;
} else if (document.getElementById) {
	IE4 = false;
	NS4 = false;
	NS6 = (document.getElementById);
}
if ( navigator.userAgent.indexOf("Mozilla") != -1 ) {
	mozilla = true;
}
ver4 = (NS4 || IE4);
IE5 = (IE4 && navigator.appVersion.indexOf("5.")!=-1);
isMac = (navigator.appVersion.indexOf("Mac") != -1);
isMenu = (NS4 || (IE4 && !isMac) || (IE5 && isMac));
//***************************************************************//


var nQTDMenus=1 //Informe a quantidade de menus na página (lembrar que começa em 0)
var nBgcolor='#ffffff' //The bgColor of the bottom mouseover div 
var nBgcolorchangeto='#FFFFFF' //The bgColor to change to
var cSubItem = '#ffffff'


//***************************************************************//
// Funções auxiliares
//***************************************************************//
function getStyle(id){return NS4 ? document[id].style : NS6 ? document.getElementById(id).style : document.all[id].style;}
function getObj(id){return NS4 ? document[id] : NS6 ? document.getElementById(id) : document.all[id];}
function menuOver(num){ mostrarMenu(num) }
function menuOut(num){ ocultarMenu(num) }
function fTrocar(color) { bgColor=color} 
function fRolagem(num) {	getStyle("divMenuItem" + num).overflow = "scroll"}
//***************************************************************//
function criarMenu(num) {		
    var targetElement = getObj('divMenuItem' + num)
//	targetElement.trocar = fTrocar
//	targetElement.rolagem = fRolagem
//	targetElement.menuitem = num
}

function iniciarMenu(){
	for(i=0;i<=nQTDMenus;i++){
		var targetElementItem = getObj('divMenuItem' + i)			
		criarMenu(i)
	}	
}
	
	function mostrarMenu(num) {
            if (isMenu || document.getElementById) 
	    {	    
                var targetElement = getObj('divMenuItem' + num);
                targetElement.style.visibility = 'visible';            
		targetElement.style.color=cSubItem;		
//		targetElement.trocar(nBgcolorchangeto)		
		}		
        }

        function ocultarMenu(num) {
            if (isMenu || document.getElementById)  
            {
                var targetElement = getObj('divMenuItem' + num);
                targetElement.style.visibility = 'hidden';
		targetElement.style.color=""
            }
	}    
	    
onload=iniciarMenu;


      

//	this.shadow = document.createElement("div")
//	this.shadow.style.backgroundColor = "red"
//	this.shadow.style.position = "absolute"
//	this.shadow.style.left = 5
//	this.shadow.style.top = 5
//	this.shadow.style.zIndex = 1000
//	this.shadow.style.height =50 
//	this.shadow.style.width = 100
//	this.shadow.style.visibility = "visible"
//	document.body.appendChild(this.shadow)      