//                                      0                        1                        2                          3                             4                           5                          6                            7                         8                           9                        10                        11                        12
Pictures = new Array("Excelsior_Groot.jpg", "Bestuur_Ben_Groot.jpg", "                     ", "                       ", "                          ", "                        ", "                       ", "                         ", "                      ", "                        ", "Koor_Podium1_Groot.jpg", "Koor_Podium2_Groot.jpg", "Koor_Prijzen_Groot.jpg");
HSizes   = new Array(                1063 ,                    725 ,                    732 ,                      723 ,                         710 ,                       688 ,                      712 ,                        712 ,                       0 ,                       703 ,                    1600 ,                    1600 ,                    1600 );
VSizes   = new Array(                 486 ,                   1063 ,                   1134 ,                     1063 ,                        1063 ,                      1063 ,                     1063 ,                       1063 ,                       0 ,                      1063 ,                    1200 ,                    1200 ,                    1200 );

var fullwin=null;

function OpenImage(Album, Nummer) 
{
  var m_width       = 20;
  var m_height      = 40;
  if (Album == 1)                                                            // Verzamel album
  {
    var url        = "Images/" + Pictures[Nummer];                           // Plaats afbeelding op server
    var img_width  = HSizes[Nummer];                                         // Breedte afbeelding
    var img_height = VSizes[Nummer];                                         // Hoogte afbeelding
  }
  if (Album == 2)                                                            // Kerst album
  {
    var url        = "Images/Album_Kerst/Kerst" + Nummer + "_Groot.jpg";     // Plaats afbeelding op server
    var img_width  = 1600;                                                   // Breedte afbeelding
    var img_height = 1061;                                                   // Hoogte afbeelding
  }
  if (Album == 3)                                                            // 2005 Putter Eng album
  {
    var url        = "Images/Album_2005/PutterEng" + Nummer + "_Groot.jpg";  // Plaats afbeelding op server
    if (Nummer == 2)
    {
      var img_width  = 1200;                                                 // Breedte afbeelding
      var img_height = 1600;                                                 // Hoogte afbeelding
    }
    else
    {
      var img_width  = 1600;                                                 // Breedte afbeelding
      var img_height = 1200;                                                 // Hoogte afbeelding
    }
  }
  if (Album == 4)                                                            // 2006 Wokken album
  {
    var url        = "Images/Album_2006/Wok" + Nummer + "_Groot.jpg";        // Plaats afbeelding op server
    var img_width  = 1600;                                                   // Breedte afbeelding
    var img_height = 1200;                                                   // Hoogte afbeelding
  }
  if (Album == 5)                                                            // 2007 jubileum concert album
  {
    var url        = "Images/Album_85Jaar/Jubileum" + Nummer + "_Groot.jpg"; // Plaats afbeelding op server
    if ((Nummer == 2) || (Nummer == 10) || (Nummer == 16) || (Nummer == 17))
    {
      var img_width  = 1024;                                                 // Breedte afbeelding
      var img_height = 1600;                                                 // Hoogte afbeelding
    }
    else
    {
      var img_width  = 1600;                                                 // Breedte afbeelding
      var img_height = 1024;                                                 // Hoogte afbeelding
    }
  }
  if (Album == 6)                                                            // 2008 jaarlijks concert album
  {
    var url        = "Images/Album_2008April/Concert" + Nummer + "_Groot.jpg"; // Plaats afbeelding op server
    if (Nummer == 1)
    {
      var img_width  = 1071;                                                 // Breedte afbeelding
      var img_height = 1600;                                                 // Hoogte afbeelding
    }
    else
    {
      if ((Nummer == 14) || (Nummer == 16))
      {
        var img_width  = 1200;                                               // Breedte afbeelding
        var img_height = 1600;                                               // Hoogte afbeelding
      }
      else
      {
        if (Nummer < 19)
        {
          var img_width  = 1600;                                             // Breedte afbeelding
          var img_height = 1200;                                             // Hoogte afbeelding
        }
        else
        {
          var img_width  = 1600;                                             // Breedte afbeelding
          var img_height = 1071;                                             // Hoogte afbeelding
        }
      }
    }
  }
  if (Album == 7)                                                            // 2005 Putter Eng album
  {
    var url        = "Images/Album_2008/Wok2008-" + Nummer + "_Groot.jpg";  // Plaats afbeelding op server
    if (Nummer == 27)
    {
      var img_width  = 1200;                                                 // Breedte afbeelding
      var img_height = 1600;                                                 // Hoogte afbeelding
    }
    else
    {
      var img_width  = 1600;                                                 // Breedte afbeelding
      var img_height = 1200;                                                 // Hoogte afbeelding
    }
  }
  if (Album == 8)                                                            // 2005 Putter Eng album
  {
    var url        = "Images/Album_2009/Thorn" + Nummer + "_Groot.jpg";  // Plaats afbeelding op server
    if (Nummer == 12)
    {
      var img_width  = 2035;                                                 // Breedte afbeelding
      var img_height = 895;                                                 // Hoogte afbeelding
    }
    else
    {
      var img_width  = 1600;                                                 // Breedte afbeelding
      var img_height = 1200;                                                 // Hoogte afbeelding
    }
  }

  var scr_width     = img_width + m_width;                                   // Breedte afbeelding + witmarge
  var scr_height    = img_height + m_height;                                 // Hoogte afbeelding + witmarge
  var screen_width  = screen.width - 40;                                     // Breedte scherm - marge
  var screen_height = screen.height - 110;                                   // Hoogte scherm - marge (taakbalk!)

  // Popups niet groter maken als het scherm
  if (scr_height > screen_height)
  {
    img_width  = (img_width * (screen_height / scr_height));
    scr_width  = img_width + m_width;
    scr_height = screen_height;
    img_height = screen_height - m_height;
  }
  if (scr_width > screen_width)
  {
    img_height = (img_height * (screen_width / scr_width));
    scr_height = img_height + m_height;
    scr_width  = screen_width;
    img_width  = screen_width - m_width;
  }

  var scr_left = (screen.width  - scr_width)  / 2;
  var scr_top  = ((screen.height - scr_height) / 2) - 20;
  var param = "menubar = no, toolbar = no, directories = no, location = no, status = no, scrollbars = no, resizable = no, width = " + scr_width + ", height = " + scr_height + ", left = " + scr_left + ", top = " + scr_top;

  if (fullwin && !fullwin.closed)
  {
    fullwin.close();
  }

  fullwin = window.open("", "GroteFoto", param);
  setTimeout("writeToWindow()", 50);
  fullwin.document.write('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">');
  fullwin.document.write('<html xmlns="http://www.w3.org/1999/xhtml">');
  fullwin.document.write('<head>');
  fullwin.document.write('<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" \/>');
  fullwin.document.write('<title>Christelijke Gemengde Zangvereniging "Excelsior" te Nijkerk - Foto<\/title>');
  fullwin.document.write('<style type="text/css">');
  fullwin.document.write('<!--');
  fullwin.document.write('body {');
  fullwin.document.write('	font-family: Verdana, Arial, Helvetica, sans-serif;');
  fullwin.document.write('	background-image: url(Images/Achtergrond.gif);');
  fullwin.document.write('	color: #000066;');
  fullwin.document.write('	font-weight: normal;');
  fullwin.document.write('}');
  fullwin.document.write('.SchuinKlein {');
  fullwin.document.write('	font-size: small;');
  fullwin.document.write('	font-style: italic;');
  fullwin.document.write('}');
  fullwin.document.write('-->');
  fullwin.document.write('<\/style>');
  fullwin.document.write('<\/head>');

  fullwin.document.write('<body>');
  fullwin.document.write('<div align="center"><span class="SchuinKlein"><a href="javascript: window.close()"><img src=" '+url+' " width=" '+img_width+' " height=" '+img_height+' " border=no alt="klik om het venster te sluiten" \/><\/a><br \/>');
  fullwin.document.write('<a href="javascript: window.close()">Sluit dit venster<\/a><\/span><\/div>');

  fullwin.document.write('<\/body><\/html>');
  fullwin.document.close();

  // href loading voorkomen
  return false;
}
