// Copyright © 2006 Web Maintenance - WebMaintenance.co.uk
var ContainsList;
var currentTop=0;
var vInterval = null;
var direction;	// 1 = up
var hieght=-1580

function init() {
	// Check if functionality available
	if(!document.getElementById)return;

	up=document.getElementById("ContainsNewsUpArrow");
	down=document.getElementById("ContainsNewsDownArrow");
	down.onmouseover=function(){scrollObjects(0);}
	down.onmouseout=function(){ScrollStop();}
	up.onmouseover=function(){scrollObjects(1);}
	up.onmouseout=function(){ScrollStop();}
	ContainsList = document.getElementById("ContainsNewsList");
	document.getElementById("ContainsNewsMenu").style.height="200px";
}

function scrollObjects(dir) {
	if((!dir && currentTop<=hieght) || (dir && currentTop>=0))return;
	if(vInterval)return;
	direction=dir;
	vInterval=setInterval("animate()",30);
}
function ScrollStop(){
		clearInterval(vInterval);
		vInterval=null;
}
function animate() {
	if(!direction) {
		currentTop-=1;
	} else {
		currentTop+=1;
	}
	ContainsList.style.top=currentTop+"px";
	if((currentTop>=10) || (currentTop<=(hieght-10))) {
		clearInterval(vInterval);
		vInterval=null;
	}
}
