ho messo nell'head questo javascript, il problema è che il redirect non avviene.....

codice:
<head>
<title>
	Denominazione Cliente
</title>
<link rel="stylesheet" type="text/css" href="stile.css">
<script language="JavaScript">
if (document.layers) {
  window.captureEvents(Event.MOUSEMOVE);
}

window.onMouseMove = resetTimer;

var tID = '';

function resetTimer(e) {
  clearTimeout(tID); // reset the timer
  tID = setTimeout('executeTimer()',5000);
}

function executeTimer() {
  location.href = 'index.html';
}
</script>
</head>
la pagina rimane ferma, e non si carica index.html, qualcuno mi sa spiegare come mai?

un grazie in anticipo a chiunque mi possa dare una mano