//pre-load images


function makeNews(w,l,f,i){
	this.copy = w;
	this.link = l;
	this.follow = f;
	this.img = i;
	this.write = writeNews;
}

function writeNews(){
	var str = '';
	   str +=  '<a href="' + this.link + '">' + this.follow + '</a><br>';
//	   str += '<a href="' + this.link + '">';
//	str += '<img border="0" src="' + this.img.src + '"></a><br>';
	str += this.copy + '<br>';
     
	return str;
}
  var prNewsArray = new Array();

var prNIndex = 0;
var timerID = null;
function prRotateNews(){
	var prlen = prNewsArray.length;
	if(prNIndex >= prlen)
		prNIndex = 0;
	document.getElementById('stories').innerHTML = prNewsArray[prNIndex];
	prNIndex++;
	timerID = setTimeout('prRotateNews()',3500);
}
function pauseNews() {
	if (timerID != null) {
		clearTimeout(timerID);
		timerID = null;
	}
}

function playNews() {
	if (timerID == null) {
		timerID = setTimeout('prRotateNews()', 1000);
	}
}
// moved the window.onload action (below) to sitehomepage.js to avoid conflict with top nav
// window.onload=prRotateNews;