OSName="any operating system";
    if (navigator.appVersion.indexOf("Win")!=-1) pcNav();
	if (navigator.appVersion.indexOf("Mac")!=-1)  macNav();
	
function pcNav() {
	document.write("<style type='text/css'>\n" +  "#topnav li a {padding: 5px 15px 5px 14px; *padding: 5px 15px 5px 15px;}\n" + "</style>");
	}
	
function macNav() {
	document.write("<style type='text/css'>\n" +  "#topnav li a {padding: 5px 16px 5px 15px; *padding: 5px 15px 5px 15px;\n" + "</style>");
	}

var a = 0;
var b = 0;
var c = 0;

function generateRandom() {
  var range = 7; //Change this number to match the number of facts in rotation below.
  return Math.floor(Math.random() * range) + 1;
}

while (a == b || a == c){
	var a = generateRandom();
}
var quotea = getQuote(a);

while (b == a || b == c){
	var b = generateRandom();
}
var quoteb =  getQuote(b);

while (c == 0 || c == b || c == a){
	var c = generateRandom();
}
var quotec =  getQuote(c);

//alert (a + " "  + b  + " " + c);

//When you add facts to the random rotation, copy the case format below and change the case number to the next consecutive number. Don't forget to up the range number at the top to reflect the total number of cases. Use the forward slash "\" to escape puncuation such as apostrophies that appear in the plain text areas (i.e. outside html tags below). Hint, if you are using DreamWeaver to make updates, the text will turn black if you have characters that need to be escaped.


function getQuote(num){
var text = '<p>';
switch(num){
		case 1:
		//Junk Mail
		text += 'The typical American household receives about 70 pounds of junk mail a year. (<a href="http://www.greendimes.com">www.greendimes.com</a>)</p>';
		return text;
		
		case 2:
		//Organic Farming
		text += 'Organic farming uses 50% less energy than conventional farming methods. (<a href="http://www.ota.com">www.ota.com</a>)</p>';
		return text;
		
		case 3:
		//Cotton
		text += 'Cotton uses approximately 25% of the world\'s insecticides and more than 10% of the pesticides. (<a href="http://www.ota.com">www.ota.com</a>)</p>';
		return text;
		
		case 4:
		//Wal-Mart
		text += '356 abandoned Wal-Marts were for sale or lease in 2006, enough to cover 465 football fields (<a href="http://www.sprawl-busters.com">www.sprawl-busters.com</a>)</p>';
		return text;
		
		case 5:
		//Average Meal
		text += 'The average meal travels 1500 miles from the field to your table. (<a href="http://www.davidsuzuki.org">www.davidsuzuki.org</a>)</p>';
		return text;
		
		case 6:
		//SUV's
		text += 'Typical SUVs use almost twice the fuel of a modern station wagon, both seat the same number of passengers (<a href="http://www.davidsuzuki.org">www.davidsuzuki.org</a>)</p>';
		return text;
		
		case 7:
		//Air inside cars
		text += 'Air we breathe inside our cars can be up to 10 times more polluted than the air outside (<a href="http"//www.davidsuzuki.org">www.davidsuzuki.org</a>)</p>';
		return text;

		
	}
}


