window.onload = function()	{
	// activate_news_expanders();
	// repaint_spotlights();
	activate_spotlights();
	// activate_answer_scroller();
	activate_feed_dump_viewer();
}


function activate_answer_scroller()	{
	pa = $('previous_answers');
	// alert(pa.scrollHeight + '/' +  pa.offsetHeight)
	var scroll_duration = parseInt(pa.scrollHeight / pa.offsetHeight);
	scroll_duration = 1500;
	// alert(scroll_duration);
	pa.slide_fx = new Fx.Styles(pa.firstChild, {duration: scroll_duration, transition: Fx.Transitions.backOut});
	pa.firstChild.style.position = 'relative';
	pa.firstChild.style.top = '0';
	pa.style.overflow = 'hidden';
	
	var down_control = document.createElement('div');
	down_control.style.textAlign = 'center';
	down_control.style.cursor = 'pointer';
	down_control.innerHTML = 'older';
	down_control.style.margin = 0;
	down_control.style.border = '1px outset';
	down_control.onmousedown = function()	{
		this.previousSibling.slide_fx.custom({
			'top' : [
			parseInt(this.previousSibling.firstChild.style.top.substring(0, this.previousSibling.firstChild.style.top.length - 2)),
			-1 * this.previousSibling.firstChild.offsetHeight + this.previousSibling.offsetHeight - 10]	
		})	
	}
	down_control.onmouseup = function()	{
		this.previousSibling.slide_fx.clearTimer();
	}

	var up_control = document.createElement('div');
	up_control.style.textAlign = 'center';
	up_control.style.cursor = 'pointer';
	up_control.innerHTML = 'newer';
	up_control.style.margin = 0;
	up_control.style.border = '1px outset';
	up_control.onmousedown = function()	{
		this.nextSibling.slide_fx.custom({
			'top' : [
			parseInt(this.nextSibling.firstChild.style.top.substring(0, this.nextSibling.firstChild.style.top.length - 2)),
			0]	
		})	
	}
	up_control.onmouseup = function()	{
		this.nextSibling.slide_fx.clearTimer();
	}
		
	pa.parentNode.insertBefore(up_control, pa);
	pa.parentNode.insertBefore(down_control, pa.nextSibling);	
}