for (var c=0 ; c < 100; c++) (function(c){ setTimeout(function(){setOp(document.getElementById('as'),c);} , 100*c); })(c);