/* ----------------------------------------------------------------------------------
 *  Copyright (c) Raccoon Valley Swim Club
 * ----------------------------------------------------------------------------------
 */


function jsMailTo (prefix) {
	location.href = "mailto:" + prefix + "&#64;" + "whatnottosing" + "&#46;" + "com";
}

function mailPrint (prefix) {
	return prefix
	       + "<img src=\"/resources/images/spacer.gif\" height=\"1\" width=\"1\" alt=\"\" border=\"0\">"
	       + "&#64;"
	       + "<img src=\"/resources/images/spacer.gif\" height=\"1\" width=\"1\" alt=\"\" border=\"0\">"
	       + "whatnottosing" + "&#46;" + "com"
}


/* To cut down on spam, all email addresses are generated programmatically. */

function emailEditor() {
	document.write("<a href=\"javascript:jsMailTo('editor')\">" + mailPrint("editor") + "</a>");
}

function emailInfo() {
	document.write("<a href=\"javascript:jsMailTo('info1')\">" + mailPrint("info1") + "</a>");
}

function emailPrivacy() {
	document.write("<a href=\"javascript:jsMailTo('privacy')\">" + mailPrint("privacy") + "</a>");
}

function emailBusiness() {
	document.write("<a href=\"javascript:jsMailTo('business')\">" + mailPrint("business") + "</a>");
}

function emailSeasonOne() {
	document.write("<a href=\"javascript:jsMailTo('season.one')\">" + mailPrint("season.one") + "</a>");
}

function emailWebmaster() {
	document.write("<a href=\"javascript:jsMailTo('webmaster')\">" + mailPrint("webmaster") + "</a>");
}

function emailDirect(sAddr) {
	document.write("<a href=\"javascript:jsMailTo('" + sAddr + "')\">" + mailPrint(sAddr) + "</a>");
}



/* show/hide JS code, usually used for tooltip elements */

function showElt(sId) {
	oElt = document.getElementById(sId);

	if (oElt) {
		oElt.style.display = "block";
	}
}

function hideElt(sId) {
	oElt = document.getElementById(sId);

	if (oElt) {
		oElt.style.display = "none";
	}
}
