function setCookie1(key, value, seconds) {
if (seconds) {
var dates = new Date();
dates.setTime(dates.getTime() - 1000 * 3600 * 8 + 1000 * seconds);
document.cookie = `${key}=${value}; expires =` + dates;
}
else {
document.cookie = `${key}=${value};`
}
}