function GetCookie() {
  var strName = "varCook";
  if (document.cookie.indexOf(strName) == -1)
  { alert("Cookies ARE NOT currently enabled!\nPlease read below for information on how to enable cookies.");
  return false;
  }
  else
  {
  cookieStart = document.cookie.indexOf(strName);
  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 SetCookie(name,value,expires,path,domain,secure)
{
  var strDNS = GetDNS();
  document.cookie = name + "=" +escape(value) +
  ( (expires) ? ";expires=" + expires.toGMTString() + 1000*60*20 : "") +
  ( (path) ? ";path=" + path : "") +
  //( (domain) ? ";domain=" + domain : "") +
  ( (domain) ? ";domain=" + strDNS : "") +
  ( (secure) ? ";secure" : "");
  return true
}

function GetDNS()
  {
  cookieDomain = document.location.hostname;
}

function CheckCookiesEnabled()        
{			
  SetCookie('varCook','True','','/','','');
  if (GetCookie() == "True"){
  alert('Cookies are enabled and you can use our shopping basket!');
  } else {		
  return false;	
  }		
}      

