var presentacion = 	'000';				//id del div que esta por defecto
var informeActual = presentacion;		//id del elemento seleccionado en el menu


function mostrar(idInforme)
{
	
	$('inf'+informeActual).style.display = 	'none';
	
	if(informeActual !== presentacion) 
	{
		// desmarcar opcion seleccionada anteriormente
		$('lst'+informeActual).className = 	' top';
		tratarTodo($$('#lst'+informeActual+'>div'), 'none');	

	}
		
	$('borde_textos').style.display = 		'block';
	$('inf'+idInforme).style.display = 		'block';

	if(idInforme !== presentacion)
	{
		// marcar opcion seleccionada
		$('lst'+idInforme).addClassName('selected');
		tratarTodo($$('#lst'+idInforme+'>div'), 'block');
	}
	
//alert("informeActual "+informeActual+ "\n presentacion: " + presentacion + "\n idInforme: " + idInforme);
	
	informeActual = idInforme;
	return false;
}

function tratarTodo(aValores, accion)
{
	//alert(print_r(aValores));
	
	if(aValores[0] !== undefined)
	{
		var total = aValores.length;

//alert(total);

		for(i=0; i<total; i++)
		{	
			if(aValores[i] !== undefined) 
			{ aValores[i].style.display = accion; }
		}
		
	//	alert(aValores[0]);
	}
	else
	{
	//	alert("no hay aValores[0]" + aValores[0]);
	}
}




function print_r(theObj){
if(theObj.constructor == Array ||
theObj.constructor == Object){
("<ul>")
for(var p in theObj){
if(theObj[p].constructor == Array||
theObj[p].constructor == Object){
("<li>["+p+"] => "+typeof(theObj)+"</li>");
("<ul>")
print_r(theObj[p]);
("</ul>")
} else {
("<li>["+p+"] => "+theObj[p]+"</li>");
}
}
("</ul>")
}
}

