Best way to tell if a lid is open.

If the lid is a swing style ( doesn't detach completely ) and object doesn't move too much, a mercury switch would be suitable.