function init() 
{
	//load quiz data
	questions = new Array()
	questions[0] = "What is Banana Man's real name?";
	questions[1] = "Who is Banana Man's nemesis?";
	questions[2] = "What color paper is Banana Man printed on?";
	questions[3] = "How much does Banana Man cost per issue?";
	questions[4] = "Who is on the cover of issue #1?";
	questions[5] = "What amazing power does Banana Man have?";
	questions[6] = "What does Gorilla Guy believe?";
	questions[7] = "How does Banana Man spend time between classes?";
	questions[8] = "What does Gorilla Guy do with his free time?";
	questions[9] = "Who is on the cover of issue #2?";
	questions[10] = "Where does Banana Man find Gorilla Guy in issue #2?";
	questions[11] = "Who makes a guest appearance in issue #2?";
	questions[12] = "Which weapon has Banana Man not used?";
	questions[13] = "What kind of teacher is Banana Man?";
	questions[14] = "What color hair does Banana Man have?";
              
	answer1 = new Array()
	answer1[0] = "Andre Ware";
	answer1[1] = "Monkey Man";
	answer1[2] = "White";
	answer1[3] = "$.50";
	answer1[4] = "Banana Man";
	answer1[5] = "Flight";
	answer1[6] = "That he is a monkey";
	answer1[7] = "Preparing his lesson plan";
	answer1[8] = "Plot how to destroy Banana Man";
	answer1[9] = "Banana Man";
	answer1[10] = "Motor City Comic Convention";
	answer1[11] = "Chuck Heston";
	answer1[12] = "Bananarang";
	answer1[13] = "Nutrition";
	answer1[14] = "Black";
              
	answer2 = new Array()
	answer2[0] = "Vincent James";
	answer2[1] = "Gorilla Man";
	answer2[2] = "Yellow";
	answer2[3] = "$.75";
	answer2[4] = "Gorilla Guy";
	answer2[5] = "Strength";
	answer2[6] = "Banana Man is evil";
	answer2[7] = "Sewing";
	answer2[8] = "Plot how to infiltrate talking monkey regimes";
	answer2[9] = "Gorilla Guy";
	answer2[10] = "Wizard World";
	answer2[11] = "Nova";
	answer2[12] = "Banana Blade";
	answer2[13] = "Special Education";
	answer2[14] = "Yellow";
              
	answer3 = new Array()
	answer3[0] = "Andre Andre";
	answer3[1] = "Gorilla Guy";
	answer3[2] = "Green";
	answer3[3] = "$1";
	answer3[4] = "Banana Man & Gorilla Guy";
	answer3[5] = "X-Ray Vision";
	answer3[6] = "The world will taken over by talking apes";
	answer3[7] = "Daydreaming";
	answer3[8] = "Scratching his armpits";
	answer3[9] = "Banana Man & Gorilla Guy";
	answer3[10] = "In a tree";
	answer3[11] = "Mark Wahlberg";
	answer3[12] = "Concrete Banana";
	answer3[13] = "Arithmetic";
	answer3[14] = "Brown";
	              
	answer4 = new Array()
	answer4[0] = "Hillary";
	answer4[1] = "Bert";
	answer4[2] = "Brown";
	answer4[3] = "$2.25";
	answer4[4] = "Chuck Heston";
	answer4[5] = "He can sew";
	answer4[6] = "50 cents is too much to pay for a comic book";
	answer4[7] = "Eating Bananas";
	answer4[8] = "Eating Bananas";
	answer4[9] = "Tina Youthers";
	answer4[10] = "In a zoo";
	answer4[11] = "Lou Ferrigno";
	answer4[12] = "Nan-Chucks";
	answer4[13] = "Art";
	answer4[14] = "White";
	              
	rightAns = new Array()
	rightAns[0] = "C"; 
	rightAns[1] = "C"; 
	rightAns[2] = "B"; 
	rightAns[3] = "A"; 
	rightAns[4] = "A"; 
	rightAns[5] = "D"; 
	rightAns[6] = "C"; 
	rightAns[7] = "C"; 
	rightAns[8] = "B"; 
	rightAns[9] = "B"; 
	rightAns[10] = "A";
	rightAns[11] = "B"; 
	rightAns[12] = "B"; 
	rightAns[13] = "A"; 
	rightAns[14] = "C"; 

	score = new Array()
	score[0] = "$100";
	score[1] = "$200";
	score[2] = "$300";
	score[3] = "$500";
	score[4] = "$1,000";
	score[5] = "$2,000";
	score[6] = "$4,000";
	score[7] = "$8,000";
	score[8] = "$16,000";
	score[9] = "$32,000";
	score[10] = "$64,000";
	score[11] = "$125,000";
	score[12] = "$250,000";
	score[13] = "$500,000";
	score[14] = "$1,000,000";
} 


function nextQuestion(jsquiz)
{  

if(finished == 1)
	{
	alert("Click the Start Over Button to play again.");
	}
else
	{

	if(started == 0)	//disables Start Trivia button
		{
	
		if(answered == 0) //checks for an answer
			{	
	
			if(changeQuestion == quizEnd) 
				{
				jsquiz.question.value = "You're a Banillionaire!!!";
				jsquiz.choiceA.value = "";
				jsquiz.choiceB.value = "";
				jsquiz.choiceC.value = "";
				jsquiz.choiceD.value = "";
				started = 0;
				finished = 1;
				}
	
			else
				{
				jsquiz.question.value = questions[changeQuestion];
				jsquiz.choiceA.value = answer1[changeQuestion];
				jsquiz.choiceB.value = answer2[changeQuestion];
				jsquiz.choiceC.value = answer3[changeQuestion];
				jsquiz.choiceD.value = answer4[changeQuestion];
		
				jsquiz.level.src="images/level" + (changeQuestion+1) + ".jpg";
				changeQuestion++;
				answered = 1;
				started = 1;
				moved = 1;
				}
			}
		
		else
			{
			alert("Please answer the question before you continue.");
			started = 1;
			}
		}
	}
}


function checkAnswer(jsquiz) 
{

if(finished == 1)
	{
	alert("Click the Start Over Button to play again.");
	}
else
	{
	if(moved == 1) //checks for previous answer
		{	
	
		if(answered == 1) //checks for an answer
			{
			if(answer == rightAns[changeQuestion-1])
				{
				jsquiz.question.value = "Correct! You just won " + score[changeQuestion-1] + "! Click on Next Question to continue.";
				}
			else
				{
				jsquiz.question.value = "Incorrect. The correct answer is " + rightAns[changeQuestion-1] + " .  Thanks for playing."; 
				changeQuestion = 0;
				started = 0;
				answered = 0;
				answer = 0;
				moved = 0;
				jsquiz.level.src="images/level1.jpg";
				finished = 1;
				}
		
		
			answered = 0;
			moved = 0;
		
			}
		
		else
			{
			alert("Please answer the question before you continue.");
			}
		}
	else
		{
		alert("Please select the next question.");
		}
	}
}

function clearForm(jsquiz)
{
	jsquiz.question.value = "";
	jsquiz.choiceA.value = "";
	jsquiz.choiceB.value = "";
	jsquiz.choiceC.value = "";
	jsquiz.choiceD.value = "";
	changeQuestion = 0;
	started = 0;
	answered = 0;
	answer = 0;
	moved = 0;
	finished = 0;
}
