// The word-rating from the user (Excellent, Good Ok, Bad, Awful)
// Replace this with the text copied from the template
ratings = ['Excellent','Excellent','Excellent','Excellent','Excellent','Excellent','Excellent','Excellent','Excellent','Excellent','Excellent','Excellent'];

// The customer's comments
// Replace this with the text copied from the template
comments = ["The sales rep was extremely helpful in getting it to the wharehouse so it could be shipped that day and save me money. Thank you.","This was my first purchase from this store, however, it definitely will not be my last.  We had searched the intern and local stores for turf football cleats.  Hit, Run, Score had them and at a decent price.  I was away from home, so didn't feel comfortable placing order online.  I called them, got a friendly customer service representative, and placed the order.  It was Wednesday, she told me that they would be delivered on Friday.  I was a little skeptic, but sure enough there they were on our doorstep on Friday.","Customer service was excellent They gave me the info that i needed The glove i origanally wanted was out of stock So the gal at customer service recomended another type of  infielders glove that was a little more in price but the glove was great. I needed a glove for my grandson that i had promised him right away and you guys delivered. My son who played collegite baseball said that glove was an exellent choice Thank you so much","I just want to say that I placed this order Tuesday, 9/8, after the Labor Day holiday - for 12 goalie jerseys - AND I GOT THEM YESTERDAY!!!  That would be 9/9!!  Talk about turn around time! That was AMAZING and I just wanted to say Thank you VERY much and let you know that I was VERY impressed that the order was processed and received by me so quickly - IN A DAY!!!","Excellent vendor to deal with. The item I needed, I needed quickly, therefore, I called the vendor to confirm that they had the merchandise in stock.  The customer service representative was very helpful. She went and retrieved the merchandise to confirm they had it in stock and then confirmed the specifics of the garment that couldn't be determined from the description or picture.  I received my merchandise in the time specified.  I would not hesitate to use this vendor again!","I've been ordering off this merchant for quite a while now and every time I order I'm always impressed with how they do business. Fast, cheap and a good buying expirence","Excellent store!  I ordered on late Friday evening and had them on Tuesday.  Super fast delivery and exactly what I was looking for.  Will recommend them to everyone!","Excellent customer service.  Will definitely purchase from HIT! RUN! SCORE! in the future!","I ordered a good bit of equipment for both of my sons and their football team.  I looked all over the internet at comparable items, and the pricing and selection from HRS was by far the best I found.  I got my order very quickly, and the e-mail updates from HRS about order status and shipping kept me up to date on everything.  I had two separate orders and I had to return a few items because I chose the wrong size on a helmet and one item that had a manufacturer defect.  This is usually the point where doing business over the internet breaks down.  Both times the customer service rep on the phone was extremely helpful, and they got me fixed up with what I needed.  My boys are very young, and I will continue to shop with HRS for a long time.","Products were delivered promptly and were just as the description indicated.  I would definitely purchase from this merchant in the future.","I love Hit! Run! Score!  They were one stop shopping for our All-star team with helpful sales associates and Fast turnaround AND better prices than the companies we had previously been dealing with.  I have recommended them to others in our softball circle and will go to them first for future purchases!!","There were some problems with my first order shipping in time. Luckily I had called to verify that my order had been shipped and we discovered that it had not. HRS took full responsibility and expidited the shipping so that it would arrive in time. Aside from that, another problem was that all shipping/order confirmations did not arrive automatically and that I had to request them. HRS's customer service was excellent however and they helped me with any problem in a professional manner."];

// How many testimonials to show
var show = 3;


/////// Do not edit anything below this line //////////
var stars = "";
var innerHTML = "";
var innerHTML_firstRow = "<table cellpadding=\"0\" cellspacing=\"0\" class=\"testimonialTable\"><tr>";
var innerHTML_nextRow = "</tr><tr>";
var innerHTML_lastRow = "</tr><tr>";
var ran = [];

// Fix number to show if more than available
if (show > ratings.length) {
	show = ratings.length;
}

// Store random testimonial IDs
ran[0] = getRandom();
for (i=1; i<show; i++) {
	ran[i] = (ran[(i-1)] == (ratings.length-1)) ? 0 : (ran[i-1] +1);
}

// Generate Random Variable
function getRandom() {
	var day = new Date();
	seed = day.getTime()
	ranNum = parseInt(((seed - (parseInt(seed/1000,10) * 1000))/10)/100 * ratings.length,10)
	return ranNum;
}

// Generate stars for the rating
function init() {
	for (i=0; i<show; i++) {
		stars += '<img src="http://live.hrstest.com/productpg/img/btn/';
		switch (ratings[ran[i]])
		{
			case 'Excellent': stars += ('s_5.gif'); break;
			case 'Good'		: stars += ('s_4.gif'); break;
			case 'OK'		: stars += ('s_3.gif'); break;
			default: none=true; break;
		}
		stars += '" class="testimonial_image" border="0" id="testimonial_image'+ran[i]+'" alt="'+ratings[ran[i]]+'" title="'+ratings[ran[i]]+'" />';
		innerHTML_firstRow += '<td class="testimonial_top"></td>';
		innerHTML_nextRow  += '<td class="testimonial_mid" style="width:'+(100/show).toFixed(0)+'%"><span class="testimonial_comment">'+comments[ran[i]]+'</span><br /><center>'+stars+'<br /><span class="readMore"><a href="http://shopping.yahoo.com/merchrating/user_rv.html;_ylt=Auh.qXlY18Eyp_Wjbo6_0AgbFt0A;_ylu=X3oDMTA2bTQ0OXZjBHNlYwNzcg--?merchant_id=1012022" target="_blank">Read More...</a></span></center></td>';
		innerHTML_lastRow  += '<td class="testimonial_end"></td>';
		/* innerHTML += ((i+1)==show) ? "" : '<br />'; */
		stars = "";
	}
	innerHTML += innerHTML_firstRow+innerHTML_nextRow+innerHTML_lastRow+"</tr></table>";
	document.getElementById("testimonialsArea").innerHTML = innerHTML;
}
/*
function showHide(x) {
	var showMore = stars+' :: '+comments[ran]+'...<br /><a href="javascript:showHide(\'more\')">Show More</a><br />';
	var showLess = stars+' :: '+comments[ran]+body2[ran]+'<br /><a href="javascript:showHide(\'less\')">Show Less</a><br />';
	document.getElementById("testimonial").innerHTML = (x == "more") ? showLess : showMore;
	
}*/