Google Maps API Example - turning markers on and off with check boxes
This example uses calls documented in the API. For an example that uses the undocumented display(true), display(false) calls see this example. For a description of why you might want to use the undocumented version see this thread.