//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/CurrentlyRecruiting/prequalified.htm"
else
window.location="http://www.hilltopstudy.com/CurrentlyRecruiting/notqualified.htm"
}


function showRemote() {
self.name = "main"; // names current window as "main"
var windowprops = "toolbar=0,location=0,directories=0,status=0, " +
"menubar=0,scrollbars=0,resizable=0,width=550,height=250";
OpenWindow = window.open("http://www.hilltopstudy.com/locations.htm", "Locations", windowprops); // opens remote control
}


function closeRemote() {
timer = setTimeout('window.close();', 10);
}