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