Have you tried the DOM Inspector? Tools>Web Development>DOM Inspector. Also try the Javascript Consolse. Open it up before running your javascript. You can possibly see what is causing the error.