
function fill_calendar() {
<!--
// Store the date in a variable
d = new Date()

dayvar = ""
monthvar = ""
yearvar = ""
daycolor = "#000044"
calcolor = "#000044"

// Get the current day and convert it to the name of the day
dayValue = d.getDay()
if (dayValue == 0) {
    dayvar = "Søndag";
    daycolor = "#990000"
    }
else if (dayValue == 1)
    dayvar = "Mandag"
else if (dayValue == 2)
    dayvar = "Tirsdag"
else if (dayValue == 3)
    dayvar = "Onsdag"
else if (dayValue == 4)
    dayvar = "Torsdag"
else if (dayValue == 5)
    dayvar = "Fredag"
else if (dayValue == 6)
    dayvar = "Lørdag"

// Get the current month and convert it to the name of the month
monthValue = d.getMonth()
if (monthValue == 0)
    monthvar = "Januar"
if (monthValue == 1)
     monthvar = "Februar"
if (monthValue == 2)
     monthvar = "Marts"
if (monthValue == 3)
     monthvar = "April"
if (monthValue == 4)
     monthvar = "Maj"
if (monthValue == 5)
     monthvar = "Juni"
if (monthValue == 6)
     monthvar = "Juli"
if (monthValue == 7)
     monthvar = "August"
if (monthValue == 8)
     monthvar = "September"
if (monthValue == 9)
     monthvar = "Oktober"
if (monthValue == 10)
     monthvar = "November"
if (monthValue == 11)
     monthvar = "December"

// Get the current year; if it's before 2000, add 1900
if (d.getYear() < 2000) 
    yearvar = 1900 + d.getYear()
else 
    yearvar = 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('<font face="Times New Roman" size="3" color="'+daycolor+'"><b>'+dayvar+'</b></font><BR><font face="Arial" size="5" color="'+calcolor+'"><b>'+d.getDate()+'</b></font><BR><font face="Times New Roman" size="3" color="'+calcolor+'"><b>'+monthvar+'</font></b>');
//-->
}