issue 17: added check for timeout == 0 to avoid calling setTimeout in browseer
1.1.7