<!-- // Activate HTML comment cloak
//===================================================================
//  The code below checks/loads/stores Cookies for Foundation1 site.
//===================================================================
// F1 Load Cookies - BEGIN

// Create the cookie we'll use to save state for this web page.
// Since we're using the 'root' path, this cookie will be accessible
// to all web pages in the site's root directory or "below" it.
// Therefore, it should have a name that is unique among those pages.
// Note that we set the expiration to 100 days in the future.
// oX = new Cookie(document, cookiename, hourstoexpire, path);
var objF1Cookie = new Cookie(document, "F1UserData", 2400, "/");

// First, try to read data stored in the cookie. If the cookie is not
// defined, or if it doesn't contain the data we need, then setup the
// values or defaults for that user data.
if (!objF1Cookie.load() || !objF1Cookie.UserID || !objF1Cookie.Email) {
  if ((typeof F1SV_Login == 'string')&&(F1SV_Login == 'true')) {
    // User successfully logged in, get values from Session Variables.
    objF1Cookie.UserID    = F1SV_UserID;
    objF1Cookie.UserPriv  = F1SV_UserPriv;
    objF1Cookie.FirstName = F1SV_FirstName;
    objF1Cookie.LastName  = F1SV_LastName;
    objF1Cookie.Company   = F1SV_Company;
    objF1Cookie.Email     = F1SV_Email;
  } else {
    // User not logged in, use defaults.
    objF1Cookie.UserID    = 'GUEST00';
    objF1Cookie.UserPriv  = 'GUEST00';
    objF1Cookie.FirstName = '';
    objF1Cookie.LastName  = '';
    objF1Cookie.Company   = '';
    objF1Cookie.Email     = '';
  }
} else {
  // Cookie is there. Check it for appropriate values
  // if user is logged in.
  if ((typeof F1SV_Login == 'string')&&(F1SV_Login == 'true')) {
    if ((objF1Cookie.UserID != F1SV_UserID) || (objF1Cookie.Email != F1SV_Email)) {
      // Critical values don't match, refresh values from Session Variables.
      objF1Cookie.UserID    = F1SV_UserID;
      objF1Cookie.UserPriv  = F1SV_UserPriv;
      objF1Cookie.FirstName = F1SV_FirstName;
      objF1Cookie.LastName  = F1SV_LastName;
      objF1Cookie.Company   = F1SV_Company;
      objF1Cookie.Email     = F1SV_Email;
    }
  }
}

// Store the cookie values, even if they were already stored, so that the
// expiration date will be reset to 100 days from this most recent visit.
objF1Cookie.store();

// F1 Load Cookies - END

//===================================================================
//  The code above checks/loads/stores Cookies for Foundation1 site.
//===================================================================

// Deactivate HTML comment cloak -->


