
function makeNews(clientName,quote,quotee,quoteePosition){
	this.clientName = clientName;
	this.quote = quote;
	this.quotee = quotee;
	this.quoteePosition = quoteePosition;
	this.write = writeNews;
}

function writeNews(){
	var str = '';
	str += '<h4>' + this.clientName + '</h4>';
	str += '<p class="quoted">' + this.quote + '</p>';
	str += '<p><strong>' + this.quotee + '</strong><br />';
	str += '<em>' + this.quoteePosition + '</em></p>';
	return str;
}

var newsArray = new Array();
newsArray[0] = new makeNews('Vodafone Australia','TRS provided an all-round and all-national service through a multitude of transactions and contruction projects - they know how to deliver and save beyond expectations.','Blair Foots','Head of Facilities').write();
newsArray[1] = new makeNews('Ninemsn','Tenant Representation Services showed that their expertise is powerful and knowledgeable generating a combined negotiating and reporting process service that produces top of the market savings.','Fiona Montgomery','CFO').write();
newsArray[2] = new makeNews('Abbott Tout','Throughout the project the team, led by Mark McGrath, applied a logical and documented staged service that successfully delivered high-end results for the business.','Peter Noble','Managing Partner').write();
newsArray[3] = new makeNews('Audrey Page',"Overall, I felt a huge level of confidence in the team's knowledge and commercial acumen and nothing was too much trouble.",'Greg Smith','Client Relationship Manager').write();
newsArray[4] = new makeNews('Pitcher Partners','Excellent work! We enjoyed working with TRS who sought to exceed our objectives through the transaction and construction processes. They provided savings and protected our position at each stage of the project.','Deborah Cartwright','Partner').write();
newsArray[5] = new makeNews('Stewarts','We were very happy with the service provided by Tenant Representation Services who saved us valuable time and money. They performance was exceptional and they were always available at our request. We would have no hesitation in recommending their services to anyone.','Paul Pryce','Director').write();


var nIndex = 0;
var timerID = null;
function rotateNews(){
	var len = newsArray.length;
	if(nIndex >= len)
		nIndex = 0;
	document.getElementById('support-item').innerHTML = newsArray[nIndex];
	nIndex++;
	timerID = setTimeout('rotateNews()',6000);
}
function pauseNews() {
	if (timerID != null) {
		clearTimeout(timerID);
		timerID = null;
	}
}

function playNews() {
	if (timerID == null) {
		timerID = setTimeout('rotateNews()', 1000);
	}
}

/* ------------------------------------- 

function showClients(clientGroup) {
	var groupClass = 'show-clients-' + clientGroup;
	document.getElementById("extras").className = groupClass;
}

 ------------------------------------- */

function showExtra(yesno) {
	if (yesno == 'yes')	{
		document.getElementById("expand").style.display = 'none';
		document.getElementById("collapse").style.display = 'block';
		document.getElementById("extra").style.display = 'block';
	}
	else if (yesno == 'no')	{
		document.getElementById("expand").style.display = 'block';
		document.getElementById("collapse").style.display = 'none';
		document.getElementById("extra").style.display = 'none';
	}
}