// Everything below	here will be moved to an include...
var speed	= 25;	// milliseconds
var delim	= '&nbsp;&nbsp;';
var headlineWidth = 0;

function SI_ticker() {
	// Make sure the browser is capable of running the code below
	var d = document;
	if (!d.getElementById || !d.body.offsetWidth) return;

	// This is the first time through so we construct our string then we
	// need to determine its rendered width so we drop it into a <nobr>
	// (which would cause a horizontal scrollbar if we left it in there).
	// Once we grab the offsetWidth we can empty the <nobr> and add our
	// string to the <div id="headlines"> twice to leave us some leeway
	// to loop.
	if (headlineWidth==0) {
		var str = '<em>Top News Stories:<'+'/em>'+delim+delim+delim+delim;
		for (var i=0; i<SI_news.length; i++) {
			var h = SI_news[i];
			if (h[1] != '') {
				str += ' <a href="'+h[1]+'">'+h[0]+'<'+'/a>'+delim+'<span>'+h[2]+'<'+'/span>'+delim+delim+delim+delim+'\n';
				}
			else {
				str += ' <strong>'+h[0]+'<'+'/strong>'+delim+'<span>'+h[2]+'<'+'/span>'+delim+delim+delim+delim+'\n';
				}
			}
		tmpH = d.getElementById('headlines');
		tmpH.innerHTML	= str;
		headlineWidth	= tmpH.offsetWidth;
		
		tmpH.innerHTML += str;
		tmpH.style.left = ((headlineWidth-200)*-1)+'px';
		}
	
	// Reference to it's left position property...
	var h = d.getElementById('headlines');
	
	if (parseInt(h.style.left) >= headlineWidth*(-1)) {
		h.style.left = (parseInt(h.style.left)-1)+'px';
		}
	else { 
		h.style.left = 0;
		}
	
	// Start looping...
	setTimeout("SI_ticker()",speed);
	}