[eluser]Jondolar[/eluser]
$this->load->view('js/javascript-file.js');
basically, load your header, then alternatively, load your jscript, then load your body template. If you need more control in where the file is inserted to put view logic in your view template and then set a variable in the data array that is passed to the view:
<? if ($js = TRUE) { ?>
javascript code
<? } ?>