function checkBrowser()
{
	this.agent=navigator.userAgent;
	this.ver=navigator.appVersion;
	this.dom=document.getElementById?1:0;
	this.win=this.agent.indexOf('Windows')>-1;
	this.mac=this.agent.indexOf("Mac")>-1;
	this.ie4=(document.all && !this.dom)?1:0;
	this.ie5=(this.ver.indexOf('MSIE 5')>-1 && this.dom)?1:0;
	this.ie6=(this.ver.indexOf('MSIE 6')>-1 && this.dom)?1:0;
	this.ie7=(this.ver.indexOf('MSIE 7')>-1 && this.dom)?1:0;
	this.ie4mac=(this.ie4 && this.mac);
	this.ie5mac=(this.ie5 && this.mac);
	this.ns4=(document.layers && !this.dom)?1:0;
	this.ns6=(this.dom && parseInt(this.ver) >= 5)?1:0;
	this.ie=(this.ie4 || this.ie5 || this.ie6 ||this.ie7 ||  this.ie4mac || this.ie5mac);
	this.ns=(this.ns4 || this.ns6);
	this.w3c=(this.ie5 || this.ie6 || this.ns6 ||this.ie7 ||  this.ie5mac);
	this.bw=(this.ie4 || this.ie5 || this.ie6 ||this.ie7 ||  this.ns4 || this.ns6);
	return this;
}
var bw=new checkBrowser();
// Variables to set:
var scrollstep = 30; // the speed of the timeout between each scroll
var scrollables = 2; // number of scrollable content
// Variables NOT to set:
var scrolltimer = 0; // timer variable for vscroll function
// Makes crossbrowser object
function makeObject(obj)
{
	this.css=bw.w3c?document.getElementById(obj).style:bw.ie4?document.all[obj].style:null;
	this.oref=bw.w3c?document.getElementById(obj):bw.ie4?document.all[obj]:null;
	this.moveIt=f_moveIt; this.x; this.y;
	this.showIt=f_showIt;
	this.hideIt=f_hideIt;
	this.height=f_height;
	return this;
}
// Moves the object
function f_moveIt(x,y)
{
	this.x=x; this.y=y;
	this.css.left=this.x;
	this.css.top=this.y;
}
// Makes an object's visibiltiy visible
function f_showIt() { this.css.visibility='visible'; }
// Makes an object's visibiltiy hidden
function f_hideIt() { this.css.visibility='hidden'; }
// Get object height
function f_height()
{
	if (bw.ie) if (this.css.pixelHeight) return this.css.pixelHeight; else return this.oref.offsetHeight;
	else if (bw.ns6) if (this.css.height) return parseInt(this.css.height); else return this.oref.offsetHeight;
}
// vertical scroll
function vscroll(num,speed)
{
	if (isLoaded)
	{
		if ((speed>0 && oContent[num].y>-oContent[num].height()+oContainer[num].height()) || (speed<0 && oContent[num].y<0)) oContent[num].moveIt(0,oContent[num].y-speed);
		scrolltimer=setTimeout('vscroll('+num+','+speed+')',scrollstep);
	}
}
// disable scroll
function noscroll() { clearTimeout(scrolltimer); }
// Function to call on page load
var isLoaded=false;
function scrollInit()
{
	if ( bw.w3c && !document.getElementById('divBehaelter') )
		{
		return;
		}
	else if ( bw.ie4 && !document.all['divBehaelter'] )
		{
		return;
		}




	oContainer=new Array();
	oContent=new Array();
	oUp=new Array();
	oDown=new Array();
	for (var i=1;i<=scrollables;i++)
	{
		oContainer[i]=new makeObject('divBehaelter');
		oContent[i]=new makeObject('divInhalt');
		oUp[i]=new makeObject('divHoch');
		oDown[i]=new makeObject('divRunter');
		// Enable scroll if content is scrollable, disable if not.
		if (oContent[i].height() > oContainer[i].height()) { oUp[i].showIt(); oDown[i].showIt(); }
		else if (oContainer[i].height() > oContent[i].height()) { oUp[i].hideIt(); oDown[i].hideIt(); }
		if (bw.ns6) oContent[i].css.position='relative'; // scrollbar hack for NS6
		oContent[i].moveIt(0,0);
		oContainer[i].css.visibility='visible';
	}
	isLoaded=true;
}
// Initiate script on page load
onload=scrollInit;

