Can't get Javascript function to work
<p>I have the below Javascript function called on click from a radio group with 3 options, Pass , Fail and NA.   I'm getting no syntax errors, or any messages in Firebug however it isn't writing the values back out to the output textboxes.  Any ideas on what I'm missing?</p>

<pre><code>function ScoreCount() {
  var CompScore = 0;
  var CompTotal = 0;
  var CompPercent = 0;
  var CustDetCount = 0;

  var C01Selected = "",
      C02Selected = "",
      C03Selected = "",
      //...
      C51Selected = "";

  for (i = 0; i &lt; 3; i++) {
    if (document.MonitorForm.PMC_C01[i].checked == true) {
      C01Selected = document.MonitorForm.PMC_C01[i].value;
    }
  }

  if (C01Selected == "Pass") {
    CompScore = (CompScore + 1);
    CompTotal = (CompTotal + 1);
    CompPercent = (parseFloat(CompScore) / parseFloat(CompTotal));
  } else if (C01Selected == "Fail") {
    CompTotal = (CompTotal + 1);
    CompPercent = (parseFloat(CompScore) / parseFloat(CompTotal));
  } else {
    CompPercent = (parseFloat(CompScore) / parseFloat(CompTotal));
  }

  document.MonitorForm.Comp_Score.value = CompScore;
  document.MonitorForm.Comp_Total.value = CompTotal;
  document.MonitorForm.Comp_Percent.value = CompPercent;
}
</code></pre>
