function getdate() {
var daylist=['Sunday','Monday','Tuesday','Wednesday','Thursday','Friday', 'Saturday']
var monthlist=['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September','October','November','December']
d=new Date();
tday=d.getDay();
tmonth=d.getMonth();
tdate=d.getDate();
tyear=d.getFullYear();
thour=d.getHours();
tmin=d.getMinutes();
var day=daylist[tday]
var mo=monthlist[tmonth]
//fix time
if (thour>12) { 
	hour=thour-12;
	ampm='p.m.';
	}
	else if (thour==0) {
	hour=12;
	ampm='a.m.';
	} 
	else if (thour==12) {
	hour=12;
	ampm='p.m.';

 } else {
	hour=thour;
	ampm='a.m.';

}
if (tmin<10) {
	mins='0'+tmin
} else {
	mins=tmin
}
ret= day + ', ' + mo + ' ' + tdate + ', ' + tyear + ', ' + hour + ':' + mins + ' ' + ampm
//alert(ret)
document.write(ret)
}
