code: function getURLParameter(url, name) {
          var URLParamRegEx = new RegExp('[?|&]?' + name + '=([^&;]+?)(&|#|;|$)');
          var value = URLParamRegEx.exec(url);
          value = (value) ? value[1] : "";
          return decodeURIComponent(value.replace(/\+/g, '%20')) || null;
      }
docs: utility functions