var step=1;

var contentobj=document.getElementById? document.getElementById("textBoxContent") : document.all.textBoxContent;

var containerobj = document.getElementById? document.getElementById("textBoxContainer") : document.all.textBoxContainer;

var contentheight=contentobj.offsetHeight;

var containerheight=containerobj.offsetHeight;

var arrows=document.getElementById? document.getElementById("arrows") : document.all.arrows;


if (contentheight>containerheight)
    {
	arrows.style.display='block';
	
    }


if (document.getElementById&&!document.all){
    step=5;
};

scrollspeed=20;


function stopscroll(imageName){

if (window.scrolltimer) clearTimeout(window.scrolltimer)

			    imageOff(imageName);
				//if (window.movedownvar) clearTimeout(movedownvar)
}

function scroll(direction,imageName) {
    
    if(window.scrolltimerup)
	{
	    clearTimeout(scrolltimerup);
	}
    //if (contentobj.style.top>=(contentheight*(-1)))

    //{
    //#document.write(contentobj.style.top);
    //  contentobj.style.top=parseInt(contentobj.style.top)-step
	    //}

    direction = parseInt(direction);
    

    if ( ( (direction==-1) && (parseInt(contentobj.style.top)>=(contentheight*(-1)+100)))||
	 ( (direction==1) && (parseInt(contentobj.style.top)<0)))
	{
	    contentobj.style.top=parseInt(contentobj.style.top)+(step*direction) + "px"

	}
	    
    imageOn(imageName);
    

    scrolltimer = window.setTimeout("scroll("+direction+",'"+imageName+"')",scrollspeed);

}

