var totalquestions=10


var correctchoices=new Array()
correctchoices[1]='b'
correctchoices[2]='d'
correctchoices[3]='b'
correctchoices[4]='b'
correctchoices[5]='b'
correctchoices[6]='b'
correctchoices[7]='b'
correctchoices[8]='b'
correctchoices[9]='a'
correctchoices[10]='c'



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]){ 
		if (incorrect==null)
		incorrect=q
		else
		incorrect+="/"+q
		}
	}

if (incorrect==null)
incorrect="a/b"
document.cookie='q='+incorrect
if (document.cookie=='')
alert("Sorry, your browser does not accept cookies, so we can't automatically score the quiz for you.")
else
window.location="answers.html"
}



