  function makeNews(c,l,f,i){
	this.copy = c;
	this.write = writeNews;
}

function writeNews(){
	var str = '';
	str += this.copy + '<br>';
	return str;
}

var newsArray = new Array();

newsArray[0] = new makeNews("<b>International Projects</b> <br />Over the past few months we have completed 3 new Costa Coffee counter installations in Faro Airport, Portugal. One of our shopfitting teams flew to Faro for a week for each installation and worked with local plumbers and electricians to complete the work. We have also supplied and installed projects in Boston, USA, for Hotel Chocolat.").write();

newsArray[1] = new makeNews("<b>Evans Cycle Shop Fit Outs</b> <br />We have recently handed over Evans Cycles largest store just off Oxford Street in London 10,000 sq feet with ongoing nationwide projects currently on site. The joinery for the project was manufactured at our workshop in Devon. The project was featured in Retail Weekly as well as many cycling magazines.").write();

newsArray[2] = new makeNews("<b>Costa Coffee Refurbishments</b> <br />We are currently half way through a refurbishment programme for Costa Coffee. Most stores close for only 2 or 3 days, however we completed one store refurbishment in Kent with only a half day closure. This refurbishment included the installation of a new counter and backbar as well as a full redecoration, new flooring and numerous other works.").write();

newsArray[3] = new makeNews("<b>Costa Coffee Contractor of the year</b> <br />The second time we have been awarded the 'Costa Coffee Contractor of the Year' award on the basis of handing over many projects for our client with no snags. This award takes pride of place in our reception and is a well deserved reward for the hard work and dedication of our Contract Managers, fixers and sub-contractors.").write();

var nIndex = 0;
var timerID = null;
function rotateNews(){
	var len = newsArray.length;
	if(nIndex >= len)
		nIndex = 0;
	document.getElementById('stories').innerHTML = newsArray[nIndex];
	nIndex++;
	timerID = setTimeout('rotateNews()',12000);
}
function pauseNews() {
	if (timerID != null) {
		clearTimeout(timerID);
		timerID = null;
	}
}

function playNews() {
	if (timerID == null) {
		timerID = setTimeout('rotateNews()', 10000);
	}
}

