// *********************************************************
// noSpamEmail is simply a method using JavaScript to break 
// apart an email address into a format that webcrawlers 
// can't read and save.  The goal is to fight spam.  The end 
// user can still click on the link, but they won't know the 
// valid email address until it is clicked.

// Address is of form '<com>;<domain>;<user>' -- example: com;hotmail;David_B_Baker
// call using href="javascript:noSpam('com;hotmail;David_B_Baker');"
function noSpam(addr)
{
	var a = addr.split(';');
	parent.location = 'mailto:' + a[2] + '@' + a[1] + '.' + a[0];
}

// *********************************************************
// Sends an email to the designated Webmaster.
function emailWebmaster()
{
	noSpam('com;hotmail;David_B_Baker');
}

// *********************************************************
// Creates a pop up window with the url, width, and height specified.

function popUp(url,w,h) {
newWin=window.open(url,"win",'top=25,left=25,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,width=' + w + ',height=' + h + '');
self.name = "mainWin";
if (window.focus) {newWin.focus()}
}

// *********************************************************
// Redirects to a new page using a drop-down selection list.

function jumpPage(frmPages){
var URL = document.frmPages.page.options[document.frmPages.page.selectedIndex].value;
window.location.href = URL;
}

// *********************************************************
// Used by dynamic HTML to show or hide a <div> section.

function togDisplay (elem, image)
{
	if (elem.style.display == "none")
	{	
		elem.style.display = "";
		image.src = "images/el_minus.gif";
		image.title = "Hide Section";
		switch (elem.name)
		{
			default:
				{
					break;
				}
		}	
	}	
	else
	{
		elem.style.display = "none";
		image.src = "images/el_plus.gif";
		image.title = "Show Section";
		switch (elem.name)
		{
			default:
				{
					break;
				}
		}
	}	
}

// *********************************************************
// Used by dynamic HTML to hide a <div> section.

function closeDisplay (elem, image)
{
	elem.style.display = "none";
	image.src = "images/el_plus.gif";
	image.title = "Show Section";
	switch (elem.name)
	{
		default:
			{
				break;
			}
	}
}
