/***********************************************
* Fading Scroller
***********************************************/

var delay = 3000; //set delay between message change (in miliseconds)
var maxsteps=50; // 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(204,0,0); // end color (red, green, blue)

var fcontent=new Array();
begintag='<div class="content002" align="center">'; //set opening tag, such as font declarations
fcontent[0]="<h2><font color='#53728F'>Our Customers Include ...</font></h2><b><a style='text-decoration: none;' href='http://www.actel.com' target='_blank'>:: Actel</a></b><br /><br />";
fcontent[1]="<h2><font color='#53728F'>Our Customers Include ...</font></h2><b><a style='text-decoration: none;' href='http://www.allegrasystems.com' target='_blank'>:: Allegra Systems</a></b><br /><br />";
fcontent[2]="<h2><font color='#53728F'>Our Customers Include ...</font></h2><b><a style='text-decoration: none;' href='http://www.altera.com' target='_blank'>:: Altera</a></b><br /><br />";
fcontent[3]="<h2><font color='#53728F'>Our Customers Include ...</font></h2><b><a style='text-decoration: none;' href='http://www.bd.com' target='_blank'>:: BD</a></b><br /><br />";
fcontent[4]="<h2><font color='#53728F'>Our Customers Include ...</font></h2><b><a style='text-decoration: none;' href='http://www.bn.com' target='_blank'>:: Barnes and Noble</a></b><br /><br />";
fcontent[5]="<h2><font color='#53728F'>Our Customers Include ...</font></h2><b><a style='text-decoration: none;' href='http://www.boeing.com' target='_blank'>:: Boeing</a></b><br /><br />";
fcontent[6]="<h2><font color='#53728F'>Our Customers Include ...</font></h2><b><a style='text-decoration: none;' href='http://www.brocade.com' target='_blank'>:: Brocade</a></b><br /><br />";
fcontent[7]="<h2><font color='#53728F'>Our Customers Include ...</font></h2><b><a style='text-decoration: none;' href='http://www.citinv.com' target='_blank'>:: Citadel Investment Group</a></b><br /><br />";
fcontent[8]="<h2><font color='#53728F'>Our Customers Include ...</font></h2><b><a style='text-decoration: none;' href='http://www.denvergov.org' target='_blank'>:: City of Denver</a></b><br /><br />";
fcontent[9]="<h2><font color='#53728F'>Our Customers Include ...</font></h2><b><a style='text-decoration: none;' href='http://www.clearstream.com' target='_blank'>:: Clearstream</a></b><br /><br />";
fcontent[10]="<h2><font color='#53728F'>Our Customers Include ...</font></h2><b><a style='text-decoration: none;' href='http://www.corbis.com' target='_blank'>:: Corbis</a></b><br /><br />";
fcontent[11]="<h2><font color='#53728F'>Our Customers Include ...</font></h2><b><a style='text-decoration: none;' href='http://www.cox.com' target='_blank'>:: Cox Communications</a></b><br /><br />";
fcontent[12]="<h2><font color='#53728F'>Our Customers Include ...</font></h2><b><a style='text-decoration: none;' href='http://www.flydenver.com' target='_blank'>:: Denver Int'l. Airport</a></b><br /><br />";
fcontent[13]="<h2><font color='#53728F'>Our Customers Include ...</font></h2><b><a style='text-decoration: none;' href='http://www.eds.org' target='_blank'>:: EDS</a></b><br /><br />";
fcontent[14]="<h2><font color='#53728F'>Our Customers Include ...</font></h2><b><a style='text-decoration: none;' href='http://www.extremenetworks.org' target='_blank'>:: Extreme Networks</a></b><br /><br />";
fcontent[15]="<h2><font color='#53728F'>Our Customers Include ...</font></h2><b><a style='text-decoration: none;' href='http://www.hitachi.com' target='_blank'>:: Hitachi</a></b><br /><br />";
fcontent[16]="<h2><font color='#53728F'>Our Customers Include ...</font></h2><b><a style='text-decoration: none;' href='http://www.kcp.com/index.html' target='_blank'>:: Honeywell</a></b><br /><br />";
fcontent[17]="<h2><font color='#53728F'>Our Customers Include ...</font></h2><b><a style='text-decoration: none;' href='http://www.hsbc.co.uk/1/2/home' target='_blank'>:: HSBC</a></b><br /><br />";
fcontent[18]="<h2><font color='#53728F'>Our Customers Include ...</font></h2><b><a style='text-decoration: none;' href='http://www.i-behavior.com' target='_blank'>:: iBehavior</a></b><br /><br />";
fcontent[19]="<h2><font color='#53728F'>Our Customers Include ...</font></h2><b><a style='text-decoration: none;' href='http://www.lamrc.com' target='_blank'>:: Lam Research</a></b><br /><br />";
fcontent[20]="<h2><font color='#53728F'>Our Customers Include ...</font></h2><b><a style='text-decoration: none;' href='http://www.lockheedmartin.com' target='_blank'>:: Lockheed Martin</a></b><br /><br />";
fcontent[21]="<h2><font color='#53728F'>Our Customers Include ...</font></h2><b><a style='text-decoration: none;' href='http://www.maxtor.com' target='_blank'>:: Maxtor</a></b><br /><br />";
fcontent[22]="<h2><font color='#53728F'>Our Customers Include ...</font></h2><b><a style='text-decoration: none;' href='http://www.novartis.com' target='_blank'>:: Novartis</a></b><br /><br />";
fcontent[23]="<h2><font color='#53728F'>Our Customers Include ...</font></h2><b><a style='text-decoration: none;' href='http://www.qualcomm.com' target='_blank'>:: Qualcomm</a></b><br /><br />";
fcontent[24]="<h2><font color='#53728F'>Our Customers Include ...</font></h2><b><a style='text-decoration: none;' href='http://www.rambus.com' target='_blank'>:: Rambus</a></b><br /><br />";
fcontent[25]="<h2><font color='#53728F'>Our Customers Include ...</font></h2><b><a style='text-decoration: none;' href='http://www.mips.com' target='_blank'>:: MIPS</a></b><br /><br />";
fcontent[26]="<h2><font color='#53728F'>Our Customers Include ...</font></h2><b><a style='text-decoration: none;' href='http://www.raytheonaircraft.com/home.asp' target='_blank'>:: Raytheon Aircraft</a></b><br /><br />";
fcontent[27]="<h2><font color='#53728F'>Our Customers Include ...</font></h2><b><a style='text-decoration: none;' href='http://www.safeco.com' target='_blank'>:: Safeco Insurance</a></b><br /><br />";
fcontent[28]="<h2><font color='#53728F'>Our Customers Include ...</font></h2><b><a style='text-decoration: none;' href='http://www.sfchronicle.com' target='_blank'>:: San Francisco Chronicle</a></b><br /><br />";
fcontent[29]="<h2><font color='#53728F'>Our Customers Include ...</font></h2><b><a style='text-decoration: none;' href='http://www.sony.com' target='_blank'>:: Sony</a></b><br /><br />";
fcontent[30]="<h2><font color='#53728F'>Our Customers Include ...</font></h2><b><a style='text-decoration: none;' href='http://www.townsend.com' target='_blank'>:: Townsend and Townsend and Crew</a></b><br /><br />";
fcontent[31]="<h2><font color='#53728F'>Our Customers Include ...</font></h2><b><a style='text-decoration: none;' href='http://www.toyota.com' target='_blank'>:: Toyota</a></b><br /><br />";
fcontent[32]="<h2><font color='#53728F'>Our Customers Include ...</font></h2><b><a style='text-decoration: none;' href='http://www.ucdavis.edu' target='_blank'>:: UC Davis</a></b><br /><br />";
fcontent[33]="<h2><font color='#53728F'>Our Customers Include ...</font></h2><b><a style='text-decoration: none;' href='http://www.unum.com' target='_blank'>:: Unum Provident</a></b><br /><br />";
fcontent[34]="<h2><font color='#53728F'>Our Customers Include ...</font></h2><b><a style='text-decoration: none;' href='http://www.dot.gov/' target='_blank'>:: US Dept of Transportation</a></b><br /><br />";
fcontent[35]="<h2><font color='#53728F'>Our Customers Include ...</font></h2><b><a style='text-decoration: none;' href='http://www.vanguard.com' target='_blank'>:: Vanguard</a></b><br /><br />";
fcontent[36]="<h2><font color='#53728F'>Our Customers Include ...</font></h2><b><a style='text-decoration: none;' href='http://www.xoma.com' target='_blank'>:: Xoma</a></b><br /><br />";
closetag='</div>';

var fwidth='200px'; //set scroller width
var fheight='60px'; //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;


/*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() for Netscape.  ////////////

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);
  }
}

/*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);
	
  }   
}

/*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:1px dotted #EDEDED;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