/*

On any page where this script is attached, it displays the element id 'closingmessage'
between the dates specified in variables described below
that must be declared in a script embedded in HTML the page

The 3 'display' variables below on the HTML page specify the year,
month and date for the message to START being displayed

The 3 'expire' variables below on the HTML page specify the year,
month, and date to STOP displaying the message

var displayYear = 2009;
var displayMonth = 12;
var displayDay = 15;
var expireYear = 2010;
var expireMonth = 1;
var expireDay = 11;

*/

var expireMonthConvert = expireMonth - 1; //converts expire month to correct JavaScript month
var displayMonthConvert = displayMonth - 1; //converts display month to correct JavaScript month
var todaysDate = new Date();
var expireDate = new Date(expireYear,expireMonthConvert,expireDay);
var displayDate = new Date(displayYear,displayMonthConvert,displayDay);

function showClosingMessage() {
	if (todaysDate >= displayDate && todaysDate < expireDate) {
		document.getElementById("closingmessage").style.display = "block";
	}
}

window.onload = function() { showClosingMessage(); }

