function position_footer () {
	
	FOOTER = document.getElementById("footer");
    
	if (document.documentElement.clientHeight) {
		var fensterhoehe = document.documentElement.clientHeight;
	}
	
	if (window.innerHeight) {
		var fensterhoehe = window.innerHeight;
	}
    
    //alert(fensterhoehe+ " " + document.getElementById('container').offsetHeight);
	if (fensterhoehe >= document.getElementById('container').offsetHeight) {
		FOOTER.style.position = "absolute";
		FOOTER.style.bottom = "0";
		FOOTER.style.left = "50%";
        FOOTER.style.margin = "0 0 0 -500px";
    } else {
		FOOTER.style.position = "relative";
		FOOTER.style.bottom = "";
		FOOTER.style.left = "";
        FOOTER.style.margin = "0 auto 0 auto";
	}
	
}

function goback(){
    history.back(-1);    
}

Event.observe( window, "load", position_footer );
Event.observe( window, "resize", position_footer );

var timeout = null;

function scrollHandlerUp() {
    timeout = window.setInterval(scrollUp, 100);
}

function scrollHandlerDown() {
     timeout = window.setInterval(scrollDown, 100);
}

function clearInt() {
    if(timeout || timeout != null) {
        window.clearInterval(timeout);
        timeout = null;
    }
}

function scrollUp() {
    if($('scrollboxcontent').style.top == "undefined" || $('scrollboxcontent').style.top == "") {
        $('scrollboxcontent').style.top = "5px";
    }
    if(parseInt($('scrollboxcontent').style.top.replace("px","")) <= 0) {    
        $('scrollboxcontent').style.top =  parseInt($('scrollboxcontent').style.top.replace("px","")) + 20 + "px";
    }
}

function scrollDown() {
    if($('scrollboxcontent').style.top == "undefined" || $('scrollboxcontent').style.top == "") {
        $('scrollboxcontent').style.top = "5px";
    }
    if(parseInt($('scrollboxcontent').style.top.replace("px","")) - 200 >= $('scrollboxcontent').offsetHeight * -1) {    
        $('scrollboxcontent').style.top =  parseInt($('scrollboxcontent').style.top.replace("px","")) - 20 + "px";
    }
}


