First shot at javascript provisioning generator.

Tested with Firefox 24.0. No error checking. Use with caution. Sorry for the spaghetti.