var __defaultonkeypress = theForm.onkeypress;

function ChangeDefaultOnEnterFF(controlId)
{
  theForm.onkeypress = function onkeypress(event) {
    javascript:return WebForm_FireDefaultButton(event, controlId);
  };
  
}  

function ChangeDefaultOnEnter(controlId)
{
  theForm.onkeypress = function () {
    javascript:return WebForm_FireDefaultButton(event, controlId);
  };
  
}  

function RestoreDefaultOnEnter()
{
  theForm.onkeypress = __defaultonkeypress;
}