I want to be able to click a table cell, have it switch to color1, and then on the next click have it switch to color2, then back to color1... and so on.
function cSwap(cell){ 
 if (cell.style.backgroundColor = "#00000F")
 {
  cell.style.backgroundColor = "#F00000";
 }
 else if (cell.style.backgroundColor = "#F00000")
 {
  cell.style.backgroundColor = "#00000F";
 }
}
Right now, it only changes to the first color, and subsequent clicks do nothing.
The cells of the table each look like this:
<td classname='t' onclick='cSwap(this);' width='100' height='100' id='nw'><a href="" id="nw"></a></td>
...which'll be CSS once I get everything working (beside the point).
 
     
     
    