Code Snippet: How to use a field to control node access

Drupal 7 node access per entity using a field dropdown, callback functions and the node access API.
Valid XHTML 1.0 Transitional