function Scroller(divelem) {
	var elem = divelem;
	var anims = null;
	var speedv = null;
	var ratev = null;
	var framev = null;
	var tov = null;
	
	this.getElem = function() {
		return elem;
	}
	
	this.getSpeed = function() {
		return speedv;
	}
	
	this.getTo = function() {
		return tov;
	}
	
	this.getFrame = function() {
		return framev;
	}
	
	this.getRate = function() {
		return ratev;
	}
	
	this.setTOV = function(tov) {
		anims = tov;
	}
	
	this.setTo = function(toov) {
		tov = toov;
	}
	
	this.setSpeed = function(tov) {
		speedv = tov;
	}
	
	this.setFrame = function(tov) {
		framev = tov;
	}
	
	this.setRate = function(tov) {
		ratev = tov;
	}
		
	this.clearTOV = function() {
		clearTimeout(anims);
	}
}

var outer,inner,elementheight,ref,refX,refY;
var w3c=(document.getElementById)?true:false;
var ns4=(document.layers)?true:false;
var ie4=(document.all && !w3c)?true:false;
var ie5=(document.all && w3c)?true:false;
var ns6=(w3c && navigator.appName.indexOf("Netscape")>=0)?true:false;

function st_animation_scroller_alias(obj, frame, speed, rate) {
	if ((getElHeight(obj.getElem())+frame) > 0) {
		frame=frame-2;
		obj.getElem().style.top = frame+"px";
	} else {
		frame = 361;
	}
	obj.setFrame(frame);
	obj.setTOV(setTimeout(function(){st_animation_scroller_alias(obj, frame, speed, rate)},speed));
}

function st_animation_scroller(obj) {
	obj.setSpeed(60);
	obj.setRate(1);
	st_animation_scroller_alias(obj, 361, obj.getSpeed(), obj.getRate());
}

function st_animation_stop(obj) {
	obj.clearTOV();
}

function st_animation_resume(obj) {
	obj.setTOV(setTimeout(function(){st_animation_scroller_alias(obj, obj.getFrame(), obj.getSpeed(), obj.getRate())},obj.getSpeed()));
	
}
function getElHeight(el){
	if(ns4)return (el.document.height)? el.document.height : el.clip.bottom-el.clip.top;
	else if(ie4||ie5)return (el.style.height)? el.style.height : el.clientHeight;
	else return (el.style.height)? parseInt(el.style.height):parseInt(el.offsetHeight);
}
