// optbuttons.js
//
// These functions manipulate the buttons on the left side of the screen.  There are four buttons that are always used.  Below them the
// buttons change from season to season.  These functions allow the user to choose which buttons are used depending on the season
// without having to edit every page. The calling page tells the function which button to highlight and keep highlighted--indicating to the 
// viewer which page s/he is on.

//  Indicates whether to show the button 0 = hide 1 = show
var faq_pres = 0;
var singLessons_pres = 0;
var valentine_pres = 0;
var metroWest_pres = 0;
var discover_harmony_pres = 0;
var summerSing_pres = 0;
var annualShow_pres = 0;
var statsBook_pres = 0;
var holidayChorus_pres = 0;
var singHolidayCards_pres = 0;

//  Indicates how to display the button 0 = has link 1 = solid highlighted (no link)
var faq_how = 0;
var singLessons_how = 0;
var valentine_how = 0;
var metroWest_how = 0;
var discover_harmony_how = 0;
var summerSing_how = 0;
var annualShow_how = 0;
var statsBook_how = 0;
var holidayChorus_how = 0;
var singHolidayCards_how = 0;

// Path prefix for images and page links.  Empty if starting at home page;
// "../" if starting from a subpage
var pagePath = "";
var clipArtPath = "";

//  This function writes html for optional buttons.  Code for  a button is 
//  written only if the associated _pres variable is set to 1.  The kind of 
// code written is determined by the _how variable (0 is for a button with
// a link and 1 is for a solid, highlighted button.
function showOptButtons() {

	if (faq_pres == 1) {
		if (faq_how == 1) {
			first = "<IMG src=\"";
			document.write(first.concat(clipArtPath, "clipart/button_b_faq.jpg\" border=0 name=faq.htm width=\"144\" height=\"26\"></a><BR>"));
		}
		else
		{
			first = "<a onmouseover=\"changeImages('";
			second = "faq.htm', '";
			third = "clipart/button_b_faq.jpg'); return true;\" onmouseout=\"changeImages('";
			fourth = "faq.htm', '";
			fifth = "clipart/button_a_faq.jpg'); return true;\" href=\"";
			sixth = "faq.htm\" target=\"_self\"><IMG src=\"";
			seventh = "clipart/button_a_faq.jpg\" border=0 name=";
			eighth = "faq.htm width=\"144\" height=\"26\"></a><BR>";
			document.write(first.concat(pagePath, second, clipArtPath, third, pagePath, fourth, clipArtPath, fifth, pagePath, sixth, clipArtPath, seventh, pagePath, eighth));
		}
	}


	if (singLessons_pres == 1) {
		if (singLessons_how == 1) {
			first = "<IMG src=\"";
			document.write(first.concat(clipArtPath, "clipart/button_b_free_singing_lessons.jpg\" border=0 name=free_singing_lessons.htm width=\"144\" height=\"26\"></a><BR>"));
		}
		else
		{
			first = "<a onmouseover=\"changeImages('";
			second = "free_singing_lessons.htm', '";
			third = "clipart/button_b_free_singing_lessons.jpg'); return true;\" onmouseout=\"changeImages('";
			fourth = "free_singing_lessons.htm', '";
			fifth = "clipart/button_a_free_singing_lessons.jpg'); return true;\" href=\"";
			sixth = "free_singing_lessons.htm\" target=\"_self\"><IMG src=\"";
			seventh = "clipart/button_a_free_singing_lessons.jpg\" border=0 name=";
			eighth = "free_singing_lessons.htm width=\"144\" height=\"26\"></a><BR>";
			document.write(first.concat(pagePath, second, clipArtPath, third, pagePath, fourth, clipArtPath, fifth, pagePath, sixth, clipArtPath, seventh, pagePath, eighth));
		}
	}


	if (valentine_pres == 1) {
		if (valentine_how == 1) {
			first = "<IMG src=\"";
			document.write(first.concat(clipArtPath, "clipart/button_b_singing_valentines.jpg\" border=0 name=singing_valentines.htm width=\"144\" height=\"26\"></a><BR>"));
		}
		else
		{
			first = "<a onmouseover=\"changeImages('";
			second = "singing_valentines.htm', '";
			third = "clipart/button_b_singing_valentines.jpg'); return true;\" onmouseout=\"changeImages('";
			fourth = "singing_valentines.htm', '";
			fifth = "clipart/button_a_singing_valentines.jpg'); return true;\" href=\"";
			sixth = "singing_valentines.htm\" target=\"_self\"><IMG src=\"";
			seventh = "clipart/button_a_singing_valentines.jpg\" border=0 name=";
			eighth = "singing_valentines.htm width=\"144\" height=\"26\"></a><BR>";
			document.write(first.concat(pagePath, second, clipArtPath, third, pagePath, fourth, clipArtPath, fifth, pagePath, sixth, clipArtPath, seventh, pagePath, eighth));
		}
	}

	if (metroWest_pres == 1) {
		if (metroWest_how == 1) {
			first = "<IMG src=\"";
			document.write(first.concat(clipArtPath, "clipart/button_b_metrowest_festival.jpg\" border=0 name=metrowest_festival.htm width=\"144\" height=\"26\"></a><BR>"));
		}
		else
		{
			first = "<a onmouseover=\"changeImages('";
			second = "metrowest_festival.htm', '";
			third = "clipart/button_b_metrowest_festival.jpg'); return true;\" onmouseout=\"changeImages('";
			fourth = "metrowest_festival.htm', '";
			fifth = "clipart/button_a_metrowest_festival.jpg'); return true;\" href=\"";
			sixth = "metrowest_festival.htm\" target=\"_self\"><IMG src=\"";
			seventh = "clipart/button_a_metrowest_festival.jpg\" border=0 name=";
			eighth = "metrowest_festival.htm width=\"144\" height=\"26\"></a><BR>";
			document.write(first.concat(pagePath, second, clipArtPath, third, pagePath, fourth, clipArtPath, fifth, pagePath, sixth, clipArtPath, seventh, pagePath, eighth));
		}
	}


	if (discover_harmony_pres == 1) {
		if (discover_harmony_how == 1) {
			first = "<IMG src=\"";
			document.write(first.concat(clipArtPath, "clipart/button_b_discover_harmony_nights.jpg\" border=0 name=discover_harmony_nights.htm width=\"144\" height=\"26\"></a><BR>"));
		}
		else
		{
			first = "<a onmouseover=\"changeImages('";
			second = "discover_harmony_nights.htm', '";
			third = "clipart/button_b_discover_harmony_nights.jpg'); return true;\" onmouseout=\"changeImages('";
			fourth = "discover_harmony_nights.htm', '";
			fifth = "clipart/button_a_discover_harmony_nights.jpg'); return true;\" href=\"";
			sixth = "discover_harmony_nights.htm\" target=\"_self\"><IMG src=\"";
			seventh = "clipart/button_a_discover_harmony_nights.jpg\" border=0 name=";
			eighth = "discover_harmony_nights.htm width=\"144\" height=\"26\"></a><BR>";
			document.write(first.concat(pagePath, second, clipArtPath, third, pagePath, fourth, clipArtPath, fifth, pagePath, sixth, clipArtPath, seventh, pagePath, eighth));
		}
	}


	if (summerSing_pres == 1) {
		if (summerSing_how == 1) {
			first = "<IMG src=\"";
//			alert(first.concat(clipArtPath, "clipart/button_b_summer_sing.jpg\" border=0 name=summer_sing.htm width=\"144\" height=\"26\"></a><BR>"));
			document.write(first.concat(clipArtPath, "clipart/button_b_summer_sing.jpg\" border=0 name=summer_sing.htm width=\"144\" height=\"26\"></a><BR>"));
		}
		else
		{
			first = "<a onmouseover=\"changeImages('";
			second = "summer_sing.htm', '";
			third = "clipart/button_b_summer_sing.jpg'); return true;\" onmouseout=\"changeImages('";
			fourth = "summer_sing.htm', '";
			fifth = "clipart/button_a_summer_sing.jpg'); return true;\" href=\"";
			sixth = "summer_sing.htm\" target=\"_self\"><IMG src=\"";
			seventh = "clipart/button_a_summer_sing.jpg\" border=0 name=";
			eighth = "summer_sing.htm width=\"144\" height=\"26\"></a><BR>";
//			alert(first.concat(pagePath, second, clipArtPath, third, pagePath, fourth, clipArtPath, fifth, pagePath, sixth, clipArtPath, seventh, pagePath, eighth));
			document.write(first.concat(pagePath, second, clipArtPath, third, pagePath, fourth, clipArtPath, fifth, pagePath, sixth, clipArtPath, seventh, pagePath, eighth));
		}
	}

	if (annualShow_pres == 1) {
		if (annualShow_how == 1) {
			first = "<IMG src=\"";
			document.write(first.concat(clipArtPath, "clipart/button_b_show.jpg\" border=0 name=show.htm width=\"144\" height=\"26\"></a><BR>"));
		}
		else
		{
			first = "<a onmouseover=\"changeImages('";
			second = "show.htm', '";
			third = "clipart/button_b_show.jpg'); return true;\" onmouseout=\"changeImages('";
			fourth = "show.htm', '";
			fifth = "clipart/button_a_show.jpg'); return true;\" href=\"";
			sixth = "show.htm\" target=\"_self\"><IMG src=\"";
			seventh = "clipart/button_a_show.jpg\" border=0 name=";
			eighth = "show.htm width=\"144\" height=\"26\"></a><BR>";
			document.write(first.concat(pagePath, second, clipArtPath, third, pagePath, fourth, clipArtPath, fifth, pagePath, sixth, clipArtPath, seventh, pagePath, eighth));
		}
	}

	if (statsBook_pres == 1) {
		if (statsBook_how == 1) {
			first = "<IMG src=\"";
			document.write(first.concat(clipArtPath, "clipart/button_b_stats_book.jpg\" border=0 name=stats_book.htm width=\"144\" height=\"26\"></a><BR>"));
		}
		else
		{
			first = "<a onmouseover=\"changeImages('";
			second = "stats_book.htm', '";
			third = "clipart/button_b_stats_book.jpg'); return true;\" onmouseout=\"changeImages('";
			fourth = "stats_book.htm', '";
			fifth = "clipart/button_a_stats_book.jpg'); return true;\" href=\"";
			sixth = "stats_book.htm\" target=\"_self\"><IMG src=\"";
			seventh = "clipart/button_a_stats_book.jpg\" border=0 name=";
			eighth = "stats_book.htm width=\"144\" height=\"26\"></a><BR>";
			document.write(first.concat(pagePath, second, clipArtPath, third, pagePath, fourth, clipArtPath, fifth, pagePath, sixth, clipArtPath, seventh, pagePath, eighth));
		}
	}
	if (holidayChorus_pres == 1) {
		if (holidayChorus_how == 1) {
			first = "<IMG src=\"";
			document.write(first.concat(clipArtPath, "clipart/button_b_holiday_chorus.jpg\" border=0 name=holiday_chorus.htm width=\"144\" height=\"26\"></a><BR>"));
		}
		else
		{
			first = "<a onmouseover=\"changeImages('";
			second = "holiday_chorus.htm', '";
			third = "clipart/button_b_holiday_chorus.jpg'); return true;\" onmouseout=\"changeImages('";
			fourth = "holiday_chorus.htm', '";
			fifth = "clipart/button_a_holiday_chorus.jpg'); return true;\" href=\"";
			sixth = "holiday_chorus.htm\" target=\"_self\"><IMG src=\"";
			seventh = "clipart/button_a_holiday_chorus.jpg\" border=0 name=";
			eighth = "holiday_chorus.htm width=\"144\" height=\"26\"></a><BR>";
			document.write(first.concat(pagePath, second, clipArtPath, third, pagePath, fourth, clipArtPath, fifth, pagePath, sixth, clipArtPath, seventh, pagePath, eighth));
		}
	}

	if (singHolidayCards_pres == 1) {
		if (singHolidayCards_how == 1) {
			first = "<IMG src=\"";
			document.write(first.concat(clipArtPath, "clipart/button_b_singing_holiday_cards.jpg\" border=0 name=singing_holiday_cards.htm width=\"144\" height=\"26\"></a><BR>"));
		}
		else
		{
			first = "<a onmouseover=\"changeImages('";
			second = "singing_holiday_cards.htm', '";
			third = "clipart/button_b_singing_holiday_cards.jpg'); return true;\" onmouseout=\"changeImages('";
			fourth = "singing_holiday_cards.htm', '";
			fifth = "clipart/button_a_singing_holiday_cards.jpg'); return true;\" href=\"";
			sixth = "singing_holiday_cards.htm\" target=\"_self\"><IMG src=\"";
			seventh = "clipart/button_a_singing_holiday_cards.jpg\" border=0 name=";
			eighth = "singing_holiday_cards.htm width=\"144\" height=\"26\"></a><BR>";
			document.write(first.concat(pagePath, second, clipArtPath, third, pagePath, fourth, clipArtPath, fifth, pagePath, sixth, clipArtPath, seventh, pagePath, eighth));
		}
	}

}