/*********** no longer used - functions now in HeaderLibrary.js *************/

function _cookiesAreEnabled() {
  CreateCookie( "test", "cookie" );
  if ( ObtainCookie( "test" ) ) {
    RemoveCookie( "test" );
    return true;
  } else {
    return false;
  }
}
navigator.cookiesAreEnabled = _cookiesAreEnabled;

function ObtainCookie( name ) {
  var arg = name + "=";
  var alen = arg.length;
  var clen = document.cookie.length;
  var i = 0;
  while ( i < clen ) {
    var j = i + alen;
    if ( document.cookie.substring(i, j) == arg ) return getCookieVal(j);
    i = document.cookie.indexOf( " ", i ) + 1;
    if ( i == 0 ) break;
  }
  return null;
}

function RemoveCookie( name, path, domain ) {
  if ( ObtainCookie( name ) ) {
    document.cookie = name + "=" +
    ( ( path ) ? "; path=" + path : "" ) +
    ( ( domain ) ? "; domain=" + domain : "" ) +
    "; expires=Thu, 01-Jan-50 00:00:01 GMT";
  }
}

function CreateCookie( name, value, expires, path, domain, secure ) {
  document.cookie = name + "=" + escape (value) +
  ( ( expires ) ? "; expires=" + expires.toGMTString() : "" ) +
  ( ( path ) ? "; path=" + path : "" ) +
  ( ( domain ) ? "; domain=" + domain : "" ) +
  ( ( secure ) ? "; secure" : "" );
}


function getCookieVal( offset ) {
  var endstr = document.cookie.indexOf ( ";", offset );
  if ( endstr == -1 ) endstr = document.cookie.length;
  return unescape( document.cookie.substring( offset, endstr ) );
}



  if ( !navigator.cookiesAreEnabled() ) {
  	 document.write('<div style="text-align:center; width:100%; background:#FAE5E5; padding:4px 0 4px 0;"><p style="margin:0 0 0 -10px; color:#F00; font-weight:bold; text-align:center !important">Kiddicare.com requires cookies to be enabled on your browser - please enable your cookies</p></div>');
  }

