How to use javascript in .ascx pages
You can add script tags to the markup:
<script type="text/javascript">
// place your javascript here
</script>
<script type="text/javascript" href="path to js file" />
Or use ScriptManager in the code behind so you don't include the same file/js section multiple times if you use multiple controls in a page.
You can find out more about ScriptManager
here (overview, including usage scenarios).