
var docdate = new Date();
var hours = docdate.getHours();
var minutes = docdate.getMinutes();
var docday = docdate.getDay();
var docmonth = docdate.getMonth();
var docweekday = docdate.getDate();
var docyear = docdate.getFullYear();
//
// convert hours from military time and add am and pm
//
if (hours == 0) {
	dochours = 12;
	tval = "am";
}
else if (hours <12) { 
	dochours = hours;
	tval = "am";
}
else if (hours == 12) { 
	dochours = hours;
	tval = "pm";
}
else {
	dochours = hours - 12;
	tval = "pm";
}
//
// make sure minutes is displayed as 2 digits
//
if (minutes < 10) {
	docmin = "0" + minutes;
}
else {
	docmin = minutes;
}
//
// use day names
//
if (docday == 0) {
	day = "Sunday";
}
else if (docday == 1) {
	day = "Monday";
}
else if (docday == 2) {
	day = "Tuesday";   
}
else if (docday == 3) {
	day = "Wednesday";   
}
else if (docday == 4) {
	day = "Thursday";
}
else if (docday == 5) {
	day = "Friday";
}
else {
	day = "Saturday";
}
//
// use month names
//
if (docmonth == 0) {
	month = "January";
}
else if (docmonth == 1) {
	month = "February";
}
else if (docmonth == 2) {
	month = "March";
}
else if (docmonth == 3) {
	month = "April";
}
else if (docmonth == 4) {
	month = "May";
}
else if (docmonth == 5) {
	month = "June";
}
else if (docmonth == 6) {
	month = "July";
}
else if (docmonth == 7) {
	month = "August";
}
else if (docmonth == 8) {
	month = "September ";
}
else if (docmonth == 9) {
	month = "October";
}
else if (docmonth == 10) {
	month = "November";
}
else {
	month = "December";
}
		
doctime = day + ", " + month + " " + docweekday + ", " + docyear + " - " + dochours + ":" + docmin + "" + tval 
