Added cookies to save the closed state of threshold and resize messages