/* Dispatch the display to the next page based on NewPageId. */
VOID UpdatePageId(BMM_CALLBACK_DATA *Private, UINT16 NewPageId)
/* Dispatch the display to the next page based on NewPageId. */
VOID UpdatePageId(BMM_CALLBACK_DATA *Private, UINT16 NewPageId)
{
  if ((NewPageId < FILE_OPTION_OFFSET) && (NewPageId >= HANDLE_OPTION_OFFSET)) {
    NewPageId = FORM_DRV_ADD_HANDLE_DESC_ID;
  } else if ((NewPageId == KEY_VALUE_SAVE_AND_EXIT) || (NewPageId == KEY_VALUE_NO_SAVE_AND_EXIT)) {
    NewPageId = FORM_MAIN_ID;
  } else if ((NewPageId >= TERMINAL_OPTION_OFFSET) && (NewPageId < CONSOLE_OPTION_OFFSET)) {
    NewPageId = FORM_CON_COM_SETUP_ID;
  }
  if ((NewPageId > 0) && (NewPageId < MAXIMUM_FORM_ID)) {
    Private->BmmPreviousPageId = Private->BmmCurrentPageId;
    Private->BmmCurrentPageId  = NewPageId;
  }
}