// This array lists the id attributes of the divs we want to fade between
var splashes_to_fade = new Array('splashbox-1', 'splashbox-2', 'splashbox-3', 'splashbox-4', 'splashbox-5', 'splashbox-6', 'splashbox-7', 'splashbox-8', 'splashbox-9', 'splashbox-10', 'splashbox-11', 'splashbox-12');

splashes_to_fade.sort(function() {return 0.5 - Math.random()});
var splash_div = splashes_to_fade[0];
		
// This is the starting index of the above array. This number determines which div to start fading with.
// It should be set to the value of the div which doesn't have the CSS Display property set to "none".
var j = 0;
			
// The number of seconds to wait before swapping divs. 
var splash_seconds = 37;

			
// Converts seconds into milliseconds - the period of time the script uses.
var splash_wait = splash_seconds*1000;

// The function that performs the fading.
function swapSplash() {
  Effect.Fade(splashes_to_fade[j], { duration:2, from:1.0, to:0.0 });
  j++;
  // Loops the script. Set the (j == #) to equal the total number of fading divs.
  // Example: "if (j == 5)" means that there are 5 total divs to fade.
  if (j == 12) j = 0;
  Effect.Appear(splashes_to_fade[j], { duration:3, from:0.0, to:1.0 });
}

// The onload event that starts the fading.
function startSplash() {
Effect.Appear(splashes_to_fade[j], { duration:.01, from:0.0, to:1.0 });
  setInterval('swapSplash()',splash_wait);
}