So I'm trying to make a image slider but I keep getting the error message that is in title.

Javascript :
Code:
var myPics=['img_1.jpg','img_2.jpg','img_3.jpg'],totalPics=myPics.length,i=0,loopTimer;
function loop(){
var imageSlider=document.getElementById('imageSlider');
if(i > (totalPics-1)){i=0;}
imageSlider.innerHTML='<img src="../img/'+myPics[i]+'">';
i++;
loopTimer=setTimeout('loop()',3000);
}
function stopGo(obj){
var txt=obj.innerHTML;
if(txt==='Stop'){clearTimeout(loopTimer);obj.innerHTML='Start';}
else{loop();obj.innerHTML='Stop';}
}
window.onload=function(){loop();document.getElementById('ign').onclick=function(){stopGo(this);this.blur();}}
html :
HTML Code:
<head>
<script type="text/javascript" src="js/slider.js"></script>
</head>

<body>
     <div class="pageContent">
    	<div class="imageSlider"></div>
        <button id="ign">Start</button>
    </div>
</body>