var PositionInfo = function (elm)
{
    var p_elm = elm;

    var Get = function (obj)
    {
        if (typeof (obj) == "object")
        {
            return obj;
        }
        else
        {
            return document.getElementById(obj);
        }
    }

    var Left = function ()
    {
        var x = 0;
        var elm = Get(p_elm);
        while (elm != null)
        {
            x += elm.offsetLeft;
            elm = elm.offsetParent;
        }
        return parseInt(x);
    }

    var Width = function ()
    {
        var elm = Get(p_elm);
        return parseInt(elm.offsetWidth);
    }

    var Right = function ()
    {
        return Left(p_elm) + Width(p_elm);
    }

    var Top = function ()
    {
        var y = 0;
        var elm = Get(p_elm);
        while (elm != null)
        {
            y += elm.offsetTop;
            elm = elm.offsetParent;
        }
        return parseInt(y);
    }

    var Height = function ()
    {
        var elm = Get(p_elm);
        return parseInt(elm.offsetHeight);
    }

    var Bottom = function ()
    {
        return Top(p_elm) + Height(p_elm);
    }

    this.Top = Top;
    this.Right = Right;
    this.Bottom = Bottom;
    this.Left = Left;
    this.Width = Width;
    this.Height = Height;
};



