var clientCount = 3;
var clientTimeout = 0;
var clientIndex = 0;
var clientDelay = 6;			// (seconds)
var clientTransitionTime = 1;		// (seconds)


clientDelay = clientDelay * 1000;	//(make milliseconds)

function initClients() {
	for (var i=1;i<=clientCount;i++) {
		targ = 'client'+i;
		new Effect.Opacity(targ, { from: 0.0, to: 0.0, duration: 0.0	});
	}
}

function clientsTrigger() {
	targ1 = clientIndex;
	
	clientIndex++;
	if (clientIndex > clientCount) {	clientIndex = 1;	}
	targ2 = 'client'+clientIndex;
	
	if (targ1) {
		get('client'+targ1).style.zindex = 1000;
		new Effect.Opacity('client'+targ1, { from: 1.0, to: 0.0, duration: transitionTime, afterFinish: function() {	get('client'+targ1).style.top = -300;	}	});
	}
	
	get(targ2).style.top = '0px';
	get(targ2).style.zindex = 2000;
	new Effect.Opacity(targ2, { from: 0.0, to: 1.0, duration: clientTransitionTime});
	
	clearTimeout(clientTimeout);
	clientTimeout = setTimeout(clientsTrigger,clientDelay);
}