function EvaluateQuiz() {
	if (document.quiz.correct_choice.value == -1 || document.quiz.correct_choice.value >= document.quiz.choice.length) {
		window.location.href = document.quiz.url.value;
	} else {
		var checkedIndex = 0;
		var i;
		for (i = 0; i < document.quiz.choice.length; i++) {
			if (document.quiz.choice[i].checked) {
				checkedIndex = i;
				break;
			}
		}
		if (checkedIndex != document.quiz.correct_choice.value) {
			document.getElementById("choice" + checkedIndex).firstChild.data += " Wrong!";
			document.getElementById("choice" + checkedIndex).className = "quiz_wrong_choice";
			document.quiz.url.value += "wrong";
		} else {
			document.quiz.url.value += "correct";
		}		
		document.getElementById("choice" + document.quiz.correct_choice.value).firstChild.data += " Correct!";
		document.getElementById("choice" + document.quiz.correct_choice.value).className = "quiz_correct_choice";
		document.quiz.correct_choice.value = -1;
		document.quiz.button.value = "Next";
	}
}