Toggling Background Color When Checkbox is Checked

<script language="javascript">
  function toggleRowColor(cb, row) {
    if (navigator.appName != "Netscape") {
      if (cb.checked == true) {
        eval("top.row" + row + ".style.background = '#d1e6f9';");
      } else {
        eval("top.row" + row + ".style.background = '#ffffff';");
      }
    }
}
</script>

<tr id="row2" bgcolor="#ffffff"><td>
  <input type="checkbox" name='senderid' value='931904' onclick="toggleRowColor(this, 2)">
</td></tr>