// functions in an included js file function toggle(elmnt) { elmnt.style.background="#eee"; } function detoggle(elmnt) { elmnt.style.background="none"; } // I then call this in the HTML document