QUOTECONTROL = function() {
	qcthis = this;
	this.time = 7500;
	this.pos = 1;
	this.alpha = 100;
	this.speed = 20;
	this.step = 10;
	this.change = setTimeout('qcthis.doChange()', this.time);
	this.obj = document.getElementById('quote');
	this.cantransition = (this.obj.style.opacity == undefined) ? false : true;
	this.doChange = function() {
		this.transitionOut();
	}
	this.transitionOut = function() {
		if(this.cantransition && this.alpha > 0) {
			this.alpha -= this.step;
			this.setAlpha();
			this.change = setTimeout('qcthis.transitionOut()', this.speed);
		} else {
			this.changeQuote();
		}
	}
	this.changeQuote = function() {
		this.pos = (this.pos == quotes.record) ? 1 : this.pos+1;
		var q = '<p>' + quotes['quote' + quotes.list[this.pos-1]] + '</p><p class="quoteby"><strong class="highlight">&raquo;</strong> ' + quotes['title' + quotes.list[this.pos-1]] + ' | <span>' + quotes['affiliation' + quotes.list[this.pos-1]] + '</span></p>';
		this.obj.innerHTML = q;
		this.transitionIn();
	}
	this.transitionIn = function() {
		if(this.cantransition && this.alpha < 100) {
			this.alpha += this.step;
			this.setAlpha();
			this.change = setTimeout('qcthis.transitionIn()', this.speed);
		} else {
			this.change = setTimeout('qcthis.doChange()', this.time);
		}
	}
	this.setAlpha = function() {
		this.obj.style.opacity = this.alpha/100;
		this.obj.style.filter = 'alpha(opacity=' + this.alpha + ')';
	}
}
var qc;
function startQuotes() {
	if(document.getElementById) {
		qc = new QUOTECONTROL();
	}
}
