Manually doing what bitaddress.org does
If your familiar with javascript then I think the easiest way to go would be to check out https://github.com/bitcoinjs/bitcoinjs-lib . They offer a client side solution for generating bitcoin address info.  Theres a few examples in the readme as well.