sounds like you could do it all in js
just have js set a cookie and look for the cookie when that page loads, if its found show the div, otherwise its probably already hidden by default.
You could always use php to read the cookie and build the div initally visible too, either way should work.