Time to learn to debug.
I recommend you use Chrome browser for debugging, though you can use any browser. Chrome's debugger has a few advantages over the others and I find it easiest to use.
So bring up the page in your browers, hit the F12 function key to enable the debugger, and then click on your element that calls crtTable().
Look in the Console tab of the debugger to see any error messages, for starters.
An optimist sees the glass as half full.
A pessimist sees the glass as half empty.
A realist drinks it no matter how much there is.