function inherit(obj, prop) { var res = obj[prop]; while(!res) { obj = obj.inherit; res = obj[prop]; }; return res; };