function checkForm(form) 

{

if(radiocheck(form.q1)  != true)

  {

	alert("Select your choice for Question 1.");

	return false;



  }

  else if(radiocheck(form.q2) != true)

  {

	alert("Select your choice for Question 2.");

	return false;

  }

  else if(radiocheck(form.q3) != true)

  {

	alert("Select your choice for Question 3.");

	return false;

  }

	 else if(radiocheck(form.q4) != true)

  {

	alert("Select your choice for Question 4.");

	return false;

  }

	 else if(radiocheck(form.q5) != true)

  {

	alert("Select your choice for Question 5.");

	return false;

  }

	 else if(radiocheck(form.q6) != true)

  {

	alert("Select your choice for Question 6.");

	return false;

  }

	 else if(radiocheck(form.q7) != true)

  {

	alert("Select your choice for Question 7.");

	return false;

  }

  

  else if(radiocheck(form.q8) != true)

  {

	alert("Select your choice for Question 8.");

	return false;

  }

  else if(radiocheck(form.q9) != true)

  {

	alert("Select your choice for Question 9.");

	return false;

  }

  else if(radiocheck(form.q10) != true)

  {

	alert("Select your choice for Question 10.");

	return false;

  }

	 else if(radiocheck(form.q11) != true)

  {

	alert("Select your choice for Question 11.");

	return false;

  }

	 else if(radiocheck(form.q12) != true)

  {

	alert("Select your choice for Question 12.");

	return false;

  }

	 else if(radiocheck(form.q13) != true)

  {

	alert("Select your choice for Question 13.");

	return false;

  }

	 else if(radiocheck(form.q14) != true)

  {

	alert("Select your choice for Question 14.");

	return false;

  }

   else if(radiocheck(form.q15) != true)

  {

	alert("Select your choice for Question 15.");

	return false;

  }

  else if(radiocheck(form.q16) != true)

  {

	alert("Select your choice for Question 16.");

	return false;

  }

  

  else 

	{

	  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 + "%";

      	

}

}



  



function radiocheck(name)

{

  var check = false;

  for(i=0; i < name.length; i++)

  {

	check = name[i].checked;

	if(check == true)

	{

		break;

	}

  }

  return check;

}











