Page Redirection If you are not redirected automatically, follow the -1) { // window.location.href = window.location.href + '&frommobile=true'; // } else { // window.location.href = window.location.href + '?frommobile=true'; // } //} } })(); obj = document.getElementById("dviform"); if (obj) { Event.observe(obj, 'click', Start); Event.observe(obj, 'mouseover', Start); Event.observe(obj, 'keypress', Start); } else { } Event.observe(window, 'load', Start); Event.observe(window, 'blur', Start); Event.observe(window, 'focus', Start); function UpdateTimer() { var remaining; var mins; var secs; var remaining2; var mins2; var secs2; if (timerID) { clearTimeout(timerID); clockID = 0; } if (!tStart) tStart = new Date(); if (!tStartServer) tStartServer = new Date(); var tDate = new Date(); var tDiff = tDate.getTime() - tStart.getTime(); var ret; window.status = "Idle time"; remaining = (TimeoutMinutes - tDiff) / 60000; mins = parseInt(remaining); secs = parseInt((remaining - parseInt(remaining)) * 60); var tDiff2 = tDate.getTime() - tStartServer.getTime(); remaining2 = (ServerMinutes - tDiff2) / 60000; mins2 = parseInt(remaining2); secs2 = parseInt((remaining2 - parseInt(remaining2)) * 60); if (tDiff2 > ServerMinutes) { new Ajax.Request('ServerTimer.aspx', { onSuccess: resetServer }); } if (tDiff > TimeoutMinutes) { document.TimerForm.submit(); if (timerID) { clearTimeout(timerID); timerID = 0; } tStart = null; } tDate.setTime(tDiff); timerID = setTimeout("UpdateTimer()", 1000); } function resetServer() { ServerMinutes = 10 * 1000 * 60; tStartServer = new Date(); } function showWarningPage() { if (warning == 1) { StopTimer() return; } var iWidth, iHeight, sTitle; var sUrl; iWidth = 290; iHeight = 192; sTitle = 'Login Time-out'; iPpCnt++; sUrl = 'timeoutwarning.aspx'; popupformname = 'TimeoutWarning' + iPpCnt; warning = 1; contentWin2 = new Window( popupformname, { className: 'dialog', title: sTitle, width: iWidth, height: iHeight, resizable: true, closable: false, minimizable: false, maximizable: false, url: sUrl + '?winID=' + 'rate_desc_' + iPpCnt, showEffect: Element.show, hideEffect: Element.hide } ); contentWin2.showCenter(false); } function StopTimer() { tStart = null; Event.stopObserving(window, 'load', Start); Event.stopObserving(window, 'blur', Start); Event.stopObserving(window, 'focus', Start); if (obj) { Event.stopObserving(obj, 'click', Start); Event.stopObserving(obj, 'mouseover', Start); Event.stopObserving(obj, 'keypress', Start); } if (timerID) { clearTimeout(timerID); timerID = 0; } tStart = null; } function reStart() { warning = 0; parent.Windows.getFocusedWindow().close(); Start(); } function fLogoff() { StopTimer(); var objCSA; if (parent.AppType == "9") { obj = document.getElementById("TimeoutWarning"); if (obj) { parent.Windows.getFocusedWindow().close(); } window.open("logoff.aspx", "_self"); return; } if (parent.AppType == "09") { obj = document.getElementById("TimeoutWarning"); if (obj) { parent.Windows.getFocusedWindow().close(); } window.open("logoff.aspx", "_self"); return; return; } if (parent.AppType == "10") { obj = document.getElementById("TimeoutWarning"); if (obj) { parent.Windows.getFocusedWindow().close(); } window.open("logoff.aspx", "_self"); return; } objCSA = document.getElementById("CallSaveApp"); if (objCSA) { document.dviform.CallSaveApp.value = "Y"; objCSA.value = "Y"; document.dviform.RatesPage.value = ratesPage; document.dviform.submit(); } else { window.open("logoff.aspx", "_self"); } } function Start() { window.defaultStatus = "Timer Started"; self.status = "self.status"; ServerMinutes = 10 * 1000 * 60; if (TimeoutMinutes == 0) { StopTimer() return; } if (warning == 1) { StopTimer() return; } var s s = ""; s = s.trim(); s = ""; if (s != "") { tStart = new Date(); timerID = setTimeout("UpdateTimer()", 1000); } }