// Store the date in a variabled = new Date()dateText = ""// Get the current day and convert it to the name of the daydayValue = d.getDay()if (dayValue == 0)    dateText += "SUNDAY"else if (dayValue == 1)    dateText += "MONDAY"else if (dayValue == 2)    dateText += "TUESDAY"else if (dayValue == 3)    dateText += "WEDNESDAY"else if (dayValue == 4)    dateText += "THURSDAY"else if (dayValue == 5)    dateText += "FRIDAY"else if (dayValue == 6)    dateText += "SATURDAY"// Get the current month and convert it to the name of the monthmonthValue = d.getMonth()dateText += " "if (monthValue == 0)    dateText += "JANUARY"if (monthValue == 1)    dateText += "FEBRUARY"if (monthValue == 2)    dateText += "MARCH"if (monthValue == 3)    dateText += "APRIL"if (monthValue == 4)    dateText += "MAY"if (monthValue == 5)    dateText += "JUNE"if (monthValue == 6)    dateText += "JULY"if (monthValue == 7)    dateText += "AUGUST"if (monthValue == 8)    dateText += "SEPTEMBER"if (monthValue == 9)    dateText += "OCTOBER"if (monthValue == 10)    dateText += "NOVEMBER"if (monthValue == 11)    dateText += "DECEMBER"// Get the current year; if it's before 2000, add 1900if (d.getYear() < 2000)     dateText += " " + d.getDate() + ", " + (1900 + d.getYear())else     dateText += " " + d.getDate() + ", " + (d.getYear())// Get the current minutesminuteValue = d.getMinutes()if (minuteValue < 10)    minuteValue = "0" + minuteValue// Get the current hourshourValue = d.getHours()// Customize the greeting based on the current hoursif (hourValue < 12)    {    greeting = "GOOD MORNING!  "    timeText = " at " + hourValue + ":" + minuteValue + " AM"    }else if (hourValue == 12)    {    greeting = "GOOD AFTERNOON!  "    timeText = " at " + hourValue + ":" + minuteValue + " PM"    }else if (hourValue < 17)    {    greeting = "GOOD AFTERNOON!  "    timeText = " at " + (hourValue-12) + ":" + minuteValue + " PM"    }else    {    greeting = "GOOD EVENING!  "    timeText = " at " + (hourValue-12) + ":" + minuteValue + " PM"    }// Write the greeting, the date, and the time to the pagedocument.write(greeting + "&nbsp;&nbsp; IT'S " + dateText + timeText)