<!--
var slidingBannerIndex = 0;
var direction = 0;
var timerID;

function initScroll(level){
	if (level > 0){
		timerID = setTimeout("scrollF()", pausebetweenimages);
	}
}

function incIndex()
{
	if (slidingBannerIndex == slideimages.length-1)
		slidingBannerIndex = 0;
	else
		slidingBannerIndex++;
}

function decIndex()
{
	if (slidingBannerIndex==0)
		slidingBannerIndex = slideimages.length-1;
	else
		slidingBannerIndex--;
}

function scrollF(){
	
	if(direction != 1 && direction != 0)
		incIndex();

	direction=1;
	
	clearTimeout(timerID);
	
	FFmove();
}

function scrollB(){
	
	if(direction != -1 && direction != 0)
		decIndex();
		
	direction=-1;
	
	clearTimeout(timerID);
	
	FFmove();
}

function FFmove()
{
	var diff = 3;
	clayer = document.getElementById('first2');
	nlayer = document.getElementById('second2');

	if((parseInt(clayer.style.top) * direction) > 0 && (parseInt(clayer.style.top) * direction) <= diff){
		clayer.style.top = 0;
		nlayer.style.top = (scrollerheight*direction);
		if(direction > 0){
			incIndex();
		}else{
			decIndex();
		}
		nlayer.innerHTML=slideimages[slidingBannerIndex];
		timerID = setTimeout("FFmove()", pausebetweenimages);
		return;
	}

	if((parseInt(nlayer.style.top) * direction) > diff){
		clayer.style.top= (parseInt(clayer.style.top)-(diff * direction));
		nlayer.style.top= (parseInt(nlayer.style.top)-(diff * direction));
		timerID = setTimeout("FFmove()", 50);
	}else{
		if (clayer.style.pixelTop || clayer.style.pixelTop == 0)
			cmd = "clayer.style.pixelTop != 0";
		else
			cmd = "clayer.style.top != '0pt'";
		
		if(eval(cmd)){
			clayer.id = "";
			nlayer.id = "first2";
			clayer.id = "second2";
		}else{
			nlayer.style.top = (scrollerheight * direction);
			if(direction > 0){
				incIndex();
			}else{
				decIndex();
			}
			nlayer.innerHTML=slideimages[slidingBannerIndex];
		}
		FFmove();
	}

}
