You may have noticed that most of the maps on this site have a 'Full screen' option. Here is the code that supports this functionality, that you can add to your own Google Maps application.
Next, add a reference to the file in your HTML like so
map.controls[google.maps.ControlPosition.TOP_RIGHT].push( FullScreenControl(map, [optional text to use for full screen message], [optional text to use for exit full screen message]));
Your map should now look something like the one below.
The object returned from the FullScreenControl method has two methods, goFullScreen and exitFullScreen, that you can call to programatically go full screen or exit full screen.
Sometime after I wrote this code, Google added a full screen option to the Google Maps API. So this code is generally redundant. But there is one scenario where it still can be useful. If you want to programmatically switch to full screen view, the Google Maps API full screen option won't work, but this approach can still be used.
The code has been tested in most browsers, but it's possible it may not work for particular page layouts.