Client side cookie detection with javascript?