function hideAllAnswers() {

	for (ques = 1; ques <= 11; ques++) {
		for (ans = 1; ans <= 4; ans++) {
			answer_id = ("ans" + ques + "-" + ans);
			hideLayer(answer_id);
		}
	}
	
}


function showAnswer(question_number, answer_number) {
	// Hide all answers for this question
	
	for (ans = 1; ans <= 4; ans++) {
		answer_id = ("ans" + question_number + "-" + ans);
		hideLayer(answer_id);
	}
	
	// Show the selected answer
	answer_id = ("ans" + question_number + "-" + answer_number);
	showLayer(answer_id);
	
}


function hideLayer(whichLayer) {

	if (document.getElementById) {
	// this is the way the standards work
		if(document.getElementById(whichLayer)){
			var style2 = document.getElementById(whichLayer).style;
			style2.display = "none";
		}
	} else if (document.all) {
	// this is the way old msie versions work
		if(document.all[whichLayer]){
			var style2 = document.all[whichLayer].style;
			style2.display = "none";
		}
	} else if (document.layers) {
	// this is the way nn4 works
		if(document.layers[whichLayer]){
			var style2 = document.layers[whichLayer].style;
			style2.display = "none";
		}
	}
	
}


function showLayer(whichLayer) {

	if (document.getElementById) {
	// this is the way the standards work
		var style2 = document.getElementById(whichLayer).style;
		style2.display = "block";
	} else if (document.all) {
	// this is the way old msie versions work
		var style2 = document.all[whichLayer].style;
		style2.display = "block";
	} else if (document.layers) {
	// this is the way nn4 works
		var style2 = document.layers[whichLayer].style;
		style2.display = "block";
	}

}

function resetAnswers(){

	hideAllAnswers()
	for(question=1; question<11; question++){
		elements = document.getElementsByName('q'+question)
		for(i=0; i<4; i++){
			if(elements[i]){
				elements[i].checked = false
			}
		}
	}
	
}