/***********************************************
* 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 = 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=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(255,255,255); // 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]="<div align='left'>You did a great, super, wonderful job and we can’t thank you enough...</div><br><br><div align='right'><b>Dept. of Human Relations<br>Northampton County</b></div>";
fcontent[1]="<div align='left'>...the response to your two segments was overwhelmingly positive. I know I felt the two sessions accomplished the goals I had in mind.</div><br><br><div align='right'><b>Manager<br>Global Applications Department<br>Air Products & Chemicals, Inc.</b></div>";
fcontent[2]="<div align='left'>You did a great job of focusing on the issues and emotions at the heart of our process and gave each of us use full information and exercises to help clarify various aspects of change, and strengthen our own styles of leadership.</div><br><br><div align='right'><b>President and CEO<br>Good Shepherd Rehabilitation Hospital</b></div>";
fcontent[3]="<div align='left'>I believe that we accomplished an enormous amount in laying the groundwork for reformulating our strategic plan. It would not have been possible without the valuable contributions of Marilyn Marles...</div><br><br><div align='right'><b>Chairman, PA 2000<br><i>Former Chairman,<br>Air Products & Chemicals, Inc.</i></b></div>";
fcontent[4]="<div align='left'>Best and clearest I’ve ever seen anyone walk a group through <b>Situational Leadership®</b>! Great job!</div><br><br><div align='right'><b>Senior Training Specialist<br>Air Products & Chemicals, Inc.</b></div>";
fcontent[5]="<div align='left'>As you witnessed first-hand, a substantial and substantive discussion ensued during your presentation. What you did not see, but should definitely take credit for, was the continuing dialogue over the next two days about the performance review process...</div><br><br><div align='right'><b>Director of Bridge Operations<br>Delaware River and Bay Authority</b></div>";
fcontent[6]="<div align='left'>…just a short note to let you know I am really enjoying working with Marilyn…We are already seeing a 100% increase in productivity over this time last year…</div><br><br><div align='right'><b>Program Manager<br>US Government Agency</b></div>";
fcontent[7]="<div align='left'>Thanks again for your fine facilitation of our “organizational transition” meeting yesterday.  … I thought those present were quite engaged and brought a range of perspectives. I think you captured our agenda and facilitated it with quite some sensitivity ...Your good work has propelled us into even deeper and wider strategic planning.</div><br><br><div align='right'><b>Program Director<br>Human Services Organization</b></div>";
fcontent[8]="<div align='left'>I entered the coaching process with a mixture of anticipation and uncertainty… I came enjoy our weekly meetings.  Marilyn challenged me to look at situations differently and strategize new approaches.<br><br>The processes that were most beneficial to me were:<br><br><b>SkillScope (staff response)</b><br><br><b>Weekly meetings that helped me to understand my role in the current situation</b><br><br><b>The challenging nature of many of Marilyns approach</b><br><br>I was very happy with the coaching experience…  I have continued to use the lessons learned…</div><br><br><div align='right'><b>Executive Director<br>Non-for-profit Organization</b></div>";
closetag='</div>';
var fwidth='210px'; //set scroller width
var fheight='600px'; //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
