Well, I think you are doing it difficult for yourself! Couldn't you just do like this...
<FORM name="form1" method="post" onSubmit="submit_if_validate('form1'); return;">
<INPUT type="image" src="btn_submit.gif" name="submitbtn">
// some validation code that returns true if it passes and false otherwise.
The code is not tested but it should work. I have done something similar myself ;) This way it should be less error-prone.