 
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
	 */
	/* writenavvspace(); */
	if (pageName == "aboutus.html")
	{
		document.write("<img src=\"/images/sp.gif\" width=\"40\" height=\"1\" border=\"0\" alt=\" \"><font class=\"nolink\">ABOUT US</font>");
	}
	else
	{
		document.write("<img src=\"/images/sp.gif\" width=\"40\" height=\"1\" border=\"0\" alt=\" \"><a href=\"/aboutus.html\" title=\"About us\">ABOUT US</a>");
	}
	/* writeNEW(); */
	document.write("<br />");
	
	/*
	 *		Jobs
	 */
	
	/*
	writenavvspace();
	if (pageName == "opportunities.html")
	{
		document.write("<img src=\"/images/sp.gif\" width=\"40\" height=\"1\" border=\"0\" alt=\" \"><font class=\"nolink\">JOBS</font>");
	}
	else
	{
		document.write("<img src=\"/images/sp.gif\" width=\"40\" height=\"1\" border=\"0\" alt=\" \"><a href=\"/opportunities.html\" title=\"Jobs\">JOBS</a>");
	}
	writeNEW();
	document.write("<br />");
	*/
	
	
	/*
	 *		See the garden
	 */
	writenavvspace();
	if (pageName == "garden.html")
	{
		document.write("<img src=\"/images/sp.gif\" width=\"40\" height=\"1\" border=\"0\" alt=\" \"><font class=\"nolink\">SEE THE GARDEN</font>");
	}
	else
	{
		document.write("<img src=\"/images/sp.gif\" width=\"40\" height=\"1\" border=\"0\" alt=\" \"><a href=\"/garden.html\" title=\"See the garden\">SEE THE GARDEN</a>");
	}
	/* writeNEW(); */
	document.write("<br />");
	
	/*
	 *		Garden Jornal
	 */
	/*
	writenavvspace();
	document.write("<img src=\"/images/sp.gif\" width=\"40\" height=\"1\" border=\"0\" alt=\" \"><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
	 */
	writenavvspace();
	if (pageName == "volunteer.html")
	{
		document.write("<img src=\"/images/sp.gif\" width=\"40\" height=\"1\" border=\"0\" alt=\" \"><font class=\"nolink\">VOLUNTEER</font>");
	}
	else
	{
		document.write("<img src=\"/images/sp.gif\" width=\"40\" height=\"1\" border=\"0\" alt=\" \"><a href=\"/volunteer.html\" title=\"Volunteer\">VOLUNTEER</a>");
	}
	/* writeNEW(); */
	document.write("<br />");
	
	/*
	 *		Farm Team
	 */
	 /*
	writenavvspace();
	if (pageName == "farmteam.html")
	{
		document.write("<img src=\"/images/sp.gif\" width=\"40\" height=\"1\" border=\"0\" alt=\" \"><font class=\"nolink\">FARM TEAM</font>");
	}
	else
	{
		document.write("<img src=\"/images/sp.gif\" width=\"40\" height=\"1\" border=\"0\" alt=\" \"><a href=\"/farmteam.html\" title=\"Farm Team\">FARM TEAM</a>");
	}
	writeNEW();
	document.write("<br />");
	*/

	/*
	 *		In the news
	 */
	writenavvspace();
	if (pageName == "news.html")
	{
		document.write("<img src=\"/images/sp.gif\" width=\"40\" height=\"1\" border=\"0\" alt=\" \"><font class=\"nolink\">IN THE NEWS</font>");
	}
	else
	{
		document.write("<img src=\"/images/sp.gif\" width=\"40\" height=\"1\" border=\"0\" alt=\" \"><a href=\"/news.html\" title=\"In the news\">IN THE NEWS</a>");
	}
	/* writeNEW(); */
	document.write("<br />");
	
	/*
	 *		Recipients
	 */
	writenavvspace();
	if (pageName == "recipients.html")
	{
		document.write("<img src=\"/images/sp.gif\" width=\"40\" height=\"1\" border=\"0\" alt=\" \"><font class=\"nolink\">RECIPIENTS</font>");
	}
	else
	{
		document.write("<img src=\"/images/sp.gif\" width=\"40\" height=\"1\" border=\"0\" alt=\" \"><a href=\"/recipients.html\" title=\"Recipients\">RECIPIENTS</a>");
	}
	/* writeNEW(); */
	document.write("<br />");
	
	/*
	 *		Cookbook
	 */
	/*
	writenavvspace();
	if (pageName == "cookbookpage.html")
	{
		document.write("<img src=\"/images/sp.gif\" width=\"40\" height=\"1\" border=\"0\" alt=\" \"><font class=\"nolink\">COOKBOOK</font>");
	}
	else
	{
		document.write("<img src=\"/images/sp.gif\" width=\"40\" height=\"1\" border=\"0\" alt=\" \"><a href=\"/cookbookpage.html\" title=\"Cookbook\">COOKBOOK</a>");
	}
	writeNEW();
	document.write("<br />");
	*/
	
	/*
	 *		Recipe of the Week
	 */
	/*
	writenavvspace();
	if (pageName == "recipeoftheweek.html")
	{
		document.write("<img src=\"/images/sp.gif\" width=\"40\" height=\"1\" border=\"0\" alt=\" \"><font class=\"nolink\">OUR LATEST RECIPE:</font><br />");
		document.write("<img src=\"/images/sp.gif\" width=\"40\" height=\"1\" border=\"0\" alt=\" \"><font class=\"nolink\"><i>Fish Chowder</i></font>");
	}
	else
	{
		document.write("<img src=\"/images/sp.gif\" width=\"40\" height=\"1\" border=\"0\" alt=\" \"><a href=\"/cookbook/recipeoftheweek.html\" title=\"This week's recipe\">OUR LATEST RECIPE:<br />");
		document.write("<img src=\"/images/sp.gif\" width=\"40\" height=\"1\" border=\"0\" alt=\" \"><i>Fish Chowder</i></a>");
	}
	writeNEW();
	document.write("<br />");
	*/

	
	/*
	 *		Events
	 */
	writenavvspace();
	if (pageName == "events.html")
	{
		document.write("<img src=\"/images/sp.gif\" width=\"40\" height=\"1\" border=\"0\" alt=\" \"><font class=\"nolink\">EVENTS</font>");
	}
	else
	{
		document.write("<img src=\"/images/sp.gif\" width=\"40\" height=\"1\" border=\"0\" alt=\" \"><a href=\"/events.html\" title=\"Events\">EVENTS</a>");
	}
	/* writeNEW(); */
	document.write("<br />");
	
	
	/*
	 *		Model
	 */
	writenavvspace();
	if (pageName == "model.html")
	{
		document.write("<img src=\"/images/sp.gif\" width=\"40\" height=\"1\" border=\"0\" alt=\" \"><font class=\"nolink\">THE GG MODEL</font>");
	}
	else
	{
		document.write("<img src=\"/images/sp.gif\" width=\"40\" height=\"1\" border=\"0\" alt=\" \"><a href=\"/model.html\" title=\"Get something growing in your community\">THE GG MODEL</a>");
	}
	/* writeNEW(); */
	document.write("<br />");
	
	
	/*
	 *		Contribute
	 */
	writenavvspace();
	if (pageName == "contribute.html")
	{
		document.write("<img src=\"/images/sp.gif\" width=\"40\" height=\"1\" border=\"0\" alt=\" \"><font class=\"nolink\">CONTRIBUTE</font>");
	}
	else
	{
		document.write("<img src=\"/images/sp.gif\" width=\"40\" height=\"1\" border=\"0\" alt=\" \"><a href=\"/contribute.html\" title=\"Contribute\">CONTRIBUTE</a>");
	}
	/* writeNEW(); */
	document.write("<br />");
	
	
	/*
	 *		Contact us
	 */
	writenavvspace();
	if (pageName == "contactus.html")
	{
		document.write("<img src=\"/images/sp.gif\" width=\"40\" height=\"1\" border=\"0\" alt=\" \"><font class=\"nolink\">CONTACT US</font>");
	}
	else
	{
		document.write("<img src=\"/images/sp.gif\" width=\"40\" height=\"1\" border=\"0\" alt=\" \"><a href=\"/contactus.html\" title=\"Contact us\">CONTACT US</a>");
	}
	/* writeNEW(); */
	document.write("<br />");
	
	
	/*
	 *		Directions
	 */
	writenavvspace();
	if (pageName == "directions.html")
	{
		document.write("<img src=\"/images/sp.gif\" width=\"40\" height=\"1\" border=\"0\" alt=\" \"><font class=\"nolink\">DIRECTIONS</font>");
	}
	else
	{
		document.write("<img src=\"/images/sp.gif\" width=\"40\" height=\"1\" border=\"0\" alt=\" \"><a href=\"/directions.html\" title=\"Directions\">DIRECTIONS</a>");
	}
	/* writeNEW(); */
	document.write("<br />");

	
	/*
	 *		Links
	 */
	writenavvspace();
	if (pageName == "links.html")
	{
		document.write("<img src=\"/images/sp.gif\" width=\"40\" height=\"1\" border=\"0\" alt=\" \"><font class=\"nolink\">LINKS</font>");
	}
	else
	{
		document.write("<img src=\"/images/sp.gif\" width=\"40\" height=\"1\" border=\"0\" alt=\" \"><a href=\"/links.html\" title=\"Links\">LINKS</a>");
	}
	/* writeNEW(); */
	document.write("<br />");

	
	/*
	 *		Recipes
	 */
	/*
	writenavvspace();
	if (pageName == "recipeoftheweek.html")
	{
		document.write("<img src=\"/images/sp.gif\" width=\"40\" height=\"1\" border=\"0\" alt=\" \"><font class=\"nolink\">RECIPES</font>");
	}
	else
	{
		document.write("<img src=\"/images/sp.gif\" width=\"40\" height=\"1\" border=\"0\" alt=\" \"><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!
	writenavvspace();
	if (pageName == "readforseeds.html")
	{
		document.write("<img src=\"/images/sp.gif\" width=\"40\" height=\"1\" border=\"0\" alt=\" \"><font class=\"nolink\">READ FOR SEEDS</font>");
	}
	else
	{
		document.write("<img src=\"/images/sp.gif\" width=\"40\" height=\"1\" border=\"0\" alt=\" \"><a href=\"/readforseeds.html\" title=\"Read for Seeds\">READ FOR SEEDS</a>");
	}
	writeNEW();
	document.write("<br />");
	*/
}

/*
 *
 */

function writenavvspace()
{
	document.write("<img src=\"/images/sp.gif\" width=\"1\" height=\"21\" border=\"0\" alt=\" \"><br />");
}

/*
 *
 */

function writeNEW()
{
	document.write("&nbsp;&nbsp;&nbsp<font class=\"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.
 */
 
 
/***********************************************
* Cool DHTML tooltip script II- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
***********************************************/

/*
 * <u><a onMouseOver="ddrivetip('Gaining Ground 10/11/2007<br />By Catherine<p>Finally!', 300)";
 *		 onMouseOut="hideddrivetip()">
 *		 recollection</a></u>
 */

var offsetfromcursorX=12		// Customize x offset of tooltip
var offsetfromcursorY=10		// Customize y offset of tooltip

var offsetdivfrompointerX=10	// Customize x offset of tooltip DIV relative to pointer image
var offsetdivfrompointerY=14	// Customize y offset of tooltip DIV relative to pointer image. Tip: Set it to (height_of_pointer_image-1).

document.write('<div id="dhtmltooltip"></div>')		//write out tooltip DIV
document.write('<img id="dhtmlpointer" src="/images_other/arrow2.gif">') //write out pointer image

var ie=document.all
var ns6=document.getElementById && !document.all
var enabletip=false

if (ie || ns6)
	var tipobj=document.all? document.all["dhtmltooltip"] : document.getElementById? document.getElementById("dhtmltooltip") : ""

var pointerobj=document.all? document.all["dhtmlpointer"] : document.getElementById? document.getElementById("dhtmlpointer") : ""

function ietruebody()
{
	return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

function ddrivetip(thetext, thewidth, thecolor)
{
	if (ns6 || ie)
	{
		if (typeof thewidth!="undefined")
			tipobj.style.width=thewidth+"px"
		if (typeof thecolor!="undefined" && thecolor!="")
			tipobj.style.backgroundColor=thecolor
			
		tipobj.innerHTML=thetext
		enabletip=true
		
		return false
	}
}

function positiontip(e)
{
	if (enabletip)
	{
		var nondefaultpos=false
		var curX=(ns6)?e.pageX : event.clientX+ietruebody().scrollLeft;
		var curY=(ns6)?e.pageY : event.clientY+ietruebody().scrollTop;
		//Find out how close the mouse is to the corner of the window
		var winwidth=ie&&!window.opera? ietruebody().clientWidth : window.innerWidth-20
		var winheight=ie&&!window.opera? ietruebody().clientHeight : window.innerHeight-20
		
		var rightedge=ie&&!window.opera? winwidth-event.clientX-offsetfromcursorX : winwidth-e.clientX-offsetfromcursorX
		var bottomedge=ie&&!window.opera? winheight-event.clientY-offsetfromcursorY : winheight-e.clientY-offsetfromcursorY
		
		var leftedge=(offsetfromcursorX<0)? offsetfromcursorX*(-1) : -1000
		
		//if the horizontal distance isn't enough to accomodate the width of the context menu
		if (rightedge < tipobj.offsetWidth)
		{
			//move the horizontal position of the menu to the left by it's width
			tipobj.style.left=curX-tipobj.offsetWidth+"px"
			nondefaultpos=true
		}
		else if (curX < leftedge)
			tipobj.style.left="5px"
		else
		{
			//position the horizontal position of the menu where the mouse is positioned
			tipobj.style.left=curX+offsetfromcursorX-offsetdivfrompointerX+"px"
			pointerobj.style.left=curX+offsetfromcursorX+"px"
		}
		
		//same concept with the vertical position
		if (bottomedge<tipobj.offsetHeight)
		{
			tipobj.style.top=curY-tipobj.offsetHeight-offsetfromcursorY+"px"
			nondefaultpos=true
		}
		else
		{
			tipobj.style.top=curY+offsetfromcursorY+offsetdivfrompointerY+"px"
			pointerobj.style.top=curY+offsetfromcursorY+"px"
		}
		
		tipobj.style.visibility="visible"
		
		if (!nondefaultpos)
			pointerobj.style.visibility="visible"
		else
			pointerobj.style.visibility="hidden"
	}
}

function hideddrivetip()
{
	if (ns6||ie)
	{
		enabletip=false
		tipobj.style.visibility="hidden"
		pointerobj.style.visibility="hidden"
		tipobj.style.left="-1000px"
		tipobj.style.backgroundColor=''
		tipobj.style.width=''
	}
}

document.onmousemove=positiontip


