Here is the script running:
The above is all you need. Put it anywhere you like. There is no need, I’ve found, to put this in the head area. The a href tags are in there so the script does something, but, of course, you don’t need that part of the code just to do the mouseover. Onclick could be used, etc. I’d suggest that you take the above, figure out how it works, play with it, and then look at the documentation and scripts of those more skilled than I to make your script more robust.
For the icons (person, place, and thing), I used Xfig with a line width of 40, exported to a PPM file at 300% magnification, and used The Gimp to scale the image, convert to a GIF, and colorize using a hue of 268, saturation of 100, and lightness of -14.
For the complete program that uses this, see this article.