/*
  script to show a digital clock 
*/

var logo = {

logoImage:new Array(), 

logoId1:null, number1:18, shift1:520,
logoId2:null, number2:18, shift2:520,

read:function()
{
  var k = 0;

  for(var i = 0; i < 24; i++)
  {

    this.logoImage[i] = new Image();

    this.logoImage[i].src = 'images/logo_white_small' + k + '.gif';

    k += 15;
  }
},

start:function()
{

  this.logoId1 = document.getElementById('logo1');
  this.logoId2 = document.getElementById('logo2');

  this.move1();
},

move1:function()
{
  this.number1 = ++this.number1 % 24;

  this.shift1 -= 10;

  if( this.shift1 < -80 )
  {
     this.shift1 = 520;

     this.number1 = 18;

     return;
  }

  this.logoId1.src = this.logoImage[this.number1].src;

  this.logoId1.style.left = this.shift1;

  if( this.shift1 == 220 )
    setTimeout("logo.move1()" ,2000);
  else
    setTimeout("logo.move1()" ,30);

  if( this.shift1 == 210 )
    setTimeout("logo.move2()" ,30);  
},

move2:function()
{
  this.number2 = ++this.number2 % 24;

  this.shift2 -= 10;

  if( this.shift2 < -80 )
  {
     this.shift2 = 520;

     this.number2 = 18;

     return;
  }

  this.logoId2.src = this.logoImage[this.number2].src;

  this.logoId2.style.left = this.shift2;

  if( this.shift2 == 220 )
    setTimeout("logo.move2()" ,2000);
  else
    setTimeout("logo.move2()" ,30);

  if( this.shift2 == 210 )
    setTimeout("logo.move1()" ,30);  
}
}

logo.read();

