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 winwcps function openAppWindow(URL){ winwcps = window.open("https://www.applitrack.com/wcps/onlineapp/" + URL,"winwcps","location=no,resizable=yes,scrollbars=yes," + centerWin(920,650)) winwcps.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 (winwcps.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.")){ winwcps.focus() setTimeout("FirstTimeThroughFunction = true",100) }else{ AlreadyWarnedAboutBlur = true } } } } } document.write(''); document.write('