var spotlightId = 0;
var spotlightTags = [];
function spotlight() {
	var spotlightImage = document.getElementById('spotlightImage');
	if (!spotlightImage) {
		document.write('<div id="spotlightImage"></div>');
	}
	var div = document.getElementById('spotlightImage');
	if (!spotlightTags[spotlightId]) {
		spotlightId = 0;
	}
	if (div.hasChildNodes()) {
		while (div.childNodes.length >= 1) {
			div.removeChild(div.firstChild);
		}
	}
	div.appendChild(spotlightTags[spotlightId++]);
	setTimeout("spotlight()",5000);
}
function startSpotlight(list) {
	var len = list.length;
	for (var i = 0; i < len; i++) {
		var image = new Image();
		image.src=list[i]['Image'];
		image.alt=list[i]['Name'];
		image.border=0;

		var link = document.createElement('a');
		link.setAttribute('href', list[i]['URL']);
		link.setAttribute('title', list[i]['Name']);
		link.appendChild(image);

		var desc = document.createElement('div');
		desc.setAttribute('class', 'spotlightDescription');
		desc.innerHTML = list[i]['Description'];

		spotlightTags[i] = document.createElement('div');
		spotlightTags[i].appendChild(link);
		spotlightTags[i].appendChild(desc);
	}
	spotlight();
}
