// JavaScript Document
//to add a new testimonal copy the bottom one, change the number to the next in the line and 
//then update your values
var testimonial_array = new Array();
testimonial_array[0] = new Array("Marc","Furniture25.com","OuterBox has been the best eCommerce website developer for us. They developed our latest site, furniture25.com, and we can only praise them for their professional, timely, and cost-effective ways. They are to be commended.");
testimonial_array[1] = new Array("","Heat4Less","I've worked with OuterBox on the development of 3 websites and have experienced excellent service and awesome results from each. OuterBox performed search engine optimization on our latest site and we've seen great search engine rankings in all of the major search engines. I love working with your company.");
testimonial_array[2] = new Array("Chuck Huseman","FFC Fencing","Our website looks fantastic! We were apprehensive about working with an out of town company on this type of project, but you were easy to work with and understood exactly what we wanted. We appreciate how quickly you replied to our many phone calls and emails. The site was completed quickly and within our budget. Great job!");
testimonial_array[3] = new Array("Tom Spence","Goodwin House","OuterBox has been enormously helpful both in helping us to save money, and in helping us make money.  In our first month of operations some guests found us on-line!");
testimonial_array[4] = new Array("","AngelMins","I just want to thank you for all the websites and programming you've done for us so far. OuterBox has built three sites for us, and we now working on a fourth project! Your detail, design, programming and upgrades are impeccable. I am extremely pleased and would recommend you to everyone.");

testimonial_array[5] = new Array("Roy Argall","Heros Journey Coaching","OuterBox is way, way, way past unbelievably amazing! If you don’t believe this, tell them to give you my phone number and call me!");

testimonial_array[6] = new Array("Allan Johnson","Chima Travel Inc.","I was very impressed by OuterBox's professionalism. Their attention to details and their ability to understand our business, and develop a site that world portray our business, was outstanding. I will recommend OuterBox to anyone interested in a custom designed website.");

testimonial_array[7] = new Array("Eric Martin","President of Ultimate Sack","OuterBox recently redesigned our eCommerce website, keeping us up-to-date with the quickly changing world of eCommerce. They implemented the latest eCommerce features, updated our look, and sales are way up with our new site! We know we can trust them to provide great service and a website that is reliable and attractive. We are always getting compliments on the site!");


//do not touch below this line
var lastid = "";
var lastdiv = "";
var fadediv = "";

window.addEvent('domready',function(){	
	$('div1').setStyles({
		opacity: '0'
	});
	$('div2').setStyles({
			opacity: '0'
	});
	//set first one
	show_testimonial();
});

function show_testimonial(){

var idshow = getid();
var testimonial_hold = '<span class="OrangeBoldQuote">&quot;</span><br>' + testimonial_array[idshow][2] ;
testimonial_hold = testimonial_hold + '<span class="OrangeBoldQuote"> &quot;</span><br>';
testimonial_hold = testimonial_hold + '<br><span class="White11text"> ' + testimonial_array[idshow][0];
testimonial_hold = testimonial_hold+ ' - ' + testimonial_array[idshow][1] + '</span> <br><br>';

if (lastdiv == "div1"){
	lastdiv = "div2";
	fadediv = "div1";
}else{
	lastdiv = "div1";
	fadediv = "div2";
}

	$(lastdiv).set('html',testimonial_hold);

	var size_old = $('test_spacer').getSize();
	var thesize = $(lastdiv).getSize();

	var myEffect = new Fx.Morph('test_spacer', {duration: 'long', transition: Fx.Transitions.Sine.easeOut});
		myEffect.start({
		'height': [size_old.y, thesize.y] //Morphs the 'height' style from 10px to 100px.
	});
	$(lastdiv).fade('in');
	$(fadediv).fade('out');

}

function getid(){
	var idhold = $random(0, testimonial_array.length - 1);
	if (idhold == lastid){
		idhold = getid();
	}
	lastid = idhold;
	return lastid;
}
