  // This script checks the version of IE.
  // It then redirects to set the session variable.
  // Written by Lee A. Shurie. 
  
  function CheckIE6() { 
  
    //test for MSIE x.x;
    if (/MSIE (\d+\.\d+);/.test(navigator.userAgent)){
      var ieversion=new Number(RegExp.$1); // capture x.x portion and store as a number
    }
    else {
	  ieversion = 999;
	}
	
    // If IE 6 or below, redirect to a script to set session variable.
	if (ieversion < 7) {
	var thisURL = location.href; 
    window.location = ('/includes/set_ie_version.asp?returnURL=' + thisURL + '&ieversion=' + ieversion);
	}
	
  }
  
  CheckIE6();