var AXA_RTQ_Agreement = {
  "CookieName": "AXA_RTQ_agree",
  "AgreementMessage":
    "<div style=\"text-align:left; padding:10px;\"><p>The Risk Tolerance Questionnaire presented is " +
    "available through a license agreement between Ibbotson Associates, Inc.  " +
    "and AXA Financial, Inc. Its sole purpose is to assist you in determining  " +
    "your general attitudes towards investment risk. This questionnaire does not  " +
    "consider all factors necessary in making an investment decision (e.g., personal  " +
    "and financial information and investment objective). In no way should this  " +
    "questionnaire be viewed as investment advice or establishing any kind of advisory  " +
    "relationship with Ibbotson Associates. Ibbotson Associates does not endorse and/or  " +
    "recommend any specific financial product that may be used in conjunction with  " +
    "the asset allocation models that are presented. Please consult with your Financial  " +
    "Professional and obtain the financial product&#8217;s prospectus (or its equivalent) and read it carefully " +
    "prior to investing.</p> " +
    "<p>&#169; 2011 Ibbotson Associates, Inc. Used with permission.  All Rights Reserved.  " +
    "Ibbotson is a registered investment advisor and wholly owned subsidiary of Morningstar, Inc. " +
    "Ibbotson is not affiliated with AXA and its family of companies.</p> " +
    "<p>By clicking &#8220;I Agree&#8221; below, you agree to the terms of this Risk Tolerance  " +
    "Questionnaire disclosure, as stated above, as well as to the terms of this  " +
    "website as outlined in AXA Equitable&#8217;s Usage Agreement and Privacy and Security  " +
    "Statement which can be viewed by clicking below.</p> " +
    "<p><a style=\"float:right;\" target=\"blank\" href=\"http://www.axa-equitable.com/axa/privacy.html\">AXA Equitable Privacy and Security Statement</a>" +
    "<a target=\"blank\" href=\"http://www.axa-equitable.com/axa/usage.html\">AXA Equitable Usage Agreement</a></p></div>",
  "showAgreementMessage": function() {
    var cookie = AXA_RTQ_Agreement.checkCookie(AXA_RTQ_Agreement.CookieName);
    if (!cookie) {
      if ($("threeColumnForm")) {
        $("threeColumnForm").hide();
      }
      Dialog.confirm(AXA_RTQ_Agreement.AgreementMessage,
        { "className": "alphacube",
          "okLabel": "I Agree",
          "cancelLabel": "I Disagree",
          "onOk": function() {
//            AXA_RTQ_Agreement.setCookie(AXA_RTQ_Agreement.CookieName, true, 365);
            Windows.closeAll();
            if ($("threeColumnForm")) {
              $("threeColumnForm").show();
            }
          },
          "onCancel": function() {
            window.history.back();
          },
          "width": 600,
          "height": 400
        });
    }
  },
  "setCookie": function(c_name, value, expiredays) {
    var exdate = new Date();
    exdate.setDate(exdate.getDate() + expiredays);
    document.cookie = c_name + "=" + escape(value) +
    ((expiredays == null) ? "" : ";expires=" + exdate.toGMTString());
  },
  "getCookie": function(c_name) {
    if (document.cookie.length > 0) {
      c_start = document.cookie.indexOf(c_name + "=");
      if (c_start != -1) {
        c_start = c_start + c_name.length + 1;
        c_end = document.cookie.indexOf(";", c_start);
        if (c_end == -1) c_end = document.cookie.length;
        return unescape(document.cookie.substring(c_start, c_end));
      }
    }
    return "";
  },
  "checkCookie": function(c_name) {
    return false;
  }
}

AXA_RTQ_Agreement.showAgreementMessage();
