

var scroll_interval = 0;
var cas;
var posun;
var el, cel_vel;



function InitScroll(a,b){
el =  document.getElementById(a);

win_vel = parseInt(el.offsetHeight);

el.style.height = 'auto';
cel_vel = parseInt(el.offsetHeight);
cel_vel = cel_vel + 130;

//win_vel = c;

el.style.height = win_vel + "px";





	if((win_vel + 130) < cel_vel + 20){
	ov =  document.getElementById('up');
	ov.style.visibility = 'visible';
	ov =  document.getElementById('down');
	ov.style.visibility = 'visible';
	}



cas = b;



}



function Scroll(pos){
posun = pos;

if(posun == 0){ clearInterval(scroll_interval);}
else{scroll_interval = setInterval("Sposun()",cas);}

}



function Sposun(){

s_top = parseInt(el.style.top);
s_height = parseInt(el.style.height);

if((s_top + (posun*-1)) > 0 || s_height > (cel_vel - posun) ){posun=0;}

n_top = s_top + (posun*-1);
n_height = s_height + posun;

el.style.top = n_top + "px";
el.style.height = n_height + "px";

rect = "rect("+(n_top*-1)+"px 460px "+n_height+"px 0px)";

el.style.clip = rect;

}



