<!--    Original Script by hscripts.com     -->
<!--        copyright of HIOX INDIA         -->
<!-- more scripts @ http://www.hscripts.com -->
<!--    Modification made: 2006.04.11       -->
<!--        By: Tommy Morrison              -->

// To create a slide show add the following
// lines to the head of your HTML
//
//--------------------------------------
// <script language=javascript>
// var width = 175;
// var height = 150;
// var imgAr1 = new Array();
// var rImg1 = new Array();
//
// imgAr1[0] = "images/pic01.jpg";
// imgAr1[1] = "images/pic02.jpg";
// imgAr1[2] = "images/pic03.jpg";
// imgAr1[3] = "images/pic04.jpg";
// imgAr1[4] = "images/pic05.jpg";
//
// </script>
//-------------------------------------
// 
// Then add:
//
// <img id="ssPic" />
//
// where you want the slide. You can then create either a text or
// an image link to attach the ssNext() and ssPrev() functions
// to the onClick action.
//
// The last step is to initialize the slideshow by adding the ssInit()
// function to the onLoad action of the body tag.

for(var j = 0; j < imgAr1.length; j++)
{
  rImg1[j] = new Image();
  rImg1[j].src = imgAr1[j];
}

var slide;
function ssInit()
{
	slide = document.getElementById('ssPic');
	slide.src = imgAr1[0];
	slide.setAttribute("width",width);
	slide.setAttribute("height",height);
}

var picture = 0;
function ssNext(){
	if( picture < imgAr1.length-1 ){
		picture++;
		slide.src = imgAr1[picture];
	} else {
	    slide.src = imgAr1[0];
		picture = 0;
	}
}

function ssPrev(){
	if( picture > 0 ){
		picture--;
		slide.src = imgAr1[picture];
	} else {
		picture = imgAr1.length-1;
	    slide.src = imgAr1[picture];
		
	}
}

function ssStart(){
		slide.src = imgAr1[0];
		picture = 0;
}

function ssEnd(){
		slide.src = imgAr1[imgAr1.length-1];
		picture = imgAr1.length-1
}
