var score = 0;			// set to 0 in order to add correct 
				// questions

var totalScore = 100;		// change this value with each quiz 
				// depending on the value of the 
				// answers that you want the quiz to 
				// grade



function GradeQuiz(){

	
		if (document.forms[0].Q1[6].checked){
			score += 1;
		}
		
		
		if (document.forms[0].Q2[5].checked){
			score += 1;
		}
		
		if (document.forms[0].Q3[1].checked){
			score += 1;
		}
		
		if (document.forms[0].Q4[0].checked){
			score += 1;
		}
				
		if (document.forms[0].Q5[4].checked){
			score += 1;
		}
				
		if (document.forms[0].Q6[2].checked){
			score += 1;
		}
		
		if (document.forms[0].Q7[3].checked){
			score += 1;
		}

		if (document.forms[0].Q8[4].checked){
			score += 3;
		}
		
		if (document.forms[0].Q9[1].checked){
			score += 4;
		}

		if (document.forms[0].Q10[0].checked){
			score += 3;
		}

		if (document.forms[0].Q11[5].checked){
			score += 1;
		}

		if (document.forms[0].Q12[0].checked){
			score += 1;
		}

		if (document.forms[0].Q13[6].checked){
			score += 1;
		}

		if (document.forms[0].Q14[1].checked){
			score += 1;
		}

		if (document.forms[0].Q15[4].checked){
			score += 1;
		}

		if (document.forms[0].Q16[2].checked){
			score += 1;
		}

		if (document.forms[0].Q17[3].checked){
			score += 1;
		}

		if (document.forms[0].Q18[2].checked){
			score += 4;
		}

		if (document.forms[0].Q19[3].checked){
			score += 4;
		}

		if (document.forms[0].Q20[2].checked){
			score += 1;
		}

		if (document.forms[0].Q21[6].checked){
			score += 1;
		}

		if (document.forms[0].Q22[4].checked){
			score += 1;
		}

		if (document.forms[0].Q23[5].checked){
			score += 1;
		}

		if (document.forms[0].Q24[3].checked){
			score += 1;
		}

		if (document.forms[0].Q25[0].checked){
			score += 1;
		}

		if (document.forms[0].Q26[1].checked){
			score += 1;
		}

		if (document.forms[0].Q27[1].checked){
			score += 3;
		}

		if (document.forms[0].Q28[5].checked){
			score += 1;
		}

		if (document.forms[0].Q29[3].checked){
			score += 1;
		}

		if (document.forms[0].Q30[2].checked){
			score += 1;
		}

		if (document.forms[0].Q31[0].checked){
			score += 1;
		}

		if (document.forms[0].Q32[4].checked){
			score += 1;
		}

		if (document.forms[0].Q33[1].checked){
			score += 1;
		}

		if (document.forms[0].Q34[2].checked){
			score += 1;
		}

		if (document.forms[0].Q35[4].checked){
			score += 1;
		}

		if (document.forms[0].Q36[1].checked){
			score += 1;
		}

		if (document.forms[0].Q37[3].checked){
			score += 1;
		}

		if (document.forms[0].Q38[6].checked){
			score += 1;
		}

		if (document.forms[0].Q39[5].checked){
			score += 1;
		}

		if (document.forms[0].Q40[0].checked){
			score += 1;
		}

		if (document.forms[0].Q41[3].checked){
			score += 3;
		}

		if (document.forms[0].Q42[0].checked){
			score += 3;
		}

		if (document.forms[0].Q43[4].checked){
			score += 3;
		}

		if (document.forms[0].Q44[2].checked){
			score += 1;
		}

		if (document.forms[0].Q45[4].checked){
			score += 1;
		}

		if (document.forms[0].Q46[0].checked){
			score += 1;
		}

		if (document.forms[0].Q47[5].checked){
			score += 1;
		}

		if (document.forms[0].Q48[3].checked){
			score += 1;
		}

		if (document.forms[0].Q49[1].checked){
			score += 1;
		}

		if (document.forms[0].Q50[5].checked){
			score += 1;
		}

		if (document.forms[0].Q51[0].checked){
			score += 1;
		}

		if (document.forms[0].Q52[4].checked){
			score += 1;
		}

		if (document.forms[0].Q53[1].checked){
			score += 1;
		}

		if (document.forms[0].Q54[6].checked){
			score += 1;
		}

		if (document.forms[0].Q55[2].checked){
			score += 1;
		}

		if (document.forms[0].Q56[3].checked){
			score += 1;
		}

		if (document.forms[0].Q57[1].checked){
			score += 1;
		}

		if (document.forms[0].Q58[0].checked){
			score += 1;
		}

		if (document.forms[0].Q59[3].checked){
			score += 1;
		}
                if (document.forms[0].Q60[2].checked){
			score += 1;
		}
                if (document.forms[0].Q61[3].checked){
			score += 1;
		}
                if (document.forms[0].Q62[3].checked){
			score += 1;
		}        
                if (document.forms[0].Q63[2].checked){
			score += 1;
		}
		if (document.forms[0].Q64[1].checked){
			score += 1;
		}
		if (document.forms[0].Q65[4].checked){
			score += 1;
		}
		if (document.forms[0].Q66[0].checked){
			score += 1;
		}
		if (document.forms[0].Q67[5].checked){
			score += 1;			
		}
		if (document.forms[0].Q68[2].checked){
			score += 1;			
		}
		if (document.forms[0].Q69[7].checked){
			score += 1;			
		}
		if (document.forms[0].Q70[1].checked){
			score += 1;			
		}
		if (document.forms[0].Q71[6].checked){
			score += 1;			
		}
		if (document.forms[0].Q72[3].checked){
			score += 1;			
		}
		if (document.forms[0].Q73[0].checked){
			score += 1;			
		}
		if (document.forms[0].Q74[4].checked){
			score += 1;			
		}
		if (document.forms[0].Q75[3].checked){
			score += 1;			
		}
		if (document.forms[0].Q76[0].checked){
			score += 1;			
		}
		if (document.forms[0].Q77[2].checked){
			score += 1;			
		}
		if (document.forms[0].Q78[4].checked){
			score += 1;			
		}
		if (document.forms[0].Q79[1].checked){
			score += 1;			
		}

	alert("Your score on the Halloween quiz is:  " + score + "% \n\nClick OK to continue.");
        document.forms[0].score.value=score;
        
	return true;
		}
	
