As mentioned by firepages the cookie value is a string so should be set and compared as "true", not true (a boolean).
"I'm here to save your life. But if I'm going to do that, I'll need total uninanonynymity
." Me Myself & Irene
Validate your HTML