function centerWin(zwidth,zheight){ var winHeight var winWidth winHeight = screen.availHeight winWidth = screen.width if (zwidth > winWidth){zwidth=winWidth} if (zheight > winHeight){zheight=winHeight} zleft = parseInt((winWidth/2)-(zwidth/2)) if (zleft < 10){zleft = 0} ztop = parseInt((winHeight/2)-(zheight/2)) if (ztop < 25){ztop = 0} var x = "width=" + zwidth + ",height=" + zheight + ",left=" + zleft + ",top=" + ztop return x } var winwarrencs function openAppWindow(URL){ winwarrencs = window.open("https://www.applitrack.com/warrencs/onlineapp/" + URL,"winwarrencs","location=no,resizable=yes,scrollbars=yes," + centerWin(920,650)) winwarrencs.focus() window.onfocus = checkBlur AlreadyWarnedAboutBlur = false FirstTimeThroughFunction = true } var AlreadyWarnedAboutBlur = false var FirstTimeThroughFunction = true var winisopen = false function checkBlur(){ if (FirstTimeThroughFunction){ FirstTimeThroughFunction = false winisopen = true if (AlreadyWarnedAboutBlur == false){ try { if (winwarrencs.closed) winisopen = false }catch(e) { winisopen = false }finally{ } if (winisopen){ if ( confirm("Note: You clicked outside of the application window.\n\nClick Cancel to discard this note and proceed with the current window/website.\n\nClick OK to go back to your application.")){ winwarrencs.focus() setTimeout("FirstTimeThroughFunction = true",100) }else{ AlreadyWarnedAboutBlur = true } } } } } document.write(''); document.write(''); document.write('');