A simple JavaScript cookie helped class