/***********************************************
* 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 = 10000; //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(0,0,0); // end color (red, green, blue)

var fcontent=new Array();
begintag='<div>'; //set opening tag, such as font declarations
fcontent[0]="<p>Susan Scanland presented &quot;True Wealth with Memory Health&quot; in our bank\'s retirement lecture series... Susan is absolutely superb in conveying the overall message, in her presentation skills and, in kno...</p><p class='testimonialName'>Assistant Vice President<br />Oneonta NY</p>";
fcontent[1]="<p>There was so much valuable information in your presentation on Namenda. Your knowledge is awesome!! Thank you for sharing it!!!!</p><p class='testimonialName'>Debra S. Kase<br />Manager of Activities, Carlisle PA</p>";
fcontent[2]="<p>Susan, you are a star! What a nice job you did on both radio shows in Providence RI and Phoenix AZ. Great information in a relaxed, articulate manner.</p><p class='testimonialName'>Mimi Secor MS, MEd, NP, FAANP<br />Former CEO, NPACE, Lexington MA</p>";
fcontent[3]="<p>No doubt, Susan Scanland is the best speaker I have ever heard on the topics of Alzheimer\'s, dementias and depression.</p><p class='testimonialName'>Mary Martin, RN, BS, BSN<br />Director of Client Service for PA, CHEM Rx Long Term Care Pharmacy</p>";
fcontent[4]="<p>Very engaging speaker who provides information in an enthusiastic manner...The up-to-date research-based information was excellent!</p><p class='testimonialName'>Anita Linder RN, ANP <br />Midlands Psychiatric Associates, Columbia SC</p>";
fcontent[5]="<p>What an outstanding source of knowledge and support; my mother has fronto-temporal dementia. My wife\'s father has both vascular and Lewy body dementia, so we\'ve been hammered on both sides.</p><p class='testimonialName'>Mark R. Finksburg MD<br /></p>";
fcontent[6]="<p>Scanland\'s e-newsletter helps the busy clinician keep up with the latest studies and trends. She does the work. You, the clinician, stay current. </p><p class='testimonialName'>Susan Wysocki WHNP-BC, FAANP, President/CEO<br />National Assn. of NPs in Women's Health</p>";
fcontent[7]="<p>Susan Scanland presented me with a lot of options to look into for the cause of my dad\'s disease. I\'m truly thankful for her insight! Maybe we can finally get some answers. Thanks!</p><p class='testimonialName'>Paula S. Latrobe PA<br /></p>";
fcontent[8]="<p>Susan Scanland was unquestionably one of the best speakers...Her knowledge of older adults and her ABILITY to communicate that knowledge for a diverse audience was astounding!</p><p class='testimonialName'>Attendee<br />Assisted Living Federation of America-GA</p>";
fcontent[9]="<p>I wasn\'t even aware there were treatments to slow down the progression of the illness. Thank you, Susan for giving us direction with this challenge in our lives.</p><p class='testimonialName'>Bill F. Girardville PA<br /></p>";
fcontent[10]="<p>Susan is informative and presents in a very clear manner.</p><p class='testimonialName'>Mary Rafter<br />Scranton PA</p>";
fcontent[11]="<p>Susan is extremely knowledgeable on dementia and Alzheimer\'s and very well spoken. I enjoyed her very much.</p><p class='testimonialName'>Phoebe Smith BS, SSW, Social Worker<br />Northern Cambria PA</p>";
fcontent[12]="<p>The information that you provided was timely and helpful, and I have already been able to integrate it into my practice and share with my peers.</p><p class='testimonialName'>Gillian Moore ARNP, Nurse Practitioner<br />Select Care of Oklahoma, Ardmore OK</p>";
fcontent[13]="<p>It was my pleasure to hear your excellent presentation on caring for persons who have Alzheimer\'s. Thank you so much for answering the many questions I had.</p><p class='testimonialName'>Florence Janis RN, MA<br />Elder Community Health Volunteer, Northeast Region of PA Council, White Haven PA</p>";
fcontent[14]="<p>The potential for Susan Scanland to help caregivers is HUGE, with her knowledge and compassion!</p><p class='testimonialName'>Suzanne Kyra MA, Author, award winning book, Welcome Home to Yourself<br />Vancouver BC</p>";
fcontent[15]="<p>Susan can relate to her audience as she tells her story with passion and conviction. I know you will be pleased with Susan. She gave the best Alzheimer\'s presentation attendees ever heard. </p><p class='testimonialName'>Howard Bradley, Former Nat. Acct. Dir. LTC<br />Johnson & Johnson</p>";
fcontent[16]="<p>I\'ve co-presented with Susan. Her knowledge and presentations significantly impact consultant pharmacists\' knowledge ... It has been an honor to serve on programs with her.</p><p class='testimonialName'>James Cooper PhD BCPS CGP FASCP FASHP<br />Prof. Emeritus, College of Pharmacy, U-GA, Athens GA</p>";
fcontent[17]="<p>Susan\'s vast knowledge and national expertise in dementia enabled us to use the latest research in our presentations on Alzheimer\'s and Parkinson\'s dementia.</p><p class='testimonialName'>W. Lane Edwards, MSN, ARNP<br />Partners in Healthcare Education LLC, Fort Myers FLA</p>";
fcontent[18]="<p>Susan Scanland answered questions about my husband\'s Alzheimer\'s medications. I would drive halfway across PA just to hear her speak...SUSAN WAS TRULY THE ANSWER TO MY PRAYERS!</p><p class='testimonialName'>Judith G.<br />Monongahela, PA</p>";
fcontent[19]="<p>I always find Susan\'s e-newsletters for professionals a very informative source, and frequently share the articles and links with colleagues.</p><p class='testimonialName'>Freddi Segal-Gidan, PA PhD<br />Keck School of Medicine; Director USC Alzheimer's Center, LA, CA</p>";
fcontent[20]="<p>Thanks for the crash course in dementia.  I wish I had it six months ago!</p><p class='testimonialName'>Joe D.<br />Old Forge PA</p>";
fcontent[21]="<p>This speaker is amazing. Her knowledge and ability to deliver information was outstanding. I walked away informed and excited. </p><p class='testimonialName'>Attendee Evaluation. 2008 National Conference<br />American Academy of Nurse Practitioners</p>";
fcontent[22]="<p>Susan\'s unique blend of medical knowledge and nursing experience make her one of the country\'s top experts in dementia and Alzheimer\'s disease.</p><p class='testimonialName'>Kristen Demshock RN, MSN<br />Executive Director, Pennsylvania Association of Directors of Nursing Administration</p>";
fcontent[23]="<p>I found Susan\'s presentation to be both informative and very interesting.  She gave me a better understanding of Alzheimer\'s disease. I look forward to more information.</p><p class='testimonialName'>Sharon Bartosch<br />Scranton PA</p>";
fcontent[24]="<p>Excellent! Susan\'s experience is quite evident; she offers easy to listen to, good information. She\'s very knowledgeable... what a fabulous, engaging speaker!</p><p class='testimonialName'>Attendee Evaluations, Fall 2008<br />SD Academy of Physician Assistants, Sioux Falls, SD</p>";
 
closetag='</div>';

//var fwidth='150px'; //set scroller width
//var fheight='150px'; //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"></div>');

if (window.addEventListener)
window.addEventListener("load", changecontent, false)
else if (window.attachEvent)
window.attachEvent("onload", changecontent)
else if (document.getElementById)
window.onload=changecontent
