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


function loadanswers()
{
	answers = new Array();
	answers.push( new inans('Brazil  (1958, 1962, 1970, 1994, 2002)', new Array('Brazil')));
	answers.push( new inans('Italy (1934, 1938, 1982, 2006)', new Array('Italy')));
	answers.push( new inans('Germany (1954, 1974, 1990)', new Array('Germany')));
	answers.push( new inans('Argentina (1978, 1986)', new Array('Argentina')));
	answers.push( new inans('Uruguay (1930, 1950)', new Array('Uruguay')));
	answers.push( new inans('France (1998)', new Array('France')));
	answers.push( new inans('England (1966)', new Array('England')));
	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!\nYou managed to name all World Cup Winning Countries.\nYou got all " + correct + " answers correct.\nWell done!!!");
	}
	if ( percent >= 80 && percent < 100) {
	alert("Final Whistle. Well Done\nYou 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 >= 40 && 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 < 40) {
	alert("Not very good, I'm afraid! You only managed to get " + correct + " correct.\nThat is " + percent + "% of the total possible answers.\nThat is a not a very good score");
	}
}

