1var slideshow = { 2 3 /* 4 * 5 * Diese Typen sind momentan verfügbar: 6 * 7 * 'fade' : Ãberblenden zwischen den Bildern 8 * 'grow' : Neues Bild wächst aus der Bildmitte heraus 9 * 'center' : Bild schiebt sich aus der Mitte heraus 10 * 'blinds' : Bild schiebt sich von oben über das vorherige Bild 11 * 12 */ 13 type : 'fade', 14 15 /* 16 * 17 * Gesamtdauer der Slideshow in Sekunden 18 * 19 */ 20 duration : 5000, 21 22 23 pictures : $A, 24 index : 0, 25 delay : 0, 26 lastframe : {}, 27 28 setPictures : function(pictures) { 29 slideshow.pictures = pictures; 30 }, 31 32 setType : function(type) { 33 slideshow.type = type; 34 }, 35 36 setDuration : function(duration) { 37 slideshow.duration = duration; 38 }, 39 40 initSlideshow : function() { 41 for (i = 1; i < slideshow.pictures.length; i++) { 42 var display = !i ? 'block' : 'none'; 43 44 $('slideshow').insert({bottom:'<div class="picture" style="display:none" id="slideshow_' + i + '"><img src="' + slideshow.pictures[i] + '" alt="" /></div>'}); 45 } 46 47 slideshow.delay = (slideshow.duration / slideshow.pictures.length) * 1000; 48 slideshow.index = slideshow.pictures.length; 49 }, 50 51 startSlideshow : function() { 52 switch (slideshow.type) { 53 case 'grow': 54 setTimeout("slideshow.growSlides(0, 'true')", slideshow.delay); 55 break; 56 case 'center': 57 setTimeout("slideshow.blindSlides(0, 'true')", slideshow.delay); 58 break; 59 case 'blind': 60 case 'blinds': 61 setTimeout("slideshow.blindSlides(0, 'false')", slideshow.delay); 62 break; 63 default: 64 setTimeout("slideshow.fadeSlides(0)", slideshow.delay); 65 } 66 }, 67 68 growSlides : function(frame, center) { 69 slideshow.index++; 70 frame = (frame == (slideshow.pictures.length - 1)) ? 0 : (frame + 1); 71 72 $('slideshow_' + frame).style.zIndex = slideshow.index; 73 74 setTimeout("Effect.Grow('slideshow_" + frame + "')", 1); 75 setTimeout("slideshow.growSlides(" + frame + ")", (slideshow.delay * 2)); 76 }, 77 78 blindSlides : function(frame, center) { 79 slideshow.index++; 80 frame = (frame == (slideshow.pictures.length - 1)) ? 0 : (frame + 1); 81 82 $('slideshow_' + frame).style.zIndex = slideshow.index; 83 84 setTimeout("Effect.BlindDown('slideshow_" + frame + "', {scaleFromCenter :" + center + "})", 1); 85 setTimeout("slideshow.blindSlides(" + frame + ", " + center + ")", (slideshow.delay * 2)); 86 }, 87 88 fadeSlides : function(frame) { 89 Effect.Fade('slideshow_' + frame); 90 frame = (frame == (slideshow.pictures.length - 1)) ? 0 : (frame + 1); 91 92 setTimeout("Effect.Appear('slideshow_" + frame + "')", 0); 93 setTimeout("slideshow.fadeSlides(" + frame + ")", (slideshow.delay * 2)); 94 } 95}
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.