
LogoPic="/theme/titlebar_logo160.png";
LogoWidth="160";
LogoHeight="160";
TitleBackground="/theme/topbanner.gif";
MainContentWidth="1000";

// Menu specifics:

// Apycom jQuery Menus
// load menu style sheet and code
document.writeln( '<link type="text/css" href="/theme/menu/menu.css" rel="stylesheet" />' );
document.writeln( '<script type="text/javascript" src="/theme/menu/jquery.js"></script>' );
document.writeln( '<script type="text/javascript" src="/theme/menu/menu.js"></script>' );
var MenuHeight = 41;	// ********** CURRENT MENU IS 41 PIXELS HIGH *********

// load theme style sheet
document.writeln( '<link type="text/css" href="/theme/theme.css" rel="stylesheet" />' );

// Load Google Font "Ultra" which we use in the titles
document.writeln( '<!-- Link in Google Fonts: Ultra -->' );
document.writeln( "<link href='http://fonts.googleapis.com/css?family=Ultra' rel='stylesheet' type='text/css' />" );

// Menu tree
//	Menu[i] = new Array( Menu_Text, Link, Submenu, Description, Target );

// Menus:
//	All items in menues have the same fields, even though not all are used:
//		[0] - name to display in the menu
//		[1] - URL (relative or absolute) - start with "http://" when it is outside the web site
//		[2] - Submenu (if any) - use "EmptySubmenu" if no submenu.
//		[3] - Description for site list
//		[4] - link target for "<a>" reference (e.g. "_blank" starts link in a new window)

// MainMenu - main menu displayed on each page
// EmptySubmenu - an empty menu (meaning no submenus)
// ...Submenu - various sumbmenus

EmptySubmenu = new Array();

CalendarSubmenu = new Array();
  CalendarSubmenu[0] = new Array( "Calendar", "/cal/index.php", EmptySubmenu,
						  "Calendar of Events", "" );
  CalendarSubmenu[1] = new Array( "List of Events", "/events.php", EmptySubmenu,
						  "List of Upcoming Events", "" );
  CalendarSubmenu[2] = new Array( "Peer Ministry Calendar", "/peers/cal/index.php", 
							EmptySubmenu, "Look at all Peer Ministry Events", "" );

StudentAboutSubmenu = new Array();
  StudentAboutSubmenu[0] = new Array( "Lead Team", "/peers/teams/lead_team.html", 
							EmptySubmenu, "The Peer Ministry Lead Team", "" );
  StudentAboutSubmenu[1] = new Array( "Peer Ministers", "/peers/index.html", 
							EmptySubmenu, "About our Peer Ministers", "" );

StudentsSubmenu = new Array();
  StudentsSubmenu[0] = new Array( "About", "", 
							StudentAboutSubmenu, "About our Peer Ministers", "" );
  StudentsSubmenu[1] = new Array( "Faith", "/peers/teams/faith_team.html", 
							EmptySubmenu, "Faith Team Programs", "" );
  StudentsSubmenu[2] = new Array( "Prayer", "/peers/teams/prayer_team.html", 
							EmptySubmenu, "Prayer Team Programs", "" );
  StudentsSubmenu[3] = new Array( "Gatherings", "/peers/teams/gatherings.html", 
							EmptySubmenu, "Gatherings", "" );
  StudentsSubmenu[4] = new Array( "Retreat", "/peers/teams/retreat_team.html", 
							EmptySubmenu, "Retreat Team Programs", "" );
  StudentsSubmenu[5] = new Array( "Social", "/peers/teams/social_team.html", 
							EmptySubmenu, "Social Team Programs", "" );
  StudentsSubmenu[6] = new Array( "Service", "/peers/teams/service_team.html", 
							EmptySubmenu, "Service Team Programs", "" );
  StudentsSubmenu[7] = new Array( "Music", "/peers/teams/music_team.html", 
							EmptySubmenu, "Music Team Programs", "" );
  StudentsSubmenu[8] = new Array( "Sign up For More Info", "/register.html", 
							EmptySubmenu, "Sign Up for More Information", "" );
  StudentsSubmenu[9] = new Array( "Email List", "/elists/?p=subscribe", EmptySubmenu,
						  "Sign up for our email list", "" );

ParishSubmenu = new Array();
  ParishSubmenu[0] = new Array( "Sacraments", "http://www.lukespot.com/sacraments.php", EmptySubmenu, "Sacraments", "_blank" );
  ParishSubmenu[1] = new Array( "Prayer Requests", "http://www.lukespot.com/prayers.php", EmptySubmenu, "Request our prayers.", "_blank" );
  ParishSubmenu[2] = new Array( "Capital Camapign", "http://www.lukespot.com/special/building/building.php", EmptySubmenu, 
							   		"Build-and-They-Will-Come Capital Campaign.", "_blank" );
  ParishSubmenu[3] = new Array( "Bulletins", "http://www.lukespot.com/bulletin.php", EmptySubmenu, "Recent Bulletins", "_blank" );
  ParishSubmenu[4] = new Array( "Parish Website", "http://www.lukespot.com", EmptySubmenu, "Check out our Parish Website", "_blank" );

SubMenuPaulist = new Array();
  SubMenuPaulist[0] = new Array( "About the Paulist Fathers", "http://www.lukespot.com/paulists.html", EmptySubmenu,
							   "About the Paulist Fathers", "_blank" );
  SubMenuPaulist[1] = new Array( "Paulist Fathers Website", "http://www.paulist.org", EmptySubmenu,
							   "The Paulist Fathers - Missionaries to North America", "" );
  SubMenuPaulist[2] = new Array( "Paulist Fathers Vocations", "http://www.paulist.org/vocation/", EmptySubmenu,
							   "Join Paulist Fathers - Help Give the Gospel a Voice", "" );

SubMenuAbout = new Array();
  SubMenuAbout[0] = new Array( "Who We Are", "/whoWeAre.html", EmptySubmenu, "Who We Are / Mission Statement", "" );
  SubMenuAbout[1] = new Array( "Contact Us", "/contact.php", EmptySubmenu, "Contact Us...", "" );
  SubMenuAbout[2] = new Array( "Staff", "/contact.php#Staff", EmptySubmenu, "Meet our Staff", "" );
  SubMenuAbout[3] = new Array( "Map", "/map.html", EmptySubmenu, "Maps to Our Locations", "" );

ResourcesSubmenu = new Array();
  ResourcesSubmenu[0] = new Array( "GVSU Homepage", "http://www.gvsu.edu", EmptySubmenu, "Go to the Grand Valley State University website", "_blank" );
  ResourcesSubmenu[1] = new Array( "Links", "/links.php", EmptySubmenu, "Interesting Links", "" );
  ResourcesSubmenu[2] = new Array( "Paulists", "http://www.lukespot.com/paulists.html", SubMenuPaulist, "About the Paulist Fathers", "_blank" );
  ResourcesSubmenu[3] = new Array( "Diocese of GR", "http://www.dioceseofgrandrapids.org", EmptySubmenu, "Diocese of Grand Rapids", "_blank" );
  ResourcesSubmenu[4] = new Array( "Site Index", "/siteindex.php", EmptySubmenu, "Look at Everything on our Site", "" );
  ResourcesSubmenu[5] = new Array( "Search", "/search.php", EmptySubmenu, "Search Our Web Site", "" );
  ResourcesSubmenu[6] = new Array( "Fr. Brad's Blog", "http://www.frbrad.com/", EmptySubmenu, "Fr. Brad's Blog", "_blank" );
  ResourcesSubmenu[7] = new Array( "Fr. Don on Facebook", "http://www.facebook.com/profile.php?id=562419223&ref=search&sid=562419223.3181047917..1", 
								  EmptySubmenu, "Fr. Don on Facebook", "_blank" );

MainMenu = new Array();		// Main Menu
  MainMenu[0] = new Array( "Home", "http://www.gvsucatholic.org", EmptySubmenu, "Home Page", "" );
  MainMenu[1] = new Array( "About", "/whoWeAre.html", SubMenuAbout, "About Us", "" );
  MainMenu[2] = new Array( "Calendar", "/cal/index.php", CalendarSubmenu, "Check out events in our Main Calendar", "" );
  MainMenu[3] = new Array( "Student Ministries", "/students.php", StudentsSubmenu, "Ministries for Students", "" );
  MainMenu[4] = new Array( "Parish", "", ParishSubmenu, "Information about St. Luke University Parish", "_blank" );
  MainMenu[5] = new Array( "Pictures", "/pictures.html", EmptySubmenu, "Pictures from our events.", "" );
  MainMenu[6] = new Array( "Resources", "", ResourcesSubmenu, "Resources...", "" );

// BottomMenu - info for menu at bottom of most pages. Array Contents are:
//	[0] - Name to display
//	[1] - href link
//	[2] - "TARGET=" value, if any (can be "_blank", | "_parent" | "_self" | "_top" | <window name> )
var BottomMenu = new Array();
  BottomMenu[0] = new Array( "Home", "/index.php", "" );
  BottomMenu[1] = new Array( "Calendar", "/calendar/calendar.html", "" );
  BottomMenu[2] = new Array( "Upcoming Events", "/events.php", "" );
  BottomMenu[3] = new Array( "Programs", "/programs.php", "" );
  BottomMenu[4] = new Array( "St._Luke_Parish_Website", "http://www.lukespot.com", "_blank" );
  BottomMenu[5] = new Array( "Email_Lists", "/elists/?p=subscribe", "" );
  BottomMenu[6] = new Array( "GVSU Website", "http://www.gvsu.edu", "_blank" );
  BottomMenu[7] = new Array( "Paulist Fathers", "http://www.lukespot.com/paulists.html", "_blank" );
  BottomMenu[8] = new Array( "Fr. Brad's Blog", "http://www.frbrad.com/", "_blank" );
  BottomMenu[9] = new Array( "Fr. Don on Facebook",
				"http://www.facebook.com/profile.php?id=562419223&ref=search&sid=562419223.3181047917..1", "_blank" );

function mGotoLink( url ) {
        document.location.href = url;
}

//////
// Functions to insert banner and menu info into the web pages

function initMenu() {
	// initialization such as preloading images, etc.
}

function setupBanner() {
	setupBannerMain( "", false, false );
}

function setupSmallBanner() {
	setupBannerMain( "", true, false );
}

function setupNoBanner() {
	setupBannerMain( "", false, true );
}

function setupBannerAltLogo( alternateLogo ) {
	setupBannerMain( alternateLogo, false, false );
}

function setupSmallBannerAltLogo( alternateLogo ) {
	setupBannerMain( alternateLogo, true, false );
}

function setupBannerMain( alternateLogo, shortBanner, noBanner ) {
	var		i;
	var		pathname;
	var		banner, title;

	// get current web page path name
	pathname = top.location.pathname;
	// get title
	title = document.title;
	if( !title ) { title = "Catholic Campus Ministry at GVSU"; }
	// strip off extra tilte elements (after " : ")
	title = title.replace( / : .*$/, "" );
	
	// create table with logo, menu and title
	document.writeln( '<table width="100%" border="0" cellpadding="0" cellspacing="0" background="' + TitleBackground 
				   + '" style="background-repeat:repeat-x"><tr><td width="100%">' );
	document.writeln( '<table class="bodytable" align="center" border="0" cellpadding="0" cellspacing="0" width="' + MainContentWidth + '"><tr><td width="100%">' );
	document.write( '<table border="0" cellpadding="0" cellspacing="0" width="100%"><tr>' );
	document.write( '<td align="center" valign="middle" width="' + LogoWidth + '" height="' + LogoHeight 
				   + '"><a href="http://www.gvsucatholic.org"><img src="' );
	if( alternateLogo != "" ) {
		document.write( alternateLogo );
	} else {
		document.write( LogoPic );
	}
	document.writeln( '" alt="Logo" height="' + LogoHeight + '"></td>' );
	document.writeln( '<td><table border="0" cellpadding="0" cellspacing="0" height="100%" width="100%">' );
	document.writeln( '<tr><td align="right" valign="middle" height="' + MenuHeight 
					 + '"><form action="/cgi-bin/search/ksearch.cgi" method="get">'
					 + '<input size="20" name="terms" id="tips" value="" onfocus="select(this);" type="text"><input value="Search" type="submit">'
					 + '<input type="button" value="Site Index" onclick="window.location.href=\'/siteindex.php\';">'
					 + '<input name="showm" value="5" type="hidden"></form></td></tr>' );
	document.writeln( '<tr><td align="center" valign="middle" class="maintitle">' + title + '</td></tr>' );
	document.writeln( '<tr><td align="left" valign="bottom" height="' + MenuHeight + '">' );
	  writeMenu();
	document.write( '</td></tr></table>' );
	document.write( '</td></tr></table>' );
	document.writeln( '</td></tr></table>' );	// exit all three tables (so we start from scratch)
	// now start new table with all user content (table ends in "setupBottomMenu()"
	document.writeln( '<table class="bodytable" align="center" border="0" cellpadding="0" cellspacing="0" width="' + MainContentWidth + '"><tr><td width="100%">' );
}

function setupBottomMenu() {	// set up bottom menu
	var item;

	// first, close the table with user content
	document.writeln( '</td></tr></table>' );
	// create bottom menu, etc.
	document.writeln( '<table width="100%" border="0" cellpadding="0" cellspacing="0"><tr><td align="center" class="bottom2" height="10">' );
	document.writeln( '<table align="center" border="0" cellpadding="0" cellspacing="0" width="' + MainContentWidth + '"><tr><td width="100%" align="center" class="bottom2">St. Luke University Parish, 6163 Lake Michigan Drive, Allendale MI 49401 &bull; (616) 895-2247' );
	document.writeln( '</td></tr></table></td></tr><tr><td align="center" class="bottom1" height="10">' );
	document.writeln( '<table align="center" border="0" cellpadding="0" cellspacing="0" width="' + MainContentWidth 
					 + '"><tr><td class="bottom1" width="100%" align="right">Menu courtesy of <a href="http://apycom.com/">Apycom jQuery Menus</a>' );
	document.writeln( '</td></tr></table></td></tr><tr><td class="bottommenu" align="center">' );
	document.writeln( '<table align="center" border="0" cellpadding="0" cellspacing="0" width="' 
					 + MainContentWidth + '"><tr><td class="bottommenu" width="100%" align="center">' );
	for( item = 0; item < BottomMenu.length ; item += 1 ) {
		if( item != 0 ) {
			document.writeln( ' &nbsp; | &nbsp;' );
		}
		document.write( '<a href="' + BottomMenu[ item ][1] + '"' );
		if( BottomMenu[ item ][4] != "" ) {
			document.write( ' target="' + BottomMenu[ item ][4] + '"' );
		}
		document.write( '>' + BottomMenu[ item ][0] + '</a>' );
	}
	var curdate = new Date();
	var year = curdate.getFullYear();
	document.writeln( '<br /><span class="bottomcredit">&copy;' + year 
					 + ' Catholic Campus Ministry - St. Luke University Parish</span>' );
	document.writeln( '</td></tr></table>' );
	document.writeln( '</td></tr></table>' );
	// set up page counter
	document.write( '<!-- Start of StatCounter Code --><script type="text/javascript">' );
	document.write( 'var sc_project=6432771; var sc_invisible=1; var sc_security="a99337f7"; </script>' );
	document.write( '<script type="text/javascript" src="http://www.statcounter.com/counter/counter.js"></script>' );
	document.write( '<noscript><div class="statcounter"><a title="custom counter" href="http://statcounter.com/free_hit_counter.html"' );
	document.write( 'target="_blank"><img class="statcounter" src="http://c.statcounter.com/6432771/0/a99337f7/1/"' );
	document.write( 'alt="custom counter" ></a></div></noscript><!-- End of StatCounter Code -->' );
}

function setupMenu() {
	// writeMenu();
}

function writeMenu() {
	var	menuWidth;
	var	i;

	menuWidth = MainMenu.length;

	// place menue in a separate table
	document.write( '<div id="menu">' + "\n" + '<ul class="menu">' );

	for( i = 0; i < menuWidth; i++ ) {
		writeMenuItem( MainMenu[i] );
	}
	document.writeln( '</ul></div>' );
}

function writeMenuItem( menuItem ) {
	var	submenu;
	var	submenuWidth;
	var	i;

	// Check if we have a submenu
	submenu = menuItem[2];
	submenuWidth = submenu.length;

	document.write( '<li><a href="' + menuItem[1] + '"'); 
	if( submenuWidth > 0 ) {
		document.write( ' class="parent"' );
	}
	if( menuItem[4] != "" ) {
		document.write( ' target="' + menuItem[4] + '"' );
	}
	document.writeln( '><span>' + menuItem[0] + '</span></a>' );
	if( submenuWidth > 0 ) {
		document.writeln( '<div><ul>' );
		for( i = 0; i < submenuWidth; i++ ) {
			writeMenuItem( submenu[i] );
		}
		document.writeln( '</ul></div>' );
	}
	document.writeln( '</li>' );	
}
