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:

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?

Below is my 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">
<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/"

<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">

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

<br />


<div class="leftcolNon">
<div id='autoCloseDiv' style="display:none">
<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();' />



<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.

<div class="rightcolNon">

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