Here is a nice starter article on creating a new hook to use within Drupal http://erikwebb.net/comment/7856