I have 4 days of experience with Google Maps Javascript API and i find their documentation and information sharing confusing at best.
Does anyone have experience or
Take a look at this example, from the Maps API v3 examples page:
http://code.google.com/apis/maps/documentation/javascript/examples/polyline-complex.html
The code listens to clicks on the map, and on each click adds an extra lat/lng pair into the array of a polyline. This results in a polyline which joins each clicked point.
Extending this to polygon should be relatively simple. At some point you will need to close the polygon. You could do this by listening to a click on the polygon or a marker (indicating an intersection) or by having a button the user can click, and setting the polygon to autoclose.