это работает во всех браузерах (IE - странный)
setTimeout( (function(x) { return function() { postinsql(x); }; })(topicId) , 4000);