function cookieCheck() {
	//get the cookies associated with our url
	var getcookies = document.cookie;

	//grab the checkCookie var
	var checkCookie = getcookies.indexOf("age_check=");

	//if the cookie exists, we go down the path
	if (checkCookie != -1) {
		//get the age string
		var start = checkCookie + 19;
		var end = getcookies.indexOf(";",start);
		if (end==-1) end = getcookies.length;
		var userAge = getcookies.substring(start,end);
		userAge = unescape(userAge);
		var age = new Date(userAge);
		//if underage, redirect.  otherwise Let It Be.
		if (!ageVerify(age)){
			location.replace("http://fallout.bethsoft.com/noentry.html");
		}
	//but if no cookie exists, I suppose we need to go set one
	} else {
		location.replace("http://fallout.bethsoft.com/index.html");
	}
}

//CALLED BY THE ABOVE FUNCTION
function ageVerify(age) {
	var ageCheckDate = new Date();
	var ageCheckYear = ageCheckDate.getFullYear()-17;
	ageCheckDate.setFullYear(ageCheckYear);
	if (age <= ageCheckDate) {
		return true;
	} else {
		return false;
	}
}

//kick it
cookieCheck();