var cookiesEnabled = false;
function getCookie(cookieName)
{
   var cookieFoundAt;
   var cookieValue;

   // find start position in cookie string
   cookieFoundAt = document.cookie.indexOf(cookieName + "=");

   if (cookieFoundAt < 0)
      {
         cookieValue = "";
      }
   else
      {
         // move to actual start of cookies data
         cookieFoundAt = document.cookie.indexOf("=",cookieFoundAt);
         cookieFoundAt++;

         // find end position of cookies data
         cookieEnd = document.cookie.indexOf(";", cookieFoundAt);
         if (cookieEnd == -1)
            {
             cookieEnd = document.cookie.length - 1;
            }
         cookieValue =document.cookie.substring(cookieFoundAt,cookieEnd);
      }
   return cookieValue;
}


   document.cookie = "Enabled=true";
   var cookieValid = document.cookie;

   if (cookieValid.indexOf("Enabled=true") != -1)
   {
      cookiesEnabled = true;
   }
   else
   {
      cookiesEnabled = false;
   }

