var def_imges='';var def_divid="slideshow";var def_picwid=200;var def_pichei=200;var def_backgr="#eeeeee";var def_sdur=3;var def_fdur=1;var def_steps=20;var def_startwhen="y";var def_shuffle="y";var def_showcontr="y";var def_contr='';function daisychain(sl){if(window.onload){var ld=window.onload;window.onload=function(){ld();sl()}}else{window.onload=function(){sl()}}}function mm_slideshow(mm_slideid,mm_imges,mm_divid,mm_picwid,mm_pichei,mm_backgr,mm_sdur,mm_fdur,mm_steps,mm_startwhen,mm_shuffle,mm_showcontr,mm_contr){var slideid=mm_slideid?mm_slideid:"0";var imges=mm_imges?mm_imges:def_imges;var divid=mm_divid?mm_divid:def_divid;var picwid=mm_picwid?mm_picwid:def_picwid;var pichei=mm_pichei?mm_pichei:def_pichei;var backgr=mm_backgr?mm_backgr:def_backgr;var sdur=mm_sdur?mm_sdur:def_sdur;var fdur=mm_fdur?mm_fdur:def_fdur;var steps=mm_steps?mm_steps:def_steps;var startwhen=mm_startwhen?mm_startwhen:def_startwhen;startwhen=(startwhen.toLowerCase()=="y")?1:0;var shuffle=mm_shuffle?mm_shuffle:def_shuffle;shuffle=(shuffle.toLowerCase()=="y")?1:0;var showcontr=mm_showcontr?mm_showcontr:def_showcontr;showcontr=(showcontr.toLowerCase()=="y")?1:0;var contr=mm_contr?mm_contr:def_contr;var ftim=fdur*1000/steps;var stim=sdur*1000;var emax=imges.length;var self=this;var stopit=1;var startim=1;var u=0;var parr=new Array;var ptofade,pnext,factor,mytimeout;if(imges.length<=2){imges=imges.concat(imges)}if(shuffle){var i;for(i=0;i<=Math.floor(Math.random()*imges.length);i++){imges.push(imges.shift())}}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(startwhen){stopit=0;mytimeout=setTimeout(function(){self.b_slide()},stim)}};this.b_slide=function(){clearTimeout(mytimeout);u=0;ptofade=parr[startim-1];if(startim<emax){pnext=parr[startim]}else{pnext=parr[0]}pnext.style.zIndex=1;pnext.style.visibility="visible";pnext.style.filter="Alpha(Opacity=100)";pnext.style.MozOpacity=1;pnext.style.opacity=1;ptofade.style.zIndex=2;ptofade.style.visibility="visible";ptofade.style.filter="Alpha(Opacity=100)";ptofade.style.MozOpacity=1;ptofade.style.opacity=1;factor=100/steps;if(stopit=="0"){this.b_slidenow()}};this.b_forw=function(){stopit=1;clearTimeout(mytimeout);ptofade=parr[startim-1];if(startim<emax){pnext=parr[startim];startim=startim+1}else{pnext=parr[0];startim=1}ptofade.style.visibility="hidden";ptofade.style.zIndex=1;pnext.style.visibility="visible";pnext.style.zIndex=2;self.b_slide()};this.b_back=function(){stopit=1;clearTimeout(mytimeout);if(u==0){ptofade=parr[startim-1];if(startim<emax){pnext=parr[startim]}else{pnext=parr[0]}pnext.style.visibility="hidden";ptofade.style.zIndex=1;ptofade.style.visibility="visible";if(startim>=2){startim=startim-1}else{startim=emax}self.b_slide()}else{self.b_slide()}};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<steps){if(stopit=="0"){mytimeout=setTimeout(function(){self.b_slidenow()},ftim)}else{this.b_slide()}}else{if(startim<emax){ptofade.style.visibility="hidden";ptofade.style.zIndex=1;pnext.style.zIndex=2;startim=startim+1;u=0;mytimeout=setTimeout(function(){self.b_slide()},stim)}else{ptofade.style.visibility="hidden";ptofade.style.zIndex=1;pnext.style.zIndex=2;startim=1;u=0;mytimeout=setTimeout(function(){self.b_slide()},stim)}}};this.b_start=function(){if(stopit==1){stopit=0;mytimeout=setTimeout(function(){self.b_slide()},stim)}};this.b_stop=function(){clearTimeout(mytimeout);stopit=1;this.b_slide()};this.b_insert=function(){var b,thestylid,thez,thevis,slidehei;slidehei=showcontr?pichei+25:pichei;var myhtml="<div style='width:"+picwid+"px;height:"+slidehei+"px;'>";myhtml+="<div style='position:absolute;width:"+picwid+"px;height:"+pichei+"px;'>";for(b=1;b<=emax;b++){thez=1;thevis="hidden";if(b<=1){thez=2;thevis="visible"}myhtml+="<div id='img_"+slideid+"_"+b+"' style='font-size:0;line-height:"+pichei+"px;margin:0;padding:0;text-align:center;visibility:"+thevis+";z-index:"+thez+";position:absolute;left:0;top:0;width:"+picwid+"px;height:"+pichei+"px;background-color:"+backgr+";'>";myhtml+="<img src='"+imges[(b-1)]+"' style='vertical-align:middle;border:0;' alt=''/></div>"}myhtml+="</div>";if(showcontr){for(b=1;b<=4;b++){var check=contr[b-1].substring(contr[b-1].length-3).toLowerCase();contr[b-1]=(check=="jpg"||check=="gif"||check=="png")?"<img src='"+contr[b-1]+"' style='border:none;' alt=''/>":contr[b-1]}myhtml+="<div style='display:block;width:"+picwid+"px;padding-top:"+(pichei+3)+"px;text-align:right;'>";myhtml+="<a href='javascript:mm_"+slideid+".b_back();' style='text-decoration:none'>"+contr[0]+"</a>&nbsp;";myhtml+="<a href='javascript:mm_"+slideid+".b_start();' style='text-decoration:none'>"+contr[1]+"</a>&nbsp;";myhtml+="<a href='javascript:mm_"+slideid+".b_stop();' style='text-decoration:none'>"+contr[2]+"</a>&nbsp;";myhtml+="<a href='javascript:mm_"+slideid+".b_forw();' style='text-decoration:none'>"+contr[3]+"</a>"}myhtml+="</div>";document.getElementById(divid).innerHTML=myhtml;self.b_myfade()};daisychain(this.b_insert)}
