var ans = new Array;
var done = new Array;
var score = 0;
ans[1] = "c";
ans[2] = "b";
ans[3] = "c";
ans[4] = "a";
ans[5] = "d";
ans[6] = "d";
ans[7] = "a";
ans[8] = "c";
ans[9] = "b";
ans[10] = "b";
function Engine(question, answer) {
if (answer != ans[question]) {
if (!done[question]) {
done[question] = -1;
alert("Wrong!\n\nYour score is now: " + score);
}
else {
alert("You have already answered that!");
   }
}
else {
if (!done[question]) {
done[question] = -1;
score++;
alert("Correct!\n\nYour score is now: " + score);
}
else {		
alert("You have already answered that!");
      }
   }
}
	
function NextLevel () {
if (score > 10) {
alert("Cheater!");
}
if (score >= 8 && score <= 11) {
alert("Well done! You're able to answer at least 80% of the questions, now I'll direct you to the next level!");self.location="mangaquiz.htm"

}
else {
alert("Access denied!  You need 8 points to enter the next level.")
   }
}
