
function TicoSlideshow(pdiv,options)
{var pdiv=pdiv;var photos=null;var currentimg=null;var pointer=0;var pclass='photo';var interval=5;var fi_time=1;var fo_time=1;if(typeof options=='object'){if(typeof options.pclass!='undefined')pclass=options.pclass;if(typeof options.interval!='undefined')interval=options.interval;if(typeof options.fi_time!='undefined')fi_time=options.fi_time;if(typeof options.fo_time!='undefined')fo_time=options.fo_time;}
this.startup=function()
{photos=$$('#'+pdiv+' .'+pclass);currentimg=photos[0];this.cycle;interval=interval+fi_time+fo_time;new PeriodicalExecuter(this.cycle,interval);}
this.cycle=function()
{new Effect.Fade(currentimg,{duration:fo_time,fps:20,queue:{position:'end',scope:pdiv}})
pointer++;if(pointer>=photos.length){pointer=0};currentimg=photos[pointer];new Effect.Appear(currentimg,{duration:fi_time,fps:20,queue:{position:'end',scope:pdiv}})}}