I am fairly new to working with javascript and am working on an intranet site for my company. I have a page that loads an external employee information site inside of an iframe. I have modified the code on this page to autorefresh the page after a countdown from a certain period of inactivity if no cancel button is pressed when the warning is displayed.
Original code example:
http://www.beyondfusion.com/html/tutorial-autoclose.php

However, while the countdown works and the cancel button works, the browser is ignoring my requests such as onmousemove onkeydown onmouseup etc to reset the timer as the code is showing. I am using Internet Explorer 8. I can't get the javascript to work at all in Firefox 4.0.1 yet.

Any ideas or suggestions?
Thanks!

Below is my code:
Code:
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="adp.aspx.vb" Inherits="adp2" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<link href="~/Styles/site.css" rel="stylesheet" type="text/css" />
<script language="javaScript" type="text/javascript">
<!--

//5 minutes = 300000 (1000 ms * 60 seconds * 5 minutes) 1 second = 1000miliseconds
var autoCloseTimer;
var timeoutObject;
var timePeriod = 10000; // 10 seconds
var warnPeriod = 5000; // 5 seconds

function promptForClose() {
autoCloseDiv.style.display = 'block';
autoCloseTimer = setTimeout("definitelyClose()", warnPeriod);
}


function autoClose() {
autoCloseDiv.style.display = 'block'; //shows message on page
autoCloseTimer = setTimeout("definitelyClose()", timePeriod); //starts countdown to closure
}

function cancelClose() {
clearTimeout(autoCloseTimer); //stops auto-close timer
autoCloseDiv.style.display = 'none'; //hides message
}

function resetTimeout() {
clearTimeout(timeoutObject); //stops timer
timeoutObject = setTimeout("promptForClose()", timePeriod); //restarts timer from 0
}


function definitelyClose() {

parent.Iframe0.location.href = "https://URLHERE.com/"
}
-->
</script>

</head>
<body onmousedown="resetTimeout();" onmouseup="resetTimeout();" onmousemove="resetTimeout();" onkeydown="resetTimeout();" onload="timeoutObject=setTimeout('promptForClose()',timePeriod);">
<form id="form1" runat="server">
<div class="page">
<div class="header" style="left: 0px; top: 0px">
<h1>

</h1>
</div>
<div class="clear hideSkiplink">
<asp:TreeView ID="TreeView1" runat="server">
<Nodes>
<asp:TreeNode NavigateUrl="~/Default.aspx" Text="Home" Value="Home">
</asp:TreeNode>
</Nodes>
</asp:TreeView>

<br />

</div>

<div class="leftcolNon">
<div id='autoCloseDiv' style="display:none">
<center>
<p>
<strong>Inactivity warning!</strong><br />
This page will reset in 5 seconds unless you hit 'Cancel.'</p>
<input type='button' value='Reset' onclick='definitelyClose();' />
<input type='button' value='Cancel' onclick='cancelClose();' />
</center>

</div>

</div>

<div class="mainColNon">

<div class="iframeAdpSite">
<iframe id="Iframe0" frameborder="0" name="Iframe0" scrolling="auto" src="https://adp.eease.com/" style="width: 764px; height: 1000px">Your browser does not support inline frames or is currently configured not to display inline frames.
</iframe>
</div>

</div>
<div class="rightcolNon">

</div>
<!-- </div> -->
<div class="clear">
</div>
<div class="footer">
</div>
</div>

</form>
</body>
</html>