I've spent hrs. on this and it's probably really simple, but I suck at javascript so......

The code I'm playing around with is...
HTML Code:
<!DOCTYPE html>

function changeCell(td)
var node = td;
while ( (node = node.parentNode) != null )
if ( node.tagName == "TD" )
node.style.backgroundColor = td.checked ? "red" : "white";
// not found...give up?

td { background-color: white; }

<form name="gradebook">
		<td><span id="add_remove">Remove from Calculation:</span></td> <td><input id="pts_earned_1" onclick="changeCell(this);clickCh(this);clickCh_total_pts(this.form.total_pts_1);this.form.total_pts_1.checked = this.checked;" type="checkbox" value="10"> 10  / <span style="display: none"><input id="total_pts_1" type="checkbox" onclick="clickCh_total_pts(this);" value="12"></span> 12<br> </td>
		<td><span id="add_remove">Remove from Calculation:</span></td> <td><input id="pts_earned_2" onclick="changeCell(this);clickCh(this);clickCh_total_pts(this.form.total_pts_2);this.form.total_pts_2.checked = this.checked;" type="checkbox" value="12.5"> 12.5  / <span style="display: none"><input id="total_pts_2" type="checkbox" onclick="clickCh_total_pts(this);" value="14"></span> 14<br></td>
<input id="pts_earned_total" type="hidden" value="22.5">
<input id="total_pts" type="hidden" value="26">
<div id="pts_earned_display">Pts. Earned: echo the initial pts. earned</div>
<div id="total_pts_display">Total Pts.: echo the initial total pts.</div>
<div id="percentage">Overall Percentage.: echo the initial percent</div>

<script type="text/javascript">
function clickCh(caller) {

  var pts_earned = document.getElementById("pts_earned_total").value*1;
  if(caller.checked){ pts_earned -= caller.value*1; }
               else { pts_earned += caller.value*1; }
  document.getElementById('pts_earned_total').value = pts_earned;
  document.getElementById('pts_earned_display').innerHTML = 'Pts. Earned: '+pts_earned.toFixed(2);

function clickCh_total_pts(caller) {

  var pts_earned = document.getElementById("pts_earned_total").value*1;
  var total_pts = document.getElementById("total_pts").value*1;
  if(caller.checked){ total_pts += caller.value*1; 
					  document.getElementById('add_remove').innerHTML = 'Remove from Calculation:';
               else { total_pts -= caller.value*1; 
					  document.getElementById('add_remove').innerHTML = 'Add to Calculation:';
  document.getElementById('total_pts').value = total_pts;
  document.getElementById('total_pts_display').innerHTML = 'Total Pts.: '+total_pts.toFixed(2);
  document.getElementById('percentage').innerHTML = 'Overall Percentage: '+Math.round((pts_earned/total_pts)*100*10)/10+'%';

When the checkbox is checked, I want the text to toggle between "Remove from Calculation:"and "Add to Calculation:" for the checkbox in the row that was just clicked.

Any thoughts on how to do this? Thanks!