<!--

/*
 * MOVEIT - JavaScript Animation Component for Internet Explorer
 *
 * MOVEIT Version 1.0 (c) Copyright 2002, 2006 All Rights Reserved by Georgikawa S.H. Wang.
 *
 */

/**
 *   MOVEIT Prototype
 */
function MOVEIT(name, objname, left, top, width, height, deltax, deltay, tgap)
{
    this.xdir = true;
    this.ydir = true;
    this.halt = false;
    
    this.name = name;
    this.objname = objname;
    this.left = left;
    this.top = top;
    this.width = width;
    this.height = height;
    this.deltax = deltax;
    this.deltay = deltay;
    this.tgap = tgap;
    
    this.move = RunMOVEIT;
    
    this.move();
}

function RunMOVEIT()
{ 
    if(!this.halt && eval(eval("document.all." + this.objname))){
        var obj = eval("document.all." + this.objname);
    
        if(obj.style.posLeft < this.left){
            this.xdir = true;
        }
        if(obj.style.posTop < this.top){
            this.ydir = true;
        }   
        if(obj.style.posLeft >= this.left + this.width){
            this.xdir = false;
        }
        if(obj.style.posTop >= this.top + this.height){
            this.ydir = false;
        }      
        
        obj.style.posLeft += (this.xdir == true ? 1 : -1) * this.deltax;
        obj.style.posTop += (this.ydir == true ? 1 : -1) * this.deltay;
    }
    
    setTimeout(this.name + ".move()", this.tgap);
}

-->