 Rem File: Dndcnfg4 for Dndbbs Version v5.0a Release r2.0
 Rem $Include: 'dndcnfg.inc'
Sub Edit.Page.One
 On Local Error Goto ErrorExit88
 Call Display.Page.One.A
 For Temp=1 To 21
    Call Select.Page.One(Temp,False)
 Next
 Call Select.Page.One(1,True)
 Temp1=1
 TempA=1
 TempB=21
 Do While Lost.Carrier=False
    Strng3=Nul
    Do While Strng3=Nul
       If Lost.Carrier Then
          Exit Do
       Endif
       Call Read.Keyboard(Strng3)
       If Strng3 = Chr$(21) Then ' ^U = pageup
          Strng3 = Chr$(0) + Chr$(73)
       Endif
       If Strng3 = Chr$(14) Then ' ^N = pagedown
          Strng3 = Chr$(0) + Chr$(81)
       Endif
       Call Mouse.Driver(3)
       If Mouse.Button2 Then
          Strng3=Chr$(27)
       Endif
       If Mouse.Button3 Then
          Call Terminate.Program(True)
          End
       Endif
       If Mouse.Button Then
          Call Mouse.Select(1,43,False)
          If Len(Strng3) Then
	     Exit Do
	  Endif
          Call Edit.Mouse.Button
          If Len(Strng3) Then
             Exit Do
          Endif
       Endif
       If Mouse.Row Or Mouse.Column Then
          Call Mouse.Select(1,43,True)
          If Len(Strng3) Then
	     Exit Do
	  Endif
       Endif
    Loop
    Select Case Len(Strng3)
    Case 1
       Select Case Strng3
       Case Chr$(27)
	  Exit Sub
       Case Chr$(8)
          If Temp1<22 Then
             Call Help(1)
             Call Display.Page.One.A
             For Temp=1 To 21
                Call Select.Page.One(Temp,False)
             Next
             Call Select.Page.One(1,True)
             Temp1=1
             TempA=1
             TempB=21
          Else
             Call Help(2)
             Call Display.Page.One.B
             For Temp=22 To 43
                Call Select.Page.One(Temp,False)
             Next
             Call Select.Page.One(22,True)
             Temp1=22
             TempA=22
             TempB=43
          Endif
       Case Chr$(13)
	  Restore Page.One.Data
	  For Temp2=1 To Temp1
	     Read Xcoor,Ycoor,Row,Column,Line.Length
	  Next
	  Select Case Temp1
	  Case 1
             TempC$=Mid$(Str$(Config.Array1(1)),2)
	  Case 2
             TempC$=Mid$(Str$(Config.Array1(2)),2)
	  Case 3
             TempC$=Mid$(Str$(Config.Array1(3)),2)
	  Case 4
             TempC$=Mid$(Str$(Config.Array2(1)),2)
	  Case 5
             TempC$=YN$(Config.Array2(2))
	  Case 6
             TempC$=YN$(Config.Array2(3))
	  Case 7
             TempC$=YN$(Config.Array2(4))
	  Case 8
             TempC$=Config3$(1)
	  Case 9
             TempC$=Config3$(2)
	  Case 10
             TempC$=YN$(Config.Array2(5))
	  Case 11
             TempC$=Config3$(3)
	  Case 12
             TempC$=YN$(Config.Array2(6))
	  Case 13
             TempC$=Config3$(4)
	  Case 14
             TempC$=YN$(Config.Array2(38))
	  Case 15
             TempC$=Config3$(5)
	  Case 16
             TempC$=YN$(Config.Array2(7))
	  Case 17
             TempC$=Mid$(Str$(Config.Array2(8)),2)
	  Case 18
             TempC$=Mid$(Str$(Config.Array2(9)),2)
	  Case 19
             TempC$=Mid$(Str$(Config.Array1(4)),2)
	  Case 20
             TempC$=Mid$(Str$(Config.Array2(32)),2)
	  Case 21
             Call Edit.Levels
	  Case 22
             TempC$=Mid$(Str$(Config.Array2(67)),2)
	  Case 23
             TempC$=Config3$(77)
	  Case 24
             TempC$=YN$(Config.Array2(51))
	  Case 25
             TempC$=YN$(Config.Array2(52))
	  Case 26
             TempC$=YN$(Config.Array2(53))
	  Case 27
             TempC$=YN$(Config.Array2(54))
	  Case 28
             TempC$=YN$(Config.Array2(72))
	  Case 29
             TempC$=YN$(Config.Array2(73))
	  Case 30
             Call Edit.Defaults
	  Case 31
             TempC$=YN$(Config.Array2(85))
	  Case 32
             TempC$=YN$(Config.Array2(74))
	  Case 33
             TempC$=YN$(Config.Array2(75))
	  Case 34
             TempC$=YN$(Config.Array2(76))
	  Case 35
             TempC$=YN$(Config.Array2(77))
	  Case 36
             TempC$=YN$(Config.Array2(78))
	  Case 37
             TempC$=YN$(Config.Array2(48))
	  Case 38
             Call Edit.Classnames
          Case 39
             TempC$=YN$(Config.Array2(108))
          Case 40
             TempC$=YN$(Config.Array2(107))
          Case 41
             TempC$=YN$(Config.Array2(115))
          Case 42
             TempC$=YN$(Config.Array2(116))
          Case 43
             TempC$=Mid$(Str$(Config.Array1(40)),2)
          End Select
	  Select Case Temp1
          Case 1 To 20, 22 To 29, 31 To 37, 39, 40 To 43
             Call ScreenEdit
	  End Select
	  Select Case Temp1
	  Case 1
             Config.Array1(1)=Int(Val(TempC$))
	  Case 2
             Config.Array1(2)=Int(Val(TempC$))
	  Case 3
             Config.Array1(3)=Int(Val(TempC$))
	  Case 4
             Config.Array2(1)=Int(Val(TempC$))
	  Case 5
             Config.Array2(2)=(Ucase$(Left$(TempC$,1))="Y")
	  Case 6
             Config.Array2(3)=(Ucase$(Left$(TempC$,1))="Y")
	  Case 7
             Config.Array2(4)=(Ucase$(Left$(TempC$,1))="Y")
	  Case 8
             Config.Array3(1)=Ucase$(TempC$)
	  Case 9
             Config.Array3(2)=TempC$
	  Case 10
             Config.Array2(5)=(Ucase$(Left$(TempC$,1))="Y")
	  Case 11
             Config.Array3(3)=Ucase$(TempC$)
	  Case 12
             Config.Array2(6)=(Ucase$(Left$(TempC$,1))="Y")
	  Case 13
             Config.Array3(4)=Ucase$(TempC$)
	  Case 14
             Config.Array2(38)=(Ucase$(Left$(TempC$,1))="Y")
	  Case 15
             Config.Array3(5)=TempC$
	  Case 16
             Config.Array2(7)=(Ucase$(Left$(TempC$,1))="Y")
	  Case 17
             Config.Array2(8)=Int(Val(TempC$))
	  Case 18
             Config.Array2(9)=Int(Val(TempC$))
	  Case 19
             Config.Array1(4)=Int(Val(TempC$))
	  Case 20
             Config.Array2(32)=Int(Val(TempC$))
	  Case 22
             Config.Array2(67)=Int(Val(TempC$))
	  Case 23
             Config.Array3(77)=TempC$
	  Case 24
             Config.Array2(51)=(Ucase$(Left$(TempC$,1))="Y")
	  Case 25
             Config.Array2(52)=(Ucase$(Left$(TempC$,1))="Y")
	  Case 26
             Config.Array2(53)=(Ucase$(Left$(TempC$,1))="Y")
	  Case 27
             Config.Array2(54)=(Ucase$(Left$(TempC$,1))="Y")
	  Case 28
             Config.Array2(72)=(Ucase$(Left$(TempC$,1))="Y")
	  Case 29
             Config.Array2(73)=(Ucase$(Left$(TempC$,1))="Y")
	  Case 31
             Config.Array2(85)=(Ucase$(Left$(TempC$,1))="Y")
	  Case 32
             Config.Array2(74)=(Ucase$(Left$(TempC$,1))="Y")
	  Case 33
             Config.Array2(75)=(Ucase$(Left$(TempC$,1))="Y")
	  Case 34
             Config.Array2(76)=(Ucase$(Left$(TempC$,1))="Y")
	  Case 35
             Config.Array2(77)=(Ucase$(Left$(TempC$,1))="Y")
	  Case 36
             Config.Array2(78)=(Ucase$(Left$(TempC$,1))="Y")
	  Case 37
             Config.Array2(48)=(Ucase$(Left$(TempC$,1))="Y")
          Case 39
             Config.Array2(108)=(Ucase$(Left$(TempC$,1))="Y")
          Case 40
             Config.Array2(107)=(Ucase$(Left$(TempC$,1))="Y")
          Case 41
             Config.Array2(115)=(Ucase$(Left$(TempC$,1))="Y")
          Case 42
             Config.Array2(116)=(Ucase$(Left$(TempC$,1))="Y")
          Case 43
             Config.Array1(40)=Csng(Int(Val(TempC$)))
          End Select
	  Call Select.Page.One(Temp1,True)
       End Select
    Case 2
       Select Case Asc(Left$(Strng3,1))
       Case 0
          Select Case Asc(Right$(Strng3,1))
          Case 0
             Exit Sub
          Case 72, 141, 152
             If Temp1>1 And Temp1<>22 Then
                Call Select.Page.One(Temp1,False)
                Temp1=Temp1-1
                Call Select.Page.One(Temp1,True)
             Endif
          Case 80, 145, 160
             If Temp1<43 And Temp1<>21 Then
                Call Select.Page.One(Temp1,False)
                Temp1=Temp1+1
                Call Select.Page.One(Temp1,True)
             Endif
          Case 81, 118
             If Temp1<22 Then
                Call Display.Page.One.B
                For Temp=22 To 43
                   Call Select.Page.One(Temp,False)
                Next
                Call Select.Page.One(22,True)
                Temp1=22
                TempA=22
                TempB=43
             Endif
          Case 73, 132
             If Temp1>21 Then
                Call Display.Page.One.A
                For Temp=1 To 21
                   Call Select.Page.One(Temp,False)
                Next
                Call Select.Page.One(1,True)
                Temp1=1
                TempA=1
                TempB=21
             Endif
          End Select
       Case 1
          Temp2=Asc(Right$(Strng3,1))
          If Temp2<>Temp1 Then
             Call Select.Page.One(Temp1,False)
             Temp1=Temp2
             Call Select.Page.One(Temp1,True)
          Endif
       End Select
    End Select
 Loop
ErrorResume88:
 Exit Sub
ErrorExit88:
 Resume ErrorResume88
End Sub

Sub Edit.Page.Two
 On Local Error Goto ErrorExit89
 Call Display.Page.Two.A
 For Temp=1 To 21
    Call Select.Page.Two(Temp,False)
 Next
 Call Select.Page.Two(1,True)
 Temp1=1
 TempA=1
 TempB=21
 Do While Lost.Carrier=False
    Strng3=Nul
    Do While Strng3=Nul
       If Lost.Carrier Then
          Exit Do
       Endif
       Call Read.Keyboard(Strng3)
       If Strng3 = Chr$(21) Then ' ^U = pageup
          Strng3 = Chr$(0) + Chr$(73)
       Endif
       If Strng3 = Chr$(14) Then ' ^N = pagedown
          Strng3 = Chr$(0) + Chr$(81)
       Endif
       Call Mouse.Driver(3)
       If Mouse.Button2 Then
          Strng3=Chr$(27)
       Endif
       If Mouse.Button3 Then
          Call Terminate.Program(True)
          End
       Endif
       If Mouse.Button Then
          Call Mouse.Select(2,44,False)
          If Len(Strng3) Then
	     Exit Do
	  Endif
          Call Edit.Mouse.Button
	  If Len(Strng3) Then
	     Exit Do
	  Endif
       Endif
       If Mouse.Row Or Mouse.Column Then
          Call Mouse.Select(2,44,True)
          If Len(Strng3) Then
	     Exit Do
	  Endif
       Endif
    Loop
    Select Case Len(Strng3)
    Case 1
       Select Case Strng3
       Case Chr$(27)
	  Exit Sub
       Case Chr$(8)
          If Temp1<22 Then
             Call Help(3)
             Call Display.Page.Two.A
             For Temp=1 To 21
                Call Select.Page.Two(Temp,False)
             Next
             Call Select.Page.Two(1,True)
             Temp1=1
             TempA=1
             TempB=21
          Else
             Call Help(4)
             Call Display.Page.Two.B
             For Temp=22 To 44
                Call Select.Page.Two(Temp,False)
             Next
             Call Select.Page.Two(22,True)
             Temp1=22
             TempA=22
             TempB=44
          Endif
       Case Chr$(13)
	  Restore Page.Two.Data
	  For Temp2=1 To Temp1
	     Read Xcoor,Ycoor,Row,Column,Line.Length
	  Next
	  Select Case Temp1
	  Case 1
             TempC$=Mid$(Str$(Config.Array2(10)),2)
	  Case 2
             TempC$=Mid$(Str$(Config.Array2(11)),2)
	  Case 3
             TempC$=Mid$(Str$(Config.Array2(12)),2)
	  Case 4
             If Config.Array2(13) Then
                TempC$="Hidden"
	     Else
                TempC$="Visible"
	     Endif
	  Case 5
             TempC$=YN$(Config.Array2(14))
	  Case 6
             TempC$=Config3$(6)
	  Case 7
             TempC$=YN$(Config.Array2(61))
	  Case 8
             TempC$=Config3$(14)
	  Case 9
             TempC$=Mid$(Str$(Config.Array2(15)),2)
	  Case 10
             TempC$=YN$(Config.Array2(16))
	  Case 11
             TempC$=YN$(Config.Array2(17))
	  Case 12
             TempC$=YN$(Config.Array2(18))
	  Case 13
             TempC$=YN$(Config.Array2(19))
	  Case 14
             TempC$=YN$(Config.Array2(20))
	  Case 15
             TempC$=Mid$(Str$(Config.Array2(21)),2)
	  Case 16
             TempC$=Mid$(Str$(Config.Array2(22)),2)
	  Case 17
             TempC$=Mid$(Str$(Config.Array2(23)),2)
	  Case 18
             TempC$=Mid$(Str$(Config.Array2(82)),2)
	  Case 19
             TempC$=Mid$(Str$(Config.Array2(24)),2)
	  Case 20
             TempC$=Mid$(Str$(Config.Array1(5)*100),2)
	  Case 21
             TempC$=Config3$(7)
	  Case 22
             TempC$=Config3$(8)
	  Case 23
             TempC$=Config3$(9)
	  Case 24
             TempC$=Config3$(10)
          Case 25
             TempC$=Config3$(78)
          Case 26
             TempC$=Config3$(79)
          Case 27
             TempC$=YN$(Config.Array2(39))
          Case 28
             TempC$=YN$(Config.Array2(44))
          Case 29
             TempC$=YN$(Config.Array2(58))
          Case 30
             TempC$=Mid$(Str$(Config.Array2(37)),2)
          Case 31
             TempC$=Mid$(Str$(Config.Array1(9)*100),2)
          Case 32
             TempC$=Mid$(Str$(Config.Array2(62)),2)
          Case 33
             TempC$=Mid$(Str$(Config.Array2(43)),2)
          Case 34
             TempC$=Mid$(Str$(Config.Array1(27)*100),2)
          Case 35
             TempC$=Mid$(Str$(Config.Array2(42)),2)
          Case 36
             TempC$=Mid$(Str$(Config.Array1(26)*100),2)
          Case 37
             TempC$=Mid$(Str$(Config.Array2(41)),2)
          Case 38
             TempC$=Mid$(Str$(Config.Array1(25)*100),2)
          Case 39
             TempC$=Mid$(Str$(Config.Array2(40)),2)
          Case 40
             TempC$=Mid$(Str$(Config.Array1(30)),2)
          Case 41
             TempC$=Mid$(Str$(Config.Array1(10)),2)
          Case 42
             TempC$=YN$(Config.Array2(50))
          Case 43
             TempC$=YN$(Config.Array2(81))
          Case 44
             TempC$=YN$(Config.Array2(109))
	  End Select
          Call ScreenEdit
	  Select Case Temp1
	  Case 1
             Config.Array2(10)=Int(Val(TempC$))
	  Case 2
             Config.Array2(11)=Int(Val(TempC$))
	  Case 3
             Config.Array2(12)=Int(Val(TempC$))
	  Case 4
             Select Case Left$(Ucase$(TempC$),1)
	     Case "H"
                Config.Array2(13)=True
	     Case "V"
                Config.Array2(13)=False
	     End Select
	  Case 5
             Config.Array2(14)=(Ucase$(Left$(TempC$,1))="Y")
	  Case 6
             Config.Array3(6)=TempC$
	  Case 7
             Config.Array2(61)=(Ucase$(Left$(TempC$,1))="Y")
	  Case 8
             Config.Array3(14)=TempC$
	  Case 9
             Config.Array2(15)=Int(Val(TempC$))
	  Case 10
             Config.Array2(16)=(Ucase$(Left$(TempC$,1))="Y")
	  Case 11
             Config.Array2(17)=(Ucase$(Left$(TempC$,1))="Y")
	  Case 12
             Config.Array2(18)=(Ucase$(Left$(TempC$,1))="Y")
	  Case 13
             Config.Array2(19)=(Ucase$(Left$(TempC$,1))="Y")
	  Case 14
             Config.Array2(20)=(Ucase$(Left$(TempC$,1))="Y")
	  Case 15
             Config.Array2(21)=Int(Val(TempC$))
	  Case 16
             Config.Array2(22)=Int(Val(TempC$))
	  Case 17
             Config.Array2(23)=Int(Val(TempC$))
	  Case 18
             Config.Array2(82)=Int(Val(TempC$))
	  Case 19
             Config.Array2(24)=Int(Val(TempC$))
	  Case 20
             Config.Array1(5)=Val(TempC$)/100
	  Case 21
             Config.Array3(7)=TempC$
	  Case 22
             Config.Array3(8)=TempC$
	  Case 23
             Config.Array3(9)=TempC$
	  Case 24
             Config.Array3(10)=TempC$
          Case 25
             Config.Array3(78)=TempC$
          Case 26
             Config.Array3(79)=TempC$
          Case 27
             Config.Array2(39)=(Ucase$(Left$(TempC$,1))="Y")
          Case 28
             Config.Array2(44)=(Ucase$(Left$(TempC$,1))="Y")
          Case 29
             Config.Array2(58)=(Ucase$(Left$(TempC$,1))="Y")
          Case 30
             Config.Array2(37)=Int(Val(TempC$))
          Case 31
             Config.Array1(9)=Val(TempC$)/100
          Case 32
             Config.Array2(62)=Int(Val(TempC$))
          Case 33
             Config.Array2(43)=Int(Val(TempC$))
          Case 34
             Config.Array1(27)=Val(TempC$)/100
          Case 35
             Config.Array2(42)=Int(Val(TempC$))
          Case 36
             Config.Array1(26)=Val(TempC$)/100
          Case 37
             Config.Array2(41)=Int(Val(TempC$))
          Case 38
             Config.Array1(25)=Val(TempC$)/100
          Case 39
             Config.Array2(40)=Int(Val(TempC$))
          Case 40
             Config.Array1(30)=Val(TempC$)
          Case 41
             Config.Array1(10)=Val(TempC$)
          Case 42
             Config.Array2(50)=(Ucase$(Left$(TempC$,1))="Y")
          Case 43
             Config.Array2(81)=(Ucase$(Left$(TempC$,1))="Y")
          Case 44
             Config.Array2(109)=(Ucase$(Left$(TempC$,1))="Y")
          End Select
	  Call Select.Page.Two(Temp1,True)
       End Select
    Case 2
       Select Case Asc(Left$(Strng3,1))
       Case 0
          Select Case Asc(Right$(Strng3,1))
          Case 0
             Exit Sub
          Case 72, 141, 152
             If Temp1>1 And Temp1<>22 Then
                Call Select.Page.Two(Temp1,False)
                Temp1=Temp1-1
                Call Select.Page.Two(Temp1,True)
             Endif
          Case 80, 145, 160
             If Temp1<44 And Temp1<>21 Then
                Call Select.Page.Two(Temp1,False)
                Temp1=Temp1+1
                Call Select.Page.Two(Temp1,True)
             Endif
          Case 81, 118
             If Temp1<22 Then
                Call Display.Page.Two.B
                For Temp=22 To 44
                   Call Select.Page.Two(Temp,False)
                Next
                Call Select.Page.Two(22,True)
                Temp1=22
                TempA=22
                TempB=44
             Endif
          Case 73, 132
             If Temp1>21 Then
                Call Display.Page.Two.A
                For Temp=1 To 21
                   Call Select.Page.Two(Temp,False)
                Next
                Call Select.Page.Two(1,True)
                Temp1=1
                TempA=1
                TempB=21
             Endif
          End Select
       Case 1
          Temp2=Asc(Right$(Strng3,1))
          If Temp2<>Temp1 Then
             Call Select.Page.Two(Temp1,False)
             Temp1=Temp2
             Call Select.Page.Two(Temp1,True)
          Endif
       End Select
    End Select
 Loop
ErrorResume89:
 Exit Sub
ErrorExit89:
 Resume ErrorResume89
End Sub

Sub Edit.Page.Three
 On Local Error Goto ErrorExit90
 Call Display.Page.Three.A
 For Temp=1 To 23
    Call Select.Page.Three(Temp,False)
 Next
 Call Select.Page.Three(1,True)
 Temp1=1
 TempA=1
 TempB=23
 Do While Lost.Carrier=False
    Strng3=Nul
    Do While Strng3=Nul
       If Lost.Carrier Then
          Exit Do
       Endif
       Call Read.Keyboard(Strng3)
       If Strng3 = Chr$(21) Then ' ^U = pageup
          Strng3 = Chr$(0) + Chr$(73)
       Endif
       If Strng3 = Chr$(14) Then ' ^N = pagedown
          Strng3 = Chr$(0) + Chr$(81)
       Endif
       Call Mouse.Driver(3)
       If Mouse.Button2 Then
          Strng3=Chr$(27)
       Endif
       If Mouse.Button3 Then
          Call Terminate.Program(True)
          End
       Endif
       If Mouse.Button Then
          Call Mouse.Select(3,46,False)
          If Len(Strng3) Then
	     Exit Do
	  Endif
          Call Edit.Mouse.Button
	  If Len(Strng3) Then
	     Exit Do
	  Endif
       Endif
       If Mouse.Row Or Mouse.Column Then
          Call Mouse.Select(3,46,True)
          If Len(Strng3) Then
	     Exit Do
	  Endif
       Endif
    Loop
    Select Case Len(Strng3)
    Case 1
       Select Case Strng3
       Case Chr$(27)
	  Exit Sub
       Case Chr$(8)
          If Temp1<24 Then
             Call Help(5)
             Call Display.Page.Three.A
             For Temp=1 To 23
                Call Select.Page.Three(Temp,False)
             Next
             Call Select.Page.Three(1,True)
             Temp1=1
             TempA=1
             TempB=23
          Else
             If Temp1<47 Then
                Call Help(6)
                Call Display.Page.Three.B
                For Temp=24 To 46
                   Call Select.Page.Three(Temp,False)
                Next
                Call Select.Page.Three(24,True)
                Temp1=24
                TempA=24
                TempB=46
             Else
                Call Help(7)
                Call Display.Page.Three.C
                For Temp=47 To 53
                   Call Select.Page.Three(Temp,False)
                Next
                Call Select.Page.Three(47,True)
                Temp1=47
                TempA=47
                TempB=51
             Endif
          Endif
       Case Chr$(13)
	  Restore Page.Three.Data
	  For Temp2=1 To Temp1
	     Read Xcoor,Ycoor,Row,Column,Line.Length
	  Next
	  Select Case Temp1
	  Case 1
             TempC$=Config3$(11)
	  Case 2
             TempC$=Config3$(52)
	  Case 3
             TempC$=Config3$(53)
	  Case 4
             TempC$=Config3$(54)
	  Case 5
             TempC$=Config3$(62)
	  Case 6
             TempC$=Config3$(15)
	  Case 7
             TempC$=Config3$(57)
	  Case 8
             TempC$=Config3$(51)
	  Case 9
             TempC$=Config3$(72)
	  Case 10
             TempC$=Config3$(67)
	  Case 11
             TempC$=Config3$(70)
	  Case 12
             TempC$=Config3$(73)
	  Case 13
             TempC$=Config3$(75)
	  Case 14
             TempC$=Config3$(56)
	  Case 15
             TempC$=Config3$(63)
	  Case 16
             TempC$=Config3$(16)
	  Case 17
             TempC$=Config3$(17)
	  Case 18
             TempC$=Config3$(18)
	  Case 19
             TempC$=Config3$(19)
	  Case 20
             TempC$=Config3$(20)
	  Case 21
             TempC$=Config3$(21)
          Case 22
             TempC$=Config3$(81)
          Case 23
             TempC$=Config3$(82)
          Case 24
             TempC$=Config3$(12)
          Case 25
             TempC$=Config3$(49)
          Case 26
             TempC$=Config3$(13)
          Case 27
             TempC$=Config3$(28)
          Case 28
             TempC$=Config3$(50)
          Case 29
             TempC$=Config3$(22)
          Case 30
             TempC$=Config3$(58)
          Case 31
             TempC$=Config3$(60)
          Case 32
             TempC$=Config3$(59)
          Case 33
             TempC$=Config3$(64)
          Case 34
             TempC$=Config3$(65)
          Case 35
             TempC$=Config3$(68)
          Case 36
             TempC$=Config3$(69)
          Case 37
             TempC$=Config3$(76)
          Case 38
             TempC$=Config3$(61)
          Case 39
             TempC$=Config3$(80)
          Case 40
             TempC$=Config3$(86)
          Case 41
             TempC$=Config3$(87)
          Case 42
             TempC$=Config3$(88)
          Case 43
             TempC$=Config3$(89)
          Case 44
             TempC$=Config3$(90)
          Case 45
             TempC$=Config3$(91)
          Case 46
             TempC$=Config3$(92)
          Case 47
             TempC$=Config3$(93)
          Case 48
             TempC$=Config3$(96)
          Case 49
             TempC$=Config3$(97)
          Case 50
             TempC$=Config3$(99)
          Case 51
             TempC$=Config3$(100)
          Case 52
             TempC$=Config3$(38)
          Case 53
             TempC$=Config3$(23)
	  End Select
          VarX=True
          If Temp1=45 Or Temp1=46 Then
             If Local.Mode=False Then
                VarX=False
             Endif
          Endif
          If VarX Then
             Call ScreenEdit
             TempC$=Ucase$(TempC$)
             TempC$=Rtrim$(TempC$)
             If Instr(TempC$,"?") Or Instr(TempC$,"*") Then
                Exit Do
             Endif
             If Temp1<>45 And Temp1<>46 Then
                If Instr(TempC$,".COM") Or Instr(TempC$,".EXE") Or _
                Instr(TempC$,".BAT") Or Instr(TempC$,".CMD") Or _
                Instr(TempC$,".SYS") Or Instr(TempC$,".BAS") Then
                   Exit Do
                Endif
             Endif
          Endif
	  Select Case Temp1
	  Case 1
             If Len(TempC$)=1 Then
                If TempC$>="A" And TempC$<="Z" Then
                   TempC$=TempC$+":"
                Endif
             Endif
             Config.Array3(11)=TempC$
	     If TempC$<>Nul Then
		If Right$(TempC$,1)<>"\" Then
                   Config.Array3(11)=Config3$(11)+"\"
		Endif
	     Endif
	  Case 2
             If Len(TempC$)=1 Then
                If TempC$>="A" And TempC$<="Z" Then
                   TempC$=TempC$+":"
                Endif
             Endif
             Config.Array3(52)=TempC$
	     If TempC$<>Nul Then
		If Right$(TempC$,1)<>"\" Then
                   Config.Array3(52)=Config3$(52)+"\"
		Endif
	     Endif
	  Case 3
             If Len(TempC$)=1 Then
                If TempC$>="A" And TempC$<="Z" Then
                   TempC$=TempC$+":"
                Endif
             Endif
             Config.Array3(53)=TempC$
	     If TempC$<>Nul Then
		If Right$(TempC$,1)<>"\" Then
                   Config.Array3(53)=Config3$(53)+"\"
		Endif
	     Endif
	  Case 4
             If Len(TempC$)=1 Then
                If TempC$>="A" And TempC$<="Z" Then
                   TempC$=TempC$+":"
                Endif
             Endif
             Config.Array3(54)=TempC$
	     If TempC$<>Nul Then
		If Right$(TempC$,1)<>"\" Then
                   Config.Array3(54)=Config3$(54)+"\"
		Endif
	     Endif
	  Case 5
             Config.Array3(62)=TempC$
	  Case 6
             Config.Array3(15)=TempC$
	  Case 7
             Config.Array3(57)=TempC$
	  Case 8
             Config.Array3(51)=TempC$
	  Case 9
             Config.Array3(72)=TempC$
	  Case 10
             Config.Array3(67)=TempC$
	  Case 11
             Config.Array3(70)=TempC$
	  Case 12
             Config.Array3(73)=TempC$
	  Case 13
             Config.Array3(75)=TempC$
	  Case 14
             Config.Array3(56)=TempC$
	  Case 15
             Config.Array3(63)=TempC$
	  Case 16
             Config.Array3(16)=TempC$
	  Case 17
             Config.Array3(17)=TempC$
	  Case 18
             Config.Array3(18)=TempC$
	  Case 19
             Config.Array3(19)=TempC$
	  Case 20
             Config.Array3(20)=TempC$
	  Case 21
             Config.Array3(21)=TempC$
          Case 22
             Config.Array3(81)=TempC$
          Case 23
             Config.Array3(82)=TempC$
          Case 24
             Config.Array3(12)=TempC$
          Case 25
             Config.Array3(49)=TempC$
          Case 26
             Config.Array3(13)=TempC$
          Case 27
             Config.Array3(28)=TempC$
          Case 28
             Config.Array3(50)=TempC$
          Case 29
             Config.Array3(22)=TempC$
          Case 30
             Config.Array3(58)=TempC$
          Case 31
             Config.Array3(60)=TempC$
          Case 32
             Config.Array3(59)=TempC$
          Case 33
             Config.Array3(64)=TempC$
          Case 34
             Config.Array3(65)=TempC$
          Case 35
             Config.Array3(68)=TempC$
          Case 36
             Config.Array3(69)=TempC$
          Case 37
             Config.Array3(76)=TempC$
          Case 38
             Config.Array3(61)=TempC$
          Case 39
             Config.Array3(80)=TempC$
          Case 40
             Config.Array3(86)=TempC$
          Case 41
             Config.Array3(87)=TempC$
          Case 42
             Config.Array3(88)=TempC$
          Case 43
             Config.Array3(89)=TempC$
          Case 44
             Config.Array3(90)=TempC$
          Case 45
             If VarX Then
                Config.Array3(91)=TempC$
             Endif
          Case 46
             If VarX Then
                Config.Array3(92)=TempC$
             Endif
          Case 47
             Config.Array3(93)=TempC$
          Case 48
             Config.Array3(96)=TempC$
          Case 49
             Config.Array3(97)=TempC$
          Case 50
             Config.Array3(99)=TempC$
          Case 51
             Config.Array3(100)=TempC$
          Case 52
             Config.Array3(38)=TempC$
          Case 53
             Config.Array3(23)=TempC$
	  End Select
	  Call Select.Page.Three(Temp1,True)
       End Select
    Case 2
       Select Case Asc(Left$(Strng3,1))
       Case 0
          Select Case Asc(Right$(Strng3,1))
          Case 0
             Exit Sub
          Case 72, 141, 152
             If Temp1>1 And Temp1<>24 And Temp1<>47 Then
                Call Select.Page.Three(Temp1,False)
                Temp1=Temp1-1
                Call Select.Page.Three(Temp1,True)
             Endif
          Case 80, 145, 160
             If Temp1<53 And Temp1<>23 And Temp1<>46 Then
                Call Select.Page.Three(Temp1,False)
                Temp1=Temp1+1
                Call Select.Page.Three(Temp1,True)
             Endif
          Case 81, 118
             If Temp1<24 Then
                Call Display.Page.Three.B
                For Temp=24 To 46
                   Call Select.Page.Three(Temp,False)
                Next
                Call Select.Page.Three(24,True)
                Temp1=24
                TempA=24
                TempB=46
             Else
                If Temp1<47 Then
                   Call Display.Page.Three.C
                   For Temp=47 To 53
                      Call Select.Page.Three(Temp,False)
                   Next
                   Call Select.Page.Three(47,True)
                   Temp1=47
                   TempA=47
                   TempB=53
                Endif
             Endif
          Case 73, 132
             If Temp1>46 Then
                Call Display.Page.Three.B
                For Temp=24 To 46
                   Call Select.Page.Three(Temp,False)
                Next
                Call Select.Page.Three(24,True)
                Temp1=24
                TempA=24
                TempB=46
             Else
                If Temp1>23 Then
                   Call Display.Page.Three.A
                   For Temp=1 To 23
                      Call Select.Page.Three(Temp,False)
                   Next
                   Call Select.Page.Three(1,True)
                   Temp1=1
                   TempA=1
                   TempB=23
                Endif
             Endif
          End Select
       Case 1
          Temp2=Asc(Right$(Strng3,1))
          If Temp2<>Temp1 Then
             Call Select.Page.Three(Temp1,False)
             Temp1=Temp2
             Call Select.Page.Three(Temp1,True)
          Endif
       End Select
    End Select
 Loop
ErrorResume90:
 Exit Sub
ErrorExit90:
 Resume ErrorResume90
End Sub

Sub Edit.Page.Four
 On Local Error Goto ErrorExit91
 Call Display.Page.Four.A
 For Temp=1 To 23
    Call Select.Page.Four(Temp,False)
 Next
 Call Select.Page.Four(1,True)
 Temp1=1
 TempA=1
 TempB=22
 Do While Lost.Carrier=False
    Strng3=Nul
    Do While Strng3=Nul
       If Lost.Carrier Then
          Exit Do
       Endif
       Call Read.Keyboard(Strng3)
       If Strng3 = Chr$(21) Then ' ^U = pageup
          Strng3 = Chr$(0) + Chr$(73)
       Endif
       If Strng3 = Chr$(14) Then ' ^N = pagedown
          Strng3 = Chr$(0) + Chr$(81)
       Endif
       Call Mouse.Driver(3)
       If Mouse.Button2 Then
          Strng3=Chr$(27)
       Endif
       If Mouse.Button3 Then
          Call Terminate.Program(True)
          End
       Endif
       If Mouse.Button Then
          Call Mouse.Select(4,36,False)
          If Len(Strng3) Then
	     Exit Do
	  Endif
          Call Edit.Mouse.Button
	  If Len(Strng3) Then
	     Exit Do
	  Endif
       Endif
       If Mouse.Row Or Mouse.Column Then
          Call Mouse.Select(4,36,True)
          If Len(Strng3) Then
	     Exit Do
	  Endif
       Endif
    Loop
    Select Case Len(Strng3)
    Case 1
       Select Case Strng3
       Case Chr$(27)
	  Exit Sub
       Case Chr$(8)
          If Temp1<24 Then
             Call Help(8)
             Call Display.Page.Four.A
             For Temp=1 To 23
                Call Select.Page.Four(Temp,False)
             Next
             Call Select.Page.Four(1,True)
             Temp1=1
             TempA=1
             TempB=23
          Else
             Call Help(9)
             Call Display.Page.Four.B
             For Temp=24 To 46
                Call Select.Page.Four(Temp,False)
             Next
             Call Select.Page.Four(24,True)
             Temp1=24
             TempA=24
             TempB=46
          Endif
       Case Chr$(13)
	  Restore Page.Four.Data
	  For Temp2=1 To Temp1
	     Read Xcoor,Ycoor,Row,Column,Line.Length
	  Next
	  Select Case Temp1
          Case 1
             TempC$=YN$(Token)
          Case 2
	     TempC$=Rtrim$(Room.Array(1))
          Case 3
	     TempC$=Rtrim$(Room.Array(2))
          Case 4
	     TempC$=Rtrim$(Room.Array(3))
          Case 5
	     TempC$=Rtrim$(Room.Array(4))
          Case 6
	     TempC$=Rtrim$(Room.Array(5))
          Case 7
	     TempC$=Rtrim$(Room.Array(6))
          Case 8
	     TempC$=Rtrim$(Room.Array(7))
          Case 9
	     TempC$=Rtrim$(Room.Array(8))
          Case 10
	     TempC$=Rtrim$(Room.Array(9))
          Case 11
	     TempC$=Rtrim$(Room.Array(10))
          Case 12
	     TempC$=Rtrim$(Room.Array(11))
          Case 13
	     TempC$=Rtrim$(Room.Array(12))
          Case 14
	     TempC$=Rtrim$(Room.Array(13))
          Case 15
	     TempC$=Rtrim$(Room.Array(14))
          Case 16
	     TempC$=Rtrim$(Room.Array(15))
          Case 17
	     TempC$=Rtrim$(Room.Array(16))
          Case 18
             TempC$=Mid$(Str$(Config.Array2(120)),2)
          Case 19
             TempC$=Mid$(Str$(Config.Array2(121)),2)
          Case 20
             TempC$=Mid$(Str$(Config.Array2(122)),2)
          Case 21
             TempC$=Mid$(Str$(Config.Array2(123)),2)
          Case 22
             TempC$=YN$(Config.Array2(124))
          Case 23
             TempC$=YN$(Config.Array2(125))
          Case 24
             TempC$=YN$(Config.Array2(126))
          Case 25
             TempC$=YN$(Config.Array2(127))
          Case 26
             TempC$=YN$(Config.Array2(128))
          Case 27
             TempC$=YN$(Config.Array2(129))
          Case 28
             TempC$=Mid$(Str$(Config.Array1(38)),2)
          Case 29
             TempC$=Mid$(Str$(Config.Array1(39)),2)
          Case 30
             TempC$=Mid$(Str$(Config.Array2(132)),2)
          Case 31
             TempC$=Mid$(Str$(Config.Array2(133)),2)
          Case 32
             TempC$=Rtrim$(Config3$(85))
          Case 33
             TempC$=Mid$(Str$(Config.Array2(134)),2)
          Case 34
             TempC$=YN$(Config.Array2(135))
          Case 35
             TempC$=YN$(Config.Array2(136))
          Case 36
             TempC$=YN$(Config.Array2(137))
          Case 37
             TempC$=YN$(Config.Array2(138))
          Case 38
             TempC$=YN$(Config.Array2(139))
          Case 39
             TempC$=YN$(Config.Array2(140))
          Case 40
             TempC$=YN$(Config.Array2(141))
          Case 41
             TempC$=YN$(Config.Array2(142))
          Case 42
             TempC$=Mid$(Str$(Config.Array2(143)),2)
          Case 43
             TempC$=Mid$(Str$(Config.Array2(144)),2)
          Case 44
             TempC$=Config.Array3(94)
          Case 45
             TempC$=Config.Array3(95)
          Case 46
             TempC$=Config.Array3(98)
	  End Select
          Call ScreenEdit
	  Select Case Temp1
          Case 1
             Token=Left$(Ucase$(TempC$),1)="Y"
             If Token Then
                Restore OldRoomData
                For VarQ=1 To 20
                   Read Room.Array(VarQ)
                Next
             Else
                For VarQ=1 To 20
                   Room.Array(VarQ)=Mid$(Str$(VarQ),2)
                Next
             Endif
             For Temp=2 To 17
                Call Select.Page.Four(Temp,False)
             Next
          Case 2
	     Room.Array(1)=TempC$
          Case 3
	     Room.Array(2)=TempC$
          Case 4
	     Room.Array(3)=TempC$
          Case 5
	     Room.Array(4)=TempC$
          Case 6
	     Room.Array(5)=TempC$
          Case 7
	     Room.Array(6)=TempC$
          Case 8
	     Room.Array(7)=TempC$
          Case 9
	     Room.Array(8)=TempC$
          Case 10
	     Room.Array(9)=TempC$
          Case 11
	     Room.Array(10)=TempC$
          Case 12
             Room.Array(11)=TempC$
          Case 13
             Room.Array(12)=TempC$
          Case 14
             Room.Array(13)=TempC$
          Case 15
             Room.Array(14)=TempC$
          Case 16
             Room.Array(15)=TempC$
          Case 17
             Room.Array(16)=TempC$
          Case 18
             Config.Array2(120)=Int(Val(TempC$))
          Case 19
             Config.Array2(121)=Int(Val(TempC$))
          Case 20
             Config.Array2(122)=Int(Val(TempC$))
          Case 21
             Config.Array2(123)=Int(Val(TempC$))
          Case 22
             Config.Array2(124)=(Ucase$(Left$(TempC$,1))="Y")
          Case 23
             Config.Array2(125)=(Ucase$(Left$(TempC$,1))="Y")
          Case 24
             Config.Array2(126)=(Ucase$(Left$(TempC$,1))="Y")
          Case 25
             Config.Array2(127)=(Ucase$(Left$(TempC$,1))="Y")
          Case 26
             Config.Array2(128)=(Ucase$(Left$(TempC$,1))="Y")
          Case 27
             Config.Array2(129)=(Ucase$(Left$(TempC$,1))="Y")
          Case 28
             Config.Array1(38)=Int(Val(TempC$))
          Case 29
             Config.Array1(39)=Int(Val(TempC$))
          Case 30
             Config.Array2(132)=Int(Val(TempC$))
          Case 31
             Config.Array2(133)=Int(Val(TempC$))
          Case 32
             Config.Array3(85)=TempC$
          Case 33
             Config.Array2(134)=Int(Val(TempC$))
          Case 34
             Config.Array2(135)=(Ucase$(Left$(TempC$,1))="Y")
          Case 35
             Config.Array2(136)=(Ucase$(Left$(TempC$,1))="Y")
          Case 36
             Config.Array2(137)=(Ucase$(Left$(TempC$,1))="Y")
          Case 37
             Config.Array2(138)=(Ucase$(Left$(TempC$,1))="Y")
          Case 38
             Config.Array2(139)=(Ucase$(Left$(TempC$,1))="Y")
          Case 39
             Config.Array2(140)=(Ucase$(Left$(TempC$,1))="Y")
          Case 40
             Config.Array2(141)=(Ucase$(Left$(TempC$,1))="Y")
          Case 41
             Config.Array2(142)=(Ucase$(Left$(TempC$,1))="Y")
          Case 42
             Config.Array2(143)=Int(Val(TempC$))
          Case 43
             Config.Array2(144)=Int(Val(TempC$))
          Case 44
             If Int(Val(TempC$))>=10000 And Int(Val(TempC$))<=1000000 Then
                Config.Array3(94)=Mid$(Str$(Int(Val(TempC$))),2)
             Endif
          Case 45
             If Int(Val(TempC$))>=10000 And Int(Val(TempC$))<=10000000 Then
                Config.Array3(95)=Mid$(Str$(Int(Val(TempC$))),2)
             Endif
          Case 46
             Config.Array3(98)=TempC$
	  End Select
       End Select
       Call Select.Page.Four(Temp1,True)
    Case 2
       Select Case Asc(Left$(Strng3,1))
       Case 0
          Select Case Asc(Right$(Strng3,1))
          Case 0
             Exit Sub
          Case 72, 141, 152
             If Temp1>1 And Temp1<>24 Then
                Call Select.Page.Four(Temp1,False)
                Temp1=Temp1-1
                Call Select.Page.Four(Temp1,True)
             Endif
          Case 80, 145, 160
             If Temp1<46 And Temp1<>23 Then
                Call Select.Page.Four(Temp1,False)
                Temp1=Temp1+1
                Call Select.Page.Four(Temp1,True)
             Endif
          Case 81, 118
             If Temp1<24 Then
                Call Display.Page.Four.B
                For Temp=24 To 46
                   Call Select.Page.Four(Temp,False)
                Next
                Call Select.Page.Four(24,True)
                Temp1=24
                TempA=24
                TempB=46
             Endif
          Case 73, 132
             If Temp1>23 Then
                Call Display.Page.Four.A
                For Temp=1 To 23
                   Call Select.Page.Four(Temp,False)
                Next
                Call Select.Page.Four(1,True)
                Temp1=1
                TempA=1
                TempB=23
             Endif
          End Select
       Case 1
          Temp2=Asc(Right$(Strng3,1))
          If Temp2<>Temp1 Then
             Call Select.Page.Four(Temp1,False)
             Temp1=Temp2
             Call Select.Page.Four(Temp1,True)
          Endif
       End Select
    End Select
 Loop
ErrorResume91:
 Exit Sub
ErrorExit91:
 Resume ErrorResume91
End Sub

Sub Edit.Page.Five
 On Local Error Goto ErrorExit92
 Call Display.Page.Five.A
 For Temp=1 To 22
    Call Select.Page.Five(Temp,False)
 Next
 Call Select.Page.Five(1,True)
 Temp1=1
 TempA=1
 TempB=22
 Do While Lost.Carrier=False
    Strng3=Nul
    Do While Strng3=Nul
       If Lost.Carrier Then
          Exit Do
       Endif
       Call Read.Keyboard(Strng3)
       If Strng3 = Chr$(21) Then ' ^U = pageup
          Strng3 = Chr$(0) + Chr$(73)
       Endif
       If Strng3 = Chr$(14) Then ' ^N = pagedown
          Strng3 = Chr$(0) + Chr$(81)
       Endif
       Call Mouse.Driver(3)
       If Mouse.Button2 Then
          Strng3=Chr$(27)
       Endif
       If Mouse.Button3 Then
          Call Terminate.Program(True)
          End
       Endif
       If Mouse.Button Then
          Call Mouse.Select(5,45,False)
          If Len(Strng3) Then
	     Exit Do
	  Endif
          Call Edit.Mouse.Button
	  If Len(Strng3) Then
	     Exit Do
	  Endif
       Endif
       If Mouse.Row Or Mouse.Column Then
          Call Mouse.Select(5,45,True)
          If Len(Strng3) Then
	     Exit Do
	  Endif
       Endif
    Loop
    Select Case Len(Strng3)
    Case 1
       Select Case Strng3
       Case Chr$(27)
	  Exit Sub
       Case Chr$(8)
          If Temp1<23 Then
             Call Help(10)
             Call Display.Page.Five.A
             For Temp=1 To 22
                Call Select.Page.Five(Temp,False)
             Next
             Call Select.Page.Five(1,True)
             Temp1=1
             TempA=1
             TempB=22
          Else
             Call Help(11)
             Call Display.Page.Five.B
             For Temp=23 To 45
                Call Select.Page.Five(Temp,False)
             Next
             Call Select.Page.Five(23,True)
             Temp1=23
             TempA=23
             TempB=45
          Endif
       Case Chr$(13)
	  Restore Page.Five.Data
	  For Temp2=1 To Temp1
	     Read Xcoor,Ycoor,Row,Column,Line.Length
	  Next
	  Select Case Temp1
	  Case 1
             TempC$=Config3$(74)
	  Case 2
             TempC$=Mid$(Str$(Config.Array1(11)*100),2)
	  Case 3
             TempC$=Mid$(Str$(Config.Array1(12)*100),2)
	  Case 4
             TempC$=Mid$(Str$(Config.Array1(13)*100),2)
	  Case 5
             TempC$=Mid$(Str$(Config.Array1(14)*100),2)
	  Case 6
             TempC$=Mid$(Str$(Config.Array1(15)),2)
	  Case 7
             TempC$=Mid$(Str$(Config.Array2(27)),2)
	  Case 8
             TempC$=Mid$(Str$(Config.Array2(28)),2)
	  Case 9
             TempC$=Mid$(Str$(Config.Array1(16)*100),2)
	  Case 10
             TempC$=Mid$(Str$(Config.Array2(29)),2)
	  Case 11
             TempC$=Mid$(Str$(Config.Array2(30)),2)
	  Case 12
             TempC$=Mid$(Str$(Config.Array1(17)*100),2)
	  Case 13
             TempC$=Mid$(Str$(Config.Array1(18)*100),2)
	  Case 14
             TempC$=Mid$(Str$(Config.Array1(19)*100),2)
	  Case 15
             TempC$=Mid$(Str$(Config.Array2(31)),2)
	  Case 16
             TempC$=Mid$(Str$(Config.Array1(20)*100),2)
	  Case 17
             TempC$=Mid$(Str$(Config.Array2(33)),2)
	  Case 18
             TempC$=Mid$(Str$(Config.Array2(34)),2)
	  Case 19
             TempC$=Mid$(Str$(Config.Array1(21)*100),2)
	  Case 20
             TempC$=Mid$(Str$(Config.Array2(35)),2)
	  Case 21
             If Config.Array2(96) Then
		TempC$="I"
	     Else
		TempC$="D"
	     Endif
          Case 22
             TempC$=Mid$(Str$(Config.Array2(97)),2)
	  Case 23
             TempC$=Mid$(Str$(Config.Array2(36)),2)
	  Case 24
             TempC$=Mid$(Str$(Config.Array1(22)*100),2)
	  Case 25
             TempC$=Mid$(Str$(Config.Array1(24)*100),2)
	  Case 26
             TempC$=YN$(Config.Array2(55))
	  Case 27
             TempC$=Mid$(Str$(Config.Array2(59)),2)
	  Case 28
             TempC$=YN$(Config.Array2(68))
	  Case 29
             TempC$=Mid$(Str$(Config.Array2(69)),2)
	  Case 30
             TempC$=YN$(Config.Array2(70))
	  Case 31
             TempC$=YN$(Config.Array2(71))
	  Case 32
             TempC$=Mid$(Str$(Config.Array2(91)),2)
	  Case 33
             TempC$=Mid$(Str$(Config.Array2(92)),2)
	  Case 34
             If Config.Array2(93) Then
		TempC$="I"
	     Else
		TempC$="D"
	     Endif
	  Case 35
             TempC$=Mid$(Str$(Config.Array2(94)),2)
	  Case 36
             TempC$=Mid$(Str$(Config.Array1(31)),2)
	  Case 37
             TempC$=Mid$(Str$(Config.Array2(95)),2)
	  Case 38
             TempC$=Mid$(Str$(Config.Array1(32)),2)
	  Case 39
             If Config.Array2(98) Then
		TempC$="I"
	     Else
		TempC$="D"
	     Endif
          Case 40
             TempC$=Mid$(Str$(Config.Array2(99)),2)
	  Case 41
             If Config.Array2(100) Then
		TempC$="I"
	     Else
		TempC$="D"
	     Endif
          Case 42
             TempC$=Mid$(Str$(Config.Array2(101)),2)
	  Case 43
             If Config.Array2(102) Then
		TempC$="I"
	     Else
		TempC$="D"
	     Endif
          Case 44
             TempC$=Mid$(Str$(Config.Array2(103)),2)
          Case 45
             TempC$=YN$(Config.Array2(110))
	  End Select
          Call ScreenEdit
	  Select Case Temp1
	  Case 1
             Config.Array3(74)=TempC$
	  Case 2
             Config.Array1(11)=Val(TempC$)/100
	  Case 3
             Config.Array1(12)=Val(TempC$)/100
	  Case 4
             Config.Array1(13)=Val(TempC$)/100
	  Case 5
             Config.Array1(14)=Val(TempC$)/100
	  Case 6
             Config.Array1(15)=Val(TempC$)
	  Case 7
             Config.Array2(27)=Int(Val(TempC$))
	  Case 8
             Config.Array2(28)=Int(Val(TempC$))
	  Case 9
             Config.Array1(16)=Val(TempC$)/100
	  Case 10
             Config.Array2(29)=Int(Val(TempC$))
	  Case 11
             Config.Array2(30)=Int(Val(TempC$))
	  Case 12
             Config.Array1(17)=Val(TempC$)/100
	  Case 13
             Config.Array1(18)=Val(TempC$)/100
	  Case 14
             Config.Array1(19)=Val(TempC$)/100
	  Case 15
             Config.Array2(31)=Int(Val(TempC$))
	  Case 16
             Config.Array1(20)=Val(TempC$)/100
	  Case 17
             Config.Array2(33)=Int(Val(TempC$))
	  Case 18
             Config.Array2(34)=Int(Val(TempC$))
	  Case 19
             Config.Array1(21)=Val(TempC$)/100
	  Case 20
             Config.Array2(35)=Int(Val(TempC$))
	  Case 21
             Config.Array2(96)=(Ucase$(Left$(TempC$,1))="I")
          Case 22
             Config.Array2(97)=Int(Val(TempC$))
	  Case 23
             Config.Array2(36)=Int(Val(TempC$))
	  Case 24
             Config.Array1(22)=Val(TempC$)/100
	  Case 25
             Config.Array1(24)=Val(TempC$)/100
	  Case 26
             Config.Array2(55)=(Ucase$(Left$(TempC$,1))="Y")
	  Case 27
             Config.Array2(59)=Int(Val(TempC$))
	  Case 28
             Config.Array2(68)=(Ucase$(Left$(TempC$,1))="Y")
	  Case 29
             Config.Array2(69)=Int(Val(TempC$))
	  Case 30
             Config.Array2(70)=(Ucase$(Left$(TempC$,1))="Y")
	  Case 31
             Config.Array2(71)=(Ucase$(Left$(TempC$,1))="Y")
	  Case 32
             Config.Array2(91)=Int(Val(TempC$))
	  Case 33
             Config.Array2(92)=Int(Val(TempC$))
	  Case 34
             Config.Array2(93)=(Ucase$(Left$(TempC$,1))="I")
	  Case 35
             Config.Array2(94)=Int(Val(TempC$))
	  Case 36
             Config.Array1(31)=Int(Val(TempC$))
	  Case 37
             Config.Array2(95)=Int(Val(TempC$))
	  Case 38
             Config.Array1(32)=Int(Val(TempC$))
	  Case 39
             Config.Array2(98)=(Ucase$(Left$(TempC$,1))="I")
          Case 40
             Config.Array2(99)=Int(Val(TempC$))
	  Case 41
             Config.Array2(100)=(Ucase$(Left$(TempC$,1))="I")
          Case 42
             Config.Array2(101)=Int(Val(TempC$))
	  Case 43
             Config.Array2(102)=(Ucase$(Left$(TempC$,1))="I")
          Case 44
             Config.Array2(103)=Int(Val(TempC$))
          Case 45
             Config.Array2(110)=(Ucase$(Left$(TempC$,1))="Y")
          End Select
       End Select
       Call Select.Page.Five(Temp1,True)
    Case 2
       Select Case Asc(Left$(Strng3,1))
       Case 0
          Select Case Asc(Right$(Strng3,1))
          Case 0
             Exit Sub
          Case 72, 141, 152
             If Temp1>1 And Temp1<>23 Then
                Call Select.Page.Five(Temp1,False)
                Temp1=Temp1-1
                Call Select.Page.Five(Temp1,True)
             Endif
          Case 80, 145, 160
             If Temp1<45 And Temp1<>22 Then
                Call Select.Page.Five(Temp1,False)
                Temp1=Temp1+1
                Call Select.Page.Five(Temp1,True)
             Endif
          Case 81, 118
             If Temp1<23 Then
                Call Display.Page.Five.B
                For Temp=23 To 45
                   Call Select.Page.Five(Temp,False)
                Next
                Call Select.Page.Five(23,True)
                Temp1=23
                TempA=23
                TempB=45
             Endif
          Case 73, 132
             If Temp1>22 Then
                Call Display.Page.Five.A
                For Temp=1 To 22
                   Call Select.Page.Five(Temp,False)
                Next
                Call Select.Page.Five(1,True)
                Temp1=1
                TempA=1
                TempB=22
             Endif
          End Select
       Case 1
          Temp2=Asc(Right$(Strng3,1))
          If Temp2<>Temp1 Then
             Call Select.Page.Five(Temp1,False)
             Temp1=Temp2
             Call Select.Page.Five(Temp1,True)
          Endif
       End Select
    End Select
 Loop
ErrorResume92:
 Exit Sub
ErrorExit92:
 Resume ErrorResume92
End Sub

Sub Edit.Page.Six
 On Local Error Goto ErrorExit93
 Call Display.Page.Six.A
 For Temp=1 To 23
    Call Select.Page.Six(Temp,False)
 Next
 Call Select.Page.Six(1,True)
 Temp1=1
 TempA=1
 TempB=23
 Do While Lost.Carrier=False
    Strng3=Nul
    Do While Strng3=Nul
       If Lost.Carrier Then
          Exit Do
       Endif
       Call Read.Keyboard(Strng3)
       If Strng3 = Chr$(21) Then ' ^U = pageup
          Strng3 = Chr$(0) + Chr$(73)
       Endif
       If Strng3 = Chr$(14) Then ' ^N = pagedown
          Strng3 = Chr$(0) + Chr$(81)
       Endif
       Call Mouse.Driver(3)
       If Mouse.Button2 Then
          Strng3=Chr$(27)
       Endif
       If Mouse.Button3 Then
          Call Terminate.Program(True)
          End
       Endif
       If Mouse.Button Then
          Call Mouse.Select(6,53,False)
          If Len(Strng3) Then
	     Exit Do
	  Endif
          Call Edit.Mouse.Button
	  If Len(Strng3) Then
	     Exit Do
	  Endif
       Endif
       If Mouse.Row Or Mouse.Column Then
          Call Mouse.Select(6,53,True)
          If Len(Strng3) Then
	     Exit Do
	  Endif
       Endif
    Loop
    Select Case Len(Strng3)
    Case 1
       Select Case Strng3
       Case Chr$(27)
	  Exit Sub
       Case Chr$(8)
          If Temp1<24 Then
             Call Help(12)
             Call Display.Page.Six.A
             For Temp=1 To 23
                Call Select.Page.Six(Temp,False)
             Next
             Call Select.Page.Six(1,True)
             Temp1=1
             TempA=1
             TempB=23
          Else
             If Temp1<46 Then
                Call Help(13)
                Call Display.Page.Six.B
                For Temp=22 To 45
                   Call Select.Page.Six(Temp,False)
                Next
                Call Select.Page.Six(24,True)
                Temp1=24
                TempA=24
                TempB=45
             Else
                Call Help(13)
                Call Display.Page.Six.C
                For Temp=46 To 53
                   Call Select.Page.Six(Temp,False)
                Next
                Call Select.Page.Six(46,True)
                Temp1=46
                TempA=46
                TempB=53
             Endif
          Endif
       Case Chr$(13)
	  Restore Page.Six.Data
	  For Temp2=1 To Temp1
	     Read Xcoor,Ycoor,Row,Column,Line.Length
	  Next
	  Select Case Temp1
	  Case 1
             TempC$=Mid$(Str$(Config.Array2(46)),2)
          Case 2
             TempC$=Ucase$(Hex$(Config.Array2(114)))
          Case 3
             TempC$=Ucase$(Config3$(83))
          Case 4
             TempC$=Ucase$(Config3$(84))
          Case 5
             TempC$=Ucase$(Config3$(42))
          Case 6
             TempC$=Mid$(Str$(Config.Array2(57)),2)
          Case 7
             TempC$=Ucase$(Config3$(40))
          Case 8
             TempC$=Ucase$(Config3$(41))
          Case 9
             TempC$=Ucase$(Config3$(66))
          Case 10
             TempC$=Mid$(Str$(Config.Array2(56)),2)
          Case 11
             TempC$=Mid$(Str$(Config.Array2(64)),2)+"00"
          Case 12
             TempC$=Mid$(Str$(Config.Array2(60)),2)
          Case 13
             TempC$=YN$(Config.Array2(45))
          Case 14
             TempC$=YN$(Config.Array2(79))
          Case 15
             TempC$=YN$(Config.Array2(80))
          Case 16
             TempC$=YN$(Config.Array2(65))
          Case 17
             TempC$=Mid$(Str$(Config.Array2(47)),2)
          Case 18
             TempC$=YN$(Config.Array2(66))
          Case 19
             Hidden=True
             TempC$=Nul
          Case 20
             TempC$=YN$(Config.Array2(83))
          Case 21
             TempC$=Mid$(Str$(Config.Array2(84)),2)
          Case 22
             TempC$=Mid$(Str$(Config.Array2(49)),2)
          Case 23
             TempC$=YN$(Config.Array2(106))
          Case 24 To 53
             TempC$=Rtrim$(Ucase$(Modem.String(Temp1-23)))
	  End Select
          Call ScreenEdit
	  Select Case Temp1
	  Case 1
	     Temp2=Int(Val(TempC$))
             If Temp2>=0 And Temp2<=64 Then
                Config.Array2(46)=Temp2
                Select Case Config.Array2(46)
                ' try to get port address from bios
                Case 1
                   DEF SEG = 0
                   p = PEEK(&H400)
                   q = PEEK(&H401)
                   Config.Array2(114) = q * &H100 + p
                   DEF SEG
                   IF p = 0 AND q = 0 THEN
                      Config.Array2(114)=&H03F8
                   END IF
                Case 2
                   DEF SEG = 0
                   p = PEEK(&H402)
                   q = PEEK(&H403)
                   Config.Array2(114) = q * &H100 + p
                   DEF SEG
                   IF p = 0 AND q = 0 THEN
                      Config.Array2(114)=&H02F8
                   END IF
                Case 3
                   DEF SEG = 0
                   p = PEEK(&H404)
                   q = PEEK(&H405)
                   Config.Array2(114) = q * &H100 + p
                   DEF SEG
                   IF p = 0 AND q = 0 THEN
                      Config.Array2(114)=&H03E8
                   END IF
                Case 4
                   DEF SEG = 0
                   p = PEEK(&H406)
                   q = PEEK(&H407)
                   Config.Array2(114) = q * &H100 + p
                   DEF SEG
                   IF p = 0 AND q = 0 THEN
                      Config.Array2(114)=&H02E8
                   END IF
                ' no bios results so use hardcoded ports
                Case 5
                   Config.Array2(114)=&H03E0
                Case 6
                   Config.Array2(114)=&H02E0
                Case 7
                   Config.Array2(114)=&H0338
                Case 8
                   Config.Array2(114)=&H0238
                Case Else
                   Config.Array2(114)=False
                End Select
                If Temp2=0 Then
                   Config.Array2(114)=0
                   Call Select.Page.Six(2,False)
                   Call Select.Page.Six(1,True)
                   Temp1=1
                   TempA=1
                   TempB=23
                Else
                   Call Select.Page.Six(2,True)
                   Restore Page.Six.B.Data1
                   Read Xcoor,Ycoor,Row,Column,Line.Length
                   TempC$=Ucase$(Hex$(Config.Array2(114)))
                   Call ScreenEdit
                   Config.Array2(114)=Int(Val("&H"+Ucase$(TempC$)))
                   Call Select.Page.Six(2,False)

                   ' read modems.dat
                   DND.Path=Environ$("DNDBBS")
                   If DND.Path<>Nul Then
                      If Right$(DND.Path,1)<>"\" Then
                         DND.Path=DND.Path+"\"
                      Endif
                   Endif
                   FileName2$=DND.Path+"MODEMS.DAT"
                   If Dir$(FileName2$)<>"" Then
                      Close #TempFile1
                      Open FileName2$ For Input Shared As #TempFile1
                      Call Display.Border("Modem Models")
                      Call ANSI(4,37,44)
                      Model.Number=0
                      For Var=1 To 15
                         If Eof(TempFile1) Then
                            Exit For
                         Endif
                         Input #TempFile1,Model1$,Var1$,Var2$,Var3$,Var4$,Var5$
                         Model1$=Rtrim$(Model1$)
                         Model1$=Left$(Model1$,30)
                         Model.Number=Model.Number+1
                         If Len(Model1$) Then
                            Model.Line$=Mid$(Str$(Model.Number),2)+". "+Model1$
                            Call ANSI(2,Var+1,2)
                            Call Scrn(Model.Line$)
                         Endif
                      Next
                      For Var=1 To 15
                         If Eof(TempFile1) Then
                            Exit For
                         Endif
                         Input #TempFile1,Model1$,Var1$,Var2$,Var3$,Var4$,Var5$
                         Model1$=Rtrim$(Model1$)
                         Model1$=Left$(Model1$,30)
                         Model.Number=Model.Number+1
                         If Len(Model1$) Then
                            Model.Line$=Mid$(Str$(Model.Number),2)+". "+Model1$
                            Call ANSI(2,Var+1,40)
                            Call Scrn(Model.Line$)
                         Endif
                      Next
                      Model.Line$="31. Restore defaults."
                      Call ANSI(2,17,40)
                      Call Scrn(Model.Line$)
                      Gosub KeyPress
                      Model.Number=Int(Val(TempC$))
                      If Model.Number=31 Then
                         Config.Array2(57)=3
                         Config.Array3(42)="ATZ" ' reset
                         Config.Array3(39)="ATM0E0Q0X1V1&C1&D2S0=1S2=255" ' init
                         Config.Array3(40)="ATA" ' answer
                         Config.Array3(41)="ATM0H1" ' offhook
                         Config.Array3(66)="ATD" ' originate
                      Endif
                      If Model.Number>=1 And Model.Number<=30 Then
                         Close #TempFile1
                         If Dir$(FileName2$)<>"" Then
                            Open FileName2$ For Input Shared As #TempFile1
                            Var=False
                            Do
                               If Eof(TempFile1) Then
                                  Exit Do
                               Endif
                               Input #TempFile1,Model1$,Var1$,Var2$,Var3$,Var4$,Var5$
                               Var=Var+1
                               If Var=Model.Number Then
                                  Config.Array2(57)=1
                                  Config.Array3(42)=Var1$ ' reset
                                  Config.Array3(39)=Var2$ ' init
                                  Config.Array3(40)=Var3$ ' answer
                                  Config.Array3(41)=Var4$ ' offhook
                                  Config.Array3(66)=Var5$ ' originate
                                  Exit Do
                               Endif
                            Loop
                         Endif
                      Endif
                      Call Display.Page.Six.A
                      For Temp=1 To 23
                         Call Select.Page.Six(Temp,False)
                      Next
                      Call Select.Page.Six(1,True)
                      Temp1=1
                      TempA=1
                      TempB=23
                   Endif
                Endif
             Endif
          Case 2
             Config.Array2(114)=Int(Val("&H"+Ucase$(TempC$)))
          Case 3
             TempC$=Rtrim$(TempC$)
             TempC$=Ltrim$(TempC$)
             TempC$=Ucase$(TempC$)
             Select Case Len(TempC$)
             Case 0
                Config.Array3(83)=Nul
             Case 1
                Select Case TempC$
                Case "0" To "9"
                   Config.Array3(83)=TempC$
                Case "A" To "Z"
                   Config.Array3(83)=TempC$
                End Select
             Case 2
                Select Case Int(Val(TempC$))
                Case 10 To 99
                   Config.Array3(83)=TempC$
                End Select
             End Select
          Case 4
             Config.Array3(84)=Ucase$(TempC$)
	     If TempC$<>Nul Then
		If Right$(TempC$,1)<>"\" Then
                   Config.Array3(84)=Config3$(84)+"\"
		Endif
	     Endif
          Case 5 ' reset command
             Config.Array3(42)=Ucase$(TempC$)
          Case 6 ' init command
	     Select Case Int(Val(TempC$))
	     Case 1
                Config.Array2(57)=1
                Config.Array3(39)="ATM0E0Q0X1V1"
	     Case 2
                Config.Array2(57)=2
                Config.Array3(39)="ATM0E0Q0X1V1&C1&D2"
	     Case 3
                Config.Array2(57)=3
                Config.Array3(39)="ATM0E0Q0X1V1&C1&D2S0=1S2=255"
	     Case 4
                Config.Array2(57)=4
                Config.Array3(39)="ATM0E0Q0X1V1&C1&D2S0=1S2=255"
                Config.Array3(39)=Config3$(39)+"\N3\G1&K3%C3N1F10S37=9"
             Case 5
                Restore Page.Six.B.Data2
		Read Xcoor,Ycoor,Row,Column,Line.Length
                TempC$=Ucase$(Config3$(39))
                Call ScreenEdit
                Config.Array2(57)=5
                Config.Array3(39)=Ucase$(TempC$)
	     End Select
          Case 7 ' answer command
             Config.Array3(40)=Ucase$(TempC$)
          Case 8 ' offhook command
             Config.Array3(41)=Ucase$(TempC$)
          Case 9 ' originate command
             Config.Array3(66)=Ucase$(TempC$)
          Case 10
             Config.Array2(56)=Int(Val(TempC$))
          Case 11
             Select Case TempC$
             ' adjust baud rate to match 8250 uart
             Case "50", "75", "110", "134.5", "150", "268", "450"
                Config.Array2(64)=3
             Case "7200"
                Config.Array2(64)=48
             Case "12000", "14400", "16800"
                Config.Array2(64)=96
             Case "21600", "24000", "26400", "28800", "31200", "33600"
                Config.Array2(64)=192
             Case "64000", "78600"
                Config.Array2(64)=576
             Case "230400"
                Config.Array2(64)=1152
             Case "300"
                Config.Array2(64)=3
             Case "600"
                Config.Array2(64)=6
             Case "1200"
                Config.Array2(64)=12
             Case "2400"
                Config.Array2(64)=24
             Case "4800"
                Config.Array2(64)=48
             Case "9600"
                Config.Array2(64)=96
             Case "19200"
                Config.Array2(64)=192
             Case "38400"
                Config.Array2(64)=384
             Case "57600"
                Config.Array2(64)=576
             Case "115200"
                Config.Array2(64)=1152
             End Select
          Case 12
             Config.Array2(60)=Int(Val(TempC$))
          Case 13
             Config.Array2(45)=(Ucase$(Left$(TempC$,1))="Y")
          Case 14
             Config.Array2(79)=(Ucase$(Left$(TempC$,1))="Y")
          Case 15
             Config.Array2(80)=(Ucase$(Left$(TempC$,1))="Y")
          Case 16
             Config.Array2(65)=(Ucase$(Left$(TempC$,1))="Y")
          Case 17
             Config.Array2(47)=Int(Val(TempC$))
          Case 18
             Config.Array2(66)=(Ucase$(Left$(TempC$,1))="Y")
          Case 19
             Hidden=False
             Var$=Nul
             If Len(TempC$) Then
                TempC$=Ucase$(TempC$)
                Call Cryptograph(TempC$)
                For Var=1 To Len(TempC$)
                   Var2=Asc(Mid$(TempC$,Var,1))
                   Var$=Var$+Right$("0"+Hex$(Var2),2)
                Next
             Endif
             Config.Array3(46)=Ucase$(Var$)
          Case 20
             Config.Array2(83)=(Ucase$(Left$(TempC$,1))="Y")
          Case 21
             Config.Array2(84)=Int(Val(TempC$))
          Case 22
             Config.Array2(49)=Int(Val(TempC$))
          Case 23
             Config.Array2(106)=(Ucase$(Left$(TempC$,1))="Y")
          Case 24 To 53
             Modem.String(Temp1-23)=Ucase$(TempC$)
             Restore Page.Six.C.Data1
             For VarX=24 To Temp1
                Read Xcoor,Ycoor,Row,Column,Line.Length
             Next
             TempC$=Ltrim$(Str$(Modem.Connect(Temp1-23)))
             Call ScreenEdit
             VarQ!=Csng(Int(Val(TempC$)))
             Select Case VarQ!
             Case 300!, 600!, 1200!, 2400!, 4800!, 9600!, 19200!, 38400!, 57600!, 115200!
                Modem.Connect(Temp1-23)=VarQ!
             Case Else
                Modem.Connect(Temp1-23)=SFalse
             End Select
             Call Select.Page.Six(Temp1,False)
             Restore Page.Six.D.Data1
             For VarX=24 To Temp1
                Read Xcoor,Ycoor,Row,Column,Line.Length
             Next
             TempC$=YN$(Modem.Allow(Temp1-23))
             Call ScreenEdit
             Modem.Allow(Temp1-23)=(Ucase$(Left$(TempC$,1))="Y")
             Call Select.Page.Six(Temp1,False)
	  End Select
	  Call Select.Page.Six(Temp1,True)
       End Select
    Case 2
       Select Case Asc(Left$(Strng3,1))
       Case 0
          Select Case Asc(Right$(Strng3,1))
          Case 0
             Exit Sub
          Case 72, 141, 152
             If Temp1>1 And Temp1<>24 And Temp1<>46 Then
                Call Select.Page.Six(Temp1,False)
                Temp1=Temp1-1
                Call Select.Page.Six(Temp1,True)
             Endif
          Case 80, 145, 160
             If Temp1<53 And Temp1<>23 And Temp1<>45 Then
                Call Select.Page.Six(Temp1,False)
                Temp1=Temp1+1
                Call Select.Page.Six(Temp1,True)
             Endif
          Case 81, 118
             If Temp1<24 Then
                Call Display.Page.Six.B
                For Temp=22 To 45
                   Call Select.Page.Six(Temp,False)
                Next
                Call Select.Page.Six(24,True)
                Temp1=24
                TempA=24
                TempB=45
             Else
                If Temp1<46 Then
                   Call Display.Page.Six.C
                   For Temp=46 To 53
                      Call Select.Page.Six(Temp,False)
                   Next
                   Call Select.Page.Six(46,True)
                   Temp1=46
                   TempA=46
                   TempB=53
                Endif
             Endif
          Case 73, 132
             If Temp1>45 Then
                Call Display.Page.Six.B
                For Temp=22 To 45
                   Call Select.Page.Six(Temp,False)
                Next
                Call Select.Page.Six(24,True)
                Temp1=24
                TempA=24
                TempB=45
             Else
                If Temp1>23 Then
                   Call Display.Page.Six.A
                   For Temp=1 To 23
                      Call Select.Page.Six(Temp,False)
                   Next
                   Call Select.Page.Six(1,True)
                   Temp1=1
                   TempA=1
                   TempB=23
                Endif
             Endif
          End Select
       Case 1
          Temp2=Asc(Right$(Strng3,1))
          If Temp2<>Temp1 Then
             Call Select.Page.Six(Temp1,False)
             Temp1=Temp2
             Call Select.Page.Six(Temp1,True)
          Endif
       End Select
    End Select
 Loop
 Exit Sub
KeyPress:
 Call ANSI(4,33,44)
 Call ANSI(2,23,2)
 Strng2="Enter modem model number:"
 Call Scrn(Strng2)
 Xcoor=23
 Ycoor=28
 Row=23
 Column=28
 Line.Length=2
 TempC$=Nul
 Call ScreenEdit
 Return
ErrorResume93:
 Exit Sub
ErrorExit93:
 Resume ErrorResume93
End Sub

Sub Edit.Page.Seven
 On Local Error Goto ErrorExit94
 Call Display.Page.Seven.A
 For Temp=1 To 14
    Call Select.Page.Seven(Temp,False)
 Next
 Call Select.Page.Seven(1,True)
 Temp1=1
 TempA=1
 TempB=14
 Do While Lost.Carrier=False
    Strng3=Nul
    Do While Strng3=Nul
       If Lost.Carrier Then
          Exit Do
       Endif
       Call Read.Keyboard(Strng3)
       If Strng3 = Chr$(21) Then ' ^U = pageup
          Strng3 = Chr$(0) + Chr$(73)
       Endif
       If Strng3 = Chr$(14) Then ' ^N = pagedown
          Strng3 = Chr$(0) + Chr$(81)
       Endif
       Call Mouse.Driver(3)
       If Mouse.Button2 Then
          Strng3=Chr$(27)
       Endif
       If Mouse.Button3 Then
          Call Terminate.Program(True)
          End
       Endif
       If Mouse.Button Then
          Call Mouse.Select(7,14,False)
          If Len(Strng3) Then
	     Exit Do
	  Endif
          Call Edit.Mouse.Button
          If Len(Strng3) Then
             Exit Do
          Endif
       Endif
       If Mouse.Row Or Mouse.Column Then
          Call Mouse.Select(7,14,True)
          If Len(Strng3) Then
	     Exit Do
	  Endif
       Endif
    Loop
    Select Case Len(Strng3)
    Case 1
       Select Case Strng3
       Case Chr$(27)
          Exit Sub
       Case Chr$(8)
          Call Help(14)
          Call Display.Page.Seven.A
          For Temp=1 To 14
             Call Select.Page.Seven(Temp,False)
          Next
          Call Select.Page.Seven(1,True)
          Temp1=1
          TempA=1
          TempB=14
       Case Chr$(13)
          Restore Page.Seven.Data
          For Temp2=1 To Temp1
             Read Xcoor,Ycoor,Row,Column,Line.Length
          Next
          Select Case Temp1
          Case 1
             TempC$=YN$(Config.Array2(63))
          Case 2
             TempC$=Config3$(29)
          Case 3
             TempC$=Config3$(30)
          Case 4
             TempC$=Config3$(31)
          Case 5
             TempC$=Config3$(32)
          Case 6
             TempC$=Config3$(33)
          Case 7
             TempC$=Config3$(34)
          Case 8
             TempC$=Config3$(35)
          Case 9
             TempC$=Config3$(36)
          Case 10
             TempC$=Config3$(37)
          Case 11
             TempC$=Config3$(43)
          Case 12
             TempC$=Config3$(44)
          Case 13
             TempC$=Config3$(45)
          Case 14
             For Temp=1 To 12
                Select Case Temp
                Case 1 To 9
                   Config.Array3(Temp+28)=Edit.Data(Temp)
                Case 10 To 12
                   Config.Array3(Temp+33)=Edit.Data(Temp)
                End Select
             Next
             For Temp=1 To 13
                Call Select.Page.Seven(Temp,False)
             Next
          End Select
          Select Case Temp1
          Case 1
             Call ScreenEdit
          Case 14
             Eat$=Nul
          Case Else
             Call ANSI(2,16,2)
             Strng2="Formula/Equation Entry Area:"
             Call Scrn(Strng2)
             Call ANSI(2,17,2)
             Strng2=Space$(78)
             Call Scrn(Strng2)
             Xcoor=17
             Ycoor=2
             Row=17
             Column=2
             Line.Length=78
             Call ScreenEdit
             Call ANSI(4,33,44)
             Call ANSI(2,16,2)
             Strng2=Space$(78)
             Call Scrn(Strng2)
             Call ANSI(2,17,2)
             Strng2=Space$(78)
             Call Scrn(Strng2)
          End Select
          Select Case Temp1
          Case 1
             Config.Array2(63)=(Ucase$(Left$(TempC$,1))="Y")
          Case 2
             Config.Array3(29)=Ucase$(TempC$)
          Case 3
             Config.Array3(30)=Ucase$(TempC$)
          Case 4
             Config.Array3(31)=Ucase$(TempC$)
          Case 5
             Config.Array3(32)=Ucase$(TempC$)
          Case 6
             Config.Array3(33)=Ucase$(TempC$)
          Case 7
             Config.Array3(34)=Ucase$(TempC$)
          Case 8
             Config.Array3(35)=Ucase$(TempC$)
          Case 9
             Config.Array3(36)=Ucase$(TempC$)
          Case 10
             Config.Array3(37)=Ucase$(TempC$)
          Case 11
             Config.Array3(43)=Ucase$(TempC$)
          Case 12
             Config.Array3(44)=Ucase$(TempC$)
          Case 13
             Config.Array3(45)=Ucase$(TempC$)
          End Select
          Call Select.Page.Seven(Temp1,True)
       End Select
    Case 2
       Select Case Asc(Left$(Strng3,1))
       Case 0
          Select Case Asc(Right$(Strng3,1))
          Case 0
             Exit Sub
          Case 72, 141, 152
             If Temp1>1 Then
                Call Select.Page.Seven(Temp1,False)
                Temp1=Temp1-1
                Call Select.Page.Seven(Temp1,True)
             Endif
          Case 80, 145, 160
             If Temp1<14 Then
                Call Select.Page.Seven(Temp1,False)
                Temp1=Temp1+1
                Call Select.Page.Seven(Temp1,True)
             Endif
          End Select
       Case 1
          Temp2=Asc(Right$(Strng3,1))
          If Temp2<>Temp1 Then
             Call Select.Page.Seven(Temp1,False)
             Temp1=Temp2
             Call Select.Page.Seven(Temp1,True)
          Endif
       End Select
    End Select
 Loop
ErrorResume94:
 Exit Sub
ErrorExit94:
 Resume ErrorResume94
End Sub

Sub Mouse.Select(Var1,Var2,Var3)
 On Local Error Goto ErrorExit95
 Select Case Var1
 Case 1
    Restore Page.One.Data
 Case 2
    Restore Page.Two.Data
 Case 3
    Restore Page.Three.Data
 Case 4
    Restore Page.Four.Data
 Case 5
    Restore Page.Five.Data
 Case 6
    Restore Page.Six.Data
 Case 7
    Restore Page.Seven.Data
 Case 8
    Restore Edit.Class.Data
 Case 9
    Restore Edit.Level.Data
 End Select
 For VarX=1 To Var2
    Read Xcoor,Ycoor,Row,Column,Line.Length
    If VarX>=TempA And VarX<=TempB Then
       If Mouse.Row=Xcoor Then
          If Mouse.Column>=Ycoor Then
             If Mouse.Column<=Ycoor+Line.Length-1 Then
                If Var3 Then
                   Strng3=Chr$(1)+Chr$(VarX)
                Else
                   Strng3=Chr$(13)
                Endif
                Exit For
             Endif
          Endif
       Endif
    Endif
 Next
ErrorResume95:
 Exit Sub
ErrorExit95:
 Resume ErrorResume95
End Sub

' edit field data
' Xcoor, Ycoor, Row, Column, Line.Length.

Page.One.Data:

Data 2,38,2,38,5
Data 3,44,3,44,5
Data 4,36,4,36,5
Data 5,19,5,19,5
Data 6,46,6,46,3
Data 7,47,7,47,3
Data 8,46,8,46,3
Data 9,29,9,29,10
Data 11,2,11,2,78
Data 12,24,12,24,3
Data 13,30,13,30,10
Data 14,23,14,23,3
Data 15,29,15,29,10
Data 16,50,16,50,3
Data 18,2,18,2,78
Data 19,32,19,32,3
Data 20,40,20,40,10
Data 21,40,21,40,10
Data 22,48,22,48,5
Data 23,24,23,24,10
Data 24,37,24,37,4

Data 2,44,2,44,10
Data 4,2,4,2,78
Data 5,43,5,43,3
Data 6,35,6,35,3
Data 7,55,7,55,3
Data 8,44,8,44,3
Data 9,37,9,37,3
Data 10,20,10,20,3
Data 11,29,11,29,4
Data 12,22,12,22,3
Data 13,43,13,43,3
Data 14,31,14,31,3
Data 15,29,15,29,3
Data 16,33,16,33,3
Data 17,32,17,32,3
Data 18,34,18,34,3
Data 19,32,19,32,4
Data 20,39,20,39,3
Data 21,47,21,47,3
Data 22,23,22,23,3
Data 23,26,23,26,3
Data 24,55,24,55,5

Page.Two.Data:

'Read Xcoor,Ycoor,Row,Column,Line.Length

Data 2,54,2,54,5
Data 3,54,3,54,5
Data 4,37,4,37,5
Data 5,41,5,41,7
Data 6,34,6,34,3
Data 8,2,8,2,78
Data 9,56,9,56,3
Data 11,2,11,2,78
Data 12,52,12,52,5
Data 13,50,13,50,3
Data 14,48,14,48,3
Data 15,34,15,34,3
Data 16,37,16,37,3
Data 17,49,17,49,3
Data 18,40,18,40,5
Data 19,41,19,41,5
Data 20,45,20,45,5
Data 21,47,21,47,5
Data 22,55,22,55,5
Data 23,41,23,41,5
Data 24,25,24,25,24
Data 2,23,2,23,24
Data 3,21,3,21,10
Data 4,33,4,33,10
Data 5,26,5,26,10
Data 6,27,6,27,10
Data 7,37,7,37,3
Data 8,24,8,24,3
Data 9,28,9,28,3
Data 10,43,10,43,5
Data 11,40,11,40,5
Data 12,37,12,37,5
Data 13,34,13,34,5
Data 14,28,14,28,5
Data 15,28,15,28,5
Data 16,28,16,28,5
Data 17,28,17,28,5
Data 18,29,18,29,5
Data 19,29,19,29,5
Data 20,45,20,45,5
Data 21,44,21,44,5
Data 22,32,22,32,3
Data 23,32,23,32,3
Data 24,30,24,30,3

Page.Three.Data:

Data 2,24,2,24,40
Data 3,33,3,33,40
Data 4,33,4,33,40
Data 5,27,5,27,40
Data 6,45,6,45,4
Data 7,36,7,36,4
Data 8,38,8,38,8
Data 9,39,9,39,8
Data 10,44,10,44,12
Data 11,45,11,45,12
Data 12,42,12,42,5
Data 13,44,13,44,8
Data 14,40,14,40,6
Data 15,39,15,39,8
Data 16,42,16,42,8
Data 17,34,17,34,8
Data 18,36,18,36,8
Data 19,37,19,37,8
Data 20,38,20,38,8
Data 21,35,21,35,8
Data 22,34,22,34,8
Data 23,41,23,41,12
Data 24,43,24,43,12
Data 2,43,2,43,8
Data 3,38,3,38,8
Data 4,42,4,42,8
Data 5,36,5,36,8
Data 6,37,6,37,8
Data 7,50,7,50,8
Data 8,44,8,44,8
Data 9,45,9,45,8
Data 10,47,10,47,8
Data 11,48,11,48,8
Data 12,51,12,51,8
Data 13,43,13,43,7
Data 14,53,14,53,6
Data 15,45,15,45,8
Data 16,40,16,40,8
Data 17,39,17,39,8
Data 18,44,18,44,8
Data 19,54,19,54,8
Data 20,45,20,45,8
Data 21,45,21,45,8
Data 22,48,22,48,8
Data 23,37,23,37,40
Data 24,39,24,39,40
Data 2,41,2,41,8
Data 3,33,3,33,7
Data 4,47,4,47,8
Data 5,37,5,37,8
Data 6,38,6,38,4
Data 7,44,7,44,8
Data 8,41,8,41,8

Page.Four.Data:

Data 2,23,2,23,3
Data 3,38,3,38,40
Data 4,33,4,33,40
Data 5,38,5,38,40
Data 6,38,6,38,40
Data 7,38,7,38,40
Data 8,38,8,38,40
Data 9,36,9,36,40
Data 10,35,10,35,40
Data 11,39,11,39,40
Data 12,33,12,33,40
Data 13,37,13,37,40
Data 14,20,14,20,40
Data 15,27,15,27,40
Data 16,30,16,30,40
Data 17,20,17,20,40
Data 18,29,18,29,40
Data 19,29,19,29,5
Data 20,39,20,39,5
Data 21,29,21,29,5
Data 22,39,22,39,5
Data 23,62,23,62,3
Data 24,56,24,56,3
Data 2,54,2,54,3
Data 3,54,3,54,3
Data 4,55,4,55,3
Data 5,58,5,58,3
Data 6,38,6,38,5
Data 7,44,7,44,5
Data 8,53,8,53,5
Data 9,35,9,35,5
Data 10,25,10,25,3
Data 11,54,11,54,5
Data 12,21,12,21,3
Data 13,18,13,18,3
Data 14,18,14,18,3
Data 15,55,15,55,3
Data 16,55,16,55,3
Data 17,52,17,52,3
Data 18,24,18,24,3
Data 19,32,19,32,3
Data 20,47,20,47,5
Data 21,34,21,34,5
Data 22,38,22,38,7
Data 23,52,23,52,8
Data 24,41,24,41,5

Page.Five.Data:

Data 3,2,3,2,78
Data 4,53,4,53,5
Data 5,38,5,38,5
Data 6,51,6,51,5
Data 7,48,7,48,5
Data 8,47,8,47,5
Data 9,44,9,44,5
Data 10,38,10,38,5
Data 11,40,11,40,5
Data 12,38,12,38,5
Data 13,39,13,39,5
Data 14,46,14,46,5
Data 15,45,15,45,5
Data 16,39,16,39,5
Data 17,35,17,35,5
Data 18,34,18,34,5
Data 19,38,19,38,5
Data 20,42,20,42,5
Data 21,42,21,42,5
Data 22,37,22,37,5
Data 23,48,23,48,1
Data 24,50,24,50,5
Data 2,41,2,41,5
Data 3,43,3,43,5
Data 4,45,4,45,5
Data 5,23,5,23,3
Data 6,34,6,34,5
Data 7,31,7,31,3
Data 8,55,8,55,5
Data 9,33,9,33,3
Data 10,34,10,34,3
Data 11,48,11,48,5
Data 12,54,12,54,5
Data 13,48,13,48,1
Data 14,64,14,64,5
Data 15,49,15,49,15
Data 16,70,16,70,5
Data 17,55,17,55,15
Data 18,48,18,48,1
Data 19,50,19,50,5
Data 20,47,20,47,1
Data 21,49,21,49,5
Data 22,46,22,46,1
Data 23,48,23,48,5
Data 24,30,24,30,3

Page.Six.Data:

Data 2,29,2,29,2
Data 3,43,3,43,4
Data 4,23,4,23,2
Data 5,30,5,30,50
Data 6,23,6,23,40
Data 7,27,7,27,1
Data 8,24,8,24,40
Data 9,26,9,26,40
Data 10,27,10,27,40
Data 11,29,11,29,5
Data 12,24,12,24,6
Data 13,42,13,42,5
Data 14,22,14,22,3
Data 15,32,15,32,3
Data 16,31,16,31,3
Data 17,27,17,27,3
Data 18,38,18,38,5
Data 19,30,19,30,3
Data 20,34,20,34,10
Data 21,35,21,35,3
Data 22,37,22,37,3
Data 23,47,23,47,3
Data 24,37,24,37,3
Data 3,21,3,21,20
Data 4,21,4,21,20
Data 5,21,5,21,20
Data 6,21,6,21,20
Data 7,21,7,21,20
Data 8,21,8,21,20
Data 9,21,9,21,20
Data 10,21,10,21,20
Data 11,21,11,21,20
Data 12,21,12,21,20
Data 13,21,13,21,20
Data 14,21,14,21,20
Data 15,21,15,21,20
Data 16,21,16,21,20
Data 17,21,17,21,20
Data 18,21,18,21,20
Data 19,21,19,21,20
Data 20,21,20,21,20
Data 21,21,21,21,20
Data 22,21,22,21,20
Data 23,21,23,21,20
Data 24,21,24,21,20
Data 3,21,3,21,20
Data 4,21,4,21,20
Data 5,21,5,21,20
Data 6,21,6,21,20
Data 7,21,7,21,20
Data 8,21,8,21,20
Data 9,21,9,21,20
Data 10,21,10,21,20

Page.Six.B.Data1:
Data 3,43,3,43,4

Page.Six.B.Data2:
Data 7,29,7,29,40

Page.Six.C.Data1:
Data 3,42,3,42,10
Data 4,42,4,42,10
Data 5,42,5,42,10
Data 6,42,6,42,10
Data 7,42,7,42,10
Data 8,42,8,42,10
Data 9,42,9,42,10
Data 10,42,10,42,10
Data 11,42,11,42,10
Data 12,42,12,42,10
Data 13,42,13,42,10
Data 14,42,14,42,10
Data 15,42,15,42,10
Data 16,42,16,42,10
Data 17,42,17,42,10
Data 18,42,18,42,10
Data 19,42,19,42,10
Data 20,42,20,42,10
Data 21,42,21,42,10
Data 22,42,22,42,10
Data 23,42,23,42,10
Data 24,42,24,42,10
Data 3,42,3,42,10
Data 4,42,4,42,10
Data 5,42,5,42,10
Data 6,42,6,42,10
Data 7,42,7,42,10
Data 8,42,8,42,10
Data 9,42,9,42,10
Data 10,42,10,42,10

Page.Six.D.Data1:
Data 3,66,3,66,3
Data 4,66,4,66,3
Data 5,66,5,66,3
Data 6,66,6,66,3
Data 7,66,7,66,3
Data 8,66,8,66,3
Data 9,66,9,66,3
Data 10,66,10,66,3
Data 11,66,11,66,3
Data 12,66,12,66,3
Data 13,66,13,66,3
Data 14,66,14,66,3
Data 15,66,15,66,3
Data 16,66,16,66,3
Data 17,66,17,66,3
Data 18,66,18,66,3
Data 19,66,19,66,3
Data 20,66,20,66,3
Data 21,66,21,66,3
Data 22,66,22,66,3
Data 23,66,23,66,3
Data 24,66,24,66,3
Data 3,66,3,66,3
Data 4,66,4,66,3
Data 5,66,5,66,3
Data 6,66,6,66,3
Data 7,66,7,66,3
Data 8,66,8,66,3
Data 9,66,9,66,3
Data 10,66,10,66,3

Page.Seven.Data:
Data 2,20,2,20,3
Data 3,26,3,26,53
Data 4,23,4,23,53
Data 5,32,5,32,53
Data 6,29,6,29,53
Data 7,31,7,31,53
Data 8,25,8,25,53
Data 9,26,9,26,53
Data 10,26,10,26,53
Data 11,34,11,34,53
Data 12,31,12,31,53
Data 13,34,13,34,53
Data 14,30,14,30,53
Data 15,26,15,26,4

Edit.Class.Data:

Data 3,22,3,22,20
Data 4,22,4,22,20
Data 5,22,5,22,20
Data 6,22,6,22,20
Data 7,22,7,22,20
Data 8,22,8,22,20
Data 9,22,9,22,20
Data 10,22,10,22,20
Data 11,22,11,22,20
Data 12,22,12,22,20

Edit.Level.Data:

Data 4,11,4,11,5
Data 6,11,6,11,5
Data 8,11,8,11,5
Data 10,11,10,11,5
Data 12,11,12,11,5
Data 14,11,14,11,5
Data 16,11,16,11,5
Data 18,11,18,11,5
Data 20,11,20,11,5
Data 22,11,22,11,5

Data 4,31,4,31,5
Data 6,31,6,31,5
Data 8,31,8,31,5
Data 10,31,10,31,5
Data 12,31,12,31,5
Data 14,31,14,31,5
Data 16,31,16,31,5
Data 18,31,18,31,5
Data 20,31,20,31,5
Data 22,31,22,31,5

Data 4,51,4,51,5
Data 6,51,6,51,5
Data 8,51,8,51,5
Data 10,51,10,51,5
Data 12,51,12,51,5
Data 14,51,14,51,5
Data 16,51,16,51,5
Data 18,51,18,51,5
Data 20,51,20,51,5
Data 22,51,22,51,5

Data 4,71,4,71,5
Data 6,71,6,71,5
Data 8,71,8,71,5
Data 10,71,10,71,5
Data 12,71,12,71,5
Data 14,71,14,71,5
Data 16,71,16,71,5
Data 18,71,18,71,5
Data 20,71,20,71,5
Data 22,71,22,71,5

' old room numbers for Dndoor50
OldRoomData:
' trainging areas for:
' fighter,mu,thief,cleric,paladin,ranger,druid,lady
Data "36,162","4","123","163","162","426","421","417"
' asst dm,dm
Data "1,4,36,123,162,163,184,421,426","1,4,36,123,162,163,184,421,426"
' room numbers for:
' safe room/sanctuary
Data "51"
' jail room
Data "124"
' pawn shop
Data "147"
' weapons shop
Data "145"
' bank shop
Data "117"
' wizard master shop
Data "165"
Data "0","0","0","0"
