var vminutes = 10;
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('The Time Machine', new Array('Time Machine')));
	answers.push( new inans('The Wonderful Visit', new Array('Wonderful Visit')));
	answers.push( new inans('The Island of Doctor Moreau', new Array('Island of Doctor Moreau')));
	answers.push( new inans('The Wheels of Chance', new Array('Wheels of Chance')));
	answers.push( new inans('The Invisible Man', new Array('Invisible Man')));
	answers.push( new inans('The War of the Worlds', new Array('War of the Worlds')));
	answers.push( new inans('Love and Mr Lewisham', new Array()));
	answers.push( new inans('When the Sleeper Awakes', new Array()));
	answers.push( new inans('The First Men in the Moon', new Array('First Men in the Moon')));
	answers.push( new inans('The Sea Lady', new Array('Sea Lady')));
	answers.push( new inans('The Food of the Gods and How It Came to Earth', new Array('Food of the Gods')));
	answers.push( new inans('Kipps', new Array()));
	answers.push( new inans('In the Days of the Comet', new Array()));
	answers.push( new inans('The War in the Air', new Array('War in the Air')));
	answers.push( new inans('Ann Veronica', new Array()));
	answers.push( new inans('Tono-Bungay', new Array('Tono Bungay','TonoBungay')));
	answers.push( new inans('The History of Mr Polly', new Array('History of Mr Polly')));
	answers.push( new inans('The Sleeper Awakes', new Array('Sleeper Awakes')));
	answers.push( new inans('The New Machiavelli', new Array('New Machiavelli')));
	answers.push( new inans('Marriage', new Array()));
	answers.push( new inans('The Passionate Friends', new Array('Passionate Friends')));
	answers.push( new inans('The Wife of Sir Isaac Harman', new Array('Wife of Sir Isaac Harman')));
	answers.push( new inans('The World Set Free', new Array('World Set Free')));
	answers.push( new inans('Bealby: A Holiday', new Array()));
	answers.push( new inans('The Research Magnificent', new Array('Research Magnificent')));
	answers.push( new inans('Mr Britling Sees it Through', new Array()));
	answers.push( new inans('The Soul of a Bishop', new Array('Soul of a Bishop')));
	answers.push( new inans('Joan and Peter: A Story of an Education', new Array('Joan and Peter')));
	answers.push( new inans('The Undying Fire', new Array('Undying Fire')));
	answers.push( new inans('The Secret Places of the Heart', new Array('Secret Places of the Heart')));
	answers.push( new inans('Men Like Gods', new Array()));
	answers.push( new inans('The Dream', new Array('Dream')));
	answers.push( new inans('Christina Alberta\'s Father', new Array('Christina Albertas Father')));
	answers.push( new inans('The World of William Clissold', new Array('World of William Clissold')));
	answers.push( new inans('Meanwhile', new Array()));
	answers.push( new inans('Mr Blettsworthy on Rampole Island', new Array()));
	answers.push( new inans('The King Who Was a King', new Array('King Who Was a King')));
	answers.push( new inans('The Autocracy of Mr Parham', new Array('Autocracy of Mr Parham')));
	answers.push( new inans('The Bulpington of Blup', new Array('Bulpington of Blup')));
	answers.push( new inans('The Shape of Things to Come', new Array('Shape of Things to Come')));
	answers.push( new inans('The Croquet Player', new Array('Croquet Player')));
	answers.push( new inans('Apropos of Dolores ', new Array()));
	answers.push( new inans('Brynhild', new Array()));
	answers.push( new inans('Star Begotten', new Array()));
	answers.push( new inans('The Camford Visitation', new Array('Camford Visitation')));
	answers.push( new inans('The Brothers', new Array('Brothers')));
	answers.push( new inans('The Holy Terror', new Array('Holy Terror')));
	answers.push( new inans('Babes in the Darkling Wood', new Array()));
	answers.push( new inans('You Can\'t Be Too Careful', 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 knew them all, TOTALLY AMAZING!!!.\nYou got all " + correct + " answers correct.\nWell done!!!");
	}
	if ( percent >= 50 && 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 >= 35 && percent < 50) {
	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 < 35) {
	alert("Good Job! You managed to get " + correct + " correct.\nThat is " + percent + "% of the total possible answers.\nThat is a good score");
	}
	if ( percent >= 5 && 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 < 5) {
	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");
	}
}

