
<!--

var saElementIdsOfCategorySelects;


function fillSubCategoryPulldown(sElementId) {
  // declaration of variables
  var chel;       // the child select element to update
  var iLevel;     // the level in the tree which is the element that has been changed by the user and will be the parent element

  // determine the level in the tree that sElementId specifies
  iLevel = -1;
  if (sElementId) {
    iLevel = 0;
    while (iLevel < saElementIdsOfCategorySelects.length) {
      if (saElementIdsOfCategorySelects[iLevel] == sElementId) break;
      iLevel++;
    }
  }


    // fill the element and the elements below it (case ParentLevel: fill child)
    switch (iLevel) {
      case -1:
        chel = document.getElementById(saElementIdsOfCategorySelects[iLevel + 1]);
        chel.options.length = 0;
  
          chel.options[chel.options.length] = new Option('Keuze 1: doelgroep', '_not_specified');
  
          chel.options[chel.options.length] = new Option('Alle doelgroepen', '');
  
          chel.options[chel.options.length] = new Option('Kinderen', '1277');
  
          chel.options[chel.options.length] = new Option('Volwassenen', '1276');
  
          chel.options[chel.options.length] = new Option('Ouderen', '1278');
  
        chel.selectedIndex = 0;
        iLevel++;

  
            case 0:
              chel = document.getElementById(saElementIdsOfCategorySelects[iLevel + 1]);
              chel.options.length = 0;
  
    switch (document.getElementById(saElementIdsOfCategorySelects[0]).options[document.getElementById(saElementIdsOfCategorySelects[0]).selectedIndex].value) {

        case '_not_specified':

      chel.options[chel.options.length] = new Option('Keuze 2: dienst', '_not_specified');

          break;

        case '':

      chel.options[chel.options.length] = new Option('Keuze 2: dienst', '_not_specified');

      chel.options[chel.options.length] = new Option('Alle dienstverleningen', '');

      chel.options[chel.options.length] = new Option('Arbeid', '1654');

      chel.options[chel.options.length] = new Option('Dagbesteding', '1281');

      chel.options[chel.options.length] = new Option('Ondersteuning thuis', '1280');

      chel.options[chel.options.length] = new Option('Vrijetijdsbesteding', '1306');

      chel.options[chel.options.length] = new Option('Wonen', '1282');

          break;

        case '1277':

      chel.options[chel.options.length] = new Option('Keuze 2: dienst', '_not_specified');

      chel.options[chel.options.length] = new Option('Alle dienstverleningen', '');

      chel.options[chel.options.length] = new Option('Dagbesteding', '1281');

      chel.options[chel.options.length] = new Option('Ondersteuning thuis', '1280');

      chel.options[chel.options.length] = new Option('Vrijetijdsbesteding', '1306');

      chel.options[chel.options.length] = new Option('Wonen', '1282');

          break;

        case '1276':

      chel.options[chel.options.length] = new Option('Keuze 2: dienst', '_not_specified');

      chel.options[chel.options.length] = new Option('Alle dienstverleningen', '');

      chel.options[chel.options.length] = new Option('Arbeid', '1654');

      chel.options[chel.options.length] = new Option('Dagbesteding', '1281');

      chel.options[chel.options.length] = new Option('Ondersteuning thuis', '1280');

      chel.options[chel.options.length] = new Option('Vrijetijdsbesteding', '1306');

      chel.options[chel.options.length] = new Option('Wonen', '1282');

          break;

        case '1278':

      chel.options[chel.options.length] = new Option('Keuze 2: dienst', '_not_specified');

      chel.options[chel.options.length] = new Option('Alle dienstverleningen', '');

      chel.options[chel.options.length] = new Option('Dagbesteding', '1281');

      chel.options[chel.options.length] = new Option('Ondersteuning thuis', '1280');

      chel.options[chel.options.length] = new Option('Vrijetijdsbesteding', '1306');

      chel.options[chel.options.length] = new Option('Wonen', '1282');

          break;

    }

              chel.selectedIndex = 0;
              iLevel++;
  
            case 1:
              chel = document.getElementById(saElementIdsOfCategorySelects[iLevel + 1]);
              chel.options.length = 0;
  
    switch (document.getElementById(saElementIdsOfCategorySelects[0]).options[document.getElementById(saElementIdsOfCategorySelects[0]).selectedIndex].value) {

        case '_not_specified':

    switch (document.getElementById(saElementIdsOfCategorySelects[1]).options[document.getElementById(saElementIdsOfCategorySelects[1]).selectedIndex].value) {

        case '_not_specified':

      chel.options[chel.options.length] = new Option('Keuze 3: plaats', '_not_specified');

          break;

    }

          break;

        case '':

    switch (document.getElementById(saElementIdsOfCategorySelects[1]).options[document.getElementById(saElementIdsOfCategorySelects[1]).selectedIndex].value) {

        case '_not_specified':

      chel.options[chel.options.length] = new Option('Keuze 3: plaats', '_not_specified');

          break;

        case '':

      chel.options[chel.options.length] = new Option('Keuze 3: plaats', '');

      chel.options[chel.options.length] = new Option('Alle plaatsen', '');

      chel.options[chel.options.length] = new Option('Achterveld', '1284');

      chel.options[chel.options.length] = new Option('Amersfoort', '1285');

      chel.options[chel.options.length] = new Option('Baarn', '1286');

      chel.options[chel.options.length] = new Option('Breukelen', '1457');

      chel.options[chel.options.length] = new Option('Bussum', '1300');

      chel.options[chel.options.length] = new Option('De Meern', '1302');

      chel.options[chel.options.length] = new Option('Eemnes', '1490');

      chel.options[chel.options.length] = new Option('Hilversum', '1301');

      chel.options[chel.options.length] = new Option('Laren', '1497');

      chel.options[chel.options.length] = new Option('Maarsen', '1304');

      chel.options[chel.options.length] = new Option('Maarsenbroek', '1623');

      chel.options[chel.options.length] = new Option('Soest', '1287');

      chel.options[chel.options.length] = new Option('Utrecht', '1289');

      chel.options[chel.options.length] = new Option('Vinkeveen', '1299');

      chel.options[chel.options.length] = new Option('Vleuten', '1303');

      chel.options[chel.options.length] = new Option('Woerden', '1290');

      chel.options[chel.options.length] = new Option('Zeist', '1291');

          break;

        case '1654':

      chel.options[chel.options.length] = new Option('Klik op Zoek', '');

          break;

        case '1281':

      chel.options[chel.options.length] = new Option('Keuze 3: plaats', '');

      chel.options[chel.options.length] = new Option('Alle plaatsen', '');

      chel.options[chel.options.length] = new Option('Amersfoort', '1285');

      chel.options[chel.options.length] = new Option('Baarn', '1286');

      chel.options[chel.options.length] = new Option('Soest', '1287');

      chel.options[chel.options.length] = new Option('Vinkeveen', '1299');

          break;

        case '1280':

      chel.options[chel.options.length] = new Option('Keuze 3: plaats', '');

      chel.options[chel.options.length] = new Option('Alle plaatsen', '');

      chel.options[chel.options.length] = new Option('Achterveld', '1284');

      chel.options[chel.options.length] = new Option('Amersfoort', '1285');

      chel.options[chel.options.length] = new Option('Baarn', '1286');

      chel.options[chel.options.length] = new Option('Bussum', '1300');

      chel.options[chel.options.length] = new Option('De Meern', '1302');

      chel.options[chel.options.length] = new Option('Eemnes', '1490');

      chel.options[chel.options.length] = new Option('Hilversum', '1301');

      chel.options[chel.options.length] = new Option('Laren', '1497');

      chel.options[chel.options.length] = new Option('Maarsen', '1304');

      chel.options[chel.options.length] = new Option('Maarsenbroek', '1623');

      chel.options[chel.options.length] = new Option('Soest', '1287');

      chel.options[chel.options.length] = new Option('Utrecht', '1289');

      chel.options[chel.options.length] = new Option('Vinkeveen', '1299');

      chel.options[chel.options.length] = new Option('Vleuten', '1303');

      chel.options[chel.options.length] = new Option('Woerden', '1290');

      chel.options[chel.options.length] = new Option('Zeist', '1291');

          break;

        case '1306':

      chel.options[chel.options.length] = new Option('Keuze 3: plaats', '');

      chel.options[chel.options.length] = new Option('Alle plaatsen', '');

      chel.options[chel.options.length] = new Option('Amersfoort', '1285');

      chel.options[chel.options.length] = new Option('Baarn', '1286');

      chel.options[chel.options.length] = new Option('De Meern', '1302');

      chel.options[chel.options.length] = new Option('Eemnes', '1490');

      chel.options[chel.options.length] = new Option('Hilversum', '1301');

      chel.options[chel.options.length] = new Option('Laren', '1497');

      chel.options[chel.options.length] = new Option('Maarsen', '1304');

      chel.options[chel.options.length] = new Option('Soest', '1287');

      chel.options[chel.options.length] = new Option('Utrecht', '1289');

      chel.options[chel.options.length] = new Option('Zeist', '1291');

          break;

        case '1282':

      chel.options[chel.options.length] = new Option('Keuze 3: plaats', '');

      chel.options[chel.options.length] = new Option('Alle plaatsen', '');

      chel.options[chel.options.length] = new Option('Achterveld', '1284');

      chel.options[chel.options.length] = new Option('Amersfoort', '1285');

      chel.options[chel.options.length] = new Option('Baarn', '1286');

      chel.options[chel.options.length] = new Option('Bussum', '1300');

      chel.options[chel.options.length] = new Option('De Meern', '1302');

      chel.options[chel.options.length] = new Option('Hilversum', '1301');

      chel.options[chel.options.length] = new Option('Maarsen', '1304');

      chel.options[chel.options.length] = new Option('Maarsenbroek', '1623');

      chel.options[chel.options.length] = new Option('Soest', '1287');

      chel.options[chel.options.length] = new Option('Utrecht', '1289');

      chel.options[chel.options.length] = new Option('Vinkeveen', '1299');

      chel.options[chel.options.length] = new Option('Vleuten', '1303');

      chel.options[chel.options.length] = new Option('Woerden', '1290');

      chel.options[chel.options.length] = new Option('Zeist', '1291');

          break;

    }

          break;

        case '1277':

    switch (document.getElementById(saElementIdsOfCategorySelects[1]).options[document.getElementById(saElementIdsOfCategorySelects[1]).selectedIndex].value) {

        case '_not_specified':

      chel.options[chel.options.length] = new Option('Keuze 3: plaats', '_not_specified');

          break;

        case '':

      chel.options[chel.options.length] = new Option('Keuze 3: plaats', '');

      chel.options[chel.options.length] = new Option('Alle plaatsen', '');

      chel.options[chel.options.length] = new Option('Achterveld', '1284');

      chel.options[chel.options.length] = new Option('Amersfoort', '1285');

      chel.options[chel.options.length] = new Option('Baarn', '1286');

      chel.options[chel.options.length] = new Option('Bussum', '1300');

      chel.options[chel.options.length] = new Option('De Meern', '1302');

      chel.options[chel.options.length] = new Option('Hilversum', '1301');

      chel.options[chel.options.length] = new Option('Maarsen', '1304');

      chel.options[chel.options.length] = new Option('Soest', '1287');

      chel.options[chel.options.length] = new Option('Utrecht', '1289');

      chel.options[chel.options.length] = new Option('Vinkeveen', '1299');

      chel.options[chel.options.length] = new Option('Vleuten', '1303');

      chel.options[chel.options.length] = new Option('Woerden', '1290');

      chel.options[chel.options.length] = new Option('Zeist', '1291');

          break;

        case '1281':

      chel.options[chel.options.length] = new Option('Keuze 3: plaats', '');

      chel.options[chel.options.length] = new Option('Alle plaatsen', '');

      chel.options[chel.options.length] = new Option('Amersfoort', '1285');

      chel.options[chel.options.length] = new Option('Baarn', '1286');

      chel.options[chel.options.length] = new Option('Soest', '1287');

          break;

        case '1280':

      chel.options[chel.options.length] = new Option('Klik op Zoek', '');

          break;

        case '1306':

      chel.options[chel.options.length] = new Option('Keuze 3: plaats', '');

      chel.options[chel.options.length] = new Option('Alle plaatsen', '');

      chel.options[chel.options.length] = new Option('Baarn', '1286');

      chel.options[chel.options.length] = new Option('Amersfoort', '1285');

          break;

        case '1282':

      chel.options[chel.options.length] = new Option('Keuze 3: plaats', '');

      chel.options[chel.options.length] = new Option('Alle plaatsen', '');

      chel.options[chel.options.length] = new Option('Baarn', '1286');

      chel.options[chel.options.length] = new Option('Hilversum', '1301');

          break;

    }

          break;

        case '1276':

    switch (document.getElementById(saElementIdsOfCategorySelects[1]).options[document.getElementById(saElementIdsOfCategorySelects[1]).selectedIndex].value) {

        case '_not_specified':

      chel.options[chel.options.length] = new Option('Keuze 3: plaats', '_not_specified');

          break;

        case '':

      chel.options[chel.options.length] = new Option('Keuze 3: plaats', '');

      chel.options[chel.options.length] = new Option('Alle plaatsen', '');

      chel.options[chel.options.length] = new Option('Achterveld', '1284');

      chel.options[chel.options.length] = new Option('Amersfoort', '1285');

      chel.options[chel.options.length] = new Option('Baarn', '1286');

      chel.options[chel.options.length] = new Option('Breukelen', '1457');

      chel.options[chel.options.length] = new Option('Bussum', '1300');

      chel.options[chel.options.length] = new Option('De Meern', '1302');

      chel.options[chel.options.length] = new Option('Eemnes', '1490');

      chel.options[chel.options.length] = new Option('Hilversum', '1301');

      chel.options[chel.options.length] = new Option('Laren', '1497');

      chel.options[chel.options.length] = new Option('Maarsen', '1304');

      chel.options[chel.options.length] = new Option('Maarsenbroek', '1623');

      chel.options[chel.options.length] = new Option('Soest', '1287');

      chel.options[chel.options.length] = new Option('Utrecht', '1289');

      chel.options[chel.options.length] = new Option('Vinkeveen', '1299');

      chel.options[chel.options.length] = new Option('Vleuten', '1303');

      chel.options[chel.options.length] = new Option('Woerden', '1290');

      chel.options[chel.options.length] = new Option('Zeist', '1291');

          break;

        case '1654':

      chel.options[chel.options.length] = new Option('Klik op Zoek', '');

          break;

        case '1281':

      chel.options[chel.options.length] = new Option('Keuze 3: plaats', '');

      chel.options[chel.options.length] = new Option('Alle plaatsen', '');

      chel.options[chel.options.length] = new Option('Amersfoort', '1285');

      chel.options[chel.options.length] = new Option('Baarn', '1286');

      chel.options[chel.options.length] = new Option('Hilversum', '1301');

      chel.options[chel.options.length] = new Option('Soest', '1287');

          break;

        case '1280':

      chel.options[chel.options.length] = new Option('Klik op Zoek', '');

          break;

        case '1306':

      chel.options[chel.options.length] = new Option('Keuze 3: plaats', '');

      chel.options[chel.options.length] = new Option('Alle plaatsen', '');

      chel.options[chel.options.length] = new Option('Amersfoort', '1285');

      chel.options[chel.options.length] = new Option('Baarn', '1286');

      chel.options[chel.options.length] = new Option('Eemnes', '1490');

      chel.options[chel.options.length] = new Option('Hilversum', '1301');

      chel.options[chel.options.length] = new Option('Laren', '1497');

      chel.options[chel.options.length] = new Option('Maarsen', '1304');

      chel.options[chel.options.length] = new Option('Soest', '1287');

      chel.options[chel.options.length] = new Option('Utrecht', '1289');

      chel.options[chel.options.length] = new Option('Zeist', '1291');

          break;

        case '1282':

      chel.options[chel.options.length] = new Option('Keuze 3: plaats', '');

      chel.options[chel.options.length] = new Option('Alle plaatsen', '');

      chel.options[chel.options.length] = new Option('Achterveld', '1284');

      chel.options[chel.options.length] = new Option('Amersfoort', '1285');

      chel.options[chel.options.length] = new Option('Baarn', '1286');

      chel.options[chel.options.length] = new Option('Bussum', '1300');

      chel.options[chel.options.length] = new Option('De Meern', '1302');

      chel.options[chel.options.length] = new Option('Maarsen', '1304');

      chel.options[chel.options.length] = new Option('Maarsenbroek', '1623');

      chel.options[chel.options.length] = new Option('Soest', '1287');

      chel.options[chel.options.length] = new Option('Utrecht', '1289');

      chel.options[chel.options.length] = new Option('Vinkeveen', '1299');

      chel.options[chel.options.length] = new Option('Vleuten', '1303');

      chel.options[chel.options.length] = new Option('Woerden', '1290');

      chel.options[chel.options.length] = new Option('Zeist', '1291');

          break;

    }

          break;

        case '1278':

    switch (document.getElementById(saElementIdsOfCategorySelects[1]).options[document.getElementById(saElementIdsOfCategorySelects[1]).selectedIndex].value) {

        case '_not_specified':

      chel.options[chel.options.length] = new Option('Keuze 3: plaats', '_not_specified');

          break;

        case '':

      chel.options[chel.options.length] = new Option('Keuze 3: plaats', '');

      chel.options[chel.options.length] = new Option('Alle plaatsen', '');

      chel.options[chel.options.length] = new Option('Amersfoort', '1285');

      chel.options[chel.options.length] = new Option('Baarn', '1286');

      chel.options[chel.options.length] = new Option('Soest', '1287');

      chel.options[chel.options.length] = new Option('Utrecht', '1289');

      chel.options[chel.options.length] = new Option('Vinkeveen', '1299');

      chel.options[chel.options.length] = new Option('Zeist', '1291');

          break;

        case '1281':

      chel.options[chel.options.length] = new Option('Keuze 3: plaats', '');

      chel.options[chel.options.length] = new Option('Alle plaatsen', '');

      chel.options[chel.options.length] = new Option('Amersfoort', '1285');

      chel.options[chel.options.length] = new Option('Baarn', '1286');

      chel.options[chel.options.length] = new Option('Vinkeveen', '1299');

          break;

        case '1280':

      chel.options[chel.options.length] = new Option('Klik op Zoek', '');

          break;

        case '1306':

      chel.options[chel.options.length] = new Option('Keuze 3: plaats', '');

      chel.options[chel.options.length] = new Option('Alle plaatsen', '');

      chel.options[chel.options.length] = new Option('Amersfoort', '1285');

      chel.options[chel.options.length] = new Option('Baarn', '1286');

          break;

        case '1282':

      chel.options[chel.options.length] = new Option('Keuze 3: plaats', '');

      chel.options[chel.options.length] = new Option('Alle plaatsen', '');

      chel.options[chel.options.length] = new Option('Baarn', '1286');

      chel.options[chel.options.length] = new Option('Soest', '1287');

      chel.options[chel.options.length] = new Option('Utrecht', '1289');

      chel.options[chel.options.length] = new Option('Vinkeveen', '1299');

      chel.options[chel.options.length] = new Option('Zeist', '1291');

          break;

    }

          break;

    }

              chel.selectedIndex = 0;
              iLevel++;
  
    }

}


/*
' function  : initializeSubCategorySelections
' overview  : initializes the updating of main category and subcategory select elements.
' arguments : the id's of the select elements starting with the top category
' return    :
' example   : initializeSubCategorySelections('maincategorie_select', 'subcategorie_select', 'subsubcategorie_select')
' note      : onChange events will be overwritten for the specified elements
*/
function initializeSubCategorySelections() {
  saElementIdsOfCategorySelects = arguments;

  for (var iArg = 0; iArg < saElementIdsOfCategorySelects.length; iArg++) {
    var chel = document.getElementById(saElementIdsOfCategorySelects[iArg]);
    if (chel)
      chel.onchange = function() { fillSubCategoryPulldown(this.id) }
  }

  fillSubCategoryPulldown()
}


// -->


