    $title=jobnr&"-"&custname		' message "$title) is:"&str($title)
    $text ="Click on selection and then click on `Enter'"
    $options="Customer;Fittings;Instructions;Orders;Requisitions;Receipts;Emails;Map of Delivery address;Comments"
    #mode   =0
    #sepchar=59
    #GEMS_ctrl_fontsize=11
    $choice=_GEMS_ListBox($title,$text,$options,#mode,#sepchar)
    _GEMS_ResetCtrlParam()
' message "$choice is:"&str($choice)
' 1="Customer
' 2=Fittings
' 3=Instructions
' 4=Orders;
' 5=Requisitions;
' 6=Receipts;
' 7=Emails;
' 8=Map of Del'y Site;
' 9=Comments"
'     screen clear box 24 1 25 80 0 0 no-border
'     x = colpopup(8,31,20,$chstr,"{Esc} to exit",1,0,clf,clb,0,7)  'highlight date & press {Enter} to show deliveries
    if len($choice)=0			'message "Esc or cancel pressed"
      Background()
      return (-1)
    end if

    if $choice="3"                     'message "Instructions"
      if arc = 1
        messboxwait(" Not available for archived orders ",0,0,1)
        continue while
      end if
      ShowComments()                ' {I}nstructions
      screen shortrestore S_all

    elseif $choice="6"                 'message "Receipts"
      #1stbalance = 0
      if arc = 1
        x = ShowArcRcpts()
      else
        x = ShowReceipts()
      end if
      screen shortrestore S_all

    elseif $choice="1"                 'message  "Customer"
      repaint off
      vloadif(dpath|ordvu_1)
      order change key "[Job_Nr]"
      data find "[Job_Nr]" equal jobnr options ""
      GetCustDetails()
'       vunloadif(ordvu_1)
      ShowCustomer()
      screen shortrestore S_all

    elseif $choice="2"                 'message "Fittings"
      if arc = 1
        messboxwait(" Not available for archived orders ",0,0,1)
        continue while
      end if
      x = ShowFittings2()
      screen shortrestore S_all

    elseif $choice="4"                 'message "Orders"
      if arc = 1
        messboxwait(" Not available for archived orders ",0,0,1)
        continue while
      end if
      x = ShowVarns()
'       inchar
      screen shortrestore S_all

    elseif $choice="7"                 'message "Email"
      x = Emails()
      _GEMS_ResetCtrlParam()
'       inchar
      screen shortrestore S_all

    elseif $choice="8"                 'message "Streetmap"
        if len(trim(delpostcode))=0
	        _GEMS_WinDialog("No delivery postcode yet entered","ERROR",16)
	  	delpostcode=_GEMS_Input("Delivery Postcode","Enter or update",trim(delpostcode),8,0,"")
	end if
      $p_code=delpostcode              ' message "$p_code) is:"&str($p_code)
      $p_code=replacestr($p_code," ","+")  'message "$p_code) is:"&str($p_code)
      $url="www.streetmap.co.uk/streetmap.dll?postcode2map?"|$p_code|chr(32)
      _GEMS_Web($url)
	if dbput([Email_Addr],$emailaddr)
        else
message "EMAIL address did NOT write back to file"
	end if

      screen shortrestore S_all

    elseif $choice="9"                'message "Comments"
      if arc = 1
        messboxwait(" Not available for archived orders ",0,0,1)
        continue while
      end if
      x = ShowOrderNotes()
      screen shortrestore S_all

    elseif $choice="5"                'message "Requisitions"
      if arc = 1
        x = ShowArcReqs()
      else
        x = ShowAllReqs()
      end if

'     elseif ptstr = "Undelivered"
'       if arc = 1
'         messboxwait(" Not available for archived orders ",0,0,1)
'         continue while
'       end if
'       x = UndeldReqs()

    end if
  end while

END FUNCTION ' SetupDetails()
