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('John Adams', new Array()));
	answers.push( new inans('Thomas Jefferson', new Array()));
	answers.push( new inans('Aaron Burr', new Array()));
	answers.push( new inans('George Clinton', new Array()));
	answers.push( new inans('Elbridge Gerry', new Array()));
	answers.push( new inans('Daniel D. Tompkins', new Array('Daniel Tompkins')));
	answers.push( new inans('John Caldwell Calhoun', new Array('John Calhoun')));
	answers.push( new inans('Martin Van Buren', new Array()));
	answers.push( new inans('Richard Mentor Johnson', new Array('Richard Johnson')));
	answers.push( new inans('John Tyler', new Array()));
	answers.push( new inans('George Mifflin Dallas', new Array('George Dallas')));
	answers.push( new inans('Millard Fillmore', new Array()));
	answers.push( new inans('William Rufus de Vane King', new Array('William King','William Rufus King')));
	answers.push( new inans('John Cabell Breckinridge', new Array('John Breckinridge')));
	answers.push( new inans('Hannibal Hamlin', new Array()));
	answers.push( new inans('Andrew Johnson', new Array()));
	answers.push( new inans('Lafayette Sabine Foster (Acting)', new Array('Lafayette Sabine Foster','Lafayette Foster')));
	answers.push( new inans('Schuyler Colfax', new Array()));
	answers.push( new inans('Henry Wilson', new Array()));
	answers.push( new inans('William Almon Wheeler', new Array('William Wheeler')));
	answers.push( new inans('Chester Alan Arthur', new Array('Chester Arthur')));
	answers.push( new inans('Thomas Andrews Hendricks', new Array('Thomas Hendricks')));
	answers.push( new inans('Levi Parsons Morton', new Array('Levi Morton')));
	answers.push( new inans('Adlai Ewing Stevenson', new Array('Adlai Stevenson')));
	answers.push( new inans('Garret Augustus Hobart', new Array('Garret Hobart')));
	answers.push( new inans('Theodore Roosevelt', new Array('Teddy Roosevelt')));
	answers.push( new inans('Charles Warren Fairbanks', new Array('Charles Fairbanks')));
	answers.push( new inans('James Schoolcraft Sherman', new Array('James Sherman')));
	answers.push( new inans('Thomas Riley Marshall', new Array('Thomas Marshall')));
	answers.push( new inans('John Calvin Coolidge', new Array('Calvin Coolidge')));
	answers.push( new inans('Charles Gates Dawes', new Array('Charles Dawes')));
	answers.push( new inans('Charles Curtis', new Array()));
	answers.push( new inans('John Nance Garner', new Array('John Garner','Cactus Jack')));
	answers.push( new inans('Henry Agard Wallace', new Array('Henry Wallace')));
	answers.push( new inans('Harry S. Truman', new Array('Harry Truman')));
	answers.push( new inans('Alben William Barkley', new Array('Alben Barkley')));
	answers.push( new inans('Richard Milhous Nixon', new Array('Richard Nixon')));
	answers.push( new inans('Lyndon Baines Johnson', new Array('Lyndon Johnson')));
	answers.push( new inans('Hubert Horatio Humphrey', new Array('Hubert Humphrey')));
	answers.push( new inans('Spiro Theodore Agnew', new Array('Spiro Agnew')));
	answers.push( new inans('Gerald Rudolph Ford Jr.', new Array('Gerald Ford','Jerry Ford')));
	answers.push( new inans('Nelson Aldrich Rockefeller', new Array('Nelson Rockefeller')));
	answers.push( new inans('Walter Frederick Mondale', new Array('Walter Mondale','Fritz Mondale')));
	answers.push( new inans('George Herbert Walker Bush', new Array('George Bush','George HW Bush')));
	answers.push( new inans('James Danforth Quayle', new Array('James Quayle','Dan Quayle')));
	answers.push( new inans('Albert Arnold Gore, Jr.', new Array('Albert Gore','Al Gore')));
	answers.push( new inans('Richard Bruce Cheney', new Array('Richard Cheney','Dick Cheney')));
	answers.push( new inans('Joseph Robinette Biden', new Array('Joe Biden','Joseph Biden','Biden','Joseph Robinette Biden')));
	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 managed to name them all, you sure know your American History.\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 >= 33 && 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 >= 10 && percent < 33) {
	alert("Not bad! You managed to get " + correct + " correct.\nThat is " + percent + "% of the total possible answers.\nThat is a average score");
	}
	if ( percent < 10) {
	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");
	}
}

