<!--

var numQues = 10;
var numChoi = 4;

var answers = new Array(10);
answers[0] = "in the deserts of southern Egypt";
answers[1] = "rains came to the desert around that time";
answers[2] = "observing the Sun using a stone circle similar to England's Stonehenge";
answers[3] = "A climate change made the area too dry";
answers[4] = "4,500 years";
answers[5] = "Khufu";
answers[6] = "ordering the construction of the first pyramid";
answers[7] = "Pharaohs";
answers[8] = "The floods brought vital water and nutrients to Egyptian soil";
answers[9] = "Trying to unite Egyptian religion under one god";

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;

}

// -->

