1) The use of eval is deprecated for security reasons and a safer alternative is required (https://developer.mozilla.org/en/XUL_School/Appendix_C:_Avoid_using_eval_in_Add-ons).
Also,
2) Variables referencing function names are deprecated, instead anonymous functions are used with setTimeout and setInterval, i.e. setTimeout(doSomething) → setTimeout(function () { doSomething(); }).