function writeDate() {
allmonths = new Array('January','February','March','April','May','June','July','August','September','October','November','December');
thedate = new Date();
themonth = thedate.getMonth();
theyear = thedate.getYear();
if (theyear < 1900) {
theyear = theyear + 1900;
}
document.write(allmonths[themonth] + " " + thedate.getDate() + ", " + theyear);
}

writeDate();