var given = new Array(
	"This piece of equipment lets an astronaut \"chill out\" while in space.  It contains a radio, a cooling system and a fan.<BR></TD>\n",
	"The name of this piece of the EMU describes it perfectly.  It is worn on the inside.  It has a hook up which checks the astronaut's heart rate and reports it to mission control.  It looks like NASA's version of the extension cord.<BR></TD>\n",
	"All the electrical power needed for a walk in space is provided by this piece of equipment.  It's even rechargeable.<BR></TD>\n",
	"Thanks to this piece of the EMU no astronaut ever has to be late for dinner.  The sewn-in wristwatch and pieces which hold on to small tools make this a real handy piece of equipment.<BR></TD>\n",
	"In order for an astronaut to talk to mission control, this part of their EMU must fit just like a cap.<BR></TD>\n",
	"Astronauts become very thirsty while working in space.  This part of their EMU holds water and has a straw so they can grab a quick drink.<BR></TD>\n",
	"Though it looks silly, this part of the EMU is needed to keep the astronauts cool.  It fits the astronaut like a new pair of pajamas.<BR></TD>\n",
	"Most astronauts have very hard heads.  Without this part of the EMU, though, their hair could be messed up by asteroids blowing by.<BR></TD>\n",
	"Their favorite pair of shoes might not be along for the trip, but no need to worry.  This part of the EMU protects an astronaut's feet from passing meteoroids.<BR></TD>\n",
	"While wearing this piece of the EMU every astronaut looks like Arnold Schwarzenegger.  It's strong enough to support the life support system, the helmet and the drink bag.<BR></TD>\n")

var name = new Array(
	"Primary Life Support System",
	"EMU Electrical Harness",
	"Battery",
	"EVA Gloves",
	"Communications Carrier Assembly",
	"In-Suit Drink Bag",
	"Liquid Cooling-and-Ventilating Garment",
	"Helmet",
	"Lower Torso",
	"Hard Upper Torso")

var clue = new Array(10);
for (i = 0; i < 10; i ++) {
	clue[i] = window.opener.document.boutique.elements[i].value;
	if (!clue[i]) {clue[i] = "BLANK";}
	clue[i] = clue[i].toUpperCase();
}

var answer = new Array("H","Q","L","I","E","N","A","D","P","B");
var correct = 0;

for (i = 0; i < 10; i++) {
	if (clue[i] == answer[i]) {correct++;}
}

if (correct == 10) {
	document.write('<H2 ALIGN="CENTER">Congratulations!  ');
	document.write('You got 100%</H2>\n');
}
else {
	document.write('<H3 ALIGN="CENTER">You got ');
	document.write(correct + ' out of 10 correct!</H3>\n');
}

document.write('<CENTER>\n');
document.write('<TABLE BORDER=5 CELLPADDING=5 CELLSPACING=5>\n');
document.write('<TR><TH ALIGN="CENTER">Your Response</TH>');
document.write('<TH ALIGN="CENTER">The Correct Response</TH>');
document.write('<TH ALIGN="CENTER">Clue</TH>');
document.write('<TH ALIGN="CENTER">Name</TH></TR>\n');

for (i = 0; i < 10; i++) {
	document.write('<TR><TD ALIGN="CENTER">\n');
	if (clue[i] == answer[i]) {
		document.write(clue[i] + '<BR></TD>\n');
	}
	else if ((clue[i] == "A") || (clue[i] == "B") || (clue[i] == "C") ||
		(clue[i] == "D") || (clue[i] == "E") || (clue[i] == "F") ||
		(clue[i] == "G") || (clue[i] == "H") || (clue[i] == "I") ||
		(clue[i] == "J") || (clue[i] == "K") || (clue[i] == "L") ||
		(clue[i] == "M") || (clue[i] == "N") || (clue[i] == "O") ||
		(clue[i] == "P") || (clue[i] == "Q")) {
		document.write('<FONT COLOR="#FF0000">');
		document.write(clue[i] + '<BR></TD>\n');
	}
	else {
		document.write('No valid selection<BR></TD>\n');
	}
	document.write('<TD ALIGN="CENTER">' + answer[i] + '<BR></TD>\n');
	document.write('<TD>' + given[i]);
	document.write('<TD ALIGN="CENTER">' + name[i] + '<BR></TD></TR>\n');
}
document.write('</TABLE>\n');
document.write('</CENTER>\n');
document.close();






