var browserName; var browserVersion; var browserVersionSmall; var newline = String.fromCharCode(10); var crazyBrowserText="Crazy Browser"; var crazyBrowserInstalled=false; var crazyBrowserErrorMsg="The Business Foreign Exchange application has detected the presence of the \"Crazy Browser\" browser on this machine." + newline + "The Ecommcorporate application will not function normally with \"Crazy Browser\" installed." + newline + "Please close all Internet Explorer browser windows and the \"Crazy Browser\" browser and uninstall \"Crazy Browser\" from this machine. Re-launch a new Internet Explorer browser and access the Ecommcorporate application again." + newline; var useragent; var bc1; useragent = navigator.userAgent; browserName = (useragent.indexOf('Opera') > -1) ? 'Opera' : navigator.appName; CheckBrowserVersion(); if(browserName == "Netscape" || (browserName == "Microsoft Internet Explorer" && browserVersionSmall == "4.0") ) { //strMsg = "The Business Foreign Exchange application supports only the Microsoft Internet Explorer browser platform with the following versions - 5.0, 5.5 SP1, 5.5 SP2 and 6.0. Please ensure you access Business Foreign Exchange from the Microsoft Internet Explorer browser platform running one of these versions only."; strMsg = "You will need Internet Explorer version 5.5 SP2 or version 6.0 to start using Business Foreign Exchange."; alert(strMsg); window.location ="http://businessfx.commbank.com.au/bfx_display/0,2140,CH3196,00.html?bc=f"; window.close(); } function CheckBrowserVersion() { useragent = navigator.userAgent; browserName = (useragent.indexOf('Opera') > -1) ? 'Opera' : navigator.appName; var pos = useragent.indexOf('MSIE'); if (pos > -1) { browserVersion = useragent.substring(pos + 5); var pos = browserVersion.indexOf(';'); browserVersion = browserVersion.substring(0,pos); } var pos = useragent.indexOf('Opera'); if (pos > -1) { browserVersion = useragent.substring(pos + 6); var pos = browserVersion.indexOf(' '); browserVersion = browserVersion.substring(0, pos); } if (browserName == "Netscape") { var browserVersion = useragent.substring(8); var pos = browserVersion.indexOf(' '); browserVersion = browserVersion.substring(0, pos); } if (browserName == "Netscape" && parseInt(navigator.appVersion) >= 5) { var pos = useragent.lastIndexOf('/'); browserVersion = useragent.substring(pos + 1); } browserVersionSmall = browserVersion.slice(0,3); pos = useragent.indexOf(crazyBrowserText); if (pos > -1) crazyBrowserInstalled=true; }