
var max_test = 5; // max amount of testimonials -- THIS IS THE ONLY VARIABLE YOU NEED TO EDIT --
var current = 1; // current testimonial
var next = 2; // next testimonial
function change_Testimonials () {
	content_current = document.getElementById("test_"+current); //get current content
	next_up_content = document.getElementById("test_"+next); //get next content
	image_current = document.getElementById("portrait-thumb"+current); //get current image
	image_next = document.getElementById("portrait-thumb"+next); //get next image
	
	
	$(content_current).fadeOut(750, function() { $(next_up_content).fadeIn(750); });  //set content
	$(image_current).fadeOut(750, function() { $(image_next).fadeIn(750); }); //set images
	
	
	if (next == max_test) { next = 1; current = max_test; }//makes sure we don't try to show something we don't have
	else { current = next;	next++;}
}

/*
var active_controls = new Array(4);
var active_content_controls = new Array(4);

var rotating_news_current = 0;
var rotating_news_max = 3;
var bg_counter = 1;
var lock = 0;
function rotating_news(current,locker){
	if(locker == 1){ //Lock Automation for user
		lock = 1;
		setTimeout("lock = 0", 10000);
	}

	if(rotating_news_current != current)
	{
		//Grab the Content
		active = active_controls[current];//document.getElementById('active'+current);
		active_content = active_content_controls[current];//document.getElementById('story'+current);
		var image = active_content.getElementsByTagName("img")[0];

		//Set the Background Picture
		var background = document.getElementById('ctl00_MainContent_bcr_latestNews_news_container_image');
		var background2 = document.getElementById('ctl00_MainContent_bcr_latestNews_news_container_image2');
		
		if(bg_counter == 1){
		
			background2.src = image.src;
			
			$(background).fadeOut("normal");
			
			$(background2).fadeIn("normal");
			bg_counter = 2;
		}else{
			background.src = image.src;
			$(background).fadeIn("normal");
			$(background2).fadeOut("normal");
			bg_counter = 1;
		}

		//Change the Content and active content
		active.style.display="block";
		active_content.style.display="block";
		disable = active_controls[rotating_news_current];//document.getElementById('active'+rotating_news_current);
		disable_content = active_content_controls[rotating_news_current];//document.getElementById('story'+rotating_news_current);
		disable.style.display="none";
		disable_content.style.display="none";
		
		rotating_news_current = current;
	}
}

function rotating_news_automate(){
	if(lock == 0){ //Check Automation Lock
		if((rotating_news_current + 1) > rotating_news_max){
			rotating_news(0,0); //Start Again
		}else{
			rotating_news((rotating_news_current + 1),0);
		}
	}
}

setInterval("rotating_news_automate()", 5000);
*/