
        var imageidx = 0;
		var testimonials1 = [];	
		var testimonials2 = [];	
		var testimonials3 = [];			
		var testimonials4 = [];			
		var testimonials5 = [];
		var testimonials6 = [];	
		var testimonials7 = [];	
		
		var map = [];
		var thesePics = [];
        loadImages();

        function loadImages()
        {
			

			testimonials1[0] = ["testimonials/patientstories1.jpg", "768", "577"];
			
			testimonials2[0] = ["testimonials/patientstories2.jpg", "768", "577"];
			
			testimonials3[0] = ["testimonials/patientstories3.jpg", "768", "577"];
			
			testimonials4[0] = ["testimonials/patientstories4.jpg", "768", "577"];
			
			testimonials5[0] = ["testimonials/patientstories5.jpg", "768", "577"];
			
			testimonials6[0] = ["testimonials/patientstories6.jpg", "768", "577"];
			
			testimonials7[0] = ["testimonials/patientstories7.jpg", "768", "577"];

			
			map[0] = ["contact-top-image.png", "628", "366"];
	
		}
                                                    
        function swapNext()
        {
            var links;
            image = thesePics[++imageidx];
			var imagesLength = thesePics.length -1;
            if ( imageidx >= imagesLength )
            {
                links = '<a href="javascript:swapPrev();">Previous</a>'
            }            
            else
            {
                links = '<a href="javascript:swapPrev();">Previous</a>&nbsp;<a href="javascript:swapNext();">Next</a>'

            }            

            MOOdalBox.open('loadimg.php?img='+image[0],links, image[1] + ' ' + image[2])

        }    

        function swapPrev()
        {
            var links;
            image = thesePics[--imageidx];
            if ( imageidx <= 0 )
            {
                links = '<a href="javascript:swapNext();">Next</a>'
            }            
            else
            {
                links = '<a href="javascript:swapPrev();">Previous</a>&nbsp;&nbsp;<a href="javascript:swapNext();">Next</a>'

            }            

            MOOdalBox.open('loadimg.php?img='+image[0],links, image[1] + ' ' + image[2])
        }    

        function start(whatPics)
        {
			imageidx = 0;
			if(whatPics) {
				var image = whatPics[0]; 
				thesePics = whatPics;
			}
			else {
				var image = images[0];	
				whatPics = images;
				thesePics = whatPics;
			}
			if(whatPics.length <= 1) {
				MOOdalBox.open('loadimg.php?img='+image[0],'', image[1] + ' ' + image[2]);
			}
			else {
            	MOOdalBox.open('loadimg.php?img='+image[0],'<a href="javascript:swapNext();">Next</a>', image[1] + ' ' + image[2]);
			}
        }