
function grade(){
        answers = new makeArray(2, 3, 3, 1, 0, 2, 3, 0, 1, 3);
        explain = new makeArray(
        		'<b>C.</b> Ronald Reagan. <IMG SRC="http://www.washingtonpost.com/wp-srv/onpolitics/graphics/reagan.jpg" WIDTH="77" HEIGHT="58" BORDER="0" VSPACE="3" HSPACE="3" ALIGN="left" ALT="Ronald Reagan">His first inauguration in 1981 was the warmest January inauguration in history at 55 degrees. In 1985 the temperature was 7 degrees, so cold the swearing-in ceremony was moved indoors to the Capitol Rotunda.',
                '<b>D.</b> William Henry Harrison in 1841. Even though the temperature for his inauguration is estimated at 48 degrees, the day was damp and blustery. He rode a horse to and from the Capitol without an overcoat and developed a cold that turned into pneumonia.',
                '<b>D.</b> Lyndon Johnson. <IMG SRC="http://www.washingtonpost.com/wp-srv/onpolitics/graphics/johnson.jpg" WIDTH="77" HEIGHT="58" BORDER="0" VSPACE="3" HSPACE="3" ALIGN="left" ALT="Lyndon Johnson">Johnson took the oath aboard Air Force One after John F. Kennedy was assassinated in Dallas, Texas, in 1963.',
                '<b>B.</b> Warren G. Harding at his inauguration in 1921.',
                '<b>A.</b> <IMG SRC="http://www.washingtonpost.com/wp-srv/onpolitics/graphics/bush.jpg" WIDTH="77" HEIGHT="58" BORDER="0" VSPACE="3" HSPACE="3" ALIGN="left" ALT="George Bush Sr.">George Bush in his 1989 inaugural address.',
                '<b>C.</b> Thomas Jefferson in 1801. He defeated the incumbent Federalist John Adams and his Republican rival Aaron Burr when the House of Representatives voted to break a tie in the Electoral College between Jefferson and Burr. Burr became the vice president.',
                '<b>D.</b> Andrew Jackson in 1829. Jackson was the first president elected from outside the original 13 colonies. This was seen as a victory for the &quot;common citizen,&quot; many of whom attended the inauguration and partied with abandon. When wine and ice cream were served outdoors, the guests rushed out of the White House using all exits, including windows.',
                '<b>A.</b> <IMG SRC="http://www.washingtonpost.com/wp-srv/onpolitics/graphics/teddy.jpg" WIDTH="77" HEIGHT="58" BORDER="0" VSPACE="3" HSPACE="3" ALIGN="left" ALT="Theodore Roosevelt">Theodore Roosevelt in 1901. After the assassination of President William McKinley in Buffalo at the Pan-American Exposition, Vice President Theodore Roosevelt was sworn in immediately nearby.',
                '<b>B.</b> James Buchanan. He was inaugurated in 1857 in front of the Capitol, which was still under construction.',
                '<b>D.</b> Grover Cleveland in 1885. He defeated James G. Blaine by a narrow margin. Cleveland was the president of firsts&#58; first to marry in the White House, first to have a child born while in office, first (and only) president to be elected to two nonconsecutive terms.'
                );
        score = (calculateScore());
        newWindow = window.open('','new','screenX=100,screenY=100,width=550,height=350,scrollbars=yes');
        newWindow.focus();
        newWindow.document.writeln('<html><head><title>Inauguration History Quiz Answers</title></head>');
        newWindow.document.writeln('<BODY BGCOLOR="#333399">');
        newWindow.document.writeln('<TABLE WIDTH="500" CELLPADDING="0" CELLSPACING="0" ALIGN="CENTER" BORDER="0"><TR><TD WIDTH="10" HEIGHT="6"><SPACER TYPE="BLOCK" WIDTH="10" HEIGHT="6"></TD><TD WIDTH="480" HEIGHT="6"><SPACER TYPE="BLOCK" WIDTH="480" HEIGHT="6"></TD><TD WIDTH="10" HEIGHT="6"><SPACER TYPE="BLOCK" WIDTH="10" HEIGHT="6"></TD></TR><TR><TD COLSPAN="3"><IMG SRC="http://media.washingtonpost.com/wp-srv/kids/images/banner_art_popup.gif" width="500" height="18" vspace="0" hspace="0" border="0"></TD></TR><TR><TD BGCOLOR="#FFFFFF"><BR></TD><TD BGCOLOR="#FFFFFF">');
        newWindow.document.writeln('<font face="verdana, arial" size="+1" color="#990000"><b>Answers</b></font><BR><font face="verdana,arial,helvetica" size="2">You answered ' + score + ' out of 10 questions correctly. ');
                var plural;
                if (score < 9){
                        plural = 's';
                } else{
                        plural = '';
                }
                if (score <= 4) newWindow.document.writeln('Back to the books and try again.');
                else if (score <= 7) newWindow.document.writeln('Demand a recount!');
                else if (score <= 10) newWindow.document.writeln('You are ready to take the oath!');
                newWindow.document.writeln('<P>');
                for (var count = 0; count < 10; count++){
                        if (userAnswer[count] != answers[count]){
                                questionCount = count + 1;
                                newWindow.document.writeln('<b>' + questionCount + ': <FONT COLOR="#990000">Whoops!</FONT> The answer is</b> ' + explain[count] + '<br clear=all><p>');
                        } else{
                                questionCount = count + 1;
                                newWindow.document.writeln('<B>' + questionCount + ': <FONT COLOR="#333399">You were right!</FONT></B> ' + explain[count] + '<br clear=all><p>');
                        }
                } newWindow.document.writeln('<p><center><a href="http://washingtonpost.com/wp-srv/onpolitics/elections/inauguration.htm" target="_blank"><font size="-2" face="verdana,arial,helvetica" color="#333399">Full Inauguration Coverage</font></a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="http://washingtonpost.com/wp-dyn/photo/politics/G10048-2001Jan02.html" target="_blank"><font size="-2" face="verdana,arial,helvetica" color="#333399">Inaugural History Photo Gallery</font></a></center></p><p><center><font size="-2" face="verdana,arial,helvetica" color="#333399">&copy; <a href="http://washingtonpost.com/wp-srv/interact/longterm/talk/copy.htm" target="_blank"><font size="-2" face="verdana,arial,helvetica" color="#333399"><b>Copyright</b></font></a> 2001 The Washington Post Company</font></center></p></blockquote>');
        newWindow.document.writeln('<BR></TD><TD BGCOLOR="#ffffff"><br></TD></TR><TR><TD WIDTH="10" HEIGHT="8">&nbsp;&nbsp;</TD><TD WIDTH="480" HEIGHT="8">&nbsp;&nbsp;</TD><TD WIDTH="10" HEIGHT="8">&nbsp;&nbsp;</TD></TR></TABLE></body></html>');
}
function calculateScore(){
        right = 0;
        userAnswer = new Array(10);
        for (var qCount = 0; qCount < 10; qCount++){
                for (var count = 0; count < 4; count++){
                        if (document.quiz.elements[(qCount * 4) + count].checked == 1){
                                userAnswer[qCount] = count;
                        }
                }
        } for (var count = 0; count < 10; count++){
                if (userAnswer[count] == answers[count]){
                        right++;
                }
        } return right;
}
function makeArray(){
        for (var count = 0; count < makeArray.arguments.length; count++){
                this[count] = makeArray.arguments[count];
        }
}
