  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>Testimonials</b> <br />Some of the comments we have recently received. 'A stunning transformation of a unique store. Many thanks to the team at Cordery Build on a job well done!' 'Another great job from the team at Cordery Build.'.").write();

newsArray[0] = new makeNews("<b>Recent works</b> <br />Recently works have been carried out in Manchester, Liverpool, London, Birmingham, Brighton, Monmouth and Falmouth. We are a truly national company!").write();

newsArray[1] = new makeNews("<b>Evans Cycle</b> <br />Evans Cycles store in Manchester Chill Factor has recently been extended and completely refurbished in a two phase project that enabled the client to continue trading. The store is now a whopping 8,000 sq. ft.").write();

newsArray[2] = new makeNews("<b>Costa refurbishments</b> <br />We have completed many refurbishments for Costa Coffee recently. One particular refurbishment in Central London included a complete strip out and re-fit including floor tiling, a new bespoke sales counter, decorations and lighting. All this with only a THREE day closure.").write();

newsArray[3] = new makeNews("<b>Joinery workshop</b> <br />The mezzanine floor in our Devon workshop has been extended by over 1,000 sq ft giving us much needed extra bench and storage space.").write();

newsArray[4] = new makeNews("<b>Grand Prix Legends</b> <br />We have completed the fit out of Grand Prix Legends first shop in Central London. The joinery was all manufactured at our workshop in Devon!").write();

newsArray[5] = new makeNews("<b>Employee of the Month</b> <br />This month it goes to Matt Bishop in the workshop spray booth.").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);
	}
}
