function showInfoNyt(InfoNytNr)
{
    day  = new Date();
    id   = day.getTime();
    urlInfoNyt = "http://www.femtehk.dk/infonyt" + InfoNytNr + ".htm"
    if (InfoNytNr == 3)
        urlInfoNyt = urlInfoNyt + "l";
    eval("page" + id + " = window.open(urlInfoNyt , '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0,width=750,height=700,left=100,top=100');");
}

function showInfoNytFromDDL(lstInfoNyt)
{
    if (lstInfoNyt.selectedIndex != 0)
    {
        day  = new Date();
        id   = day.getTime();
        urlInfoNyt = "http://www.femtehk.dk/infonyt" + lstInfoNyt.selectedIndex + ".htm"
        if (lstInfoNyt.selectedIndex == 3)
            urlInfoNyt = urlInfoNyt + "l";
        eval("page" + id + " = window.open(urlInfoNyt , '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0,width=750,height=700,left=100,top=100');");
    }
}

function windowOpen(pageurl, sizex, sizey)
{
    mywin = window.open(pageurl,"win",'toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=1,resizable=0,width=' + sizex + ',height=' + sizey);
}

function displayTodaysDate()
{
    arrDays    = new Array("Søndag","Mandag","Tirsdag","Onsdag","Torsdag","Fredag","Lørdag");
    arrMonths  = new Array("januar","februar","marts","april","maj","juni","juli","august","september","oktober","november","december");
    clDate     = new Date();
    day        = clDate.getDate();
    year       = clDate.getYear();
    if (year < 2000) year = year + 1900;
    TodaysDate = arrDays[clDate.getDay()]+" d. "+day+". "+arrMonths[clDate.getMonth()]+" "+year;
    document.write(TodaysDate);
}

function displayDaysToDate(dateEvent)
{
    dateNow = new Date();
    var oneDay = 1000 * 60 * 60 * 24;
    var daysToGo = Math.ceil((dateEvent.getTime() - dateNow.getTime()) / (oneDay));

    if      (daysToGo == 0)  {document.write("(I DAG!)");}
    else if (daysToGo == 1)  {document.write("(I MORGEN!)");}
    else if (daysToGo == 2)  {document.write("(I OVERMORGEN!)");}
    else if (daysToGo < 30) {document.write("(om kun " + daysToGo + " dage)");}
    else                    {document.write("(om " + daysToGo + " dage)");}
}

function addToFavorites()
{
    var favoriteUrl   = "http://www.all2one.dk/grindstedskakklub"
    var favoriteTitle = "Grindsted Skakklub af 1918"
    if (document.all)
    {
        window.external.AddFavorite(favoriteUrl, favoriteTitle)
    }
}