Adding javascript component to actionscript code

Hi

I have got a javascript component which i want to add to my actionscript/flex code.Is it possible.If so how do i go about it

Regards
Sidd