var c=1;
var t;

function startTimer() {
  document.getElementById("poocounter").innerHTML = c+" seconds";
  c=c+1;
  t=setTimeout("startTimer()",1000);
}

function stopTimer(form) {
  clearTimeout(t);

  pay = poopay.value;
  hourpay = (pay) / 52 / 40 / 60 / 60;
  earnings = hourpay * c;
  earnings = earnings.toFixed(2);
  document.getElementById("poocounter").innerHTML = "Your <b>"+c+" second</b> poo earnt you <b>£"+earnings+"</b>";
}

function resetTimer() {
  clearTimeout(t);
  c = 0;
  t = 0;
  document.getElementById("poocounter").innerHTML = "<b>Click Start to time your poo.</b>";
}
