move module's external .js file code to template [phtml] file
Well you can use a phtml file instead by replacing:
<action method="addJs"><script>aitoc/aitcg/Aitcg/View/Abstract.js</script></action>
With:
<block type="core/template" name="custom.js" template="my/custom/template.phtml" />
Then just move your JS in that phtml file and tweak it with your PHP modifications.