var func_onload = [function(){}];
function func_window_onload(){
	func_onload.forEach(
		function(f){
			try{
				f();
			}catch(e){}
		}
	);
}
window.onload = func_window_onload;
 
 


var menu_fechou = 0;

function menu_mostrar(){
    menu_sair();
    try{
        try{
            forIn(this.parentNode.parentNode.getElementsByTagName("UL"),function(e){
                e.style.display='none';
            });
        }catch(w){}
        var es = this.parentNode.getElementsByTagName("UL");

        if(es!=null)
            if(es.length>0)
                es[0].style.display="block";
    }catch(e){}
}

function menu_fechar(){
    var atual = menu_fechou;
    setTimeout(function(){
        if(atual==menu_fechou){
            forIn(menugruposjson.content.getElementsByTagName("UL"),function(e){
                e.style.display='none';
            });
        }
    }, menugruposjson.delay);
}


function menu_sair(){
    menu_fechou++;
    if(menu_fechou==10000)
        menu_fechou=0;
}


function menu_criar(){
    forIn(menugruposjson.content.getElementsByTagName("A"),function(e){
        e.onmouseover=menu_mostrar;
    });
    forIn(menugruposjson.content.getElementsByTagName("SPAN"),function(e){
        e.onmousemove=menu_mostrar;
    });
    forIn(menugruposjson.content.getElementsByTagName("LI"),function(e){
        e.onmouseout=function(){
			menu_fechar();
			this.style.backgroundColor="#e7e7e7";
			this.style.color="#ffd800";
			this.style.borderBottom="thin solid #d1d1d1";
			this.style.borderWidth="1px";
			
		};
        e.onmouseover=function(){
			menu_sair();
			this.style.backgroundColor="#f8f8f8";
			this.style.color="#ffd800";
			this.style.borderBottom="thin solid #d1d1d1";
			this.style.borderWidth="1px";
		};
    });
    forIn(document.getElementsByTagName("LI"),function(e){
        e.style.display='block';
    });
}

