function getMonth() {
	var month = '';
	var todaysDate = new Date() ;
	var currentMonth = todaysDate.getMonth() + 1;
	if ( currentMonth == 1) {
		month = 'January';
	} else if ( currentMonth == 2) {
		month = 'February';
	} else if ( currentMonth == 3) {
		month = 'March';
	} else if ( currentMonth == 4) {
		month = 'April';
	} else if ( currentMonth == 5) {
		month = 'May';
	} else if ( currentMonth == 6) {
		month = 'June';
	} else if (currentMonth == 7) {
		month = 'July';
	} else if ( currentMonth  == 8) {
		month = 'August';
	} else if ( currentMonth == 9) {
		month = 'September';
	} else if ( currentMonth == 10) {
		month = 'October';
	} else if ( currentMonth == 11) {
		month = 'November';
	} else {
		month = 'December';
	}
			
	return month;
}

function getSpecifiedMonth(selMonth) {
	var month =  '';
	var currentMonth = selMonth + 1;
	if ( currentMonth == 0) {
		month = 'December';
	} else if ( currentMonth == 1) {
		month = 'January';
	} else if ( currentMonth == 2) {
		month = 'February';
	} else if ( currentMonth == 3) {
		month = 'March';
	} else if ( currentMonth == 4) {
		month = 'April';
	} else if ( currentMonth == 5) {
		month = 'May';
	} else if ( currentMonth == 6) {
		month = 'June';
	} else if (currentMonth == 7) {
		month = 'July';
	} else if ( currentMonth  == 8) {
		month = 'August';
	} else if ( currentMonth == 9) {
		month = 'September';
	} else if ( currentMonth == 10) {
		month = 'October';
	} else if ( currentMonth == 11) {
		month = 'November';
	} else if ( currentMonth == 12) {
		month = 'December';
	} else {
		month = 'January';
	}
			
	return month;
}
				
function getSeason() {		
	var season = '';
	var currentMonth = getMonthToUse();
	var todaysDate = new Date();
	var currentDay = todaysDate.getDate();

	if ( ( currentMonth ==1) || (currentMonth == 2) ) {
		season = 'winter';
	} else if (  (currentMonth == 3) ) {
		if ( currentDay  < 21) {
			season = 'winter';
		} else {
			season = 'spring';
		}
	} else if (  (currentMonth == 4) || (currentMonth == 5) ) {
		season = 'spring';
	} else if ( currentMonth == 6) {
		if ( currentDay < 21) {
			season = 'spring';
		} else {
			season = 'summer';
		}
	} else if ( (currentMonth == 7) || (currentMonth == 8) ) {
		season = 'summer';
	} else if ( (currentMonth == 9)) {
		if ( currentDay < 23) {
			season = 'summer';
		} else {
			season = 'autumn';
		}
	} else if ( (currentMonth == 10) || (currentMonth == 11) ) {
		season = 'autumn';
	} else if ( currentMonth == 12) {
		if ( currentDay < 22) {
			season = 'autumn';
		} else {
			season = 'winter';
		}
	}
	return season;
}

function getMenuBarColor() {
	var season = getSeason();
	var menuBarColor = "";

	if ( season == "winter") {
		menuBarColor = "#bbccff";
	} else if ( season == "spring") {
		menuBarColor =  "#8B983C";
	} else if ( season == "summer") {
		menuBarColor = "#007700";
	} else if ( season == "autumn"){
		menuBarColor = "#995500";
	} else {
		menuBarColor = "#FFFFFF";
	}
	return menuBarColor;
}

function getCurrentID() {
	var curURL = getCurrentURL();
	var temp69 = curURL.lastIndexOf('/');
	var curID = '';

	//As long as it contains that character
	if ( temp69 != -1) {
		curID = curURL.substring(temp69+1);
		if ( curID.indexOf('?') != -1) {
			curID = curID.substring(0, curID.indexOf('?'));
		} 
		//Now remove the file extension
		if ( curID.indexOf('.') != -1) {
			curID = curID.substring(0,curID.indexOf('.') );
		}
		if ( curID.indexOf('_') != -1) {
			curID = curID.substring(0, curID.indexOf('_') );
		}
	}
	return curID;					
}

function displayPhotoCredits() {
	var queryMonthSet = getQueryVariable('mon');
	if ( queryMonthSet == undefined) {
		document.write('<div id="credit"><B>Photo Credits:</b>&nbsp;<A href="./bio-stimpson.htm">Rob Stimpson</A> and <A href="bio-taylor.htm">Robert Taylor</A></div>');
	} else {
		document.write('<div id="credit"><B>Photo Credits:</b>&nbsp;<A href="./bio-stimpson.htm?mon=' + queryMonthSet + '">Rob Stimpson</A> and <A href="bio-taylor.htm?mon=' + queryMonthSet + '">Robert Taylor</A></div>');

	}
}

function displayNet4Logo() {
	var currentSeason = getSeason();
	document.write('<div id="n4s"><A class="bbl" onmouseout=\'net4.src="./images/n4s_' + currentSeason + '_l.gif";\' onmouseover=\'net4.src="./images/n4s_' + currentSeason + '_h.gif";\' href="http://www.net4solutions.com" target="_BLANK">Designed &amp; Hosted By: <IMG alt="" src="./images/n4s_' + currentSeason + '_l.gif" align ="absMiddle" border="0" name="net4"></A></div>');
}
	

function displayMenuBar() {
	var menuBarString = '';
	var currentMenuBackground = "style=\"BACKGROUND: #ffffff\"";
	var backgroundColor = getMenuBarColor();
	var tableBackgroundColor = "#CCCC66";
	var queryMonthSet = getQueryVariable('mon');
	var currentID = getCurrentID();


	menuBarString = menuBarString + '<tr bgcolor="' + tableBackgroundColor + '">';
	menuBarString = menuBarString + '<td colspan="2" valign="middle">';
	menuBarString = menuBarString + '<div id="nav">';

	//Preserve the value of queryMonthSet if it is indeed set
	if ( queryMonthSet == undefined) {
		if ( currentID == "index") {
			menuBarString = menuBarString + '<a href="./index.htm" onmouseover="document.getElementById(\'home\').style.background=\'' + backgroundColor + '\'" onmouseout="document.getElementById(\'home\').style.background=\'#FFFFFF\'">';
		} else {
			menuBarString = menuBarString + '<a href="./index.htm" onmouseover="document.getElementById(\'home\').style.background=\'' + backgroundColor + '\'" onmouseout="document.getElementById(\'home\').style.background=\'transparent\'">';
		}

	} else {
		if ( currentID == "index") {
			menuBarString = menuBarString + '<a href="./index.htm?mon=' + queryMonthSet + '" onmouseover="document.getElementById(\'home\').style.background=\'' + backgroundColor + '\'" onmouseout="document.getElementById(\'home\').style.background=\'#FFFFFF\'">';
		} else {
			menuBarString = menuBarString + '<a href="./index.htm?mon=' + queryMonthSet + '" onmouseover="document.getElementById(\'home\').style.background=\'' + backgroundColor + '\'" onmouseout="document.getElementById(\'home\').style.background=\'transparent\'">';
		}
	}
	if ( currentID == "index") {		
		menuBarString = menuBarString + '<img id="home" ' + currentMenuBackground + ' src="./images/nt_nav_home.gif">';
	} else {
		menuBarString = menuBarString + '<img id="home" src="./images/nt_nav_home.gif">';
	}
		
	menuBarString = menuBarString + '</a>';


	//Preserve the value of queryMonthSet if it is indeed set
	if ( queryMonthSet == undefined) {
		if ( currentID == "programs") {
			menuBarString = menuBarString + '<a href="./programs.htm" onmouseover="document.getElementById(\'programs\').style.background=\'' + backgroundColor + '\'" onmouseout="document.getElementById(\'programs\').style.background=\'#FFFFFF\'">';
		} else {
			menuBarString = menuBarString + '<a href="./programs.htm" onmouseover="document.getElementById(\'programs\').style.background=\'' + backgroundColor + '\'" onmouseout="document.getElementById(\'programs\').style.background=\'transparent\'">';
		}		
	} else {
		if ( currentID == "programs") {
			menuBarString = menuBarString + '<a href="./programs.htm?mon=' + queryMonthSet + '" onmouseover="document.getElementById(\'programs\').style.background=\'' + backgroundColor + '\'" onmouseout="document.getElementById(\'programs\').style.background=\'#FFFFFF\'">';
		} else {
			menuBarString = menuBarString + '<a href="./programs.htm?mon=' + queryMonthSet + '" onmouseover="document.getElementById(\'programs\').style.background=\'' + backgroundColor + '\'" onmouseout="document.getElementById(\'programs\').style.background=\'transparent\'">';
		}
	}
	if ( currentID == "programs") {
		menuBarString = menuBarString + '<img id="programs" ' + currentMenuBackground + ' src="./images/nt_nav_programs.gif">';
	} else {
		menuBarString = menuBarString + '<img id="programs" src="./images/nt_nav_programs.gif">';
	}

	menuBarString = menuBarString + '</a>';









	//Preserve the value of queryMonthSet if it is indeed set
	if ( queryMonthSet == undefined) {
		if ( currentID == "edutourism") {
			menuBarString = menuBarString + '<a href="./edutourism.htm" onmouseover="document.getElementById(\'edutourism\').style.background=\'' + backgroundColor + '\'" onmouseout="document.getElementById(\'edutourism\').style.background=\'#FFFFFF\'">';
		} else {
			menuBarString = menuBarString + '<a href="./edutourism.htm" onmouseover="document.getElementById(\'edutourism\').style.background=\'' + backgroundColor + '\'" onmouseout="document.getElementById(\'edutourism\').style.background=\'transparent\'">';
		}
	} else {
		if ( currentID == "edutourism") {
			menuBarString = menuBarString + '<a href="./edutourism.htm?mon=' + queryMonthSet + '" onmouseover="document.getElementById(\'edutourism\').style.background=\'' + backgroundColor + '\'" onmouseout="document.getElementById(\'edutourism\').style.background=\'#FFFFFF\'">';
		} else {
			menuBarString = menuBarString + '<a href="./edutourism.htm?mon=' + queryMonthSet + '" onmouseover="document.getElementById(\'edutourism\').style.background=\'' + backgroundColor + '\'" onmouseout="document.getElementById(\'edutourism\').style.background=\'transparent\'">';
		}
	}
	if ( currentID == "edutourism") {
		menuBarString = menuBarString + '<img id="edutourism" ' + currentMenuBackground + ' src="./images/nt_nav_edutourism.gif">';
	} else {
		menuBarString = menuBarString + '<img id="edutourism" src="./images/nt_nav_edutourism.gif">';
	}

	menuBarString = menuBarString + '</a>';
	//Preserve the value of queryMonthSet if it is indeed set
	if ( queryMonthSet == undefined) {
		if ( currentID == "research") {
			menuBarString = menuBarString + '<a href="./research.htm" onmouseover="document.getElementById(\'research\').style.background=\'' + backgroundColor + '\'" onmouseout="document.getElementById(\'research\').style.background=\'#FFFFFF\'">';
		} else {
			menuBarString = menuBarString + '<a href="./research.htm" onmouseover="document.getElementById(\'research\').style.background=\'' + backgroundColor + '\'" onmouseout="document.getElementById(\'research\').style.background=\'transparent\'">';
		}
	} else {
		if ( currentID == "research") {
			menuBarString = menuBarString + '<a href="./research.htm?mon=' + queryMonthSet + '" onmouseover="document.getElementById(\'research\').style.background=\'' + backgroundColor + '\'" onmouseout="document.getElementById(\'research\').style.background=\'#FFFFFF\'">';
		} else {
			menuBarString = menuBarString + '<a href="./research.htm?mon=' + queryMonthSet + '" onmouseover="document.getElementById(\'research\').style.background=\'' + backgroundColor + '\'" onmouseout="document.getElementById(\'research\').style.background=\'transparent\'">';
		}
	}
	if ( currentID == "research") {
		menuBarString = menuBarString + '<img id="research" ' + currentMenuBackground + ' src="./images/nt_nav_research.gif">';
	} else {
		menuBarString = menuBarString + '<img id="research" src="./images/nt_nav_research.gif">';
	}
	
	menuBarString = menuBarString + '</a>';
	//Preserve the value of queryMonthSet if it is indeed set
	if ( queryMonthSet == undefined) {
		if ( currentID == "newsletter") {
			menuBarString = menuBarString + '<a href="./newsletter.htm" onmouseover="document.getElementById(\'newsletter\').style.background=\'' + backgroundColor + '\'" onmouseout="document.getElementById(\'newsletter\').style.background=\'#FFFFFF\'">';
		} else {
			menuBarString = menuBarString + '<a href="./newsletter.htm" onmouseover="document.getElementById(\'newsletter\').style.background=\'' + backgroundColor + '\'" onmouseout="document.getElementById(\'newsletter\').style.background=\'transparent\'">';
		}
		
	} else {
		if ( currentID == "newsletter") {
			menuBarString = menuBarString +  '<a href="./newsletter.htm?mon=' + queryMonthSet + '" onmouseover="document.getElementById(\'newsletter\').style.background=\'' + backgroundColor + '\'" onmouseout="document.getElementById(\'newsletter\').style.background=\'#FFFFFF\'">';
		} else {
			menuBarString = menuBarString +  '<a href="./newsletter.htm?mon=' + queryMonthSet + '" onmouseover="document.getElementById(\'newsletter\').style.background=\'' + backgroundColor + '\'" onmouseout="document.getElementById(\'newsletter\').style.background=\'transparent\'">';

		}
	}
	if ( currentID == "newsletter") {
		menuBarString = menuBarString + '<img id="newsletter" ' + currentMenuBackground + ' src="./images/nt_nav_newsletter.gif">';
	} else {
		menuBarString = menuBarString + '<img id="newsletter" src="./images/nt_nav_newsletter.gif">';
	}

	menuBarString = menuBarString + '</a>';
	//Preserve the value of queryMonthSet if it is indeed set
	if ( queryMonthSet == undefined) {
		if ( currentID == "team") {
			menuBarString = menuBarString + '<a href="./team.htm" onmouseover="document.getElementById(\'team\').style.background=\'' + backgroundColor + '\'" onmouseout="document.getElementById(\'team\').style.background=\'#FFFFFF\'">';
		} else {
			menuBarString = menuBarString + '<a href="./team.htm" onmouseover="document.getElementById(\'team\').style.background=\'' + backgroundColor + '\'" onmouseout="document.getElementById(\'team\').style.background=\'transparent\'">';
		}
	} else {
		if ( currentID == "team") {
			menuBarString = menuBarString + '<a href="./team.htm?mon=' + queryMonthSet + '" onmouseover="document.getElementById(\'team\').style.background=\'' + backgroundColor + '\'" onmouseout="document.getElementById(\'team\').style.background=\'#FFFFFF\'">';
		} else {
			menuBarString = menuBarString + '<a href="./team.htm?mon=' + queryMonthSet + '" onmouseover="document.getElementById(\'team\').style.background=\'' + backgroundColor + '\'" onmouseout="document.getElementById(\'team\').style.background=\'transparent\'">';
		}	
	}
	if ( currentID == "team") {
		menuBarString = menuBarString + '<img id="team" ' + currentMenuBackground + ' src="./images/nt_nav_team.gif">';
	} else {
		menuBarString = menuBarString + '<img id="team" src="./images/nt_nav_team.gif">';
	}
	menuBarString = menuBarString + '</a>';
	//Preserve the value of queryMonthSet if it is indeed set
	if ( queryMonthSet == undefined) {
		if ( currentID == "partners") {
			menuBarString = menuBarString + '<a href="./partners.htm" onmouseover="document.getElementById(\'partners\').style.background=\'' + backgroundColor + '\'" onmouseout="document.getElementById(\'partners\').style.background=\'#FFFFFF\'">';
		} else {
			menuBarString = menuBarString + '<a href="./partners.htm" onmouseover="document.getElementById(\'partners\').style.background=\'' + backgroundColor + '\'" onmouseout="document.getElementById(\'partners\').style.background=\'transparent\'">';
		}

	} else {
		if ( currentID == "partners") {
			menuBarString = menuBarString + '<a href="./partners.htm?mon=' + queryMonthSet + '" onmouseover="document.getElementById(\'partners\').style.background=\'' + backgroundColor + '\'" onmouseout="document.getElementById(\'partners\').style.background=\'#FFFFFF\'">';
		} else {
			menuBarString = menuBarString + '<a href="./partners.htm?mon=' + queryMonthSet + '" onmouseover="document.getElementById(\'partners\').style.background=\'' + backgroundColor + '\'" onmouseout="document.getElementById(\'partners\').style.background=\'transparent\'">';
		}
	}
	if ( currentID == "partners") {
		menuBarString = menuBarString + '<img id="partners" ' + currentMenuBackground + ' src="./images/nt_nav_partners.gif">';
	} else {
		menuBarString = menuBarString + '<img id="partners" src="./images/nt_nav_partners.gif">';
	}
	menuBarString = menuBarString + '</a>';
	//Preserve the value of queryMonthSet if it is indeed set
	if ( queryMonthSet == undefined) {
		if ( currentID == "contact") {
			menuBarString = menuBarString + '<a href="./contact.htm" onmouseover="document.getElementById(\'resorts\').style.background=\'' + backgroundColor + '\'" onmouseout="document.getElementById(\'resorts\').style.background=\'#FFFFFF\'">';
		} else {
			menuBarString = menuBarString + '<a href="./contact.htm" onmouseover="document.getElementById(\'resorts\').style.background=\'' + backgroundColor + '\'" onmouseout="document.getElementById(\'resorts\').style.background=\'transparent\'">';
		}

	} else {
		if ( currentID == "contact") {
			menuBarString = menuBarString + '<a href="./contact.htm?mon=' + queryMonthSet + '" onmouseover="document.getElementById(\'contact\').style.background=\'' + backgroundColor + '\'" onmouseout="document.getElementById(\'contact\').style.background=\'#FFFFFF\'">';
		} else {
			menuBarString = menuBarString + '<a href="./contact.htm?mon=' + queryMonthSet + '" onmouseover="document.getElementById(\'contact\').style.background=\'' + backgroundColor + '\'" onmouseout="document.getElementById(\'contact\').style.background=\'transparent\'">';
		}
	}
	if ( currentID == "contact") {		
		menuBarString = menuBarString + '<img id="contact" ' + currentMenuBackground + ' src="./images/nt_nav_contact.gif">';
	} else {
		menuBarString = menuBarString + '<img id="contact" src="./images/nt_nav_contact.gif">';
	}
	menuBarString = menuBarString + '</a>';
	menuBarString = menuBarString + '</div>';
	menuBarString = menuBarString + '</td>';
	menuBarString = menuBarString + '</tr>';
	document.write(menuBarString);
}

function displayTopLeftImage() {
	document.write('<img src=\"./images/nt_logo_' + getSeason() + '.gif\" style=\"margin-left: 20px;\">');
}

function displayTopRightImage() {
	document.write('<img src=\"./images/nt_top_right_' + getSeason() + '.gif\" align=\"right\">');
}

function displayDeltaLogo() {
	document.write('<img src=\"./images/delta_logo_' + getSeason() + '.gif\">');
}

function displayFairmontLogo() {
	document.write('<img src=\"./images/fairmont_logo_' + getSeason() + '.gif\">');
}

function displayAllPrograms() {
	var j;
	var currentCategory = '';
	var nextCategory = '';
	var queryMonthSet = getQueryVariable('mon');


	for( j=0; j < programs.length ; j++) {
		if ( currentCategory != programs[j].category) {
			document.write('<div class="title">' + programs[j].category + '</div>');
			document.write('<ul>');
		}
		//Preserve the value of queryMonthSet if it is indeed set
		if ( queryMonthSet == undefined) {
			document.write('<li><a href="' + programs[j].url + '">' + programs[j].title + '</a>');
		} else {
			document.write('<li><a href="' + programs[j].url + '?mon=' + queryMonthSet + '">' + programs[j].title + '</a>');
	
		}

		currentCategory = programs[j].category

		if ( (j+1) < programs.length) {
			nextCategory = programs[j+1].category;
		} else {
			nextCategory = '';
		}	
		if ( currentCategory != nextCategory) {
			document.write('</ul><br>');
		}
	}
}

function getQueryVariable(variable) {
  var query = window.location.search.substring(1);
  var vars = query.split("&");
  for (var i=0;i<vars.length;i++) {
    var pair = vars[i].split("=");
    if (pair[0] == variable) {
      return pair[1];
    }
  } 
}

function getCurrentURL() {
	//This function returns the URL without any of the variables
	var tempURL = window.location + "";
	var urls = tempURL.split("?");
	return urls[0]; 
}

function getMonthToUse() {
	var todaysDate = new Date();
	var currentDay = todaysDate.getDate() ;			
	var currentMonth = todaysDate.getMonth() + 1;
	var currentUrl = getCurrentURL();

	//Get the current month (if the month isn't selected in the URL
	var tempSpecifiedVariable = getQueryVariable('mon');
	var specifiedMonth = -1;
	if ( tempSpecifiedVariable != undefined ) {
		specifiedMonth = parseInt(tempSpecifiedVariable) + 1;
	}

	if ( specifiedMonth == -1) {
		specifiedMonth = currentMonth;
	} else {
		if ( specifiedMonth == 0) {
			specifiedMonth = 12;
		} else if (specifiedMonth == 13) {
			specifiedMonth = 1;
		}		
	}
	return specifiedMonth;
}

function displayPrograms() {
	//Get the current month (if the month isn't selected in the URL
	var i;
	var currentCategory = '';
	var specifiedMonth = getMonthToUse() - 1;
	var currentUrl = getCurrentURL();
	var queryMonthSet = getQueryVariable('mon');
	var previousMonth = getSpecifiedMonth(specifiedMonth - 1);
	var nextMonth = getSpecifiedMonth(specifiedMonth + 1);

	
	//Loop through all the programs for the current month
	//Show right and left
	document.write('<FONT size="2"><B>' + (getSpecifiedMonth( specifiedMonth)).toUpperCase() + ' Programs</B></FONT> &nbsp;<A HREF="' + currentUrl + '?mon=' + (specifiedMonth -1) + '"><IMG src="./images/arrow-left.gif">' + previousMonth + '</a>&nbsp;|&nbsp;<A HREF="' + currentUrl + '?mon=' + (specifiedMonth +1) + '">' + nextMonth + '<IMG src="./images/arrow-right.gif"></a>');		

	for ( i=0; i < month[specifiedMonth].length ; i++) {
//		alert('currentCategory: ' + currentCategory + '          specifiedMonth: ' + specifiedMonth + '     i: ' + i + '           month[specifiedMonth][i]:  ' + month[specifiedMonth][i]);          
		if ( currentCategory != programs[month[specifiedMonth][i]].category) {
			document.write('<h3>' + programs[month[specifiedMonth][i]].category + ':</h3>');
		}
		document.write('<div class="indent">');
		//Preserve the value of queryMonthSet if it is indeed set
		if ( queryMonthSet == undefined) {
			document.write('<a href="' + programs[month[specifiedMonth][i]].url + '">' + programs[month[specifiedMonth][i]].title + '</a>');
		} else {
			document.write('<a href="' + programs[month[specifiedMonth][i]].url + '?mon=' + queryMonthSet + '">' + programs[month[specifiedMonth][i]].title + '</a>');
		}

		if ( currentCategory == programs[month[specifiedMonth][i]].category) {
			document.write('<br>');
		}
		document.write('</div>');		
		currentCategory = programs[month[specifiedMonth][i]].category;
	}
	
}

//We have this function because we may want to change the look of the side bar later (so it may not be the same as the function above)
function displayProgramsSideBar() {
	//Get the current month (if the month isn't selected in the URL
	var i;
	var currentCategory = '';
	var specifiedMonth = getMonthToUse() - 1;
	var currentUrl = getCurrentURL();
	var queryMonthSet = getQueryVariable('mon');
	
	//Loop through all the programs for the current month
	document.write('<h4>' + (getSpecifiedMonth( specifiedMonth)).toUpperCase() + ' Programs&nbsp;<A HREF="' + currentUrl + '?mon=' + (specifiedMonth -1) + '"><IMG src="./images/arrow-left.gif"></a>|<A HREF="' + currentUrl + '?mon=' + (specifiedMonth +1) + '"><IMG src="./images/arrow-right.gif"></a></h4>');	
	for ( i=0; i < month[specifiedMonth].length ; i++) {
		if ( currentCategory != programs[month[specifiedMonth][i]].category) {
			document.write('<h3>' + programs[month[specifiedMonth][i]].category + ':</h3>');
		}
		document.write('<div class="indent">');
		//Preserve the value of queryMonthSet if it is indeed set
		if ( queryMonthSet == undefined) {
			document.write('<a href="' + programs[month[specifiedMonth][i]].url + '">' + programs[month[specifiedMonth][i]].title + '</a>');
		} else {
			document.write('<a href="' + programs[month[specifiedMonth][i]].url + '?mon=' + queryMonthSet + '">' + programs[month[specifiedMonth][i]].title + '</a>');
		}

		if ( currentCategory == programs[month[specifiedMonth][i]].category) {
			document.write('<br>');
		} else {
		}
		document.write('</div>');		
		currentCategory = programs[month[specifiedMonth][i]].category;
	}
}


		
function writeSlideShow() {
	document.write('<object classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" codebase=\"http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0\" width=\"500\" height=\"170\" id=\"photo_banner\" align=\"middle\">');
	document.write('<param name=\"allowScriptAccess\" value=\"sameDomain\" />');
	document.write('<param name=\"movie\" value=\"flash/photo_banner.swf?season=' + getSeason() + '&xmlFile=flash/photoList.xml\" />');
	document.write('<param name=\"quality\" value=\"high\" />');
	document.write('<param name=\"bgcolor\" value=\"#ffffff\" />');
	document.write('<embed src=\"flash/photo_banner.swf?season=' + getSeason() + '&xmlFile=flash/photoList.xml\" width=\"500\" height=\"170\" align=\"middle\" quality=\"high\" bgcolor=\"#ffffff\" name=\"photo_banner\" allowScriptAccess=\"sameDomain\" type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\"  />');
	document.write('</object>');
}

 function setActiveStyleSheet(title) {

  var i, a, main;
  for(i=0; (a = document.getElementsByTagName("link")[i]); i++) {

    if(a.getAttribute("rel").indexOf("style") != -1 && a.getAttribute("title")) {      	

	a.disabled = true;
      if(a.getAttribute("title") == title) {
		a.disabled = false; 
	}
    }
  }
}

function getActiveStyleSheet() {

  var i, a;
  for(i=0; (a = document.getElementsByTagName("link")[i]); i++) {

    if(a.getAttribute("rel").indexOf("style") != -1 && a.getAttribute("title") && !a.disabled) 
		return a.getAttribute("title");
  }
  return null;
}


		
