You could take a look at the GWT Crypto package. Its a port of some of the BouncyCastle stuff into GWT, so you should be able to take the compiled output and massage it a bit so you can call it from your current Javascript. It currently supports RSA keypair generation and encryption/decryption, as well as AES and DES. I think that's about it though.
I personally have not used this library, but since it was ported from BC it should be safer than writing your own implementation. That said, I dont know where they sourced their SecureRandom implementation from. You may need to look to see if its actually a cryptographically secure implementation or not. I took a quick look and they are just doing something with SHA and the seed bytes, but I dont know if that qualifies or not.
One last thing. I have found using RSA to encrypt large amounts of data to be quite slow. Perhaps you may want to use a hybrid solution of some sort where you encrypt an AES256 key using the RSA keypair and then use AES to encrypt the data? Could be faster...