jquery event sink for com object

jquery event sink for com object


i have a comm object that raises events and javascript on the web page to capture those events. It all works perfectly. Now I have to "distribute" this javascript to serveral other web applications for use on their web pages (this is all internal intranet stuff).

here is the javascript function and script tag for the event sink:
<script for="ica" event="OnAgentEvents(evd)" language="javascript">
function ica::OnAgentEvents(evd) { // do stuff here } </script>

how can I put this into a seperate .js file? or does it have to remain on the page itself?

BTW, the "ica" object is on the page in an object tag: 
<object classid="clsid:55527FAD-5E60-4F44-867B-9F6E7B0DB9DD" id="ica" name="ica" > </object>