function getCookie(cookie_name) {
	var c = document.cookie;
	if (c.length > 0) {
		cookie_start = c.indexOf(cookie_name + "=");
		if (cookie_start != -1) {
			cookie_start = cookie_start + cookie_name.length + 1;
			cookie_end   = c.indexOf(";", cookie_start);
			if (cookie_end == -1) cookie_end = c.length;
			return unescape(c.substring(cookie_start, cookie_end));
		}
	}
	return null;
}

function checkCookie(cookie_name, value) {
	if (value == getCookie(cookie_name)) {
		return true;
	}
	return false;
}
