if (document.images) 
  var refInterval = 0;
else 
	var refInterval = 10;

function startCounter()
  {
  refInterval = refInterval - 1;
  var now = new Date();
  var dummystring = parseInt(now.getTime() / 1000);
  if (refInterval < 1)
    {
    if (document.images) 
      document.refImage.src = "webcam/thumbs.php" + "?" + dummystring;
    else
    	window.location.reload();
    refInterval = 10;
    }
  document.counter.time.value = refInterval;
  timerID = setTimeout("startCounter()", 1000);
  }

