
var theNews = "";
var newsfeedCounter = 0;

function startFeedingNews ()
	{
	theNews = window.frames.newsfeedsFrame.document.body.innerText;
	if (theNews.indexOf("Sponsored Link") > -1)
		theNews = theNews.substr(theNews.indexOf("Sponsored Link") + 14);

	while (theNews.indexOf("Reuters.com") > -1)
		theNews = theNews.replace("Reuters\.com", "");

	theNews = theNews.replace("Get these headlines on your site", "");
	theNews = theNews.replace(/[\x9\x20]2/g, " ");
	theNews += theNews;
	setInterval("showNewsfeed()", 100);
	}

function showNewsfeed ()
	{
	document.all.newsfeed.innerHTML = theNews.substr(newsfeedCounter++);
	if (newsfeedCounter >= theNews.length / 2)
		newsfeedCounter = 0;
	}

function insertNewsfeedAreaHere ()
	{
    	document.write('<div class="newsfeed" id="newsfeed" nowrap></div>');
//	document.write('<iframe class="newsfeed" id="newsfeed" scrolling="no"nowrap src="http://news.bbc.co.uk/nol/ifs_news/hi/front_page/ticker.stm"></iframe>');
	}

// DIRECT CODE:

document.write('<iframe id="newsfeedsFrame" style="display:none;" src="newsfeed.htm"></iframe>');


