function changeImg(){
  var num = imgArray[Math.floor(Math.random()*imgArray.length)]  
  document.getElementById('yourimg').src='images/thumbs/'+num+'_thumb.jpg';
  document.getElementById('yoururl').href='images/'+num+'.jpg';
    setTimeout('changeImg()',8000);
}
window.onload=changeImg;

