//Create a variable to keep track of array position 
var position = 0 ;

//Array of names
var names = new Array(4);
names[0] = "Tina and Rob";
names[1] = "Fen and David";
names[2] = "Peter and Nina";
names[3] = "Emily & Family";

//Array of testimonials
var testimonials = new Array(2);
testimonials[0] = "Megan -<br><p>I can't tell you how pleased we are with our wedding photos. They were spectacular and "
				   + "really captured intimacy of our small wedding on the beach. Thank you for making us feel so at "
				   + "ease, especially since my husband hates getting his picture taken!</p>Thanks again.<br />	Tina";
testimonials[1] = "Dear Megan, <br> <p>I can't thank you enough.  When we first looked for photographers a year ago, "
					+ "we were 99% sure we found the right person as soon as we saw your portfolio.  You were able to capture every picture that we requested and more "
					+ "All of the candid shots you took are priceless.  Your sincereity and caring nature put us at ease on our wedding day.</p>"
					+ "Best Wishes, <br /> Fen and David Lee";
testimonials[2] = "<p>Megan was fantastic! She took beautiful pictures of us and our family and friends. Our venue offered a lot of potential for photos and Megan was able to capture the serenity of the nature along with the vibrant decor and the party going on. Nothing felt staged and she guided us patiently through the different group photos. Some pictures are black and white with little color details.</p> Nina";
testimonials[3] = "Dear Megan, <br> <p>The pictures came out great!  Thanks for your patience with our large group.  I really appreciate the extra time that you stayed to take individual shots.  We really got some winners!</p> Thanks Again, <br />Emily";

//Array of pictures
var pics = new Array(4);
var pic1 = new Image;
pic1.src = "testimonials//tinarob.jpg";
pics[0] = pic1;

var pic2 = new Image;
pic2.src = "testimonials//fendavid.jpg";
pics[1] = pic2;

var pic3 = new Image;
pic3.src = "testimonials//peternina.jpg";
pics[2] = pic3;

var pic4 = new Image;
pic4.src = "testimonials//emily.jpg";
pics[3] = pic4;

function SetTestimonial(index)
{
	position = index;
	if (position < names.length && position >=0)
	{
		document.getElementById("Names").innerHTML = names[position];
		document.getElementById("Testimonials").innerHTML = testimonials[position]; 
		document.images["Image"].src=  pics[position].src
	}
}

