I discovered an online javascript syntax checker that saved me a few weeks a go and almost lost the reference.  It's called JSLint and can be found at http://www.jslint.com/.