Most people don't like this you know. Unless you are doing a porn site or warez where people expect to see this type of script implemeted then you run the risk of pissing your visitors off.
Why? Because people have different prefferences as to how their browser window is sized and IE can be particularly frustrating when trying to get it to remember window sizes and positions. Then you land on a website that automatically resizes it and you have to start all over again.
A less intrusive way of doing it would be to supply a link that would max the window when clicked, then another link to bring it back to it's original size.
I used .
this script for a project. The link said "Theatre View" and opened the window full screen with no toolbars, statusbar, etc. then had an "Exit" link that closed the maxed window bringing them back to windowed view