/***********************************************
* JavaScriptKit.com Multiple Choice Quiz Script (http://www.javascriptkit.com)
* Copyright 2003 JavaScript Kit- http://www.javascriptkit.com
* This notice and footnote must stay intact for use
* Visit JavaScript Kit (http://www.javascriptkit.com/) for full source code
***********************************************/

//Enter total number of questions:
var totalquestions=8

//Enter the solutions corresponding to each question:
var correctchoices=new Array()
correctchoices[1]='c, want de straal r=1,5 m. De straal is altijd de helft van de diameter. De formule voor de oppervlakte van een cirkel is pi x r<sup>2</sup>=pi x 1,5<sup>2</sup>= 7 m. Zorg dat je omtrek en oppervlakte niet door elkaar haalt!' //question 1 solution
correctchoices[2]='a, want op 1 juni 2008 geldt t=5. Invullen in de formule levert 74 konijnen bij t=5 en 42 konijnen bij t=0. Het verschil is dus 74 - 42=32 konijnen, en 32 konijnen is 76% van 42 konijnen.' //question 2 solution, and so on.
correctchoices[3]='a, want sin(hoek A)= 4/7 (SOS). Op de rekenmachine gebruik je dus sin<sup>-1</sup>(4/7) en dat levert 35<sup>o</sup>. Denk eraan dat je nooit de hoek opmeet als er gevraagd wordt om een berekening!</sup>'
correctchoices[4]='c, want AC is de schuine zijde ofwel de langste zijde. Daarom geldt AC<sup>2</sup>=AB<sup>2</sup>+BC<sup>2</sup>, dus 7<sup>2</sup>=AB<sup>2</sup>+4<sup>2</sup>. Hieruit volgt AB<sup>2</sup>=33 en AB=5,7'
correctchoices[5]='a, want bedenk dat 54,39 overeen komt met 121%. De oude prijs is 100%. Terugrekenen met bijvoorbeeld een verhoudingstabel levert 54,39/1,21=44,95'
correctchoices[6]='b, want dit is een lineair verband vanwege de <i>constante</i> toename van 1,50 per kilometer. De kilometers vermenigvuldig je dus met 1,50 en je telt er eenmalig 5,00 bij op.'
correctchoices[7]='a, want de vergrotingsfactor is k=2 zodat de inhoud k<sup>3</sup> maal zo groot wordt. En 2<sup>3</sup>=8, dus de inhoud wordt 8 maal zo groot.'
correctchoices[8]='b, teken een (deel van) een boomdiagram en je ziet dat je moet vermenigvuldigen 5 x 8 x 10=400'


/////Don't edit beyond here//////////////////////////

function gradeit(){
var incorrect=null
for (q=1;q<=totalquestions;q++){
	var thequestion=eval("document.myquiz.question"+q)
	for (c=0;c<thequestion.length;c++){
		if (thequestion[c].checked==true)
		actualchoices[q]=thequestion[c].value
		}
		
	if (actualchoices[q]!=correctchoices[q]){ //process an incorrect choice
		if (incorrect==null)
		incorrect=q
		else
		incorrect+="/"+q
		}
	}

if (incorrect==null)
incorrect="a/b"
document.cookie='q='+incorrect
if (document.cookie=='')
alert("Your browser does not accept cookies. Please adjust your browser settings.")
else
window.location="results.htm"
}


function showsolution(){
var win2=window.open("","win2","width=600,height=500, noscrollbars")
win2.focus()
win2.document.open()
win2.document.write('<font face="Arial" size="2">')
win2.document.write('<title>Antwoorden</title>')
win2.document.write('<body bgcolor="#B0C4DE">')
win2.document.write('<center><h2>Antwoorden van de test</h2></center>')
for (i=1;i<=totalquestions;i++){
for (temp=0;temp<incorrect.length;temp++){
if (i==incorrect[temp])
wrong=1
}
if (wrong==1){
win2.document.write("Vraag "+i+" = "+correctchoices[i].fontcolor("red")+"<br>")
wrong=0
}
else
win2.document.write("Vraag "+i+" = "+correctchoices[i]+"<br>")
}
win2.document.write('</center></font>')
win2.document.write("<h5>Opmerking: de antwoorden in rood horen bij de fout beantwoorde vragen.</h5><p align='center'><small><a href='http://www.javascriptkit.com' target='_new'>JavaScript Kit quiz script</a></small>")
win2.document.close()
}
