A Cookie handler written in javascript