var totalquestions=5
 
var score = 0;
 
function getRadioValue(radioObject) {
 var score = 0;
 for (q=1;q<=totalquestions;q++){
 	var thequestion=eval("document.questionnaire.question"+q)
 	var value=null
 	for (var i=0; i<thequestion.length; i++) {
 		if (thequestion[i].checked) {
 			value=thequestion[i].value;}
 		}
 		if (isNaN(value)) {alert("null value")}
 		score=score + parseInt(value)
 		 	 
 } //totalquestions
 //alert("Total score: " + score)
 if (score!=score) {
 	alert("You have not answered all of the questions\n\nPlease check your answers and click the 'Score' button again")
 	document.questionnaire.T1.value=""
 	}
 else {document.questionnaire.T1.value=score}
 } 
 
