<!--
function SetMenu()
{
	DoSetMenu(document.URL);
}


function SetMenuPage(strURL)
{
	strURL = "http://www.pygmygoatclub.org/" + strURL

	DoSetMenu(strURL);
}

function DoSetMenu(strURL)
{
	topMenuItem = false;
	foundHREF = false;
	var sbookmark = "#";
	var sparmlist = "'?'";
	
	s = strURL;

	//  Check for bookmark in url, and strip out the bookmark name

	t = s.search(sbookmark);
	if (t != -1)
	{
		s = (s.substring(0,t));
	} 

	//  Check for a parameter in url, and strip out any parmlist

	t = s.search(sparmlist);
	if (t != -1)
	{
		s = (s.substring(0,t));
	} 



//
// Create an array of all anchor tags on the page and loop through it to match to the url.
//

	a = document.all.tags("A");

Outerloop:
	for (i=0;i<a.length;i++) 
	{
		if (a[i].href.toLowerCase() == s.toLowerCase())
		{
			j = a[i];
			foundHREF = true;
			
	Innerloop:			
  			for (k=1;k<5;k++)

			{
				j = j.parentElement;
				if (j.tagName == "TD")
				{
					if (j.className == "MenuItem") 
					{
						j.className = "SelectedMenuItem";
						topMenuItem = false;
						break Outerloop;
					}
				}	// this is a table data element	
			}	// inner for loop
		}	// url matches
	}	// outer for loop
	
	
// If no match on href, default the menu to the first top level item, which should be the site home.

if (!foundHREF)

{  // Build an array of all data tags and set the first top level menu item background to white.
	tdTags = document.all.tags("TD");

	for (k=0;k<tdTags.length;k++)
	{
		if (tdTags[k].className == "MenuItem")
		{
			tdTags[k].className = "SelectedMenuItem"
			topMenuItem = true;
			break;
		}
	}

}
	

}  // end of function
//-->