 
function emailwithsubject(name, domain, suffix, subject)
{
   var address = name + "\u0040" + domain + "." + suffix;
   var url = "mailto:" + address + "?subject=" + subject;
   document.write("<a href=\"" + url + "\">" + address + "<\/a>");
}

function farmteamemail(name, domain, suffix, subject)
{
   document.write("<a href=\"mailto:tim@gainingground.org?subject=Farm team");
   
   document.write("?body=Want to join Farm Team 2010");
   document.write("&body=");
   document.write("&body=We need to learn a little about you. Please write short essay answers to the following questions and hit send when you are done.");
   document.write("&body=");
   document.write("&body=xyz");
   
   document.write("\">here</a>");
}

/*
 * use: <script type="text/javascript">pickajunkphoto()</script>
 */

function pickajunkphoto()
{
	switch (Math.round(Math.random()*10))
	{
		case 0:
			document.write("<img src=\"images_other/treasures/gg_bottle_piece.jpg\" width=\"250\" height=\"250\">");
			break;
		case 1:
			document.write("<img src=\"images_other/treasures/gg_bottle_top.jpg\" width=\"250\" height=\"250\">");
			break;
		case 2:
			document.write("<img src=\"images_other/treasures/gg_bottle.jpg\" width=\"250\" height=\"250\">");
			break;
		case 3:
			document.write("<img src=\"images_other/treasures/gg_china1.jpg\" width=\"250\" height=\"250\">");
			break;
		case 4:
			document.write("<img src=\"images_other/treasures/gg_china2.jpg\" width=\"250\" height=\"250\">");
			break;
		case 5:
			document.write("<img src=\"images_other/treasures/gg_doll_hand.jpg\" width=\"250\" height=\"250\">");
			break;
		case 6:
			document.write("<img src=\"images_other/treasures/gg_fork.jpg\" width=\"250\" height=\"250\">");
			break;
		case 7:
			document.write("<img src=\"images_other/treasures/gg_horseshoe.jpg\" width=\"250\" height=\"250\">");
			break;
		case 8:
			document.write("<img src=\"images_other/treasures/gg_marbles.jpg\" width=\"250\" height=\"250\">");
			break;
		case 9:
			document.write("<img src=\"images_other/treasures/gg_metal.jpg\" width=\"250\" height=\"250\">");
			break;
		case 10:
		default:
			document.write("<img src=\"images_other/treasures/gg_spoon.jpg\" width=\"250\" height=\"250\">");
			break;
	}
}

/*
 * use: <script type="text/javascript">pickaphoto()</script>
 */

function pickaphoto()
{
	var pick = Math.round(Math.random()*6);
	if (pick >= 5)
	{
		document.write("<img src=\"images_other/Beets_071023.jpg\" width=\"480\" height=\"360\" border=\"1\">");
	}
	else if (pick >= 4)
	{
		document.write("<img src=\"images_other/Onions_071023.jpg\" width=\"480\" height=\"360\" border=\"1\">");
	}
	else if (pick >= 3)
	{
		document.write("<img src=\"images_other/Peppers_071023.jpg\" width=\"480\" height=\"360\" border=\"1\">");
	}
	else if (pick >= 2)
	{
		document.write("<img src=\"images_other/GourdHarvest_071011.jpg\" width=\"480\" height=\"360\" border=\"1\">");
	}
	else if (pick >= 1)
	{
		document.write("<img src=\"images_other/TomatoHarvest1_071011.jpg\" width=\"480\" height=\"360\" border=\"1\">");
	}
	else
	{
		document.write("<img src=\"images_other/TomatoHarvest2_071011.jpg\" width=\"480\" height=\"360\" border=\"1\">");
	}

}

function generatenavlinks()
{
	var	pagePath = window.location.pathname;
	var pageName = pagePath.substring(pagePath.lastIndexOf('/') + 1);
	
	/*
	 *		About Us
	 */
	/*  */
	if (pageName == "aboutus.html")
	{
		document.write("<span class=\"navigation_deadlink\">ABOUT US</span>");
	}
	else
	{
		document.write("<a href=\"aboutus.html\" title=\"About us\">ABOUT US</a>");
	}
	/* writeNEW(); */
	document.write("<br />");
	
	/*
	 *		Jobs
	 */
	
	/*
	
	if (pageName == "opportunities.html")
	{
		document.write("<font class=\"navigation_deadlink\">JOBS</font>");
	}
	else
	{
		document.write("<a href=\"opportunities.html\" title=\"Jobs\">JOBS</a>");
	}
	writeNEW();
	document.write("<br />");
	*/
	
	
	/*
	 *		See the garden
	 */
	
	if (pageName == "garden.html")
	{
		document.write("<font class=\"navigation_deadlink\">SEE THE GARDEN</font>");
	}
	else
	{
		document.write("<a href=\"garden.html\" title=\"See the garden\">SEE THE GARDEN</a>");
	}
	/* writeNEW(); */
	document.write("<br />");
	
	/*
	 *		Garden Jornal
	 */
	/*
	
	document.write("<a href=\"http://www.gainingground.org/discus/messages/2018/2018.html?1205166637\" target=\"_blank\" title=\"Musings by the garden staff\">GARDEN JOURNAL</a>");
	writeNEW();
	document.write("<br />");
	*/
	
	/*
	 *		Volunteer
	 */
	
	if (pageName == "volunteer.html")
	{
		document.write("<font class=\"navigation_deadlink\">VOLUNTEER</font>");
	}
	else
	{
		document.write("<a href=\"volunteer.html\" title=\"Volunteer\">VOLUNTEER</a>");
	}
	/* writeNEW(); */
	document.write("<br />");
	
	/*
	 *		Farm Team
	 */
	 /*
	
	if (pageName == "farmteam.html")
	{
		document.write("<font class=\"navigation_deadlink\">FARM TEAM</font>");
	}
	else
	{
		document.write("<a href=\"farmteam.html\" title=\"Farm Team\">FARM TEAM</a>");
	}
	writeNEW();
	document.write("<br />");
	*/

	/*
	 *		In the news
	 */
	
	if (pageName == "news.html")
	{
		document.write("<font class=\"navigation_deadlink\">IN THE NEWS</font>");
	}
	else
	{
		document.write("<a href=\"news.html\" title=\"In the news\">IN THE NEWS</a>");
	}
	/* writeNEW(); */
	document.write("<br />");
	
	/*
	 *		Recipients
	 */
	
	if (pageName == "recipients.html")
	{
		document.write("<font class=\"navigation_deadlink\">RECIPIENTS</font>");
	}
	else
	{
		document.write("<a href=\"recipients.html\" title=\"Recipients\">RECIPIENTS</a>");
	}
	/* writeNEW(); */
	document.write("<br />");
	
	/*
	 *		Cookbook
	 */
	
	if (pageName == "cookbookpage.html")
	{
		document.write("<font class=\"navigation_deadlink\">COOKBOOK</font>");
	}
	else
	{
		document.write("<a href=\"cookbookpage.html\" title=\"Cookbook\">COOKBOOK</a>");
	}
	/* writeNEW(); */
	document.write("<br />");
	
	/*
	 *		Recipe of the Week
	 */
	
	/*
	if (pageName == "recipeoftheweek.html")
	{
		document.write("<font class=\"navigation_deadlink\">OUR LATEST RECIPE:</font><br />");
		document.write("<font class=\"navigation_deadlink\"><i>Fish Chowder</i></font>");
	}
	else
	{
		document.write("<a href=\"cookbook/recipeoftheweek.html\" title=\"This week's recipe\">OUR LATEST RECIPE:<br />");
		document.write("<i>Fish Chowder</i></a>");
	}
	writeNEW();
	document.write("<br />");
	*/

	
	/*
	 *		Events
	 */
	
	/*
	if (pageName == "events.html")
	{
		document.write("<font class=\"navigation_deadlink\">EVENTS</font>");
	}
	else
	{
		document.write("<a href=\"events.html\" title=\"Events\">EVENTS</a>");
	}
	writeNEW();
	document.write("<br />");
	*/
	
	
	/*
	 *		Model
	 */
	
	if (pageName == "model.html")
	{
		document.write("<font class=\"navigation_deadlink\">THE GG MODEL</font>");
	}
	else
	{
		document.write("<a href=\"model.html\" title=\"Get something growing in your community\">THE GG MODEL</a>");
	}
	/* writeNEW(); */
	document.write("<br />");
	
	
	/*
	 *		Contribute
	 */
	
	if (pageName == "contribute.html")
	{
		document.write("<font class=\"navigation_deadlink\">CONTRIBUTE</font>");
	}
	else
	{
		document.write("<a href=\"contribute.html\" title=\"Contribute\">CONTRIBUTE</a>");
	}
	/* writeNEW(); */
	document.write("<br />");
	
	
	/*
	 *		Contact us
	 */
	
	if (pageName == "contactus.html")
	{
		document.write("<font class=\"navigation_deadlink\">CONTACT US</font>");
	}
	else
	{
		document.write("<a href=\"contactus.html\" title=\"Contact us\">CONTACT US</a>");
	}
	/* writeNEW(); */
	document.write("<br />");
	
	
	/*
	 *		Directions
	 */
	
	if (pageName == "directions.html")
	{
		document.write("<font class=\"navigation_deadlink\">DIRECTIONS</font>");
	}
	else
	{
		document.write("<a href=\"directions.html\" title=\"Directions\">DIRECTIONS</a>");
	}
	/* writeNEW(); */
	document.write("<br />");

	
	/*
	 *		Links
	 */
	
	if (pageName == "links.html")
	{
		document.write("<font class=\"navigation_deadlink\">LINKS</font>");
	}
	else
	{
		document.write("<a href=\"links.html\" title=\"Links\">LINKS</a>");
	}
	/* writeNEW(); */
	document.write("<br />");

	
	/*
	 *		Recipes
	 */
	/*
	
	if (pageName == "recipeoftheweek.html")
	{
		document.write("<font class=\"navigation_deadlink\">RECIPES</font>");
	}
	else
	{
		document.write("<a href=\"cookbook/recipeoftheweek.html\" title=\"Cookbook recipes\">RECIPES</a>");
	}
	writeNEW();
	document.write("<br />");
	*/
	
	
	/*
	 *		Read for Seeds
	 */
	/* if you're deleting this line, it's almost springtime!
	
	if (pageName == "readforseeds.html")
	{
		document.write("<font class=\"navigation_deadlink\">READ FOR SEEDS</font>");
	}
	else
	{
		document.write("<a href=\"readforseeds.html\" title=\"Read for Seeds\">READ FOR SEEDS</a>");
	}
	writeNEW();
	document.write("<br />");
	*/
}

/*
 *
 */

function writeNEW()
{
	document.write("&nbsp;&nbsp;&nbsp<font class=\"navigation_new\">NEW</font>");
}

/*
 *
 */

function wopen(url, w, h)
{
	// Fudge factors for window decoration space.
	// In my tests these work well on all platforms & browsers.
	w += 32;
	h += 96;
	var win = window.open(url,
		'popup', 
		'width=' + w + ', height=' + h + ', ' +
		'location=no, menubar=no, ' +
		'status=no, toolbar=no, scrollbars=no, resizable=no');
	win.resizeTo(w, h);
	win.focus();
}

/**
 * Copyright (C) 2004, CodeHouse.com. All rights reserved.
 * CodeHouse(TM) is a registered trademark.
 *
 * THIS SOURCE CODE MAY BE USED FREELY PROVIDED THAT
 * IT IS NOT MODIFIED OR DISTRIBUTED, AND IT IS USED
 * ON A PUBLICLY ACCESSIBLE INTERNET WEB SITE.
 *
 * Script Name: E-mail Hider
 *
 * You can obtain this script at http://www.codehouse.com
 */
 
function email(name, domain, suffix, text)
{
   var address = name + "\u0040" + domain + "." + suffix;
   var url = "mailto:" + address;

   if( ! text )
   {
	  text = address;
   }

   document.write("<a href=\"" + url + "\">" + text + "<\/a>");
}

/*
 * end CodeHouse.com copyright material.
 */
 
 

