function weatherWindow() {
	window.open("","weather","status,height=290,width=725,resizable=yes,scrollbars=yes,toolbar=no,status=no,menubar=no,bgcolor=#FFFFCC")
 }

function makeNewPhotoEssayWindow() {
	window.open("","photoessay","status,height=700,width=725,resizable=yes,scrollbars=yes,toolbar=no,status=no,menubar=no,bgcolor=#FFFFCC")
 }

function makeNewEcoMapWindow() {
	window.open("","ecosystemmaps","status,height=500,width=500,resizable=yes,scrollbars=yes,toolbar=no,status=no,menubar=yes,bgcolor=#FFFFCC")
 }

function makeNewMapWindow() {
	window.open("","webworldmaps","status,height=600,width=600,resizable=yes,scrollbars=yes,toolbar=no,status=no,menubar=yes,bgcolor=#FFFFCC")
 }

function makeNewWindow() {
	window.open("","webcameras","status,height=500,width=400,resizable=yes,scrollbars=yes,toolbar=no,status=no,menubar=no,bgcolor=#FFFFFF")
 }

function makePuzzleWindow() {
	window.open("http://caesar.freac.fsu.edu/temp/release_puzzle/puzzle.html","puzzle","status, width=800, height=550, resizable=no, scrollbars=no, toolbar=no, status=no, menubar=no, bgcolor=#FFFFCC")
 }
 
function makeCardWindow() {
	window.open("http://caesar.freac.fsu.edu/temp/release_turncard/card.html","card","status, width=800, height=570, resizable=no, scrollbars=no, toolbar=no, status=no, menubar=no, bgcolor=#FFFFCC")
 }

function panoramaWindow() {
	window.open("","webpanoramas","status,height=450,width=470,resizable=no,scrollbars=no,toolbar=no,status=no,menubar=no,bgcolor=#000000")
}

function treeGameRestart(){
   parent.location = "tree.html";
}

function tree_help( plant_id, question_id ) {
	if (plant_id == 1)
	{
	   if ( question_id ==  1)
	      document.form.hint.value = "not a palm";
	   else if ( question_id ==  3)
	      document.form.hint.value = "simple";
	   else if ( question_id ==  4)
	      document.form.hint.value = "opposite";
	   else if ( question_id ==  13)
	      document.form.hint.value = "blunt leaf";
	   else if ( question_id ==  14)
	      document.form.hint.value = "indented leaf tip";
	   else
		  document.form.hint.value = "please try again";
	}
	else if (plant_id == 2)
	{
	   if ( question_id == 1 )
	      document.form.hint.value = "not a palm";
	   else if ( question_id == 3 )
	      document.form.hint.value = "simple";
	   else if ( question_id == 4 )
	      document.form.hint.value = "alternate";
	   else if ( question_id == 5 )
	      document.form.hint.value = "not toothed";
	   else if ( question_id == 6 )	   
	      document.form.hint.value = "wide leaves";
	   else if ( question_id == 8 )
	      document.form.hint.value = "blunt tip";
	   else if ( question_id ==  10)
	      document.form.hint.value = "less than 8 cm";	   
	   else
		  document.form.hint.value = "please try again";
	}
	else if (plant_id == 3)
	{
	   if ( question_id == 1 )
	      document.form.hint.value = "not a palm";
	   else if ( question_id == 3 )
	      document.form.hint.value = "simple";
	   else if ( question_id == 4 )
	      document.form.hint.value = "alternate";
	   else if ( question_id == 5 )
	      document.form.hint.value = "toothed edges";
	   else if ( question_id == 7 )
	      document.form.hint.value = "less than 8 cm";	  
	   else
		  document.form.hint.value = "please try again";
	}
	else if (plant_id == 4)
	{
	   if ( question_id == 1 )
	      document.form.hint.value = "not a palm";
	   else if ( question_id == 3 )
	      document.form.hint.value = "simple";
	   else if ( question_id == 4 )
	      document.form.hint.value = "alternate";
	   else if ( question_id == 5 )
	      document.form.hint.value = "not toothed";
	   else if ( question_id == 6 )
	      document.form.hint.value = "wide leaves";
	   else if ( question_id == 8 )
	      document.form.hint.value = "pointed";
	   else if ( question_id == 9 )
	      document.form.hint.value = "green underside";
	   else
		  document.form.hint.value = "please try again";
	}
	else if (plant_id == 5)
	{
	   if ( question_id == 1 )
	      document.form.hint.value = "not a palm";
	   else if ( question_id == 3 )
	      document.form.hint.value = "simple";
	   else if ( question_id == 4 )
	      document.form.hint.value = "alternate";
	   else if ( question_id == 5 )
	      document.form.hint.value = "toothed leaves";
	   else if ( question_id == 7 )
	      document.form.hint.value = "more than 8 cm";
	   else
		  document.form.hint.value = "please try again";
	}
	else if (plant_id == 6)
	{
	   if ( question_id == 1 )
	      document.form.hint.value = "not a palm";
	   else if ( question_id == 3 )
	      document.form.hint.value = "compound";
	   else if ( question_id == 16 )
	      document.form.hint.value = "5 leaflets";
  	   else if ( question_id == 18 )
	      document.form.hint.value = "5 leaflets";
  	   else if ( question_id == 19 )
	      document.form.hint.value = "leaflets more than 5 cm";
	   else if ( question_id == 20 )
	      document.form.hint.value = "vein is centered";
	   else if ( question_id == 21 )
	      document.form.hint.value = "narrow and light green";
	   else
		  document.form.hint.value = "please try again";
	}
	else if (plant_id == 7)
	{
	   if ( question_id == 1 )
	      document.form.hint.value = "not a palm";
	   else if ( question_id == 3 )
	      document.form.hint.value = "compound";
	   else if ( question_id == 16 )
	      document.form.hint.value = "5 leaflets";
  	   else if ( question_id == 18 )
	      document.form.hint.value = "5 leaflets";
  	   else if ( question_id == 19 )
	      document.form.hint.value = "leaflets more than 5 cm";
	   else if ( question_id == 20 )
	      document.form.hint.value = "vein is centered";
	   else if ( question_id == 21 )
	      document.form.hint.value = "gray green leaflets";
	   else
		  document.form.hint.value = "please try again";
	}
	else if (plant_id == 8)
	{
	   if ( question_id == 1 )
	      document.form.hint.value = "not a palm";
	   else if ( question_id == 3 )
	      document.form.hint.value = "compound";
	   else if ( question_id == 16 )
	      document.form.hint.value = "10 leaflets";
  	   else if ( question_id == 18 )
	      document.form.hint.value = "10 leaflets";
	   else if ( question_id == 19 )
	      document.form.hint.value = "3 cm";
	   else
		  document.form.hint.value = "please try again";
	}
	else if (plant_id == 9)
	{
	   if ( question_id == 1 )
	      document.form.hint.value = "not a palm";
	   else if ( question_id == 3 )
	      document.form.hint.value = "simple";
	   else if ( question_id == 4 )
	      document.form.hint.value = "alternate";
  	   else if ( question_id == 5 )
	      document.form.hint.value = "not toothed";
	   else if ( question_id == 6 )
	      document.form.hint.value = "wide leaves";
  	   else if ( question_id == 4 )
	      document.form.hint.value = "blunt leaf";
  	   else if ( question_id == 10 )
	      document.form.hint.value = "more than 8 cm";
	   else if ( question_id == 11 )
	      document.form.hint.value = "leaf tip is indented";
	   else
		  document.form.hint.value = "please try again";
	}
	else if (plant_id == 10)
	{
	   if ( question_id == 1 )
	      document.form.hint.value = "not a palm";
	   else if ( question_id == 3 )
	      document.form.hint.value = "compound";
	   else if ( question_id == 16 )
	      document.form.hint.value = "7 leaflets";
  	   else if ( question_id == 18 )
	      document.form.hint.value = "7 leaflets";
  	   else if ( question_id == 19 )
	      document.form.hint.value = "leaflets more than 5 cm";
	   else if ( question_id == 20 )
	      document.form.hint.value = "asymmetrical";
	   else
		  document.form.hint.value = "please try again";
	}
	else if (plant_id == 11)
	{
	   if ( question_id == 1 )
	      document.form.hint.value = "not a palm";
	   else if ( question_id == 3 )
	      document.form.hint.value = "simple";
	   else if ( question_id == 4 )
	      document.form.hint.value = "alternate";
  	   else if ( question_id == 5 )
	      document.form.hint.value = "not toothed";
	   else if ( question_id == 6 )
	      document.form.hint.value = "narrow";
	   else
		  document.form.hint.value = "please try again";
	}
	else if (plant_id == 12)
	{
	   if ( question_id == 1 )
	      document.form.hint.value = "not a palm";
	   else if ( question_id == 3 )
	      document.form.hint.value = "simple";
	   else if ( question_id == 4 )
	      document.form.hint.value = "alternate";
  	   else if ( question_id == 5 )
	      document.form.hint.value = "not toothed";
	   else if ( question_id == 6 )
	      document.form.hint.value = "wide leaves";
  	   else if ( question_id == 8 )
	      document.form.hint.value = "blunt leaf";
  	   else if ( question_id == 10 )
	      document.form.hint.value = "more than 8 cm";
  	   else if ( question_id == 11 )
	      document.form.hint.value = "not indented";
	   else if ( question_id == 12 )
	      document.form.hint.value = "leaf oblong";
	   else
		  document.form.hint.value = "please try again";
	}
	else if (plant_id == 13)
	{
	   if ( question_id == 1 )
	      document.form.hint.value = "not a palm";
	   else if ( question_id == 3 )
	      document.form.hint.value = "simple";
	   else if ( question_id == 4 )
	      document.form.hint.value = "alternate";
  	   else if ( question_id == 5 )
	      document.form.hint.value = "not toothed";
	   else if ( question_id == 6 )
	      document.form.hint.value = "wide leaves";
	   else if ( question_id == 8 )
	      document.form.hint.value = "pointed tip";
  	   else if ( question_id == 9 )
	      document.form.hint.value = "has a brown underside";
	   else
		  document.form.hint.value = "please try again";
	}
	else if (plant_id == 14)
	{
	   if ( question_id == 1 )
	      document.form.hint.value = "not a palm";
	   else if ( question_id == 3 )
	      document.form.hint.value = "compound";
	   else if ( question_id == 16 )
	      document.form.hint.value = "more than 10 leaflets";
  	   else if ( question_id == 18 )
	      document.form.hint.value = "more than 10 leaflets";
	   else
		  document.form.hint.value = "please try again";
	}
	else if (plant_id == 15)
	{
	   if ( question_id == 1 )
	      document.form.hint.value = "not a palm";
	   else if ( question_id == 3 )
	      document.form.hint.value = "compound";
	   else if ( question_id == 16 )
	      document.form.hint.value = "3 leaflets";
	   else if ( question_id == 17 )
	      document.form.hint.value = "not paired";
	   else
		  document.form.hint.value = "please try again";
	}
	else if (plant_id == 16)
	{
	   if ( question_id == 1 )
	      document.form.hint.value = "not a palm";
	   else if ( question_id == 3 )
	      document.form.hint.value = "simple";
	   else if ( question_id == 4 )
	      document.form.hint.value = "opposite";
	   else if ( question_id == 13 )
	      document.form.hint.value = "pointed leaf";
	   else if ( question_id == 15 )
	      document.form.hint.value = "more than 7 cm";	   
	   else
		  document.form.hint.value = "please try again";
	}
	else if (plant_id == 17)
	{
	   if ( question_id == 1 )
	      document.form.hint.value = "palm";
	   else if ( question_id == 2 )
	      document.form.hint.value = "like a feather";
	   else
		  document.form.hint.value = "please try again";
	}
	else if (plant_id == 18)
	{
	   if ( question_id == 1 )
	      document.form.hint.value = "not a palm";
	   else if ( question_id == 3 )
	      document.form.hint.value = "simple";
	   else if ( question_id == 4 )
	      document.form.hint.value = "opposite";
	   else if ( question_id == 13 )
	      document.form.hint.value = "pointed leaf";
	   else if ( question_id == 15 )
	      document.form.hint.value = "6 cm";
	   else
		  document.form.hint.value = "please try again";
	}
	else if (plant_id == 19)
	{
	   if ( question_id == 1 )
	      document.form.hint.value = "not a palm";
	   else if ( question_id == 3 )
	      document.form.hint.value = "simple";
	   else if ( question_id == 4 )
	      document.form.hint.value = "alternate";
  	   else if ( question_id == 5 )
	      document.form.hint.value = "not toothed";
	   else if ( question_id == 6 )
	      document.form.hint.value = "wide leaves";
  	   else if ( question_id == 8 )
	      document.form.hint.value = "blunt leaf";
   	   else if ( question_id == 10 )
	      document.form.hint.value = "more than 8 cm";
   	   else if ( question_id == 11 )
	      document.form.hint.value = "not indented";
	   else if ( question_id == 12 )
	      document.form.hint.value = "leaf more round than oblong";
	   else
		  document.form.hint.value = "please try again";
	}
	else if (plant_id == 20)
	{
	   if ( question_id == 1 )
	      document.form.hint.value = "palm";
	   else if ( question_id == 2 )
	      document.form.hint.value = "radiates from a center point";
	   else
		  document.form.hint.value = "please try again";
	}
	else if (plant_id == 21)
	{
	   if ( question_id == 1 )
	      document.form.hint.value = "not a palm";
	   else if ( question_id == 3 )
	      document.form.hint.value = "simple";
	   else if ( question_id == 4 )
	      document.form.hint.value = "opposite";
	   else if ( question_id == 13 )
	      document.form.hint.value = "blunt leaf";
	   else if ( question_id == 14 )
	      document.form.hint.value = "leaf tip not indented";
	   else
		  document.form.hint.value = "please try again";
	}
	else if (plant_id == 22)
	{
	   if ( question_id == 1 )
	      document.form.hint.value = "not a palm";
	   else if ( question_id == 3 )
	      document.form.hint.value = "compound";
  	   else if ( question_id == 16 )
	      document.form.hint.value = "less than 5 leaflets";   
	   else if ( question_id == 17 )
	      document.form.hint.value = "two pairs leaflets per leaf";   
	   else
		  document.form.hint.value = "please try again";
	}
}

function check_registration( page_name ) {
    if (top.document.URL.indexOf ("#") != -1);
    else
    {
	window.location.replace( "/tr/scripts/quick.php?page_name=" + page_name );
    }
 }

function create_cookie( email_address ) {
	document.cookie = "email=" + email_address;
 }

function gotoPage( page_name ) {
	window.location.replace( page_name );
 }

function isReady( form ) {
	var temp = form.email_form.value;
	if( form.email_form.value == "" ) {
		alert("You must include an e-mail address!");
		form.email_form.focus();
		return false;
	}
	else if( temp.indexOf( "@" ) == -1 ) {
		alert("You must include a valid e-mail address!");
		form.email_form.focus();
		return false;
	}
	else if( form.registered.checked ) { return true; }
	else {
		if( form.name.value == "" ) {
			alert("If you have not registered before you need to enter your name.");
			form.name.focus();
			return false;
		}
		else if ( form.grade_taught.value == "" ) {
			alert("If you have not registered before you need to enter the grade you teach.");
			form.grade_taught.focus();
			return false;
		}
		else if ( form.subject_taught.value == "" ) {
			alert("If you have not registered before you need to enter the subject you teach.");
			form.subject_taught.focus();
			return false;
		}
		else if ( form.school.value == "" ) {
			alert("If you have not registered before you need to enter your school.");
			form.school.focus();
			return false;
		}
		else if ( form.county.value == "" ) {
			alert("If you have not registered before you need to enter your county.");
			form.county.focus();
			return false;
		}
		else if ( form.state.value == "" ) {
			alert("If you have not registered before you need to select your state.");
			form.state.focus();
			return false;
		}
		else { return true; }
	}
 }

function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}
function replaceindex(){
	window.location.replace( "index.php" );
    }