/**************************************************************** "bretteleben.de Simple Picture Slideshow" Plugin for Joomla 1.5 - Version 1.2.1 License: http://www.gnu.org/copyleft/gpl.html Author: Andreas Berger - http://www.bretteleben.de Copyright (c) 2009 Andreas Berger - andreas_berger@bretteleben.de Project page and Demo at http://www.bretteleben.de ***Last update: 2009-04-07*** *****************************************************************/ function besps_slideshow(besps_slideid,besps_ftim,besps_stim,besps_steps,besps_startwhen,besps_emax,besps_caps,besps_preload){ //declarations var self = this; var slideid=besps_slideid; var ftim=besps_ftim; var stim=besps_stim; var steps=besps_steps; var startwhen=besps_startwhen; var emax=besps_emax; var preload=besps_preload; var stopit=1; var startim=1; var u=0; var parr = new Array(); var ptofade,pnext,factor,mytimeout; var caps=besps_caps; //push images into array and get things going this.b_myfade = function(){ var a,idakt,paktidakt,ie5exep; for(a=1;a<=emax;a++){ idakt="img_"+slideid+"_"+a;paktidakt=document.getElementById(idakt); ie5exep=new Array(paktidakt);parr=parr.concat(ie5exep); if(preload&&a==emax){ setTimeout(function(){self.b_preload();},10); } } if(startwhen){ stopit=0; mytimeout=setTimeout(function(){self.b_slide();},stim); } } //prepare current and next and trigger slide this.b_slide = function(){ clearTimeout(mytimeout); u=0; ptofade=parr[startim-1]; if(startim=2){startim=startim-1;} else{startim=emax;} this.b_switchcap(); self.b_slide(); } else{ //whilst sliding this.b_switchcap(); self.b_slide(); } } //slide as said, then give back this.b_slidenow = function(){ var check1,maxalpha,curralpha; check1=ptofade.style.MozOpacity; maxalpha=(100-factor*u)/100*105; if(check1<=maxalpha/100){u=u+1;} curralpha=100-factor*u; ptofade.style.filter="Alpha(Opacity="+curralpha+")"; ptofade.style.MozOpacity=curralpha/100; ptofade.style.opacity=curralpha/100; if(u=1){ for (j=0;j=1){ document.getElementById("bs_caps_"+besps_slideid).getElementsByTagName("div")[0].innerHTML=(caps[startim-1][0]!=""||caps[startim-1][1]!="")?""+caps[startim-1][0]+""+caps[startim-1][1]+"":" "; } } //call autostart-function window.addEvent("load",this.b_myfade); }