//Set parameters
//Slideshow pictures (same directory as index.html)
pics=new Array ('pic01.jpg', 'pic02.jpg', 'pic03.jpg', 'pic04.jpg', 'pic05.jpg', 'pic06.jpg', 'pic07.jpg', 'pic08.jpg', 'pic09.jpg', 'pic10.jpg', 'pic11.jpg', 'pic12.jpg', 'pic13.jpg', 'pic14.jpg', 'pic15.jpg', 'pic16.jpg', 'pic17.jpg', 'pic18.jpg', 'pic19.jpg', 'pic20.jpg', 'pic21.jpg', 'pic22.jpg', 'pic23.jpg', 'pic24.jpg', 'pic25.jpg', 'pic26.jpg', 'pic27.jpg', 'pic28.jpg', 'pic29.jpg', 'pic30.jpg');
//Id of slideshow div container in index.html
divid="slideshow";
//Picture frame width, height
picw=600;
pich=450;
//Bacground color for pictures of different size
backgr="#bdb76b";
//Display duration (sec/pic)
ddur=3;
//Fade duration(sec)
fdur=1;
//Number of steps in fade
steps=20;
//Start on auto or on click. Value is "1" for auto; "null" for click. For click, use e.g. slide)
startwhen=1;
//****************************************************************
//Begin slideshow
//Random image start
randshift=Math.floor(Math.random()*pics.length);
for(i=0;i<=randshift;i++){pics.push(pics.shift());}
ftim=fdur*1000/steps;
dtim=ddur*1000;
emax=pics.length;
tp="
";
for(e=1;e<=emax;e++){
theid="img"+e;
thesrc=pics[e-1];
tp=tp+"
";
}
tp=tp+"
";
document.write("");
function myfade(){
parr = new Array();
for(a=1;a<=emax;a++){
idakt="img"+a;paktidakt=document.getElementById(idakt);
ie5exep=new Array(paktidakt);
parr=parr.concat(ie5exep);}
i=1;u=0;slide (i);
}
function slide(numa){
ptofade=parr[numa-1];
if(numa<=emax){pnext=parr[numa];}
if(numa==emax){pnext=parr[0];}
pnext.style.visibility="visible";
pnext.style.filter="Alpha(Opacity=100)";
pnext.style.MozOpacity=1;
pnext.style.opacity=1;
ptofade.style.filter="Alpha(Opacity=100)";
ptofade.style.MozOpacity=1;
ptofade.style.opacity=1;
factor=100/steps;
slidenow();
}
function slidenow(){
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=steps&&i=steps&&i>=emax){
ptofade.style.visibility="hidden";
ptofade.style.zIndex=1;
pnext.style.zIndex=2;
i=1;u=0;
window.setTimeout("slide(i)",dtim);}
}
function shownow(){
document.getElementById(divid).innerHTML=tp;
if(startwhen){window.setTimeout("myfade()",dtim);}
}
onload=shownow;