/**** IMAGES SCROLLER - REQUIRES MOOTOOLS.JS & ONLOAD.JS ***/
var scroll;
addLoadEvent(function() { 
	if (document.getElementById("hotTopics") && document.getElementById("hotTopics").getElementsByTagName("li").length > 4){
		scroll = new Fx.Scroll('hotTopics', {
			wait: false,
			wheelStops: false,
			duration: 10000,
			offset: {'x': 0, 'y': 0},
			onComplete: cycleScrollingImages
		});
		var secondChild = document.getElementById("hotTopics").getElementsByTagName("li")[1];
		secondChild.id = getRandomID();
		scroll.toElement(secondChild.id);
	}
}); 
function cycleScrollingImages() {
	var Gallery,
		li,
		secondChild,
		firstChild;
	Gallery = document.getElementById("hotTopics");
	firstChild = Gallery.getElementsByTagName("li")[0];
	// Step one: create new child of the list
	li = document.createElement('li');
	Gallery.getElementsByTagName("ul")[0].appendChild(li);
	// Step two: copy contents of the first child to the new child
	li.innerHTML = firstChild.innerHTML;
	// Step three: remove firstChild
	Gallery.getElementsByTagName("li")[0].parentNode.removeChild(firstChild);
	// Step four: reset the scroll value
	Gallery.scrollLeft = 0;
	// Step six: Now Scroll to the second element in the list
	secondChild = Gallery.getElementsByTagName("li")[1];
	secondChild.id = getRandomID();
	scroll.toElement(secondChild.id);
	firstChild = null;
}	
function getRandomID() { // Generate a random ID and return it
	var randId = "A" + Math.floor((Math.random() * 1000000) + 1);	
	return randId;	
}
/*******/