<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"[URL unfurl="true"]http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">[/URL]
<html>
<head>
<title>Untitled</title>
<style type="text/css">
td { font-size: 10px; }
.c1 { background-color: red; }
.c2 { background-color: green; }
.c3 { background-color: gray; }
.c4 { background-color: yellow; }
.c5 { background-color: aqua; }
.cellOver { background-color: white; }
</style>
<script language="javascript"><!--
var rowList = "";
function changeColor(blnOver, rowTarget) {
var cells = rowTarget.cells;
if (rowList.indexOf(rowTarget.id + ",") == -1) {
for (var i = 0; i < cells.length; i++) {
cells[i].className = (blnOver) ? "cellOver" : ("c" + (i + 1))
}
}
}
function alterList(rowId) {
rowId += ",";
rowList = (rowList.indexOf(rowId) > -1) ? rowList.replace(rowId, "") : rowList + rowId;
}
--></script>
</head>
<body>
<table><tr id="r1" onclick="alterList(this.id);" onmouseover="changeColor(true, this);" onmouseout="changeColor(false, this);">
<td class="c1">Stuff</td>
<td class="c2">Stuff</td>
<td class="c3">Stuff</td>
<td class="c4">Stuff</td>
<td class="c5">Stuff</td>
</tr><tr id="r2" onclick="alterList(this.id);" onmouseover="changeColor(true, this);" onmouseout="changeColor(false, this);">
<td class="c1">Stuff</td>
<td class="c2">Stuff</td>
<td class="c3">Stuff</td>
<td class="c4">Stuff</td>
<td class="c5">Stuff</td>
</tr><tr id="r3" onclick="alterList(this.id);" onmouseover="changeColor(true, this);" onmouseout="changeColor(false, this);">
<td class="c1">Stuff</td>
<td class="c2">Stuff</td>
<td class="c3">Stuff</td>
<td class="c4">Stuff</td>
<td class="c5">Stuff</td>
</tr></table>
</body>
</html>