How to get the Grid object from the DOM

I want to get the grid object (in order to call setSizes()) when I am traversing the DOM (ie, I have the gridbox and the rest of the grid DOM). Possible? How to do it?

Grid object is got by grid = new dhtmlXGridObject(container_id) or if you use html initialization using one of the following methods:

1) grid = new dhtmlXGridFromTable(table_id);

2) <table class=“dhtmlxGrid” oninit=“doAfterGridInit()” name=“grid” …>…

function doAfterGridInit(){