album = { 
  startup: function() {
	new PeriodicalExecuter(album.cycle, 10) // change image every 10 seconds
  },

  cycle: function() { 
	new Effect.Fade('mainImage', { // the id of the <DIV> containing the photos 
		duration: 1, 
		to: 0.01,
		fps: 50,
		afterFinish: function() { 
			$("mainImage").innerHTML = "<img src='/img/homepage/rotate.php?r=" + Math.random() + "'>";
			new Effect.Appear('mainImage', {
				duration: 1,
				fps: 50,
				to: 0.99
				//,queue:'end'
			})
		}
	})
	} 
}

loadFunctions.push({
	scope:album,
	func:'startup',
	args:''
});