didYouKnow = new Array();
	
	didYouKnow[0] = new Object(); 
			didYouKnow[0].text = "CO<sub>2</sub> concentrations have risen by 25% to possibly over 39% over the last century.";
			didYouKnow[0].category = "carbon";
			
	didYouKnow[1] = new Object();
			didYouKnow[1].text = "CO<sub>2</sub> can be neutralized by trees.";
			didYouKnow[1].category = "carbon";
			
	didYouKnow[2] = new Object();
			didYouKnow[2].text = "CO<sub>2</sub> is fixed in trees and vegetation     through photosynthesis.";
			didYouKnow[2].category = "carbon";
			
	didYouKnow[3] = new Object();
			didYouKnow[3].text = "CO<sub>2</sub> makes plants more resistant to      extreme weather.";
			didYouKnow[3].category = "carbon";
			
	didYouKnow[4] = new Object();
			didYouKnow[4].text = "CO<sub>2</sub> makes trees healthier and easier to manage.";
			didYouKnow[4].category = "carbon";
			
	didYouKnow[5] = new Object();
			didYouKnow[5].text = "Increased CO<sub>2</sub> levels can help trees, that are properly managed, grow in drought conditions by increasing photosynthesis.";
			didYouKnow[5].category = "carbon";
			
	didYouKnow[6] = new Object(); 
			didYouKnow[6].text = "100 metric tons of CO<sub>2</sub> can accumulate in one acre of forest over time.";
			didYouKnow[6].category = "carbon";
			
	didYouKnow[7] = new Object();
			didYouKnow[7].text = "Each person generates approximately 2.3 tons of CO<sub>2</sub> per year.";
			didYouKnow[7].category = "carbon";
			
	didYouKnow[8] = new Object();
			didYouKnow[8].text = "The carbon footprints of 18 average Americans can be neutralized by one acre of hardwood trees.";
			didYouKnow[8].category = "carbon";
			
	didYouKnow[9] = new Object();
			didYouKnow[9].text = "Managed forests accumulate more carbon per acre than unmanaged forests.";	
			didYouKnow[9].category = "carbon";
	
	didYouKnow[10] = new Object(); 
			didYouKnow[10].text = "A single tree can absorb CO<sub>2</sub> at a rate of 48 lb. per year.";
			didYouKnow[10].category = "tree";
			
	didYouKnow[11] = new Object();
			didYouKnow[11].text = "Trees act as natural pollutionfilters by absorbing pollutants through the stomates in leaf surfaces.";
			didYouKnow[11].category = "tree";
			
	didYouKnow[12] = new Object();
			didYouKnow[12].text = "Trees lower temperature by transpiring water and shading surfaces.";
			didYouKnow[12].category = "tree";
			
	didYouKnow[13] = new Object();
			didYouKnow[13].text = "Trees reduce heat sinks. Heat sinks are 6-19 degrees F warmer than the surrounding area.";
			didYouKnow[13].category = "tree";
			
	didYouKnow[14] = new Object();
			didYouKnow[14].text = "Trees reduce erosion.";
			didYouKnow[14].category = "tree";
			
	didYouKnow[15] = new Object(); 
			didYouKnow[15].text = "An acre of trees absorbs enough CO<sub>2</sub> over one year to equal the amount produced by driving a car 26,000 miles.";
			didYouKnow[15].category = "tree";
			
	didYouKnow[16] = new Object();
			didYouKnow[16].text = "Trees provide food and wildlife habitats.";
			didYouKnow[16].category = "tree";
			
	didYouKnow[17] = new Object();
			didYouKnow[17].text = "Planting trees remains one of the cheapest, most effective means of drawing excess CO<sub>2</sub> from the atmosphere.";
			didYouKnow[17].category = "tree";
			
	didYouKnow[18] = new Object();
			didYouKnow[18].text = "Trees recharge ground water and sustain stream flow.";	
			didYouKnow[18].category = "tree";
			
	didYouKnow[19] = new Object();
			didYouKnow[19].text = "One large tree strategically placed in a yard can replace 10 room-size air conditioners operating 20 hours per day.";	
			didYouKnow[19].category = "tree";

var p = didYouKnow.length;

var whichFact = Math.round(Math.random()*(p-1));

function writeFact() {
if (document.getElementById) {
	document.getElementById("fact").innerHTML= didYouKnow[whichFact].text;
	
	if (didYouKnow[whichFact].category == "carbon") {
		document.getElementById("homeFactTitle").style.backgroundImage = "url('/images/carbon_fact_title.png')";
	}
	else {
		document.getElementById("homeFactTitle").style.backgroundImage = "url('/images/tree_fact_title.png')";
	}
	
	
	if((whichFact+1) < 10) {
		document.getElementById("number").innerHTML= '<a href="/carbon-tree-facts.asp"><img src="/images/numbers/0'+(whichFact+1)+'.png" alt="" /></a>';
	}
	else {
		if (whichFact+1 > 10 && whichFact+1 < 20) {
		document.getElementById("number").innerHTML= '<a href="/carbon-tree-facts.asp"><img src="/images/numbers/0'+((whichFact+1)-10)+'.png" alt="" /></a>';
		}
		
		else if (whichFact+1 == 20) {
		document.getElementById("number").innerHTML= '<a href="/carbon-tree-facts.asp"><img src="/images/numbers/'+((whichFact+1)-10)+'.png" alt="" /></a>';
		}
		
		else {
		document.getElementById("number").innerHTML= '<a href="/carbon-tree-facts.asp"><img src="/images/numbers/'+(whichFact+1)+'.png" alt="" /></a>';
		}
	}
}
}

