That is exactly the kind of code that I was looking to write. The only difference is that it auto appends the code onto all URLs, local and non-local, then checks to see if they are non-local when they are clicked.
That's good. I only wish that Google Analytics or other major analytics platforms incorporated the same feature. It would be relatively easy to include.
From Google:
How do I manually track clicks on outbound links?: http://www.google.com/support/googleanalytics/bin/answer.py?...