function Foto(img){
  foto1= new Image();
  foto1.src=(img);
  Kontrolle(img);
}
function Kontrolle(img){
  if((foto1.width!=0)&&(foto1.height!=0)){
    viewFoto(img);
  }
  else{
    funktion="Kontrolle('"+img+"')";
    intervall=setTimeout(funktion,20);
  }
}
function viewFoto(img){
  weite=foto1.width+20;
  hoehe=foto1.height+20;
  string="width="+weite+",height="+hoehe;
  fenster=window.open(img,"",string);
}
/* http://www.webaid.de/js */