Hi Philip M, wanted to express my gratitude for posting this answer and greatly helped me to achieve what i was looking for even if this a 9 months old thread. i am an inexperienced coder my self (not even a coder) i am a web designer but polite and have always learned to give credit to people like you , sharing knowledge is what is driving all of us to go forward..
i got here via google and this was exactly what i was looking for just i want this to modify it to accept lesser period than a day eg 1 hour.
you can see the use of it on this website www.myfxcentral.gr
it uses your code to show the jpopup in joomla only once per user per day, but i want this to set it a lesser period.
btw if you need anything to see how i used your code or anything i will provide asap thanks