Mouse Over Help Problem

Good day all.  I was looking at the Mouse Over Help project.  I copied the script into a method, but when I run it there is an event handler error "Unable to set property 'title' of undefined or null reference.  I'm not sure how to correct this.  Any help would be appreciated.  Thank you.