/*
	This script randomly shows a "Testimonials" item.
	
	Author:  Brian Laguans
	Email:  brian.lagunas@wgint.com
*/

// declare an array to hold the div that contains the content
var content = new Array();
// declare a variable to use for our loop
var x = 0;

// assign values to the content array.  indexing starts at zero(0).  To add another "Testimonials" item
// just copy the last content index line of code and increment the index number by 1.  Then
// type in the ID of the div into the getElementById function.
content[0] = document.getElementById("noe");
content[1] = document.getElementById("rudy");
content[2] = document.getElementById("kang");
content[3] = document.getElementById("anita");
content[4] = document.getElementById("charles");

// generate a random number between zero(0) and the length of the content array.
var randomNum = Math.round(Math.random() * (content.length - 1));

// start looping through each "Testimonials" item in the array
for (x = 0; x < content.length; x++)
{	
	// if the current index, represented by the variable x, equals the random number
	// the show the content
	if (x == randomNum)
	{
		content[x].style.display = "block";
	}
	// otherwise hide it
	else
	{
		content[x].style.display = "none";
	}
}