//javascript

var delay = 9000; //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(179,120,062); // start color (red, green, blue)
var endcolor=new Array(255,255,255); // 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
fcontent[0]="&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;Danielle has opened my eyes and heart to self discovery.  She provides the perfect amount of support and encouragement but also allows you to come to your own conclusions. With her assistance, I have learned more about myself than I ever thought I would.  I always leave my sessions energized and uplifted!&quot; <br><br><b>S.A.</b>";
fcontent[1]="&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;Since I met Danielle, I have always admired and appreciated her work.  She is smart, warm, generous, friendly, humble and very understanding.  Danielle has a very good connection with teens.  She is always working to support others and her work is motivating.&quot;<br><br><b>Gabriela Leon, Family Support Specialist</b>";
fcontent[2]="&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;Danielle is great!  Before talking to her I thought it was a sign of weakness to go to therapy.  Now I know that the techniques I have learned can help me through many challenges in my life.&quot;<br><br><b>S.V.</b>";
fcontent[3]="&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;Having worked with Danielle over the past few years - both as her supervisor and later as a colleague in the field- I have come to know her as an insightful, skilled and dedicated therapist who genuinely cares for her clients.&quot;<br><br><b>Erin Rogich, LMHC</b>";
fcontent[4]="&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;Danielle provides a very comforting and supportive style for her clients.  Between her knowledge, her enthusiasm for helping others to attain well-being, her counseling skills and her intution, Danielle holds solid qualifications as a therapist.  In addition, she has tremendous interest and comprehension of cross-cultural issues.  She truly understands what a person needs in the way of therapy.&quot;<br><br><b>Isadora Arevalo-Wong, LMHC</b>";
fcontent[5]="&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;Danielle's therapuetic style encompasses compassion, respect, openess, and a willingness to support people through various life transitions.  Danielle has a genuine care for cultural sensitivity in her practice.&quot;<br><br><b>K.O.</b>";
fcontent[6]="&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;I have always admired and appreciated Danielle's work.  She is smart, warm, generous, friendly, humble and very understanding.  Danielle has a very good connection with teens.  She is always working to support others and her work is motivating.&quot;<br><br><b>Gabriela Leon, Family Support Specialist</b>";
closetag='</div>';

var fwidth='120px'; //set scroller width
var fheight='100%'; //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
