function setCookie(theName, theValue, theDay){
	if((theName != null) && (theValue != null)){
		// expDay = "Wed, 01 Jn 2020 18:56:35 GMT";
		expDay = "";

		if(theDay != null){
			theDay = eval(theDay);
			setDay = new Date();
			setDay.setTime(setDay.getTime() + (theDay*1000*60*60*24));
			expDay = setDay.toGMTString();
		}
		document.cookie = theName + "=" + escape(theValue) + ";expires=" + expDay;
		return true;
	}
	return false;
}

function deleteCookie(theName){
	document.cookie = theName + "=;expires=Thu,01-Jan-70 00:00:01 GMT";
	return true;
}

function getCookie(theName){
	theName += "=";
	theCookie = document.cookie + ";";
	start = theCookie.indexOf(theName);
	if(start != -1){
		end = theCookie.indexOf(";", start);
		return unescape(theCookie.substring(start + theName.length, end));
	}
	return false;
}


