How can i an automatic alert when i open a website?

Say i open google.com in my browser. What i want is that as a open google.com i get a dialog box on the screen with predefined message

Please help. Can i do this with simple javascript or is there any other method?