Attempt to improve tabber's JavaScript for remembering the last visited tab in a cookie - left the code under comment in case we ever want to switch to it