/**
 * Manejo de JS
 */

DOCUMENTOS=
{
	mas : function(nro,list)
		{
			document.getElementById(list+'mas_'+nro).style.display='none';
			document.getElementById(list+'up_'+nro).style.display='block';
//			document.getElementById(list+'pdf_'+nro).style.display='block';
			document.getElementById(list+'cuerpo_'+nro).style.display='block';
		},
	up : function(nro,list)
		{
			document.getElementById(list+'mas_'+nro).style.display='block';
			document.getElementById(list+'up_'+nro).style.display='none';
//			document.getElementById(list+'pdf_'+nro).style.display='none';
			document.getElementById(list+'cuerpo_'+nro).style.display='none';
		},
	getFile : function(id)
		{
			document.location=AJAX.llamador+"?APP=documentos:op&API=getFile&id="+id;
		},
	getTema : function(id)
		{
			if(document.getElementById("pagina")!=null)
			{
				this.showCargando()
				AJAX.loadApiCallback("DOCUMENTOS.muestraResultados","documentos:op","getTema","&id="+id);
			}
		},
	muestraResultados : function(req)
		{
			document.getElementById("pagina").innerHTML=req.responseText;
			this.hideCargando();
		},
	//-------------------------------------------------------
	// Manejo del Cargando
	//-------------------------------------------------------
	showCargando : function()
		{
			document.getElementById("pagina").style.display="none";
			document.getElementById("documentos_cargando").style.display="block";
		},
	hideCargando : function()
		{
			document.getElementById("pagina").style.display="block";
			document.getElementById("documentos_cargando").style.display="none";
		}
}

//alert("Documentos!");