Hooking up the top form to javascript