//this script will output a random link to a page in a directory
//pages should be named in numerical order starting from 0.html and correspond to the array

var directory = "/testimonials/";	
var testimonials = new Array();

//set up an array of testimonial snippets
testimonials[0] = "<img src='/testimonials/images/0_thm.jpg' /><p>I've never had a better organizer.<br /> - Janet Nelson</p>";
testimonials[1] = "<img src='/testimonials/images/1_thm.jpg' /><p>When I saw this system, I had to have it.<br /> - Linda Winer</p>";
testimonials[2] = "<img src='/testimonials/images/2_thm.jpg' /><p>It feels so wonderful to have all my things organized<br /> - Lynne Anthony</p>";
testimonials[3] = "<img src='/testimonials/images/3_thm.jpg' /><p>The craft organizer desk I bought is worth every penny. The materials are sturdy, the construction is very solid, and assembly was easy.<br /> - Sandi Leonard</p>";
testimonials[4] = "<img src='/testimonials/images/4_thm.jpg' /><p>I absolutely love my Best Crafter's Desks and Mini Stackables!<br /> - Vicki Eaton</p>";

function getRandomTestimonial(id){
	e = document.getElementById(id);
	random=Math.floor(Math.random()*testimonials.length);
	e.innerHTML="<a href='#' onclick=\"window.open('"+directory+random+".html', 'Testimonial', 'toolbar=0,scrollbars=1,location=0,statusbar=1,menubar=0,resizable=1,width=500,height=550,left = 465,top = 312');\">"+testimonials[random]+"</a>";
}
