var s_wanneer = new Array();
var s_wie     = new Array();
var s_waar    = new Array();
var s_wat     = new Array();
var s_status  = new Array();
var s_web     = new Array();
var style;
var endstyle;
var i         = 0;

function vul_lijst_item( wanneer, wie, waar, wat, status, web )
{
  s_wanneer[i]	= wanneer;
  s_wie[i]	= wie;
  s_waar[i]	= waar;
  s_wat[i]	= wat;
  s_status[i]	= status;
  s_web[i]	= web;
  i++;
}
 
function toon_speellijst()
{
  document.write (
    "<table width=100% cellspacing=0 cellpadding=1 border=1 bordercolor=rgb(150,150,150)>" +
    "");

  for( idx = 0; idx < s_wanneer.length; idx++)
  {
    if ( s_wanneer[idx] == "speellijst tot nu toe" )
    {
      document.write (
        "  <tr><td colspan=4 class='speellijst'>&nbsp;<br>&nbsp;<br>&nbsp;</td></tr>" +
        "");
    }

    if ( s_wie[idx] == "maandnaam" )
    {
      if ( idx > 0 && s_wanneer[idx] != "speellijst tot nu toe" )
      {
        document.write (
          "  <tr><td colspan=4 class='speellijst'>&nbsp;</td></tr>" +
          "");
      }

      document.write (
        "  <tr><td colspan=4 class='speellijst' bgcolor=987fca align=center><b>" + s_wanneer[idx] + "</b></td></tr>" +
        "");
      continue;
    }

    style = "";
    endstyle = "";
    if ( s_status[idx] != "boeking" )
    {
      style = "<i>";
      endstyle = "</i>";
    }

    if ( s_web[idx] != "" && s_web[idx] != null )
    {
      s_wat[idx] = "<a href='http://" + s_web[idx] + "' target=_blank>" + s_wat[idx] + "</a>";
    }

    if ( s_waar[idx] == "" || s_waar[idx] == null )
    {
      s_waar[idx] = "&nbsp;";
    }

    if ( s_wat[idx] == "" || s_wat[idx] == null )
    {
      s_wat[idx] = "&nbsp;";
    }

    document.write (
      "  <tr>" +
      "    <td class='speellijst'>" + style + s_wanneer[idx] + endstyle + "</td>" +
      "    <td class='speellijst'>" + style + s_wie[idx]     + endstyle + "</td>" +
      "    <td class='speellijst'>" + style + s_waar[idx]    + endstyle + "</td>" +
      "    <td class='speellijst'>" + style + s_wat[idx]     + endstyle + "</td>" +
      "  </tr>" +
      "");
  }

  document.write (
    "</table>" +
    "");

}
