
<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->

<!-- Begin -->
// Insert number of questions
var numQues = 25;

// Insert number of choices in each question
var numChoi = 4;

// Insert number of questions displayed in answer area
var answers = new Array(25);

// Insert answers to questions
answers[0] = "for";
answers[1] = "that";
answers[2] = "were disappointed by";
answers[3] = "graduate from";
answers[4] = "consult";
answers[5] = "will have been married for twenty-five years.";
answers[6] = "on physics, and the third on literature.";
answers[7] = "can be convenient and time-saving;";
answers[8] = "ran perfectly";
answers[9] = "much work";
answers[10] = "go for a walk";
answers[11] = "be acquainted with";
answers[12] = "too good";
answers[13] = "Then";
answers[14] = "were cataloged";
answers[15] = "had better leave";
answers[16] = "Colonial days, a schoolroom looked";
answers[17] = "curb";
answers[18] = "tremulous";
answers[19] = "compendious";
answers[20] = "callous";
answers[21] = "tremulous";
answers[22] = "In spite of";
answers[23] = "discovered";
answers[24] = "Whenever";
// Do not change anything below here ...
function getScore(form) {
  var score = 0;
  var currElt;
  var currSelection;
  for (i=0; i<numQues; i++) {
    currElt = i*numChoi;
    for (j=0; j<numChoi; j++) {
      currSelection = form.elements[currElt + j];
      if (currSelection.checked) {
        if (currSelection.value == answers[i]) {
          score++;
          break;
        }
      }
    }
  }
  score = Math.round(score/numQues*100);
  form.percentage.value = score + "%";
  var correctAnswers = "";
  for (i=1; i<=numQues; i++) {
    correctAnswers += i + ". " + answers[i-1] + "\r\n";
  }
  form.solutions.value = correctAnswers;
}
//  End -->

