// JavaScript Document
<!--
function quizCheck()
{ 
var answer1="";
var answer2="";
var answer3="";
var answer4="";
var phrase1 = "";
var phrase2 = "";
var phrase3 = "";
var phrase4 = "";
var score = 0;
if (document.test.button1[0].checked == true) 
	{phrase1="Correct. After crossing the event horizon of a black hole, even light cannot escape.<br>";
	answer1=document.test.button1[0].value;
	score++;}
else
if (document.test.button1[1].checked == true) 
	{phrase1="Sound does not travel in outer space, no matter what you heard in that movie.<br>";
	answer1=document.test.button1[1].value;}
else
if (document.test.button1[2].checked == true) 
	{phrase1="Beam me up, Scottie! That's Hollywood, not physics.<br>";
	answer1=document.test.button1[2].value;}
else {phrase1="You didn't answer Question 1.<br>"}
	
if (document.test.button2[0].checked == true) 
	{phrase2="Planets don't collapse. Stars are supported by the pressure from burning hydrogen, and eventually the fire runs out of fuel. But that doesn't happen to planets.<br>";
	answer2=document.test.button2[0].value;}
else
if (document.test.button2[1].checked == true) 
	{phrase2="Stars around the size of our sun eventually wind up as neutron stars or white dwarfs.<br>";
	answer2=document.test.button2[1].value;}
else
if (document.test.button2[2].checked == true) 
	{phrase2="Correct. When a star is too large and it runs out of fuel, the remaining pressure from fermion repulsion won't be enough to keep it from collapsing all the way into a black hole.<br>";
	answer2=document.test.button2[2].value;
	score++;}
else {phrase2="You didn't answer Question 2.<br>"}

if (document.test.button3[0].checked == true) 
	{phrase3="Correct. If the dust and gas is falling into a large black hole, astronomers can tell the size of the black hole from the light being emitted.<br>";
	answer3=document.test.button3[0].value;
	score++;}
else
if (document.test.button3[1].checked == true) 
	{phrase3="In outer space, nobody can hear you scream...<br>";
	answer3=document.test.button3[1].value;}
else
if (document.test.button3[2].checked == true) 
	{phrase3="Black holes attract all the nearby dust and gas towards them, so on the contrary, everything is very far from being black around a black hole.<br>";
	answer3=document.test.button3[2].value;}
else {phrase3="You didn't answer Question 3.<br>"}

if (document.test.button4[0].checked == true) 
	{phrase4="In classical theory, meaning general relativity, a black hole can never get smaller.<br>";
	answer4=document.test.button4[0].value;}
else
if (document.test.button4[1].checked == true) 
	{phrase4="In classical theory, meaning general relativity, a black hole can never get smaller.<br>";
	answer4=document.test.button4[1].value;}
else
if (document.test.button4[2].checked == true) 
	{phrase4="Correct. In classical theory, meaning general relativity, a black hole can never get smaller. But according to quantum theory, black holes decay by radiating elementary particles.<br>";
	answer4=document.test.button4[2].value;
	score++;}
else {phrase4="You didn't answer Question 4.<br>"}

document.open();
document.writeln("<center><table width=450 border=0><tr><td>");
document.writeln("<font color=#000099><center><h3>Quiz results</h3></center>");
document.writeln("Your score is "+score+" out of 4. <br><br>");
document.writeln("<b>Question 1:</b> What is the escape velocity at the event horizon of a black hole?");
document.writeln("<br><b>You answered</b>: ");
document.writeln(answer1);
document.writeln("<br><b>Reply:</b> ");
document.writeln(phrase1);
document.writeln("<br><br><b>Question 2:</b> Black holes can be formed by the gravitational collapse of which astronomical objects?");
document.writeln("<br><b>You answered:</b> ");
document.writeln(answer2);
document.writeln("<br><b>Reply:</b> ");
document.writeln(phrase2);
document.writeln("<br><br><b>Question 3:</b> How do astronomers know when they are observing a black hole?");
document.writeln("<br><b>You answered</b>: ");
document.writeln(answer3);
document.writeln("<br><b>Reply:</b> ");
document.writeln(phrase3);
document.writeln("<br><br><b>Question 4:</b> Which statement below is true as far as the theory of black holes is concerned?");
document.writeln("<br><b>You answered:</b> ");
document.writeln(answer4);
document.writeln("<br><b>Reply:</b> ");
document.writeln(phrase4);
document.writeln("<br><br>")
document.writeln('<center><a href="bhquiz.html" target="_self">Take the quiz again</a></center>');
document.writeln("<br><br>");
document.writeln("</font></td></tr></table></center>");
}
document.close();
//-->
