/*
  Javascript for blinking logos
*/

var logos = {

logoID:new Array(), index:new Array(0, 0, 0, 0, 0), pos:new Array(52, 156, 260, 364, 468), IE:true,

start:function()
{
  this.IE = navigator.appName == 'Microsoft Internet Explorer';

  for(var i = 0; i < 5; i++)
    this.logoID[i] = document.getElementById('logo' + i);

  this.trigger();
},

trigger:function()
{
  this.move(1);
  setTimeout("logos.move(4)", 600);
  setTimeout("logos.move(0)",1200);
  setTimeout("logos.move(2)",1800);
  setTimeout("logos.move(3)",2400);

  setTimeout('logos.trigger()',3000);
},

move:function(k)
{
  this.index[k]++;

  this.logoID[k].style.left   = this.pos[k] - this.index[k];
  this.logoID[k].style.top    = 40 - this.index[k];

  this.logoID[k].style.width  = this.index[k]<<1;
  this.logoID[k].style.height = this.index[k]<<1;

  if(this.index[k] == 1)
  {
    if(this.IE)
      this.logoID[k].filters.alpha.opacity = 100;
    else
      this.logoID[k].style.opacity = 1;
  }

  if(this.index[k] < 40)
    setTimeout('logos.move(' + k + ')',10);
  else
    setTimeout('logos.down(' + k + ')',10);
},

down:function(k)
{
  this.index[k]--;

  if(this.IE)
    this.logoID[k].filters.alpha.opacity = this.index[k] * 2.5;
  else
    this.logoID[k].style.opacity = this.index[k] / 40;

  if(this.index[k] > 0)
    setTimeout('logos.down(' + k + ')',10);
}
}

