How can I accomplish Key Derivation in JavaScript? I need to take a potentially weak user password and derive a strong key for AES encryption in JavaScript. How can I do this?

I expect the hardest problem is generating a good random salt - perhaps an SSL request could be used to ask a server to provide half of the salt. This would work but I'd rather keep it simple if possible.

Should I use bcrypt? Perhaps with however many iterations are necessary to hit about 1 second on slow hardware (current model smartphones).

I only need to support modern browsers, my userbase is small and everyone is a geek.
The derived key will be used to encrypt plaintext passwords with AES, similar to how LastPass works.
Okay, for key derivation in the browser you will be using third party libs.

If you want to be the absolute top of the line then scrypt (potential lib to consider) is your best bet with a medium to high work factor based on what your users are going to be using. Bcrypt works but is not memory hard so take that into consideration. (Even 5MB of memory usage could severely impede the usage of custom hardware to attack your keys)

A salt can be derived from the crypto.getRandomValues which takes a typed array and returns it filled with trustworthy random data.