You should avoid giving names or id's to your variables/functions/arguments/forms words which are HTML/JavaScript methods/properties/attributes such as 'name' or 'id' or 'value' or 'test' or 'text' or 'checked' or 'click' or 'href' or 'closed' or 'go' or 'submit' or 'replace' or 'button' or 'radio' or 'parseInt'.
Or 'timeout'.
I don't use Adobe but this works just fine in vanilla Javascript
:-
Code:
<script type = "text/javascript">
function TimedOut() {
alert ("The time has elapsed");
}
//prompt for number of seconds
var secondCount = Number(window.prompt("Enter number of seconds", "Number of Seconds")) || 0; // trap NaN entries
//start counter
if (secondCount >= 0) {
//timer set for thousandths of a second
window.setTimeout(TimedOut, 1000*secondCount);
}
</script>