//Enter total number of questions:
var totalquestions=6

//Enter the solutions corresponding to each question:
var correctchoices=new Array()
correctchoices[1]='y' //question 1 solution
correctchoices[2]='y' //question 2 solution, and so on.
correctchoices[3]='y'
correctchoices[4]='n'
correctchoices[5]='n'
correctchoices[6]='n'


/////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)
window.location="http://www.hilltopstudy.com/TestAcneProducts/qualified_acneCRO.htm"
else
window.location="http://www.hilltopstudy.com/TestAcneProducts/notqualified_acneCRO.htm"
}



