if (document.images) {
    startbutton_on = new Image();
    startbutton_on.src = "/img/startspil_mouseover.gif";
    startbutton_off = new Image();
    startbutton_off.src = "/img/startspil.gif";
    startbutton_clicked = new Image();
    startbutton_clicked.src = "/img/startspil_aktiv.gif";
    startbutton2_on = new Image();
    startbutton2_on.src = "/img/videretilspillet_a.gif";
    startbutton2_off = new Image();
    startbutton2_off.src = "/img/videretilspillet.gif";

    classic_on = new Image();
    classic_on.src = "/img/classic_a.gif";
    classic_off = new Image();
    classic_off.src = "/img/classic.gif";
    eventspil_on = new Image();
    eventspil_on.src = "/img/eventspillet_a.gif";
    eventspil_off = new Image();
    eventspil_off.src = "/img/eventspillet.gif";
    simgame_on = new Image();
    simgame_on.src = "/img/simgame_a.gif";
    simgame_off = new Image();
    simgame_off.src = "/img/simgame.gif";
    turnering_on = new Image();
    turnering_on.src = "/img/turnering_over.gif";
    turnering_off = new Image();
    turnering_off.src = "/img/turnering_out.gif";
    multi_on = new Image();
    multi_on.src = "/img/multi_over.gif";
    multi_off = new Image();
    multi_off.src = "/img/multi_out.gif";

    highscore_on = new Image();
    highscore_on.src = "/img/highscore_a.gif";
    highscore_off = new Image();
    highscore_off.src = "/img/highscore.gif";

    vindere_on = new Image();
    vindere_on.src = "/img/vindere_a.gif";
    vindere_off = new Image();
    vindere_off.src = "/img/vindere.gif";

    regler_on = new Image();
    regler_on.src = "/img/regler_a.gif";
    regler_off = new Image();
    regler_off.src = "/img/regler.gif";
}

function overImage(ref) {
    if (document.images) {
        objName = eval(ref.id+'_on')
        ref.src = objName.src;
    }
}

function outImage(ref) {
    if (document.images) {
       objName = eval(ref.id+'_off')
       ref.src = objName.src;
    }
}

function downImage()
{
    if (document.images) {
        document['startbutton'].src = startbutton_clicked.src;
    }
}

function upImage()
{
    if (document.images) {
        document['startbutton'].src = startbutton_on.src;
    }
}

function popGameWindow(theURL)
{
    window.open(theURL,'game','width=635,height=500');
}

function overImage2() {
    if (document.images) {
        document['startbutton2'].src = startbutton2_on.src;
    }
}

function outImage2()
{
    if (document.images) {
        document['startbutton2'].src = startbutton2_off.src;
    }
}

function buyCredits() {
    window.open("/game/turnering/popup.php","valuswin","toolbars,directories=no,width=350,height=430").focus();
}

function betal_popup3() {
    popup = window.open('http://betaling.tv2.dk/betal/exmitr/','betal','width=550,height=550,top=10,left=10,scrollbars=yes,location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=yes');
    popup.focus();
}

function betal_popup10() {
    popup = window.open('http://betaling.tv2.dk/betal/exmiti/','betal','width=550,height=550,top=10,left=10,scrollbars=yes,location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=yes');
    popup.focus();
}

function betal_popup1day() {
    popup = window.open('http://betaling.tv2.dk/betal/exmien/','betal','width=550,height=550,top=10,left=10,scrollbars=yes,location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=yes');
    popup.focus();
}

function popGameMulti(site) {
    popup = window.open('http://' + site + '/ppp/maingame.php','multigame','width=655,height=550,top=10,left=10,scrollbars=yes,location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=yes');
    popup.focus();
}

function popGameClassic(site) {
    popup = window.open('http://' + site + '/freegame/','freegame','width=655,height=550,top=10,left=10,scrollbars=yes,location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=yes');
    popup.focus();
}

function popGameSim(site) {
    popup = window.open('http://' + site + '/simgame/quiz/game.htm','simgame','width=635,height=500,top=10,left=10,scrollbars=yes,location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=yes');
    popup.focus();
}

