var delay = 3000; //set delay between message change (in miliseconds)
var maxsteps=60; // number of steps to take to change from start color to endcolor
var stepdelay=40; // time in miliseconds of a single step
//**Note: maxsteps*stepdelay will be total time in miliseconds of fading effect
var startcolor= new Array(255,255,255); // start color (red, green, blue)
var endcolor=new Array(210,156,202); // end color (red, green, blue)




var fcontent=new Array();
begintag='<p><strong>'; //set opening tag, such as font declarations

fcontent[0]='"Last night’s talks confirmed a lot of thoughts as well as creating new thought patterns, which is what you always hope to get from these types of events (Future Trends Y’all)"';
fcontent[1]='"CEC is certainly inspiring Scotland to be creative and to enjoy itself in doing so, a pleasure and joy to be part of this club."';
fcontent[2]='"A perfect mix of event, networking and inspiration! (Pecha Kucha Vol 2 Glasgow) "'; 
fcontent[3]='"Wanted to say thanks for the event last night.  I had a ball!  It was encouraging to meet other people from my industry and Jonathan Sands was inspirational.  (Creative & Corporate Love)"';
fcontent[4]='"The two talks complimented each other.  It made you think from two very different angles.  Trend colours and trend cultures – really excellent night. (Future Trends Y’all)"';
fcontent[5]='"That was a bloody good night - I learnt a lot. In spite of the fact we`ll need to do something equally great, we want to speak at the next one! (Pecha Kucha Vol 2 Glasgow)"';
fcontent[6]='"Just wanted to say a huge thank you for organising last night.  I so enjoyed it and left feeling very inspired. (Future Trends Y’all)"';
fcontent[7]='"Thank you for last night`s event - the debate has spilled over in to the office today & is stimulating much discussion!"'
fcontent[8]='"thank you for a truly great night last night, I, and I expect everyone else there, really enjoyed every aspect of the evening. (Creative & Corporate Love)"';
fcontent[9]='"Inspirational, great for getting a feel for what is happening in the industry, and also on a global scale. (Future Trends Y’all)"';
fcontent[10]='"I found the event really interesting and it definitely provided a hot debate after the meeting (2020 vision)"';
fcontent[11]='"It was excellent, only problem was I wanted to listen to the second talk for much longer as it was so inspirational. (Future Trends Y’all)"';
fcontent[12]='"Another superb and well-organised event, I would also like to remark on the professionalism of the entire CEC team it has certainly been a pleasure coming along to the various events.  (Creative & Corporate Love)"';
fcontent[13]='"The presentation started you thinking about bigger things out there and changes in what consumers want/expect so you can consider new possibilities in terms of product range, horizons, everything!"';
fcontent[14]='"I found the 2020 vision evening really interesting and it definitely provided a hot debate after the meeting!"'
fcontent[15]='"Really enjoyed last night (always good to get stuff off your chest...) and think events like that work well alongside the bigger CEC events - hope this will continue..."'
fcontent[16]='"WWW was a really good workshop and I got a lot more out of it than I thought I would.  Good networking opportunity too!!!"'
fcontent[17]='"The venue for WWW was great, food was fab, really liked the informal layout & the chance to chat over sit down lunch - makes it less intimidating!"'
fcontent[18]='"So just to continue the great round of back slapping - it sounded like a great night sorry I missed it - but I am NOT going to miss the next one…"'
fcontent[19]='"I thought Pecha Kucha was great – an inspired format."'
fcontent[20]='"Very, very nice event.  I really enjoyed myself, after coming to terms with the speed of things,  Pecha Kucha is a great event"'
fcontent[21]='"Many congratulations on producing an excellent event last night – there was a real buzz about the place and attendance was very impressive."'
fcontent[22]='"Our team found the event extremely insightful. We were buzzing around the office the morning after bursting with ideas."'
fcontent[23]='"I thought the event was fantastic, the presentation and the venue were both inspiring and I really got a lot from it"'
fcontent[24]='"My passion for design re-surfaced after the presentation and I talked of big ideas with my colleague all the way back to Glasgow!"'
fcontent[25]='"It was a great success and fabulous venue"'
fcontent[26]='"I thought the venue was absolutely perfect and very well hosted. The presentation was well focused and very genuine."'
fcontent[27]='"We thought the Creative Fear event was excellent and incredibly useful – we went back to work on Tuesday with renewed energy!"'

closetag='</strong></p>';

var fwidth='475px'; //set scroller width
var fheight='48px'; //set scroller height

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

///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] + ")");
}

if (ie4||DOM2)
  document.write('<div id="fscroller" style="width:'+fwidth+';height:'+fheight+'"></div>');

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