Your code is a total mess. Assuming you mean to dynamically load JS resource, that's the way to do it.
First, have this:
<script type="text/javascript" id="redirect"></script>
And the code:
var load = setTimeout(function() {
document.getElementById("redirect").src="js/load.js";
}, 5000);