Please use document.documentMode which works on IE 8+, we often lie on our UA string and you don't want the site to stop working if we lie on the UA string.