	function setCookie()	{



		var exdate=new Date();

		var expiredays=90;



		exdate.setDate(exdate.getDate()+expiredays)

		document.cookie='OWBAgeCheck'+ "=" +escape(1)+

		((expiredays==null) ? "" : ";expires="+exdate.toGMTString())



		window.close();

	}

	

	function getCookie(OWBAgeCheck)	{

		

		if (document.cookie.length>0)	{

			c_start=document.cookie.indexOf(OWBAgeCheck + "=")

				if (c_start!=-1)	{ 

			c_start=c_start + OWBAgeCheck.length+1 

			c_end=document.cookie.indexOf(";",c_start)

				if (c_end==-1) c_end=document.cookie.length

					return unescape(document.cookie.substring(c_start,c_end))

			} 

		}

		return ""

	}



	function checkCookie()	{

		

		OWBAgeCheck=getCookie('OWBAgeCheck');

		

		if (OWBAgeCheck!=null && OWBAgeCheck!="") {

			

			return true;

		

		} else {

				

			/*	window.open("ageverification.html","_self","directories=0,location=0,menubar=0,resizable=0,scrollbars=0,status=0","replace=false"); window.close();

			window.location = "ageverification.html";*/

			return false;

		}

	}

	



	function isCookieSet() {

		

		

		

		if (checkCookie()) {

			

			window.location = "wineries.php";

			

		} else {

			

			return false;

		

		}

		

	}
