Modal window open once when user visits website
Why invent a new module while there are existing, well-supported ones? 

Two existing modules:


The popup_message does what you want and has a lot of features and a large installed base. 
popup_announcement - this is a relatively new module with full html support, but with only a few downloads.