/***********************************************
customized by http://www.closerlooksearch.com
***********************************************/

var delay = 600; //set delay between message change (in miliseconds)
var maxsteps=200; // 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(91,91,91); // start color (red, green, blue)
var endcolor=new Array(164,163,163); // end color (red, green, blue)

var fcontent=new Array();
//begintag='<div style="font: normal 11px Arial; padding: 5px;">'; //set opening tag, such as font declarations
begintag='<div style="font: normal 8pt Arial; text-align:left; vertical-align:middle;">';

fcontent[0]='<span>" Now our website is pulling in new business left and right. This is a huge turn around. We were able to realize this turn around because you have been a partner in our website, bringing your knowledge of marketing, design and search engine optimization to every conversation. I appreciate your vigilance and the ideas you bring to make the site a continuous revenue generator." </p><p align=right class="list">Jennifer Imes</span>';
fcontent[1]='<span>" Thank you for the wonderful job on our new web site.  The design, layout and quality of work have been exceptional. We would recommend you to anyone who is looking for a website that is professional, yet reflects what you want." </p><p align=right class="list">Cheryl & Lundy</span>';
fcontent[2]='<span>" As a business owner trying to make ends meet it takes a lot for me to believe something will work. I have found the leads coming in from the new website are about 10 times what they used to be and growing. How can we not be excited about that ?" </p><p align=right class="list">Jim Vaive</span>';
fcontent[3]='<span>" We have noticed a marked improvement in customer communications. Your assistance with our branding has landed us a major new contract. The timeliness, content, layout and workflow has been exemplary." </p><p align="right" class="list">Scott Steckel</span>';
fcontent[4]='<span>" Our website has been a valuable tool in securing new contracts.  We have found your services to be professional and creative. After sales service is superb." </p><p align=right class="list">Avtar</span>';
fcontent[5]='<span>" …did a terrific job on my insurance website. What makes them a notch above all the other web designers is that they take time to understand your business and are able to get your message across to the consumer and drive potential clients to your website!" </p><p align=right class="list">Ron</span>';
fcontent[6]='<span>" Thank you for your help with designing the website for our practice. We are very happy with the results and the support that you have offered. You suggestions were very helpful and have exceeded our expectations. I would recommend your services without hesitation." </p><p align="right" class="list">Sridhar</span>';
fcontent[7]='<span>" They completely transformed our web site into a highly functional and very stylish tool for communicating with our retail customers. We were very pleased with their approach and they were receptive to incorporating our ideas to make our web site dynamic and very easy to maneuver. They were mindful of budget concerns and kept us apprised of where we stood during the process. We are also excited to continue our relationship with his company as they maintain our web site into the future. They helped us design a new logo that fits what we are about in the twenty first century. They gave us options and made sure we were pleased with the choices made. They were easy to communicate with and showed a great interest in our company. I believe that personal touch allowed them to put together a package that was just right for our business." </p><p align="right" class="list">Ned</span>';

closetag='</div>';

var fwidth='100%'; //set scroller width
var fheight=''; //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="border:0px solid black;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
