// JavaScript Document

var pathname = window.location.pathname;
var pageArray = pathname.split("/");
var currentPage = pageArray[pageArray.length-1];
// If the end of the url is blank
if (currentPage == "") {
	currentPage = "default.aspx";	
}
// Remove anything after the period
var newPageArray = currentPage.split(".");
currentPage = newPageArray[0].toLowerCase();


// Top Links defining the Classes based on url
var homeGospel = currentPage === "home-gospel" ? "current" : "rollover";
var adultGospel = currentPage === "adults-gospel" ? "current" : "rollover";
var childrenGospel = currentPage === "children-gospel" ? "current" : "rollover";
var lectionaryGospel = currentPage === "lectionary-gospel" ? "current" : "rollover";
var behindGospel = currentPage === "behind-the-scenes-gospel" ? "current" : "rollover";


document.write('<div id="nav">');
	document.write('<table class="menu" cellpadding="0" cellspacing="0" border="0">');
		document.write('<tr>');
			document.write('<td nowrap="nowrap" align="center"><ul class="' + homeGospel + '"><li><a href="home-gospel.aspx" title="The Gospel Series Home">Home</a></li></ul></td>');
			
			document.write('<td><img src="/images/navDivider.gif" alt="" /></td>');
			
			document.write('<td nowrap="nowrap" align="center"><ul class="' + adultGospel + '"><li><a href="adults-gospel.aspx" title="The Gospel Series for Adults">Adults</a></li></ul></td>');
			
			document.write('<td><img src="/images/navDivider.gif" alt="" /></td>');
			
			document.write('<td nowrap="nowrap" align="center"><ul class="' + childrenGospel + '"><li><a href="children-gospel.aspx" title="The Gospel Series for Children">Children&rsquo;s</a></li></ul></td>');
			
			document.write('<td><img src="/images/navDivider.gif" alt="" /></td>');
			
			document.write('<td nowrap="nowrap" align="center"><ul class="' + behindGospel + '"><li><a href="behind-the-scenes-gospel.aspx" title="The Gospel Series - Behind the Scenes">Behind the Scenes</a></li></ul></td>');
			
			
		document.write('</tr>');
	document.write('</table>');
document.write('</div>');