function Foto(img){
  foto1= new Image();
  foto1.src=(img);
  Controlla(img);
	return false;
}
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+12;
  altez=foto1.height+12;
  extras="";
  if (altez>600)
  {
	  altez=600;extras=", scrollbars=no";
  }
  stringa="width="+largh+",height="+altez+extras;
  finestra=window.open(img,"",stringa);
with(finestra.document) {
open();
write('<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><html><head><title>Parviflora</title><meta http-equiv="content-type" content="text/html; charset=iso-8859-2"></head><body style="margin:0px;"  onselectstart="return false" ondragstart="return false" oncontextmenu="return false"><table width="100%" height="100%" ><tr><td align="center" height="100%"><img src="'+img+'"   onclick="window.close();" style="cursor:pointer;" /></td></tr></table></body></html>');
close();
}
}


   function openWindow(dest, param) {
    Win = window.open(dest,'NoweOkno',param); Win.focus();
   }

