// include this line in the html head (adjust path as required):
//    <script language="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:
//     name="testimonialBox" 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.
	// img is for an optional corporate img.  Leave as "" if there is none.
	
	// copy this, paste it below and then update the fields
	,
	{
		text: "",
		user: "",
		img: ""
	}
*/


// limit to a maximum of 60 testimonial entries - see comment in UpdateTestimonial()
var gTestimonials = 
[
/*
			*/
	{
		text: "Thank you for writing C-Free. I've been coding in C-Free since 1.0 and C-Free has been the single most useful MinGW tool I've ever used.",
		user: "Michael Davidov, U.K.",

		img: "../images/dot.gif"
	},
	{
		text: "i'd like to say that i really enjoy using your C-Free IDE, it's just great, small, beautiful and quite powerful.",
		user: "Maria Mart¨ªnez Moreno, Mexico",
		img: "../images/dot.gif"
	},
	{
		text: "Oh, it is a wonderful tool for the MinGW user I think, I use it both at work and at home.",
		user: "Stephen Liu, Handsome Electronics Co.,Ltd, China",
		img: "../images/dot.gif"
	},
	{
		text: "Being only 17, I'm begging my Dad for his credit card so I can register this sharp piece of coding equipment!",
		user: "Tim Robbins, United States",
		img: "../images/dot.gif"
	},
	{
		text: "the Intelligence Input is cool, I love it, which boosts my writing speed. I don't know how I ever managed without it!",
		user: "Gackt Camui, Japan",
		img: "../images/dot.gif"
	},
	{
		text: "Hi, I am a fan of SoftIntegration Ch, and was very pleased by how integrated ch of your IDE was, and the fact that it could work so well with Ch. Keep up the good work!",
		user: "Martin Smith, UK",
		img: "../images/dot.gif"
	},
	{
		text: "Thank you very much for delivering this nice tool. Although I had some troubles during download, probably because of my hardware, I am gladly looking forward to a great future using the C-Free. You are doing the right thing.",
		user: "Felix, Germany",
		img: "../images/dot.gif"
	},
	{
		text: "Just to send you congratulations for this environment tool. It is really great and it works perfect. I use it in my daily work at the University. Thank you so much!",
		user: "Alejandro J. Melc¨®n, Portugal",
		img: "../images/dot.gif"
	},
	{
		text: "I've downloaded C-Free 3.5 from tucows.com, and I'm blown away. The product is first class in design, simplicity, and intuitive use. I do a compare with dev-c++, the debugging utility design in your product is superior to dev-c++. Go on like that!",
		user: "Heather M. Jackson, Australia",
		img: "../images/dot.gif"
	},
	{
		text: "thank you very much for your prompt and kind response!...you have done a perfect integration with MinGW package...Once again, thank you for an excellent product and support!",
		user: "Bryan R., Canada",
		img: "../images/dot.gif"
	},
	{
		text: "I have been able to successfully develop both dialogue panel based and window based applications with the minimum of trouble. The author was always willing to discuss by email any technical problems I had in a very friendly way.",
		user: "Martin Davies, U.K.",
		img: "../images/dot.gif"
	},
	{
		text: "From a long time i was looking for an IDE that could provide the functionalities i wish to be in a single environment but i couldn't. Recently i come across \"CFree\"; Now i can say i got it, what i was looking for. This effort is really appreciative, great work.",
		user: "Qaisar Farooq, Pakistan",
		img: "../images/dot.gif"
	}
];


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 = "<font face='Verdana' size=1>&quot;" + gTestimonials[kTestimonialIdx].text + "&quot;<br><br>" + 
		gTestimonials[kTestimonialIdx].user;
	if (gTestimonials[kTestimonialIdx].img != "")
	{
		var imgStr;
		imgStr = "<br><br><img src=\"" + gTestimonials[kTestimonialIdx].img + "\">";
		str += imgStr;
	}
	str+= "<A href=\"testimonials.htm\">read more&gt;&gt;</A></font>";

	testimonialDiv.innerHTML = str;

	return true;
}
