/*
 * master.js - 5 October 2007
 * Copyright (c) 2007 - The University of Newcastle, Australia
 *
 *     Scripts for quote cycling for Newcastle Innovation Site.
 */

var currQuote = 0;
function scrollQuotes(){
	container = document.getElementById('scrollingQuotes');
	quotes = container.getElementsByTagName('li');
	qlength = quotes.length;
	quotes[currQuote].className = "pageQuote visible";
	for(x=0;x<quotes.length;x++){
		if(x!=currQuote) {
			quotes[x].className = "pageQuote hidden";
		}
	}
	setInterval("rotate()",6000);
}
function rotate(){
	if(currQuote==qlength-1){
		currQuote = 0;
	} else {
		currQuote = currQuote+1;
	}
	quotes[currQuote].className = "pageQuote visible";
	for(x=0;x<quotes.length;x++){
		if(x!=currQuote) {
			quotes[x].className = "pageQuote hidden";
		}
	}
}

