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('The Pickwick Papers', new Array('Pickwick Papers','The Posthumous Papers of the Pickwick Club','Posthumous Papers of the Pickwick Club','Pickwick Club')));
	answers.push( new inans('The Adventures of Oliver Twist', new Array('Adventures of Oliver Twist','Oliver Twist')));
	answers.push( new inans('The Life and Adventures of Nicholas Nickleby', new Array('Nicholas Nickleby')));
	answers.push( new inans('The Old Curiosity Shop', new Array('Old Curiosity Shop')));
	answers.push( new inans('Barnaby Rudge: A Tale of the Riots of \'Eighty', new Array('Barnaby Rudge')));
	answers.push( new inans('A Christmas Carol', new Array('Christmas Carol','A Christmas Carol in Prose','Being a Ghost Story of Christmas')));
	answers.push( new inans('The Chimes', new Array('Chimes')));
	answers.push( new inans('The Cricket on the Hearth', new Array('Cricket on the Hearth')));
	answers.push( new inans('The Battle of Life', new Array('Battle of Life')));
	answers.push( new inans('The Haunted Man and the Ghost\'s Bargain', new Array('Haunted Man and the Ghosts Bargain','A Fancy for Christmas Time')));
	answers.push( new inans('The Life and Adventures of Martin Chuzzlewit', new Array('Martin Chuzzlewit')));
	answers.push( new inans('Dombey and Son', new Array()));
	answers.push( new inans('David Copperfield', new Array()));
	answers.push( new inans('Bleak House', new Array()));
	answers.push( new inans('Hard Times: For These Times', new Array('Hard Times')));
	answers.push( new inans('Little Dorrit', new Array()));
	answers.push( new inans('A Tale of Two Cities', new Array('Tale of Two Cities')));
	answers.push( new inans('Great Expectations', new Array()));
	answers.push( new inans('Our Mutual Friend', new Array()));
	answers.push( new inans('The Mystery of Edwin Drood', new Array('Edwin Drood','Mystery of Edwin Drood')));
	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 named all of Charles Dickens Novels.\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 >= 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");
	}
}

