text: // This code belongs to: https://howchoo.com/javascript/how-to-manage-cookies-in-javascript
  
  function setCookie(name, value, exdays) {
      var d, expires;
      exdays = exdays || 1;
      d = new Date();
      d.setTime(d.getTime() + (exdays * 24 * 60 * 60 * 1000));
      expires = "expires=" + d.toUTCString();
      document.cookie = name + "=" + value + "; " + expires;
  }
  
  function objectToJSON(object) {
      if(object) return JSON.stringify(object);
  }
  
  function parseJSON(json) {
      if(json) return JSON.parse(json);
  }
  
  function getCookie(name) {
      if (document.cookie.length > 0) {
          c_start = document.cookie.indexOf(name + "=");
          if (c_start != -1) {
              c_start = c_start + name.length + 1;
              c_end = document.cookie.indexOf(";", c_start);
              if (c_end == -1) {
                  c_end = document.cookie.length;
              }
              return unescape(document.cookie.substring(c_start, c_end));
          }
      }
      return "";
  }
  
  // Info: To delete a cookie, just use a call such as setCookie(name, value, -1) ! 
  // By setting the exdays to -1 your cookie will be removed.
  function deleteCookie(name) {
      setCookie(name, "", -1);
  }
  