	var logoutWarningTimer = null;
	var logoutTimer = null;
  
  function logMeOut()
  {
    // take user to logout page (or some url that clears their session, etc.)
    window.location = 'admin/security/Logoff.aspx';
  }
  
  function procces(returnVal){
      if (returnVal)
      {
        // clear the logout timer &amp; reset it
        clearTimeout(logoutTimer);
		clearTimeout(logoutWarningTimer);
		setAutoLogOutTimer();
      } else {
		logMeOut();
      }   
   }
  
  function logOutWarning()
  {
    showPopWin('/confirmLogout.htm', 300, 180, procces)
  }
   
  function setAutoLogOutTimer()
  {  
    // logout
	logoutWarningTimer = setTimeout("logMeOut()", logoutMinutes * 60000);
    // show a warning after 28 minutes to give them a chance to cancel the auto-logout
    logoutTimer = setTimeout("logOutWarning()", logoutWarningMinutes * 60000);
  }
 