Yep, like Olipcs said, that's what SetToggle is for.