Hi Adam,
You may want to take a look here:
http://www.kryogenix.org/code/browser/searchhi/
This JavaScript highlights keywords in the page that are the result of a search at Google or another search engine. Drop the part that parses the referrer, and I think you end up with what you need.
Cheers,
Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.