when i tab out of the input field (and i have letters or something there to trigger the alert) the cursor doesn't get put back in the input field, it goes to the next thing on the page:
I tried to get this working but with no luck. My initial thought was that you'd need to add an onkeypress event handler that would stopPropagation of the event if the keyCode was 9 (the tab key) and the input value was invalid. Then you'd need another handler for the onblur event to set the focus back to this one. But I couldn't get it working.
A possible alternative... instead of checking the value on the blur event, you could check it on the form submit event, as part of some validation. Then highlighting and setting the focus should be easier (I think).