/**
 * Performs line/column scrolling of a table specified by objId.
 * @param objId Id of the table in the object tree.
 * @param vertical Number of scroll button hits for vertical scrolling. Positive values mean
 *                 scrolling down, negative - up.
 * @param horizontal Number of scroll button hits for horizontal scrolling. Positive values
  *                mean scrolling right, nagative - left.
 */
function DynamicsNAVTable_ScrollTo(/**objectId*/ objId, /**number*/ vertical, /**number*/ horizontal)
{
    var grid = SeS(objId);
    if (!grid)
    {
        return false;
    }
    
    var hScrollBar = grid.GetChildAt(0);
    if (hScrollBar.GetTypeName() == "ScrollBar")
    {
        var button = horizontal > 0 ? hScrollBar.GetChildAt(3) : hScrollBar.GetChildAt(0);
        for(var i = 0; i < Math.abs(horizontal); i++)
        {
            button._DoClick();
        }
    }

    var vScrollBar = grid.GetNextSibling();
    if (vScrollBar.GetTypeName() == "ScrollBar")
    {
        var vScrollHeight = vScrollBar.GetHeight();
        for(var i = 0; i < Math.abs(vertical); i++)
        {
            if (vertical > 0)
            {
                vScrollBar._DoClick(undefined, vScrollHeight - 10);
            }
            else
            {
                vScrollBar._DoClick(undefined, 10);
            }
        }
    }
    
    return true;
}