var prevClientList = ['Allied Concrete','Fletcher Steel','Holcim New Zealand','Window Association of New Zealand','Alliance Recoveries','Baycorp','Carter Holt Harvey','PGG Wrightsons','Canon NZ','Avanti Finance','Bank of New Zealand','Broadlands Finance','Credit Union Auckland','New Zealand Association of Credit Unions','DaimlerChrysler Finance','Fisher & Paykel Finance','Farmers Mutual Group Finance','GMAC','Motor Trade Finances','ANZ National Bank','Pacific Retail Finance','PSIS','Senate Finance','Speirs Finance','UDC Finance','Westernbay Finance','Westforce Credit Union','Allied Liquor','Lion Nathan','ACC','Department for Courts','Environment Waikato','Housing New Zealand Corporation', 'Inland Revenue Department','Work & Income New Zealand','Legal Services Agency','New Zealand Post','AMI Insurance','Farmers Mutual Insurance','IAG','Air Liquide', 'Contact Energy','Meridian Energy','Mighty River Power','Powerco','Trustpower','Transalta','Vodafone NZ','Degussa Construction','Hunter Douglas Limited','Commonwealth Bank of Australia','RAMS','St George Bank','Carlton United Breweries','Shell','Centrelink','QLD Housing','Austral Wright Metals','Charles Parsons','AWB','Toll Priority','Integral Energy','Telstra','Capricorn Society'];
var curClientIndex = 0;

(function () {                                                                 
    var swapper =                                                               
        function (a,L,e) {                                                     
            var r = Math.floor(Math.random()*L);                               
            var x = a[e];                                                       
            a[e] = a[r];                                                       
            a[r] = x;                                                           
        };                                                                     
    Array.prototype.shuffle =                                                   
        function () {                                                           
            var i,L;                                                           
            i = L = this.length;                                               
            while (i--) swapper(this,L,i);                                     
        };                                                                     
})();

prevClientList.shuffle();

function nextClient() {
	Effect.Fade('prevclients',{afterFinish:function() {changeClientTo(prevClientList[curClientIndex++])}});
	if (curClientIndex>=prevClientList.length) {	
		curClientIndex = 0;	
	}
	window.setTimeout('nextClient()',7000);
}

function changeClientTo(changeto) {
	$('prevclients').innerHTML = changeto;
	Effect.Appear('prevclients');
}

nextClient();