Zoom on focus function: move functions outside of loop

Remove creation of onfocus- and onblur-functions from
for-loop since this is bad for performance. Instead just
call a reference of these functions.
Reference length of form fields in preventZoom function

This improves performance a little bit.