var score = 0; function trim(str) { return str.replace(/^\s\s*/, '').replace(/\s\s*$/, ''); } function checkAnswers(form) { score = 0; if (score < ) { document.getElementById("Checkbuttontext").value ="Check again"; } if (score >= ) { document.getElementById("Trophybutton").style.visibility ="visible"; document.getElementById("Trophybutton").value ="Claim Your Trophy for " + score + " out of "; } if (score == ) { document.getElementById("Checkbutton").style.visibility ="hidden"; } } function ClaimTrophy(form) { form.Other_Text.value = score + ' out of '; form.submit(); } function ShowDescription() { document.getElementById("GreyOut").style.visibility ="visible"; document.getElementById("DescriptionBox").style.visibility ="visible"; } function HideDescription() { document.getElementById("GreyOut").style.visibility ="hidden"; document.getElementById("DescriptionBox").style.visibility ="hidden"; }