
/***********************************************
* 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=80; // 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(2,50,115); // end color (red, green, blue)

var fcontent=new Array();
begintag='<div>'; //set opening tag, such as font declarations



fcontent[0]=" \"We like it a lot, it does everything we want it to.\" <br><br><b>Travis Farrell and Harry Rai, Miami Herald</b><a href='http://www.i-s-e.com/success/ISE_Success_Story_37/index.html' class=\"did\"><br><b>Complete Success Story</b></a>";
fcontent[1]=" \"The product is fantastic, I’m crazy about it.\" <br><br><b>Roma Turner, East Carolina University</b><a href='http://www.i-s-e.com/success/ISE_Success_Story_35/index.html' class=\"did\"><br><b>Complete Success Story</b></a>";
fcontent[2]="\"We were very pleased with the assistance we received while building our EnterpriseSCHEDULE Banner jobsets.\" <br><br><b>Lucille Bealer and Jana Arpy, Black Hawk College</b> <br><a href='http://www.i-s-e.com/Success/ISE_Success_Story_33/index.htm' class=\"did\"><b>Complete Success Story</b></a>";
fcontent[2]="\"Once it’s up and running, you can forget about it\" <br><br><b>Thomas Carlton, Certegy Inc.</b> <br><a href='http://www.i-s-e.com/Success/ISE_Success_Story_32/index.htm' class=\"did\"><b>Complete Success Story</b></a>";
fcontent[3]="\"The scheduler \'works excellent\' and it has fulfilled the promise of being much more reliable than our previous job scheduling system.\" <br><br><b>Michael Barrick, Wake Forest University</b> <br><a href='http://www.i-s-e.com/Success/ISE_Success_Story_28/index.html' class=\"did\"><b>Complete Success Story</b></a>";
fcontent[4]="\"The EnterpriseSCHEDULE product has exceeded our expectations as compared to our previous scheduler.\" <br><br><b>Ron Donohue, United Natural Foods</b> <br><a href='http://www.i-s-e.com/Success/ISE_Success_Story_25/index.html' class=\"did\"><b>Complete Success Story</b></a>";
fcontent[5]="\"EnterpriseSCHEDULE has been a \'really reliable product\'.\" <br><br><b>Wes Newman, Shaw Communications</b> <br><a href='http://www.i-s-e.com/Success/ISE_Success_Story_24/index.html' class=\"did\"><b>Complete Success Story</b></a>";
fcontent[6]="\"One of the beauties of EnterpriseSCHEDULE is that jobs are all timed to perform these tasks. You never have to think about it.\" <br><br><b>Bob Ayers, University of California, Riverside</b> <br><a href='http://www.i-s-e.com/Success/ISE_Success_Story_21/index.html' class=\"did\"><b>Complete Success Story</b></a>";
fcontent[7]="\"EnterpriseSCHEDULE is so reliable, you can \'set it and forget it\'.\" <br><br><b>Dave Thompson, Southwest Florida Water Management District</b> <br><a href='http://www.i-s-e.com/Success/ISE_Success_Story_23/index.html' class=\"did\"><b>Complete Success Story</b></a>";
fcontent[8]="\"From a standpoint of automating the processing it's been very successful.\" <br><br><b>J.W. Johnston and Paul Maglinger, Shoe Carnival </b> <br><a href='http://www.i-s-e.com/Success/ISE_Success_Story_30/index.html' class=\"did\"><b>Complete Success Story</b></a>";


fcontent[9]="\"The scheduler is a beneficial tool in our data center and it does the job.\" <br><br><b>Ray Petronko, New Jersey State Department of Education </b> <br><a href='http://www.i-s-e.com/Success/ISE_Success_Story_29/index.html' class=\"did\"><b>Complete Success Story</b></a>";

fcontent[10]="\"It's one of the few products I've encountered that does what it says it's gonna do\" <br><br><b>Jim \"Sarge\" Harlan, Abilene Christian University </b> <br><a href='http://www.i-s-e.com/Success/ISE_Success_Story_20/index.html' class=\"did\"><b>Complete Success Story</b></a>";
closetag='</div>';


var fwidth='265px'; //set scroller width
var fheight='0px'; //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 maxNo=11;


/*Rafael Raposo edited function*/
//function to change content
function changecontent(){
var now=new Date()
var index=(now.getSeconds())%maxNo
  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;
}

// 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="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
