
function abrir_noticia(valor)
{
  window.open(valor,"NOTICIA","top=80,left=20,width=550,height=600,scrollbars=yes,resizable=no");
} 

function abrir_index(valor)
{
 window.open(valor,"Maria_Gloria_Giraldo_Portero",'width='+screen.width+',height='+screen.height+' ,resizable=yes ,top=0,left=0')
  //window.open(valor,"Maria_Gloria_Giraldo_Portero","top=80,left=20,width='+screen.width+',height=600,scrollbars=yes,resizable=no");
} 

function imageResize (imagen){
  //  var porcentaje = .5;
  	var maxAncho = 300 //define la anchura máxima de la imagen
	var maxAlto = 300 //define la altura máxima de la imagen
	var anchura;
	var altura;
	ancho=imagen.width;
	altura=imagen.height;
	
	porcientoAnchura = parseInt((maxAncho/ancho)*100)
		imagen.width = maxAncho
		imagen.height = (porcientoAnchura*altura)/100
   // imagen.width = imagen.width * porcentaje;
  }


var titulopordefecto = "Imagen"; //Si no se especifica un título al llamar a la función colocará el que se especifique aquí
var ventana;
var cont=0;
function afoto(cual,titulo)
{

if(cont==1){ventana.close();ventana=null}
if(titulo==null){titulo=titulopordefecto}
ventana=window.open('','ventana','top=-100,left=-200,width=80,height=80,resizable=yes,scrollbars=yes')
ventana.document.write('<html><head><title>' + titulo + '</title></head><body style="overflow-x:hidden" marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" onUnload="opener.cont=0"><img src="' + cual + '" onLoad="opener.redimensionar(this.width, this.height)">');
ventana.document.close();
cont++;
}

function redimensionar(ancho, alto)
{
ventana.resizeTo(ancho+30,alto+40);
//ventana.moveTo((screen.width-ancho)/2,(screen.height-alto)/2); //centra la ventana. Eliminar si no se quiere centrar el popup
}

