// This is the function code for the calendar choice, showing and hiding the layers.
// Dependent files - caldata.js, stylesheet.css, menu.js from http://www.wickham.id.au/blog

function hideLayer(chosenLayer) {
	if (document.getElementById) {
		document.getElementById(chosenLayer).style.visibility = "hidden";
	}
	else if (document.layers) {
		document.layers[chosenLayer].visibility = "hidden";
	}
	else if (document.all) {
		document.all[chosenLayer].style.visibility = "hidden";
	}
}

function showLayer(chosenLayer) {
	if (document.getElementById) {
		document.getElementById(chosenLayer).style.visibility = "visible";
	}
	else if (document.layers) {
		document.layers[chosenLayer].visibility = "visible";
	}
	else if (document.all) {
		document.all[chosenLayer].style.visibility = "visible";
	}
}

function CalendarFlip(MonthChoice) {
if (MonthChoice == "june04") {
// when june is shown, hide the month that passed the click over
showLayer("june04");
hideLayer("july04");
// once the month is shown, perform the float menu function on the layer
floatMenu(5,5,'june04',33).Fm(); 
}
else if (MonthChoice == "july04") {
hideLayer("june04");
showLayer("july04");
hideLayer("aug04");
floatMenu(5,5,'july04',33).Fm(); 
}
else if (MonthChoice == "aug04") {
hideLayer("july04");
showLayer("aug04");
hideLayer("sept04");
floatMenu(5,5,'aug04',33).Fm(); 
}
else if (MonthChoice == "sept04") {
hideLayer("aug04");
showLayer("sept04");
hideLayer("oct04");
floatMenu(5,5,'sept04',33).Fm(); 
}
else if (MonthChoice == "oct04") {
hideLayer("sept04");
showLayer("oct04");
hideLayer("nov04");
floatMenu(5,5,'oct04',33).Fm(); 
}
else if (MonthChoice == "nov04") {
hideLayer("oct04");
showLayer("nov04");
hideLayer("dec04");
floatMenu(5,5,'nov04',33).Fm(); 
}
else if (MonthChoice == "dec04") {
hideLayer("nov04");
showLayer("dec04");
hideLayer("jan05");
floatMenu(5,5,'dec04',33).Fm(); 
}
else if (MonthChoice == "jan05") {
hideLayer("dec04");
showLayer("jan05");
hideLayer("feb05");
floatMenu(5,5,'jan05',33).Fm(); 
}
else if (MonthChoice == "feb05") {
hideLayer("jan05");
showLayer("feb05");
hideLayer("mar05");
floatMenu(5,5,'feb05',33).Fm(); 
}
else if (MonthChoice == "mar05") {
hideLayer("feb05");
showLayer("mar05");
hideLayer("apr05");
floatMenu(5,5,'mar05',33).Fm(); 
}
else if (MonthChoice == "apr05") {
hideLayer("mar05");
showLayer("apr05");
hideLayer("may05");
floatMenu(5,5,'apr05',33).Fm(); 
}
else if (MonthChoice == "may05") {
hideLayer("apr05");
showLayer("may05");
hideLayer("jun05");
floatMenu(5,5,'may05',33).Fm(); 
}
else if (MonthChoice == "jun05") {
hideLayer("may05");
showLayer("jun05");
hideLayer("jul05");
floatMenu(5,5,'jun05',33).Fm(); 
}
else if (MonthChoice == "jul05") {
hideLayer("jun05");
showLayer("jul05");
hideLayer("aug05");
floatMenu(5,5,'jul05',33).Fm(); 
}
else if (MonthChoice == "aug05") {
hideLayer("jul05");
showLayer("aug05");
hideLayer("sep05");
floatMenu(5,5,'aug05',33).Fm(); 
}
else if (MonthChoice == "sep05") {
hideLayer("aug05");
showLayer("sep05");
hideLayer("oct05");
floatMenu(5,5,'sep05',33).Fm(); 
}
else if (MonthChoice == "oct05") {
hideLayer("sep05");
showLayer("oct05");
hideLayer("nov05");
floatMenu(5,5,'sep05',33).Fm(); 
}
}