/* Author: Stuart Baumann Date: 30/06/2010 Purpose: IE6 Redirect Script */ /******************** IE6 REDIRECT SCRIPT ******************** This script detects if the user's browser is version 6.X or earlier. It should be linked in the main page using this code: If the browser is IE 6 or earlier, it will send the browser to a page called 'redirect.html' by default, though the location can be changed below [window.location = "redirect.html"]. *************************************************************/ //Test User Agent string for a version of IE. if ( /MSIE (\d+\.\d+);/.test(navigator.userAgent) ){ //Place version no# in a variable. var ieVersion=new Number( RegExp.$1 ) //Test variable for versions less than 7. if ( ieVersion < 7 ) { //The page to redirect to. window.location = "redirect.html"; } }