How do I link to a Javascript script like I link to a.css file?

This is the way my code looks, (this does work):
Code:
<script language="JavaScript">function showObj(objid)
{
	parent.frames['there'].document.getElementById(objid).style.display='block';
	parent.frames['there'].document.getElementById(objid).style.zindex='5';
}</script>
</head>
<body onload="showObj('Pg'+parent.document.forms['chapage'].elements['pge'].value);">
I have never been able to get my Javascript into a .js file and still have it work. Any help in clarifiing the issue for me will be of great help.


-berzerko