/******************************************
* Scrollable content script II- © Dynamic Drive (www.dynamicdrive.com)
* Visit http://www.dynamicdrive.com/ for full source code
* This notice must stay intact for use
******************************************/
/*However, substantially modified by shyam @
http://www.codingforums.com/archive/index.php/t-64892.html and then further tweaked
by Rhino Plus Facile, and how crappy was the code in the original script, I ask you?
This is much prettier.  Also more standards-compliant.*/

//specify speed of scroll (greater=faster)
var speed=10;

function getObj(objName)
{
	if(document.getElementById)
	{
		return document.getElementById(objName);
	}
}

function movedown(which)
{
	target = getObj(which);
	if(parseInt(target.style.top)>=(target.content_height*(-1)+100))
	{
		target.style.top=parseInt(target.style.top)-speed+"px";
	}
	movedownvar=setTimeout("movedown('" + which + "')",20);
}

function moveup(which)
{
	target = getObj(which);
	if(parseInt(target.style.top)<=0)
	{
		target.style.top=parseInt(target.style.top)+speed+"px";
	}
	moveupvar=setTimeout("moveup('" + which + "')",20);
}

function getcontent_height()
{
	getObj("content1").content_height = getObj("content1").offsetHeight;
	getObj("content2").content_height = getObj("content2").offsetHeight;
}
window.onload=getcontent_height;
