// JavaScript Document
// popup für Bilder, Fenster automatisch an Bildgrösse angepasst

function showLargePic(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){
	largeur=800;
	hauteur=450;
	var left=(screen.width-largeur)/2;
	var top=(screen.height-hauteur)/2;
  	largh=foto1.width+10;
  	altez=foto1.height+35;
  	stringa="width="+largh+",height="+altez+",resizable=yes,left="+left+",top="+top+"";
	Bildfenster=window.open(img,"",stringa);
}


