﻿var elapsedTime = 0;
// set to the Session.Timeout value to notify users
// one minute after their Session times out. 
//You must set the follow setting on your page before calling this function
//var maxTime = (<%=Session.Timeout%> + 1) * 60;
var oneSecond;
oneSecond = window.setTimeout("timeoutCheck();",1000);
function timeoutCheck() {
    elapsedTime = elapsedTime + 1;
    if (elapsedTime > maxTime) {
		alert("Sorry, your session has timed out, please login again.");
        window.location = "../index.asp";
    }
    else {
      oneSecond = window.setTimeout("timeoutCheck();",1000);
    }
}

function MM_reloadPage(init) {  //reloads the window if Nav4 resized
    if (init == true) with (navigator) {
        if ((appName == "Netscape") && (parseInt(appVersion) == 4)) {
            document.MM_pgW = innerWidth; document.MM_pgH = innerHeight; onresize = MM_reloadPage;
        } 
    }
    else if (innerWidth != document.MM_pgW || innerHeight != document.MM_pgH) location.reload();
}
MM_reloadPage(true);
