Javascript runs in a single thread and therefore if you have a slow function it will block everything else.
UPDATE
That will do some of what you want, but keep in mind that they are not widely supported supported in IE (I think they will be in IE10).
Some resources on Web Workers:
Here are a few resources on accomplishing multi-threading without web workers. It’s important to note that this isn’t “true” multi-threading:
- Multi-threading in Javascript (title is a little misleading; it’s not true multi-threading)
- Why doesn’t Javascript support multi-threading?
- Is there some way to do multi-threading in Javascript?
- Simulating multi-threading using IFRAMEs (I’m not sure how viable this method is; it might be more trouble than it’s worth and the law of diminishing returns probably applies.)