/* Term Dates - Display date about the following term to the current one*/ 

var Term_1_Start = new Date("February 9, 2009");
var Term_2_Start = new Date("May 4, 2009");
var Term_3_Start = new Date("August 3, 2009");
var Term_4_Start = new Date("October 19, 2009");

var displayTerm = 0;
/* Get today's date */
var displayDate = new Date();
var monthname = new Array("January", "February", "March", "April", "May", "June", 
	"July", "August", "Sepember", "October", "November", "December");
var tense = new Array("st", "nd", "rd", "th", "th", "th", "th", "th", "th", "th", 
	"th", "th", "th", "th", "th", "th", "th", "th", "th", "th", 
	"st", "nd", "rd", "th", "th", "th", "th", "th", "th", "th", "st");

if (displayDate > Term_4_Start) {
	displayTerm = 1;
	displayDate = Term_1_Start;
}
else if (displayDate > Term_3_Start) {
	displayTerm = 4;
	displayDate = Term_4_Start;
}
else if (displayDate > Term_2_Start) {
	displayTerm = 3;
	displayDate = Term_3_Start;
}
else {
	displayTerm = 2;
	displayDate = Term_2_Start;
}

document.write("<h3><span>TERM " + displayTerm + " starts " + monthname[displayDate.getMonth()] + " " + displayDate.getDate() + tense[displayDate.getDate()] + "</span></h3>" );
