/********************************************************
* Tontechniker-Quiz 7 - Multiple Choice
* Code from: http://javascriptkit.com/script/cut180.shtml
********************************************************/
// Enter total number of questions:
var totalquestions=10
// Enter the solutions corresponding to each question:
var correctchoices=new Array()
correctchoices[1]='A' //question 1 solution
correctchoices[2]='C' //question 2 solution, and so on.
correctchoices[3]='B'
correctchoices[4]='D'
correctchoices[5]='C'
correctchoices[6]='D'
correctchoices[7]='C'
correctchoices[8]='C'
correctchoices[9]='B'
correctchoices[10]='C'
///// Do not 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("Dein Browser nimmt keine Cookies an. Bitte aendere die Einstellungen.")
else
window.location="Quizresults07.htm"
}
function showsolution(){
var win2=window.open("","win2","width=200,height=350, scrollbars")
win2.focus()
win2.document.open()
win2.document.write('<title>Tontechniker-Quiz 7</title>')
win2.document.write('<body bgcolor="#FFFFFF">')
win2.document.write('<center><h3>Tontechniker-Quiz 7<br>Die L&ouml;sung:</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("Frage "+i+" = "+correctchoices[i].fontcolor("red")+"<br>")
wrong=0
}
else
win2.document.write("Frage "+i+" = "+correctchoices[i]+"<br>")
}
win2.document.write('</center></font>')
win2.document.write("<h5>Die L&ouml;sungen in rot bezeichnen die falsch beantworteten Fragen.</h5>")
win2.document.close()
}

