var currentScroll = 0;
var wait = 0;		
var goingDown = 0;
var totalScrolls = 0;

function setTotalScrolls(numImages)
{
	totalScrolls = numImages - 6;
}

function moveUp() {
	if (currentScroll > 0 && wait == 0) {
		wait = 1;
		setTimeout("wait = 0", 1500);
		document.downArrow.src = '/images/ScrollArrow_dn.gif';
		if (currentScroll == 1) {
			if (goingDown == 1) {
				new Effect.Move('innerFrame', { x: 0, y: 148, transition: Effect.Transitions.linear });
				goingDown = 0;
			}
			else {
				new Effect.Move('innerFrame', { x: 0, y: 148, transition: Effect.Transitions.linear });
			}
		}
		else {
			new Effect.Move('innerFrame', { x: 0, y: 148, transition: Effect.Transitions.linear });
			goingDown = 0;
		}
		currentScroll--;
		if (currentScroll == 0) {
			document.upArrow.src = '/images/ScrollArrow_up.gif';
		}		
	}
}  

function moveDown() {
	if (currentScroll < totalScrolls && wait == 0) {
		wait = 1;
		setTimeout("wait = 0", 1500);
		document.upArrow.src = '/images/ScrollArrow_up.gif';
		if (currentScroll == 1) {
			if (goingDown == 0) {
				new Effect.Move('innerFrame', { x: 0, y: -148, transition: Effect.Transitions.linear });				
			}
			else {
				new Effect.Move('innerFrame', { x: 0, y: -148, transition: Effect.Transitions.linear });
			}
		}
		else {
			new Effect.Move('innerFrame', { x: 0, y: -148, transition: Effect.Transitions.linear });
			goingDown = 1;
		}
		currentScroll++;
		if (currentScroll == totalScrolls) {
			document.downArrow.src = '/images/ScrollArrow_dn.gif';
		}
	}
}

