function makeSpotlights(c,l,f,i){
	this.copy = c;
	this.link = l;
	this.author = f;
	this.img = i;
	this.write = writeSpotlights;
}

function writeSpotlights(){
	var str = '';
	str += '<a href="' + this.link + '">';
	str += '<img border="0" src="' + this.img + '"></a><br>';
	str += '<a href="' + this.link + '">' + this.copy + '</a><br>';
    str +=  '<span>' + this.author + '</span>';
	return str;
}

var nIndex = 0;
var timerID = null;
function rotateSpotlights(){
	var len = spotsArray.length;
	if(nIndex >= len)
		nIndex = 0;
	document.getElementById('SpotlightView').innerHTML = spotsArray[nIndex];
	nIndex++;
	timerID = setTimeout('rotateSpotlights()',6000);
}
function pauseSpotlights() {
	if (timerID != null) {
		clearTimeout(timerID);
		timerID = null;
	}
}

function playSpotlights() {
	if (timerID == null) {
		timerID = setTimeout('rotateSpotlights()', 1000);
	}
}
