// <![CDATA[
/******************************************
* Scrollable content script II- © Dynamic Drive (www.dynamicdrive.com)
* Visit http://www.dynamicdrive.com/ for full source code
* This notice must stay intact for use
*
* Modified by Jan Vilinger
* - rewritten to generate valid XHTML
* - ns6 support removed
* - if javascript is turned off scrollbar appears instead of arrows
* - added height to prevent scrolling into the blank space on the bottom of page
******************************************/

var speed=3 //specify speed of scroll (greater=faster)
var height=250
var delay=0
var crossobj=document.getElementById? document.getElementById("text") : document.all.text
var textheight=crossobj.offsetHeight
var moveupvar
var movedownvar

function movedown(){
	if (parseInt(crossobj.style.top)>=(textheight*(-1)+height)){
		crossobj.style.top=parseInt(crossobj.style.top)-speed+"px"
		movedownvar=setTimeout("movedown()",delay)
	}
}

function moveup(){
	if (parseInt(crossobj.style.top)<=0){
		crossobj.style.top=parseInt(crossobj.style.top)+speed+"px"
		moveupvar=setTimeout("moveup()",delay)
	}
}

function gettext_height(){
	textheight=crossobj.offsetHeight
}
window.onload=gettext_height

// scrollovaci sipecky
function show_arrows(){
	if(crossobj.offsetHeight-50 > height){
		document.write('<div id="scroll_arrows"><a href="#" id="up_arrow" onfocus="this.blur()" onmouseover="moveup()" onmouseout="clearTimeout(moveupvar)"></a><a href="#" id="down_arrow" onmouseover="movedown()" onfocus="this.blur()" onmouseout="clearTimeout(movedownvar)"></a></div>')
		document.getElementById("text_container").style.overflow="hidden";
	}
}
// ]]>
