Jamie,
My code is behind a firewall, so I can't post it. Take a look at the fiddle Derek S. posted, particularly lines 33 through 48.
In my case I have graphics layers displaying search results from different sources. The click to highlight a particular result does not always occur as a map click; sometimes it's from the search results panel. When I place the highlight marker on the map, I give it a "hilite" attribute. I included a function to search for this particular attribute in the graphics on the map and remove the graphic when the user clicks on the map, clicks on the panel, or runs a new query.