lstart = 50;
loop = true;
speed = 100;
pr_step = 1;
var n = (document.layers) ? 1:0;
var ie = (document.all) ? 1:0;

function makeObj(obj,nest){
  nest = (!nest) ? '' : 'document.' + nest + '.';
  this.css = (n) ? eval(nest + 'document.' + obj) : eval(obj + '.style');
	this.scrollHeight = n ? this.css.document.height : eval(obj + '.offsetHeight');
	this.up = goUp;
  this.obj = obj + "Object";
  eval(this.obj + " = this");
  return this;
}

//Makes the layer slide up
function goUp(speed){
	if (parseInt(this.css.top) > -this.scrollHeight) {
		this.css.top = parseInt(this.css.top) - pr_step;
	} else if (loop) {
		this.css.top = lstart;
	}
}

//Calls the object constructor,makes the slide object and starts the sliding.
function slideInit(nest,obj){
	oSlide = makeObj(nest,obj);
	oSlide.css.top = lstart;
	setInterval('oSlide.up(speed)',speed);
}

function stop() {
  this.up = 0;
}

function restart(nest,obj) {
	oSlide = makeObj(nest,obj);
  this.up(speed);
}
  


