	function GetACookie(Name) {
		if (document.cookie.indexOf(Name) == -1)
		{
   			alert("Cookies must be enabled to use this site.\nFor information on how to enable cookies see the links at the bottom of this page.");
   			return false;
		}
		else
		{
		    cookieStart = document.cookie.indexOf(Name);
		    cookieValStart = (document.cookie.indexOf("=", cookieStart) + 1);
		    cookieValEnd = document.cookie.indexOf(";", cookieStart);
		    if (cookieValEnd == -1)
			{
		    	cookieValEnd = document.cookie.length;
			}
		    cookieValue = document.cookie.substring(cookieValStart, cookieValEnd);
		}
		if (cookieValue = "True")
		{
			return ("True");
		}
	}

	function SetACookie(name,value,expires,path,secure, strDNS)
	{
            var exp = new Date();
            var expDays = 1; // number of days the cookie should last
            exp.setTime(exp.getTime() + (expDays*24*60*60*1000));
	    	document.cookie = name + "=" +escape(value) +
	        ( (expires) ? ";expires=" + exp.toGMTString() : "") +
                ( (path) ? ";path=" + path : "") +
        	( (strDNS) ? ";domain=" + strDNS : "") +
	        ( (secure) ? ";secure" : "");
                //alert(document.cookie);
	}

    function CheckCookiesEnabled()
    {  
    	SetACookie('monkeywheel','True','','/','', document.location.hostname);
        if (GetACookie('monkeywheel') == "True"){
             alert('Cookies are enabled and you can use this website!');
             return true;
        } else {
             return false;
        }
    }

