I use a similiar function, however, it prevents a user from pressing the enter button and having it submit a form.
var pressedKey = document.all? window.event.keyCode:e.which;
return pressedKey != 13;
document.onkeypress = keyPressed;
if (document.layers) document.captureEvents(Event.KEYPRESS);
What this does is if the numerical representation of the pressed key is 13 (Key code for the enter button) it is disregarded and thus the enter button press do not do anything on the page this function is implemented on.
To do what you want, you would alter the above function so that if the keycode is 13 you would call .focus on a form element.
I will only tell you how to do it, not do it for you.
Unless, of course, you want to hire me to do work for you.
^^Thats my signature