function getAppName() { return navigator.appName; } function winWidth() { var myWidth = 0; //Non-IE if (typeof(window.innerWidth) == 'number') { myWidth = window.innerWidth; } else //IE 6+ in 'standards compliant mode' if (document.documentElement && document.documentElement.clientWidth) { myWidth = document.documentElement.clientWidth; } else //IE 4 compatible if (document.body && document.body.clientWidth) { myWidth = document.body.clientWidth; } return myWidth; } function winHeight() { var myHeight = 0; //Non-IE if (typeof(window.innerWidth) == 'number') { myHeight = window.innerHeight; } else //IE 6+ in 'standards compliant mode' if (document.documentElement && document.documentElement.clientHeight) { myHeight = document.documentElement.clientHeight; } else //IE 4 compatible if (document.body && document.body.clientHeight) { myHeight = document.body.clientHeight; } return myHeight; } function progrsPosition() { var id1 = document.getElementById('progbar_out'); var id2 = document.getElementById('progbar_in'); var id3 = document.getElementById('alert_text'); if (id1 != null) { var obj1 = document.getElementById('floatlayer'); var obj2 = document.getElementById('floatlayer2'); if (obj1!=null) { var objPos1 = new positionInfo(obj1); id1.style.top = (objPos1.getElementTop()-1)+'px'; id1.style.left = (objPos1.getElementLeft()-1)+'px'; id2.style.top = ((objPos1.getElementTop()-1) + ((winHeight())/2))+'px'; id2.style.left = ((objPos1.getElementLeft()-1) + ((winWidth())/2))+'px'; id3.style.top = ((objPos1.getElementTop()-1) + ((winHeight())/2))+'px'; id3.style.left = ((objPos1.getElementLeft()-1) + ((winWidth())/2))+'px'; } if (obj2!=null) { var objPos2 = new positionInfo(obj2); id1.style.top = (objPos2.getElementTop()-1)+'px'; id1.style.left = (objPos2.getElementLeft()-1)+'px'; id2.style.top = ((objPos2.getElementTop()-1) + ((winHeight())/2))+'px'; id2.style.left = ((objPos2.getElementLeft()-1) + ((winWidth())/2))+'px'; id3.style.top = ((objPos2.getElementTop()-1) + ((winHeight())/2))+'px'; id3.style.left = ((objPos2.getElementLeft()-1) + ((winWidth())/2))+'px'; } } } function showProgress() { var id1 = document.getElementById('progbar_out'); var id2 = document.getElementById('progbar_in'); if (id1 != null) { progrsPosition(); id1.style.display = 'inline'; id2.style.display = 'inline'; document.body.style.overflow='hidden'; } } function getHide() { var id1 = document.getElementById('progbar_out'); var id2 = document.getElementById('progbar_in'); if (id1 != null) { id1.style.display = 'none'; id2.style.display = 'none'; } } function hideProgress() { setTimeout(getHide,100); document.body.style.overflow='auto'; } function showSmallProgress(id1,id2) { var id1 = document.getElementById(id1); var id2 = document.getElementById(id2); if (id1 != null && id2 != null) { id1.style.display='none'; id2.style.display='inline'; } } function hideSmallProgress(id1,id2) { var id1 = document.getElementById(id1); var id2 = document.getElementById(id2); if (id1 != null && id2 != null) { id1.style.display='inline'; id2.style.display='none'; } } function showAlert() { var id1 = document.getElementById('progbar_out'); var id2 = document.getElementById('alert_text'); if (id1 != null) { progrsPosition(); id1.style.display = 'inline'; id2.style.display = 'inline'; } } function hideAlert() { var id1 = document.getElementById('progbar_out'); var id2 = document.getElementById('alert_text'); if (id1 != null) { id1.style.display = 'none'; id2.style.display = 'none'; } var id3 = parent.window.document.getElementById('progbar_out'); var id4 = parent.window.document.getElementById('alert_text'); if (id3 != null) { id3.style.display = 'none'; id4.style.display = 'none'; } } var last = 'connect'; function connSts() { try { getData7('connCheck', 'conn_status', 'hasconn()', 'disconn()'); } catch(err) {} } function hasconn() { var val = document.getElementById('conn_status').innerHTML.trim(); if (val.indexOf('disconnect')>-1) { showAlert(); } else { if (last.indexOf('disconnect')>-1) hideAlert(); } last = val; setTimeout(connSts,5000); } function disconn() { last = 'disconnect'; showAlert(); setTimeout(connSts,5000); }