// TODO: need to check what return values do here;
//       maybe submitForm should return something,
//       and then return submitForm should be called in the second function?

function submitForm( aFormID )
{
  lForm = document.getElementById( aFormID );
  if( lForm )
    lForm.submit();
}

function submitFormOnEnter( aFormID, aEvent )
{
  if( window.event )
    lKeyCode = window.event.keyCode;
  else if( aEvent )
    lKeyCode = aEvent.which;
  else
    return true;

  if( lKeyCode == 13 )
  {
    submitForm( aFormID );
    return false;
  }
  return true;
}


