//  common.js -- common javascript functions
//
//  May 2007 -- das
//
//	include in a page using this directive after page open:
//
//		<script type="text/javascript" language="javascript" src="code/common.js"></script>
//
//  Modification History
//
//  Date		Description
//  ----------  ---------------------------------------------------------------
//	 6/ 3/2007	moved to common code library
//	 6/10/2007	added support for .net tld


//	em.js -- obscure e-mail address to deter spambots
//
//	parameters:
//
//		d - domain name (e.g., "churchvillelightning")
//		c - top-level domain
//			"c" - translated to "com"
//			"o" - translated to "org"
//			"n" - translated to "net"
//		u - user name (e.g., "webmaster")
//

function em(d,c,u) {
	var at = "&#64;";
	var dot= "&#46;";
	var mt = "mai"+"lto:";
	var td = "";
	var adr= "";

	if (c == "c")
		td = "c"+"om";
	if (c == "o")
		td = "o"+"rg";
	if (c == "n")
		td = "n"+"et";
	adr = u+at+d+dot+td;
	document.write("<a href=\""+mt+adr+"\">"+adr+"</a>");
}


//  gotopage -- unconditionally jump to a new page
//
//	parameters:
//
//		page - simple page name (e.g., "contacts"); ".php" will be appended
//

function gotopage( page ) {
	document.location=page+".php";
}

