<!--

function showFoto(img) {
   foto1 = new Image();
   foto1.src = (img);
   Controll(img);
}

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

function viewFoto(img) {

  largh = foto1.width;
  altez = foto1.height;

  winl = (screen.width - largh) / 2;
  wint = (screen.height - altez) / 2;

  stringa='width='+largh+', height='+altez+', top='+wint+', left='+winl;  
  var winNew = window.open("","",stringa);
  winNew.document.write('<body bottomMargin=0 leftMargin=0 topMargin=0 rightMargin=0>');
  winNew.document.write("<a href='#' onclick='window.close();'><img alt='Close window' border='0' src='" + img + "'></a>");  
  
}

//-->


