function dhtmlXGridFromTable(obj){
if(typeof(obj)!='object')
obj = document.getElementById(obj);
var w=document.createElement("DIV");
w.setAttribute("width",obj.getAttribute("gridWidth")||(obj.offsetWidth+"px"));
w.setAttribute("height",obj.getAttribute("gridHeight")||(obj.offsetHeight+"px"));
var mr=obj;
mr.parentNode.insertBefore(w,mr);
var f=mr.getAttribute("name")||("name_"+(new Date()).valueOf());
var windowf=new dhtmlXGridObject(w);
windowf.setImagePath(mr.getAttribute("imgpath")||"");
var hrow=mr.rows[0];
var za="";
var zb="";
var zc="";
var zd="";
var ze="";
for (var i=0; i=0; i--)
if (r.childNodes[i].nodeType!=1)
r.removeChild(r.childNodes[i]);
}
mr.parentNode.removeChild(mr);
if (obj.getAttribute("forceCellTypes"))
for (var i=0; i