function dayView(day=null)
{
    if (day === null)
    {
        day = mod(new Date().getDay() - 1, 7);
    }
    displayed_day_start = getRelDay(day);

    var columns = $("#week .day-column");
    for (i = 0; i < columns.length; ++i)
    {
        if (i == day)
        {
            columns[i].style.removeProperty('display');
        } else {
            columns[i].style.display = "none";
        }
    }

    var columns = $("#days .day-column");
    for (i = 0; i < columns.length; ++i)
    {
        if (i == day)
        {
            columns[i].style.removeProperty('display');
        } else {
            columns[i].style.display = "none";
        }
    }

    view = "day";
    updateEvents(true);

    if ($("#time-indicator").position().top != 0)
    {
        fixDates();
        $("#grid").scrollTop($("#time-indicator").position().top);
    }
}

function weekView()
{
    var columns = $("#week .day-column");
    for (i = 0; i < columns.length; ++i)
    {
        columns[i].style.removeProperty('display');
    }

    var columns = $("#days .day-column");
    for (i = 0; i < columns.length; ++i)
    {
        columns[i].style.removeProperty('display');
    }

    view = "week";
    $("#grid").scrollTop(0);
    updateEvents(true);
    fixDates();
}

