  function getTypeList(rawValue)
  {
    ids = rawValue.split('.');
    if (cartypes[ids[1]] != null)
    {
      typelist = cartypes[ids[1]].split(':');
      return typelist;
    }
  }

  function clearTypes()
  {
    for (ctr = document.getElementById('cartype').options.length - 1; ctr >= 0; ctr--)
      document.getElementById('cartype').options[ctr] = null;
  }

  function fillTypes()
  {
    var listctr = 0;
    for (round = 0; round < document.getElementById('car').options.length; round++)
    {
      if (document.getElementById('car').options[round].selected)
      {
        typelist = getTypeList(document.getElementById('car').options[round].value);
        if (typelist != null)
        {
          document.getElementById('cartype').options[listctr] = new Option('- Kies autotype -', '');
          listctr++;
          for (ctr = 0; ctr < typelist.length; ctr++)
          {
            if (typelist[ctr] != '')
            {
              currenttype = typelist[ctr].split(',');
              document.getElementById('cartype').options[listctr] = new Option(currenttype[1], currenttype[0]);
              listctr++;
            }
          }
        }
      }
    }
  }