################################################
# Create the menu for the "Lights Menu" button                 #
################################################

#--------------
# initially
#--------------
#set lm1 1
#set lm3 1

for {set i 1 } { $i <= 8 } { incr i } {
	set lm$i 0
}


proc create_lightmenu_submenu2 { } {

    global lm1 lm2 lm3 lm4 lm5 lm6 lm7 lm8

   set lightmenu2 .ventana2.bar.lightmenu.menu
   menu $lightmenu2


   $lightmenu2 add check -label "Port Lower HID Lamp" \
	-variable lm1 -command {puts "$lm1"; send_switches_down  0 49 $lm1}
   $lightmenu2 add check -label "Port Upper HID Lamp" \
	-variable lm2 -command {puts "$lm2"; send_switches_down  0 50 $lm2 }
   $lightmenu2 add check -label "Port Toolsled HID Lamp" \
	-variable lm3 -command {puts "$lm3"; send_switches_down  0 51 $lm3 }
   $lightmenu2 add check -label "Camera Incandescent Lamp" \
	-variable lm4 -command {puts "$lm4"; send_switches_down  0 52 $lm4}
   $lightmenu2 add check -label "Aft Incandescent Lamp" \
	-variable lm5 -command {puts "$lm5"; send_switches_down  0 53 $lm5}
   $lightmenu2 add check -label "Stbd Toolsled HID Lamp" \
	-variable lm6 -command {puts "$lm6"; send_switches_down  0 54 $lm6}
   $lightmenu2 add check -label "Stbd lower HID Lamp" \
	-variable lm7 -command {puts "$lm7"; send_switches_down  0 55 $lm7}
   $lightmenu2 add check -label "Stbd upper HID Lamp" \
	-variable lm8 -command {puts "$lm8"; send_switches_down  0 56 $lm8}

	
   $lightmenu2 add command -label "Turn All Light Off" \
	-command { set lm1 0 ; set lm2 0 ; set lm3 0; set lm4 0; set lm5 0; set lm6 0 ; set lm7 0 ; set lm8 0
		send_switches_down  0 49 $lm1
		send_switches_down  0 50 $lm2
		send_switches_down  0 51 $lm3
		send_switches_down  0 52 $lm4
		send_switches_down  0 53 $lm5
		send_switches_down  0 54 $lm6
		send_switches_down  0 55 $lm7
		send_switches_down  0 56 $lm8 }

}
