[%- PROCESS 'start_section.tt2' name='tracks_panel' title='tracks' -%]

  <!-- Loop through each category -->
 <div class="searchbody" id="target3" style="width: 100%; padding-left: 1em">
  [% SET idnum = '00000' %]
  [% FOREACH category = track_categories -%]
    [% SET id = 'c' _ idnum %]
    [% NEXT IF !track_groups.$category %]

    [% buttons = BLOCK %]
    &nbsp;<i class="nojs">
      <label>
        <input type="checkbox" name="[% id %]_a" value="on" onclick="gbCheck(this,1)" id="[% id %]_a" />
        [% config.tr('all_on') %]
      </label>
      <label>
        <input type="checkbox" name="[% id %]_n" value="on" onclick="gbCheck(this,0)" id="[% id %]_n" />
        [% config.tr('all_off') %]
      </label>
    </i>
    [% END %]

   [%- INCLUDE 'start_section.tt2' name=category title=category inline_content=buttons -%]

    <span id="[% id %]">
      <table border="0">
        <tr class="searchtitle">
        [%- i = 0 -%]
        [%- FOREACH tracklabel = track_groups.$category -%]
          <td>
            <input type="checkbox" name="label" value="[% tracklabel %]" onclick="gbTurnOff('[% id %]')" 
              [% IF selected_tracks.$tracklabel %] checked="checked"[% END %]
            />
            [%- citation_link(tracklabel,'?help=citations') -%]
          </td>
          [% i = i + 1 ; IF(i % 3) == 0 ; '</tr><tr class="searchtitle">' ; END %]
        [%- END -%]
        </tr>
      </table>
     </span>
    [%- PROCESS 'end_section.tt2' -%]
    [% SET idnum = idnum + 1 %]
  [%- END -%]
 </div>
[%- PROCESS 'end_section.tt2' -%]
