// JavaScript Document

function desplegar(id,objeto){
	var menu = get_e("submenu"+id);	
	var enlace = get_e("enlace"+id);
	
	if(menu){ mostrar(menu); marcar_enlace(enlace, "selec"); }
	
}

function plegar(id,objeto){
	var menu = get_e("submenu"+id);	
	var enlace = get_e("enlace"+id);
	if(menu){ ocultar(menu); marcar_enlace(enlace,"");  }
	
}


function marcar_enlace(objeto,clase_css){
	if(objeto){ objeto.className = clase_css; }
	
}

function mostrar(objeto){
	if(objeto){
		objeto.style.zIndex ="10000";
		objeto.style.display ="block";
		objeto.style.visibility ="visible";
		
		
	}
}
function ocultar(objeto){
	if(objeto){
		objeto.style.zIndex ="1";
		objeto.style.display ="none";
		objeto.style.visibility ="hidden";	
		
		
	}
}
function get_e(id){
	var objeto = document.getElementById(id);
	if(objeto){
		return objeto;	
	}else{
		return false;	
	}
}


function show(id_css){
	var objeto = get_e(id_css);	if(objeto){
		objeto.style.zIndex ="10000";
		objeto.style.display ="block";
		objeto.style.visibility ="visible";	
	}
	return false;
}

function hide(id_css){
	var objeto = get_e(id_css);
	if(objeto){
		objeto.style.zIndex ="1";
		objeto.style.display ="none";
		objeto.style.visibility ="hidden";	
	}
	return false;
}