If you have a Samsung Galaxy S3 phone and are having trouble with the WiFi connection not staying connected to your wireless router then here is a simple and quick fix until Samsung offers up a fix via firmware (a Verizon rep says this should happen by mid September 2012, other rumors points to it being fixed by Oct 1, 2012).
Note: This is intended to fix issues where you can connect to your WiFi but the connection keeps dropping and/or you have very limited range. This assumes you were actually able to connect to your wifi router initially.
Until it is fixed for good via a firmware update, you need to open your phone dialer on the S3 and "dial" *#0011# and as soon as you hit the last # symbol you will see this screen below:
You are now in Service Mode on your S3. Next, click the "menu" button on your phone (lower left corner) to bring up the Service Mode menu screen as shown above. Then select the WiFi option, once you do you will see this screen:
Right above the Ping Test button you will see another button, in your case it will read "ON". Click that button and it will turn to OFF instead. This turns off the wifi power saving ability which is the cause of the dropped wifi connection. Once you do this you should stay connected to your wifi and have far better range while doing it.
It's hard to say if this drains the battery more, but my initial testing seems to show very little (if any) extra drain in this mode versus leaving it ON. The real benefit is that it makes the Galaxy S3 WiFi actually work like it should.