var who;
var atsign;
var where;
var subj;
var prelink;
var link;
var postlink;

function email_webmaster() {
	who = "cvandru";
	atsign = "@";
	where = "va.metrocast.net";
	subj = document.title;
	prelink = "Comments or questions about this site? Email the ";
	link = "webmaster";	
	postlink = ".";
	document.write(prelink + "<a href='mailto:" + who + atsign + where + "?subject=" + subj+ "&" + "'>");
	document.write(link);
	document.write("<\/a>");
	document.write(postlink);
}

function email_pastor() {
	who = "hanoverbaptistchurch";
	atsign = "@";
	where = "verizon.net";
	subj = "";
	prelink = "";
	link = "Rick Crookshank, Pastor";
	postlink = "";
	document.write(prelink + "<a href='mailto:" + who + atsign + where + "?subject=" + subj+ "&" + "'>");
	document.write(link);
	document.write("<\/a>");
	document.write(postlink);
}

function email_hanover() {
	who = "hanoverbaptistchurch";
	atsign = "@";
	where = "verizon.net";
	subj = "";
	prelink = "";
	link = "Hanover Baptist Church";
	postlink = "";
	document.write(prelink + "<a href='mailto:" + who + atsign + where + "?subject=" + subj+ "&" + "'>");
	document.write(link);
	document.write("<\/a>");
	document.write(postlink);
}

// ExternalLinks allows a hyperlink (href) to open a new window (target="_blank" is forbidden in XHTML)
// From http://www.sitepoint.com/article/standards-compliant-world/
function externalLinks() { 
	if (!document.getElementsByTagName) return; 
	var anchors = document.getElementsByTagName("a"); 
	for (var i=0; i<anchors.length; i++) { 
		var anchor = anchors[i]; 
		if (anchor.getAttribute("href") && 
			anchor.getAttribute("rel") == "external") 
			anchor.target = "_blank"; 
	} 
}

// Run ExternalLinks when the page loads.
window.onload = externalLinks;