  var delay = 7000;   //set delay between message change (in miliseconds)
  var curdelay = delay;
  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

  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-family: lucida, lucida sans unicode, lucida grande, sans-serif; font-size: 9pt;">'; //set opening tag, such as font declarations
  fcontent[0]="iCarte&#153;   <ul style='list-style: square outside; margin: 5px 0px 0px 30px; -moz-margin-start: -10px;'><li>NFCIP-1 and ISO 18092 compliant<li>Supports contactless payment and Peer to peer communication<li>ISO 14443A/B and ISO 15693 compliant<li>Supports NXP MIFARE®, I-CODE® SLI and Texas Instrument Tag-it™ HF-I<li>Made for iPod (MFI) accessory<li>Supports iPhone 3G or iPhone 3GS<li>Mini-USB for charging and syncing<li>Available in black or white color</ul>";
  fcontent[1]="SDiD&#153;     <ul style='list-style: square outside; margin: 5px 0px 0px 30px; -moz-margin-start: -10px;'><li>First RFID SD Card Reader/Writer in the industry<li>Smallest form factor and longest read/write range<li>Plug & Play: adapts Wireless PDA/Smartphones<li>Open platform development: WinCE and PalmOS<li>Low cost and flexible solutions for mobile RFID<li>Software Development Kits<li>Strong technical developer support<li>Online interactive forum community</ul>";
  fcontent[2]="SDiD&#153; 1010<ul style='list-style: square outside; margin: 5px 0px 0px 30px; -moz-margin-start: -10px;'><li>Up to 5.0 cm (2.0&#34;) range<li>Near Field Communication (NFCIP-1, ISO18092 compliant)<li>ISO14443A compliant<li>Supports Philips MIFARE&reg;<li>Supports Philips MIFARE DESFire&reg;<li>Integrated SAM (Secure Access Module) with SmartCard compliant JCOP OS<li>Ideal for contactless payment, advertising and promotional applications</ul>";
  fcontent[3]="SDiD&#153; 1020<ul style='list-style: square outside; margin: 5px 0px 0px 30px; -moz-margin-start: -10px;'><li>Up to 8.0 cm (3.2&#34;) range<li>ISO15693 compliant<li>ISO14443A/B compliant<li>Supports Philips MIFARE&reg; and Philips MIFARE DESFire&reg;<li>Supports Philips I-CODE&reg; and Philips I-CODE&reg; SLI<li>Supports Texas Instrument Tag-it&#153; HF-I<li>Can be customized for industrial, enterprise and government applications</ul>";
  fcontent[4]="SDiD&#153; 1210<ul style='list-style: square outside; margin: 5px 0px 0px 30px; -moz-margin-start: -10px;'><li>First Low Frequency RFID Reader / Writer SD Card<li>ISO 11784 and ISO 11785 compliant for Animal ID<li>Supports Half Duplex (HDX) LF RFID, up to 12.5 cm (5.0&#34;) range<li>Supports Full Duplex (FDX) LF RFID, up to 9.0 cm (3.5&#34;) range<li>Supports TI TIRIS LF, Sokymat Q5, NXP HITAG&#153; 1 and NXP HITAG&#153; S (no security)<li>Read, write and search 125 kHz and 134.2 kHz LF RFID tags<li>Can be customized for industrial, enterprise and government applications</ul>";
  fcontent[5]="SDiD&#153; 1212<ul style='list-style: square outside; margin: 5px 0px 0px 30px; -moz-margin-start: -10px;'><li>First Low Frequency RFID Reader / Writer SD Card with 2GB SD Memory<li>ISO 11784 and ISO 11785 compliant for Animal ID<li>Supports Half Duplex (HDX) LF RFID, up to 12.5 cm (5.0&#34;) range<li>Supports Full Duplex (FDX) LF RFID, up to 9.0 cm (3.5&#34;) range<li>Supports TI TIRIS LF, Sokymat Q5, NXP HITAG&#153; 1 and NXP HITAG&#153; S (no security)<li>Read, write and search 125 kHz and 134.2 kHz LF RFID tags<li>Can be customized for industrial, enterprise and government applications</ul>";
  closetag='</div>';

  var fwidth='100%'; //set scroller width
  var fheight='150px'; //set scroller height

  var ie4=document.all&&!document.getElementById;
  var DOM2=document.getElementById;
  var faderdelay=0;
  var index=0;
  var fadecounter;
  var changecounter;

  function previous()
  {
    if (index==1)
      index=fcontent.length-1;
    else
      index = index-2;
    if (index < 0)
      index = 0;

    clearTimeout(fadecounter);
    clearTimeout(changecounter);
    curdelay = delay;
    document.getElementById("fscroller").style.color="rgb("+endcolor[0]+", "+endcolor[1]+", "+endcolor[2]+")";
    changecounter=setTimeout("changecontent()",0);
    control.innerText='Stop';
  }

  function startstop()
  {
    if (curdelay == delay)
    {
      clearTimeout(fadecounter);
      clearTimeout(changecounter);
      curdelay = 0;
      document.getElementById("fscroller").style.color="rgb("+endcolor[0]+", "+endcolor[1]+", "+endcolor[2]+")";
      control.innerText='Start';
    }
    else
    {
      curdelay = delay;
      changecounter=setTimeout("changecontent()",0);
      control.innerText='Stop';
    }
  }

  function next()
  {
    clearTimeout(fadecounter);
    clearTimeout(changecounter);
    curdelay = delay;
    document.getElementById("fscroller").style.color="rgb("+endcolor[0]+", "+endcolor[1]+", "+endcolor[2]+")";
    changecounter=setTimeout("changecontent()",0);
    control.innerText='Stop';
  }

  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
      linkcolorchange(1);
      colorfade(1,20);
    }
    else if (ie4)
    {
      document.all.fscroller.innerHTML=begintag+fcontent[index]+closetag;
    }

    index++
  }

  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);
    }
  }

  function colorfade(step)
  {
    if (step<=maxsteps)
    {
      document.getElementById("fscroller").style.color=getstepcolor(step);
      linkcolorchange(step);
      step++;
      fadecounter=setTimeout("colorfade("+step+")",stepdelay);
    }
    else
    {
      clearTimeout(fadecounter);
      document.getElementById("fscroller").style.color="rgb("+endcolor[0]+", "+endcolor[1]+", "+endcolor[2]+")";
      if (curdelay)
        changecounter=setTimeout("changecontent()", curdelay);
    }
  }

  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
