function ampliarFoto(img){ 

foto1 = new Image();
foto1.src=(img);
Controlla(img);
}


function Controlla(img){

if((foto1.width!=0)&&(foto1.height!=0)){ 
viewFoto(img);
} else {
funzione="Controlla('"+img+"')";
intervallo=setTimeout(funzione,20);
}
}


function viewFoto(img){
largh=foto1.width+20;
altez=foto1.height+20;
stringa="width="+largh+",height="+altez;
finestra=window.open(img,"",stringa);
}





function ampliar_imagen(imagen,ancho,alto) {
	w_amp=window.open('','','width='+ancho+', height='+alto);
	w_amp.document.write('<html><body leftmargin="0" topmargin="0" marginheight="0" marginwidth="0"><img src="'+imagen+'"></body></html>');
	if (window.focus) {w_amp.focus()}
}
function ventanaSecundaria (URL){ 
window.open(URL,"ventana1","location=no,menubar=yes,status=yes,toolbar=yes,Scrollbars=yes,width=1024,height=768") 
} 
function mueveReloj(){

    momentoActual = new Date()
    hora = momentoActual.getHours()
    minuto = momentoActual.getMinutes()
    segundo = momentoActual.getSeconds()

		if (segundo<10)segundo="0"+segundo;
    horaImprimible = hora + ":" + minuto + ":" + segundo;

    document.getElementById('reloj').innerHTML = horaImprimible;

    setTimeout("mueveReloj()",1000);
}

function abrir_ventana (url,nombre,parametros) {
	window.open (url,nombre,parametros);
}


function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

