var BulletOpacityin = 100;
var Bulletdelay = 10;
var BulletfunId = null;
var Bulletlegendindex = 1;
var pausePos = -12;
var Bulletincrement = -1;
var inkcolour = 1;
var prefix = new Array();
prefix[0] = "";
prefix[1] = "<span class='halfblue'>";
prefix[2] = "";
prefix[3] = "<span class='halfred'>";
prefix[4] = "<span class='halfgreen'>";
var suffix = new Array();
suffix[0] = "";
suffix[1] = "</span>";
suffix[2] = "";
suffix[3] = "</span>";
suffix[4] = "</span>";

var Legends = new Array();
var Ie5  = (document.all && document.getElementById);
var ns6 = (!document.all && document.getElementById);
Legends[0] = "Mercedes Benz";
Legends[1] = "Smart Car";
Legends[2] = "BMW";
Legends[3] = "Factory trained senior technicians";
Legends[4] = "Computer diagnostics";
Legends[5] = "Air Conditioning servicing";
Legends[6] = "Servicing";
Legends[7] = "Repairs";
Legends[8] = "Safety systems including airbags";
Legends[9] = "Businesses welcome";

function startUpBullet()
{
  BulletfunId = setInterval("scrollBullets()", 10);
}
function scrollBullets()
{
/*
  document.getElementById("scrollpara1").style.position = "relative";
  document.getElementById("scrollpara1").style.top = parapos + "px";
  parapos += increment;
  if(parapos == pausePos)
  {
    clearInterval(funId);
    delay = 15;
    funId = setInterval("wait1S()",100);
  }
  if((parapos < endPos) || (parapos > startPos))
  {
    clearInterval(funId);
    preparation();
  }
  */
  BulletOpacityin += Bulletincrement;
  if(Ie5)
  {
    document.getElementById("scrollpara1").filters.alpha.opacity = BulletOpacityin;
  }
  else
  {
    document.getElementById("scrollpara1").style.opacity = BulletOpacityin/100;
  document.getElementById("scrollpara1").style.position = "relative";
  document.getElementById("scrollpara1").style.top = "-10px";
//  document.getElementById("scrollpara1").style.left = "20px";
  }
  if(BulletOpacityin == 0)
  {
//      document.write(Opacityin);

    clearInterval(BulletfunId);
    preparation();
  }
    if(BulletOpacityin == 100)
    {
      Bulletincrement *= -1;
      clearInterval(BulletfunId);
      Bulletdelay = 100;
      BulletfunId = setInterval("wait1S()",10);
    }
}

function preparation()
{
    Bulletincrement *= -1;
    document.getElementById("textcontent").innerHTML = prefix[inkcolour] + Legends[Bulletlegendindex] + suffix[inkcolour];
    Bulletlegendindex++;
    if(Bulletlegendindex == Legends.length)
    {
      Bulletlegendindex = 0;
    }
    inkcolour++;
    if(inkcolour == prefix.length)
    {
      inkcolour = 0;
    }
    BulletfunId = setInterval("scrollBullets()", 10);

}
function wait1S()
{
  if(Bulletdelay-- == 0)
  {
    clearInterval(BulletfunId);
    BulletfunId = setInterval("scrollBullets()", 10);
  }
}

