	// this array consists of the id attributes of the divs we wish to alternate between
			var divs_to_fade = new Array('box-1', 'box-2', 'box-3', 'box-4', 'box-5', 'box-6', 'box-7', 'box-8', 'box-9', 'box-10');
		
			// the starting index in the above array.  It should be set to the value of the div which doesn't have the CSS Display property set to "none"
			var i = 0;
			
			// the number of milliseconds between swaps.  Default is five seconds.
			var wait = 7000;

			// the function that performs the fade
			function swapFade() {
				Effect.Fade(divs_to_fade[i], { duration:1, from:1.0, to:0.0 });
				i++;
				if (i == 10) i = 0; 			// i == # must be set to total number of images
				Effect.Appear(divs_to_fade[i], { duration:1, from:0.0, to:1.0 });
			}
			
			// the onload event handler that starts the fading.
			function startPage() {
				setInterval('swapFade()',wait);
			}
		

		
var onoff = 'off';
var timeout = '';
var showtimeout = '';
var reallyhide ='';
var overbar = 'no';
var waiting = 'no';

function cancelShow() {
	clearTimeout(showtimeout);
	overbar = 'no';
	waiting = 'no';
}

function showScreen() {
		if(overbar == 'no') {
			if(waiting == 'no') {
				waiting = 'yes';
				showtimeout = setTimeout("overbar = 'yes'; showScreen2(); waiting = 'no';",150);
			}
		}
		else {
			showScreen2();
		}
	}

function showScreen2() {
	document.getElementById("screen").style.display="block";
	clearTimeout(timeout);
	clearTimeout(reallyhide);

	if(onoff == 'off') {
		onoff = 'on';
		new Effect.Opacity('screen',
		{	duration: .3, 
			transition: Effect.Transitions.linear, 
			to: 0.4,
			queue: {position: 'front', scope: 'showq', limit:1 } });
		}
	}

	
function hideScreen() {
	if(onoff == 'on') {
		timeout = setTimeout("hideScreen2()",5);
		}
	}
	
function hideScreen2() {
		new Effect.Opacity('screen',
		  { duration: .3, 
			transition: Effect.Transitions.linear, 
			delay: 0.0,
			to: 0.0,
			queue: {position: 'end', scope: 'hideq', limit:1 } });
		onoff = 'off';
		reallyhide = setTimeout('document.getElementById("screen").style.display="none";',500);
	}