//recogemos la url de la foto
function Zoom(foto) {
	//creamos el objeto image
	var win= null;
	var imaxe = new Image;
	imaxe.src = foto;
	//si el ancho y el alto es distinto de cero es que ya está cargada
	if (imaxe.width!=0 && imaxe.height!=0){
		var h=imaxe.height+30;
		var w=imaxe.width;
		var winl = (screen.width-w)/2;
		var wint = (screen.height-h)/2;
		settings='height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars=no,fullscreen=no,toolbar=no,location=no,directories=no,status=no,menubar=auto,resizable=no';
		gfoto=foto;
		win=window.open("zoom.html?"+foto,"foto",settings);
		if(parseInt(navigator.appVersion) >= 4)	{win.window.focus();}
		imaxe=null
		w=null
		h=null
		winl=null
		wint=null
	}
	else{
		//esperamos 0.5 segundos y empezamos otra vez
		setTimeout("Zoom('"+foto+"')", 500)
	}
}

function Fvideo(video) {
	var w = (screen.width-240)/2;
	var h = (screen.height-150)/2;
	window.open("flash/" + video,"ventana1","width=240, height=150, top="+h+",left="+w+",scrollbars=no, menubar=no, location=no, resizable=no");
}