popx=0;
function popImage(Grafik,Titel)
{
  if(typeof(Titel) == "undefined")
    Titel="Kinderkunstwerkstatt Baden-Baden";
    
  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=-1;                     // 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.write("<html><head><title>"+Titel+"</title></head>");
    popGrafik.document.write("<body style='margin:0px;padding:0px;' bgcolor='#61B1EC' text='#FFFFFF' link='#FFFFFF' vlink='#FFFFFF' marginheight='0' marginwidth='0' topmargin='0' leftmargin='0'>");
    popGrafik.document.write("<div style='padding:0px;position:absolute;top:0px;left:-1px;'><img name='Bild"+popx+"' src='"+Grafik+"' width='"+GrafikBreit+"' height='"+GrafikHoch+"' onClick='self.close();return false;'></div>");
    popGrafik.document.write("</body></html>");
    //  Ende Inhalt des Pop-Up
    
    popx ++;
    //  Ende Inhalt des Pop-Up
  }
  else{
    moment="groesse('"+Grafik+"', '"+Titel+"')";
    warten=setTimeout(moment,100);
  }
}
/*

// Set the horizontal and vertical position for the popup

PositionX = 100;
PositionY = 100;

// Set these value approximately 20 pixels greater than the
// size of the largest image to be used (needed for Netscape)

defaultWidth  = 500;
defaultHeight = 500;

// Set autoclose true to have the window close automatically
// Set autoclose false to allow multiple popup windows

var AutoClose = true;

// Do not edit below this line...
// ================================
if (parseInt(navigator.appVersion.charAt(0))>=4){
var isNN=(navigator.appName=="Netscape")?1:0;
var isIE=(navigator.appName.indexOf("Microsoft")!=-1)?1:0;}
var optNN='scrollbars=no,width='+defaultWidth+',height='+defaultHeight+',left='+PositionX+',top='+PositionY;
var optIE='scrollbars=no,width=150,height=100,left='+PositionX+',top='+PositionY;
function popImage(imageURL,imageTitle){
if (isNN){imgWin=window.open('about:blank','',optNN);}
if (isIE){imgWin=window.open('about:blank','',optIE);}
with (imgWin.document){
writeln('<html><head><title>Loading...</title><style>body{margin:0px;}</style>');writeln('<sc'+'ript>');
writeln('var isNN,isIE;');writeln('if (parseInt(navigator.appVersion.charAt(0))>=4){');
writeln('isNN=(navigator.appName=="Netscape")?1:0;');writeln('isIE=(navigator.appName.indexOf("Microsoft")!=-1)?1:0;}');
writeln('function reSizeToImage(){');writeln('if (isIE){');writeln('window.resizeTo(100,100);');
writeln('width=100-(document.body.clientWidth-document.images[0].width);');
writeln('height=100-(document.body.clientHeight-document.images[0].height);');
writeln('window.resizeTo(width,height);}');writeln('if (isNN){');       
writeln('window.innerWidth=document.images["George"].width;');writeln('window.innerHeight=document.images["George"].height;}}');
writeln('function doTitle(){document.title="'+imageTitle+'";}');writeln('</sc'+'ript>');
if (!AutoClose) writeln('</head><body bgcolor=000000 scroll="no" onload="reSizeToImage();doTitle();self.focus()">')
else writeln('</head><body bgcolor=000000 scroll="no" onload="reSizeToImage();doTitle();self.focus()" onblur="self.close()">');
writeln('<a href="javascript:self.close()"><img name="George" src='+imageURL+' border="0" style="display:block"></a></body></html>');
close();		
}}*/
