IE 7 breaks getElementById
First let me say this took me ages to work out how this was going wrong, and that this bug affects both IE6 and IE7. IE is treating the name attribute on forms as the ID attribute, causing the getElementById to return very unexpected results.