// Based upon example: http://developer.force.com/cookbook/recipe/submit-a-form-with-the-enter-key
var enterKeyCode = 13;

function enterTriggerSubmit(evt, enterKeyCallback) {
    if (window.event && window.event.keyCode === enterKeyCode || evt.which === enterKeyCode) {
        enterKeyCallback();
        return false;
    } else {
        return true;
    }
}