/***********************************************
* 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
***********************************************/
var delay = 12000; //set delay between message change (in miliseconds)
var maxsteps=30; // 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(239,119,66); // start color (red, green, blue)
var endcolor=new Array(16,117,59); // end color (red, green, blue)
var fcontent=new Array(9);
begintag='<div style="font: normal 11px Verdana; padding: 3px;">'; //set opening tag, such as font declarations
fcontent[0]="Bob was instrumental in the procurement of goods to represent Benjamin Moore's 125th Anniversary. These items had character, were well thought out and became an instant hit with the retailers who purchased them. Bob made sure the items would be timeless, different and of interest. I would not hesitate to use Bob again in finding items for other programs, promotions or events.<br><br><div align='right'><b>Celia Aquilante-Rivera<br>Benjamin Moore Paints - Corporate</b></div>";
fcontent[1]="Bob has impressed me with his attention to detail and customer satisfaction follow-up. Orders are filled correctly and promptly at a very favorable price. When challenged to be creative he and his people have responded in a very positive manner. I would recommend him to handle most any task he would choose to undertake.<br><br><div align='right'><b>Mike Moorehead<br>Shammy Shine Car Washes</b></div>";
fcontent[2]="Bob can literally make miracles happen! Bob helped me several times when the pressure was on - he's provided custom embroidered shoe bags for a golf outing on a 72 hour turnaround (yes, EMBROIDERED! And we needed over 100 of them!). I also worked with Bob for crystal recognition pieces for donors and event sponsors. Each time I've worked with Bob, the item recommendations have been top notch, the customization flawless, and the whole process from beginning to end has been absolutely smooth. I have switched employers and made sure to bring Bob's contact information with me. He follows through and makes sure every detail is correct... even on tight deadlines. His customer service is top notch. I highly recommend him.<br><br><div align='right'><b>Amy Boright-Siperstein<br>American Cancer Society</b></div>";
fcontent[3]="I've worked with Bob for many years and he's never let me down. I know that a call will yield results and if for some strange reason he is unable to obtain an item or meet a price point, he is upfront and honest, but he'll keep on looking. I've recommended his services to a few people all with positive results.<br><br><div align='right'><b>Rick Schoenen<br>Coordinated Health</b></div>";
fcontent[4]="Bob has done a great job in providing the Valley Preferred Cycling Center with numerous apparel/merchandise options for the past couple of years. Always on time, always good work, and always willing to listen and provide good feedback to our needs.<br><br><div align='right'><b>Erin Hartwell<br>Valley Preferred Cycling Center</b></div>";
fcontent[5]="Bob is extremely easy to work with and very accommodating. I have used Bob several times and each experience was superb. Quality products and quality service is the best way to sum up our business relationship. Bob is my number one pick for all my apparel and branding products. I recommend Bob to anyone who wants excellent service and top-notch products.<br><br><div align='right'><b>Aaron Boggs<br>Advanced Hard Surface Cleaning</b></div>";
fcontent[6]="Bob is an expert in his field. I pursued his services because of his reputation as a task master as well as being able to finish jobs on time. My experience with him, from start to finish, was completely professional and he completed the project ahead of time which was beneficial to me.<br><br><div align='right'><b>Matt DeLuca<br>All Phase Investment Group</b></div>";
fcontent[7]="I have worked with Bob on several projects. Bob has been a pleasure to work with. He makes things easy and offers good quality products at reasonable prices.<br><br><div align='right'><b>Scott Martenis<br>Oldcastle/Anchor Concrete</b></div>";
fcontent[8]="Bob has always come through with great ideas, quality products, and on time delivery at a competitive price. A great vendor to work with. Highly recommended.<br><br><div align='right'><b>Peter Leiser<br>Sherman Williams Paints - Corporate</b></div>";
closetag='</div>';
var fwidth='250px'; //set scroller width
var fheight='250px'; //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;

var randomizecontents="yes" //randomize dislay order of images? "yes" or "no"
function shuffleit(){
return Math.floor((Math.random()*fcontent.length-1))
}

if (randomizecontents=="yes")
fcontent.sort(shuffleit)
/*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