function CheckDate()
{
	//Set today's date into a date variable and set up the skiStart and End dates
	var currentDate = new Date();
	var skiStartDate = new Date();
	var skiEndDate = new Date();
	
	//Set up the objects for marine start and end
	var marineStartDate = new Date();
	var marineEndDate = new Date();
	
	//get the current year.
	var currentYear = currentDate.getFullYear();
	var currentMonth = currentDate.getMonth();
	var skiYearBegin = 0;
	var skiYearEnd = 0
	
	
	// if the current month is >2 and <11 set the year to current year
	// because we're past the ski season
	//if ((currentDate.getMonth >= 2) && (currentDate.getMonth <= 11))
	if (currentMonth == 11)
	{
		skiYearBegin = currentYear;
		skiYearEnd = currentYear + 1;
	}
	else
	{
		skiYearBegin = currentYear - 1;
		skiYearEnd = currentYear;
	}




	//Set up ski season time delimitation

	//Start Date
	skiStartDate.setFullYear(skiYearBegin);
	skiStartDate.setMonth(11, 1);
	//End Date
	skiEndDate.setFullYear(skiYearEnd);
	skiEndDate.setMonth(2, 15);
	
	//alert('ski season : ' + skiStartDate + ' to ' + skiEndDate);

	//Check the current date to see if it falls within the ski season.
	if ((skiStartDate <= currentDate) && (skiEndDate >= currentDate))
	{
		//ski season
		showdiv("skiIcons");
		hidediv("marineIcons");
	}
	else
	{
		//marine season
		showdiv("marineIcons");
		hidediv("skiIcons");
	}
}


function hidediv(id) {
	//safe function to hide an element with a specified id
	if (document.getElementById) { // DOM3 = IE5, NS6
		document.getElementById(id).style.display = 'none';
	}
	else {
		if (document.layers) { // Netscape 4
			document.id.display = 'none';
		}
		else { // IE 4
			document.all.id.style.display = 'none';
		}
	}
}

function showdiv(id) {
	//safe function to show an element with a specified id
		  
	if (document.getElementById) { // DOM3 = IE5, NS6
		document.getElementById(id).style.display = 'block';
	}
	else {
		if (document.layers) { // Netscape 4
			document.id.display = 'block';
		}
		else { // IE 4
			document.all.id.style.display = 'block';
		}
	}
}


function ChangeStatus(sStatus)
{
	window.status = sStatus;
}
function DefaultStatus()
{
	window.status = "Buffalo.com Weather";
}

