var ventana
var cont=0

function popupImagen(imagen,titulo)
{
	if(cont==1){ventana.close();cont=0;}
	ventana=window.open('','ventana','scrollbars=no,toolbar=no,location=no,directories=no,status=no,menubar=no,resizable=no')

	ventana.document.write('<html><head><title>'+titulo+'<\/title><\/head><body style="overflow:hidden; marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" scroll="no" onUnload="opener.cont=0"><center><img src="' + imagen + '" onLoad="opener.redimensionar(this.width,this.height)"><\/center><\/body><\/html>')
	ventana.document.close()
	cont++	
}

function redimensionar(ancho, alto)
{
	ventana.resizeTo(ancho+10,alto+32)
	ventana.moveTo((screen.width-ancho)/2,(screen.height-alto)/2)	
}


