/***********************************************
* 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=69

//Enter the solutions corresponding to each question:
var correctchoices=new Array()  //question solutions
correctchoices[1]='b'
correctchoices[2]='a'
correctchoices[3]='c'
correctchoices[4]='b'
correctchoices[5]='b'
correctchoices[6]='c'
correctchoices[7]='c'
correctchoices[8]='d'
correctchoices[9]='d'
correctchoices[10]='b'
correctchoices[11]='c'
correctchoices[12]='a'
correctchoices[13]='b'
correctchoices[14]='a'
correctchoices[15]='c'
correctchoices[16]='d'
correctchoices[17]='a'
correctchoices[18]='a'
correctchoices[19]='d'
correctchoices[20]='c'
correctchoices[21]='a'
correctchoices[22]='d'
correctchoices[23]='b'
correctchoices[24]='b'
correctchoices[25]='b'
correctchoices[26]='c'
correctchoices[27]='b'
correctchoices[28]='b'
correctchoices[29]='a'
correctchoices[30]='b'
correctchoices[31]='d'
correctchoices[32]='a'
correctchoices[33]='c'
correctchoices[34]='b'
correctchoices[35]='b'
correctchoices[36]='a'
correctchoices[37]='d'
correctchoices[38]='b'
correctchoices[39]='d'
correctchoices[40]='a'
correctchoices[41]='d'
correctchoices[42]='d'
correctchoices[43]='a'
correctchoices[44]='d'
correctchoices[45]='b'
correctchoices[46]='a'
correctchoices[47]='b'
correctchoices[48]='b'
correctchoices[49]='b'
correctchoices[50]='c'
correctchoices[51]='c'
correctchoices[52]='c'
correctchoices[53]='b'
correctchoices[54]='b'
correctchoices[55]='a'
correctchoices[56]='b'
correctchoices[57]='a'
correctchoices[58]='a'
correctchoices[59]='a'
correctchoices[60]='a'
correctchoices[61]='c'
correctchoices[62]='b'
correctchoices[63]='d'
correctchoices[64]='c'
correctchoices[65]='c'
correctchoices[66]='a'
correctchoices[67]='d'
correctchoices[68]='a'
correctchoices[69]='d'

/////Don't edit beyond here//////////////////////////

function gradeit(){
var incorrect=null
for (q=1;q<=totalquestions;q++){
	var thequestion=eval("document.MAT0024.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=250,height=450, scrollbars")
win2.focus()
win2.document.open()
win2.document.write('<title>Solution</title>')
win2.document.write('<body bgcolor="#FFFFFF">')
win2.document.write('<center><h3>Quiz Solutions</h3></center>')
win2.document.write('<center><font face="TimesNewRoman">')
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("Question "+i+"="+correctchoices[i].fontcolor("red")+"<br>")
wrong=0
}
else
win2.document.write("Question "+i+"="+correctchoices[i]+"<br>")
}
win2.document.write('</center></font>')
win2.document.write("<center><h4>Incorrect choices are marked in red.</h4>")
win2.document.close()
}

