var timer=null;
var tmpElementoActual;
var timeout=500;
	
function showMenu(menuName)
{
	//Escondemos el menú anterior
	if(typeof(tmpElementoActual)!="undefined")
	{
		if(tmpElementoActual.id != menuName)
			tmpElementoActual.style.display="none";
	}	
	
	//Asignamos la referencia del nuevo menú que se va a mostrar
	tmpElementoActual=document.getElementById(menuName);
		
	//Mostramos el menú si todavia está escondido
	if(tmpElementoActual.style.display!="")
		tmpElementoActual.style.display="";
			
	//Limpiamos el timer
	window.clearTimeout(timer);
	timer=null;
}
function hideMenus_param(menuName)
{

	//Escondemos el menú actual
	timer=setTimeout("document.getElementById('"+menuName+"').style.display='none';",timeout);
}	
function noEsconder(){
	//Limpiamos el timer
	window.clearTimeout(timer);
	timer=null;
}
function hideMenus()
{
	//Escondemos el menú actual
	if(typeof(tmpElementoActual)!="undefined")
		timer=setTimeout("tmpElementoActual.style.display='none';",timeout);
}

document.onclick=function()
{
	if(typeof(tmpElementoActual)!="undefined")
	{
		tmpElementoActual.style.display='none';
	}
};

// JavaScript Document
function desplegar(id)
{
    if (document.getElementById(id).style.display=="none"){document.getElementById(id).style.display=""}
    else{document.getElementById(id).style.display="none"} 
}
function ocultar(id){
	document.getElementById(id).style.display="none";
}

function move_down() 
{
	scroll(0,document.body.scrollHeight);
} 
