//TOTAL SOLUTIONS VARIABLE

var allquestions=45
var correctanswers=new Array()
correctanswers[1]='b' // PART 19
correctanswers[2]='c' 
correctanswers[3]='a' 
correctanswers[4]='c'
correctanswers[5]='a'
correctanswers[6]='b' // PART 20
correctanswers[7]='c'
correctanswers[8]='b'
correctanswers[9]='c'
correctanswers[10]='a'
correctanswers[11]='c' // PART 21
correctanswers[12]='a' 
correctanswers[13]='a' 
correctanswers[14]='b'
correctanswers[15]='b'
correctanswers[16]='c' // PART 22
correctanswers[17]='a'
correctanswers[18]='a'
correctanswers[19]='b'
correctanswers[20]='c'
correctanswers[21]='a' // PART 23
correctanswers[22]='a' 
correctanswers[23]='c' 
correctanswers[24]='a'
correctanswers[25]='c'
correctanswers[26]='b' // PART 24
correctanswers[27]='a'
correctanswers[28]='b'
correctanswers[29]='b'
correctanswers[30]='b'
correctanswers[31]='b' // PART 25
correctanswers[32]='b'
correctanswers[33]='a'
correctanswers[34]='c'
correctanswers[35]='c'
correctanswers[36]='c' // PART 26
correctanswers[37]='a'
correctanswers[38]='c'
correctanswers[39]='c'
correctanswers[40]='c'
correctanswers[41]='b' // PART 27
correctanswers[42]='a'
correctanswers[43]='c'
correctanswers[44]='c'
correctanswers[45]='b'


// TOTAL CALCULATION

function countsolution(){
var incorrect=null
for (q=1;q<=allquestions;q++){
	var thequestion=eval("document.ingIngresso.question"+q)
	for (c=0;c<thequestion.length;c++){
		if (thequestion[c].checked==true)
		actualchoices[q]=thequestion[c].value
		}
		
	if (actualchoices[q]!=correctanswers[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="ing_test_ingresso_risultati_C.htm"
}

// TOTAL SOLUTION

function getsolution(){
var win2=window.open("","win2","width=200,height=350, scrollbars")
win2.focus()
win2.document.open()
win2.document.write('<title>Solutions Part C</title>')
win2.document.write('<body bgcolor="#FFFFFF">')
win2.document.write('<center><h3>Solutions Part C</h3></center>')
win2.document.write('<center><font face="Arial">')
for (i=1;i<=allquestions;i++){
for (temp=0;temp<incorrect.length;temp++){
if (i==incorrect[temp])
wrong=1
}
if (wrong==1){
win2.document.write("Question "+i+"="+correctanswers[i].fontcolor("red")+"<br>")
wrong=0
}
else
win2.document.write("Question "+i+"="+correctanswers[i]+"<br>")
}
win2.document.write('</center></font>')
win2.document.write("<h5>Note: The solutions in red are the ones to the questions you had incorrectly answered.</h5>")
win2.document.close()
}

