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


function loadanswers()
{
	answers = new Array();
	answers.push( new inans('Michael Schumacher', new Array()));
	answers.push( new inans('Juan Manuel Fangio', new Array('Juan Fangio')));
	answers.push( new inans('Alain Prost', new Array()));
	answers.push( new inans('Jack Brabham', new Array()));
	answers.push( new inans('Jackie Stewart', new Array('Jackie Stewert')));
	answers.push( new inans('Niki Lauda', new Array()));
	answers.push( new inans('Ayrton Senna', new Array()));
	answers.push( new inans('Nelson Piquet', new Array()));
	answers.push( new inans('Alberto Ascari', new Array()));
	answers.push( new inans('Jim Clark', new Array()));
	answers.push( new inans('Graham Hill', new Array()));
	answers.push( new inans('Emerson Fittipaldi', new Array()));
	answers.push( new inans('Mika Häkkinen', new Array('Mika Hakkinen')));
	answers.push( new inans('Fernando Alonso', new Array()));
	answers.push( new inans('Nino Farina', new Array()));
	answers.push( new inans('Mike Hawthorn', new Array()));
	answers.push( new inans('Phil Hill', new Array()));
	answers.push( new inans('John Surtees', new Array()));
	answers.push( new inans('Denny Hulme', new Array()));
	answers.push( new inans('Jochen Rindt', new Array()));
	answers.push( new inans('James Hunt', new Array()));
	answers.push( new inans('Mario Andretti', new Array()));
	answers.push( new inans('Jody Scheckter', new Array()));
	answers.push( new inans('Alan Jones', new Array()));
	answers.push( new inans('Keke Rosberg', new Array()));
	answers.push( new inans('Nigel Mansell', new Array()));
	answers.push( new inans('Damon Hill', new Array()));
	answers.push( new inans('Jacques Villeneuve', new Array('Jacque Villeneuve')));
	answers.push( new inans('Kimi Räikkönen', new Array('Kimi Raikkonen')));
	answers.push( new inans('Lewis Hamilton', 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("Top Step of the Podium, You named them all.\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 >= 50 && percent < 70) {
	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 >= 35 && percent < 50) {
	alert("Good Job! You managed to get " + correct + " correct.\nThat is " + percent + "% of the total possible answers.\nThat is a good score");
	}
	if ( percent >= 15 && percent < 35) {
	alert("Not bad! You managed to get " + correct + " correct.\nThat is " + percent + "% of the total possible answers.\nThat is a average score");
	}
	if ( percent < 15) {
	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");
	}
}

