function pop(plaat, breedte, title, lang, copyright, caption) {
/**********************************************************************************
 * plaatje: naam van het plaatje
 * breedte: alleen opgeven als het een hoog resolutie plaatje betreft
 * title: titel van pagina
 * taal: 'nl' of 'en' voor de taalkeuze van de "sluit/close" en "print" links. 
 * copyright
 * caption: bijschrift bij plaatje
 **********************************************************************************/
  var breed = breedte;
  var titel = title;
  var taal = lang;
  
  var image = "<img src="+plaat+" name='plaatje' class='realimage' border=0 vspace=0 hspace=0>";
  if(breed != '')
    image = "<img src="+plaat+" name='plaatje' class='realimage' width="+breed+" border=0 vspace=0 hspace=0>";

   var bigpic = window.open('', 'picture_window',
'toolbar=0, location=0,directories=0, status=0,menubar=0,scrollbars=yes, resizable=1,copyhistory=0,width=500,height=600');
   bigpic.document.open();
   bigpic.document.write("<html>");
   bigpic.document.write("<head>");
   bigpic.document.write("<link rel=\"stylesheet\" href=\"/omi/incldstyle/omistylegroen.css\" type=\"text/css\">");
   bigpic.document.write("<META HTTP-EQUIV='imagetoolbar' CONTENT='no'>");
   bigpic.document.write("<script language='javaScript'>");
   bigpic.document.write("function realsize() {");
   bigpic.document.write("   var NS = (window.innerWidth)?true:false;");
   bigpic.document.write("   var pic = document.getElementById('picture');");
   bigpic.document.write("   var xsize = (NS)?window.innerWidth:document.body.clientWidth;");
   bigpic.document.write("   var ysize = (NS)?window.innerHeight:document.body.clientHeight;");
   var extrawidth = 40;
   var extraheight = 105;
   if (copyright != '' ) {extraheight += 30;}
   if (caption != '' ) {extraheight += 120;}
   // breedte van plaatje, maar tenminste 250 en maximaal 900
   // hoogte van plaatje , maar maximaal 750 
   bigpic.document.write("   var xsize = Math.min(Math.max(document.images.plaatje.width, 250), 900) - xsize + " + extrawidth + ";");
   bigpic.document.write("   var ysize = Math.min(document.images.plaatje.height, 750) - ysize + " + extraheight + ";");
   bigpic.document.write("   var torso = document.getElementById('torso');");
   bigpic.document.write("   window.resizeBy(xsize,ysize)\;");
   bigpic.document.write("   if (document.images.plaatje.width > 222) { pic.style.textAlign = 'left'; }");
   bigpic.document.write("   torso.style.width = ((NS)?window.innerWidth:document.body.clientWidth) - 28;");
   bigpic.document.write("}");
   bigpic.document.write("</script>");
   if(titel==''){
     if(taal=="nl")
       bigpic.document.write("<title> Plaatje </title>");
     else
       bigpic.document.write("<title> Picture </title>");
      
   }else {
     bigpic.document.write("<title>"+titel+"</title>");
   }
 
   bigpic.document.write("</head>");
   bigpic.document.write("<body onLoad='realsize(); window.focus();'>");

   bigpic.document.write("<div style='margin:14px; text-align: left;' id='torso'>");
   bigpic.document.write("      <a href='javascript:window.close();'><img src='/omi/incldstyle/images/venster_sluiten.gif' border=0 hspace=0 vspace=0></a>");
   if(taal=="nl")
     bigpic.document.write("      <a href='javascript:window.close();'>Sluit&nbsp;dit&nbsp;venster</a>");
   else
    bigpic.document.write("      <a href='javascript:window.close();'>Close&nbsp;this&nbsp;window</a>");
      bigpic.document.write("      <a href='javascript:this.print();'><img src='/omi/incldstyle/images/printertje.gif' border=0 hspace=0 vspace=0></a>");
   if(taal=="nl")
     bigpic.document.write("      <a href='javascript:this.print();'>Print&nbsp;dit&nbsp;venster</a>");
   else
     bigpic.document.write("      <a href='javascript:this.print();'>Print&nbsp;this&nbsp;window</a>");
   bigpic.document.write("  <p>");
   bigpic.document.write("  <div class=\"pic\">");
   bigpic.document.write(" "+image+" ");
   bigpic.document.write("  <div class=\"captionpop\">");
   bigpic.document.write("  "+caption+" ");
   bigpic.document.write("    </div><!--captionpop-->");
   bigpic.document.write("  </div><!--pic-->");

   if (copyright != '' ) {
      bigpic.document.write("  <div id=\"footer\">");
      bigpic.document.write("    <hr>");
      bigpic.document.write("    &#169; "+copyright+" ");
      bigpic.document.write("  </div><!--footer-->");
   }
   bigpic.document.write("</div><!--torso-->");
   bigpic.document.write("</body>");
   bigpic.document.write("</html>");
   bigpic.document.close();

   bigpic.focus();
}

