// "var speed" is the refresh rate adjustment in seconds.

var speed = 10;
var y = 1;
var x = speed + y;
var time = x - y;
var now;
campicture = new Image();
function stopClock() {
	x = "off";
	document.form0.clock.value = x;
}

function startClock() {
	if (document.form0 && document.form0.clock && x != "off") {
		x = x - y;
		document.form0.clock.value = x;
		if (x <= 1) {
          		reload()
        	}
		timerID = setTimeout("startClock()", 1000);
        }
}

function reload() {
	now = new Date();
	var camImg = "http://frans.simonstevin.tue.nl:8000/cam.jpg?" + now.getTime();
	document.campicture.src = camImg;
    	x = speed;
    	document.form0.clock.value = x;
}

