// JavaScript Document

var DownStep = 2;
var UpStep = -2;
var tID;
var tID2;

function StartUpScroll() {
	tID2 = setInterval("StartUpScroll2()",10);
}

function StartUpScroll2() {
	var ifr = document.getElementById('listaimage');
	if(ifr) {
		if (ifr.scrollHeight <= 0) {
			clearInterval(tID2);
		} else {
			ifr.scrollTop = ifr.scrollTop + UpStep;
		}
	}
}

function StopUpScroll() {
	clearInterval(tID2);
}

function StartDownScroll() {
	tID = setInterval("StartDownScroll2()",10);
}

function StartDownScroll2(){
	var ifr = document.getElementById('listaimage');
	if(ifr) {
		if(ifr.scrollHeight - ifr.scrollTop <= 274){
			clearInterval(tID);
		}else{
			ifr.scrollTop = ifr.scrollTop + DownStep;
		}
	}
}

function StopDownScroll() {
	clearInterval(tID);
}
