var fadeVal;
var quoteNumber=-1;
var quotes=[];
var quotees=[];

quotes[0]='"A must attend conference"';
quotees[0]='Brian Foster, Schick-Wilkinson Sword, USA';
 
quotes[1]='"A very educating and informative conference"';
quotees[1]='Ninfa Wilde, Thomson, USA';

quotes[2]='"Excellent conference that gave me vital information and great networking opportunities"';
quotees[2]='Eric Lin, INMAX, Taiwan';

quotes[3]='"High quality information. Excellent venue for networking"';
quotees[3]='Mike Caterina, Parelec Inc, USA';

quotes[4]='"Once again, another excellent conference; it was time well spent"';
quotees[4]='Rick Garber, Colder Products, USA';

quotes[5]='"The best conference of its kind"';
quotees[5]='Michael Kleper, RIT, USA';

quotes[6]='"Ample opportunities to network during conference"';
quotees[6]='Stacey Yamanaka, Flex Products, USA';

function onload() {
	newQuote();
}

function fade() {
	fadeVal+=16;
	if(fadeVal<100) {
		var val=fadeVal.toString(16);
		while(val.length<6) val='0'+val;
		quote.style.color=getColourString(255,255,255,6,11,203,fadeVal);
		quotee.style.color=getColourString(255,255,255,239,150,50,fadeVal);
		setTimeout('fade()',100);
	} else {
		newQuote();
	}
}

function newQuote() {
	quoteNumber=(quoteNumber+1)%(quotes.length);
	quote.style.color='#060BCE';
	quotee.style.color='#EF9632';
	quote.innerText=quotes[quoteNumber];
	quotee.innerText=quotees[quoteNumber];
	fadeVal=0;
	setTimeout('fade()',5000);
}

function getColourString(r1,g1,b1,r2,g2,b2,v1) {
	var v2=100-v1;
	var r=Math.floor((r1*v1+r2*v2)/100);
	var g=Math.floor((g1*v1+g2*v2)/100);
	var b=Math.floor((b1*v1+b2*v2)/100);
	var retval;
	if(r<16) retval='#0'+r.toString(16); else retval='#'+r.toString(16);
	if(g<16) retval=retval+'0'+g.toString(16); else retval=retval+g.toString(16);
	if(b<16) retval=retval+'0'+b.toString(16); else retval=retval+b.toString(16);
	return retval;
}

