function ValidateQuestions()	{		var total = 0;		if (CheckResult(1, 'B'))		{			total += 1;		}				if (CheckResult(2, 'B'))		{			total += 1;		}				if (CheckResult(3, 'A'))		{			total += 1;		}				if (CheckResult(4, 'C'))		{			total += 1;		}				if (CheckResult(5, 'C'))		{			total += 1;		}				if (CheckResult(6, 'D'))		{			total += 1;		}				if (CheckResult(7, 'C'))		{			total += 1;		}				if (CheckResult(8, 'D'))		{			total += 1;		}				if (CheckResult(9, 'D'))		{			total += 1;		}				if (CheckResult(10, 'A'))		{			total += 1;		}				var quizResult = document.getElementById('divQuizResult');				if (total == 10)			{			quizResult.innerHTML = '<h3>Total: ' + total + '!</h3><h3>Congratulations, top score! Great work!</h3>';		}		else if (total >= 8)		{			quizResult.innerHTML = '<h3>Total: ' + total + '!</h3><h3>You almost got them all right!</h3>';		}		else if (total >= 6)		{			quizResult.innerHTML = '<h3>Total: ' + total + "</h3><h3>You're a little off the pace, try harder!</h3>";		}		else if (total >= 4)		{			quizResult.innerHTML = '<h3>Total: ' + total + '!</h3><h3>You need to try a lot harder next time!</h3>';		}		else if (total >= 2)		{			quizResult.innerHTML = '<h3>Total: ' + total + '!</h3><h3>You really need to work on that football knowledge!</h3>';		}		else		{			quizResult.innerHTML = '<h3>Total: ' + total +"</h3><h3>Oh dear! It's time to get your coat!</h3>";		}	}		function CheckResult(questionNo, answer)	{		var rad = document.getElementsByName('radioAnswer' + questionNo);		var correct = document.getElementById('divResultCorrect' + questionNo);		var wrong = document.getElementById('divResultWrong' + questionNo);			var hasFound = false;		for (var i=0; i < rad.length; i++)		{			if (rad[i].checked)			{					hasFound = true;				if (rad[i].value == answer)				{					correct.style.display = '';					wrong.style.display = 'none';					return true;				}				else				{					correct.style.display = 'none';					wrong.style.display = '';					return false;				}			}		}				if (!hasFound)		{			correct.style.display = 'none';			wrong.style.display = '';		}				return false;	}
