( function() {  var mapping = [{"appname":"", "appid":"AEROSPACE_APPS_SAM_RH71_INTRODUCTION", "path":"GUID-0FE369B7-375D-42F0-8D67-D9C7A969446F.html"},{"appname":"", "appid":"AEROSPACE_APPS_SAM_RH71_ICM_ECC_ERROR_INJECTION", "path":"GUID-E6E00EA3-D4B8-4D63-B2E1-5A828AF8B02B.html"},{"appname":"", "appid":"AEROSPACE_APPS_SAM_RH71_IP1553_BC_OPERATION_BLOCKING", "path":"GUID-A0F66FE7-EA1B-4B61-9461-94959D430725.html"},{"appname":"", "appid":"AEROSPACE_APPS_SAM_RH71_IP1553_BC_OPERATION_INTERRUPT", "path":"GUID-0E61B769-C9D2-4263-9241-E920B25B5942.html"},{"appname":"", "appid":"AEROSPACE_APPS_SAM_RH71_IP1553_RT_OPERATION_BLOCKING", "path":"GUID-3A0F79CC-21A9-4AA4-9784-D4E205639D98.html"},{"appname":"", "appid":"AEROSPACE_APPS_SAM_RH71_IP1553_RT_OPERATION_INTERRUPT", "path":"GUID-60FE74B7-3F9C-429D-BBB6-D8DD7A0CFD84.html"},{"appname":"", "appid":"AEROSPACE_APPS_SAM_RH71_SPW_ESCCHAR_TCH_LOOPBACK", "path":"GUID-99D30EC0-EEB4-4E4B-B241-7B486A7FF621.html"},{"appname":"", "appid":"AEROSPACE_APPS_SAM_RH71_SPW_LOOPBACK", "path":"GUID-A3B89BE3-4E24-4B98-B35C-691436D071DA.html"},{"appname":"", "appid":"AEROSPACE_APPS_SAM_RH71_SPW_RMAP_LOOPBACK", "path":"GUID-77C55A1B-0D29-4366-93A1-E69564C3DFA2.html"}];
            var mchp = (function (mchp) {
                var mchp = mchp || {};
                var mapping = [];
        
                mchp.utils = {};
        
                mchp.utils.getQueryParam = function (name, url = window.location.href) {
                  name = name.replace(/[\[\]]/g, "\\$&");
                  var regex = new RegExp("[?&]" + name + "(=([^&#]*)|&|#|$)"),
                    results = regex.exec(url);
                  if (!results) return null;
                  if (!results[2]) return "";
                  return decodeURIComponent(results[2].replace(/\+/g, " "));
                };

                mchp.utils.isFirefox = typeof InstallTrigger !== 'undefined';
        
                mchp.init = function (options) {
                  mchp.mapping = options.mapping || [];
                  mchp.bindEvents();
                };
        
                mchp.bindEvents = function () {
                    if (mchp.utils.isFirefox) {
                      window.onload = mchp.checkRedirect;
                    } else {
                      document.onreadystatechange = mchp.checkRedirect;
                    }
                };

                mchp.checkRedirect = function() {
                  var contextId = mchp.utils.getQueryParam("contextId") || "";
                  if (contextId && contextId != undefined) {
                    var record = mchp.mapping.find(function(x){
                      return x.appid && x.appid.toLowerCase() == contextId.toLowerCase();
                    });
                    if (record && record.path) {
                      window.stop();
                      window.location = record.path;
                    }
                  }
                };
        
                return {
                  init: mchp.init,
                };
              })();
        
              mchp.init({
                mapping: mapping
              });

        })();