/******************************************
* Scrollable content script II- c Dynamic Drive (www.dynamicdrive.com)
* Visit http://www.dynamicdrive.com/ for full source code
* This notice must stay intact for use
******************************************/

//specify speed of scroll (greater=faster)
var speed = 3;
var contentobj;
var containerobj;
var controlobj;
var contentheight;
//contentobj.style.height = contentheight;
//alert(contentheight);

contentobj = document.getElementById ? document.getElementById('vcontent') : document.all.vcontent;
containerobj = document.getElementById ? document.getElementById('vcontainer') : document.all.vcontainer;
containerobj.style.overflow = 'hidden';
controlobj = document.getElementById ? document.getElementById('vcontrol') : document.all.vcontrol;
controlobj.style.display = 'block';

function movedown() {
  if(parseInt(contentobj.style.top) >= (contentheight * (-1) + 250))
    contentobj.style.top = parseInt(contentobj.style.top) - speed + "px";

  movedownvar = setTimeout("movedown()", 20);
}

function moveup() {
  if(parseInt(contentobj.style.top) <= 0)
    contentobj.style.top = parseInt(contentobj.style.top) + speed + "px";

  moveupvar = setTimeout("moveup()",20);
}

function getcontent_height() {
  contentheight = contentobj.offsetHeight;
}

function contentChanged() {
	contentobj.style.top = 0;
	getcontent_height();
}

window.onload = getcontent_height;
