function getStyleObject(objectId)
{
// cross-browser function to get an object's style object given its
if(document.getElementById && document.getElementById(objectId))
{// W3C DOM
return document.getElementById(objectId).style;
}
else if (document.all && document.all(objectId))
{// MSIE 4 DOM
return document.all(objectId).style;
}
else if (document.layers && document.layers[objectId])
{// NN 4 DOM.. note: this won't find nested layers
return document.layers[objectId];
}
else
return false;
}

    function Resize(oID,speed)
        {
        this.startX     = 0;
        this.startY     = 0;
        this.endX       = 0;
        this.endY       = 0;
        this.startWidth = 0;
        this.startHeight= 0;
        this.endWidth   = 0;
        this.endHeight  = 0;
        this.progress   = 0;
        this.objectID   = oID;
        this.progressD  = speed;

        //functions
        this.startWith = Resize_startWith;
        this.endWith   = Resize_endWith;
        this.doResize  = Resize_doResize;
        this.tick      = Resize_tick;
        this.start     = Resize_start;
        }

    function Resize_start()
        {
        addTimer(this,25);
        }

    function Resize_tick()
        {
        this.doResize();
        }

    function Resize_startWith(sx,sy,sw,sh)
        {
        this.startX     = sx;
        this.startY     = sy;
        this.startWidth = sw;
        this.startHeight= sh;
        }

    function Resize_endWith(ex,ey,ew,eh)
        {
        this.endX     = ex;
        this.endY     = ey;
        this.endWidth = ew;
        this.endHeight= eh;
        }

    function Resize_doResize()
        {
        if (this.progressD == 0)
            return;
        if (this.progress>100 || this.progress<0)
            {
            this.progress  = this.progress - this.progressD;
            this.progressD = this.progressD * -1;
            this.progressD = 0;
            return;
            }

        var style = getStyleObject(this.objectID);

        var x     = (this.startX*(100-this.progress) + this.endX*this.progress)/100;
        var y     = (this.startY*(100-this.progress) + this.endY*this.progress)/100;

        var width = (this.startWidth*(100-this.progress) + this.endWidth*this.progress)/100;
        var height= (this.startHeight*(100-this.progress) + this.endHeight*this.progress)/100;
        

        if (document.layers)
            {
            style.left = x;
            style.top  = y;
            style.width = width;
            style.height= height;
            }
        else
            {
            style.left = x +"px";
            style.top  = y +"px";
            style.width = width +"px";
            style.height= height +"px";
            }

        this.progress += this.progressD;
        }
