<!-- BEGIN [% component.name %] -->
	[% # use screen categories if more than 3:
		IF screen_categories.size > 3; # uses ajax to retrieve screen terms
            INCLUDE screen/screen_category_select.tt;
        ELSE; # single list of screens, with optgroups if >1 category:
	%]
		<select name="screen_id" id="screen_name">
		  [% IF screens.size > 1 %]
			<option value="">--select one--</option>
		  [% END %]

		  [% IF screen_categories.size > 1; # use optgroups
			FOREACH entry IN screen_categories %]
			  <optgroup label="[% entry.name.upper %]">
				[% FOREACH s IN screens;
					NEXT UNLESS	s.category.name.match(entry.name);
                    NEXT UNLESS s.active.match('yes');
				%]
					<option value="[% s.id %]">[% s.description %]</option>
				[% END %]
			  </optgroup>
			  [% END;
					ELSE; # single category, no need for optgroups
						FOREACH s IN screens;
                        NEXT UNLESS s.active.match('yes');
              %]
				<option value="[% s.id %]">[% s.description %]</option>
		  [% END; END %]
		</select>
	[% END %]
<!-- END [% component.name %] -->
