var agt = navigator.userAgent.toLowerCase(); var os = 0; var osVersion = 0; var osFriendlyName = 'unknown'; var os64Bit = false; var browser = 0; var browserVersion = 0; var browserFriendlyName = 'unknown'; var browser64Bit = false; var jrePath = ''; var vbScriptPath = ''; var skipJava = false; var isMetro = metrotest(); // Start OS/version Tests if( agt.indexOf( 'cros' ) !=-1 ) { os = 'chromeos'; osFriendlyName ='Chome OS' jrePath =''; skipJava = true; } if( agt.indexOf( 'mac' ) !=-1 ) { os = 'mac'; osFriendlyName ='Macintosh' jrePath ='mac/mac.jsp'; } if( agt.indexOf( 'ipad' ) !=-1 ) { os = 'iPad'; osFriendlyName ='iPad' jrePath =''; skipJava = true; } if( agt.indexOf( 'iphone' ) !=-1 ) { os = 'iPhone'; osFriendlyName ='iPhone' jrePath =''; skipJava = true; } if( agt.indexOf( 'lin' ) !=-1 ) { os = 'lin'; osFriendlyName ='Linux' jrePath ='lin/lin.jsp'; } if( agt.indexOf( 'android' ) !=-1 || new RegExp(".*(.*Xoom.*)|(.*Nexus One.*)|(.*Dell Streak.*)|(.*ThinkPad Tablet.*)|(.*IdeaTab.*)|(.*Kindle.*)|(.*AT100.*)|(.*Transformer.*)|(.*Android; Tablet.*)|(.*webAgent Test Tablet.*)|(.*gt-p7510.*)|(.*gt-n8000.*)|(.*lenovo b6000.*)|(.*lenovo b8000.*).*").test(agt) ) { os = 'Android'; osFriendlyName ='Android' jrePath =''; skipJava = true; } if( agt.indexOf( 'hpwos' ) !=-1 ) { os = 'hpwos'; osFriendlyName ='HP webOS tablet' jrePath =''; skipJava = true; } if( agt.indexOf('win')!=-1 ){ os = 'win'; osFriendlyName = 'Windows'; // Default all windows to 32bit JRE jrePath = '/apps/systemCheck/win/32/jre-6u31-windows-i586.exe'; if( agt.indexOf( 'wow64' ) != -1 || agt.indexOf( 'win64' ) != -1 ) { os64Bit = true; } if( agt.indexOf( 'windows 95' ) != -1 ) { osVersion = 1; osFriendlyName = 'Windows 95'; } if( agt.indexOf( 'windows 98' ) != -1 ) { osVersion = 2; osFriendlyName = 'Windows 98'; } if( agt.indexOf( 'nt 5.0' ) != -1 ) { osVersion = 5.0; osFriendlyName = 'Windows 2000'; } if( agt.indexOf( 'nt 5.1' ) != -1 ) { osVersion = 5.1; osFriendlyName = 'Windows XP'; } if( agt.indexOf( 'nt 5.2' ) != -1 ) { osVersion = 5.2; osFriendlyName = 'Windows 2003'; } if( agt.indexOf( 'nt 6.0' ) != -1 ) { osVersion = 6.0; osFriendlyName = 'Windows Vista'; } if( agt.indexOf( 'nt 6.1' ) != -1 ) { osVersion = 6.1; osFriendlyName = 'Windows 7'; } if( agt.indexOf( 'nt 6.2' ) != -1 ) { osVersion = 6.2; osFriendlyName = 'Windows 8'; } if( agt.indexOf( 'nt 6.3' ) != -1 ) { osVersion = 6.3; osFriendlyName = 'Windows 8.1'; } if( os64Bit ) { osFriendlyName = osFriendlyName + ' 64Bit' } } // Start Browser/version Tests if( agt.indexOf( 'msie' )!=-1 || agt.indexOf( 'trident' )!=-1 ) { browser = 'msie'; browserFriendlyName = 'Internet Explorer'; if( agt.indexOf( 'win64' ) != -1 ) { browser64Bit = true; jrePath = '/apps/systemCheck/win/64/jre-6u31-windows-x64.exe'; } if( agt.indexOf( 'msie 5' ) != -1 ) { browserVersion = 5; browserFriendlyName = 'Internet Explorer 5.x'; } if( agt.indexOf( 'msie 6' ) != -1 ) { browserVersion = 6; browserFriendlyName = 'Internet Explorer 6.x'; } if( agt.indexOf( 'msie 7' ) != -1 ) { browserVersion = 7; browserFriendlyName = 'Internet Explorer 7.x'; } if( agt.indexOf( 'msie 7' ) != -1 && agt.indexOf( 'trident/4.0' ) != -1 ) { browserVersion = 7; browserFriendlyName = 'Internet Explorer 8.x Compatibility View'; } if( agt.indexOf( 'msie 7' ) != -1 && agt.indexOf( 'trident/5.0' ) != -1 ) { browserVersion = 7; browserFriendlyName = 'Internet Explorer 9.x Compatibility View'; } if( agt.indexOf( 'msie 7' ) != -1 && agt.indexOf( 'trident/6.0' ) != -1 ) { browserVersion = 7; browserFriendlyName = 'Internet Explorer 10.x Compatibility View'; } if( agt.indexOf( 'msie 7' ) != -1 && agt.indexOf( 'trident/7.0' ) != -1 ) { browserVersion = 7; browserFriendlyName = 'Internet Explorer 11.x Compatibility View'; } if( agt.indexOf( 'msie 8' ) != -1 ) { browserVersion = 8; browserFriendlyName = 'Internet Explorer 8.0'; } if( agt.indexOf( 'msie 9' ) != -1 ) { browserVersion = 9; browserFriendlyName = 'Internet Explorer 9.0'; } if( agt.indexOf( 'msie 10' ) != -1 ) { browserVersion = 10; browserFriendlyName = 'Internet Explorer 10.0'; } if( agt.indexOf( 'msie' ) == -1 && agt.indexOf( 'trident/7.0' ) != -1 ) { browserVersion = 11; browserFriendlyName = 'Internet Explorer 11.0'; } if( browser64Bit ) { browserFriendlyName = browserFriendlyName + ' 64Bit'; } if( agt.indexOf( 'chromeframe' ) != -1 ) { browserFriendlyName = browserFriendlyName + ' Google Chrome Frame JavaScript Engine'; } if(isMetro){ skipJava = true; } } if( agt.indexOf( 'firefox' )!=-1 ) { browser = 'firefox'; browserFriendlyName = 'Firefox'; } if( agt.indexOf( 'safari' )!=-1 ) { browser = 'safari'; browserFriendlyName = 'Safari'; } if( agt.indexOf( 'opera' )!=-1 ) { browser = 'opera'; browserFriendlyName = 'Opera'; } if( agt.indexOf( 'applewebkit' )!=-1 ) { browser = 'applewebkit'; browserFriendlyName = 'AppleWebKit'; } // Chrome needs to be 2nd to last if( agt.indexOf( 'chrome/' )!=-1 ) { browser = 'chrome'; browserFriendlyName = 'Chrome'; skipJava = true; } // Edge probably needs to be after Chrome now if( agt.indexOf( 'edge' ) != -1 ) { browser = 'edge'; browserFriendlyName = 'Edge'; jrePath =''; skipJava = true; } // webAgent needs to be last if( agt.indexOf( 'webagentprotocol' ) !=-1 ) { browser = 'webagent'; browserFriendlyName = 'Stoneware webAgent'; jrePath =''; skipJava = true; } // if ANY SLATE or MOBILE device skipJava if( false ) { skipJava = true; } var errorName = null; function metrotest() { var supported = null; try { new ActiveXObject(""); } catch (e) { // FF has ReferenceError here errorName = e.name; } try { supported = !!new ActiveXObject("htmlfile"); } catch (e) { supported = false; } if(errorName != 'ReferenceError' && supported==false){ supported = false; }else{ supported =true; } return !supported; }