function writeMe(mailName,mailLoc,mailType,visibleText) { //used to mask email addresses; bottom of each page has an example of how to use it
			outPut = "<a href='mai" + "lto:" + mailName + "@" + mailLoc + "." + mailType + "'>" + visibleText + "</a>";
			document.write(outPut);
		}
		

function encodeYahoo(nameData,textToUse) { //encodes email address for Thornhill Yahoo Group
var host = "yahoogroups.com";
var firstPart = "mail";
var secondPart = "to";
document.write("<a href=" + firstPart + secondPart + ":" + nameData + "@" + host + ">" + textToUse + "</a>");
//alert("<a href=" + firstPart + secondPart + ":" + nameData + "@" + host + ">" + textToUse + "</a>");
}
//this one is slightly modified for use in the Committees paragraphs
function encodeEmailComte(nameData) {
var host = "thornhillschool.org";
var firstPart = "mail";
var secondPart = "to";
//document.write("<a href=" + firstPart + secondPart + ":" + nameData + "@" + host + ">email the committee chair</a>");
document.write("contact the committee chair"); //for  now, not using chair email addresses
}

//<li id="menu-item-119" class="menu-item menu-item-type-post_type menu-item-object-page current-page-ancestor current-menu-ancestor current-menu-parent current-page-parent current_page_parent current_page_ancestor menu-item-119"><a href="http://www.thornhillschool.org/b/pfc/">PFC</a>

jQuery(function( $ ){
	
	//copying active part of top nav into rightnav
	var rnavSource = "";
	rnavSource += "<h3>In This Section</h3><ul><li>";
	if($("li.current-page-ancestor").length>0) {
		rnavSource += $("li.current-page-ancestor").html();
	} else {
		rnavSource += $("li.current-menu-item").html();
	}
	rnavSource += "</ul>";
	
	$('#topRightLinks').html(rnavSource);
	
	$("#teachtable tr:odd").css("background-color", "#f0f0f0");
});
