// JavaScript Document


var aKey = new Array(3);
aKey[0]="a";
aKey[1]="a";
aKey[2]="a";
aKey[3]="a";
aKey[4]="a";
aKey[5]="a";
aKey[6]="a";
aKey[7]="a";
aKey[8]="a";
aKey[9]="a";
aKey[10]="a";
aKey[11]="a";



var sAns = new Array(12);
sAns[0]="";
sAns[1]="";
sAns[2]="";
sAns[3]="";
sAns[4]="";
sAns[5]="";
sAns[6]="";
sAns[7]="";
sAns[8]="";
sAns[9]="";
sAns[10]="";
sAns[11]="";



function studentAns(qNum, choice){
sAns[qNum - 1]= choice;
}



function getScore(){

var NumQues = 12;
score = 0;
var NoofCorrectAnswers=0;
for (i = 1; i <= NumQues ; i++){
	
	if (i==2 || i==4 || i==6 || i==8 || i==10 || i==12) {
		if (sAns[i-1] == "a" ){
			score = score + 2 	;	
		}
	}	
	else {
		if (sAns[i-1] == "a" ){
			score = score + 1 ;		
		}
	}

	
	 
}
//alert(sAns[11])


//document.quiz.percentage.value = score + "%";
//document.getElementById("percentage").innerHTML = "Your score is <b>" + score + "</b>%";

//document.quiz.solutions.value = correctAnswers;



if (score>=11 && score <= 18){
	document.getElementById("result").innerHTML = "<b>All the symptoms say it all; those bumps have got to be cold sores! Do not worry too much, though. Millions of people have it, and thousands everyday contract the virus that cause them. There are many treatment options to lighten up that swelling load for you.</b>";
}
else if (score >=6 && score <= 10){
	document.getElementById("result").innerHTML= "<b>There is a good chance that those bumps are not cold sores. They might as well be canker sores, a rash, a pimple or an allergy. But this does not mean that you are off the hook as some cold sore outbreaks do not develop symptoms at all. (If those bumps become fluid-filled in a matter of days, take this quiz again and you'll see.)</b>";
}
else if (score <= 5){
	document.getElementById("result").innerHTML = "<b>That's just a pimple, silly! Don't stress yourself out too much! Of course, make sure you keep yourself from contracting the evil cold sore virus.</b>";
}



}
// JavaScript Document