// the following variables are used to customize the webcam // the camImage variable can be an absolute or local path to the file // make sure the camImage variable is quoted // and the refreshIntervalSeconds variable is not var camImage = '/webcam.php'; var refreshIntervalSeconds = 3; // that's all the javascript you need to customize! // please do not modify any of the script below this line // there are no user serviceable parts inside var secondsLeft = refreshIntervalSeconds; function webcamTimer() { if (secondsLeft > 0) { secondsLeft = secondsLeft - 1 timerID = setTimeout('webcamTimer()', 1000); } else { date = new Date(); imageNumber = date.getTime(); document.webcamImage.src = camImage + '?' + imageNumber; secondsLeft = refreshIntervalSeconds; webcamTimer(); } } window.onload = webcamTimer();