Advertisement
Guest User

Untitled

a guest
May 27th, 2015
249
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.48 KB | None | 0 0
  1. <script language="javascript" type="text/javascript">
  2. <!-- Begin
  3. // Set slideShowSpeed (milliseconds)
  4. var slideShowSpeed = 2000;
  5. // Duration of crossfade (seconds)
  6. var crossFadeDuration = 3;
  7. // Specify the image files
  8. var Pic = new Array();
  9. // to add more images, just continue
  10. // the pattern, adding to the array below
  11.  
  12. Pic[0] = 'http://www.htmlbestcodes.com/images/toad.jpg'
  13. Pic[1] = 'http://www.htmlbestcodes.com/images/lizard.jpg'
  14. Pic[2] = 'http://www.htmlbestcodes.com/images/chameleon.jpg'
  15. Pic[3] = 'http://www.htmlbestcodes.com/images/gecko.jpg'
  16.  
  17. // do not edit anything below this line
  18. var t;
  19. var j = 0;
  20. var p = Pic.length;
  21. var preLoad = new Array();
  22. for (i = 0; i < p; i++) {
  23. preLoad[i] = new Image();
  24. preLoad[i].src = Pic[i];
  25. }
  26. function runSlideShow() {
  27. if (document.all) {
  28. document.images.SlideShow.style.filter="blendTrans(duration=2)";
  29. document.images.SlideShow.style.filter="blendTrans(duration=crossFadeDuration)";
  30. document.images.SlideShow.filters.blendTrans.Apply();
  31. }
  32. document.images.SlideShow.src = preLoad[j].src;
  33. if (document.all) {
  34. document.images.SlideShow.filters.blendTrans.Play();
  35. }
  36. j = j + 1;
  37. if (j > (p - 1)) j = 0;
  38. t = setTimeout('runSlideShow()', slideShowSpeed);
  39. }
  40. window.onload=runSlideShow;
  41. // End -->
  42. </script>
  43. <center>
  44. <table border="0" cellpadding="0" cellspacing="0">
  45. <tr>
  46. <td id="VU" height=190 width=330>
  47. <img src="http://www.htmlbestcodes.com/images/toad.jpg" name='SlideShow' width=330 height=190>
  48. </td>
  49. </tr>
  50. </table>
  51. </center>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement