/***********************************************
* 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=10

//Enter the solutions corresponding to each question:
var correctchoices=new Array()
correctchoices[1]='c' //question 1 solution
correctchoices[2]='b' //question 2 solution, and so on.
correctchoices[3]='a'
correctchoices[4]='c'
correctchoices[5]='a'
correctchoices[6]='c'
correctchoices[7]='d'
correctchoices[8]='b'
correctchoices[9]='a'
correctchoices[10]='d'

/////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_dgl01.htm"
}


function showsolution(){
var win2=window.open("","win2","width=500,height=480, scrollbars, resizable")
win2.focus()
win2.document.open()
win2.document.write('<title>Solution</title>')
win2.document.write('<body bgcolor="#FFFFFF">')
win2.document.write('<center><h3>Solution to Quiz</h3></center>')
win2.document.write('<center><font face="Arial">')
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("<h5>Note: Correct answers shown above; red indicates your answer was wrong.<p><h4>1) Douglas was born in: <i>C - Douglas was born in Indianapolis, Indiana.</i> <p> 2) Douglas was named for: <i>B - He was named for Jerry Douglas, who now plays in Alison Krauss' band.</i> <p> 3) Douglas' parents were named: <i>A - Douglas' father was Fred and his mother was Wilma.</i> <p> 4) What was Douglas' favorite toy when he was a kitten? <i>C - He used to run in and out of the spaceship. He was so little!</i> <p> 5) What is Douglas' favorite beverage? <i>A - He loves orange juice.</i> <p> 6) Which of these foods would Douglas be least likely to eat? <i>C - Amazingly, he does not like wet cat food at all. He's eaten all of the others.</i> <p> 7) What did Douglas lose in early 2000? <i>D - Douglas lost his normal voice in early 2000 and still doesn't meow a lot. </i><p> 8) In March 2000, Douglas had some interesting visitors. What was their profession? <i>B - 'Are you the police?' 'No, ma'am, we're musicians.'</i> <p> 9) If Douglas is lying on his side and you pet him, what is he most likely to do? <i>A - Bite you. </i> <p> 10) Which of these irritating things has Douglas never done? <i>D - Douglas doesn't go outside, so he has never brought fleas into the house.</i> </h5><p align='center'><small><a href='javascript:close()'>close window</a></small>")
win2.document.close()
}
