var ExitPopFlag = 0; var isNav = false; var isIE = false; if (parseInt(navigator.appVersion) >= 4) { if (navigator.appName == "Netscape") { isNav = true; } else { isIE = true; } } function ExWindow() { var featureStr="dependent=no,resizeable=yes,locaton=yes,scrollbars=yes"; self.focus(); var ExitWindow = window.open("http://www.kioskas.lt/rex/exit.php?urlind=1260"&flip=1&opk=", "ExitWindow1537919177"); self.focus(); } function exitHandler() { if (ExitPopFlag) {ExWindow();} return true; } function installExit(func) { window.onunload=func; } if (isNav) { document.captureEvents(Event.CLICK | Event.UNLOAD | Event.LOAD | Event.ERROR);} var WindName = window.name; var FrameName = "frame_not_exist"; if ((WindName == "KExPopUp") || (FrameName == "KExPopUp") || (WindName.indexOf("ExitWindow") != -1) || (FrameName.indexOf("ExitWindow") != -1)) { // Tai atidaromas papildomas langas. Jo pop kodas blokuojamas window.open = null; } else { // Tai atidaromas kliento langas. Instaliuojame pop kodą installExit(exitHandler); }