code: function setCookie(pr_name, exdays) {
          var d = new Date();
          d = (d.getTime() + (exdays*24*60*60*1000));
          document.cookie = pr_name+"="+d + ";" + ";path=/";
      }
docs: set the value, save data browser