function fadeIn() {
	var item1 = $('testimonial');
	var item2 = $('testimonialBy');
	item1.fade(1);
	item2.fade(1);
	setTimeout("fadeOut()", 8000);
};

function doSwap() {
	var item1 = $('testimonial');
	var item2 = $('testimonialBy');
	var testimonial= new Array();
	var testimonialBy= new Array();
	testimonial[0] = "&quot;I was delighted with the advice given, and the service provided. Thank you.&quot;";
	testimonialBy[0] = "Mr Allsopp, Salisbury.";
	testimonial[1] = "&quot;The service provided couldn't have been bettered. I would have no hesitation in using Battens again.&quot;";
	testimonialBy[1] = "Mrs Clayton, Yeovil.";
	testimonial[2] = "&quot;The service we received was excellent, I would personally like to thank our solicitor for her work and patience. Many thanks.&quot;";
	testimonialBy[2] = "Mr Larkins &amp; Miss Swan, Dorchester.";
	testimonial[3] = "&quot;An excellently, proactive approach, very refreshing.&quot;";
	testimonialBy[3] = "Mr &amp; Mrs Sherwin, Shaftsbury.";
	testimonial[4] = "&quot;Your common sense approach was extremely valuable.&quot;";
	testimonialBy[4] = "Donna Bowman, Absolute Cooling Ltd.";

	a = Math.floor(Math.random() * testimonial.length);
	while (item1.innerHTML == testimonial[a]);
	{
	    a = Math.floor(Math.random() * testimonial.length);
	}
	item1.innerHTML = testimonial[a];
	item2.innerHTML = testimonialBy[a];
	setTimeout("fadeIn()", 500);
};

function fadeOut() {
	var item1 = $('testimonial');
	var item2 = $('testimonialBy');
	item1.fade(0);
	item2.fade(0);
	setTimeout("doSwap()", 500)
};

function startSwap() {
    setTimeout("fadeOut()", 8000);
};

window.addEvent('domready', function() {startSwap()});