function setCookie(name,value,expires,path,domain,secure) {
  document.cookie = 
    name + '=' + escape(value) +
    ( (expires) ? ';expires=' + expires.toGMTString() : '') +
    ( (path) ? ';path=' + path : '') + 
    ( (domain) ? ';domain=' + domain : '') +
    ( (secure) ? ';secure' : '');
}

function setCookie1(name, value) {
	var todays_date = new Date();
	var expires_date = new Date(todays_date.getFullYear()+10, todays_date.getMonth(), todays_date.getDate());
	setCookie(name, value, expires_date);
	window.location.reload();
}

function setCookie2(name, value) {
	var todays_date = new Date();
	var expires_date = new Date(todays_date.getFullYear()+10, todays_date.getMonth(), todays_date.getDate());
	setCookie(name, value, expires_date);
}