BDG Scenario 3

GetParam.js

// searches URL for name/value pairs
// returns: null, if no match; value, if found
function getParam(name) {
   var myParm = name.toUpperCase();
   var search = document.location.search;
   search = search.substr(1); // remove '?'
   var params = search.split('&');
   for (var i=0; i<params.length; i++) {
      var pair = params[i].split('=');
      if (pair[0].toUpperCase() == myParm) {
         return unescape(pair[1]);
      }
   }
   return null;
}