Fixed JS error when trying to encrypt wallet in FireFox 24

Running the site from a USB stick on an Ubuntu Live-CD powered laptop gave me a JS error "encrypt is not defined" when clicking the "encrypt addresses" button. Moving the call below the local method definition fixes the problem.