Did you tried this code? It looks like there is a missing ) in this line. This you run this thru JSLint?