// include this line in the html head (adjust path as required):
//    <script type="text/JavaScript" src="../js/testimonial.js"></script>

// add this to the body tag:
//     onload="javascript:UpdateTestimonial();"

// make sure there is an empty element in the page with the following attributes:
//     id="testimonialBox"

// add new testimonials in the list below
/*
	// text is the actual quote.  Do not include quotation characters.
	// user is who the quote will be attibuted to.  Include <br> if appropriate.
	
	// copy this, paste it below and then update the fields
	,
	{
		text: "",
		user: ""
	}
*/


// limit to a maximum of 60 testimonial entries - see comment in UpdateTestimonial()
var gTestimonials = 
[
/*
*/
	{
		text: "One of the region's best secrets, hidden in the heart of the most populous state in the country.",
		user: "THE NEW YORK TIMES"
	},
		{
		text: "A hundred years later, this garden stands as an oasis for all.",
		user: "THE NEW YORK TIMES"
	},
	{
		text: "A 28-acre oasis...the only views are tree-covered mountains, and the only sounds are birds singing.",
		user: "THE NEW YORK TIMES"
	},
		{
		text: "Greenwood &#8211; a jewel in the moss.",
		user: "THE NEW YORK TIMES"
	},
	{
		text: "When you enter Greenwood's iron gates, you step across the threshold of time into a once and future world where nature and nurture rule together.",
		user: "THE STAR LEDGER"
	},
		{
		text: "Greenwood is a serene oasis in an urbanized modern world.",
		user: "THE STAR LEDGER"
	},
	{
		text: "Here, a bit of the past &#8211; New Jersey's past &#8211; lives on, serenely oblivious to the hurly-burly of passing years.",
		user: "THE STAR LEDGER"
	}
	
	// the last item in this list must NOT have a comma after it, otherwise 
	// IE will report an incorrect list length.
];


function UpdateTestimonial()
{
	var kTestimonialCnt = gTestimonials.length;
	// this will only work with up to 60 testimonials
	var kTestimonialIdx = new Date().getSeconds() % kTestimonialCnt;
	
	var testimonialDiv = document.getElementById("testimonialBox");
	var str = "<div class=\"quote\">&quot;" + gTestimonials[kTestimonialIdx].text + "&quot;</div><div class=\"attribution\">" + 
		gTestimonials[kTestimonialIdx].user + "</div>";
	testimonialDiv.innerHTML = str;

	return true;
}







