I need a javascript code "document.documentMode" which will have a value of 8 in true IE8 mode and 7 in IE7 mode.
The user agent string will be identical in both cases and will still state IE8. Note that this JavaScript variable is only available in IE8.
Basically, I must detect when someone is running IE8 (tue) and IE8 (in compatibility mode).