Index: branches/RC/core/admin_templates/js/script.js =================================================================== diff -u -r9639 -r9658 --- branches/RC/core/admin_templates/js/script.js (.../script.js) (revision 9639) +++ branches/RC/core/admin_templates/js/script.js (.../script.js) (revision 9658) @@ -1448,4 +1448,18 @@ if (el.fireEvent) { el.fireEvent('onchange'); } +} +function WatchClosing(win, url) +{ + window.setTimeout(function() { + if (win.closed) { + alert('It has been closed ('+url+')'); + var req = Request.getRequest(); + var $ajax_mark = (url.indexOf('?') ? '&' : '?') + 'ajax=yes'; + req.open('GET', url + $ajax_mark, false); //!!!SYNCRONIOUS!!! REQUEST (3rd param = false!!!) + req.send(null); + } + }, + 2000 + ) } \ No newline at end of file