FUNCTION NavReqns()
local x psmode pd pq #percentmargin
  y4 = format("˙Req'ns in purple have not been fully scheduled for delivery ","M78")
  screen print 8 2 13 1 y4
'   if $menu == "boss"
'     #totcost = filesum([Cost])
'     #margin  = (#netinv-#totcost)/#netinv
'     #percentmargin = round(#margin*100,2) 'message "#percentmargin is:"&str(#percentmargin)
'     y3 = format("˙"|chr(24)&chr(25)&"req'ns ("|str(#count)|")    {P}urchase details   {Esc} to exit    (Margin"&fixed(#percentmargin,1)|"%"|")","M78")
'     if #margin < #margin_A
'       screen print 9 2 12 1 y3
'     elseif #margin < #margin_B
'       screen print 9 2 14 1 y3
'     elseif #margin < #margin_C
'       screen print 9 2 10 1 y3
'     elseif #margin < #margin_D
'       screen print 9 2 14 1 y3
'     else
'       screen print 9 2 12 1 y3
'     end if
'   else
    y3 = format("˙"|chr(24)&chr(25)&"req'ns ("|str(#count)|")    {P}urchase details   {Esc} to exit ","M78")
    screen print 9 2 15 1 y3
'   end if
  screen save scrheight 1 scrheight scrwidth bot
  smartpeek $_spndmes psmode
  if psmode = 1
    smartpoke $_spndmes 0
  end if
  while TRUE
    x = inchar
    if x = {Down}
      data goto record next

    elseif x = {Up}
      data goto record previous

    elseif x = {PgDn}
      data goto page next

    elseif x = {PgUp}
      data goto page previous

    elseif x = {^End}
      data goto record last

    elseif x = {^Home}
      data goto record first

    elseif x = {P} or x = {p}
      NavMess()

    else
      exit while
    end if
  end while
  if psmode = 1
    smartpoke $_spndmes 1
  end if
  return (x)
END FUNCTION   'NavReqns()
