function reset() {
	location = "problems_space.html";
}

function checkme() {
	var win = window.open("","solution","width=600,height=300,scrollbars,resizable");
	var myURL = window.location.pathname.match(/^.*\//);
	if (navigator.appName == "Microsoft Internet Explorer") {myURL = "";}


	win.document.write('<HTML>\n<HEAD>\n');
	win.document.write('<TITLE>Problems in Space Scorecard</TITLE>');
	win.document.write('</HEAD>\n');
	win.document.write('<BODY BACKGROUND="',myURL,'images/bgstars.gif" BGCOLOR="#000000" TEXT="#FFFFFF" LINK="#66FFFF" \n');
	win.document.write('VLINK="#33FF33" ALINK="#FF0000">\n');
	win.document.write('<h1 ALIGN="CENTER">Problems in Space Scorecard</h1></P><P>\n');
	win.document.write('<!--===========================================================--> \n');
	win.document.write('<P ALIGN="CENTER"><IMG SRC="',myURL,'images/shut_l.gif" alt="Shuttle"></P><P> \n');

	win.document.write('<CENTER>\n');
	win.document.write('<TABLE BORDER=5 CELLPADDING=5>\n');
	win.document.write('<TR><TH ALIGN="CENTER">Name</TH>\n');
	win.document.write('    <TH ALIGN="CENTER">Reasoning</TH>\n');
	win.document.write('    <TH ALIGN="CENTER">Expert Rank</TH>\n');
	win.document.write('    <TH ALIGN="CENTER">Your Rank</TH>\n');
	win.document.write('    <TH ALIGN="CENTER">Error Points</TH></TR>\n');

var answer = new Array(15);
for (i = 0; i < 15; i++) {
	answer[i] = document.problems.elements[i].value;
	if ((!answer[i]) ||(answer[i] <= 0) || (answer[i] > 15)) {answer[i] = 0;}
}

win.document.write('<TR><TD>Box matches</TD>\n');
win.document.write('<TD>No oxygen on Moon to sustain flame:  virtually worthless</TD>\n');
win.document.write('<TD ALIGN="CENTER">15</TD>\n');
var score = answer[0];
var difference = 15 - score;
if (score == 0) {score = "Blank"; }
var total = difference;
if (difference != 0) {
	win.document.write('<TD ALIGN="CENTER"><FONT COLOR="#FF0000">' + score);
	win.document.write('</FONT></TD>\n');
	win.document.write('<TD ALIGN="CENTER"><FONT COLOR="#FF0000">' + difference);
	win.document.write('</FONT></TR></TR>\n\n');
}
else {
	win.document.write('<TD ALIGN="CENTER">' + score + '</TD><\n>');
	win.document.write('<TD ALIGN="CENTER">' + difference + '</TD></TR>\n\n');
}

	win.document.write('<TR><TD>Food concentrate</TD>\n');
	win.document.write('<TD>Efficient means of supplying energy requirements</TD>\n');
	win.document.write('<TD ALIGN="center">4</TD>\n');
   score = answer[1];
   if (score <= 4) { difference = 4 - score; }
   else             { difference = score - 4; }
   if (score == 0) { score = 'Blank'; }
   total += difference;
   if (difference != 0) { 
    	win.document.write('<TD ALIGN="center"><FONT COLOR="#FF0000">' + score + '</FONT></TD>\n');
    	win.document.write('<TD ALIGN="center"><FONT COLOR="#FF0000">' + difference + '</FONT></TD></TR>\n\n');
   }
   else {
    	win.document.write('<TD ALIGN="center">' + score + '</TD>\n');
    	win.document.write('<TD ALIGN="center">' + difference + '</TD></TR>\n\n');
   }
	win.document.write('<TR><TD>Eighteen meters of nylon rope</TD>\n');
	win.document.write('<TD>Useful in scaling cliffs and/or tying injured together</TD>\n');
	win.document.write('<TD ALIGN="center">6</TD>\n');
   score = answer[2];
   if (score <= 6) { difference = 6 - score; }
   else             { difference = score - 6; }
   if (score == 0) { score = 'Blank'; }
   total += difference;
   if (difference != 0) { 
    	win.document.write('<TD ALIGN="center"><FONT COLOR="#FF0000">' + score + '</FONT></TD>\n');
    	win.document.write('<TD ALIGN="center"><FONT COLOR="#FF0000">' + difference + '</FONT></TD></TR>\n\n');
   }
   else {
    	win.document.write('<TD ALIGN="center">' + score + '</TD>\n');
    	win.document.write('<TD ALIGN="center">' + difference + '</TD></TR>\n\n');
   }
	win.document.write('<TR><TD>Parachute silk</TD>\n');
	win.document.write('<TD>Protection from the Sun\'s rays</TD>\n');
	win.document.write('<TD ALIGN="center">8</TD>\n');
   score = answer[3];
   if (score <= 8) { difference = 8 - score; }
   else             { difference = score - 8; }
   if (score == 0) { score = 'Blank'; }
   total += difference;
   if (difference != 0) { 
    	win.document.write('<TD ALIGN="center"><FONT COLOR="#FF0000">' + score + '</FONT></TD>\n');
    	win.document.write('<TD ALIGN="center"><FONT COLOR="#FF0000">' + difference + '</FONT></TD></TR>\n\n');
   }
   else {
    	win.document.write('<TD ALIGN="center">' + score + '</TD>\n');
    	win.document.write('<TD ALIGN="center">' + difference + '</TD></TR>\n\n');
   }
	win.document.write('<TR><TD>Solar-powered heating unit</TD>\n');
	win.document.write('<TD>Not needed unless on dark side</TD>\n');
	win.document.write('<TD ALIGN="center">13</TD>\n');
   score = answer[4];
   if (score <= 13) { difference = 13 - score; }
   else              { difference = score - 13; }
   if (score == 0) { score = 'Blank'; }
   total += difference;
   if (difference != 0) { 
    	win.document.write('<TD ALIGN="center"><FONT COLOR="#FF0000">' + score + '</FONT></TD>\n');
    	win.document.write('<TD ALIGN="center"><FONT COLOR="#FF0000">' + difference + '</FONT></TD></TR>\n\n');
   }
   else {
    	win.document.write('<TD ALIGN="center">' + score + '</TD>\n');
    	win.document.write('<TD ALIGN="center">' + difference + '</TD></TR>\n\n');
   }
	win.document.write('<TR><TD>Two .45 caliber pistols</TD>\n');
	win.document.write('<TD>Possible means of self-propulsion</TD>\n');
	win.document.write('<TD ALIGN="center">11</TD>\n');
   score = answer[5];
   if (score <= 11) { difference = 11 - score; }
   else              { difference = score - 11; }
   if (score == 0) { score = 'Blank'; }
   total += difference;
   if (difference != 0) { 
    	win.document.write('<TD ALIGN="center"><FONT COLOR="#FF0000">' + score + '</FONT></TD>\n');
    	win.document.write('<TD ALIGN="center"><FONT COLOR="#FF0000">' + difference + '</FONT></TD></TR>\n\n');
   }
   else {
    	win.document.write('<TD ALIGN="center">' + score + '</TD>\n');
    	win.document.write('<TD ALIGN="center">' + difference + '</TD></TR>\n\n');
   }
	win.document.write('<TR><TD>One case of powdered milk</TD>\n');
	win.document.write('<TD>Bulkier duplication of food concentrate</TD>\n');
	win.document.write('<TD ALIGN="center">12</TD>\n');
   score = answer[6];
   if (score <= 12) { difference = 12 - score; }
   else              { difference = score - 12; }
   if (score == 0) { score = 'Blank'; }
   total += difference;
   if (difference != 0) { 
    	win.document.write('<TD ALIGN="center"><FONT COLOR="#FF0000">' + score + '</FONT></TD>\n');
    	win.document.write('<TD ALIGN="center"><FONT COLOR="#FF0000">' + difference + '</FONT></TD></TR>\n\n');
   }
   else {
    	win.document.write('<TD ALIGN="center">' + score + '</TD>\n');
    	win.document.write('<TD ALIGN="center">' + difference + '</TD></TR>\n\n');
   }
	win.document.write('<TR><TD>Two tanks of oxygen</TD>\n');
	win.document.write('<TD>Most pressing survival need</TD>\n');
	win.document.write('<TD ALIGN="center">1</TD>\n');
   score = answer[7];
   if (score == 0) { score = 'Blank'; difference = 1; }
   else { difference = score - 1; }
   total += difference;
   if (difference != 0) { 
    	win.document.write('<TD ALIGN="center"><FONT COLOR="#FF0000">' + score + '</FONT></TD>\n');
    	win.document.write('<TD ALIGN="center"><FONT COLOR="#FF0000">' + difference + '</FONT></TD></TR>\n\n');
   }
   else {
    	win.document.write('<TD ALIGN="center">' + score + '</TD>\n');
    	win.document.write('<TD ALIGN="center">' + difference + '</TD></TR>\n\n');
   }
	win.document.write('<TR><TD>Stellar map (of the Moon\'s constellations)</TD>\n');
	win.document.write('<TD>Primary means of navigation</TD>\n');
	win.document.write('<TD ALIGN="center">3</TD>\n');
   score = answer[8];
   if (score <= 3) { difference = 3 - score; }
   else             { difference = score - 3; }
   if (score == 0) { score = 'Blank'; }
   total += difference;
   if (difference != 0) { 
    	win.document.write('<TD ALIGN="center"><FONT COLOR="#FF0000">' + score + '</FONT></TD>\n');
    	win.document.write('<TD ALIGN="center"><FONT COLOR="#FF0000">' + difference + '</FONT></TD></TR>\n\n');
   }
   else {
    	win.document.write('<TD ALIGN="center">' + score + '</TD>\n');
    	win.document.write('<TD ALIGN="center">' + difference + '</TD></TR>\n\n');
   }
	win.document.write('<TR><TD>Self-inflating life raft</TD>\n');
	win.document.write('<TD>CO<SUB>2</SUB> bottle in raft may be used for propulsion</TD>\n');
	win.document.write('<TD ALIGN="center">9</TD>\n');
   score = answer[9];
   if (score <= 9) { difference = 9 - score; }
   else             { difference = score - 9; }
   if (score == 0) { score = 'Blank'; }
   total += difference;
   if (difference != 0) { 
    	win.document.write('<TD ALIGN="center"><FONT COLOR="#FF0000">' + score + '</FONT></TD>\n');
    	win.document.write('<TD ALIGN="center"><FONT COLOR="#FF0000">' + difference + '</FONT></TD></TR>\n\n');
   }
   else {
    	win.document.write('<TD ALIGN="center">' + score + '</TD>\n');
    	win.document.write('<TD ALIGN="center">' + difference + '</TD></TR>\n\n');
   }
	win.document.write('<TR><TD>Magnetic compass</TD>\n');
	win.document.write('<TD>Magnetic field on Moon is not polarized; worthless for navigation</TD>\n');
	win.document.write('<TD ALIGN="center">14</TD>\n');
   score = answer[10];
   if (score <= 14) { difference = 14 - score; }
   else              { difference = score - 14; }
   if (score == 0) { score = 'Blank'; }
   total += difference;
   if (difference != 0) { 
    	win.document.write('<TD ALIGN="center"><FONT COLOR="#FF0000">' + score + '</FONT></TD>\n');
    	win.document.write('<TD ALIGN="center"><FONT COLOR="#FF0000">' + difference + '</FONT></TD></TR>\n\n');
   }
   else {
    	win.document.write('<TD ALIGN="center">' + score + '</TD>\n');
    	win.document.write('<TD ALIGN="center">' + difference + '</TD></TR>\n\n');
   }
	win.document.write('<TR><TD>Fifteen liters of water</TD>\n');
	win.document.write('<TD>Replacement for tremendous liquid loss on lighted side</TD>\n');
	win.document.write('<TD ALIGN="center">2</TD>\n');
   score = answer[11];
   if (score <= 2) { difference = 2 - score; }
   else             { difference = score - 2; }
   if (score == 0) { score = 'Blank'; }
   total += difference;
   if (difference != 0) { 
    	win.document.write('<TD ALIGN="center"><FONT COLOR="#FF0000">' + score + '</FONT></TD>\n');
    	win.document.write('<TD ALIGN="center"><FONT COLOR="#FF0000">' + difference + '</FONT></TD></TR>\n\n');
   }
   else {
    	win.document.write('<TD ALIGN="center">' + score + '</TD>\n');
    	win.document.write('<TD ALIGN="center">' + difference + '</TD></TR>\n\n');
   }
	win.document.write('<TR><TD>Signal flares</TD>\n');
	win.document.write('<TD>Can be used as a distress signal</TD>\n');
	win.document.write('<TD ALIGN="center">10</TD>\n');
   score = answer[12];
   if (score <= 10) { difference = 10 - score; }
   else              { difference = score - 10; }
   if (score == 0) { score = 'Blank'; }
   total += difference;
   if (difference != 0) { 
    	win.document.write('<TD ALIGN="center"><FONT COLOR="#FF0000">' + score + '</FONT></TD>\n');
    	win.document.write('<TD ALIGN="center"><FONT COLOR="#FF0000">' + difference + '</FONT></TD></TR>\n\n');
   }
   else {
    	win.document.write('<TD ALIGN="center">' + score + '</TD>\n');
    	win.document.write('<TD ALIGN="center">' + difference + '</TD></TR>\n\n');
   }
	win.document.write('<TR><TD>First-aid kit</TD>\n');
	win.document.write('<TD>Vitamins, medicines, <I>etc.</I> can be used to sustain health</TD>\n');
	win.document.write('<TD ALIGN="center">7</TD>\n');
   score = answer[13];
   if (score <= 7) { difference = 7 - score; }
   else             { difference = score - 7; }
   if (score == 0) { score = 'Blank'; }
   total += difference;
   if (difference != 0) { 
    	win.document.write('<TD ALIGN="center"><FONT COLOR="#FF0000">' + score + '</FONT></TD>\n');
    	win.document.write('<TD ALIGN="center"><FONT COLOR="#FF0000">' + difference + '</FONT></TD></TR>\n\n');
   }
   else {
    	win.document.write('<TD ALIGN="center">' + score + '</TD>\n');
    	win.document.write('<TD ALIGN="center">' + difference + '</TD></TR>\n\n');
   }
	win.document.write('<TR><TD>Solar-powered FM  Walkie Talkie</TD>\n');
	win.document.write('<TD>For communication with rescue party; but FM requires line-of-sight \n');
	win.document.write('    transmission and short ranges</TD>\n');
	win.document.write('<TD ALIGN="center">5</TD>\n');
   score = answer[14];
   if (score <= 5) { difference = 5 - score; }
   else             { difference = score - 5; }
   if (score == 0) { score = 'Blank'; }
   total += difference;
   if (difference != 0) { 
    	win.document.write('<TD ALIGN="center"><FONT COLOR="#FF0000">' + score + '</FONT></TD>\n');
    	win.document.write('<TD ALIGN="center"><FONT COLOR="#FF0000">' + difference + '</FONT></TD></TR>\n\n');
   }
   else {
    	win.document.write('<TD ALIGN="center">' + score + '</TD>\n');
    	win.document.write('<TD ALIGN="center">' + difference + '</TD></TR>\n\n');
   }
	win.document.write('<TR><TD COLSPAN=3>&nbsp;</TD><TD>Total</TD>');
	win.document.write('<TD ALIGN="center">' + total + '</TD>\n</TABLE><P>\n');
 
   if (total <= 25) { win.document.write('Excellent!<P>\n'); }
   else if (total <= 32) { win.document.write('Good!<P>\n'); }
   else if (total <= 45) { win.document.write('Average<P>\n'); }
   else if (total <= 55) { win.document.write('Fair<P>\n'); }
   else if (total <= 70) { win.document.write('Poor<P>\n'); }
   else { win.document.write('Very Poor (Suggests use of Earth-bound logic)<P>\n'); }
	win.document.write('<CENTER>\n');
	win.document.write('<FORM>\n');
	win.document.write('<TABLE BORDER=5 CELLPADDING=10>\n');
	win.document.write('<TR><TD ALIGN="CENTER">\n');
	win.document.write('          <INPUT TYPE=button VALUE="Close" onClick="window.close()" name="Close">\n');
	win.document.write('        </TD></TR>\n');
	win.document.write('</TABLE>\n');
	win.document.write('</FORM>\n');
	win.document.write('</CENTER>\n');
	win.document.write('<!--=============================================================-->\n');
	win.document.write('<P ALIGN="CENTER"><IMG SRC="',myURL,'images/shut_r.gif" alt="Shuttle"></P><P>\n');

	win.document.write('  </BODY>\n');
	win.document.write('</html>\n');
   win.document.close();
}



