function getmonth(themonth0, themonth1, themonth2, themonth3, themonth4, themonth5, themonth6, themonth7, themonth8, themonth9, themonth10, themonth11) {
    this[0] = themonth0; this[1] = themonth1; this[2] = themonth2;
    this[3] = themonth3; this[4] = themonth4; this[5] = themonth5;
    this[6] = themonth6; this[7] = themonth7; this[8] = themonth8;
    this[9] = themonth9; this[10] = themonth10; this[11] = themonth11;
}
function makecalendar() {
    var whatIsIt = "JanFebMaaAprMeiJunJulAugSepOktNovDec";
    var today = new Date(); var thisDay;
    var monthDays = new getmonth(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);
    year=today.getFullYear(); thisDay = today.getDate();
    if (((year % 4 == 0) && (year % 100 != 0)) || (year % 400 == 0))
    monthDays[1] = 29; nDays = monthDays[today.getMonth()];
    IsitNow = today; IsitNow.setDate(1); FindOut = IsitNow.getDate();
    if (FindOut == 2) IsitNow.setDate(0); startDay = IsitNow.getDay();

    document.write("<div title='Naar de evenementenkalender' onClick='document.location.href(\"[url]?[idparameter]=36\")'>");
    document.write("<table border=0>");
    document.write("<tr><td colspan=7 class='calSmallHeader'>");
    document.write(whatIsIt.substring(today.getMonth() * 3, (today.getMonth() + 1) * 3));
    document.write(" "); document.write(year);
    document.write("</td></tr><tr><td class='calSmallDagnaam'>Zo</td><td class='calSmallDagnaam'>Ma</td><td class='calSmallDagnaam'>Di</td><td class='calSmallDagnaam'>Wo</td><td class='calSmallDagnaam'>Do</td><td class='calSmallDagnaam'>Vr</td><td class='calSmallDagnaam'>Za</td></tr>");
    document.write("<tr>");
    column = 0;
    
    for (i=0; i<startDay; i++) {
        document.write("<td class='calSmallDag'> ");
        column++;
    }
    for (i=1; i<=nDays; i++) {
        document.write("</td><td class='calSmallDag'>");
        if (i == thisDay)  document.write("<div class='calSmallVandaag' style='cursor: hand;' title='Naar de evenementenkalender' onClick='document.location.href(\"[url]?[idparameter]=36\")'>")
        document.write(i);
        if (i == thisDay) document.write("</div>")
        column++;
        if (column == 7) {
            document.write("</td></tr><tr>"); 
            column = 0;
        }
    }
    document.write("</tr></table>");
    document.write("</div>");
}
makecalendar();