    function ObsOpenWindow(what, width, height){
        window.open(what, "obssmallwindows", "scrollbars=no,toolbar=no,width="+width+",height="+height+",resize=no,menubar=no, left=0,top=0")
    }

function getWinHeight(){
    if (window.innerWidth) { h = window.innerHeight; } // ns4
    else if(document.body){
        h = document.body.clientHeight;
        if (document.body.offsetHeight == h && document.documentElement && document.documentElement.clientHeight){
            h = document.documentElement.clientHeight;
        }
    }
    return h;
}



function changeCntDisplayMode(){
    document.getElementById("content").className = "noscroll"; //Klasse setzen

    document.body.style.overflow = "hidden";
    document.getElementById("rcontent").style.position = "absolute";

    var h = getWinHeight(); //innere Fensterhöhe ermitteln
    var hh = h - 472; //Header abziehen
    
    document.getElementById("content").style.height = hh+"px"; //Content-Höhe setzen
    document.getElementById("overall").style.height = h+"px"; //Overall-Höhe anpassen (um html&body zu verkürzen)
    document.getElementById("overall").style.height = "100%"; //und wieder zurück auf 100%

    document.getElementById("scrollButtons").style.display = "block";
}




var tout;
var scrdir = "";
var cntpos = 0;
var cnth = 0;

function resetScroller(){ 
    clearTimeout(tout);
    scrdir = "";
    cntpos = 0;
    cnth = document.getElementById("rcontent").offsetHeight;
    document.getElementById("rcontent").style.top = "0px";
}

function startScroll(dir){ 
    scrdir = dir;
    tout = setTimeout("scroll()", 1);
}


function stopScroll(){
    clearTimeout(tout);
}

function scroll(){
    if(scrdir == "up" && cntpos < 0){
        cntpos+=10;
        document.getElementById("rcontent").style.top = cntpos+"px";
        tout = setTimeout("scroll()", 10);
    }
    else if(scrdir == "down" && cntpos > -cnth+(getWinHeight()-472)){
        cntpos-=10;
        document.getElementById("rcontent").style.top = cntpos+"px";
        tout = setTimeout("scroll()", 10);
    }
    else {
        clearTimeout(tout);
    }
}




