﻿var theLogo;
var yPos = 0;
var xPos = 0;
var dSign = 1;
var stopLogo = 750
function doMoveApple()
{
    if ( document.all ){
        theLogo = document.all.item("Logo");
    }
    else if (document.getElementById ){
        theLogo = document.getElementById("Logo");
    }
    else if  (document.layers){
        theLogo = document.layers["Logo"];
    }
    
    if ( theLogo )
    {
        hideObj( theLogo);
        doLeftToRight();
    }
}

function moveObjTo( obj, x, y )
{
    
    if ( ! obj.style )
    {
        obj.top = y;
        obj.left = x;
    }
    else
    {
        obj.style.top = y + "px";
        obj.style.left = x + "px";
    }
}

function showObj( obj)
{
    
    if ( ! obj.style ) {
        obj.visibility = "visible";
       
        
    }
    else 
    {
        obj.style.visibility = "visible";
    }
    
}

function hideObj( obj )
{
    if ( ! obj.style ) {
        obj.visibility = "hidden";

    }
    else {
        obj.style.visibility = "hidden";

    }
}

function doLeftToRight()
{
    xPos = 0;
    moveObjTo( theLogo, 0, 0 );
    showObj( theLogo);
    moveHoriz();
    
}

function moveHoriz()
{
    if ( xPos  < stopLogo ) {
        xPos = xPos + 2
        moveObjTo( theLogo, xPos, 0 );
        setTimeout( "moveHoriz()", 1 );
    }
}

