popx=0;
function popImage(Grafik,Titel) {
if(typeof(Titel) == "undefined")
  Titel="ORBAU";
  
bild= new Image();
bild.src=(Grafik);
groesse(Grafik, Titel);
}
function groesse(Grafik,Titel){
if((bild.width!=0)&&(bild.height!=0)){
GrafikBreit=bild.width;
GrafikHoch=bild.height;

AusgleichBreit=0;                     // Fenster breiter als Grafik
AusgleichHoch=0;                     // Fenster hoeher als Grafik
FensterBreit=GrafikBreit+AusgleichBreit;
FensterHoch=GrafikHoch+AusgleichHoch;
PositionX=((screen.availWidth/2)-(FensterBreit/2));    // Anzeigeposition von links
PositionY=((screen.availHeight/2)-(FensterHoch/2));    // Anzeigeposition von oben

// nachfolgend die Eigenschaften des Pop-Up
popGrafik=window.open("",popx,"toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,fullscreen=0,width="+FensterBreit+",height="+FensterHoch+",top="+PositionY+",left="+PositionX);

//  Anfang Inhalt des Pop-Up
popGrafik.document.writeln("<html><head><title>"+Titel+"</title></head>");
popGrafik.document.writeln("<body bgcolor='#61B1EC' text='#FFFFFF' link='#FFFFFF' vlink='#FFFFFF' marginheight='0' marginwidth='0' topmargin='0' leftmargin='0'>");
popGrafik.document.writeln("<center><a href='#' onClick='self.close();return false;'><img name='Bild"+popx+"' src='"+Grafik+"' width='"+GrafikBreit+"' height='"+GrafikHoch+"'></a>");
popGrafik.document.writeln("</body></html>");
//  Ende Inhalt des Pop-Up

popx ++;
//  Ende Inhalt des Pop-Up

}
else{
moment="groesse('"+Grafik+"', '"+Titel+"')";
warten=setTimeout(moment,100);
}
}
