// Get the current date and display it in the span with the specified id
dayName = new Array ('Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday');
monName = new Array ('January','February','March','April','May','June','July','August','September','October','November','December');
	
now = new Date;
	
thisYear = now.getYear();
thisDate = now.getDate();
thisMNum = now.getMonth();
thisDNum = now.getDay();
	
if (thisYear < 1900)
{
  thisYear = thisYear + 1900;
}

if (thisDate == 1 || thisDate == 21 || thisDate == 31)
{
	thisDExt = 'st';
}
else if (thisDate == 2 || thisDate == 22)
{
	thisDExt = 'nd';
}
else if (thisDate == 3 || thisDate == 23)
{
	thisDExt = 'rd';
}
else
{
	thisDExt = 'th';
}

function showDate(span_id)
{
  dateString = dayName[thisDNum] + ', ' + monName[thisMNum] + ' ' + thisDate + thisDExt + ', ' + thisYear;
	
	if (document.getElementById(span_id))
	{
	  document.getElementById(span_id).innerHTML = dateString;
	}
}
