defaultStep=1;
step=1;

// scrolllathato('shely')

function alapbeallit() {
	
}

function scrolllathato(id) {
	jelen=document.getElementById(id).scrollTop;
	maxhol=document.getElementById(id).scrollHeight-document.getElementById(id).offsetHeight;
	document.getElementById('fel').style.display='block';
	document.getElementById('le').style.display='block';
	if (jelen==0) { document.getElementById('fel').style.display='none'; }
	if (jelen==maxhol) { document.getElementById('le').style.display='none'; }
//	ak = "jelen:"+jelen+" - maxhol:"+maxhol+" - "+document.getElementById(id).offsetHeight+" - "+document.getElementById(id).scrollHeight+" - "+document.getElementById(id).scrollTop;
//	alert(ak);
}

function scrollDivUp(id,sebesseg){
//	alert('-- ' + seb);
	clearTimeout(timerUp);
	document.getElementById(id).scrollTop-=sebesseg;
	timerUp=setTimeout("scrollDivUp('"+id+"',"+sebesseg+")",50);
	scrolllathato(id);
} 

function scrollDivDown(id,sebesseg){
	clearTimeout(timerDown);
	document.getElementById(id).scrollTop+=sebesseg;
	timerDown=setTimeout("scrollDivDown('"+id+"',"+sebesseg+")",50);
	scrolllathato(id);
}

function scrollDivLeft(id,sebesseg){
//	alert('- ' + sebesseg)
	clearTimeout(timerDown);
	document.getElementById(id).scrollLeft+=sebesseg;
	timerLeft=setTimeout("scrollDivLeft('"+id+"',"+sebesseg+")",50);
} 

function scrollDivRight(id,sebesseg){
	clearTimeout(timerUp);
	document.getElementById(id).scrollLeft-=sebesseg;
	timerRight=setTimeout("scrollDivRight('"+id+"',"+sebesseg+")",50);
} 

timerUp="";
timerDown="";
timerLeft="";
timerRight="";

function stopMe(){
	clearTimeout(timerUp);
	clearTimeout(timerDown);
	clearTimeout(timerLeft);
	clearTimeout(timerRight);
}

document.onmousemove=function(){ stopMe(); }

// document.onLoad = scrolllathato('shely');

/*

defaultStep=1;
step=defaultStep;

function scrollDivUp(id){
	clearTimeout(timerUp);
	document.getElementById(id).scrollTop-=step;
	timerUp=setTimeout("scrollDivUp('"+id+"')",10);
} 

function scrollDivDown(id){
	clearTimeout(timerDown);
	document.getElementById(id).scrollTop+=step;
	timerDown=setTimeout("scrollDivDown('"+id+"')",10);
} 

function scrollDivLeft(id){
	clearTimeout(timerDown);
	document.getElementById(id).scrollLeft+=(step+1);
	timerLeft=setTimeout("scrollDivLeft('"+id+"')",10);
} 

function scrollDivRight(id){
	clearTimeout(timerUp);
	document.getElementById(id).scrollLeft-=(step+1);
	timerRight=setTimeout("scrollDivRight('"+id+"')",10);
} 

timerUp="";
timerDown="";
timerLeft="";
timerRight="";

function stopMe(){
	clearTimeout(timerUp);
	clearTimeout(timerDown);
	clearTimeout(timerLeft);
	clearTimeout(timerRight);
}

document.onmousemove=function(){ stopMe(); }
*/
