function animatedObject(elementName,loop,speed,steps,endRoutines,route){
  this.elementName=elementName;
  this.loop=loop;
  this.speed=speed;
  this.steps=steps;
  this.frameIndex=0;
  this.endRoutines=endRoutines;
  this.route=route.split(',');
  this.animate=animateObject;
  this.move=moveObject;
  this.show=showObject;
  this.hide=hideObject;

  animatedObjects[elementName]=this;
}

function stopTimeline(timelineNumber){
   animationTime[timelineNumber]=animationTimeline[timelineNumber].length;
}

function startTimeline(timelineNumber) {
  animationTime[timelineNumber]=0;
  timelineController(timelineNumber);
}

function timelineController(timelineNumber) {
    if (animationTime[timelineNumber] <= animationTimeline[timelineNumber].length - 1) {
      animationTime[timelineNumber]++;
        if (animationTimeline[timelineNumber][animationTime[timelineNumber]] != null){
          eval(animationTimeline[timelineNumber][animationTime[timelineNumber]]);
        }
        setTimeout('timelineController(' + timelineNumber + ')', 100);
    }
}

function showObject(){
  eval(layerObj + '["' + this.elementName + '"]' + styleObj + '.visibility="visible"');
}

function hideObject(){
  eval(layerObj + '["' + this.elementName + '"]' + styleObj + '.visibility="hidden"');
}

function moveObject(left, top){
  eval(layerObj + '["' + this.elementName + '"]' + styleObj + '.top=top');
  eval(layerObj + '["' + this.elementName + '"]' + styleObj + '.left=left');
}

function animateObject(){
    if (this.route.length > 4 && this.frameIndex < this.route.length)  {
      this.move(this.route[this.frameIndex], this.route[this.frameIndex + 1]);
      this.frameIndex += 2;
      setTimeout('animatedObjects["' + this.elementName + '"].animate()', this.speed);
    }
    else if (this.route.length == 4 && this.frameIndex <= this.steps) {
      this.move(parseInt(this.route[0]) + (this.frameIndex * ((parseInt(this.route[2]) -
parseInt(this.route[0])) / this.steps)), parseInt(this.route[1]) + (this.frameIndex *
((parseInt(this.route[3]) - parseInt(this.route[1])) / this.steps)));
      this.frameIndex++;
      setTimeout('animatedObjects["' + this.elementName + '"].animate()', this.speed);
    }
    else {
      eval(this.endRoutines + "");
      this.frameIndex=0;
        if (this.loop == "yes"){
          this.animate();
        }
    }
}

function initAnimation() {

  layerObj=(isNS) ? 'document' : 'document.all';

  styleObj=(isNS) ? '' : '.style';

  animationTime=new Array();
  animationTimeline=new Array();
  animatedObjects=new Object();

letterd=new animatedObject('d', 'no', 25, 25, 'null', '800,-113,130,180');
lettere=new animatedObject('e', 'no', 25, 25, 'null', '900,00,180,180');
lettern=new animatedObject('n', 'no', 25, 25, 'null', '1000,100,230,180');
letteri=new animatedObject('i', 'no', 25, 25, 'null', '1100,200,280,180');
letterz=new animatedObject('z', 'no', 25, 25, 'null', '1200,300,330,180');
lettert=new animatedObject('t', 'no', 25, 25, 'null', '700,600,180,320');
lettere1=new animatedObject('e1', 'no', 25, 25, 'null', '800,500,230,320');
letterk=new animatedObject('k', 'no', 25, 25, 'null', '900,400,280,320');
eaglel=new animatedObject('eagleleft', 'no', 25, 25, 'null', '1100,600,340,340');
eagler=new animatedObject('eagleright', 'no', 25, 25, 'null', '600,-100,70,340');

animationTimeline[0]=new Array();
animationTimeline[0][10]='letterd.show(); lettere.show(); lettern.show(); letteri.show(); letterz.show();lettert.show();lettere1.show();letterk.show();eaglel.show();eagler.show();letterd.animate(); lettere.animate(); lettern.animate(); letteri.animate(); letterz.animate();lettert.animate(); lettere1.animate(); letterk.animate();eaglel.animate();eagler.animate();';
startTimeline(0);
}

var layerObj, styleObj, totalTime, currTime;
var animationTime, animationTimeline, animatedObjects;
var bon, boff;
// Detect for Navigator/IE and Dynamic HTML capabilities.
//var isNS=(navigator.appName == "Netscape");
//var isDHTML=(parseInt(navigator.appVersion) > 3);
// end of moving parts

var detect = navigator.userAgent.toLowerCase(); 
var brow, version, thestring; 
if (checkIt('msie')) brow = "msie";
else if (checkIt('firefox')) brow = "firefox"; 
else  if (checkIt('opera')) brow = "opera"; 
else if (!checkIt('compatible')) { brow = "netscape"; version = detect.charAt(8); }
else brow = "unknown"; 
if (!version) version = detect.charAt(place + thestring.length); 
function checkIt(string) { place = detect.indexOf(string) + 1; thestring = string; return place;}
// Detect for Navigator/IE and Dynamic HTML capabilities.
// end of moving parts
var isDHTML = false;
var isNS = false;
if((brow == "msie") || (brow == "firefox") || (brow == "opera")) isDHTML = true;
isNS=(brow == "netscape");

