var delay = 7000; //set delay between message change (in miliseconds)
var maxsteps=10; // number of steps to take to change from start color to endcolor
var stepdelay=30; // 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(0,0,0); // end color (red, green, blue)

var fcontent=new Array();
fcontent[0]="<img src='./images/intro_icon_23_L.gif'/><a href='./callcenter/testimonials.htm'>PrettyMay Call Center was just what we were looking for with regard to our small business.  We literally built a server ...</a><img src='./images/intro_icon_23_R.gif'/><br>Cyrus Nooriala<br>Cywest Communications, Inc.";
fcontent[1]="<img src='./images/intro_icon_23_L.gif'/><a href='./callcenter/testimonials.htm'>Now that we have installed Pretty May Call Centre for Skype we can be confident that calls don't get \"lost\"and that we are always contactable...</a><img src='./images/intro_icon_23_R.gif' /><br>Vinnie de Oliveira<br>Intertransfer LTD";
fcontent[2]="<img src='./images/intro_icon_23_L.gif'/><a href='./callcenter/testimonials.htm'>PrettyMay Call Center for Skype has made it easy to receive our calls regardless of our location with ONE CENTRAL SKYPEIN NUMBER.Our phone...</a><img src='./images/intro_icon_23_R.gif' /><br>James Zhu<br>InfoHub, Inc.";
fcontent[3]="<img src='./images/intro_icon_23_L.gif'/><a href='./callcenter/testimonials.htm'>Pretty May allows us to stay in contact wherever we are by allowing our customers to directly contact any member of our team on their mobiles...</a><img src='./images/intro_icon_23_R.gif' /><br>Evan Burkosky<br>konnichiwa-japan, inc.";
fcontent[4]="<img src='./images/intro_icon_23_L.gif'/><a href='./callcenter/testimonials.htm'>You are on the cutting edge of a Skype Small Business Revolution.  Our phone bill went from $600 per month to $36 per year...</a><img src='./images/intro_icon_23_R.gif' /><br>Doug Burrier<br>Northwest Church";
fcontent[5]="<img src='./images/intro_icon_23_L.gif'/><a href='./callcenter/testimonials.htm'>My phone bill has dropped a whopping 70 percent. The transition is not painless.</a><img src='./images/intro_icon_23_R.gif' /><br>Mark Wright<br>Tech Services";
fcontent[6]="<img src='./images/intro_icon_23_L.gif'/><a href='./callcenter/testimonials.htm'>PMCC was an ideal choice for us.  Internet technology and products like PMCC have put the business owner back in control of their fixed costs. </a><img src='./images/intro_icon_23_R.gif' /><br>Scott Huse<br>the S.A.F.E. TEAM";
fcontent[7]="<img src='./images/intro_icon_23_L.gif'/><a href='./callcenter/testimonials.htm'>We find it convenient and easy to use and administer. Our phone costs have also plummeted from around $1500.00/ month to around $10.00/ month. </a><img src='./images/intro_icon_23_R.gif' /><br>Jon Roth<br>BrightBridge Studios";
fcontent[8]="<img src='./images/intro_icon_23_L.gif'/><a href='./callcenter/testimonials.htm'>We are a new small business and it allows us to have a complete call center for a lot less money than other solutions. </a><img src='./images/intro_icon_23_R.gif' /><br>Mark Stephenson<br>Country Connections LLC";
fcontent[9]="<img src='./images/intro_icon_23_L.gif'/><a href='./callcenter/testimonials.htm'>Excellent, excellent, excellent product.  Excellent, excellent, excellent technical support.  What more you could you ask for? </a><img src='./images/intro_icon_23_R.gif' /><br>Alex Limbert<br>A P Limbert CPA";


var fwidth='220px'; //set scroller width
var fheight='160px'; //set scroller height

var fadelinks=0;  //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=fcontent[index]
    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"></div>');

if (window.addEventListener)
window.addEventListener("load", changecontent, false)
else if (window.attachEvent)
window.attachEvent("onload", changecontent)
else if (document.getElementById)
window.onload=changecontent

