VERSION 5.00
Object = "{EAB22AC0-30C1-11CF-A7EB-0000C05BAE0B}#1.1#0"; "shdocvw.dll"
Object = "{248DD890-BB45-11CF-9ABC-0080C7E7B78D}#1.0#0"; "MSWINSCK.OCX"
Begin VB.Form frmMain 
   Appearance      =   0  'Flat
   BackColor       =   &H00800000&
   ClientHeight    =   8880
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   11880
   BeginProperty Font 
      Name            =   "Arial"
      Size            =   8.25
      Charset         =   0
      Weight          =   400
      Underline       =   0   'False
      Italic          =   0   'False
      Strikethrough   =   0   'False
   EndProperty
   LinkTopic       =   "Main"
   NegotiateMenus  =   0   'False
   ScaleHeight     =   592
   ScaleMode       =   3  'Pixel
   ScaleWidth      =   792
   WindowState     =   2  'Maximized
   Begin VB.Timer Timer1 
      Enabled         =   0   'False
      Interval        =   10
      Left            =   6900
      Tag             =   "0"
      Top             =   390
   End
   Begin SHDocVwCtl.WebBrowser light_icon_B1 
      Height          =   615
      Left            =   3390
      TabIndex        =   53
      TabStop         =   0   'False
      Top             =   3450
      Visible         =   0   'False
      Width           =   465
      ExtentX         =   820
      ExtentY         =   1085
      ViewMode        =   0
      Offline         =   0
      Silent          =   0
      RegisterAsBrowser=   0
      RegisterAsDropTarget=   0
      AutoArrange     =   0   'False
      NoClientEdge    =   0   'False
      AlignLeft       =   0   'False
      NoWebView       =   0   'False
      HideFileNames   =   0   'False
      SingleClick     =   0   'False
      SingleSelection =   0   'False
      NoFolders       =   0   'False
      Transparent     =   0   'False
      ViewID          =   "{0057D0E0-3573-11CF-AE69-08002B2E1262}"
      Location        =   "http:///"
   End
   Begin VB.TextBox light_status_B15 
      Height          =   315
      Left            =   8145
      TabIndex        =   52
      TabStop         =   0   'False
      Text            =   "Unknown"
      Top             =   7605
      Width           =   465
   End
   Begin VB.TextBox light_status_B5 
      Height          =   315
      Left            =   600
      TabIndex        =   51
      TabStop         =   0   'False
      Text            =   "Unknown"
      Top             =   7605
      Width           =   465
   End
   Begin VB.TextBox light_status_B4 
      Height          =   315
      Left            =   570
      TabIndex        =   50
      TabStop         =   0   'False
      Text            =   "Unknown"
      Top             =   6600
      Width           =   465
   End
   Begin VB.TextBox light_status_B3 
      Height          =   315
      Left            =   585
      TabIndex        =   49
      TabStop         =   0   'False
      Text            =   "Unknown"
      Top             =   5580
      Width           =   465
   End
   Begin VB.CommandButton light_B15a 
      Caption         =   "Rear Room Light On"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   450
      Left            =   8745
      TabIndex        =   48
      Top             =   7290
      Visible         =   0   'False
      Width           =   2100
   End
   Begin VB.CommandButton light_B15b 
      Caption         =   "Rear Room Light Off"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   450
      Left            =   8745
      TabIndex        =   47
      Top             =   7740
      Visible         =   0   'False
      Width           =   2100
   End
   Begin VB.CommandButton light_B3a 
      Caption         =   "Hall Light On"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   450
      Left            =   1185
      TabIndex        =   46
      Top             =   5280
      Visible         =   0   'False
      Width           =   2100
   End
   Begin VB.CommandButton light_B3b 
      Caption         =   "Hall Light Off"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   450
      Left            =   1185
      TabIndex        =   45
      Top             =   5730
      Visible         =   0   'False
      Width           =   2100
   End
   Begin VB.CommandButton light_B4a 
      Caption         =   "Kitchen Light On"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   450
      Left            =   1185
      TabIndex        =   44
      Top             =   6285
      Visible         =   0   'False
      Width           =   2100
   End
   Begin VB.CommandButton light_B4b 
      Caption         =   "Kitchen Light Off"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   450
      Left            =   1185
      TabIndex        =   43
      Top             =   6735
      Visible         =   0   'False
      Width           =   2100
   End
   Begin VB.CommandButton light_B5a 
      Caption         =   "Rear Light On"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   450
      Left            =   1185
      TabIndex        =   42
      Top             =   7290
      Visible         =   0   'False
      Width           =   2100
   End
   Begin VB.CommandButton light_B5b 
      Caption         =   "Rear Light Off"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   450
      Left            =   1185
      TabIndex        =   41
      Top             =   7740
      Visible         =   0   'False
      Width           =   2100
   End
   Begin MSWinsockLib.Winsock winsock1 
      Left            =   5460
      Top             =   540
      _ExtentX        =   741
      _ExtentY        =   741
      _Version        =   393216
      Protocol        =   1
   End
   Begin VB.TextBox light_status_B14 
      Height          =   315
      Left            =   8160
      TabIndex        =   40
      TabStop         =   0   'False
      Text            =   "Unknown"
      Top             =   6630
      Width           =   435
   End
   Begin VB.TextBox light_status_B13 
      Height          =   345
      Left            =   8160
      TabIndex        =   39
      TabStop         =   0   'False
      Text            =   "Unknown"
      Top             =   5550
      Width           =   435
   End
   Begin VB.TextBox light_status_B12 
      Height          =   315
      Left            =   8160
      TabIndex        =   38
      TabStop         =   0   'False
      Text            =   "Unknown"
      Top             =   4620
      Width           =   435
   End
   Begin VB.TextBox light_status_B11 
      Height          =   315
      Left            =   8160
      TabIndex        =   37
      TabStop         =   0   'False
      Text            =   "Unknown"
      Top             =   3540
      Width           =   405
   End
   Begin VB.TextBox light_status_B10 
      Height          =   315
      Left            =   4290
      TabIndex        =   36
      TabStop         =   0   'False
      Text            =   "Unknown"
      Top             =   7590
      Width           =   465
   End
   Begin VB.TextBox light_status_B9 
      Height          =   315
      Left            =   4320
      TabIndex        =   35
      TabStop         =   0   'False
      Text            =   "Unknown"
      Top             =   6540
      Width           =   465
   End
   Begin VB.TextBox light_status_B8 
      Height          =   315
      Left            =   4320
      TabIndex        =   34
      TabStop         =   0   'False
      Text            =   "Unknown"
      Top             =   5550
      Width           =   435
   End
   Begin VB.TextBox light_status_B7 
      Height          =   315
      Left            =   4350
      TabIndex        =   33
      TabStop         =   0   'False
      Text            =   "Unknown"
      Top             =   4650
      Width           =   435
   End
   Begin VB.TextBox light_status_B6 
      Height          =   315
      Left            =   4350
      TabIndex        =   32
      TabStop         =   0   'False
      Text            =   "Unknown"
      Top             =   3600
      Width           =   435
   End
   Begin VB.TextBox light_status_B2 
      Height          =   315
      Left            =   600
      TabIndex        =   31
      TabStop         =   0   'False
      Text            =   "Unknown"
      Top             =   4560
      Width           =   465
   End
   Begin VB.TextBox light_status_B1 
      Height          =   315
      Left            =   630
      TabIndex        =   30
      TabStop         =   0   'False
      Text            =   "Unknown"
      Top             =   3540
      Width           =   405
   End
   Begin VB.CommandButton light_B14b 
      Caption         =   "Rear Room Light Off"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   450
      Left            =   8745
      TabIndex        =   29
      Top             =   6735
      Visible         =   0   'False
      Width           =   2100
   End
   Begin VB.CommandButton light_B14a 
      Caption         =   "Rear Room Light On"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   450
      Left            =   8745
      TabIndex        =   28
      Top             =   6285
      Visible         =   0   'False
      Width           =   2100
   End
   Begin VB.CommandButton light_B13b 
      Caption         =   "Bedroom Fan Off"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   450
      Left            =   8745
      TabIndex        =   27
      Top             =   5730
      Visible         =   0   'False
      Width           =   2100
   End
   Begin VB.CommandButton light_B13a 
      Caption         =   "Bedroom Fan On"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   450
      Left            =   8745
      TabIndex        =   26
      Top             =   5280
      Visible         =   0   'False
      Width           =   2100
   End
   Begin VB.CommandButton light_B11a 
      Caption         =   "Hall Light On"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   450
      Left            =   8745
      TabIndex        =   25
      Top             =   3270
      Visible         =   0   'False
      Width           =   2100
   End
   Begin VB.CommandButton light_B11b 
      Caption         =   "Hall Light Off"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   450
      Left            =   8745
      TabIndex        =   24
      Top             =   3720
      Visible         =   0   'False
      Width           =   2100
   End
   Begin VB.CommandButton light_B12b 
      Caption         =   "Bedroom Lights Off"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   450
      Left            =   8745
      TabIndex        =   23
      Top             =   4725
      Visible         =   0   'False
      Width           =   2100
   End
   Begin VB.CommandButton light_B12a 
      Caption         =   "Bedroom Lights On"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   450
      Left            =   8745
      TabIndex        =   22
      Top             =   4275
      Visible         =   0   'False
      Width           =   2100
   End
   Begin VB.CommandButton light_B10b 
      Caption         =   "Rear Light Off"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   450
      Left            =   4890
      TabIndex        =   21
      Top             =   7740
      Visible         =   0   'False
      Width           =   2100
   End
   Begin VB.CommandButton light_B10a 
      Caption         =   "Rear Light On"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   450
      Left            =   4890
      TabIndex        =   20
      Top             =   7290
      Visible         =   0   'False
      Width           =   2100
   End
   Begin VB.CommandButton light_B9b 
      Caption         =   "Kitchen Light Off"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   450
      Left            =   4890
      TabIndex        =   19
      Top             =   6735
      Visible         =   0   'False
      Width           =   2100
   End
   Begin VB.CommandButton light_B9a 
      Caption         =   "Kitchen Light On"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   450
      Left            =   4890
      TabIndex        =   18
      Top             =   6285
      Visible         =   0   'False
      Width           =   2100
   End
   Begin VB.CommandButton light_B8b 
      Caption         =   "Hall Light Off"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   450
      Left            =   4890
      TabIndex        =   17
      Top             =   5730
      Visible         =   0   'False
      Width           =   2100
   End
   Begin VB.CommandButton light_B8a 
      Caption         =   "Hall Light On"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   450
      Left            =   4890
      TabIndex        =   16
      Top             =   5280
      Visible         =   0   'False
      Width           =   2100
   End
   Begin VB.CommandButton light_B1a 
      Caption         =   "Front Room Light On"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   450
      Left            =   1185
      TabIndex        =   12
      Top             =   3270
      Visible         =   0   'False
      Width           =   2100
   End
   Begin VB.CommandButton light_B1b 
      Caption         =   "Front Room Light Off"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   450
      Left            =   1185
      TabIndex        =   11
      Top             =   3720
      Visible         =   0   'False
      Width           =   2100
   End
   Begin VB.CommandButton light_B2b 
      Caption         =   "Rear Light Off"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   450
      Left            =   1185
      TabIndex        =   10
      Top             =   4725
      Visible         =   0   'False
      Width           =   2100
   End
   Begin VB.CommandButton light_B2a 
      Caption         =   "Rear Light On"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   450
      Left            =   1185
      TabIndex        =   9
      Top             =   4275
      Visible         =   0   'False
      Width           =   2100
   End
   Begin VB.CommandButton light_B7a 
      Caption         =   "Open Theater Drapes"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   450
      Left            =   4890
      TabIndex        =   8
      Top             =   4275
      Visible         =   0   'False
      Width           =   2100
   End
   Begin VB.CommandButton light_B7b 
      Caption         =   "Close Theater Drapes"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   450
      Left            =   4890
      TabIndex        =   7
      Top             =   4725
      Visible         =   0   'False
      Width           =   2100
   End
   Begin VB.OptionButton optWebControl 
      Height          =   1455
      Left            =   3210
      MaskColor       =   &H00400000&
      Style           =   1  'Graphical
      TabIndex        =   5
      Tag             =   "web"
      Top             =   255
      UseMaskColor    =   -1  'True
      Width           =   1455
   End
   Begin VB.OptionButton optMP3Control 
      Height          =   1455
      Left            =   1695
      MaskColor       =   &H00400000&
      Style           =   1  'Graphical
      TabIndex        =   4
      Tag             =   "mp3"
      Top             =   255
      UseMaskColor    =   -1  'True
      Width           =   1455
   End
   Begin VB.OptionButton optLightControl 
      Height          =   1455
      Left            =   165
      MaskColor       =   &H00400000&
      Style           =   1  'Graphical
      TabIndex        =   3
      Tag             =   "light"
      Top             =   255
      UseMaskColor    =   -1  'True
      Width           =   1455
   End
   Begin VB.CommandButton cmdExit 
      Appearance      =   0  'Flat
      BackColor       =   &H00800000&
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Left            =   11655
      MaskColor       =   &H00800000&
      Style           =   1  'Graphical
      TabIndex        =   2
      Top             =   60
      UseMaskColor    =   -1  'True
      Width           =   300
   End
   Begin VB.CommandButton light_B6b 
      Caption         =   "Theater Lights Off"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   450
      Left            =   4890
      TabIndex        =   1
      Top             =   3720
      Visible         =   0   'False
      Width           =   2100
   End
   Begin VB.CommandButton light_B6a 
      Caption         =   "Theater Lights On"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   450
      Left            =   4890
      TabIndex        =   0
      Top             =   3270
      Visible         =   0   'False
      Width           =   2100
   End
   Begin SHDocVwCtl.WebBrowser light_icon_B2 
      Height          =   615
      Left            =   3390
      TabIndex        =   54
      TabStop         =   0   'False
      Top             =   4470
      Visible         =   0   'False
      Width           =   465
      ExtentX         =   820
      ExtentY         =   1085
      ViewMode        =   0
      Offline         =   0
      Silent          =   0
      RegisterAsBrowser=   0
      RegisterAsDropTarget=   0
      AutoArrange     =   0   'False
      NoClientEdge    =   0   'False
      AlignLeft       =   0   'False
      NoWebView       =   0   'False
      HideFileNames   =   0   'False
      SingleClick     =   0   'False
      SingleSelection =   0   'False
      NoFolders       =   0   'False
      Transparent     =   0   'False
      ViewID          =   "{0057D0E0-3573-11CF-AE69-08002B2E1262}"
      Location        =   "http:///"
   End
   Begin SHDocVwCtl.WebBrowser light_icon_B3 
      Height          =   615
      Left            =   3390
      TabIndex        =   55
      TabStop         =   0   'False
      Top             =   5460
      Visible         =   0   'False
      Width           =   465
      ExtentX         =   820
      ExtentY         =   1085
      ViewMode        =   0
      Offline         =   0
      Silent          =   0
      RegisterAsBrowser=   0
      RegisterAsDropTarget=   0
      AutoArrange     =   0   'False
      NoClientEdge    =   0   'False
      AlignLeft       =   0   'False
      NoWebView       =   0   'False
      HideFileNames   =   0   'False
      SingleClick     =   0   'False
      SingleSelection =   0   'False
      NoFolders       =   0   'False
      Transparent     =   0   'False
      ViewID          =   "{0057D0E0-3573-11CF-AE69-08002B2E1262}"
      Location        =   "http:///"
   End
   Begin SHDocVwCtl.WebBrowser light_icon_B4 
      Height          =   615
      Left            =   3390
      TabIndex        =   56
      TabStop         =   0   'False
      Top             =   6450
      Visible         =   0   'False
      Width           =   465
      ExtentX         =   820
      ExtentY         =   1085
      ViewMode        =   0
      Offline         =   0
      Silent          =   0
      RegisterAsBrowser=   0
      RegisterAsDropTarget=   0
      AutoArrange     =   0   'False
      NoClientEdge    =   0   'False
      AlignLeft       =   0   'False
      NoWebView       =   0   'False
      HideFileNames   =   0   'False
      SingleClick     =   0   'False
      SingleSelection =   0   'False
      NoFolders       =   0   'False
      Transparent     =   0   'False
      ViewID          =   "{0057D0E0-3573-11CF-AE69-08002B2E1262}"
      Location        =   "http:///"
   End
   Begin SHDocVwCtl.WebBrowser light_icon_B5 
      Height          =   615
      Left            =   3390
      TabIndex        =   57
      TabStop         =   0   'False
      Top             =   7440
      Visible         =   0   'False
      Width           =   465
      ExtentX         =   820
      ExtentY         =   1085
      ViewMode        =   0
      Offline         =   0
      Silent          =   0
      RegisterAsBrowser=   0
      RegisterAsDropTarget=   0
      AutoArrange     =   0   'False
      NoClientEdge    =   0   'False
      AlignLeft       =   0   'False
      NoWebView       =   0   'False
      HideFileNames   =   0   'False
      SingleClick     =   0   'False
      SingleSelection =   0   'False
      NoFolders       =   0   'False
      Transparent     =   0   'False
      ViewID          =   "{0057D0E0-3573-11CF-AE69-08002B2E1262}"
      Location        =   "http:///"
   End
   Begin SHDocVwCtl.WebBrowser light_icon_B6 
      Height          =   615
      Left            =   7110
      TabIndex        =   58
      TabStop         =   0   'False
      Top             =   3450
      Visible         =   0   'False
      Width           =   465
      ExtentX         =   820
      ExtentY         =   1085
      ViewMode        =   0
      Offline         =   0
      Silent          =   0
      RegisterAsBrowser=   0
      RegisterAsDropTarget=   0
      AutoArrange     =   0   'False
      NoClientEdge    =   0   'False
      AlignLeft       =   0   'False
      NoWebView       =   0   'False
      HideFileNames   =   0   'False
      SingleClick     =   0   'False
      SingleSelection =   0   'False
      NoFolders       =   0   'False
      Transparent     =   0   'False
      ViewID          =   "{0057D0E0-3573-11CF-AE69-08002B2E1262}"
      Location        =   "http:///"
   End
   Begin SHDocVwCtl.WebBrowser light_icon_B7 
      Height          =   615
      Left            =   7110
      TabIndex        =   59
      TabStop         =   0   'False
      Top             =   4470
      Visible         =   0   'False
      Width           =   465
      ExtentX         =   820
      ExtentY         =   1085
      ViewMode        =   0
      Offline         =   0
      Silent          =   0
      RegisterAsBrowser=   0
      RegisterAsDropTarget=   0
      AutoArrange     =   0   'False
      NoClientEdge    =   0   'False
      AlignLeft       =   0   'False
      NoWebView       =   0   'False
      HideFileNames   =   0   'False
      SingleClick     =   0   'False
      SingleSelection =   0   'False
      NoFolders       =   0   'False
      Transparent     =   0   'False
      ViewID          =   "{0057D0E0-3573-11CF-AE69-08002B2E1262}"
      Location        =   "http:///"
   End
   Begin SHDocVwCtl.WebBrowser light_icon_B8 
      Height          =   615
      Left            =   7110
      TabIndex        =   60
      TabStop         =   0   'False
      Top             =   5460
      Visible         =   0   'False
      Width           =   465
      ExtentX         =   820
      ExtentY         =   1085
      ViewMode        =   0
      Offline         =   0
      Silent          =   0
      RegisterAsBrowser=   0
      RegisterAsDropTarget=   0
      AutoArrange     =   0   'False
      NoClientEdge    =   0   'False
      AlignLeft       =   0   'False
      NoWebView       =   0   'False
      HideFileNames   =   0   'False
      SingleClick     =   0   'False
      SingleSelection =   0   'False
      NoFolders       =   0   'False
      Transparent     =   0   'False
      ViewID          =   "{0057D0E0-3573-11CF-AE69-08002B2E1262}"
      Location        =   "http:///"
   End
   Begin SHDocVwCtl.WebBrowser light_icon_B9 
      Height          =   615
      Left            =   7110
      TabIndex        =   61
      TabStop         =   0   'False
      Top             =   6450
      Visible         =   0   'False
      Width           =   465
      ExtentX         =   820
      ExtentY         =   1085
      ViewMode        =   0
      Offline         =   0
      Silent          =   0
      RegisterAsBrowser=   0
      RegisterAsDropTarget=   0
      AutoArrange     =   0   'False
      NoClientEdge    =   0   'False
      AlignLeft       =   0   'False
      NoWebView       =   0   'False
      HideFileNames   =   0   'False
      SingleClick     =   0   'False
      SingleSelection =   0   'False
      NoFolders       =   0   'False
      Transparent     =   0   'False
      ViewID          =   "{0057D0E0-3573-11CF-AE69-08002B2E1262}"
      Location        =   "http:///"
   End
   Begin SHDocVwCtl.WebBrowser light_icon_B10 
      Height          =   615
      Left            =   7110
      TabIndex        =   62
      TabStop         =   0   'False
      Top             =   7440
      Visible         =   0   'False
      Width           =   465
      ExtentX         =   820
      ExtentY         =   1085
      ViewMode        =   0
      Offline         =   0
      Silent          =   0
      RegisterAsBrowser=   0
      RegisterAsDropTarget=   0
      AutoArrange     =   0   'False
      NoClientEdge    =   0   'False
      AlignLeft       =   0   'False
      NoWebView       =   0   'False
      HideFileNames   =   0   'False
      SingleClick     =   0   'False
      SingleSelection =   0   'False
      NoFolders       =   0   'False
      Transparent     =   0   'False
      ViewID          =   "{0057D0E0-3573-11CF-AE69-08002B2E1262}"
      Location        =   "http:///"
   End
   Begin SHDocVwCtl.WebBrowser light_icon_B11 
      Height          =   615
      Left            =   10950
      TabIndex        =   63
      TabStop         =   0   'False
      Top             =   3450
      Visible         =   0   'False
      Width           =   465
      ExtentX         =   820
      ExtentY         =   1085
      ViewMode        =   0
      Offline         =   0
      Silent          =   0
      RegisterAsBrowser=   0
      RegisterAsDropTarget=   0
      AutoArrange     =   0   'False
      NoClientEdge    =   0   'False
      AlignLeft       =   0   'False
      NoWebView       =   0   'False
      HideFileNames   =   0   'False
      SingleClick     =   0   'False
      SingleSelection =   0   'False
      NoFolders       =   0   'False
      Transparent     =   0   'False
      ViewID          =   "{0057D0E0-3573-11CF-AE69-08002B2E1262}"
      Location        =   "http:///"
   End
   Begin SHDocVwCtl.WebBrowser light_icon_B12 
      Height          =   615
      Left            =   10950
      TabIndex        =   64
      TabStop         =   0   'False
      Top             =   4470
      Visible         =   0   'False
      Width           =   465
      ExtentX         =   820
      ExtentY         =   1085
      ViewMode        =   0
      Offline         =   0
      Silent          =   0
      RegisterAsBrowser=   0
      RegisterAsDropTarget=   0
      AutoArrange     =   0   'False
      NoClientEdge    =   0   'False
      AlignLeft       =   0   'False
      NoWebView       =   0   'False
      HideFileNames   =   0   'False
      SingleClick     =   0   'False
      SingleSelection =   0   'False
      NoFolders       =   0   'False
      Transparent     =   0   'False
      ViewID          =   "{0057D0E0-3573-11CF-AE69-08002B2E1262}"
      Location        =   "http:///"
   End
   Begin SHDocVwCtl.WebBrowser light_icon_B13 
      Height          =   615
      Left            =   10950
      TabIndex        =   65
      TabStop         =   0   'False
      Top             =   5460
      Visible         =   0   'False
      Width           =   465
      ExtentX         =   820
      ExtentY         =   1085
      ViewMode        =   0
      Offline         =   0
      Silent          =   0
      RegisterAsBrowser=   0
      RegisterAsDropTarget=   0
      AutoArrange     =   0   'False
      NoClientEdge    =   0   'False
      AlignLeft       =   0   'False
      NoWebView       =   0   'False
      HideFileNames   =   0   'False
      SingleClick     =   0   'False
      SingleSelection =   0   'False
      NoFolders       =   0   'False
      Transparent     =   0   'False
      ViewID          =   "{0057D0E0-3573-11CF-AE69-08002B2E1262}"
      Location        =   "http:///"
   End
   Begin SHDocVwCtl.WebBrowser light_icon_B14 
      Height          =   615
      Left            =   10950
      TabIndex        =   66
      TabStop         =   0   'False
      Top             =   6450
      Visible         =   0   'False
      Width           =   465
      ExtentX         =   820
      ExtentY         =   1085
      ViewMode        =   0
      Offline         =   0
      Silent          =   0
      RegisterAsBrowser=   0
      RegisterAsDropTarget=   0
      AutoArrange     =   0   'False
      NoClientEdge    =   0   'False
      AlignLeft       =   0   'False
      NoWebView       =   0   'False
      HideFileNames   =   0   'False
      SingleClick     =   0   'False
      SingleSelection =   0   'False
      NoFolders       =   0   'False
      Transparent     =   0   'False
      ViewID          =   "{0057D0E0-3573-11CF-AE69-08002B2E1262}"
      Location        =   "http:///"
   End
   Begin SHDocVwCtl.WebBrowser light_icon_B15 
      Height          =   615
      Left            =   10950
      TabIndex        =   67
      TabStop         =   0   'False
      Top             =   7440
      Visible         =   0   'False
      Width           =   465
      ExtentX         =   820
      ExtentY         =   1085
      ViewMode        =   0
      Offline         =   0
      Silent          =   0
      RegisterAsBrowser=   0
      RegisterAsDropTarget=   0
      AutoArrange     =   0   'False
      NoClientEdge    =   0   'False
      AlignLeft       =   0   'False
      NoWebView       =   0   'False
      HideFileNames   =   0   'False
      SingleClick     =   0   'False
      SingleSelection =   0   'False
      NoFolders       =   0   'False
      Transparent     =   0   'False
      ViewID          =   "{0057D0E0-3573-11CF-AE69-08002B2E1262}"
      Location        =   "http:///"
   End
   Begin VB.Label light_column3_label 
      Alignment       =   2  'Center
      BackColor       =   &H00FFC0C0&
      BorderStyle     =   1  'Fixed Single
      Caption         =   "Third Floor"
      BeginProperty Font 
         Name            =   "Century Gothic"
         Size            =   15.75
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00800000&
      Height          =   435
      Left            =   8640
      TabIndex        =   15
      Top             =   2625
      Visible         =   0   'False
      Width           =   2250
   End
   Begin VB.Label light_column2_label 
      Alignment       =   2  'Center
      BackColor       =   &H00FFC0C0&
      BorderStyle     =   1  'Fixed Single
      Caption         =   "Second Floor"
      BeginProperty Font 
         Name            =   "Century Gothic"
         Size            =   15.75
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00800000&
      Height          =   435
      Left            =   4815
      TabIndex        =   14
      Top             =   2625
      Visible         =   0   'False
      Width           =   2250
   End
   Begin VB.Label light_column1_label 
      Alignment       =   2  'Center
      BackColor       =   &H00FFC0C0&
      BorderStyle     =   1  'Fixed Single
      Caption         =   "First Floor"
      BeginProperty Font 
         Name            =   "Century Gothic"
         Size            =   15.75
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00800000&
      Height          =   435
      Left            =   1095
      TabIndex        =   13
      Top             =   2625
      Visible         =   0   'False
      Width           =   2250
   End
   Begin VB.Shape light_border3 
      BorderColor     =   &H00FFC0C0&
      BorderWidth     =   2
      Height          =   5700
      Left            =   7950
      Shape           =   4  'Rounded Rectangle
      Top             =   2880
      Visible         =   0   'False
      Width           =   3600
   End
   Begin VB.Shape light_border2 
      BorderColor     =   &H00FFC0C0&
      BorderWidth     =   2
      Height          =   5700
      Left            =   4170
      Shape           =   4  'Rounded Rectangle
      Top             =   2880
      Visible         =   0   'False
      Width           =   3600
   End
   Begin VB.Shape light_border1 
      BorderColor     =   &H00FFC0C0&
      BorderWidth     =   2
      Height          =   5700
      Left            =   435
      Shape           =   4  'Rounded Rectangle
      Top             =   2880
      Visible         =   0   'False
      Width           =   3600
   End
   Begin VB.Label always_lblControl 
      Alignment       =   2  'Center
      BackColor       =   &H00FFFFFF&
      BackStyle       =   0  'Transparent
      Caption         =   "       "
      BeginProperty Font 
         Name            =   "Century Gothic"
         Size            =   20.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   -1  'True
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00800000&
      Height          =   495
      Left            =   1050
      TabIndex        =   6
      Top             =   1890
      Width           =   3225
   End
   Begin VB.Shape alway_lblBorder 
      BorderColor     =   &H00FFC0C0&
      FillColor       =   &H00FFC0C0&
      FillStyle       =   0  'Solid
      Height          =   555
      Left            =   1050
      Shape           =   4  'Rounded Rectangle
      Top             =   1890
      Visible         =   0   'False
      Width           =   3225
   End
   Begin VB.Shape always_Border 
      BorderColor     =   &H00FFC0C0&
      BorderStyle     =   6  'Inside Solid
      BorderWidth     =   3
      Height          =   6720
      Left            =   225
      Shape           =   4  'Rounded Rectangle
      Top             =   2100
      Visible         =   0   'False
      Width           =   11520
   End
End
Attribute VB_Name = "frmMain"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim response As String, HostName As String
Dim OnStr As String, OffStr As String, UnknownStr As String
Dim DefWidth As String, DefHeight As String, DefBackground As String
Dim RemotePort As Integer, BindPort As Integer
Dim inifile As String, imgpath As String

Private Sub cmdExit_Click()
    winsock1.Close
    Unload Me
    End
End Sub

Private Sub Form_Load()
    inifile = App.Path & "\HomePanel.ini"
    imgpath = App.Path & "\images\"
    ControlOff ("all")
    LoadTags
    If DefBackground <> "" Then frmMain.Picture = LoadPicture(imgpath & DefBackground)
    winsock1.RemoteHost = HostName
    winsock1.RemotePort = RemotePort
    winsock1.Bind BindPort
End Sub

Private Sub btnrun(MeTag As String, bnum As Integer, MeStat As String)
    winsock1.SendData MeTag
    OneDeviceSet Format(bnum, "00"), MeStat
End Sub

Private Sub optLightControl_Click()
    Dim temptag As String
    fReadValue inifile, "Section1", "MainLabel", "S", "Section 1", temptag
    Me.always_lblControl.Caption = temptag
    fReadValue inifile, "Section1", "Column1", "S", "Column 1", temptag
    Me.light_column1_label.Caption = temptag
    fReadValue inifile, "Section1", "Column2", "S", "Column 2", temptag
    Me.light_column2_label.Caption = temptag
    fReadValue inifile, "Section1", "Column3", "S", "Column 3", temptag
    Me.light_column3_label.Caption = temptag
    fReadValue inifile, "Section1", "Background", "S", DefBackground, temptag
    If temptag <> DefBackground And temptag <> "" Then Main.Picture = LoadPicture(imgpath & temptag)
    ControlOff ("light")
    UpdateHSStatus
End Sub

Private Sub optMP3Control_Click()
    'fReadValue inifile, "Section2", "MainLabel", "S", "Section 2", temptag
    'Me.always_lblControl.Caption = temptag
    'fReadValue inifile, "Section2", "Background", "S", DefBackground, temptag
    'If temptag <> DefBackground And temptag <> "" Then Main.Picture = LoadPicture(imgpath & temptag)
    'ControlOff ("mp3")
    frmMusic.Show
    frmMain.Hide

End Sub

Private Sub optWebControl_Click()
    fReadValue inifile, "Section3", "MainLabel", "S", "Section 2", temptag
    Me.always_lblControl.Caption = temptag
    fReadValue inifile, "Section3", "Background", "S", DefBackground, temptag
    If temptag <> DefBackground And temptag <> "" Then Main.Picture = LoadPicture(imgpath & temptag)
    ControlOff ("web")
End Sub

Public Sub ControlOff(t As String)
    Dim tempctl As Control, x As String
    For Each tempctl In frmMain
        x = tempctl.Name
        If LCase(Left(x, 3)) = "mp3" Or LCase(Left(x, 5)) = "light" _
           Or LCase(Left(x, 3)) = "web" Or LCase(Left(x, 3)) = "dvd" _
           Or LCase(Left(x, 2)) = "tv" Then
           tempctl.Visible = False
        Else
            If t <> "all" And x <> "winsock1" And x <> "Timer1" Then tempctl.Visible = True
        End If
        If t = Left(x, Len(t)) And tempctl.Tag <> "err" Then tempctl.Visible = True
        If Left(x, 13) = "light_status_" Then tempctl.Visible = False
        If Left(x, 10) = "light_icon" Then tempctl.Navigate "about:<html><body leftmargin='0' topmargin='0' scroll='no' bgcolor=#DADADA></body></html>"
    Next tempctl
End Sub

Public Sub UpdateHSStatus()
    Dim t1 As Control, x As String, d As String, s As String, i As Integer
    Dim t2 As Control
    For i = 1 To 15
        Set t1 = gc("light_icon_B" & i)
        Set t2 = gc("light_status_B" & i)
        d = t1.Tag
        If Left(d, 2) = "ex" Or Left(d, 2) = "ev" Then
            t1.Visible = True
            OneDeviceSet Format(i, "00")
        Else
            t2 = "err"
            t1.Visible = False
        End If
    Next i
End Sub

Public Sub OneDeviceSet(i As String, Optional s As String)
    Dim t1 As Control, t2 As Control, inifile As String
    inifile = App.Path & "\HomePanel.ini"
    Set t1 = gc("light_icon_B" & CInt(i))
    Set t2 = gc("light_status_B" & CInt(i))
    d = t1.Tag
    If IsMissing(s) Or s = "" Then s = StatusCode(Mid(d, 3, 3))
    t2 = s
    Select Case s
    Case "on"
        fReadValue inifile, "HomeSeerButtons", "Button" & CInt(i) & "Image_Width", "S", DefWidth, x
        t1.Width = CInt(x) + 4
        fReadValue inifile, "HomeSeerButtons", "Button" & CInt(i) & "Image_Height", "S", DefHeight, x
        t1.Height = CInt(x) + 4
        fReadValue inifile, "HomeSeerButtons", "Button" & CInt(i) & "Image_On", "S", OnStr, x
        t1.Navigate "about:<html><body leftmargin='0' topmargin='0' scroll='no' bgcolor=#DADADA><img src='" & imgpath & x & "'></img></body></html>"

    Case "off"
        fReadValue inifile, "HomeSeerButtons", "Button" & CInt(i) & "Image_Width", "S", DefWidth, x
        t1.Width = CInt(x) + 4
        fReadValue inifile, "HomeSeerButtons", "Button" & CInt(i) & "Image_Height", "S", DefHeight, x
        t1.Height = CInt(x) + 4
        fReadValue inifile, "HomeSeerButtons", "Button" & CInt(i) & "Image_Off", "S", OffStr, x
        t1.Navigate "about:<html><body leftmargin='0' topmargin='0' scroll='no' bgcolor=#DADADA><img src='" & imgpath & x & "'></img></body></html>"
        
    Case "unknown"
        fReadValue inifile, "HomeSeerButtons", "Button" & CInt(i) & "Image_Width", "S", DefWidth, x
        t1.Width = CInt(x) + 4
        fReadValue inifile, "HomeSeerButtons", "Button" & CInt(i) & "Image_Height", "S", DefHeight, x
        t1.Height = CInt(x) + 4
        fReadValue inifile, "HomeSeerButtons", "Button" & CInt(i) & "Image_Unknown", "S", UnknownStr, x
        t1.Navigate "about:<html><body leftmargin='0' topmargin='0' scroll='no' bgcolor=#DADADA><img src='" & imgpath & x & "'></img></body></html>"
        
    Case Else
        t1.Visible = False
    End Select
    
End Sub

Public Function gc(n As String) As Control
    Dim tempctl As Control
    For Each tempctl In frmMain
        If tempctl.Name = n Then Set gc = tempctl: Exit For
    Next tempctl
End Function

Public Function StatusCode(s As String) As String
    response = "none"
    Timer1.Tag = 0
    winsock1.SendData "st" & s
    Timer1.Enabled = True
    Do Until response <> "none" Or Timer1.Tag > 20
        DoEvents: DoEvents: DoEvents
    Loop
    Timer1.Enabled = False
    If response = "on" Or response = "off" Then
        StatusCode = response
    Else
        StatusCode = "unknown"
    End If
End Function

Private Sub Timer1_Timer()
    Timer1.Tag = Timer1.Tag + 1
End Sub

Private Sub winsock1_DataArrival(ByVal bytesTotal As Long)
    Dim s As String
    winsock1.GetData s
    response = s
End Sub

Public Sub LoadTags()
    Dim temptag As String, s As String, i As Integer
    Dim btn As Control
    fReadValue inifile, "Options", "HostName", "S", "err", HostName
    fReadValue inifile, "Options", "RemotePort", "S", 0, RemotePort
    fReadValue inifile, "Options", "BindPort", "S", 0, BindPort
    fReadValue inifile, "Options", "DefaultOn", "S", 0, OnStr
    fReadValue inifile, "Options", "DefaultOff", "S", 0, OffStr
    fReadValue inifile, "Options", "DefaultUnknown", "S", 0, UnknownStr
    fReadValue inifile, "Options", "DefaultWidth", "S", 25, DefWidth
    fReadValue inifile, "Options", "DefaultHeight", "S", 25, DefHeight
    fReadValue inifile, "Options", "DefaultBackground", "S", "", DefBackground
    
    For i = 1 To 15
        Set btn = gc("light_B" & i & "a")
        fReadValue inifile, "HomeSeerButtons", "Button" & i & "aName", "S", i, temptag
        btn.Caption = temptag
        fReadValue inifile, "HomeSeerButtons", "Button" & i & "aCode", "S", "err", temptag
        btn.Tag = temptag
        
        Set btn = gc("light_B" & i & "b")
        fReadValue inifile, "HomeSeerButtons", "Button" & i & "bName", "S", i, temptag
        btn.Caption = temptag
        fReadValue inifile, "HomeSeerButtons", "Button" & i & "bCode", "S", "err", temptag
        btn.Tag = temptag
        
        Set btn = gc("light_icon_B" & i)
        If Left(temptag, 2) = "ex" Or Left(temptag, 2) = "ev" Then
            btn.Tag = Mid(temptag, 1, 5)
        Else
            btn.Tag = "err"
        End If
    Next i
    
    fReadValue inifile, "Section1", "ButtonGraphicUp", "S", "", temptag
    If temptag <> "" Then Me.optLightControl.Picture = LoadPicture(imgpath & temptag)
    fReadValue inifile, "Section1", "ButtonGraphicDown", "S", "", temptag
    If temptag <> "" Then Me.optLightControl.DownPicture = LoadPicture(imgpath & temptag)
    fReadValue inifile, "Section2", "ButtonGraphicUp", "S", "", temptag
    If temptag <> "" Then Me.optMP3Control.Picture = LoadPicture(imgpath & temptag)
    fReadValue inifile, "Section2", "ButtonGraphicDown", "S", "", temptag
    If temptag <> "" Then Me.optMP3Control.DownPicture = LoadPicture(imgpath & temptag)
    fReadValue inifile, "Section3", "ButtonGraphicUp", "S", "", temptag
    If temptag <> "" Then Me.optWebControl.Picture = LoadPicture(imgpath & temptag)
    fReadValue inifile, "Section3", "ButtonGraphicDown", "S", "", temptag
    If temptag <> "" Then Me.optWebControl.DownPicture = LoadPicture(imgpath & temptag)
End Sub

Private Sub light_B1a_Click()
    btnrun light_B1a.Tag, 1, "on"
End Sub
Private Sub light_B1b_Click()
    btnrun light_B1b.Tag, 1, "off"
End Sub
Private Sub light_B2a_Click()
    btnrun light_B2a.Tag, 2, "on"
End Sub
Private Sub light_B2b_Click()
    btnrun light_B2b.Tag, 2, "off"
End Sub
Private Sub light_B3a_Click()
    btnrun light_B3a.Tag, 3, "on"
End Sub
Private Sub light_B3b_Click()
    btnrun light_B3b.Tag, 3, "off"
End Sub
Private Sub light_B4a_Click()
    btnrun light_B4a.Tag, 4, "on"
End Sub
Private Sub light_B4b_Click()
    btnrun light_B4b.Tag, 4, "off"
End Sub
Private Sub light_B5a_Click()
    btnrun light_B5a.Tag, 5, "on"
End Sub
Private Sub light_B5b_Click()
    btnrun light_B5b.Tag, 5, "off"
End Sub
Private Sub light_B6a_Click()
    btnrun light_B6a.Tag, 6, "on"
End Sub
Private Sub light_B6b_Click()
    btnrun light_B6b.Tag, 6, "off"
End Sub
Private Sub light_B7a_Click()
    btnrun light_B7a.Tag, 7, "on"
End Sub
Private Sub light_B7b_Click()
    btnrun light_B7b.Tag, 7, "off"
End Sub
Private Sub light_B8a_Click()
    btnrun light_B8a.Tag, 8, "on"
End Sub
Private Sub light_B8b_Click()
    btnrun light_B8b.Tag, 8, "off"
End Sub
Private Sub light_B9a_Click()
    btnrun light_B9a.Tag, 9, "on"
End Sub
Private Sub light_B9b_Click()
    btnrun light_B9b.Tag, 9, "off"
End Sub
Private Sub light_B10a_Click()
    btnrun light_B10a.Tag, 10, "on"
End Sub
Private Sub light_B10b_Click()
    btnrun light_B10b.Tag, 10, "off"
End Sub
Private Sub light_B11a_Click()
    btnrun light_B11a.Tag, 11, "on"
End Sub
Private Sub light_B11b_Click()
    btnrun light_B11b.Tag, 11, "off"
End Sub
Private Sub light_B12a_Click()
    btnrun light_B12a.Tag, 12, "on"
End Sub
Private Sub light_B12b_Click()
    btnrun light_B12b.Tag, 12, "off"
End Sub
Private Sub light_B13a_Click()
    btnrun light_B13a.Tag, 13, "on"
End Sub
Private Sub light_B13b_Click()
    btnrun light_B13b.Tag, 13, "off"
End Sub
Private Sub light_B14a_Click()
    btnrun light_B14a.Tag, 14, "on"
End Sub
Private Sub light_B14b_Click()
    btnrun light_B14b.Tag, 14, "off"
End Sub
Private Sub light_B15a_Click()
    btnrun light_B15a.Tag, 15, "on"
End Sub
Private Sub light_B15b_Click()
    btnrun light_B15b.Tag, 15, "off"
End Sub


