/***********************************************
* 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 = 8000; //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(255,255,255); // start color (red, green, blue)
var endcolor=new Array(102,0,153); // end color (red, green, blue)

var fcontent=new Array();
begintag='<div style="padding:20px;">'; //set opening tag, such as font declarations
fcontent[0]="<p>&quot;...[W]e put students in groups not only to promote a deeper level of learning but because learning " +
            "to talk with or listen to others is, perhaps, the single most important skill needed to be successful " +
            "in any career field. A rationale for asking students to make presentations before the whole class is " +
            "that learning to speak in front of others is crucial to career success.&quot;</p>" +
            "<div style=\"margin-top:5px;text-align:right;font-weight:bold;\">&#187; Terry Doyle, Ferris State University</div>";
fcontent[1]="<p>&quot;Communication is essential for life.&quot;</p>" +
            "<div style=\"margin-top:5px;text-align:right;font-weight:bold;\">&#187; Steven Beebe, Texas State University</div>";
fcontent[2]="<p>&quot;Virtually everyone communicates at work. No matter what the field, and no matter how much you know about " +
            "your job, specialized knowledge alone isn't enough to guarantee success; communication skills are also vital.&quot;</p>" +
            "<div style=\"margin-top:5px;text-align:right;font-weight:bold;\">&#187; Ron Adler, Santa Barbara City College</div>";
fcontent[3]="<p>&quot;Freedom of speech is of no use to a man who has nothing to say.&quot;</p>" +
            "<div style=\"margin-top:5px;text-align:right;font-weight:bold;\">&#187; Franklin D. Roosevelt</div>";
fcontent[4]="<p>&quot;Never doubt that a small group of concerned citizens can change the world; it's the only thing that ever " +
            "has.&quot;</p>" +
            "<div style=\"margin-top:5px;text-align:right;font-weight:bold;\">&#187; Margaret Mead</div>";
fcontent[5]="<p>&quot;Among the most important skills we need to help our students develop are speaking and listening. " +
            "These are also the most overlooked in our teaching. The ironic part of this is that these are the very " +
            "activities that our students will do more often than any other on a day-to-day basis at work. As such, " +
            "they are crucial skills to their professional success.&quot;</p>" +
            "<div style=\"margin-top:5px;text-align:right;font-weight:bold;\">&#187; Terry Doyle, Ferris State University</div>";
fcontent[6]="<p>&quot;The best of life is conversation, and the greatest success is confidence, or perfect understanding " +
            "between sincere people.&quot;</p>" +
            "<div style=\"margin-top:5px;text-align:right;font-weight:bold;\">&#187; Ralph Waldo Emerson</div>";
fcontent[7]="<p>&quot;Listening, not imitation, may be the sincerest form of flattery.&quot;</p>" +
            "<div style=\"margin-top:5px;text-align:right;font-weight:bold;\">&#187; Joyce Brothers</div>";
fcontent[8]="<p>&quot;Good communication is as stimulating as black coffee and just as hard to sleep after.&quot;</p>" +
            "<div style=\"margin-top:5px;text-align:right;font-weight:bold;\">&#187; Anne Morrow Lindbergh</div>";
fcontent[9]="<p>&quot;Learn to listen. Opportunity could be knocking on your door very softly.&quot;</p>" +
            "<div style=\"margin-top:5px;text-align:right;font-weight:bold;\">&#187; Frank Tyger</div>";
fcontent[10]="<p>&quot;The greatest compliment that was ever paid me was when one asked me what I thought, and " +
            "attended to my answer.&quot;</p>" +
            "<div style=\"margin-top:5px;text-align:right;font-weight:bold;\">&#187; Henry David Thoreau</div>";
fcontent[11]="<p>&quot;Today's successful leaders will work diligently to engage others in their cause. Oddly " +
            "enough, the best way, by far, to engage others is by listening - seriously listening - to them.&quot;</p>" +
            "<div style=\"margin-top:5px;text-align:right;font-weight:bold;\">&#187; Tom Peters</div>";
fcontent[12]="<p>&quot;Everybody's lying these days, but it doesn't matter because nobody's listening.&quot;</p>" +
            "<div style=\"margin-top:5px;text-align:right;font-weight:bold;\">&#187; Lieberman's Law</div>";
fcontent[13]="<p>&quot;Seek first to understand, then to be understood.&quot;</p>" +
            "<div style=\"margin-top:5px;text-align:right;font-weight:bold;\">&#187; Steven Covey</div>";
fcontent[14]="<p>&quot;Blessed are those who have nothing to say and who cannot be persuaded to say it.&quot;</p>" +
            "<div style=\"margin-top:5px;text-align:right;font-weight:bold;\">&#187; James Russell Lowell</div>";
fcontent[15]="<p>&quot;He says, she says - but neither acknowledges what the other says.&quot;</p>" +
            "<div style=\"margin-top:5px;text-align:right;font-weight:bold;\">&#187; Michael Nichols</div>";
fcontent[16]="<p>&quot;I have a task and that is talking to you. You have a task and that is listening to me. " +
            "I hope you do not finish before I do.&quot;</p>" +
            "<div style=\"margin-top:5px;text-align:right;font-weight:bold;\">&#187; (author unknown)</div>";
fcontent[17]="<p>&quot;Our quest for meaning in this world begins and ends with facial expression.&quot;</p>" +
            "<div style=\"margin-top:5px;text-align:right;font-weight:bold;\">&#187; Dale Leathers</div>";
fcontent[18]="<p>&quot;I see communication as a large umbrella that covers and affects all that goes on " +
            "between human beings. Once a human being has arrived on this earth, communication is the single " +
            "factor determining what kinds of relationships they make with others and what happens to them " +
            "in the world.&quot;</p>" +
            "<div style=\"margin-top:5px;text-align:right;font-weight:bold;\">&#187; Virginia Satir</div>";
fcontent[19]="<p>&quot;The most basic of all human needs is to understand and be understood.&quot;</p>" +
            "<div style=\"margin-top:5px;text-align:right;font-weight:bold;\">&#187; Ralph Nichols</div>";
fcontent[20]="<p>&quot;People don't get along because they fear each other. People fear each other because " +
            "they don't know each other. People don't know each other because they have not properly " +
            "communicated.&quot;</p>" +
            "<div style=\"margin-top:5px;text-align:right;font-weight:bold;\">&#187; Dr. Martin Luther King</div>";
fcontent[21]="<p>&quot;Findings from a Menninger Clinic study indicated that seventy percent of the people " +
            "who lose jobs do so because of poor communication rather than poor performance.&quot;</p>";
fcontent[22]="<p>&quot;The communication skills ranked as most important to job effectiveness include " +
            "listening, persuading, advising, instructing, and small group problem solving.&quot;</p>" +
            "<div style=\"margin-top:5px;text-align:right;font-weight:bold;\">&#187; Speech Communication " +
            "Association, 1996</div>";
closetag='</div>';

var fwidth='350px'; //set scroller width
var fheight='200px'; //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:none;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