The problem you have is that you call the submit function on the setTimeout line and pass the result of calling it to setTimeout.
What you want to do is pass a reference to a function to setTimeout:
var t = setTimeout(document.myform.submit, tout));
Unfortunately that doesn't quite cut it, because the submit function doesn't know what form it was called on. You also need to bind the context:
var t = setTimeout(document.myform.submit.bind(document.myform), tout));
Function.prototype.bind returns a reference to a function.