function GetCookie(sName) {
	var thisCookie = document.cookie;
	var indexStart = thisCookie.indexOf(sName);
	if (indexStart < 0) return null;
	var indexEquals = thisCookie.indexOf("=", indexStart);
	var indexEnd = thisCookie.indexOf(";", indexStart);
	if (indexEnd < indexEquals) indexEnd = thisCookie.length;
	var thisCrumb = unescape(thisCookie.substring(indexEquals+1, indexEnd));
	return thisCrumb;
}

function SetCookie(sName, sValue) {
	document.cookie = sName + "=" + escape(sValue) + ";expires=" + expiry + ";path=/;";
}

var time_machine = 9999 * 24 * 60 * 60 * 1000;
var today = new Date();
var expiry = new Date(today.getTime() + time_machine);
expiry=expiry.toGMTString();