function getInternetExplorerVersion()
// 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;
}
function checkVersion()
{
 var msg = "You're not using Internet Explorer.";
  var ver = getInternetExplorerVersion();

  if ( ver > -1 )
  {
    if ( ver >= 8.0 ) 
    {
     ; //    msg = "You're using a recent copy of Internet Explorer.";

    }
    else
    {
 //    alert( "You are using an older version of Internet Explorer and will be redirected to web pages that are compatible with your browser");
     
     window.location = "http://www.websitesbyrc.com/IEV7/index.html";
     
    }
  }
 // alert( msg );
    //    window.location = "http://www.websitesbyrc.com/IEV7/index.html";
}

function checkBrowser()
{
engine = null;
if (window.navigator.appName == "Microsoft Internet Explorer")
{
   // This is an IE browser. What mode is the engine in?
   if (document.documentMode) // IE8
   {
      engine = document.documentMode;
      alert (engine);
   }
   else // IE 5-7
   {
      engine = 5; // Assume quirks mode unless proven otherwise
      if (document.compatMode)
      {
         if (document.compatMode == "CSS1Compat")
            engine = 7; // standards mode
      }
      alert ('other ie');
   }
   // the engine variable now contains the document compatibility mode.
}
else
  alert ('another browser');
/*
var browser=navigator.appName;
var b_version=navigator.appVersion;
var version=parseFloat(b_version);
var msg = 'browser:' + browser + ' version: ' + b_version;

alert(msg);

   // if ((browser=="Microsoft Internet Explorer") && (version < 8))
  //  if ((index(browser,'MSIE') && (!strstr(browser, 'MSIE 8'))
  if ( (browser.indexOf('MSIE') > 0) && (!browser.indexOf('MSIE 8')))
    {
       alert('Your version of Internet Explorer is an old version. You are being redirected to web pages that are compatible with that version Internet Explorer.');
       
      window.location = "http://www.websitesbyrc.com/IEV7/index.html";
    
    }
    
    else
        alert ('V8 or another browser');

*/
}

