///////////////////////////////////////////////////////////////////////////
// nlsat_popup.js
///////////////////////////////////////////////////////////////////////////

function popupWindow (file, title)
{
  asc = ' abcdefghijklmnopqrstuvwxyz';
  
  ver = file.charCodeAt(6) - 96;
  hor = file.charCodeAt(7) - 96;

  newWin = window.open('','nlsat','scrollbars=no,resizable=no,toolbar=no,menubar=no,width=524,height=524');
  newWin.document.writeln('<HTML>');
  newWin.document.writeln('<HEAD><TITLE>' + title + '</TITLE></HEAD>');
  newWin.document.writeln('<BODY BGCOLOR="#EEEEEE" MARGINWIDTH="2" MARGINHEIGHT="2" LEFTMARGIN="2" TOPMARGIN="2">');
//newWin.document.writeln('<SCRIPT LANGUAGE="JavaScript" SRC="nlsat_scroll.js"></SCRIPT>');
  newWin.document.writeln('<SCRIPT LANGUAGE="JavaScript">');
  newWin.document.writeln('function scroll(h, v)');
  newWin.document.writeln('{');
  newWin.document.writeln('  asc = " abcdefghijklmnopqrstuvwxyz";');
  newWin.document.writeln('  img = document.images[12].src;');
  newWin.document.writeln('  ver = img.charCodeAt(img.length-6) - 96;');
  newWin.document.writeln('  ver = ver + v;');
  newWin.document.writeln('  if (ver < 2) ver = 2;');
  newWin.document.writeln('  if (ver > 13) ver = 13;');
  newWin.document.writeln('  hor = img.charCodeAt(img.length-5) - 96;');
  newWin.document.writeln('  hor = hor + h;');
  newWin.document.writeln('  if (hor < 2) hor = 2;');
  newWin.document.writeln('  if (hor > 11) hor = 11;');
  newWin.document.writeln('  if (((ver ==  1) || (ver ==  2)) && ((hor ==  1) || (hor ==  2))) area = "Noordzee";');
  newWin.document.writeln('  if (((ver ==  1) || (ver ==  2)) && ((hor ==  3) || (hor ==  4))) area = "Noordzee";');
  newWin.document.writeln('  if (((ver ==  1) || (ver ==  2)) && ((hor ==  5) || (hor ==  6))) area = "Waddenzee";');
  newWin.document.writeln('  if (((ver ==  1) || (ver ==  2)) && ((hor ==  7) || (hor ==  8))) area = "Waddenzee";');
  newWin.document.writeln('  if (((ver ==  1) || (ver ==  2)) && ((hor ==  9) || (hor == 10))) area = "Lauwersmeer";');
  newWin.document.writeln('  if (((ver ==  1) || (ver ==  2)) && ((hor == 11) || (hor == 12))) area = "Eems";');
  newWin.document.writeln('  if (((ver ==  3) || (ver ==  4)) && ((hor ==  1) || (hor ==  2))) area = "Noordzee";');
  newWin.document.writeln('  if (((ver ==  3) || (ver ==  4)) && ((hor ==  3) || (hor ==  4))) area = "Noordzee";');
  newWin.document.writeln('  if (((ver ==  3) || (ver ==  4)) && ((hor ==  5) || (hor ==  6))) area = "Afsluitdijk";');
  newWin.document.writeln('  if (((ver ==  3) || (ver ==  4)) && ((hor ==  7) || (hor ==  8))) area = "Friesland";');
  newWin.document.writeln('  if (((ver ==  3) || (ver ==  4)) && ((hor ==  9) || (hor == 10))) area = "Drente";');
  newWin.document.writeln('  if (((ver ==  3) || (ver ==  4)) && ((hor == 11) || (hor == 12))) area = "Groningen";');
  newWin.document.writeln('  if (((ver ==  5) || (ver ==  6)) && ((hor ==  1) || (hor ==  2))) area = "Noordzee";');
  newWin.document.writeln('  if (((ver ==  5) || (ver ==  6)) && ((hor ==  3) || (hor ==  4))) area = "Noordzee";');
  newWin.document.writeln('  if (((ver ==  5) || (ver ==  6)) && ((hor ==  5) || (hor ==  6))) area = "Noord-Holland";');
  newWin.document.writeln('  if (((ver ==  5) || (ver ==  6)) && ((hor ==  7) || (hor ==  8))) area = "Flevoland";');
  newWin.document.writeln('  if (((ver ==  5) || (ver ==  6)) && ((hor ==  9) || (hor == 10))) area = "Overijsel";');
  newWin.document.writeln('  if (((ver ==  5) || (ver ==  6)) && ((hor == 11) || (hor == 12))) area = "Bentheim";');
  newWin.document.writeln('  if (((ver ==  7) || (ver ==  8)) && ((hor ==  1) || (hor ==  2))) area = "Noordzee";');
  newWin.document.writeln('  if (((ver ==  7) || (ver ==  8)) && ((hor ==  3) || (hor ==  4))) area = "Zuid-Holland";');
  newWin.document.writeln('  if (((ver ==  7) || (ver ==  8)) && ((hor ==  5) || (hor ==  6))) area = "Utrecht";');
  newWin.document.writeln('  if (((ver ==  7) || (ver ==  8)) && ((hor ==  7) || (hor ==  8))) area = "Veluwe";');
  newWin.document.writeln('  if (((ver ==  7) || (ver ==  8)) && ((hor ==  9) || (hor == 10))) area = "Gelderland";');
  newWin.document.writeln('  if (((ver ==  7) || (ver ==  8)) && ((hor == 11) || (hor == 12))) area = "Twente";');
  newWin.document.writeln('  if (((ver ==  9) || (ver == 10)) && ((hor ==  1) || (hor ==  2))) area = "Deltawerken";');
  newWin.document.writeln('  if (((ver ==  9) || (ver == 10)) && ((hor ==  3) || (hor ==  4))) area = "Zeeland";');
  newWin.document.writeln('  if (((ver ==  9) || (ver == 10)) && ((hor ==  5) || (hor ==  6))) area = "Biesbosch";');
  newWin.document.writeln('  if (((ver ==  9) || (ver == 10)) && ((hor ==  7) || (hor ==  8))) area = "Noord-Brabant";');
  newWin.document.writeln('  if (((ver ==  9) || (ver == 10)) && ((hor ==  9) || (hor == 10))) area = "Achterhoek";');
  newWin.document.writeln('  if (((ver ==  9) || (ver == 10)) && ((hor == 11) || (hor == 12))) area = "Ruhrgebiet";');
  newWin.document.writeln('  if (((ver == 11) || (ver == 12)) && ((hor ==  1) || (hor ==  2))) area = "Zeeuws-Vlaanderen";');
  newWin.document.writeln('  if (((ver == 11) || (ver == 12)) && ((hor ==  3) || (hor ==  4))) area = "Schelde";');
  newWin.document.writeln('  if (((ver == 11) || (ver == 12)) && ((hor ==  5) || (hor ==  6))) area = "Antwerpen";');
  newWin.document.writeln('  if (((ver == 11) || (ver == 12)) && ((hor ==  7) || (hor ==  8))) area = "Noord-Brabant";');
  newWin.document.writeln('  if (((ver == 11) || (ver == 12)) && ((hor ==  9) || (hor == 10))) area = "Limburg";');
  newWin.document.writeln('  if (((ver == 11) || (ver == 12)) && ((hor == 11) || (hor == 12))) area = "Sauerland";');
  newWin.document.writeln('  if (((ver == 13) || (ver == 14)) && ((hor ==  1) || (hor ==  2))) area = "West-Vlaanderen";');
  newWin.document.writeln('  if (((ver == 13) || (ver == 14)) && ((hor ==  3) || (hor ==  4))) area = "Oost-Vlaanderen";');
  newWin.document.writeln('  if (((ver == 13) || (ver == 14)) && ((hor ==  5) || (hor ==  6))) area = "Brabant";');
  newWin.document.writeln('  if (((ver == 13) || (ver == 14)) && ((hor ==  7) || (hor ==  8))) area = "Limburg";');
  newWin.document.writeln('  if (((ver == 13) || (ver == 14)) && ((hor ==  9) || (hor == 10))) area = "Limburg";');
  newWin.document.writeln('  if (((ver == 13) || (ver == 14)) && ((hor == 11) || (hor == 12))) area = "Bergisches Land";');
  newWin.document.writeln('  for (j=-1; j<=1; j++)');
  newWin.document.writeln('  {');
  newWin.document.writeln('    row = asc.charAt(ver + j);');
  newWin.document.writeln('    for (i=-1; i<=1; i++)');
  newWin.document.writeln('    {');
  newWin.document.writeln('      col = asc.charAt(hor + i);');
	newWin.document.writeln('      file = "nlsat-";');
	newWin.document.writeln('      file = file + row;');
	newWin.document.writeln('      file = file + col;');
	newWin.document.writeln('      file = file + ".jpg";');
  newWin.document.writeln('      document.images[((j+2)*5)+(i+2)].src = file;');
  newWin.document.writeln('      document.images[((j+2)*5)+(i+2)].alt = area + " (click to close)";');
  newWin.document.writeln('    }');
  newWin.document.writeln('  }');
  newWin.document.writeln('  document.title = area;');
  newWin.document.writeln('  return;');
  newWin.document.writeln('}');
  newWin.document.writeln('</SCRIPT>');
  newWin.document.writeln('<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0>');
  newWin.document.writeln('<TR>');
  newWin.document.writeln('<TD ALIGN="CENTER" WIDTH="20" HEIGHT="20"><IMG SRC="arrow-nw.gif" WIDTH="20" HEIGHT="20" ALT="" ONCLICK="javascript:scroll(-1,-1);"></TD>');
  newWin.document.writeln('<TD ALIGN="CENTER" WIDTH="160" HEIGHT="20"><IMG SRC="trans.gif" WIDTH="160" HEIGHT="20" ALT=""></TD>');
  newWin.document.writeln('<TD ALIGN="CENTER" WIDTH="160" HEIGHT="20"><IMG SRC="arrow-n.gif" WIDTH="20" HEIGHT="20" ALT="" ONCLICK="javascript:scroll(0,-1);"></TD>');
  newWin.document.writeln('<TD ALIGN="CENTER" WIDTH="160" HEIGHT="20"><IMG SRC="trans.gif" WIDTH="160" HEIGHT="20" ALT=""></TD>');
  newWin.document.writeln('<TD ALIGN="CENTER" WIDTH="20" HEIGHT="20"><IMG SRC="arrow-ne.gif" WIDTH="20" HEIGHT="20" ALT="" ONCLICK="javascript:scroll(1,-1);"></TD>');
  newWin.document.writeln('</TR><TR>');
  newWin.document.writeln('<TD ALIGN="CENTER" WIDTH="20" HEIGHT="160"><IMG SRC="trans.gif" WIDTH="20" HEIGHT="160" ALT=""></TD>');
  row = asc.charAt(ver - 1);
  for (i=-1; i<=+1; i++)
  {
    col = asc.charAt(hor + i);
    file = 'nlsat-' + row + col + '.jpg';
    newWin.document.writeln('<TD ALIGN="CENTER" WIDTH="160" HEIGHT="160"><IMG SRC="' + file + '" WIDTH="160" HEIGHT="160" ALT="' + title + ' (click to close)" ONCLICK="javascript:window.parent.close();"></TD>');
  }
  newWin.document.writeln('<TD ALIGN="CENTER" WIDTH="20" HEIGHT="160"><IMG SRC="trans.gif" WIDTH="20" HEIGHT="160" ALT=""></TD>');
  newWin.document.writeln('</TR><TR>');
  newWin.document.writeln('<TD ALIGN="CENTER" WIDTH="20" HEIGHT="160"><IMG SRC="arrow-w.gif" WIDTH="20" HEIGHT="20" ALT="" ONCLICK="javascript:scroll(-1,0);"></TD>');
  row = asc.charAt(ver + 0);
  for (i=-1; i<=+1; i++)
  {
    col = asc.charAt(hor + i);
    file = 'nlsat-' + row + col + '.jpg';
    newWin.document.writeln('<TD ALIGN="CENTER" WIDTH="160" HEIGHT="160"><IMG SRC="' + file + '" WIDTH="160" HEIGHT="160" ALT="' + title + ' (click to close)" ONCLICK="javascript:window.parent.close();"></TD>');
  }
  newWin.document.writeln('<TD ALIGN="CENTER" WIDTH="20" HEIGHT="160"><IMG SRC="arrow-e.gif" WIDTH="20" HEIGHT="20" ALT="" ONCLICK="javascript:scroll(1,0);"></TD>');
  newWin.document.writeln('</TR><TR>');
  newWin.document.writeln('<TD ALIGN="CENTER" WIDTH="20" HEIGHT="160"><IMG SRC="trans.gif" WIDTH="20" HEIGHT="160" ALT=""></TD>');
  row = asc.charAt(ver + 1);
  for (i=-1; i<=+1; i++)
  {
    col = asc.charAt(hor + i);
    file = 'nlsat-' + row + col + '.jpg';
    newWin.document.writeln('<TD ALIGN="CENTER" WIDTH="160" HEIGHT="160"><IMG SRC="' + file + '" WIDTH="160" HEIGHT="160" ALT="' + title + ' (click to close)" ONCLICK="javascript:window.parent.close();"></TD>');
  }
  newWin.document.writeln('<TD ALIGN="CENTER" WIDTH="20" HEIGHT="160"><IMG SRC="trans.gif" WIDTH="20" HEIGHT="160" ALT=""></TD>');
  newWin.document.writeln('</TR><TR>');
  newWin.document.writeln('<TD ALIGN="CENTER" WIDTH="20" HEIGHT="20"><IMG SRC="arrow-sw.gif" WIDTH="20" HEIGHT="20" ALT="" ONCLICK="javascript:scroll(-1,1);"></TD>');
  newWin.document.writeln('<TD ALIGN="CENTER" WIDTH="160" HEIGHT="20"><IMG SRC="trans.gif" WIDTH="160" HEIGHT="20" ALT=""></TD>');
  newWin.document.writeln('<TD ALIGN="CENTER" WIDTH="160" HEIGHT="20"><IMG SRC="arrow-s.gif" WIDTH="20" HEIGHT="20" ALT="" ONCLICK="javascript:scroll(0,1);"></TD>');
  newWin.document.writeln('<TD ALIGN="CENTER" WIDTH="160" HEIGHT="20"><IMG SRC="trans.gif" WIDTH="160" HEIGHT="20" ALT=""></TD>');
  newWin.document.writeln('<TD ALIGN="CENTER" WIDTH="20" HEIGHT="20"><IMG SRC="arrow-se.gif" WIDTH="20" HEIGHT="20" ALT="" ONCLICK="javascript:scroll(1,1);"></TD>');
  newWin.document.writeln('</TR>');
  newWin.document.writeln('</TABLE>');
  newWin.document.writeln('</BODY>');
  newWin.document.writeln('</HTML>'); 
//newWin.document.images[4].src = file;
  newWin.document.close();
  newWin.focus();
  return;
}
