// JavaScript Document
function rotater(num) {
    getTestimonial(num);
	if (num==5) {
		num=1;
	} else {
		num++;
	}
    setTimeout("rotater("+num+")",25000);
}
rotater(1);

function getTestimonial(num) {
	var param = "num=" + num;
	$.ajax({   
		type: "GET",   
		url: "http://www.electricchoice.com/docs/testimonials.php",   
		data: param,   
		dataType: "text/html",   
		success: function(html){ 
			$("#testimonialBox").html(html);  			
		}
	});
}

//example for Johnny
function getPlansDetails(provider_id) {
	//this will put a waiting image while the data loads
	var image = '<img src="images/waiting.gif" />';
	$("#stats1").html(image);
	
	var param = "provider_id=" + provider_id;
	$.ajax({   
		type: "GET",   
		url: "inc/stats_getPlansDetails.php",   
		data: param,   
		dataType: "text/html",   
		success: function(html){ 
			//stats1 is the name of the div where the information will be placed
			$("#stats1").html(html);  
		}
	});
}
