function getIEVersion() // Returns the version of Internet Explorer or a -1 // (indicating the use of another browser). { var rv = - 1;// Return value assumes failure. if (navigator.appName == 'Microsoft Internet Explorer') { var ua = navigator.userAgent; var re = new RegExp("MSIE ([0-9]{1,}[\.0-9]{0,})"); if (re.exec(ua) != null) rv = parseFloat(RegExp.$1); } return rv; } function displayBrowserWarning(msg, dispCompId) { document.getElementById(dispCompId).innerHTML = msg; } function checkBrowserVersion(dispCompId) { var msg = ""; var ver = getIEVersion(); if (ver >= 9.0) { msg = "We notice that you are using Internet Explorer 9. Your browser is not supported for CELT. See Help for more information."; // alert(msg); displayBrowserWarning(msg, dispCompId); } } function test() { alert("This is a test"); }