// JavaScript Document
// File: light_bulb.js
// Purpose: Use getElementById to toggle a 'light switch' on and off

function toggle_switch(){ //If the light is on the switch is enabled to turn it off and vice versa
	if (document.getElementById("light_switch").value=="Turn the lights on")
		{
			document.getElementById("bulb").src="images/LightBulbOnV2.gif";
			//"bulb" is the ID of the image of the light bulb
			document.getElementById("body_list").style.backgroundColor = "#FFFFF0"
			//"body_list" is the ID of the <body> tag
			document.getElementById("light_switch").value="Turn the lights off";
			//"light_switch" is the ID of the <input type="button" ... />
		}
	else
		{
			document.getElementById("bulb").src="images/LightBulbOffV2.gif";
			document.getElementById("body_list").style.backgroundColor = "#666666"
			document.getElementById("light_switch").value="Turn the lights on";
		}
}
