var speed=1;//scrollhoehe in px
var speed_timeout=20;//10;
var crossobj;
var contentheight;

var container_breite=20;//in divs container und content: hier oben; em statt px:230;
var container_hoehe=120;
var container_border="2px ridge black";
var container_padding=4;
var container_headline="Im Labertal";

function scrollcontainerwrite()   {

iens6=document.all||document.getElementById;
ns4=document.layers;


if (iens6)  {
	//document.write('<div class="tls" style="padding:4px;" align="left">'+container_headline+'</div>');
	
    	document.write('<div id="container" style="position:relative; left:0px; top:0px; width:'+container_breite+'em; height:'+container_hoehe+'px; overflow:hidden; border:'+container_border+';">');
	document.write('<div onmouseover="javascript:stopscroll();" onmouseout="javascript:movedown();" id="content" style="cursor:pointer; position:absolute; padding:'+container_padding+'px; width:'+container_breite+'em; left:0px; top:0px;">');
	//document.write('<table border="1"><td width="'+container_breite+'">');
}  else if (ns4)   {
	//document.write('<div  class="text_normal" align="left"><b>'+container_headline+'</b> &nbsp; &nbsp; <span><font size="-1"><a href="javascript:stopscroll();" onmouseover="javascript:stopscroll();" onmouseout="javascript:movedown();">[Stop]</a></span></div>');

	document.write('<ilayer name="nscontainer" width='+container_breite+' height='+container_hoehe+' clip="0,0,'+container_breite+','+container_hoehe+'">');
	document.write('<layer onmouseover="javascript:stopscroll();" onmouseout="javascript:movedown();" width='+container_breite+' height='+container_hoehe+' visibility=hidden>');
	//document.write('<table border="0"><td  width="'+container_breite+'">');
}

spider2kaltmr();

if (iens6)   {
	//document.write('</td></table>');
	document.write('</div></div>');
	crossobj=document.getElementById? document.getElementById("content") : document.all.content;
	contentheight=crossobj.offsetHeight;
} else if (ns4)   {
	document.write('</td></table>');
	document.write('</layer></ilayer>');
	crossobj=document.nscontainer.document.nscontent;
	contentheight=crossobj.clip.height;
}

}


function movedown()   {
	if (window.moveupvar) {
		clearTimeout(moveupvar);
	}

	if (iens6&&parseInt(crossobj.style.top)>=(contentheight*(-1)-0))  {
		crossobj.style.top=parseInt(crossobj.style.top)-speed+"px";
	}   else if (ns4&&crossobj.top>=(contentheight*(-1)-0))  {
			crossobj.top-=speed;
	}  else  {
		if (iens6)  {
			stopscroll();
			crossobj.style.top=container_hoehe+"px";   
		}  else if (ns4)  {
			stopscroll();
			crossobj.top-=container_hoehe;
		}
	}

	movedownvar=setTimeout("movedown();", speed_timeout);
}


function moveup()  {
	if (window.movedownvar) 	{
		clearTimeout(movedownvar);
    }

    if (iens6&&parseInt(crossobj.style.top)<=0)  {
	  crossobj.style.top=parseInt(crossobj.style.top)+speed+"px";
	}  else if (ns4&&crossobj.top<=0)  {
		crossobj.top+=speed;
	}
	
	moveupvar=setTimeout("moveup()", speed_timeout);
}

function stopscroll()  {
	if (window.moveupvar) clearTimeout(moveupvar);
	if (window.movedownvar) clearTimeout(movedownvar);
}


function movetop(){
	stopscroll();
	if (iens6)   {
		crossobj.style.top=0+"px";
	}  else if (ns4)  {
		crossobj.top=0;
	}
}


function getcontent_height()  {
	if (iens6)  {
		contentheight=crossobj.offsetHeight;
	}  else if (ns4)  {
		document.nscontainer.document.nscontent.visibility="show";
	}
}


function  starten()  {
	getcontent_height();
	movedown();
}

