


var ans = new Array;
var done = new Array;

var score = 0;
ans[1] = "a";
ans[2] = "a";
ans[3] = "a";



function Engine(question, answer) {
if (answer != ans[question]) {
if (!done[question]) {
done[question] = -1;
}

}
else {
if (!done[question]) {
done[question] = -1;
score++;
}

   }
}
	
function NextLevel () {

if (score >= 1 && score <= 3) {self.location="http://www.ghost-story.co.uk/quiz/ismyhousehaunted2.html";} 

else {
self.location="http://www.ghost-story.co.uk/quiz/ismyhousehauntedlevel1.html";
   }
}
