What's the syntax error? Since you didn't use a code block when you pasted it above it shows single and double quotes as "smart" quotes....were they like that from the code you cut from?
For example, you pasted:
if (`window -exists Node_Generate`)
but the single quotes should be like this:
Code:
if ('window -exists Node_Generate')
Have you tried asking on DT's forums?
"Terminat Bora Diem, Terminal Auctor opus."