// a function to discover which radio button is selected
function radio_poll()
{  
  var correct = 0;
  var answerstring = "<body bgcolor=\"#f9b6b6\"><center><h2>Chapter 21 Homework Answers</h2></center><br>";
  // loop through all radio buttons                                   
  for(var i=0; i < window.document.forms.f.q1.length; i++)
  {        
    // if the radio is selected, use its value
    if( document.forms.f.q1[i].checked )
    {
      if(i == 0)
      {
        answerstring = "<b>1) Correct.</b> (You answered A)<br>-----<br>";
        correct++;
      }
      if(i != 0)
      {
        answerstring = "<b>1) Incorrect.</b> (You answered "+document.forms.f.q1[i].value+", the correct answer is A.)<br>Abraham Lincoln thought that the Union wouldn't be that long in battle, and that the it would be just a quick ride in to Richmond and to take over the capital. All of the choices besides A are too long, with the obvious exception of E, which is way too short.<br>-----<br>";
      }
    } 
  }
for(var i=0; i < window.document.forms.f.q2.length; i++)
  {        
    // if the radio is selected, use its value
    if( document.forms.f.q2[i].checked )
    {
      if(i == 2)
      {
        answerstring += "<b>2) Correct.</b> (You answered C)<br>-----<br>";
        correct++;
      }
      if(i != 2)
      {
        answerstring += "<b>2) Incorrect.</b> (You answered "+document.forms.f.q2[i].value+", the correct answer is C.)<br>The First Battle of Bull Run was the first Battle in the Civil War, Lincoln thought that the green troops could have a quick go at some of the forces at Bull Run (known as Manassas to the South), before they went through to Richmond. However, reinforcements suddenly appeared for the South, and the Union got their buts kicked in front of the Northern picnickers who had turned out to see the Union beat the Confederacy in the battle as bad as if the Yankees played the Devil Rays. And as for the Moon, well, it didn't join the Confederacy until later, when Lincoln asked for more troops.<br>-----<br>";
      }
    } 
  }
for(var i=0; i < window.document.forms.f.q3.length; i++)
  {        
    // if the radio is selected, use its value
    if( document.forms.f.q3[i].checked )
    {
      if(i == 3)
      {
        answerstring += "<b>3) Correct.</b> (You answered D)<br>-----<br>";
        correct++;
      }
      if(i != 3)
      {
        answerstring += "<b>3) Incorrect.</b> (You answered "+document.forms.f.q3[i].value+", the correct answer is D.)<br>McClellan was known for his unwillingness to use troops in battle. It went as extreme as the \"Masterly Inactivity on the Potomac\", in which both the Union and the Confederacy just kinda sat there for 6 months, drilling troops, and not doing anything. McClellan was so unwilling to use troops, that Lincoln had to force him to use them on a Peninsula Campaign.<br>-----<br>";
      }
    } 
  }
for(var i=0; i < window.document.forms.f.q4.length; i++)
  {        
    // if the radio is selected, use its value
    if( document.forms.f.q4[i].checked )
    {
      if(i == 1)
      {
        answerstring += "<b>4) Correct.</b> (You answered B)<br>-----<br>";
        correct++;
      }
      if(i != 1)
      {
        answerstring += "<b>4) Incorrect.</b> (You answered "+document.forms.f.q4[i].value+", the correct answer is B.)<br>Even after the 6 months on the Potomac, Lincoln was hoping that they could still blitz Richmond and that the war would quickly be over, and it led to the Peninsula Campaign. Since it didn't work, the Union was forced to start a total war against the Confederates.<br>-----<br>";
      }
    } 
  }  
for(var i=0; i < window.document.forms.f.q5.length; i++)
  {        
    // if the radio is selected, use its value
    if( document.forms.f.q5[i].checked )
    {
      if(i == 0)
      {
        answerstring += "<b>5) Correct.</b> (You answered A)<br>-----<br>";
        correct++;
      }
      if(i != 0)
      {
        answerstring += "<b>5) Incorrect.</b> (You answered "+document.forms.f.q5[i].value+", the correct answer is A.)<br>Lincoln had wanted since the start of the war to pass the Emancipation Proclamation, but he didn't want to pass it after a series of losses, as it would seem like the North was desperate, calling upon slaves as a last resort. Once the Battle of Antietam took place, it showed that the North could beat the South, and therefore Lincoln could raise the stakes, making it a war not only to reclaim land, but on a moral concept as well.<br>-----<br>";
      }
    } 
  }
for(var i=0; i < window.document.forms.f.q6.length; i++)
  {        
    // if the radio is selected, use its value
    if( document.forms.f.q6[i].checked )
    {
      if(i == 3)
      {
        answerstring += "<b>6) Correct.</b> (You answered D)<br>-----<br>";
        correct++;
      }
      if(i != 3)
      {
        answerstring += "<b>6) Incorrect.</b> (You answered "+document.forms.f.q6[i].value+", the correct answer is D.)<br>When Lincoln wrote the Emancipation Proclamation, he worded it so that it did not include slaves in the Border States because Lincoln did not want to lose the Border States. So the only slaves he freed were the ones he technically couldn't. The Emancipation Proclamation was more for boosting the morale of the North.<br>-----<br>";
      }
    } 
  }
  for(var i=0; i < window.document.forms.f.q7.length; i++)
  {        
    // if the radio is selected, use its value
    if( document.forms.f.q7[i].checked )
    {
      if(i == 4)
      {
        answerstring += "<b>7) Correct.</b> (You answered E)<br>-----<br>";
        correct++;
      }
      if(i != 4)
      {
        answerstring += "<b>7) Incorrect.</b> (You answered "+document.forms.f.q7[i].value+", the correct answer is E.)<br>Before the Emancipation Proclamation, blacks were not allowed to enlist in the Union army, even if they and their ancestors had been free. But when Lincoln passed the Emancipation Proclamation, he made sure that blacks were allowed to enlist. At that point 10% of enlistments were black.And we know that they were allowed to fight because Lincoln was quoted as saying \"Abandon all posts now garrisoned by black men, take 150,000 [black] men from our side and put them in the battlefield against us and we would be compelled to abandon the war in three weeks.\" Lincoln also made sure that blacks could enlist in the army because it was a slap in the face to the Confederates, who treated them as escaped slaves rather than soldiers.<br>-----<br>";
      }
    } 
  }
for(var i=0; i < window.document.forms.f.q8.length; i++)
  {        
    // if the radio is selected, use its value
    if( document.forms.f.q8[i].checked )
    {
      if(i == 4)
      {
        answerstring += "<b>8) Correct.</b> (You answered E)<br>-----<br>";
        correct++;
      }
      if(i != 4)
      {
        answerstring += "<b>8) Incorrect.</b> (You answered "+document.forms.f.q8[i].value+", the correct answer is E.)<br>Lee, after a nice victory at Chancellorsville, decided to attack the Union at Gettysburg. Another invasion of the North, he hoped, would do two things. Firstly, it would keep the anti-war activists in the North complaining about the war, which would hopefully lead to the Union pulling out of the war and leaving the Confederacy alone. Secondly, if Lee could show that the Confederacy could could invade the North, they would have a better chance with the foreign aid they were hoping would pull through.<br>-----<br>";
      }
    } 
  }
for(var i=0; i < window.document.forms.f.q9.length; i++)
  {        
    // if the radio is selected, use its value
    if( document.forms.f.q9[i].checked )
    {
      if(i == 2)
      {
        answerstring += "<b>9) Correct.</b> (You answered C)<br>-----<br>";
        correct++;
      }
      if(i != 2)
      {
        answerstring += "<b>9) Incorrect.</b> (You answered "+document.forms.f.q9[i].value+", the correct answer is C.)<br>Control of Vicksburg was very important to the South, as it was a major supply route for them, since it lay on the Mississippi River. It also stopped supplies from going up to the Union-controlled Butternut area, made up of the lower portion of Ohio, Indiana and Illinois. Once Grant took Vicksburg, major Southern supply lines were cut off and and supplies were able to be delivered to the Butternut area.<br>-----<br>";
      }
    } 
  }
for(var i=0; i < window.document.forms.f.q10.length; i++)
  {        
    // if the radio is selected, use its value
    if( document.forms.f.q10[i].checked )
    {
      if(i == 3)
      {
        answerstring += "<b>10) Correct.</b> (You answered D)<br>-----<br>";
        correct++;
      }
      if(i != 3)
      {
        answerstring += "<b>10) Incorrect.</b> (You answered "+document.forms.f.q10[i].value+", the correct answer is D.)<br>The Battle of Gettysburg was Lee's follow up to his victory at Chancellorsville. He was met at Gettysburg by Northern General Meade, who quite by accident was at Gettysburg. The two sides fought in what was called \"Pickett's charge\" for 3 days in a close battle, but the Union pulled out in the end. Pickett's charge has been called the \"high tide of the Confederacy\", mainly because it was both the last chance for the South to win, and the northern-most point the South ever reached. After this battle, the South tried to send some peace negotiators to the Union, but Lincoln refused to let them into the North.<br>-----<br>";
      }
    } 
  } 
for(var i=0; i < window.document.forms.f.q11.length; i++)
  {        
    // if the radio is selected, use its value
    if( document.forms.f.q11[i].checked )
    {
      if(i == 1)
      {
        answerstring += "<b>11) Correct.</b> (You answered B)<br>-----<br>";
        correct++;
      }
      if(i != 1)
      {
        answerstring += "<b>11) Incorrect.</b> (You answered "+document.forms.f.q11[i].value+", the correct answer is B.)<br>The Union's Democratic Party was split into three groups: The War Democrats, The Peace Democrats, and the Copperheads. The Copperheads were named after the snake because they would strike without warning. They were against the war, and would show this through attacking the draft, attacking Lincoln, and attacking the Emancipation Proclamation.<br>-----<br>";
      }
    } 
  }
for(var i=0; i < window.document.forms.f.q12.length; i++)
  {        
    // if the radio is selected, use its value
    if( document.forms.f.q12[i].checked )
    {
      if(i == 0)
      {
        answerstring += "<b>12) Correct.</b> (You answered A)<br>-----<br>";
        correct++;
      }
      if(i != 0)
      {
        answerstring += "<b>12) Incorrect.</b> (You answered "+document.forms.f.q12[i].value+", the correct answer is A.)<br>In the election of 1864, the Republican party joined with the War Democrats to form the Union party, insuring that Lincoln would get his nomination for President. The two remaining factions of Democrats, Peace Democrats and the Copperheads, nominated McClellan. Vallandigham was exiled to the Confederacy for treason, Grant wasn't in politics and Chase fought for the Republican nomination, but lost.<br>-----<br>";
      }
    } 
  }  
for(var i=0; i < window.document.forms.f.q13.length; i++)
  {        
    // if the radio is selected, use its value
    if( document.forms.f.q13[i].checked )
    {
      if(i == 1)
      {
        answerstring += "<b>13) Correct.</b> (You answered B)<br>-----<br>";
        correct++;
      }
      if(i != 1)
      {
        answerstring += "<b>13) Incorrect.</b> (You answered "+document.forms.f.q13[i].value+", the correct answer is B.)<br>After Grant took over Chattanooga, he was given command of all Union forces, and the attack of Georgia was left to Sherman. Sherman decided to use his march not only to attack Georgia, but to demoralize the whole South, as he used very brutal methods in any southern city he came across. He even burned down Savannah 3 days before Christmas. He was known all throughout the South as \"Sherman the Brute\"<br>-----<br>";
      }
    } 
  }
for(var i=0; i < window.document.forms.f.q14.length; i++)
  {        
    // if the radio is selected, use its value
    if( document.forms.f.q14[i].checked )
    {
      if(i == 3)
      {
        answerstring += "<b>14) Correct.</b> (You answered D)<br>-----<br>";
        correct++;
      }
      if(i != 3)
      {
        answerstring += "<b>14) Incorrect.</b> (You answered "+document.forms.f.q14[i].value+", the correct answer is D.)<br>Combined losses totaled 600,000 people died in combat or of disease. This was a lot of people from mainly one generation, and not only limited the number of the next generation. It would take the country a little while to recover from this. <br>-----<br>";
      }
    } 
  } 
for(var i=0; i < window.document.forms.f.q15.length; i++)
  {        
    // if the radio is selected, use its value
    if( document.forms.f.q15[i].checked )
    {
      if(i == 2)
      {
        answerstring += "<b>15) Correct.</b> (You answered C)<br>-----<br>";
        correct++;
      }
      if(i != 2)
      {
        answerstring += "<b>15) Incorrect.</b> (You answered "+document.forms.f.q15[i].value+", the correct answer is C.)<br>Both Lincoln and Johnson would have been lenient with the South, but Lincoln was better with politics. Johnson was in office mainly as a gimmick when running for office.<br>-----<br>";
      }
    } 
  } 
answerstring += "Number Correct: "+correct+"/15.</body>"
var popwindow = window.open("","","top=30.left=30,width=400,height=400,resizable,scrollbars,menubar");
popwindow.document.open();
popwindow.document.write("<title>Chapter 21 Homework Answers</title>");
popwindow.document.write(answerstring);
popwindow.document.close;                             
}
