scusa, ma hai visto il while???

while (obj = obj.offsetParent);