If you don't want to use the useragent, you could also just do this for checking if the browser is IE. The commented code actually runs in IE browsers and turns the "false" to "true".
var isIE = /*@cc_on!@*/false;
if(isIE){
//The browser is IE.
}else{
//The browser is NOT IE.
}