// Summary: Test whether browser has cookies enabled for site.
// Remarks: If cookies not enabled then a warning is written to the page.
//          Otherwise nothing happens.
//          THIS IS A CUSTOM FUNCTION (for ideas Tree)
// Returns: True if cookies enabled; false if not enabled.
function cookiesEnabledTest() {
    if (!navigator.cookieEnabled) {
      
      msg = "<div style='border: 1px solid black; background-color: #ffcccc; padding: 1em;'>";
      msg += "<p>Cookies have been <strong>disabled</strong> for this browser.</p>";
      msg += "<p>You will need to enable cookies for your browser for this page to function properly.";
      msg += "<ul>";
      msg += "<li>MS Internet Explorer: Tools > Internet Options > Privacy </li>";
      msg += "<li>Firefox: Tools > Options > Privacy > Cookies > Allow sites to set cookies</li>";
      msg += "<li>Mozilla: Edit > Preferences > Privacy &amp; Security > Cookies</li>";
      msg += "</ul>";
      msg += "</div>";
      
      // Edit the relevant div id.
      var contentArea = document.getElementById("contentArea")
      contentArea.innerHTML = msg + contentArea.innerHTML;
  
      return false;
    } else {
      return true;
    }
}