
function change_photo(id_photo){

   new Effect.Fade('zonephoto', { afterFinish: function () {
     $('zonephoto').update('<img src="'+la_photo[id_photo]+'">');
     new Effect.Appear('zonephoto');
     }
   });
/*
   newImage = "url("+la_photo[id_photo]+")";
   document.body.style.backgroundImage =newImage;
   */
}


i=0;

function rotation_photo(){
clearInterval(int_id);
int_id = setInterval( "rotation_photo()", 5000 );
i++;
if(i==la_photo.length){i=0;}
change_photo(i);
}

function preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=preloadImages.arguments;
	for(i=0; i<la_photo.length; i++)
    {
		d.MM_p[j]=new Image; d.MM_p[j++].src=la_photo[i];
	}	
}
}

preloadImages();
int_id = setInterval( "rotation_photo()", 100 );


