/***********************************************
* Fading Scroller- � Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
***********************************************/

/// No need to edit below this line //


var ie4=document.all&&!document.getElementById;
var DOM2=document.getElementById;
var faderdelay=0;
var index=0;


/*Rafael Raposo edited function*/
//function to change content
function changecontent(){
if (index>=fcontent.length)
index=0
if (DOM2){
document.getElementById("fscroller").style.color="rgb("+startcolor[0]+", "+startcolor[1]+", "+startcolor[2]+")"
document.getElementById("fscroller").innerHTML=begintag+fcontent[index]+closetag
if (fadelinks)
linkcolorchange(1);
colorfade(1, 15);
}
else if (ie4)
document.all.fscroller.innerHTML=begintag+fcontent[index]+closetag;
index++
}

// colorfade() partially by Marcio Galli for Netscape Communications.  ////////////
// Modified by Dynamicdrive.com

function linkcolorchange(step){
var obj=document.getElementById("fscroller").getElementsByTagName("A");
if (obj.length>0){
for (i=0;i<obj.length;i++)
obj[i].style.color=getstepcolor(step);
}
}

/*Rafael Raposo edited function*/
var fadecounter;
function colorfade(step) {
if(step<=maxsteps) {	
document.getElementById("fscroller").style.color=getstepcolor(step);
if (fadelinks)
linkcolorchange(step);
step++;
fadecounter=setTimeout("colorfade("+step+")",stepdelay);
}else{
clearTimeout(fadecounter);
document.getElementById("fscroller").style.color="rgb("+endcolor[0]+", "+endcolor[1]+", "+endcolor[2]+")";
setTimeout("changecontent()", delay);

}   
}

/*Rafael Raposo's new function*/
function getstepcolor(step) {
var diff
var newcolor=new Array(3);
for(var i=0;i<3;i++) {
diff = (startcolor[i]-endcolor[i]);
if(diff > 0) {
newcolor[i] = startcolor[i]-(Math.round((diff/maxsteps))*step);
} else {
newcolor[i] = startcolor[i]+(Math.round((Math.abs(diff)/maxsteps))*step);
}
}
return ("rgb(" + newcolor[0] + ", " + newcolor[1] + ", " + newcolor[2] + ")");
}

/// No need to edit above this line //

var delay = 6000; //set delay between message change (in miliseconds)
var maxsteps=30; // number of steps to take to change from start color to endcolor
var stepdelay=50; // time in miliseconds of a single step
//**Note: maxsteps*stepdelay will be total time in miliseconds of fading effect
var startcolor= new Array(227,26,27); // start color (red, green, blue)
var endcolor=new Array(255,255,255); // end color (red, green, blue)

var fcontent=new Array();
begintag='<h2>Testimonials</h2> <blockquote>'; //set opening tag, such as font declarations
fcontent[0]="\"Thanks for the fun team offsite. It was a lot of fun doing the cooking and then eating the results along with some ...wines\"<br><br>-Onshore Gas Exploitation";
fcontent[1]="\"Just cooking with people and sharing food created friendship, breaking bread together\"<br><br>-NAB";
fcontent[2]="\"The team bonding and interaction was the best part of the day\"<br><br>-Macquarie Bank";
fcontent[3]="\"Hands on cooking was a great way to take ourselves out of the normal work environment, have some fun, learn a few new skills and then enjoy the results of your combined efforts.\"<br><br>-City of Unley";
fcontent[4]="\"The best part was making the food in teams and working together\"<br><br>-BUPA Australia Group";
fcontent[5]="\"It was really good fun and a great team event. I had a fabulous time\"<br><br>-Ferrier Fashion Fabrics";
fcontent[6]="\"Thanks again for your efforts in making it a fun-filled session\"<br><br>-Fosters Group";
fcontent[7]="\"We really enjoyed the experience and have already suggested the idea to others\"<br><br>-GE Money-Motor Solutions";
fcontent[8]="\"Being able to work together having fun and having a yummy pizza to take home was the best part of the day\"<br><br>-Ambulance SA";
fcontent[9]="\"Any small team group looking to have some fun and bond together to produce something would benefit from an experience with Fun.Food.Focus\"<br><br>-SANTOS";
fcontent[10]="\"The venue was terrific (as always), the tour and the cooking demonstrations a wonderful hit and the canap&eacute;s were sensational\"<br><br>-All Occasions Group";
fcontent[11]="\"The best part was cooking and getting to know each other\"<br><br>-Rural Press";
closetag='</blockquote>';















var fwidth='170px'; //set scroller width
var fheight='100px'; //set scroller height

var fadelinks=1;  //should links inside scroller content also fade like text? 0 for no, 1 for yes.

if (ie4||DOM2)
	document.write('<div id="fscroller" style="border:0px solid black;width:'+fwidth+';"></div>');

	if (window.addEventListener)
		window.addEventListener("load", changecontent, false)
	else if (window.attachEvent)
		window.attachEvent("onload", changecontent)
	else if (document.getElementById)
		window.onload=changecontent