Guest User

Untitled

a guest
Nov 5th, 2018
86
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // Set slideShowSpeed (milliseconds)
  2. var slideShowSpeed = 60000
  3.  
  4. // Duration of crossfade (seconds)
  5. var crossFadeDuration = 3
  6.  
  7. var Pic = new Array()
  8. Pic[0] = 'image/background.jpg'
  9. Pic[1] = 'image/background2.jpg'
  10. Pic[2] = 'image/background3.jpg'
  11. Pic[3] = 'image/background4.jpg'
  12. Pic[4] = 'image/background5.jpg'
  13.  
  14. var t
  15. var j = 0
  16. var p = Pic.length
  17. var preLoad = new Array()
  18. for (i = 0; i < p; i++){
  19.    preLoad[i] = new Image()
  20.    preLoad[i].src = Pic[i]
  21. }
  22.  
  23. function runSlideShow(){
  24.    if (document.all){
  25.       document.images.SlideShow.style.filter="blendTrans(duration=2)"
  26.       document.images.SlideShow.style.filter="blendTrans(duration=crossFadeDuration)"
  27.       document.images.SlideShow.filters.blendTrans.Apply()      
  28.    }
  29.    document.images.SlideShow.src = preLoad[j].src
  30.    if (document.all){
  31.       document.images.SlideShow.filters.blendTrans.Play()
  32.    }
  33.    j = j + 1
  34.    if (j > (p-1)) j=0
  35.    t = setTimeout('runSlideShow()', slideShowSpeed)
  36. }
RAW Paste Data