Hi cass74,
your code does work in test mode as well, only change I've made is replacing
else if (document.getElementById("A3_8").unchecked)
with
else if (!document.getElementById("A3_8").checked)
but I've made this change because your original code didn't change backgrounds back to none even in preview mode.