So, you need to do some debug on your script. First, setup Reader to display the console window on an error (see screen shot below). Then, when the script runs in reader you'll know right away if the code is throwing an exception.
Also, I would stronly suggest making a very simplified version for testing on Reader. There is way too much going on in this script.
Thom Parker - Software Developer at PDFScriptingUse the Acrobat JavaScript Reference early and often