;
          document.getElementById('gform').style.display = 'none'; // hide form
          document.getElementById('thankyou').style.display = 'block';
          document.getElementById('browse_all').style.display = 'block';
          return;
      };
      // url encode form data for sending as post data
      var encoded = Object.keys(data).map(function(k) {
          return encodeURIComponent(k) + '=' + encodeURIComponent(data[k])
      }).join('&')
      xhr.send(encoded);
    }
  }

  function loaded(