Index: portalscripts.js =================================================================== --- portalscripts.js (revision 80790) +++ portalscripts.js (working copy) @@ -183,9 +183,25 @@ if (jQuery("#timeout_alert_body").get(0)) { //its there, just update the min jQuery("#timeout_alert_body span").html(min); + jQuery('#timeout_alert_body').css('top', (f_scrollTop() + 100) + "px"); } else { var dialog = timeoutDialogFragment.replace("{0}", min); jQuery("body").append(dialog); + jQuery('#timeout_alert_body').css('top', (f_scrollTop() + 100) + "px"); } } +function f_scrollTop() { + return f_filterResults ( + window.pageYOffset ? window.pageYOffset : 0, + document.documentElement ? document.documentElement.scrollTop : 0, + document.body ? document.body.scrollTop : 0 + ); +} + +function f_filterResults(n_win, n_docel, n_body) { + var n_result = n_win ? n_win : 0; + if (n_docel && (!n_result || (n_result > n_docel))) + n_result = n_docel; + return n_body && (!n_result || (n_result > n_body)) ? n_body : n_result; +}