/*************************************/
/* Query strings, hashes and cookies */
/*************************************/

function SetCookie(cname, cvalue) {
	var latedate = new Date(2099,12,12,0,0,0,0);
	var cookiestr = cname+"="+cvalue+";expires="+latedate.toGMTString();
	document.cookie = cookiestr;
}

function GetCookie(cname) {
	// Returns the string value of the desired cookie or boolean "false" if the cookie not found
	var temparr = document.cookie.split("; ");
	for (var i=0;i<temparr.length;i++) {
		var tempitem = temparr[i].split("=");
		if (tempitem[0] == cname) {
			return tempitem[1];
		}
	}
	return false;
}

