function setFormat(format) {
    setCookie('crdl_videoformat',format);
    choose_videoformat();
}

function choose_videoformat() {
    var crdl_videoformat = getCookie( "crdl_videoformat" );
    if(crdl_videoformat!=null && crdl_videoformat!="") {
        var option = document.getElementById( crdl_videoformat );
        if( option != null && option != "" ) {
            window.location.href = option.value; 
        }
    }
}

function choose_videoformat_playermenu() {
    var crdl_videoformat = getCookie( "crdl_videoformat" );
    if(crdl_videoformat!=null && crdl_videoformat!="") {
        var link = document.getElementById( crdl_videoformat );
        if( link != null && link != "" ) {
            window.location.href = link.href; 
        }
    }
}
