<!--
// 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)
    dateText1 = "Sonntag"
else if (dayValue == 1)
    dateText1 = "Montag"
else if (dayValue == 2)
    dateText1 = "Dienstag"
else if (dayValue == 3)
    dateText1 = "Mittwoch"
else if (dayValue == 4)
    dateText1 = "Donnerstag"
else if (dayValue == 5)
    dateText1 = "Freitag"
else if (dayValue == 6)
    dateText1 = "Samstag"

// Get the current month and convert it to the name of the month
monthValue = d.getMonth()
dateText += " "
if (monthValue == 0)
    dateText2 = "Januar"
if (monthValue == 1)
    dateText2 = "Februar"
if (monthValue == 2)
    dateText2 = "Maerz"
if (monthValue == 3)
    dateText2 = "April"
if (monthValue == 4)
    dateText2 = "Mai"
if (monthValue == 5)
    dateText2 = "Juni"
if (monthValue == 6)
    dateText2 = "Juli"
if (monthValue == 7)
    dateText2 = "August"
if (monthValue == 8)
    dateText2 = "September"
if (monthValue == 9)
    dateText2 = "Oktober"
if (monthValue == 10)
    dateText2 = "November"
if (monthValue == 11)
    dateText2 = "Dezember"

// Get the current year; if it's before 2000, add 1900
if (d.getYear() < 2000) 
    dateText = dateText1 + " den " + d.getDate() + ". " +  dateText2 + " " + (1900 + d.getYear())
else 
    dateText = dateText1 + " den " + d.getDate() + ". " + dateText2 + " " + (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 = "Guten Morgen am"
    timeText = " um " + hourValue + ":" + minuteValue + ""
    }
else if (hourValue == 12)
    {
    greeting = "Herzlich willkommen am"
    timeText = " um " + hourValue + ":" + minuteValue + ""
    }
else if (hourValue < 17)
    {
    greeting = "Herzlich willkommen am"
    timeText = " um " + (hourValue-12) + ":" + minuteValue + ""    }
else
    {
    greeting = "Guten Abend am"
    timeText = " um " + (hourValue-12) + ":" + minuteValue + ""
    }
// Write the greeting, the date, and the time to the page
document.write(greeting + " " + dateText + timeText)
//-->

