// JavaScript Document

//*******************POPUP DE NOTICIAS******************************
function openWindow(pgn, parametros, ancho, alto, scrollbars, resizable) {
	derecha=(screen.width-ancho)/2;
	arriba=(screen.height-alto)/2;
	
	if(resizable==true)
		resizable = 1;
	else
		resizable = 0;
		
	if(scrollbars==true)
		scrollbars = 1;
	else
		scrollbars = 0;
	
	string="toolbar=0,scrollbars="+scrollbars+",location=0,statusbar=0,menubar=0,resizable="+resizable+",width="+ancho+",height="+alto+",left="+derecha+",top="+arriba+"";
		
	fin=window.open(pgn+'?'+parametros,"ventana", string);
}

//**************************************************



function enviar(msg, pag, par) { 
var x = pag +'?'+ par;
if (confirm(msg)== true)  {
window.location = x;
}
}



function dimensionar(ancho, alto, centro) {
	if(centro==true) {
		derecha=(screen.width-ancho)/2;
		arriba=(screen.height-alto)/2;
		window.moveTo(derecha,arriba);
	}
	
	window.resizeTo(ancho,alto);
}

//Al hacer click en una opcion del combo mostrar un cuadro de texto
function mostrar(){
val=	document.all.tipo.value;

	if (val == 'distrital'){
	document.getElementById('capa1').style.display = 'block';
	document.getElementById('capa2').style.display = 'block';
	}else{
		if (val == 'nacional'){
			document.getElementById('capa1').style.display = 'none';	
			document.getElementById('capa2').style.display = 'none';
	}
	}
}


//------------------recursos desde el administrador-----------------

function mostrarCarpeta(){
var1=	document.all.tipo[0].checked;
var2=	document.all.tipo[1].checked;
var3=	document.all.tipo[2].checked;
//alert(var1+'-'+ var2 +'-'+var3);

	if (var1){// archivos
	document.getElementById('archivos').style.display = 'block';
	document.getElementById('audios').style.display = 'none';
	document.getElementById('videos').style.display = 'none';
	}
	
	if (var2){// videos
	document.getElementById('videos').style.display = 'block';
	document.getElementById('audios').style.display = 'none';
	document.getElementById('archivos').style.display = 'none';
	}
	
	if (var3){// audios
	document.getElementById('audios').style.display = 'block';
	document.getElementById('videos').style.display = 'none';
	document.getElementById('archivos').style.display = 'none';
	}	
	
}



function ver(){
alert("algo");	
}