var counter = new Array(0,0);

function showQuotes(quoteBox){	
	var c,l;
	if (quoteBox == "c"){
		c = 0;
		var img = $('customersImage');
		var quote = $('customersQuote');
		var att = $('customersAttribution');		
		img.src = c_images[counter[c]];
		var dims = c_dims[counter[c]].split(":");
		img.width = dims[0];
		img.height = dims[1];
		quote.innerHTML = c_quotes[counter[c]];
		att.innerHTML = c_attrib[counter[c]];		
		l = c_quotes.length;
	}else{
		c = 1;	
		var img = $('partnersImage');
		var quote = $('partnersQuote');
		var att = $('partnersAttribution');		
		img.src = p_images[counter[c]];
		var dims = p_dims[counter[c]].split(":");
		img.width = dims[0];
		img.height = dims[1];		
		quote.innerHTML = p_quotes[counter[c]];
		att.innerHTML = p_attrib[counter[c]];		
		l = p_quotes.length;
	}	
	Effect.Appear(img,{duration:0.5});
	Effect.Appear(quote,{duration:0.5});
	Effect.Appear(att,{duration:0.5});
	if (counter[c] < l - 1){
		counter[c]++;
	}else{
		counter[c]= 0;				
	}	
	setTimeout("hideQuotes('" + quoteBox + "')",7000);	
}

function hideQuotes(quoteBox){
	if (quoteBox == "c"){
		var img = $('customersImage');
		var quote = $('customersQuote');
		var att = $('customersAttribution');		
	}else{
		var img = $('partnersImage');
		var quote = $('partnersQuote');
		var att = $('partnersAttribution');	
	}	

	Effect.Fade(img,{duration:0.5});
	Effect.Fade(quote,{duration:0.5});
	Effect.Fade(att,{duration:0.5});	
	
	
	setTimeout("showQuotes('" + quoteBox + "')",750);

}
function init(){
counter[0] = Math.floor(Math.random( ) * (c_quotes.length));
counter[1] = counter[0]; //Math.floor(Math.random( ) * (p_quotes.length));
setTimeout("showQuotes('c')",10); 
setTimeout("showQuotes('p')",950);
}