var vminutes = 3;
var vseconds = 00;
var boxedanswers = 1;
var autocomplete = 0;
var gamever = 0;
var justincase1 = 0;
var justincase2 = 0;


function loadanswers()
{
	answers = new Array();
	answers.push( new inans('Toy Story', new Array('Toy Story 1')));
	answers.push( new inans('A Bug\'s Life', new Array('A Bugs Life','A Bug Life')));
	answers.push( new inans('Toy Story 2', new Array('Toy Story II')));
	answers.push( new inans('Monsters, Inc', new Array('Monsters Inc')));
	answers.push( new inans('Finding Nemo', new Array()));
	answers.push( new inans('The Incredibles', new Array('Incredibles')));
	answers.push( new inans('Cars', new Array()));
	answers.push( new inans('Ratatouille', new Array()));
	answers.push( new inans('WALL-E', new Array('Walle')));
	answers.push( new inans('Up', new Array()));
	answers.push( new inans('Toy Story 3', new Array('Toy Story III')));
	answers.push( new inans('Cars 2', new Array('Cars II')));
	answers.push( new inans('The Bear and the Bow', new Array('Bear and the bow','The bear & the bow','bear & the bow')));
	answers.push( new inans('Newt', new Array()));
	remaining = answers.length;
	displayRemaining();
}

function doEndAlert()
{
	var total = (correct + remaining);
	var percentunrounded = (correct/total) * 100;
	var percent = roundNumber(percentunrounded,2)
	if ( percent == 100 ) {
	alert("Nicely done. You managed to name all of Pixar's films.\nYou got all " + correct + " answers correct.\nWell done!!!");
	}
	if ( percent >= 80 && percent < 100) {
	alert("Well done! You managed to get " + correct + " correct.\nThat is " + percent + "% of the total possible answers.\nThat is an amazing score");
	}
	if ( percent >= 60 && percent < 80) {
	alert("Great Job! You managed to get " + correct + " correct.\nThat is " + percent + "% of the total possible answers.\nThat is a very good score");
	}
	if ( percent >= 45 && percent < 60) {
	alert("Good Job! You managed to get " + correct + " correct.\nThat is " + percent + "% of the total possible answers.\nThat is a good score");
	}
	if ( percent >= 28 && percent < 45) {
	alert("Not bad! You managed to get " + correct + " correct.\nThat is " + percent + "% of the total possible answers.\nThat is a average score");
	}
	if ( percent < 28) {
	alert("Not very good, I'm afraid! You managed to get " + correct + " correct.\nThat is " + percent + "% of the total possible answers.\nThat is a not a very good score");
	}
}
