﻿/**
   * Detects if the cookies are disable or not,
   * if they are disable warns users the search will not work with disable cookies.
   */
function detectCookies()
{
  var h = window.location.host;
  h = h.substring(h.indexOf(".") + 1);

  $.cookie('CookiesEnabled', 'true', { path: '/' }); // set cookie
  if(!($.cookie('CookiesEnabled'))){
     /*alert('Your browser is not accepting cookies. In order to use the search you must allow cookies.\n\n To allow cookies in IE go to: tools>internet options >privacy and change privacy to medium. \n To allow cookies in Firefox go to: tools>options>privacy and tick \'accept cookies from sites\'.\n To allow cookies in Safari go to: Safari>Preferences>Security and tick \'accept cookies: only from sites I navigate to\'');     }
    */

     $.popupbox("cookiebox");
     return true;
  }
  return false;
}
