/**********************************************************************
* Author:	Penny DeGraff
* Date created: 3/9/2006
* Purpose:	Navigation scripts for navigating within the website
*		and centralizing the handling of mailto hyperlinks.
* Additional information:	none
***********************************************************************/

function mailLink(action, subject, body)
/**********************************************************************
* Purpose:	This function centralizes the webmaster's email address. It
*		formats the webmaster's mailto hyperlink and writes it to the
*		calling HTML page.  
* Parameters:	action contains either "write" or "send" to distinguish
*		whether the hyperlink is being written to the page or
*		sent to the webmaster with new member information.  
*		subject	and body contain formatting needed for generating
*		an email.
* Additional info:	none
***********************************************************************/
{
		var email = "penny.degraff@gte.net";
		var msg; 
		
		if (action == "write")
		{
				msg = '<a href="mailto:' + email;
				msg += '?subject=' + subject + '">';
				msg += email + '</a>';
				document.write(msg);
		}
		else  //action == "send"
		{
				msg = 'mailto:' + email;
				msg += '?Subject=' + subject;
				msg += '&Body=' + body;
				location.href(msg);
		}				
}

function mainNav()
/**********************************************************************
* Purpose:	This function formats the navigation HTML for pages at the
*		main level and writes it to the calling HTML page.
* Parameters:	none
* Additional info:	none
***********************************************************************/
{
		var msg;

		msg = '<p><a href="default.htm">&nbsp;Home</a></p>';
		msg += '<br /><br />';
		msg += '<p><a href="AboutMe.htm">&nbsp;About Me</a></p>';
		msg += '<br /><br />';
		
		document.write(msg);
}
	
function adminNav()
/**********************************************************************
* Purpose:	This function formats the navigation HTML for the admin pages 
*		accessible by logged-in band members and writes it to the 
*		calling HTML page.
* Parameters:	none
* Additional info:	none
***********************************************************************/
{
		var msg;
		msg = '<p><a href="admin2.html">&nbsp;Main Admin</a></p>';
		msg += '<p><a href="email.html">&nbsp;E-mail Review</a></p>';
		msg += '<p><a href="booking.html">&nbsp;Booking Review</a></p>';
		msg += '<p><a href="performances2.html">&nbsp;Performance Entry</a></p>';
		msg += '<p><a href="newsentry2.html">&nbsp;News Entry</a></p>';

		msg += '<br />';
		
		document.write(msg);
}

									