var album = {
       startup: function() {
         new PeriodicalExecuter(album.cycle, 5) // change image every 8 seconds
       },
       cycle: function() {
         new Effect.Fade('randompics', { // the id of the <DIV> containing the photos
           duration: 1,
           fps: 50,
           afterFinish: function() {
            new Ajax.Updater('randompics','http://www.the-frog-concept.com/function/random_pics_web.php', { // URL for next <IMG> tag
              asynchronous: true,
              onSuccess: function() {
                new Effect.Appear('randompics', {
                  duration: 1,
                  fps: 50,
                  queue:'end'
                })
              }
            })
          }
        })
      }
    }

Event.observe(window, 'load', album.startup, false);
