var vminutes = 3;
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('Athens (1896, 2004)', new Array('Athens')));
	answers.push( new inans('Paris (1900, 1924)', new Array('Paris')));
	answers.push( new inans('St. Louis (1904)', new Array('St Louis','St. Louis','Saint Louis')));
	answers.push( new inans('London (1908, 1948, 2012)', new Array('London')));
	answers.push( new inans('Stockholm (1912, 1956)', new Array('Stockholm')));
	answers.push( new inans('Antwerp (1920)', new Array('Antwerp')));
	answers.push( new inans('Amsterdam (1928)', new Array('Amsterdam')));
	answers.push( new inans('Los Angeles (1932, 1984)', new Array('Los Angeles')));
	answers.push( new inans('Berlin (1936)', new Array('Berlin')));
	answers.push( new inans('Helsinki (1952)', new Array('Helsinki')));
	answers.push( new inans('Melbourne (1956)', new Array('Melbourne')));
	answers.push( new inans('Rome (1960)', new Array('Rome')));
	answers.push( new inans('Tokyo (1964)', new Array('Tokyo')));
	answers.push( new inans('Mexico City (1968)', new Array('Mexico City')));
	answers.push( new inans('Munich (1972)', new Array('Munich')));
	answers.push( new inans('Montreal (1976)', new Array('Montreal')));
	answers.push( new inans('Moscow (1980)', new Array('Moscow')));
	answers.push( new inans('Seoul (1988)', new Array('Seoul')));
	answers.push( new inans('Barcelona (1992)', new Array('Barcelona')));
	answers.push( new inans('Atlanta (1996)', new Array('Atlanta')));
	answers.push( new inans('Sydney (2000)', new Array('Sydney')));
	answers.push( new inans('Beijing (2008)', new Array('Beijing')));
	remaining = answers.length;
	displayRemaining();
}

function doEndAlert()
{
	var total = (correct + remaining);
	var percentunrounded = (correct/total) * 100;
	var percent = roundNumber(percentunrounded,2)
	if ( percent == 100 ) {
	alert("Absolutely Amazing, You named every city\nA Gold Medal for you.\nYou got all " + correct + " answers correct.\nWell done!!!");
	}
	if ( percent >= 70 && 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 >= 40 && 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 >= 25 && percent < 40) {
	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 < 25) {
	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");
	}
}

