For some reason, the code that I always use for a submit image button isn't working for this particular form. Can somebody tell me what is causing it not to work?

These buttons work:

<input type=submit value=Yes name=button>
<input type=submit value=No name=button>

These are the buttons I can't get to work:
<a href="java script:document.form1.submit();" onmouseover="changeImages('yes', 'images/yes_over.gif'); return true;" onmouseout="changeImages('yes', 'images/yes.gif'); return true;"><img name="button" src="images/yes.gif" value="yes" id="button"></a>
<a href="java script:document.form1.submit();" onmouseover="changeImages('no', 'images/no_over.gif'); return true;" onmouseout="changeImages('no', 'images/no.gif'); return true;"><img name="button" src="images/no.gif" value="no" id="button"></a>