var tot_img_to_preload=0;function checkImgComplete(image, string, i){	new PeriodicalExecuter(function(pe){		if (image.complete){			$$('.photo')[i].update(string);			pe.stop();			tot_img_to_preload--;			if(!tot_img_to_preload && $('nav_spinner')){				$('nav_spinner').hide();			}		}	}, 5);}//checkImgCompletefunction preloadImages(){	if(typeof(photos_to_preload) !== 'undefined'){		tot_img_to_preload=photos_to_preload.length;		for(i=0; i<photos_to_preload.length; i++){			var image=new Image; 			image.src=photos_to_preload[i].url;			var string=photos_to_preload[i].string;			checkImgComplete(image, string, i+1);		}	}}//preloadImagesfunction moveSlideShow(){	var ps=$$('.photo');	if(ps.length>1){		ps.each(function(elt, index){			if(elt.visible()){				ps=$$('.photo');				next_elt= ps.length==index+1 ? ps[0] : elt.next('div');				new_position= ps.length==index+1 ? 1 : index+2;				if(Element.empty(next_elt)){					setTimeout("moveSlideShow()", 500);					throw $break;				}else{					new Effect.Fade(elt);					new Effect.Appear(next_elt);					if($('nav_position')){						$('nav_position').update(new_position);					}					setTimeout("moveSlideShow()", 5000);					throw $break;				}			}		});	}}//moveSlideShowfunction activeSlideShow(){	var ps=$$('.photo');	if(ps.length>1){		preloadImages();		$('photos').setStyle({backgroundImage:'none'});		moveSlideShow();	}}//activeSlideShowfunction inizio(){	if(supersleight){supersleight.init();}	cerca_rollover();}//inizioEvent.observe(window, 'load', inizio);