﻿$(document).ready(function() {
    //var isIE6 = /msie|MSIE 6/.test(navigator.userAgent)

    var ieVersion = getInternetExplorerVersion();
    var isIE = (ieVersion > -1) ? true : false;

    var displayOption = 'none';
    if (isIE && ieVersion < 8.0) {
        displayOption = 'block';
    }

    //$('#ie6warning').css('display', displayOption);
    $('#ie6warning').css('display', 'none');
});

function getInternetExplorerVersion() {
    // Modified from
    
    // Detecting Internet Explorer More Effectively 
    // http://msdn.microsoft.com/en-us/library/ms537509(VS.85).aspx
    
    // Understanding UA 
    // http://msdn.microsoft.com/en-us/library/ms537503(VS.85).aspx

    // 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;
}