// Redirect from www.awc-kc.noaa.gov or aviationweather.noaa.gov to aviationweather.gov var loc = window.location.href; var strglen = loc.length; var newLoc = 'error.html'; if (window.location.href.toLowerCase().indexOf('www.aviationweather.noaa.gov') !=-1) { newLoc = "/" + loc.substring(35,strglen); setTimeout('window.location.replace(newLoc)',0000); } else if (window.location.href.toLowerCase().indexOf('aviationweather.noaa.gov') !=-1) { newLoc = "/" + loc.substring(31,strglen); setTimeout('window.location.replace(newLoc)',0000); } else if (window.location.href.toLowerCase().indexOf('aviationweather.gov') !=-1) { newLoc = "/" + loc.substring(30,strglen); setTimeout('window.location.replace(newLoc)',0000); }