var n = navigator.userAgent; alert("7 = "+/Windows NT 6.1/.test(n)+"\nvista = "+/Windows NT 6.0/.test(n)+"\nInternet Explorer = " + ((navigator.cpuClass||false)&&/MSIE/.test(n)) )