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

var hemisphere = "north";
var index;
index = window.opener.document.song.hemisphere.selectedIndex;
hemisphere = window.opener.document.song.hemisphere.options[index].value;


table = new Array(4);
audio = new Array(4);
table_correct = new Array("2","3","4","1");
audio_correct = new Array("2","4","1","3");
table2_correct = new Array("4","1","2","3");

for (i = 0; i < 4; i++) {
	table[i] = window.opener.document.song.elements[i+1].value;
	if (!table[i]) {table[i] = "Blank";}
	table[i] = table[i].toUpperCase();
	audio[i] = window.opener.document.song.elements[i+5].value;
	if (!audio[i]) {audio[i] = "Blank";}
	audio[i] = audio[i].toUpperCase();
}

document.write('<HTML>\n<HEAD>\n<TITLE>A Song For All Seasons - Results');
document.write('</TITLE>\n</HEAD>\n');
document.write('<BODY BACKGROUND="/Images/heasarc/icons/bgstars.gif"\n');
document.write('BGCOLOR="#000000" TEXT="#FFFFFF" LINK="#66FFFF" \n');
document.write('VLINK="#33FF33" ALINK="#FF0000">\n');
document.write('<H1 ALIGN="CENTER">A Song For All Seasons - Results</H1>\n');
document.write('<!--=====================================================-->\n');
document.write('<P ALIGN="CENTER"><IMG SRC="/Images/heasarc/icons/shut_l.gif">');
document.write('</P><P>\n\n');
document.write('<P ALIGN="CENTER">\n');
document.write('<IMG BORDER=5 ALT="Earth\'s orbit around the Sun"\n');
document.write('SRC="/Images/StarChild/solar_system_level2/vivaldi.gif"></P><P>\n\n');

document.write('<CENTER>\n<TABLE BORDER=5 CELLPADDING=5 CELLSPACING=5>\n');
document.write('<TR><TH>Season</TH><TD>&nbsp\;</TD><TD>Spring</TD>\n');
document.write('<TD>Summer</TD><TD>Fall</TD><TD>Winter</TD></TR>\n');

if (hemisphere == "south") {
	document.write('<TR><TH ROWSPAN=2>Graph</TH>\n');
	document.write('    <TH>The Correct Answer</TH>\n');
	document.write('    <TD ALIGN="CENTER">4</TD>\n');
	document.write('    <TD ALIGN="CENTER">1</TD>\n');
	document.write('    <TD ALIGN="CENTER">2</TD>\n');
	document.write('    <TD ALIGN="CENTER">3</TD></TR>\n');
	document.write('    <TH>Your Answer</TH>\n');
	for (i = 0; i < 4;  i++) {
		if (table[i] == table2_correct[i]) {
			document.write('    <TD ALIGN="CENTER">' + table[i]);
			document.write('</TD>\n');
		}
		else {
			document.write('    <TD ALIGN="CENTER">');
			document.write('<FONT COLOR="#FF0000">' + table[i]);
			document.write('</FONT></TD>\n');
		}
	}
	document.write('</TR>\n');
}
else {
	document.write('<TR><TH ROWSPAN=2>Earth\'s Orbit Chart</TH>\n');
	document.write('    <TH>The Correct Answer</TH>\n');
	document.write('    <TD ALIGN="CENTER">2</TD>\n');
	document.write('    <TD ALIGN="CENTER">3</TD>\n');
	document.write('    <TD ALIGN="CENTER">4</TD>\n');
	document.write('    <TD ALIGN="CENTER">1</TD></TR>\n');
	document.write('    <TH>Your Answer</TH>\n');
	for (i = 0; i < 4;  i++) {
		if (table[i] == table_correct[i]) {
			document.write('    <TD ALIGN="CENTER">' + table[i]);
			document.write('</TD>\n');
		}
		else {
			document.write('    <TD ALIGN="CENTER">');
			document.write('<FONT COLOR="#FF0000">' + table[i]);
			document.write('</FONT></TD>\n');
		}
	}
	document.write('</TR>\n');
}
document.write('<TR><TH ROWSPAN=2>Audio</TH>\n');
document.write('    <TH>The Correct Answer</TH>\n');
document.write('    <TD ALIGN="CENTER">2</TD>\n');
document.write('    <TD ALIGN="CENTER">4</TD>\n');
document.write('    <TD ALIGN="CENTER">1</TD>\n');
document.write('    <TD ALIGN="CENTER">3</TD></TR>\n');
document.write('<TR><TH>Your Answer</TH>\n');
for (i = 0; i < 4;  i++) {
	if (audio[i] == audio_correct[i]) {
		document.write('    <TD ALIGN="CENTER">' + audio[i]);
		document.write('</TD>\n');
	}
	else {
		document.write('    <TD ALIGN="CENTER">');
		document.write('<FONT COLOR="#FF0000">' + audio[i]);
		document.write('</FONT></TD>\n');
	}
}
document.write('</TR>\n');
document.write('</TABLE>\n</CENTER>\n\n');
document.write('<!--=====================================================-->\n');
document.write('<P ALIGN="CENTER"><IMG SRC="/Images/heasarc/icons/shut_r.gif">');
document.write('</P><P>\n\n');

document.write('<CENTER>\n')
document.write('<FORM>\n');
document.write('<TABLE BORDER=5 CELLPADDING=10>\n');
document.write('<TR><TD ALIGN=\"CENTER\">\n');
document.write('<INPUT TYPE=button VALUE="Close" onClick="window.close()"></TD></TR>\n');
document.write('</TABLE>\n');
document.write('</FORM>\n');
document.write('</CENTER>\n');
document.write('</BODY>\n</HTML>\n');
document.close();

