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


function loadanswers()
{
	answers = new Array();
	answers.push( new inans('Vienna', new Array()));
	answers.push( new inans('Brussels', new Array()));
	answers.push( new inans('Sofia', new Array()));
	answers.push( new inans('Nicosia', new Array()));
	answers.push( new inans('Prague', new Array()));
	answers.push( new inans('Copenhagen', new Array()));
	answers.push( new inans('Tallinn', new Array()));
	answers.push( new inans('Helsinki', new Array()));
	answers.push( new inans('Paris', new Array()));
	answers.push( new inans('Berlin', new Array()));
	answers.push( new inans('Athens', new Array()));
	answers.push( new inans('Budapest', new Array()));
	answers.push( new inans('Dublin', new Array()));
	answers.push( new inans('Rome', new Array()));
	answers.push( new inans('Riga', new Array()));
	answers.push( new inans('Vilnius', new Array()));
	answers.push( new inans('Luxembourg', new Array()));
	answers.push( new inans('Valletta', new Array()));
	answers.push( new inans('Amsterdam', new Array()));
	answers.push( new inans('Warsaw', new Array()));
	answers.push( new inans('Lisbon', new Array()));
	answers.push( new inans('Bucharest', new Array()));
	answers.push( new inans('Bratislava', new Array()));
	answers.push( new inans('Ljubljana', new Array()));
	answers.push( new inans('Madrid', new Array()));
	answers.push( new inans('Stockholm', new Array()));
	answers.push( new inans('London', 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 sure know your capital.\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 >= 25 && 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 < 25) {
	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");
	}
}
