function imagefield_gallery_nodetypes() {
  $types = content_types();
  $i = 0;
  $nt = array();
  foreach ($types as $type) {
    foreach ($type['fields'] as $field) {
      if ($field['type'] == 'image') {
        $nt[$i]['type'] = $type['type'];
        $nt[$i]['name'] = $field['field_name'];
      }
/* ok, so the above code works beautifully, however there's a need to handle multiple fields of the same type, on a single node type, as well as a need to work with node references (below).  However, the node references essentially make the need to work with multiple fields mandatory.  The code below is my first crack at this piece by piece, the comments should make the rest of it obvious */
      if ($field['type'] == 'nodereference') {
        foreach ($field['referenceable_types'] as $name => $active) {
          if($active && $types[$active]['fields']){
/* check active content types for an imagefield.  If one doesn't exist, this node reference is uneligable for an imagefield gallery */
            foreach ($types[$active]['fields'] as $field2) {
              if ($field2['type'] == 'image') {
/*
herein lies a few problems.  I need to grab the node types and their imagefield based on what types the node reference will work with.  easy enough since all of that is contained inside of $types right now, however I'm adding all of this to the $nt array, and at the end of the day I'll still need the typ and name as illustrated earlier in the code.  This should be added at the end of these for each loops, but I'm unsure how to do it w/o adding it to the array, when the node reference isn't eligible.  logically following my ifs and foreaches here, it still gets added since I need to foreach through all the fields (one of the main reason I didn't want to tackle this problem.
*/
              }
            }
          }
        }
//        $nt[$i]['type'] = $type['type'];
//        $nt[$i]['name'] = $field['field_name'];
//        $nt[$i]['reftype'] = $field['referenceable_types'];
      }
      #end new stuff
      $i++;
    }
  }
  return $nt;
}