 //Set these variables:
//The pixel value of where you want the layer to start (from the top)
lstart=500
//Set this to false if you just want it to go one time
loop=true
//Set the speed, lower value gives more speed
speed=80
//Set this to how many pixels you want it to go for each step, this also changes the speed.
pr_step=5

//Browsercheck
var n = (document.layers) ? 1:0;
var ie = (document.all) ? 1:0;

//Object constructor
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
    setTimeout(this.obj+".up("+speed+")",speed)
  }
  else if(loop)
  {
    this.css.top=lstart
    eval(this.obj+".up("+speed+")")
  }
}

//Calls the object constructor,makes the slide object and starts the sliding.
function slideInit()
{
  oSlide=makeObj('divNews','divCont')
  oSlide.css.top=lstart
  oSlide.up(speed)
}

//Start the sliding on page load.
onload=slideInit
