// Get current time
var d = new Date();
var curr_hour = d.getHours();
//var curr_min = d.getMinutes();
var curr_min;
if(d.getMinutes() < 9)
	curr_min = "0" + d.getMinutes();
else
	curr_min = d.getMinutes();
	
// Get today's current date.
var now = new Date();

// Array list of days.
var days = new Array('Sun','Mon','Tue','Wed','Thur','Fri','Sat');

// Array list of months.
var months = new Array('Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec');

// Calculate the number of the current day in the week.
var date = ((now.getDate()<10) ? "0" : "")+ now.getDate();

// Calculate four digit year.
function fourdigits(number)	{
	return (number < 1000) ? number + 1900 : number;
								}

// Join it all together
today = curr_hour + ":" + curr_min + ", " +
		days[now.getDay()] + " " +
         months[now.getMonth()] + " " +
         date + ", " +
         (fourdigits(now.getYear())) ;

// Print out the data.
document.write(today);


