var loadAttempts = 0;

function hide(x) {
    document.getElementById(x).style.display = 'none';
}

function show(x) {
    document.getElementById(x).style.display = '';
    setTimeout("Oversigt()", 300);
}
function showSpec(x) {
    document.getElementById(x).style.display = '';
    setTimeout("SpecFilm()", 300);
}

function getFlashMovie(movieName) {
    var isFF = navigator.appName.indexOf("Netscape") != -1;

    if (isFF && navigator.userAgent.indexOf("Safari") == -1) {
        return document[movieName];
    } else {
    var o = document.getElementById(movieName);
        if (!o) {
            o = window[movieName];
        }
        return o;
    }
}

function Oversigt() {
    var text = "1"
    try{
    getFlashMovie("VideoPlayer").sendTextToFlash(text);
    }catch(e)
    {
        if(loadAttempts < 3)
        {
            setTimeout("Oversigt()", 600);
        }
        loadAttempts++;
    }
}

function luk() {
    var text = "0"
    getFlashMovie("VideoPlayer").sendTextToFlash(text);
    setTimeout("hide('divBioBottom')", 600);
}
function SpecFilm() {
    var text = "4"
    getFlashMovie("VideoPlayer").sendTextToFlash(text);
}