eg
.
.
.
<body onLoad="javascript: document.foo.offendingBox.focus()">
.
.
.
.
<form id="foo">
<input type="text" id="offendingBox">
</form>
.
.
you'd have to get the error handling to write out the page appropriately with the correct form element id in the onLoad script
hope it might help. if not sorry for a time-waste
It really depends on the method you are using for error delivery. If you are reloading the form in the same page you could use a js onload to give focus to the field.
Or if you are using a "go back to fix it" link then you could have the back link target the field.