var px = 5;//mehr=schneller 
var timer;
function rollen(val){
    clearTimeout(timer);
    d = document.getElementById('inhalt')
    y = d.scrollTop;
    if (val == 1) 
        y -= px;
    if (val == 2) 
        y += px;
    if (y <= d.scrollHeight - d.offsetHeight + px && y >= 0 - px) {
        d.scrollTop = y;
        timer = setTimeout('rollen(' + val + ')', 50);
    }
    if (y < 0 || y > d.scrollHeight - d.offsetHeight) {
        clearTimeout(timer);
    }
}

function fenster(url, l){
    var screenw = screen.availWidth;
    var screenh = screen.availHeight;
    var w = (screenw / 2) - 436;
    var h = (screenh / 2) - 300;
    window.open(url, "popup", "top=" + h + ", left=" + w + ", width=872, height=476, menubar=no, locationbar=no, resizable=no");
}

function disableRoller(){
	var el = document.getElementById('inhalt')
	if(el.scrollHeight > el.clientHeight){
		document.getElementById('roller').style.display = 'block';
	} 
}

function projekt(url, l){
var screenw = screen.availWidth; 
var screenh = screen.availHeight;
var w = (screenw / 2)-900;
var h = (screenh / 2)-700;
window.open(url+"&L="+l, "popup", "top="+h+", left="+w+", width=900, height=700, menubar=no, locationbar=no, resizable=no, scrollbars=yes");
}


