hide("incorrect");

var questions=new Array();
questions[0]=new Array();
//0=question;1=first choice;2=second choice;3=third choice;4=fourth choice (optional);5=correct answer letter;6=answer text;7=image
questions[0]=['What makes trees green?','Minerals in the soil','Chlorophyll','Air pollution','','B','Answer: B. Chlorophyll - Chlorophyll is found in the cells of all green plants. It not only gives trees and other plants their green color but also helps in photosynthesis, the process plants use to make food.','../../images/kids_quiz/image_1.gif'];
questions[1]=['What gas do trees produce that people and animals breathe in order to live?','Oxygen','Carbon dioxide','Helium','','A','Answer: A. Oxygen - All green plants produce oxygen as a by-product of photosynthesis. A mature tree can produce as much as half a pound of oxygen per day - a mature human breathes about two pounds of oxygen per day.','../../images/kids_quiz/image_2.gif'];
questions[2]=['What else do trees need for photosynthesis?','Water','Sunlight','Carbon dioxide','All of the above','D','Answer: D. All of the above - Trees and other green plants use water, sunlight, and carbon dioxide absorbed from the environment to produce their food. When humans and other animals exhale, they breathe out carbon dioxide, which helps plants to survive.','../../images/kids_quiz/image_3.gif'];
questions[3]=['How do trees "clean" the air of pollution?','With a broom','With a net','With their leaves','','C','Answer: C. With their leaves - Trees absorb carbon dioxide, nitrogen oxide, ozone, and other pollutants through their leaves - big, broad leaves absorb the most air pollution. ','../../images/kids_quiz/image_4.gif'];
questions[4]=['Where is the urban forest located?','On a mountaintop','Far away in the country','In NYC (and other cities)','','C','Answer: C. In NYC (and other cities) - The urban forest is made up of all the trees in a city, including those in parks, on sidewalks, and trees near schools, museums, businesses, apartment buildings, and homes.','../../images/kids_quiz/image_5.gif'];
questions[5]=['How many trees are there in NYC\'s urban forest?','5.2 million','100','25,000','','A','Answer: A. 5.2 million - That\'s a lot of trees! But there is room in our City to plant many more - the Parks Department and organizations throughout NYC are planning to plant one million new trees across the City over the next ten years.','../../images/kids_quiz/image_6.gif'];
questions[6]=['What kinds of trees make up NYC\'s urban forest?','Only pine and oak trees','168 different species','It\'s a mystery - no one has studied them','','B','Answer: B. 168 different species - The Parks Department has identified at least 168 different tree species throughout NYC. These include varieties of pine, oak, maple, elm, and many other types of deciduous (trees that lose all of their leaves for part of the year) and evergreen trees (trees that retain their leaves year-round). Data on trees was collected by Parks Department staff and over 1,000 volunteers in the 2006 street tree census.','../../images/kids_quiz/image_7.gif'];
questions[7]=['The most common type of street tree in NYC is:','London planetree','Pin oak','Blue spruce','','A','Answer: A. London planetree - The London planetree (Platanus x acerifolia) makes up over 15% of the trees planted on sidewalks along the City\'s streets. The second most common type of street tree is the Norway maple (Acer platanoides).','../../images/kids_quiz/image_8.gif'];
questions[8]=['What NYC borough has the most street trees?','Manhattan','Staten Island','Queens','','C','Answer: C. Queens - Queens has 240,000 street trees, about 40% of NYC\'s urban tree canopy.','../../images/kids_quiz/image_9.gif'];
questions[9]=['What insect is the biggest threat to NYC\'s urban forest?','Ladybug','Wasp','Asian Longhorned Beetle','','C','Answer: C. Asian Longhorned Beetle - This pest damages the trees so they can no longer bring water up from the soil into the branches and leaves (canopy). Trees that are infested with ALB must be quarantined and removed.','../../images/kids_quiz/image_10.gif'];
questions[10]=['Who can plant and takes care of trees in NYC?','Every New Yorker','Only the Parks Department','People 20 years old and over','','A','Answer: A. Every New Yorker - It doesn\'t matter how old you are. All New Yorkers can plant trees and help to take care of NYC\'s urban forest. You can ask the City to plant trees on your street. You can also get information from the Parks Department about how to take care of trees planted on the sidewalk in front of your apartment building or in your own yard.','../../images/kids_quiz/image_11.gif'];
questions[11]=['What is Arbor Day?','Last day of school','National holiday in France','Annual day to plant and care for trees','','C','Answer: C. Annual day to plant and care for trees - Arbor Day was created by J. Sterling Morton in 1872. In New York State, Arbor Day is celebrated on the last Friday in April.','../../images/kids_quiz/image_12.gif'];

showQuestion(0);

function showQuestion(i){
	var theQuestion='<table cellspacing="0" cellpadding="0" border="0" width="350" align="center">';
	theQuestion=theQuestion+'<tr><td align="center"><img src="'+questions[i][7]+'" width="300" height="250" border="0" alt="'+questions[i][0]+'"></td></tr>';
	theQuestion=theQuestion+'<tr><td align="center" class="kids_question">'+(i+1)+'. '+questions[i][0]+'</td></tr><tr><td>&nbsp;</td></tr>';
	theQuestion=theQuestion+'<tr><td align="center"><table cellspacing="0" cellpadding="0" border="0">';
	theQuestion=theQuestion+'<tr><td class="kids_link">A. <a class="kids_link" href=javascript:checkAnswer('+i+',"A")>'+questions[i][1]+'</a></td></tr>';
	theQuestion=theQuestion+'<tr><td class="kids_link">B. <a class="kids_link" href=javascript:checkAnswer('+i+',"B")>'+questions[i][2]+'</a></td></tr>';
	theQuestion=theQuestion+'<tr><td class="kids_link">C. <a class="kids_link" href=javascript:checkAnswer('+i+',"C")>'+questions[i][3]+'</a></td></tr>';
	if(questions[i][4].length>0){
		theQuestion=theQuestion+'<tr class="kids_link"><td>D. <a class="kids_link" href=javascript:checkAnswer('+i+',"D")>'+questions[i][4]+'</a></td></tr>';
	}
	theQuestion=theQuestion+'</table></td></tr></table>';
	document.getElementById("question").innerHTML=theQuestion;
}

function checkAnswer(question,answer){
	if(questions[question][5]==answer){
		var theText='<table cellspacing="0" cellpadding="0" border="0" width="499">';
		theText=theText+'<tr><td align="center" class="kids_question">That is correct!</td></tr>';
		theText=theText+'<tr><td>&nbsp;</td></tr>';
		theText=theText+'<tr><td align="center" class="kids_question">'+questions[question][6]+'</td></tr>';
		theText=theText+'<tr><td>&nbsp;</td></tr>';
		if((question+1)<questions.length){
			theText=theText+'<tr><td align="right" class="kids_link"><a href="javascript:showQuestion('+(question+1)+')">Next question &raquo;</a></td></tr>';
		}else{
			theText=theText+'<tr><td align="left" class="kids_link"><a href="javascript:showQuestion('+0+')">&laquo; Back to the beginning</a></td></tr>';
		}
		theText=theText+'</table>';
		document.getElementById("question").innerHTML=theText;
	}else{
		hide('question_row');
		show('incorrect');
	}
}