﻿/***********************************************

* 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 = 6700; //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 style="font: normal 11px Arial; padding: 5px; font-color:">'; //set opening tag, such as font declarations

fcontent[0]="<h2>Seasoned, Expert Consultants</h2><p>'I feel comfortable in saying that, to date, Atlanticon has brought seasoned and expert consultants to our organization that are valued and strong contributors as we move forward with our IDX implementation.'</p><p class='testimonial-by'>Sue Prince<br />Director, Information Technology<br />Huntsville Hospital<br />Huntsville, AL</p>";

fcontent[1]="<h2>Atlanticon Provided Outstanding Guidance and Training, Which Left Our Staff Self-Sufficient</h2><p>'The work done by Atlanticon was excellent.  They provided valuable documentation and outstanding guidance and training, which left our staff self-sufficient.'</p><p class='testimonial-by'>Sam Henderson<br />Senior Programmer Analyst<br />Albert Einstein Healthcare Network<br />Philadelphia, PA</p>";

fcontent[2]="<h2>Worked with Atlanticon Consultants Through Two Major Implementations</h2><p>'They are knowledgeable, efficient, and personable, and they display a dedication that is outstanding. I have always found their suggestions, recommendations and overall work to be timely and practical.'</p><p class='testimonial-by'>Mary J. Cothron<br />Clinical Informatics Specialist<br />Adventist Health System<br />USA</p>";

fcontent[3]="<h2>Go Live Was So Successful We Disbanded the Control Center After One Week</h2><p>'After replacing our 15-year-old legacy system, Atlanticon's guidance and advice were invaluable. They helped us develop the project plan, establish teams, write test scripts, manage the project &amp; prepare for go live.'</p><p class='testimonial-by'>Pam Holiday<br />IS Facilities Manager<br />Kettering &amp; Grandview Hospitals<br />Dayton, OH</p>";

fcontent[4]="<h2>Atlanticon Helped Us Consistently Meet Our Milestones</h2><p>'Their project management knowledge (Implementation and Development to Education and Strategic Planning) was evident.  We looked forward to working with their consultants on a daily basis because of their expertise, direction, friendly demeanors, & genuine commitment to excellence.'</p><p class='testimonial-by'>Danny Ramos, R.N.<br />Clinical Information Specialist<br />E. Pasco Medical Center<br />USA</p>";

fcontent[5]="<h2>Atlanticon's Quality Individuals - Always Exceptional</h2><p>'I am happy to recommend Atlanticon as a consulting resource for any customer. I have worked with many consulting firms, previously representing another vendor and now on the user side. Without question, the their quality of individuals is always exceptional.'</p><p class='testimonial-by'>Cathy McHenry<br />Manager, Application Dev.<br />ProHealth Care<br />Waukesha, WI</p>";


fcontent[6]="<h2>Atlanticon's Ability to Fit In and Work With Our Staff: Critical in Achieving Our Objectives</h2><p>'Atlanticon provided us excellent project management, functional, and technical resources that were key in the implementation of a complete Cerner system.  I highly recommend them to any organization dedicated to success.'</p><p class='testimonial-by'>Amy Walker <br />Director, Clinical Informatics<br />Adventist Health System<br />USA</p>";




closetag='</div>';



var fwidth='214px'; //set scroller width

var fheight='255px'; //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


