// Set slideShowSpeed (milliseconds)
var slideShowSpeed = 5000

// Duration of crossfade (seconds)
var crossFadeDuration = 3

// Specify the image files
var Pic = new Array() // don't touch this
//var Txt = new Array() // don't touch this
// to add more images, just continue
// the pattern, adding to the array below

Pic[0] = '../_images/gallery/model1.jpg'
Pic[1] = '../_images/gallery/model2.jpg'
Pic[2] = '../_images/gallery/model3.jpg'
Pic[3] = '../_images/gallery/model4.jpg'
Pic[4] = '../_images/gallery/model5.jpg'
Pic[5] = '../_images/gallery/model6.jpg'
Pic[6] = '../_images/gallery/model7.jpg'
Pic[7] = '../_images/gallery/model8.jpg'
Pic[8] = '../_images/gallery/model9.jpg'
Pic[9] = '../_images/gallery/model10.jpg'
Pic[10] = '../_images/gallery/model11.jpg'
Pic[11] = '../_images/gallery/model12.jpg'
Pic[12] = '../_images/gallery/model13.jpg'
Pic[13] = '../_images/gallery/model14.jpg'
Pic[14] = '../_images/gallery/model15.jpg'
Pic[15] = '../_images/gallery/model16.jpg'
Pic[16] = '../_images/gallery/model17.jpg'
Pic[17] = '../_images/gallery/model18.jpg'
Pic[18] = '../_images/gallery/model19.jpg'
Pic[19] = '../_images/gallery/model20.jpg'
Pic[20] = '../_images/gallery/model21.jpg'
Pic[21] = '../_images/gallery/model22.jpg'
Pic[22] = '../_images/gallery/model23.jpg'
Pic[23] = '../_images/gallery/model24.jpg'
Pic[24] = '../_images/gallery/model25.jpg'
Pic[25] = '../_images/gallery/model26.jpg'
Pic[26] = '../_images/gallery/model27.jpg'
Pic[27] = '../_images/gallery/model28.jpg'
Pic[28] = '../_images/gallery/model29.jpg'
Pic[29] = '../_images/gallery/model30.jpg'
Pic[30] = '../_images/gallery/model31.jpg'
Pic[31] = '../_images/gallery/model32.jpg'
Pic[32] = '../_images/gallery/model33.jpg'
Pic[33] = '../_images/gallery/model34.jpg'
Pic[34] = '../_images/gallery/model35.jpg'
Pic[35] = '../_images/gallery/model100.jpg'
Pic[36] = '../_images/gallery/model101.jpg'
Pic[37] = '../_images/gallery/model102.jpg'


//Txt[0] = 'text 1 '
//Txt[1] = 'text 2 text 2 '
//Txt[2] = 'text 3 text 3 text 3 '
//Txt[3] = 'text 4 text 4 text 4 text 4 '
//Txt[4] = 'text 5 text 5 text 5 text 5 text 5 '
//Txt[5] = 'text 6 text 6 text 6 text 6 text 6 text 6 '
//Txt[6] = 'text 7 text 7 text 7 text 7 text 7 text 7 text 7 '
// =======================================
// do not edit anything below this line
// =======================================

var t
var j = 0
var p = Pic.length
//var lastPic = Pic.length

var preLoad = new Array()
//var preLoadTxt = new Array()
for (i = 0; i < p; i++){
   preLoad[i] = new Image()
   //preLoadTxt[i] = new String()
   preLoad[i].src = Pic[i]
   //preLoadTxt[i].value = Txt[i]
}


function next(){
//alert ("j and p before =" + j + p);
   j = j + 1
   if (j > (p-1)) j=0
  // alert ("j and p after =" + j + p);
   
   if (document.all){
      document.images.galleryModel.style.filter="blendTrans(duration=2)"
      document.images.galleryModel.style.filter="blendTrans(duration=crossFadeDuration)"
      document.images.galleryModel.filters.blendTrans.Apply()      
   }
   document.images.galleryModel.src = preLoad[j].src
   //document.images.galleryTxt.value = preLoadTxt[j].value
  // alert ("preLoad[j] =" + j );
   //alert ("preLoad[j] value=" + preLoad[j].src );
   if (document.all){
      document.images.galleryModel.filters.blendTrans.Play()
   }
   
  
}
function prev(){
//alert ("j and p before =" + j + p);
   j = j - 1
   if (j == -1) j=lastPic-1
 //   alert ("j and p after =" + j + p);
	
   if (document.all){
      document.images.galleryModel.style.filter="blendTrans(duration=2)"
      document.images.galleryModel.style.filter="blendTrans(duration=crossFadeDuration)"
      document.images.galleryModel.filters.blendTrans.Apply()      
   }
   document.images.galleryModel.src = preLoad[j].src
 //  alert ("preLoad[j] =" + j );
 //  alert ("preLoad[j] value=" + preLoad[j].src );
   if (document.all){
      document.images.galleryModel.filters.blendTrans.Play()
   }
   
  
}
