My second problem is that trying to set innerHTML isn’t working. I get TypeError: document.getElementById(…) is null on line 27 of timer.js - I’ve looked and looked but I can’t see what I’m doing wrong. Can anyone enlighten me please?
Your script is in the wrong place. Almost all JavaScript goes just before the </body> tag. The only exceptions that go in the head are those where the script needs to finish running before the page starts to load (eg. framebreaker scripts and those to style the page differently when various JavaScript commands are or are not available).