// Terry M. Byrd 
// tmbyrd.com
// October 2006 
var rotatethis = new Array('banner1', 'banner2', 'banner3', 'banner4', 'banner5'); 
var i = 0; 
var wait = 7000; 
var counter = 1; 

function setRotate() { 
	showtime = setInterval('beginRotate()',wait); 
	} 

function beginRotate() { 
	Effect.Fade(rotatethis[i], { duration:1, from:1.0, to:0.0 }); 
	i++; 
	if (i==5) counter++; 
		if (counter == 2) { 
			clearInterval(showtime);i=0; 
			Effect.Appear(rotatethis[i], { duration:1, from:0.0, to:1.0 }); 
			}  
		else 
			Effect.Appear(rotatethis[i], { duration:1, from:0.0, to:1.0 }); 
		} 

function togglePause() { 
        clearInterval(showtime); 
        $(str).innerHTML = ($(str).innerHTML != 'Pause' ? 'Pause' : 'Restart'); 
        return true; 
        } 

function toggleNext() { 
	Effect.Fade(rotatethis[i], { duration:1, from:1.0, to:0.0 }); 
	i++; 
	if (i==3) i=0; 
		Effect.Appear(rotatethis[i], { duration:1, from:0.0, to:1.0 }); 
		clearInterval(showtime); 
	} 

function togglePrev() { 
	Effect.Fade(rotatethis[i], { duration:1, from:1.0, to:0.0 }); 
	if (i==0) i=3; 
		Effect.Appear(rotatethis[i-1], { duration:1, from:0.0, to:1.0 }); 
	} 

