</i></span>
						</td>
						<td class="right">
							<?php 
            print "<fieldset style='border: none'>";
            ?>
							<script type="text/javascript">
								$(function () {
									$('.checkall').click(function () {
										$(this).parents('fieldset:eq(0)').find(':checkbox').attr('checked', this.checked);
									});
								});
							</script>
							<?php 
            print _("All") . " / " . _("None") . " <input type='checkbox' class='checkall'><br/>";
            $yearGroups = getYearGroups($connection2);
            if ($yearGroups == "") {
                print "<i>" . _('No year groups available.') . "</i>";
            } else {
                $selectedYears = explode(",", $row["gibbonYearGroupIDList"]);
                for ($i = 0; $i < count($yearGroups); $i = $i + 2) {
                    $checked = "";
                    foreach ($selectedYears as $selectedYear) {
                        if ($selectedYear == $yearGroups[$i]) {
                            $checked = "checked";
                        }
                    }
                    print _($yearGroups[$i + 1]) . " <input {$checked} type='checkbox' name='gibbonYearGroupIDCheck" . $i / 2 . "'><br/>";
                    print "<input type='hidden' name='gibbonYearGroupID" . $i / 2 . "' value='" . $yearGroups[$i] . "'>";
                }
            }
						</tr>
						<?php 
            }
            ?>
					
					
					<tr>
						<td> 
							<b><?php 
            print _('Year Groups');
            ?>
</b><br/>
						</td>
						<td class="right">
							<?php 
            $yearGroups = getYearGroups($connection2, $_SESSION[$guid]["gibbonSchoolYearID"]);
            if ($yearGroups == "") {
                print "<i>" . _('No year groups available.') . "</i>";
            } else {
                for ($i = 0; $i < count($yearGroups); $i = $i + 2) {
                    $checked = "";
                    if (is_numeric(strpos($row["gibbonYearGroupIDList"], $yearGroups[$i]))) {
                        $checked = "checked ";
                    }
                    print _($yearGroups[$i + 1]) . " <input {$checked} type='checkbox' name='gibbonYearGroupIDCheck" . $i / 2 . "'><br/>";
                    print "<input type='hidden' name='gibbonYearGroupID" . $i / 2 . "' value='" . $yearGroups[$i] . "'>";
                }
            }
            ?>
							<input type="hidden" name="count" value="<?php 
            print count($yearGroups) / 2;