Can someone quickly and simply explain to me how to perform an action every couple of seconds using
var timeOut = setTimeout(FunctionName, 5000);
Just put setTimeout at the end inside your function, with a call to itself - like a delayed tail-recursion.
setTimeout