since your using onclik event, yes, it will always trigger the JS before the form is submitted. the click action happens first, the onClick action is otherwise known as the onMouseDown action. onMouseUp is the action that submits the form.
Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.
These out-of-the-box solutions provide you proven, tested applications that can be up and running now. Build a store, a gallery, or a web-based email solution.