// JavaScript Document
var whichone=1
var tempmn=document.instantquiz.thequestion
function generatequestions(){
document.instantquiz.theresponse.selectedIndex=0
if (!document.instantquiz.cmode.checked||whichone>=total+1||whichone<=0)
document.instantquiz.thesolution.value=''
document.instantquiz.theexplanation.value=''
if (whichone>=total+1)
tempmn.value="That\'s the end of the quiz. For more info and activities, click on a menu item above."
else{
tempmn.value=whichone+")"+question[whichone]+"\n\n"+"a)"+eval('choice'+whichone+'[1]')+"\n"+"b)"+eval('choice'+whichone+'[2]')+"\n"+"c)"+eval('choice'+whichone+'[3]')+"\n"+"d)"+eval('choice'+whichone+'[4]')
if (document.instantquiz.cmode.checked)
document.instantquiz.thesolution.value=solution[whichone]
}
}

function responses(){
var temp2=document.instantquiz.theresponse
var temp3=temp2.options[temp2.selectedIndex].text
if (temp3!=solution[whichone]&&temp2.selectedIndex!=0)
document.instantquiz.thesolution.value="Sorry, the correct answer is "+solution[whichone]

else if(temp2.selectedIndex!=0)
document.instantquiz.thesolution.value="Correct! The answer is "+solution[whichone]+". Well done."
document.instantquiz.theexplanation.value=explanation[whichone]
}

generatequestions()
