http://pastebin.com/P2ghHZrg# full solution
Please tip 18xavJxp7Wxs3vjQvLAsfpTyt9RDBin4RB if you are satisfied with the solution
EDIT: Sorry just read your previous post about it needing to have the ability to do 16million combinations. I'm unsure if my solution is capable of that.
I think you'd be better off with a desktop application solution as opposed to a javascript one if you're planning on generating upto 16 million bitcoin addresses.