// JavaScript Document

//Scroll it baby

var i = 0;
function ScrollEffect(id) {
	
	$(id).style.cursor = 'pointer';
	var height2 = Element.getHeight('scroll-wrap');
	var myInterval = setInterval(scrollit, 30);
	//var scroller = $(id);
	
	//Create Element
	var c1 = document.createElement('div');
	c1.setAttribute('id','c1');
	c1.innerHTML = $(id).innerHTML;
	$(id).appendChild(c1);

	$(id).onmouseover = function() {
		clearInterval(myInterval);
	}
	
	$(id).onmouseout = function() {
		myInterval = setInterval(scrollit, 30);
	}
	
	function scrollit() {
		var scrollHeight = Element.getHeight(id);
		//alert(scrollHeight);
		i--;
		$(id).style.margin = i + "px 0 0 0";
		if (-i == (parseInt(scrollHeight/2))) {
			i = 0;
		}
	}
}