//Definición de Funciones JavaScript

/* FUNCIÓN ABRIRPOPUP
Abre un popup de un tamaño especificado.
*/

function abrirFoto(Foto, Ancho, Alto){
if(Ancho <= 280){Ancho = 306;}else{Ancho += 20;}
if(Alto <= 80){Alto = 150;}else{Alto += 95;}

var features = "height="+ Alto +",width="+ Ancho +",status=no,toolbar=no,menubar=no,location=no";
var direccion = "popup.php?foto=" + Foto;
var IDVentana = Math.round((Math.random( )*1000));
window.open(direccion, IDVentana, features);
}