var answers = new Array();
//     Question Number: 1 2 3 4 5 6 7
var correct = new Array(2,2,2,2,1,1,2);

var reasons=new Array("", // No reason for question #1
		      "",
		      "Remember, the bigger the surface area, \nthe more energy can be radiated into space!",
		      "",
		      "The mass of a star is determined by how much material is pulled into the star when it is\n forming in a nebula. Each star can have a different amount of starting material (mass).",
		      "Stars that are similar in size will have similar properties in \nbrightness, surface temperature, and length of star life.",
		      "The most massive stars have large surface areas.  This means they radiate more energy \n(heat and light) into space than smaller stars, so they would appear brighter, not dimmer.");

function check (num){
    num -= 1;  // Get to zero-based index.
    var right=false;
    var why = reasons[num];
    if(answers[num] == correct[num])		
	alert("That's right\n"+why);
    else
	alert("Incorrect\n"+why);
}

function setAnswer(index, value){
    answers[index-1] = value;
}

