I am nearly there, just a little unsure as to my code setup, I basically want to remove a class on click, and add it back again onclick, then remove onclick, then add onclic
If JQuery is okay for you it really is as simple as
$(myButton).toggleClass('active')
http://jsfiddle.net/bikeshedder/eRJB4/