I know this has been done before, but I'm going to go ahead and post this code snippet here anyway, in the event that someone else has the same problems that I had.
So the fruits of my labor are attached to this thread in the form of a ZIP file. For those of you daring enough
to use this code snippet on your own site, here's what you need to do/keep in mind:
1) Download the ZIP file and unpack it to some directory on your server (duh)
2) The directory structure should look like the following ('D' stands for Directory):
-- images (D)
3) tooltipstest3.html is the example implementation.
4) In the HTML file, you'll need to set the class name "tooltip" on any image (in this case, I used little question mark images) that you want to attach a tooltip to.
5) In the HTML file, you can set the "question", "answer", and "tipwidth" (for each tooltip) via the similarly-named attributes of your question mark image elements. (And, yes, I know these attributes are not standard, valid attributes of the image element. But, A) I don't care, and B) it works great (especially when you need to populate tooltip content using a server side language and database).
6) In the HTML file, you'll notice that the tooltips are loaded (on page load!) by instantiating the Tooltips class, and passing a collection of HTML images as the lone argument. Note: If I were you, I would isolate my tooltip images -- question mark images -- as best as possible in the following manner:
7) The tooltips will adjust themselves automatically when placed at the far right or bottom of a browser window (so that you will never have to scroll to see a tooltip).
FYI - I've tested this script in the latest version of Firefox, Internet Explorer, and Opera. Works fine in all three.
In the future, I may add a few more features:
1) Make drop shadow optional
2) Control size of drop shadow
3) Make the tooltip fade in and out onmouseover and onmouseout respectively
4) Something else?...
For now, this script does what I need it to do, and that's all that really matters, right?
Anyway, enjoy the code snippet, and I hope it helps someone. Please contact me here if you have any questions/concerns.