//**************************************************************************
//*** There are 2 steps to overriding the 5-day rotating date text ***
//***                                                                                      ***
//*** Step 1) Change the false below to true                              ***
//*** Step 2) Enter the text you want to appear between            ***
//***             the quotes for MyManualString                             ***
//**************************************************************************
var UseManual = false;
var MyManualString = "put anything here you want to appear like a manual data (Jan 6th, 2010)";

//*************************************************
//*************************************************
//*** DO NOT EDIT ANY LINES BELOW ***
//*************************************************
//*************************************************

//new variable to hold the date string, using a default string in case javascript fails
var newDateString = "this week";

//choose whether to calculate date or use manual text
if (!UseManual) {

//new variable to hold our seed date
	var newDate = new Date("December 30, 2009 23:59:59");
//new variable to hold today's date for comparison
	var today = new Date();
//loop, adding 5 days until we are passed today
	while (newDate<=today) {
		newDate.setDate(newDate.getDate()+3);
	}
//new variable to hold the date suffix (st, nd, ...)
	var suffix = "th";
	dateNum = newDate.getDate();
//get appropriate suffix
	if (dateNum==1) suffix=("st");
	else if (dateNum==2) suffix=("nd");
	else if (dateNum==3) suffix=("rd");
	else if (dateNum==21) suffix=("st");
	else if (dateNum==22) suffix=("nd");
	else if (dateNum==23) suffix=("rd");
	else if (dateNum==31) suffix=("st");
//array to match the correct month to its number
	var month=new Array(12);
	month[0]="January";
	month[1]="February";
	month[2]="March";
	month[3]="April";
	month[4]="May";
	month[5]="June";
	month[6]="July";
	month[7]="August";
	month[8]="September";
	month[9]="October";
	month[10]="November";
	month[11]="December";
//format the string correctly
	newDateString = month[newDate.getMonth()] + ' ' + newDate.getDate() + suffix + ', ' + newDate.getFullYear();
} else {
	newDateString = MyManualString;
}

