/*
 * Javascripts om plaatjes mee te openen in een popup
 */
 
PositionX = 100;
PositionY = 100;

defaultWidth  = 500;
defaultHeight = 500;

var AutoClose = true;

function popImage(imageURL,imageTitle){
  plaatje = new Image();
  plaatje.src = imageURL;
  
  w = plaatje.width; h = plaatje.height;

  if ( w < 100 )
  	w = 100

  if ( h < 100 )
  	h = 100;
  	
  var opties='scrollbars=no,width=' + w + ',height=' + h + ',left=' + PositionX + ',top='+PositionY;
	
  imgWin = window.open('empty.html','',opties);
  imgWin.document.write( '<html><head><title>' + imageTitle + '</title><style>body{margin:0px;}</style></head>' );

    if (!AutoClose) 
      imgWin.document.write('<body bgcolor=000000 scroll="no" onload="pic = document.getElementById( \'plaatje\' ); self.resizeTo( pic.width, pic.height + 20 );">')
    else
      imgWin.document.write('<body bgcolor=EDECE9 scroll="no" onload="pic = document.getElementById( \'plaatje\' ); self.resizeTo( pic.width, pic.height + 20 );" onblur="self.close()">');
  
    imgWin.document.write('<img id="plaatje" src="'+imageURL+'"></body></html>');
    imgWin.document.close();		

}

