print
    "<table style=\"border-collapse: collapse\">",
    "<tr style=\"background-color: #aaaaff\"><th>Date</th>",
    "<th>Topic</th>",
    "<th style=\"width: 200px;\">Assignment details</th>",
    "<th style=\"width: 225px;\">Readings</th>",
    "</tr>\n";

while (<>) {
    s/\#.*//;
    next unless $_;
    my ($date,$topic,$readings,$assignment) = split(/\|/);

    my $bgcolor = '#ffffff';
    $bgcolor = '#dddddd' if $date =~ /week/i;
    
    print
	"<tr style=\"background-color: $bgcolor\"><th valign=\"top\">$date</th>",
	"<td valign=\"top\">$topic</td>",
	"<td valign=\"top\">$assignment</td>",
	"<td valign=\"top\">$readings</td>",
	"</tr>\n";
}

print "</table>";
