//customised addEvent function for having a proper onload function call.
function addEvent(obj, evType, fn){ 
 if (obj.addEventListener){ 
   obj.addEventListener(evType, fn, false); 
   return true; 
 } else if (obj.attachEvent){ 
   var r = obj.attachEvent("on"+evType, fn); 
   return r; 
 } else { 
   return false; 
 } 
}

addEvent(window, 'load', initPage); // kick start the initPage function when the page loads

var stopScroll = 0;
var x;
var boxHeight;
var repeatHeight;

function initPage()
{
	boxHeight = $('highlights').style.height.replace('px','');
	repeatHeight = $('highlights').scrollHeight; //get the current height so we know when to wrap
	$('highlights').innerHTML = $('highlights').innerHTML + $('highlights').innerHTML;  //add a second copy so we can scroll down to the wrap point
	x = setTimeout("scrollMe()", 100);
	// start scrolling after one second
}

function scrollMe() {
		clearTimeout(x)
		if(stopScroll==1) {
			return
		}
		$('highlights').scrollTop=$('highlights').scrollTop+1
		if($('highlights').scrollTop <= repeatHeight) {
			// keep on scrolin' 
			document.getElementById("blah").innerHTML = $('highlights').scrollTop + " : " + repeatHeight;
			x = setTimeout("scrollMe()",40)
		}
		else  { //we have hit the wrap point
			
			$('highlights').scrollTop=0
			x = setTimeout("scrollMe()",40)
		}
}

/*
jQuery.noConflict(); 

jQuery(document).ready(function() 
{
	jQuery('.jobsTicker').jCarouselLite ({
			vertical: true,
			auto: 3000,
			speed: 600,
			visible: 4,
    });
	jQuery('.goodNewsTicker').jCarouselLite ({
			vertical: true,
			auto: 3000,
			speed: 600,
			visible: 4,
    });

	// Assign Zebra Cols to News Headlines
	var i = 0;
	jQuery(".formRowWrapper").each( function(i){
		i % 2 == 0 ? jQuery(this).addClass("zebra_row_0") : jQuery(this).addClass("zebra_row_1");
		i++;
	});

	// Assign Zebra Cols to News Headlines
	x = 0;
	jQuery(".formRowWrapper2").each( function(i){
		
		x % 2 == 0 ? jQuery(this).addClass("zebra_row_0") : jQuery(this).addClass("zebra_row_1");
		x++;
	});


});*/


