
// Ignore this junk here :)
questionnum=-1;questions=new Array();choices=new Array();
answers=new Array();selected='(none chosen)';

/* Put your questions and answers below here. */

question("The surface area of the average human's lungs is equal to which playing area?");
correct_choice("Tennis Court");
choice("Chess Board");
choice("Soccer Field");
choice("Boxing Ring");

question("The type of cells found in the brain are also found in the spine and have been known to develop in some people on which part of the human anatomy?");
choice("Ear lobes");
choice("Kneecaps");
correct_choice("Fingertips");
choice("Chin");

question("True or false, sneezing can cause the sound barrier to be broken:");
correct_choice("True");
choice("False");

question("The household fly when it takes off in flight initially flies in which direction?");
choice("Vertically");
choice("Veering to the Right");
correct_choice("Backwards");
choice("Forwards");

question("Which of these occupations has the highest mortality rate per 1000 workers?");
choice("power-line worker");
choice("high-wire performer");
choice("lumberjack");
correct_choice("hydroplane driver");

question("Which of these is NOT part of the human eye?");
choice("iris");
correct_choice("alveoli");
choice("vitreous humor");
choice("choroid");

question("Which legal defense is also referred to as the 'Nuremburg Defense'?");
choice("Acted in self-defense");
choice("Not guilty due to insanity");
correct_choice("Just following orders");
choice("Followed Biblical precedent");

question("The tip, vamp, throat, collar and shank are all parts of this familiar item. Can you name it?");
choice("pencil sharpener");
choice("dress shirt");
choice("garbage disposal");
correct_choice("woman's shoe");

question("What are the fastest growing hairs on a male human body?");
choice("sideburns");
choice("nose hair");
choice("armpit hair");
correct_choice("beards");

question("True or false, a woman's heart beats faster than a man's.");
correct_choice("True");
choice("False");

question("Which of these has the largest eyes in the world?");
choice("Owl");
choice("Elephant");
correct_choice("Giant squid");
choice("Panda");

question("Which King in a deck of cards doesn't have a moustache?");
choice("King of Diamonds");
choice("King of Clubs");
choice("King of Spades");
correct_choice("King of Hearts");

question("What country has the most doughnut shops per capita?");
correct_choice("Canada");
choice("Australia");
choice("Britain");
choice("United States");

question("Coca-Cola was originally what color?");
choice("yellow");
choice("brown");
correct_choice("green");
choice("red");

question("Which of these aquatic birds have a unique courtship ritual--running upright on the water's surface so it looks like they're dancing?");
choice("Loons");
choice("Mallard ducks");
correct_choice("Grebes");
choice("Coots");

question("Which vegetable was considered an aristocratic delicacy in ancient Rome, and was one of Julius Caesar's favorite foods?");
choice("Scallions");
choice("Artichokes");
correct_choice("Asparagus");
choice("Tomatoes");

question("In what year was the Post-It-Note invented?");
choice("1980");
choice("1990");
choice("1977");
correct_choice("1983");

question("Which city has the largest number of movable mechanical bridges in the world?");
correct_choice("Chicago");
choice("New York City");
choice("Paris");
choice("New Orleans");

question("In 1995 how many pounds of paper did the average American use per year?");
choice("998");
correct_choice("731");
choice("264");
choice("502");

question("How much liquid will a ten gallon hat hold?");
choice("half gallon");
choice("one gallon");
choice("ten gallons");
correct_choice("three quarter gallon");

question("How many faces does an isocahedron have?");
correct_choice("20");
choice("13");
choice("21");
choice("11");

question("In golf, a score of three under par is known as what?");
choice("parrot");
choice("pigeon");
choice("eagle");
correct_choice("albatross");

question("Where is the world's largest Kmart?");
choice("United States");
correct_choice("Guam");
choice("Indonesia");
choice("China");

question("Nearly 50 percent of all bank robberies take place on this day.");
correct_choice("Friday");
choice("Thursday");
choice("Wednesday");
choice("Monday");

question("What part of our body is the same size from birth to death?");
choice("Spleen");
choice("Pancreas");
choice("Brain");
correct_choice("Eye(s)");

question("All of the following are used by a cook EXCEPT?");
choice("zester");
choice("skimmer");
choice("trussing needle");
correct_choice("vitrine");

question("What was the first and only recreational sport ever played on the moon?");
correct_choice("Golf");
choice("Hide and Seek");
choice("Baseball");
choice("A good game of catch");


/* Leave it alone below here please! */

q = Math.floor(Math.random() * questions.length);

document.write('<FORM onSubmit="check()" NAME="trivlet">' + questions[q] +  '<BR>\n');

for(var i=0; i<choices[q].length; i++) {
	document.write("&nbsp;&nbsp;&nbsp;&nbsp;<INPUT TYPE=\"radio\" NAME=\"answer\" onClick=\"selectMe('");
	document.write(choices[q][i]);
	document.write("')\">" + choices[q][i] + "<BR>\n");
}

//document.write('<INPUT TYPE="button" VALUE="Tell Me!" onClick="check()"></FORM>\n');
document.write("<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href=\"javascript:check()\">");
document.write("<img src=\"/images/tellme.gif\" border=\"0\" alt=\"Tell Me!\"></a></form>\n");

function check() {
	win = window.open("about:blank", "win", "width=300,height=200,dependent=yes,resizable=yes");
	win.document.open();
	win.document.writeln('<TITLE>Trivlet Answer</TITLE>');
	win.document.writeln('<FONT FACE="Arial,Helvetica"><P>' + questions[q] + '</P>');
	if(answers[q] == selected) {
		win.document.writeln("<P>Yes! The answer is <B>" +answers[q]+ "</B>");
	} else {
		win.document.writeln(
			"<P>No, the answer isn't " +
			selected + ". The correct answer is actually <B>" +
			answers[q] + "</B>"
		);
	}
	win.document.writeln('<SMALL><P><A HREF="javascript:window.close();">Close</A></SMALL></FONT>');
	win.document.close();
}

function selectMe(str) {
	selected = str;
}

function question(str) {
	questionnum++;
	questions[questionnum] = str;
	choices[questionnum] = new Array();
}

function correct_choice(str) {
	choice(str);
	answers[questionnum] = str;
}

function choice(str) {
	var choicenumber = choices[questionnum].length;
	choices[questionnum][choicenumber] = str;
}
