currentIndx=0;

MyImages=new Array(10);

MyImages[0]='images/liposuction/lipo1a.jpg';

MyImages[1]='images/liposuction/lipo1b.jpg';

MyImages[2]='images/liposuction/lipo2a.jpg';

MyImages[3]='images/liposuction/lipo2b.jpg';

MyImages[4]='images/liposuction/lipo3a.jpg';

MyImages[5]='images/liposuction/lipo3b.jpg';

MyImages[6]='images/liposuction/lipo4a.jpg';

MyImages[7]='images/liposuction/lipo4b.jpg';

MyImages[8]='images/liposuction/lipo5a.jpg';

MyImages[9]='images/liposuction/lipo5b.jpg';

MyImages[10]='images/liposuction/lipo6a.jpg';

MyImages[11]='images/liposuction/lipo6b.jpg';



imagesPreloaded = new Array(12)

for (var i = 0; i < 12 ; i++)

{

imagesPreloaded[i] = new Image(568,307)

imagesPreloaded[i].src=MyImages[i]

}

function Nexter(){

if (currentIndx < 11){

/* the length of our array is 4. But the images go from 0 to 3, so we take one off the count. (We made currentIndx equal 0 right at the beginning of our script!) */

currentIndx=currentIndx+1;

/* To go forward, we add one, providing the number is less than the number of images */

document.theImage.src=imagesPreloaded[currentIndx].src

/* The NAME of the image in our slide show is theImage. We can change the image loaded here as above */

}

else {

currentIndx=11

/* Otherwise, we go back to the beginning, if currentIndx is too big */

document.theImage.src=imagesPreloaded[currentIndx].src

}

}

/* The function Baccker() is similar to the previous function, so it contains no comments */

function Backer(){

if (currentIndx>=0){

currentIndx=currentIndx-1;

document.theImage.src=imagesPreloaded[currentIndx].src

}

else {

currentIndx=0

document.theImage.src=imagesPreloaded[currentIndx].src

document.form1.text1.value=Messages[currentIndx];

}}

 