var docdivs = document.getElementsByTagName('a');
var processdivs = new Array();
var processindex = 0;
var wait = 5000;

// the onload event handler that starts the fading.
function setupFade() {
// loop through all div tags looking for "quote-box" classes
	for (var index = 0; index < docdivs.length; ++index) {
		var item = docdivs[index];
		var classAttribute = String(item.className);
		if (classAttribute.toLowerCase().match('quote-box')){
			processdivs.push(item.getAttribute('id'));
			if (processdivs.length != 1) item.style.display = 'none'; //item.setAttribute('style','display:none');
		}
	}
	setInterval('swapFade()',wait);
}

// the function that performs the fade
function swapFade() {
	//Effect.Fade(processdivs[processindex], { duration:1, from:1.0, to:0.0 });
	Effect.toggle(processdivs[processindex], 'appear');
	processindex++;
	if (processindex == processdivs.length) processindex = 0;
	Effect.toggle(processdivs[processindex], 'appear');
	//Effect.Appear(processdivs[processindex], { duration:1, from:0.0, to:1.0 });
}

window.onload = function(){
	setupFade();
}