CINXE.COM
Chat | Massachusetts Behavioral Health Help Line
<!DOCTYPE html> <html lang="en-US"> <head> <!-- Google tag (gtag.js) --> <script async src="https://www.googletagmanager.com/gtag/js?id=G-KG6DDGRBC8"></script> <script> window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'G-KG6DDGRBC8'); </script> <meta charset="UTF-8" /> <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=yes, maximum-scale=2" /> <meta http-equiv="X-UA-Compatible" content="IE=edge" /> <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon"> <link rel="icon" href="/favicon.ico" type="image/x-icon"> <title>Chat | Massachusetts Behavioral Health Help Line</title> <meta name="description" content="Massachusetts Behavioral Health Help Line"> <link rel="stylesheet" type="text/css" href="https://s18637.pcdn.co/wp-content/themes/mahelpline/style.css?v=1.285" /> <link href="//maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet"> <meta name='robots' content='max-image-preview:large' /> <link rel="alternate" type="application/rss+xml" title="Massachusetts Behavioral Health Help Line » Feed" href="https://www.masshelpline.com/feed/" /> <link rel="alternate" type="application/rss+xml" title="Massachusetts Behavioral Health Help Line » Comments Feed" href="https://www.masshelpline.com/comments/feed/" /> <link rel='stylesheet' id='formidable-css' href='https://www.masshelpline.com/wp-admin/admin-ajax.php?action=frmpro_css&ver=10241659' type='text/css' media='all' /> <link rel='stylesheet' id='wp-block-library-css' href='https://s18637.pcdn.co/wp-includes/css/dist/block-library/style.min.css?ver=6.6.2' type='text/css' media='all' /> <style id='classic-theme-styles-inline-css' type='text/css'> /*! This file is auto-generated */ .wp-block-button__link{color:#fff;background-color:#32373c;border-radius:9999px;box-shadow:none;text-decoration:none;padding:calc(.667em + 2px) calc(1.333em + 2px);font-size:1.125em}.wp-block-file__button{background:#32373c;color:#fff;text-decoration:none} </style> <style id='global-styles-inline-css' type='text/css'> :root{--wp--preset--aspect-ratio--square: 1;--wp--preset--aspect-ratio--4-3: 4/3;--wp--preset--aspect-ratio--3-4: 3/4;--wp--preset--aspect-ratio--3-2: 3/2;--wp--preset--aspect-ratio--2-3: 2/3;--wp--preset--aspect-ratio--16-9: 16/9;--wp--preset--aspect-ratio--9-16: 9/16;--wp--preset--color--black: #000000;--wp--preset--color--cyan-bluish-gray: #abb8c3;--wp--preset--color--white: #ffffff;--wp--preset--color--pale-pink: #f78da7;--wp--preset--color--vivid-red: #cf2e2e;--wp--preset--color--luminous-vivid-orange: #ff6900;--wp--preset--color--luminous-vivid-amber: #fcb900;--wp--preset--color--light-green-cyan: #7bdcb5;--wp--preset--color--vivid-green-cyan: #00d084;--wp--preset--color--pale-cyan-blue: #8ed1fc;--wp--preset--color--vivid-cyan-blue: #0693e3;--wp--preset--color--vivid-purple: #9b51e0;--wp--preset--gradient--vivid-cyan-blue-to-vivid-purple: linear-gradient(135deg,rgba(6,147,227,1) 0%,rgb(155,81,224) 100%);--wp--preset--gradient--light-green-cyan-to-vivid-green-cyan: linear-gradient(135deg,rgb(122,220,180) 0%,rgb(0,208,130) 100%);--wp--preset--gradient--luminous-vivid-amber-to-luminous-vivid-orange: linear-gradient(135deg,rgba(252,185,0,1) 0%,rgba(255,105,0,1) 100%);--wp--preset--gradient--luminous-vivid-orange-to-vivid-red: linear-gradient(135deg,rgba(255,105,0,1) 0%,rgb(207,46,46) 100%);--wp--preset--gradient--very-light-gray-to-cyan-bluish-gray: linear-gradient(135deg,rgb(238,238,238) 0%,rgb(169,184,195) 100%);--wp--preset--gradient--cool-to-warm-spectrum: linear-gradient(135deg,rgb(74,234,220) 0%,rgb(151,120,209) 20%,rgb(207,42,186) 40%,rgb(238,44,130) 60%,rgb(251,105,98) 80%,rgb(254,248,76) 100%);--wp--preset--gradient--blush-light-purple: linear-gradient(135deg,rgb(255,206,236) 0%,rgb(152,150,240) 100%);--wp--preset--gradient--blush-bordeaux: linear-gradient(135deg,rgb(254,205,165) 0%,rgb(254,45,45) 50%,rgb(107,0,62) 100%);--wp--preset--gradient--luminous-dusk: linear-gradient(135deg,rgb(255,203,112) 0%,rgb(199,81,192) 50%,rgb(65,88,208) 100%);--wp--preset--gradient--pale-ocean: linear-gradient(135deg,rgb(255,245,203) 0%,rgb(182,227,212) 50%,rgb(51,167,181) 100%);--wp--preset--gradient--electric-grass: linear-gradient(135deg,rgb(202,248,128) 0%,rgb(113,206,126) 100%);--wp--preset--gradient--midnight: linear-gradient(135deg,rgb(2,3,129) 0%,rgb(40,116,252) 100%);--wp--preset--font-size--small: 13px;--wp--preset--font-size--medium: 20px;--wp--preset--font-size--large: 36px;--wp--preset--font-size--x-large: 42px;--wp--preset--spacing--20: 0.44rem;--wp--preset--spacing--30: 0.67rem;--wp--preset--spacing--40: 1rem;--wp--preset--spacing--50: 1.5rem;--wp--preset--spacing--60: 2.25rem;--wp--preset--spacing--70: 3.38rem;--wp--preset--spacing--80: 5.06rem;--wp--preset--shadow--natural: 6px 6px 9px rgba(0, 0, 0, 0.2);--wp--preset--shadow--deep: 12px 12px 50px rgba(0, 0, 0, 0.4);--wp--preset--shadow--sharp: 6px 6px 0px rgba(0, 0, 0, 0.2);--wp--preset--shadow--outlined: 6px 6px 0px -3px rgba(255, 255, 255, 1), 6px 6px rgba(0, 0, 0, 1);--wp--preset--shadow--crisp: 6px 6px 0px rgba(0, 0, 0, 1);}:where(.is-layout-flex){gap: 0.5em;}:where(.is-layout-grid){gap: 0.5em;}body .is-layout-flex{display: flex;}.is-layout-flex{flex-wrap: wrap;align-items: center;}.is-layout-flex > :is(*, div){margin: 0;}body .is-layout-grid{display: grid;}.is-layout-grid > :is(*, div){margin: 0;}:where(.wp-block-columns.is-layout-flex){gap: 2em;}:where(.wp-block-columns.is-layout-grid){gap: 2em;}:where(.wp-block-post-template.is-layout-flex){gap: 1.25em;}:where(.wp-block-post-template.is-layout-grid){gap: 1.25em;}.has-black-color{color: var(--wp--preset--color--black) !important;}.has-cyan-bluish-gray-color{color: var(--wp--preset--color--cyan-bluish-gray) !important;}.has-white-color{color: var(--wp--preset--color--white) !important;}.has-pale-pink-color{color: var(--wp--preset--color--pale-pink) !important;}.has-vivid-red-color{color: var(--wp--preset--color--vivid-red) !important;}.has-luminous-vivid-orange-color{color: var(--wp--preset--color--luminous-vivid-orange) !important;}.has-luminous-vivid-amber-color{color: var(--wp--preset--color--luminous-vivid-amber) !important;}.has-light-green-cyan-color{color: var(--wp--preset--color--light-green-cyan) !important;}.has-vivid-green-cyan-color{color: var(--wp--preset--color--vivid-green-cyan) !important;}.has-pale-cyan-blue-color{color: var(--wp--preset--color--pale-cyan-blue) !important;}.has-vivid-cyan-blue-color{color: var(--wp--preset--color--vivid-cyan-blue) !important;}.has-vivid-purple-color{color: var(--wp--preset--color--vivid-purple) !important;}.has-black-background-color{background-color: var(--wp--preset--color--black) !important;}.has-cyan-bluish-gray-background-color{background-color: var(--wp--preset--color--cyan-bluish-gray) !important;}.has-white-background-color{background-color: var(--wp--preset--color--white) !important;}.has-pale-pink-background-color{background-color: var(--wp--preset--color--pale-pink) !important;}.has-vivid-red-background-color{background-color: var(--wp--preset--color--vivid-red) !important;}.has-luminous-vivid-orange-background-color{background-color: var(--wp--preset--color--luminous-vivid-orange) !important;}.has-luminous-vivid-amber-background-color{background-color: var(--wp--preset--color--luminous-vivid-amber) !important;}.has-light-green-cyan-background-color{background-color: var(--wp--preset--color--light-green-cyan) !important;}.has-vivid-green-cyan-background-color{background-color: var(--wp--preset--color--vivid-green-cyan) !important;}.has-pale-cyan-blue-background-color{background-color: var(--wp--preset--color--pale-cyan-blue) !important;}.has-vivid-cyan-blue-background-color{background-color: var(--wp--preset--color--vivid-cyan-blue) !important;}.has-vivid-purple-background-color{background-color: var(--wp--preset--color--vivid-purple) !important;}.has-black-border-color{border-color: var(--wp--preset--color--black) !important;}.has-cyan-bluish-gray-border-color{border-color: var(--wp--preset--color--cyan-bluish-gray) !important;}.has-white-border-color{border-color: var(--wp--preset--color--white) !important;}.has-pale-pink-border-color{border-color: var(--wp--preset--color--pale-pink) !important;}.has-vivid-red-border-color{border-color: var(--wp--preset--color--vivid-red) !important;}.has-luminous-vivid-orange-border-color{border-color: var(--wp--preset--color--luminous-vivid-orange) !important;}.has-luminous-vivid-amber-border-color{border-color: var(--wp--preset--color--luminous-vivid-amber) !important;}.has-light-green-cyan-border-color{border-color: var(--wp--preset--color--light-green-cyan) !important;}.has-vivid-green-cyan-border-color{border-color: var(--wp--preset--color--vivid-green-cyan) !important;}.has-pale-cyan-blue-border-color{border-color: var(--wp--preset--color--pale-cyan-blue) !important;}.has-vivid-cyan-blue-border-color{border-color: var(--wp--preset--color--vivid-cyan-blue) !important;}.has-vivid-purple-border-color{border-color: var(--wp--preset--color--vivid-purple) !important;}.has-vivid-cyan-blue-to-vivid-purple-gradient-background{background: var(--wp--preset--gradient--vivid-cyan-blue-to-vivid-purple) !important;}.has-light-green-cyan-to-vivid-green-cyan-gradient-background{background: var(--wp--preset--gradient--light-green-cyan-to-vivid-green-cyan) !important;}.has-luminous-vivid-amber-to-luminous-vivid-orange-gradient-background{background: var(--wp--preset--gradient--luminous-vivid-amber-to-luminous-vivid-orange) !important;}.has-luminous-vivid-orange-to-vivid-red-gradient-background{background: var(--wp--preset--gradient--luminous-vivid-orange-to-vivid-red) !important;}.has-very-light-gray-to-cyan-bluish-gray-gradient-background{background: var(--wp--preset--gradient--very-light-gray-to-cyan-bluish-gray) !important;}.has-cool-to-warm-spectrum-gradient-background{background: var(--wp--preset--gradient--cool-to-warm-spectrum) !important;}.has-blush-light-purple-gradient-background{background: var(--wp--preset--gradient--blush-light-purple) !important;}.has-blush-bordeaux-gradient-background{background: var(--wp--preset--gradient--blush-bordeaux) !important;}.has-luminous-dusk-gradient-background{background: var(--wp--preset--gradient--luminous-dusk) !important;}.has-pale-ocean-gradient-background{background: var(--wp--preset--gradient--pale-ocean) !important;}.has-electric-grass-gradient-background{background: var(--wp--preset--gradient--electric-grass) !important;}.has-midnight-gradient-background{background: var(--wp--preset--gradient--midnight) !important;}.has-small-font-size{font-size: var(--wp--preset--font-size--small) !important;}.has-medium-font-size{font-size: var(--wp--preset--font-size--medium) !important;}.has-large-font-size{font-size: var(--wp--preset--font-size--large) !important;}.has-x-large-font-size{font-size: var(--wp--preset--font-size--x-large) !important;} :where(.wp-block-post-template.is-layout-flex){gap: 1.25em;}:where(.wp-block-post-template.is-layout-grid){gap: 1.25em;} :where(.wp-block-columns.is-layout-flex){gap: 2em;}:where(.wp-block-columns.is-layout-grid){gap: 2em;} :root :where(.wp-block-pullquote){font-size: 1.5em;line-height: 1.6;} </style> <link rel='stylesheet' id='searchwp-forms-css' href='https://s18637.pcdn.co/wp-content/plugins/searchwp/assets/css/frontend/search-forms.css?ver=4.3.16' type='text/css' media='all' /> <script type="text/javascript" src="https://s18637.pcdn.co/wp-includes/js/jquery/jquery.min.js?ver=3.7.1" id="jquery-core-js"></script> <script type="text/javascript" src="https://s18637.pcdn.co/wp-includes/js/jquery/jquery-migrate.min.js?ver=3.4.1" id="jquery-migrate-js"></script> <link rel="https://api.w.org/" href="https://www.masshelpline.com/wp-json/" /><link rel="alternate" title="JSON" type="application/json" href="https://www.masshelpline.com/wp-json/wp/v2/pages/5308" /><link rel="EditURI" type="application/rsd+xml" title="RSD" href="https://www.masshelpline.com/xmlrpc.php?rsd" /> <meta name="generator" content="WordPress 6.6.2" /> <link rel="canonical" href="https://www.masshelpline.com/chat/" /> <link rel='shortlink' href='https://www.masshelpline.com/?p=5308' /> <link rel="alternate" title="oEmbed (JSON)" type="application/json+oembed" href="https://www.masshelpline.com/wp-json/oembed/1.0/embed?url=https%3A%2F%2Fwww.masshelpline.com%2Fchat%2F" /> <link rel="alternate" title="oEmbed (XML)" type="text/xml+oembed" href="https://www.masshelpline.com/wp-json/oembed/1.0/embed?url=https%3A%2F%2Fwww.masshelpline.com%2Fchat%2F&format=xml" /> <script>document.documentElement.className += " js";</script> <link rel="icon" href="https://s18637.pcdn.co/wp-content/uploads/sites/66/favicon-1.png" sizes="32x32" /> <link rel="icon" href="https://s18637.pcdn.co/wp-content/uploads/sites/66/favicon-1.png" sizes="192x192" /> <link rel="apple-touch-icon" href="https://s18637.pcdn.co/wp-content/uploads/sites/66/favicon-1.png" /> <meta name="msapplication-TileImage" content="https://s18637.pcdn.co/wp-content/uploads/sites/66/favicon-1.png" /> <style type="text/css" id="wp-custom-css"> .main-hero-background { background-position: center top; } @media screen and (min-width: 768px) { #main-hero .wrapper { /* padding: 448px 15px 70px 55px; */ } } /* AUX BAR */ #main-header .wrapper { overflow: auto; } #aux-nav a { margin-left: 0px; } #aux-nav ul { display: inline-block; } #aux-nav .search input { padding-left: 10px; font-size: 1em; } li#menu-item-5410 { border: 1px solid #ffc526 !important; } li#menu-item-5410 a { color: #ffc526 !important; } /* RED ALERT BAR */ .header-alert { background: #B30000; line-height: 40px; text-align: center; margin-top: 0; color: #fff; } .header-alert a { color: #fff !important; } /* TRANSLATEPRESS */ .gtranslate_wrapper { display: inline-flex; width: 175px; float: left; } .gtranslate_wrapper .gt_switcher .gt_selected a { font-size: 1em; padding: 7px 5px !important; color: #444 !important; } .switcher .selected a, .gt_switcher .gt_option a { color: #000 !important; } #pojo-a11y-toolbar {top: 155px !important;} #pojo-a11y-toolbar .pojo-a11y-toolbar-overlay ul.pojo-a11y-toolbar-items li.pojo-a11y-toolbar-item a .pojo-a11y-toolbar-text { font-size: 1em; } #pojo-a11y-toolbar > div.pojo-a11y-toolbar-toggle > a > svg { visibility: hidden!important; } #pojo-a11y-toolbar .pojo-a11y-toolbar-toggle a { background-image: url(https://s18637.pcdn.co/wp-content/themes/mahelpline/images/gear-solid.svg); background-size: 35px 35px; background-repeat: no-repeat; background-position: center; } body.pojo-a11y-resize-font-200, body.pojo-a11y-resize-font-200 p:not(.pojo-a11y-toolbar-title), body.pojo-a11y-resize-font-200 li:not(.pojo-a11y-toolbar-item), body.pojo-a11y-resize-font-200 label, body.pojo-a11y-resize-font-200 input, body.pojo-a11y-resize-font-200 select, body.pojo-a11y-resize-font-200 textarea, body.pojo-a11y-resize-font-200 legend, body.pojo-a11y-resize-font-200 code, body.pojo-a11y-resize-font-200 pre, body.pojo-a11y-resize-font-200 dd, body.pojo-a11y-resize-font-200 dt, body.pojo-a11y-resize-font-200 span, body.pojo-a11y-resize-font-200 blockquote, body.pojo-a11y-resize-font-200 h1, body.pojo-a11y-resize-font-200 h2, body.pojo-a11y-resize-font-200 h3, body.pojo-a11y-resize-font-200 h4, body.pojo-a11y-resize-font-200 h5, body.pojo-a11y-resize-font-200 h6, body.pojo-a11y-resize-font-200 h1 span, body.pojo-a11y-resize-font-200 h2 span, body.pojo-a11y-resize-font-200 h3 span, body.pojo-a11y-resize-font-200 h4 span, body.pojo-a11y-resize-font-200 h5 span, body.pojo-a11y-resize-font-200 h6 span, body.pojo-a11y-resize-font-190, body.pojo-a11y-resize-font-190 p:not(.pojo-a11y-toolbar-title), body.pojo-a11y-resize-font-190 li:not(.pojo-a11y-toolbar-item), body.pojo-a11y-resize-font-190 label, body.pojo-a11y-resize-font-190 input, body.pojo-a11y-resize-font-190 select, body.pojo-a11y-resize-font-190 textarea, body.pojo-a11y-resize-font-190 legend, body.pojo-a11y-resize-font-190 code, body.pojo-a11y-resize-font-190 pre, body.pojo-a11y-resize-font-190 dd, body.pojo-a11y-resize-font-190 dt, body.pojo-a11y-resize-font-190 span, body.pojo-a11y-resize-font-190 blockquote, body.pojo-a11y-resize-font-190 h1, body.pojo-a11y-resize-font-190 h2, body.pojo-a11y-resize-font-190 h3, body.pojo-a11y-resize-font-190 h4, body.pojo-a11y-resize-font-190 h5, body.pojo-a11y-resize-font-190 h6, body.pojo-a11y-resize-font-190 h1 span, body.pojo-a11y-resize-font-190 h2 span, body.pojo-a11y-resize-font-190 h3 span, body.pojo-a11y-resize-font-190 h4 span, body.pojo-a11y-resize-font-190 h5 span, body.pojo-a11y-resize-font-190 h6 span, body.pojo-a11y-resize-font-180, body.pojo-a11y-resize-font-180 p:not(.pojo-a11y-toolbar-title), body.pojo-a11y-resize-font-180 li:not(.pojo-a11y-toolbar-item), body.pojo-a11y-resize-font-180 label, body.pojo-a11y-resize-font-180 input, body.pojo-a11y-resize-font-180 select, body.pojo-a11y-resize-font-180 textarea, body.pojo-a11y-resize-font-180 legend, body.pojo-a11y-resize-font-180 code, body.pojo-a11y-resize-font-180 pre, body.pojo-a11y-resize-font-180 dd, body.pojo-a11y-resize-font-180 dt, body.pojo-a11y-resize-font-180 span, body.pojo-a11y-resize-font-180 blockquote, body.pojo-a11y-resize-font-180 h1, body.pojo-a11y-resize-font-180 h2, body.pojo-a11y-resize-font-180 h3, body.pojo-a11y-resize-font-180 h4, body.pojo-a11y-resize-font-180 h5, body.pojo-a11y-resize-font-180 h6, body.pojo-a11y-resize-font-180 h1 span, body.pojo-a11y-resize-font-180 h2 span, body.pojo-a11y-resize-font-180 h3 span, body.pojo-a11y-resize-font-180 h4 span, body.pojo-a11y-resize-font-180 h5 span, body.pojo-a11y-resize-font-180 h6 span, body.pojo-a11y-resize-font-170, body.pojo-a11y-resize-font-170 p:not(.pojo-a11y-toolbar-title), body.pojo-a11y-resize-font-170 li:not(.pojo-a11y-toolbar-item), body.pojo-a11y-resize-font-170 label, body.pojo-a11y-resize-font-170 input, body.pojo-a11y-resize-font-170 select, body.pojo-a11y-resize-font-170 textarea, body.pojo-a11y-resize-font-170 legend, body.pojo-a11y-resize-font-170 code, body.pojo-a11y-resize-font-170 pre, body.pojo-a11y-resize-font-170 dd, body.pojo-a11y-resize-font-170 dt, body.pojo-a11y-resize-font-170 span, body.pojo-a11y-resize-font-170 blockquote, body.pojo-a11y-resize-font-170 h1, body.pojo-a11y-resize-font-170 h2, body.pojo-a11y-resize-font-170 h3, body.pojo-a11y-resize-font-170 h4, body.pojo-a11y-resize-font-170 h5, body.pojo-a11y-resize-font-170 h6, body.pojo-a11y-resize-font-170 h1 span, body.pojo-a11y-resize-font-170 h2 span, body.pojo-a11y-resize-font-170 h3 span, body.pojo-a11y-resize-font-170 h4 span, body.pojo-a11y-resize-font-170 h5 span, body.pojo-a11y-resize-font-170 h6 span, body.pojo-a11y-resize-font-160, body.pojo-a11y-resize-font-160 p:not(.pojo-a11y-toolbar-title), body.pojo-a11y-resize-font-160 li:not(.pojo-a11y-toolbar-item), body.pojo-a11y-resize-font-160 label, body.pojo-a11y-resize-font-160 input, body.pojo-a11y-resize-font-160 select, body.pojo-a11y-resize-font-160 textarea, body.pojo-a11y-resize-font-160 legend, body.pojo-a11y-resize-font-160 code, body.pojo-a11y-resize-font-160 pre, body.pojo-a11y-resize-font-160 dd, body.pojo-a11y-resize-font-160 dt, body.pojo-a11y-resize-font-160 span, body.pojo-a11y-resize-font-160 blockquote, body.pojo-a11y-resize-font-160 h1, body.pojo-a11y-resize-font-160 h2, body.pojo-a11y-resize-font-160 h3, body.pojo-a11y-resize-font-160 h4, body.pojo-a11y-resize-font-160 h5, body.pojo-a11y-resize-font-160 h6, body.pojo-a11y-resize-font-160 h1 span, body.pojo-a11y-resize-font-160 h2 span, body.pojo-a11y-resize-font-160 h3 span, body.pojo-a11y-resize-font-160 h4 span, body.pojo-a11y-resize-font-160 h5 span, body.pojo-a11y-resize-font-160 h6 span, body.pojo-a11y-resize-font-150, body.pojo-a11y-resize-font-150 p:not(.pojo-a11y-toolbar-title), body.pojo-a11y-resize-font-150 li:not(.pojo-a11y-toolbar-item), body.pojo-a11y-resize-font-150 label, body.pojo-a11y-resize-font-150 input, body.pojo-a11y-resize-font-150 select, body.pojo-a11y-resize-font-150 textarea, body.pojo-a11y-resize-font-150 legend, body.pojo-a11y-resize-font-150 code, body.pojo-a11y-resize-font-150 pre, body.pojo-a11y-resize-font-150 dd, body.pojo-a11y-resize-font-150 dt, body.pojo-a11y-resize-font-150 span, body.pojo-a11y-resize-font-150 blockquote, body.pojo-a11y-resize-font-150 h1, body.pojo-a11y-resize-font-150 h2, body.pojo-a11y-resize-font-150 h3, body.pojo-a11y-resize-font-150 h4, body.pojo-a11y-resize-font-150 h5, body.pojo-a11y-resize-font-150 h6, body.pojo-a11y-resize-font-150 h1 span, body.pojo-a11y-resize-font-150 h2 span, body.pojo-a11y-resize-font-150 h3 span, body.pojo-a11y-resize-font-150 h4 span, body.pojo-a11y-resize-font-150 h5 span, body.pojo-a11y-resize-font-150 h6 span, body.pojo-a11y-resize-font-140, body.pojo-a11y-resize-font-140 p:not(.pojo-a11y-toolbar-title), body.pojo-a11y-resize-font-140 li:not(.pojo-a11y-toolbar-item), body.pojo-a11y-resize-font-140 label, body.pojo-a11y-resize-font-140 input, body.pojo-a11y-resize-font-140 select, body.pojo-a11y-resize-font-140 textarea, body.pojo-a11y-resize-font-140 legend, body.pojo-a11y-resize-font-140 code, body.pojo-a11y-resize-font-140 pre, body.pojo-a11y-resize-font-140 dd, body.pojo-a11y-resize-font-140 dt, body.pojo-a11y-resize-font-140 span, body.pojo-a11y-resize-font-140 blockquote, body.pojo-a11y-resize-font-140 h1, body.pojo-a11y-resize-font-140 h2, body.pojo-a11y-resize-font-140 h3, body.pojo-a11y-resize-font-140 h4, body.pojo-a11y-resize-font-140 h5, body.pojo-a11y-resize-font-140 h6, body.pojo-a11y-resize-font-140 h1 span, body.pojo-a11y-resize-font-140 h2 span, body.pojo-a11y-resize-font-140 h3 span, body.pojo-a11y-resize-font-140 h4 span, body.pojo-a11y-resize-font-140 h5 span, body.pojo-a11y-resize-font-140 h6 span, body.pojo-a11y-resize-font-130, body.pojo-a11y-resize-font-130 p:not(.pojo-a11y-toolbar-title), body.pojo-a11y-resize-font-130 li:not(.pojo-a11y-toolbar-item), body.pojo-a11y-resize-font-130 label, body.pojo-a11y-resize-font-130 input, body.pojo-a11y-resize-font-130 select, body.pojo-a11y-resize-font-130 textarea, body.pojo-a11y-resize-font-130 legend, body.pojo-a11y-resize-font-130 code, body.pojo-a11y-resize-font-130 pre, body.pojo-a11y-resize-font-130 dd, body.pojo-a11y-resize-font-130 dt, body.pojo-a11y-resize-font-130 span, body.pojo-a11y-resize-font-130 blockquote, body.pojo-a11y-resize-font-130 h1, body.pojo-a11y-resize-font-130 h2, body.pojo-a11y-resize-font-130 h3, body.pojo-a11y-resize-font-130 h4, body.pojo-a11y-resize-font-130 h5, body.pojo-a11y-resize-font-130 h6, body.pojo-a11y-resize-font-130 h1 span, body.pojo-a11y-resize-font-130 h2 span, body.pojo-a11y-resize-font-130 h3 span, body.pojo-a11y-resize-font-130 h4 span, body.pojo-a11y-resize-font-130 h5 span, body.pojo-a11y-resize-font-130 h6 span, body.pojo-a11y-resize-font-120, body.pojo-a11y-resize-font-120 p:not(.pojo-a11y-toolbar-title), body.pojo-a11y-resize-font-120 li:not(.pojo-a11y-toolbar-item), body.pojo-a11y-resize-font-120 label, body.pojo-a11y-resize-font-120 input, body.pojo-a11y-resize-font-120 select, body.pojo-a11y-resize-font-120 textarea, body.pojo-a11y-resize-font-120 legend, body.pojo-a11y-resize-font-120 code, body.pojo-a11y-resize-font-120 pre, body.pojo-a11y-resize-font-120 dd, body.pojo-a11y-resize-font-120 dt, body.pojo-a11y-resize-font-120 span, body.pojo-a11y-resize-font-120 blockquote, body.pojo-a11y-resize-font-120 h1, body.pojo-a11y-resize-font-120 h2, body.pojo-a11y-resize-font-120 h3, body.pojo-a11y-resize-font-120 h4, body.pojo-a11y-resize-font-120 h5, body.pojo-a11y-resize-font-120 h6, body.pojo-a11y-resize-font-120 h1 span, body.pojo-a11y-resize-font-120 h2 span, body.pojo-a11y-resize-font-120 h3 span, body.pojo-a11y-resize-font-120 h4 span, body.pojo-a11y-resize-font-120 h5 span, body.pojo-a11y-resize-font-120 h6 span { line-height: normal !important; } </style> <script src="https://s18637.pcdn.co/wp-content/themes/mahelpline/js/modernizr.js"></script> <script src="https://s18637.pcdn.co/wp-content/themes/mahelpline/js/jquery.bxslider.min.js"></script> <!-- SweetAlert 2 --> <script src="https://cdn.jsdelivr.net/sweetalert2/6.6.2/sweetalert2.min.js"></script> <link rel="stylesheet" href="https://cdn.jsdelivr.net/sweetalert2/6.6.2/sweetalert2.min.css"> <!-- Include a polyfill for ES6 Promises (optional) for IE11 and Android browser --> <script src="https://cdnjs.cloudflare.com/ajax/libs/core-js/2.4.1/core.js"></script> <!-- end SweetAlert 2 --> <script src="https://s18637.pcdn.co/wp-content/themes/mahelpline/js/main.js?v=1.3"></script> <script src="//use.typekit.net/bfl7yzy.js"></script> <script>try{Typekit.load();}catch(e){}</script> <script>console.log('env: prod');</script><script>console.log('apitoken from function: eyJhbGciOiJSUzI1NiIsImtpZCI6IlNpZ25pbmdDZXJ0IiwieDV0IjoiMnlBQlowRDdSODMzQ0hSdmNDT2NpT1Nmd3RNIiwicGkuYXRtIjoiY295bSIsInR5cCI6IkpXVCJ9.eyJzY29wZSI6IiIsImNsaWVudF9pZCI6IkdlbmVzeXNfQ1JYT0FVVEgiLCJpc3MiOiJodHRwczovL3NlY3VyZWZlZC5hbnRoZW1pbmMuY29tIiwiYXVkIjoiaHR0cHM6Ly9zZWN1cmVmZWQuYW50aGVtaW5jLmNvbSIsImp0aSI6Im1KQWRCeDhPZEVaZHBVSHRWb09xT2JNeUh6MzlaamdEIiwiZXhwIjoxNzMyNjkyNjA1fQ.i1h_T7QN8gbeF5brxgXve2yqNfJ4ORV17Vq_IEUDsv309Z3B4TfZwePs0QJE0zbL-d5I0q_UTg6Uoa0tc7w_GctPmjIMDTBATVXfNuryrQ10ugf4wHJJgulXNdp0M3rBIEsNeBfIdzVN8xDd7SMeO085dAbecgmQOZSlIriYaT_8UEGqggOFdapXx0-lnPfQ5vAM4C02c3uy9pnrW-t4pNKB9d_JfhZ0tu_z9jzToNtUYqfpmMq-_aH3xUpiTvJuyYIfls_Cv1Y-nQJWyQHcLyfD1_JWvqFyGVzYVrDaBddOJYp_iApn-eAWMQSV7rYE0u_dW_BSefhdOJMLRdgApw');</script><script>console.log('2apiurldat: https://api.carelonrx.com/v1/ivr/getdata');</script><script>console.log('2apikey: TLLUAtV1OzuBI6j0tnByCcxddeq0IWJD');</script><script>console.log('2apitoken: eyJhbGciOiJSUzI1NiIsImtpZCI6IlNpZ25pbmdDZXJ0IiwieDV0IjoiMnlBQlowRDdSODMzQ0hSdmNDT2NpT1Nmd3RNIiwicGkuYXRtIjoiY295bSIsInR5cCI6IkpXVCJ9.eyJzY29wZSI6IiIsImNsaWVudF9pZCI6IkdlbmVzeXNfQ1JYT0FVVEgiLCJpc3MiOiJodHRwczovL3NlY3VyZWZlZC5hbnRoZW1pbmMuY29tIiwiYXVkIjoiaHR0cHM6Ly9zZWN1cmVmZWQuYW50aGVtaW5jLmNvbSIsImp0aSI6Im1KQWRCeDhPZEVaZHBVSHRWb09xT2JNeUh6MzlaamdEIiwiZXhwIjoxNzMyNjkyNjA1fQ.i1h_T7QN8gbeF5brxgXve2yqNfJ4ORV17Vq_IEUDsv309Z3B4TfZwePs0QJE0zbL-d5I0q_UTg6Uoa0tc7w_GctPmjIMDTBATVXfNuryrQ10ugf4wHJJgulXNdp0M3rBIEsNeBfIdzVN8xDd7SMeO085dAbecgmQOZSlIriYaT_8UEGqggOFdapXx0-lnPfQ5vAM4C02c3uy9pnrW-t4pNKB9d_JfhZ0tu_z9jzToNtUYqfpmMq-_aH3xUpiTvJuyYIfls_Cv1Y-nQJWyQHcLyfD1_JWvqFyGVzYVrDaBddOJYp_iApn-eAWMQSV7rYE0u_dW_BSefhdOJMLRdgApw');</script><script>console.log('2lob: bhhl');</script><script>console.log('Response2: {"Flow.HOO_Data":"Open","Config":"usw2|3b3559da-c856-42f6-9e89-e4a4d3147bc0|https://apps.usw2.pure.cloud/genesys-bootstrap/genesys.min.js"}');</script><script>console.log('Get Data: Successful response: Continue...');</script><script>console.log('resp22: {"Flow.HOO_Data":"Open","Config":"usw2|3b3559da-c856-42f6-9e89-e4a4d3147bc0|https://apps.usw2.pure.cloud/genesys-bootstrap/genesys.min.js"}');</script> <script type="text/javascript"> //check if open or closed and show widget if open //set local storage on window open - (session started) //logic to show/hide ct or gen prior to 2/15 //hide form and blue trigger on page refresh if conversation is already in progress. jQuery(window).on("load", function($){ }) jQuery(document).ready(function($){ function isJsonString(str) { try { JSON.parse(str); } catch (e) { return false; } return true; } function toggleMessenger(){ const $openchat = $("#gen-main"); const $genchat = $("#genCtrl"); const $chatdesc = $(".chat-header-title"); const closedchat = ""; const errorchat = ""; const GEN_OPEN = "Open"; const GEN_CLOSED = "Closed"; let hidechat = false; var gcr = 'PRD'; var txt; var obj; /* obj="{"Flow.HOO_Data":"Open","Config":"usw2|3b3559da-c856-42f6-9e89-e4a4d3147bc0|https://apps.usw2.pure.cloud/genesys-bootstrap/genesys.min.js"}"; const x=obj.split('|')[1]; const y=obj.split('|')[0]; const z=obj.split('|')[2];// Process the response data here */ txt='{"Flow.HOO_Data":"Open","Config":"usw2|3b3559da-c856-42f6-9e89-e4a4d3147bc0|https://apps.usw2.pure.cloud/genesys-bootstrap/genesys.min.js"}'; if(isJsonString(txt)){ obj=JSON.parse(txt); } else { obj=''; } console.log("Grabbing queue status."); console.log(obj["Flow.HOO_Data"]); console.log("Currently"); console.log("GCR: "+gcr); if(obj["Flow.HOO_Data"]=="Open" && gcr){ //queue open //show chatImage document.getElementById("chatImage").style.display = "block"; //$("#chatImage").show(); const x=obj["Config"].split('|')[1]; const y=obj["Config"].split('|')[0]; const z=obj["Config"].split('|')[2];// Process the response data here // Example: Logging the data to the console console.log("x: "+x); console.log("y: "+y); console.log("z: "+z); (function (g, e, n, es, ys) { g['_genesysJs'] = e; g[e] = g[e] || function () { (g[e].q = g[e].q || []).push(arguments) }; g[e].t = 1 * new Date(); g[e].c = es; ys = document.createElement('script'); ys.async = 1; ys.src = n; ys.charset = 'utf-8'; document.head.appendChild(ys); //hidechat = true; })(window, 'Genesys', z, { environment: y, deploymentId: x }); } else { console.log('Chat closed. Hide chatimage.'); document.getElementById("chatImage").style.display = "none"; hideChatReplaceElements(closedchat); //$("#chatImage").hide(); //document.getElementById("chatImage").style.visibility="hidden"; //$("#chatCtrl").show(); waitForElement('#chatCtrl').then((element) => { console.log("showing ctSuite when loaded."); $("#chatCtrl").show(); //document.getElementById("chatCtrl").style.display = "block"; }); } } function hideChatReplaceElements(desc){ $(".user-fields").remove(); $(".chat-header-title")?.html("<span class='genDesc'>" + desc + "</span>"); $(".chat-header-subtitle").remove(); $("#startChat").remove(); $("#gen-main").css("min-height","auto"); $("#genCtrl").show(); /* ? */ $("#chatCtrl").show(); } toggleMessenger(); /*document.addEventListener("DOMContentLoaded", function(event){ toggleMessenger(); });*/ let opened = 0; let subscribedStarted = true; let hide = false; let firstname = document.querySelector("#fname"); let lastname = document.querySelector("#lname"); let email = document.querySelector("#email"); let phone = document.querySelector("#phone"); let postal = document.querySelector("#postal"); let button = document.querySelector("#startChat"); const $openchat = $("#gen-main"); //form const $genchat = $("#genCtrl"); //chatImg wrapper / form trigger const $chatLink = $(".ctsuite-chat"); const genFrameId = "genesys-mxg-frame"; //gen trigger iframe ID const $closeBtn = $("#closeBtn"); //form close button / down angle const genContainerFrameId = "genesys-mxg-container-frame"; const $startChat = $("#startChat"); const ctSuiteChat = "chatCtrl"; const findGenesysRoute = new URLSearchParams(window.location.search).get("gc_route"); if ($closeBtn.length > 0) { $closeBtn.on("click", function (event) { event.preventDefault(); $openchat?.hide(); }); } if ($genchat.length > 0) { $genchat.on("click", function (event) { event.preventDefault(); //window.alert("open"); loadChat(); }); } if ($chatLink.length > 0) { $chatLink.on("click", function (event) { event.preventDefault(); loadChat(); }); } waitForElement('#' + ctSuiteChat).then((element) => { logMessage("removing ctSuite when loaded."); //$("#" + ctSuiteChat).remove(); }); waitForElement('#' + genFrameId).then((element) => { resize_ob.observe(document.querySelector("#"+genFrameId)); var iframe = document.getElementById(genFrameId); if (iframe.addEventListener) { logMessage("wait for resizing"); iframe.addEventListener("resize", onResizeEvent); } }); getLocation(); function getLocation(){ if(window.navigator.geolocation){ window.navigator.geolocation.getCurrentPosition(showLocation); console.log("Getting location"); }else{ console.log("Geolocation is not supported by this browser."); } } function showLocation(position){ var latitude = position.coords.latitude; var longitude = position.coords.longitude; $("#location").html(latitude+","+longitude); $.ajax({ type:'POST', url:'/wp-content/themes/kansas/genchat/getLocation.php', data:'latitude='+latitude+'&longitude='+longitude, success:function(msg){ if(msg){ const country=msg.split('|')[1]; const region=msg.split('|')[0]; $("#chatlat").html(latitude); $("#chatlon").html(longitude); $("#chatregion").html(region); $("#chatcountry").html(country); $("#location").html("Lat: "+latitude+", Lon: "+longitude+", Region: "+region+", Country: "+country); }else{ $("#location").html('Not Available'); } } }); } function getTimezone(){ var timezone = new window.Intl.DateTimeFormat().resolvedOptions().timeZone; return timezone; } function consoleLogValues(){ console.log("FName: "+document.getElementById("fname").value); console.log("LName: "+document.getElementById("lname").value); console.log("Phone: "+document.getElementById("phone").value); console.log("Email: "+document.getElementById("email").value); console.log("Postal: "+document.getElementById("postal").value); //console.log("Subject: "+document.getElementById("subject").value); console.log("Lat: "+document.getElementById("chatlat").innerHTML); console.log("Long: "+document.getElementById("chatlon").innerHTML); console.log("Browser: "+navigator.userAgent); console.log("IP: "+"8.222.208.146"); console.log("Country: "+document.getElementById("chatcountry").innerHTML); console.log("Region: "+document.getElementById("chatregion").innerHTML); console.log("Timezone: "+getTimezone()); console.log("Websitetitle: "+document.title); console.log("Websiteorigin: "+window.location.href); console.log("LOB: bhhl"); console.log("GC_Route: PRD"); } if ($startChat.length > 0) { $startChat.on("click", function (event) { var data = { apitoken: "eyJhbGciOiJSUzI1NiIsImtpZCI6IlNpZ25pbmdDZXJ0IiwieDV0IjoiMnlBQlowRDdSODMzQ0hSdmNDT2NpT1Nmd3RNIiwicGkuYXRtIjoiY295bSIsInR5cCI6IkpXVCJ9.eyJzY29wZSI6IiIsImNsaWVudF9pZCI6IkdlbmVzeXNfQ1JYT0FVVEgiLCJpc3MiOiJodHRwczovL3NlY3VyZWZlZC5hbnRoZW1pbmMuY29tIiwiYXVkIjoiaHR0cHM6Ly9zZWN1cmVmZWQuYW50aGVtaW5jLmNvbSIsImp0aSI6Im1KQWRCeDhPZEVaZHBVSHRWb09xT2JNeUh6MzlaamdEIiwiZXhwIjoxNzMyNjkyNjA1fQ.i1h_T7QN8gbeF5brxgXve2yqNfJ4ORV17Vq_IEUDsv309Z3B4TfZwePs0QJE0zbL-d5I0q_UTg6Uoa0tc7w_GctPmjIMDTBATVXfNuryrQ10ugf4wHJJgulXNdp0M3rBIEsNeBfIdzVN8xDd7SMeO085dAbecgmQOZSlIriYaT_8UEGqggOFdapXx0-lnPfQ5vAM4C02c3uy9pnrW-t4pNKB9d_JfhZ0tu_z9jzToNtUYqfpmMq-_aH3xUpiTvJuyYIfls_Cv1Y-nQJWyQHcLyfD1_JWvqFyGVzYVrDaBddOJYp_iApn-eAWMQSV7rYE0u_dW_BSefhdOJMLRdgApw", env: "prod", fname: document.getElementById("fname").value, lname: document.getElementById("lname").value, email: document.getElementById("email").value, phone: document.getElementById("phone").value, //subject: document.getElementById("subject").value, postal: document.getElementById("postal").value, //Comes from Form Data //Comes from embedded Javascript in the portal lob: "bhhl", latitude: document.getElementById("chatlat").innerHTML, //js longitude: document.getElementById("chatlon").innerHTML, //js country: document.getElementById("chatcountry").innerHTML, //google geocode region: document.getElementById("chatregion").innerHTML, //google geocode ip: "8.222.208.146", browser: navigator.userAgent, timezone: getTimezone(), //America/New_York websiteorigin: window.location.href, websitetitle: document.title, gc_route: "PRD" //url param //gc_route: "DEV/TST/PRD" //Comes from embedded Javascript in the portal }; var stringData = JSON.stringify( data ); $.ajax({ type:'POST', url:'/wp-content/themes/mahelpline/genchat/postFormData.php', data: { data: stringData }, success:function(msg){ if(msg){ const response3=msg; $("#response3").html(response3); obj3=JSON.parse(response3); console.log('obj3 key: '+obj3["Key"]); event.preventDefault(); $openchat?.hide(); subscribeConversationCleared(); consoleLogValues(); window.Genesys("command", "Database.set", { messaging: { customAttributes: { ixn_key: obj3["Key"], phone: document.getElementById("phone").value, //subject: document.getElementById("subject").value, postal: document.getElementById("postal").value, lob: "bhhl", country: document.getElementById("chatcountry").innerHTML, region: document.getElementById("chatregion").innerHTML, ip: "8.222.208.146", browser: navigator.userAgent, timezone: getTimezone(), websiteorigin: window.location.href, websitetitle: document.title, gc_route: "PRD" } } }); openWidget(); opened = 1; } else { $("#response3").html('Invalid Response'); } } }); }); } function close_window(){ Genesys("command", "Messenger.close"); toggleMessenger(); document.getElementById("myForm").style.display = "block"; } /* new functions */ function openWidget(){ logMessage("Open widget?"); let opw = window.localStorage.getItem("opw"); if(!opw || (opw && opw !== "true")){ window.localStorage.setItem("opw","true"); window.Genesys("command", "Messenger.open", (data) => { logMessage('Widget is opened.'); }, (error) => { error ? logErrorMessage('Error: ' + error) : null; } ); showContainerFrame(); window.Genesys('subscribe', 'Messenger.opened', (e) => { logMessage("Messenger is opened."); }); } } function waitForElement(selector) { return new Promise(resolve => { if (document.querySelector(selector)) { return resolve(document.querySelector(selector)); } const observer = new MutationObserver(mutations => { if (document.querySelector(selector)) { resolve(document.querySelector(selector)); observer.disconnect(); } }); observer.observe(document.body, { childList: true, subtree: true }); }); } function onResizeEvent() { logMessage("iframe onresize"); if ($chatLink.length > 0) { $chatLink.on("click", function (event) { event.preventDefault(); hideForm(); }); } } $('#genesys-mxg-frame').click(function(){ window.alert('click'); }) const resize_ob = new window.ResizeObserver(function(entries) { let rect = entries[0].contentRect; let width = rect.width; if(width === 0){ logMessage("Width is 0."); logMessage("Try to open on start."); if(window.localStorage.getItem("clow") === "true"){ logMessage("clow is: " + window.localStorage.getItem("clow")); subscribeStartOpenWidget(); window.localStorage.setItem("clow", false); } setTimeout(function () { if(!hide){ logMessage("resize_ob"); showGenChatLinks(); } }, 2500); } else { hide = true; hideGenChatLinks(); } if(width > 0 && $chatLink.length > 0){ logMessage("iframe is ON and visible"); hideGenChatLinks(); $openchat?.hide(); $chatLink.on("click", function (event) { event.preventDefault(); hideForm(); }); window.Genesys('subscribe', 'Messenger.closed', (e) => { logMessage("Messenger is seemingly closed."); window.localStorage.setItem("clow",true); window.localStorage.setItem("opw",false); }); subscribeStartOpenWidget(); if (window.localStorage.getItem("closeGen") && window.Genesys) { window.Genesys("subscribe", "Messenger.ready", function() { window.Genesys("subscribe", "MessagingService.started", function({data}){ if(window.localStorage.getItem("closeGen")){ logMessage("Remove closeGen and force close chat."); window.localStorage.removeItem("closeGen"); sendMessage("Member has logged off."); } }); }); subscribeConversationCleared(); } } logMessage("Current Width : " + width); }); function hideForm(){ $openchat?.hide(); $genchat?.hide(); } function loadChat(){ $openchat?.show(); } function logMessage(msg){ console.log("Genesys log :: " + msg); } function logErrorMessage(msg){ console.error("Genesys error :: " + msg); } function logWarnMessage(msg){ console.warn("Genesys warning :: " + msg); } function sanitize(obj){ return DOMPurify.sanitize(obj); } function hideContainerFrame(){ if(document.getElementsByName("MessengerLauncherFrame").length > 0) { document.getElementsByName("MessengerLauncherFrame")[0].style.display="none"; } } function showContainerFrame(){ if(document.getElementsByName("MessengerLauncherFrame").length > 0) { document.getElementsByName("MessengerLauncherFrame")[0].style.display="block"; } } function hideGenChatLinks(){ logMessage("Hide gen chat form."); $genchat?.hide(); $chatLink?.hide(); } function showGenChatLinks(){ logMessage("Show gen chat form if..."); /* logMessage("Disabling start chat button"); button.disabled = true; $("#startChat").addClass("disabledButton"); if (firstname.value !== "" && lastname.value !== "" && email.value !== "" && phone.value !== "" ) { button.disabled = false; $("#startChat").removeClass("disabledButton"); logMessage("Enabling start chat button"); } firstname.addEventListener("change", enableStartChat); lastname.addEventListener("change", enableStartChat); email.addEventListener("change", enableStartChat); phone.addEventListener("change", enableStartChat); postal.addEventListener("change", enableStartChat); */ // ctsuite<>genesys switch logMessage("GC_Route: "+findGenesysRoute); if (findGenesysRoute || "PRD" !== null){ //show genesys widget logMessage("GC_Route is set. Show gen chat form."); $genchat?.show(); $chatLink?.show(); window.localStorage.removeItem("clow"); window.localStorage.removeItem("opw"); //hide ctsuites widget waitForElement('#' + ctSuiteChat).then((element) => { logMessage("removing ctSuite when loaded."); $("#" + ctSuiteChat).remove(); }); } else { logMessage("GC_Route is null. Hide gen chat form."); hideChatReplaceElements("using ctsuites"); logMessage("Hiding genesys widget."); $("#genCtrl").hide(); logMessage("Hiding genesys chat frame."); $("#genesys-mxg-frame").hide(); logMessage("Hiding genesys chat container frame.") $("#genesys-mxg-container-frame").hide(); } } function clearConversation(){ window.Genesys("command", "MessagingService.clearConversation", (data_) => { data_ ? logMessage('Conversation clearing.') : null; window.Genesys("command", "Messenger.close"); hideContainerFrame(); logMessage("clearconvo"); showGenChatLinks(); window.localStorage.setItem("clow", false); }, function(error) { error ? logErrorMessage('Error clearing conversation :: ' + error) : null; } ); } function sendMessage(msg){ window.Genesys( 'command', 'MessagingService.sendMessage', { message: msg }, (data_) => { logMessage('Message sent.'); clearConversation(); }, (error) => { logErrorMessage("Error send message :: " + error); clearConversation(); } ); } function subscribeConversationCleared(){ window.Genesys("subscribe", "MessagingService.conversationCleared", function(response){ var data = response.data; logMessage("subscription is: " + data.class); hideContainerFrame(); logMessage("subscribeConvoCleared"); showGenChatLinks(); }); } function subscribeStartOpenWidget(){ logMessage("subscribeStartOpenWidget opened : " + opened); logMessage("subscribeStartOpenWidget subscribedStarted : " + subscribedStarted); if(subscribedStarted){ window.Genesys("subscribe", "MessagingService.started", function({data}){ logMessage("Conversation started subscribed to open widget."); if(opened===0){ openWidget(); } }); subscribedStarted = false; } } function enableStartChat() { if (firstname.value !== "" && lastname.value !== "" && email.value !== "" && phone.value !== "" ) { button.disabled = false; logMessage("Enabled start chat button"); $("#startChat").removeClass("disabledButton"); } else { button.disabled = true; logMessage("Disabled start chat button"); $("#startChat").addClass("disabledButton"); } } }) </script> <link rel="stylesheet" href="https://s18637.pcdn.co/wp-content/themes/mahelpline/genchat/genChat.css?v=011"> </head> <div id="modal" class="modal"> <div class="modal-content"> <span class="close-btn">×</span> <h2 id="modal-title">Quick Exit</h2> <p id="modal-text">If you have privacy or safety concerns, press the ESC key three times to quickly exit this website. You will be redirected to Google.</p> <p class="close-txt"><u>Close</u></p> </div> </div> <body class="page-template page-template-fullwidth page-template-fullwidth-php page page-id-5308"> <a href="#container" class="sr-skip-link" title="[Skip to Content]" tabindex="1" accesskey="s">[Skip to Content]</a> <header id="mobile-header"> <a id="mobile-logo" href="https://www.masshelpline.com/" title="Massachusetts Behavioral Health Help Line" rel="home"><img src="https://s18637.pcdn.co/wp-content/themes/mahelpline/images/MBH-HelpLine-Logo.svg" style="background-color: #fff !important;" alt="Massachusetts Behavioral Health Help Line"></a> <div class="menubtn" tabindex="0" aria-label="button" role="button"></div> </header> <div id="mobilenav"> <ul id="menu-mobile-nav" class="menu"><li id="menu-item-36" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-home menu-item-36"><a href="https://www.masshelpline.com/">Home</a></li> <li id="menu-item-33" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-33"><a href="https://www.masshelpline.com/how-we-can-help/">How We Can Help</a></li> <li id="menu-item-5472" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-5472"><a href="https://www.masshelpline.com/faq/">FAQ</a></li> <li id="menu-item-5570" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-5570"><a href="https://www.masshelpline.com/resources/">Resources</a></li> <li id="menu-item-5471" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-5471"><a href="https://www.masshelpline.com/contact/">Contact</a></li> <li id="menu-item-5547" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-5547"><a href="https://www.masshelpline.com/in-a-crisis/">In a Crisis?</a></li> </ul> <div class="wrapper" style="padding: 20px;"> <form name="wasearchform" action="https://www.masshelpline.com/" method="get" class="navbar-form navbar-right search" role="search"> <input type="Search" placeholder="Search..." title="Search" id="searchField" name="s" class="form-control-search searchField mac-style" aria-label="desktop search" style="width: 100%;" /> <button class="btn btn-info" aria-label="desktop search" style="display:none" aria-label="search"><span><i class="fa fa-search" role="search"></i></span></button> </form> </div> </div> <header id="main-header" role="banner"> <nav id="aux-nav" role="presentation"> <div class="wrapper"> <div class="gtranslate_wrapper" id="gt-wrapper-31370960"></div> <ul id="menu-aux-nav" class="menu"><li id="menu-item-5654" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-5654"><a href="https://www.masshelpline.com/resources/bhhlresourcedirectory/">BHHL Resource Directory</a></li> <li id="menu-item-5655" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-5655"><a href="https://s-us.chkmkt.com/?e=365251&d=l&h=4FD610BC164E15C">Feedback Portal</a></li> <li id="menu-item-5410" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-5410"><a href="https://www.masshelpline.com/in-a-crisis/">In a Crisis?</a></li> </ul> <form name="wasearchform" action="https://www.masshelpline.com/" method="get" class="navbar-form navbar-right search" role="search"> <input type="Search" placeholder="Search..." title="Search" id="searchField" name="s" class="form-control-search searchField mac-style" aria-label="mobile search" /> <button class="btn btn-info" aria-label="mobile search"><span><i class="fa fa-search" role="search"></i></span></button> </form> </div> </nav> <div class="wrapper"> <a href="https://www.masshelpline.com/" id="logo" rel="home" title="Massachusetts Behavioral Health Help Line"><img src="https://s18637.pcdn.co/wp-content/themes/mahelpline/images/MBH-HelpLine-Logo.svg" style="background-color: #fff !important;" alt="Massachusetts Behavioral Health Help Line"></a> <nav id="main-nav" role="navigation" style="float:none;"> <ul id="menu-main-menu" class="menu"><li id="menu-item-26" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-home menu-item-26"><a href="https://www.masshelpline.com/">Home</a></li> <li id="menu-item-27" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-27"><a href="https://www.masshelpline.com/how-we-can-help/">How We Can Help</a></li> <li id="menu-item-24" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-24"><a href="https://www.masshelpline.com/faq/">FAQ</a></li> <li id="menu-item-5571" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-5571"><a href="https://www.masshelpline.com/resources/">Resources</a></li> <li id="menu-item-5267" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-5267"><a href="https://www.masshelpline.com/contact/">Contact</a></li> </ul> </nav> </div> </header> <section id="container"> <!-- <div class="header-alert" style="line-height:1.2em; padding:20px;"> <div class="wrapper"> <span>Text and chat systems will be offline Sunday, February 4th<br> from approximately 6AM to 8AM for maintenance.<br><br>During this time, if you need urgent assistance, please call the BHHL number at <a href="tel:833-773-2445">833-773-2445</a>. If you feel that your safety or the safety of someone else is in immediate danger, please call 911 for assistance.</span> </div> </div> <div class="header-alert"> <div class="wrapper"> <span>Our text/chat function is temporarily unavailable. 聽Please call the BHHL number <a href="tel:833-773-2445"><strong>833-773-2445</strong></a>.</span> </div> </div> --><section id="main-content" class="full-width" role="main"> <div class="wrapper"> <article id="page-5308" class="full-column"> <div id="breadcrumbs"><span itemscope itemtype="http://data-vocabulary.org/Breadcrumb"><a href="https://www.masshelpline.com/" itemprop="url"><span itemprop="title">Home</span></a></span> <span class="seperator">/</span> <span class="current">Chat</span></div> <h1 class="entry-title">Chat</h1> <div class="entry-content"> <div id="onpagechat"></div> <script> (function($) { $(function() { setTimeout(function () { $("#divChatBox").show(); $(".chatbox_topBar").hide(); $("#chatCtrl").toggle(); $("#divChatBox").appendTo("#onpagechat").css('position','inherit'); $("#divChatBox").height(505); $("#divChatBox iframe").height(502); }, 1000); }); })(jQuery); </script> </div> </article> </div> </section> <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous"> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js" crossorigin="anonymous"></script> <script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js" integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo" crossorigin="anonymous"></script> <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js" integrity="sha384-wfSDF2E50Y2D1uUdj0O3uMBJnjuUD4Ih7YwaYd1iqfktj0Uod8GCExl3Og8ifwB6" crossorigin="anonymous"></script> <script src="https://www.google.com/recaptcha/api.js" async defer></script> <!-- FontAwesome --> <link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.13.0/css/fontawesome.min.css" rel="stylesheet"> <link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.13.0/css/brands.min.css" rel="stylesheet"> <link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.13.0/css/solid.min.css" rel="stylesheet"> <!-- Reset Styles --> <link rel="stylesheet" type="text/css" href="https://s18637.pcdn.co/wp-content/themes/mahelpline/style.css?v=1.269" /> <link rel="stylesheet" type="text/css" href="https://s18637.pcdn.co/wp-content/themes/mahelpline/style.css?v=1.269" /> <style> /*Field Styling Overrides*/ .container_center { width: 50%; border: 1px solid #000; margin: 40px auto; padding: 25px 25px 20px 25px; } select.form-control { -webkit-appearance: menulist-button; -moz-appearance: menulist-button; appearance: menulist-button; border: 1px solid #999; padding: 5px; line-height: 14px; } textarea.form-control { border: 1px solid #999; line-height: 14px; padding: 5px; } .form-group.required label:after, .form-group.required .fauxlabel:after { content: "*"; color: red; } .invalid-feedback { line-height: 16px; } .alert { margin-bottom: 5px; } /*Buttons*/ .button-wrapper { padding-top: 25px; } /*Divider*/ legend { margin: 20px 0px; padding: 10px 0px; border: 0px; border-top-width: 2px; border-bottom-width: 2px; border-style: solid; border-color: #ccc; } #recaptcha-error { display: none; padding: 10px; max-width: 400px; line-height: 1.2em; margin-top: 5px; color: #fff !important; } </style> <hr style="margin-bottom: 0px; border-color: #cccccc;"> <iframe style="display:none;" name="my_iframe"></iframe> <div class="container form-wrapper"> <div class="row"> <div class="col-lg-7 container_center"> <form id="feedback-form" action="https://formservices.beaconhealthoptions.com/SelfServiceEAP/email/sendEmail.do" method="POST" class="needs-validation" target="my_iframe" enctype="multipart/form-data"> <input type="hidden" name="mailsubject" value=""> <input type="hidden" name="mailmessage" value="This was submitted from the Feedback Form on masshelpline.com"> <input type="hidden" name="formmailcaseid" value="130"> <!--129stg/130prod--> <input type="hidden" id="fieldorder" name="fieldorder" value=""> <fieldset class="field1 current"> <legend>Help Us Improve masshelpline.com</legend> <div class="form-row"> <div class="form-group col-12 "> <span>Did you find what you were looking for on this website?</span><br> <input type="radio" name="Did you find what you were looking for on this website?" value="Yes" id="feedback-yes" required> <label for="feedback-yes">Yes</label> <input type="radio" name="Did you find what you were looking for on this website?" value="No" id="feedback-no" style="margin-left: 30px;" required> <label for="feedback-no">No</label> <div class="invalid-feedback"> Please fill in this field </div> </div> </div> <div class="form-group" id="textboxes" style="display: none"> <label for="comments">Comments</label> <textarea rows="5" class="form-control" id="comments" name="Comments" title="comments" required></textarea> <div class="invalid-feedback"> Please fill in this field </div><br> <div id="recaptcha-row" class="required"> <div class="g-recaptcha" data-sitekey="6LeSJdEmAAAAAH8wH4ClsNVgMti3bzM43AZhiFa5"></div> <div class="alert bg-danger text-danger" id="recaptcha-error">Please complete the reCAPTCHA challenge field above.</div> </div> <div class="button-wrapper"> <input type="submit" onclick="sendAjaxRequest()" value="submit" class="submit btn action-button" /> <br><br> <span class="row col-12"><em>This feedback is only gathered for improving the website. If you need connection to mental health or substance use treatment, please contact the <strong>Behavioral Health Help Line at 833-773-2445</strong>.</em></span> </div> </div> </fieldset> </form> <div id="submit-success" class="form-status" style="display:none;"> <div class="alert alert-success">Your form was successfully completed.</div> </div> <div id="submit-fail" class="form-status" style="display:none;"> <div class="alert alert-danger">Your submission failed.<br> Please check your entry and try again. If you continue to receive this error, please contact support.</div> </div> </div> </div> </div> <script> jQuery(document).ready(function ($) { //$( document ).ready(function() { // hide elements $('.form-status').hide(); // VALIDATION function bsvalidate() { // Fetch all the forms we want to apply custom Bootstrap validation styles to var forms = document.getElementsByClassName('needs-validation'); var formvalid = true; // Loop over them and prevent submission var validation = Array.prototype.filter.call(forms, function (form) { if (form.checkValidity() === false) { event.preventDefault(); event.stopPropagation(); formvalid = false; } form.classList.add('was-validated'); }); return formvalid; } // MULTI-STEP $('.submit').click(function () { //window.alert('review!'); //$("#grievance-form").bootstrapValidator('validate'); console.log('validate'); if (!bsvalidate()) { //window.alert('review invalid!'); //scroll to first :invalid form-control window.setTimeout(function () { var errors = $('.form-control:invalid'); var form = $('form#feedback-form'); if (errors.length) { form.find('.form-control:invalid').first().focus(); } //$('.form-control:invalid:first-of-type').focus(); }, 0); } else { //window.alert('review - else!'); var formValues = []; var fileid = ''; var fileval = ''; var forder = ''; var fcount = 0; // get values from inputs in first fieldset $('.field1 :input').each(function () { console.log("field name: ", $(this).attr('name')); if (!$(this).attr('name')) { //do nothing } else if ($(this).attr('name') == 'files') { //collect for review page fileid = $(this).attr('id'); console.log("fileid: ", fileid); console.log("field value: ", document.getElementById(fileid).files[0]); if (document.getElementById(fileid).files[0]) { fileval = document.getElementById(fileid).files[0].name; formValues.push(fileval); } else { fileval = ''; formValues.push(fileval); } } else if ($(this).attr('type') == 'radio' && !$(this).is(':checked')) { console.log('radio unchecked'); formValues.push($(this).val()); } else if ($(this).attr('type') == 'checkbox' && !$(this).is(':checked')) { console.log('checkbox unchecked'); formValues.push($(this).val()); } else if ($(this).hasClass('hideblank') && $(this).is(":hidden")) { console.log('hidden field - disable'); $(this).prop("disabled", true); formValues.push($(this).val()); } else { //collect for review page formValues.push($(this).val()); //collect for fieldorder fcount++; if (fcount === 1) { forder = forder.concat($(this).attr('name')); } else { forder = forder.concat(',' + $(this).attr('name')); } } }); console.log("formValues: ", formValues); console.log("forder: ", forder); // set values in second fieldset $('.field1 :input').each(function (index) { if (formValues[index]) { $(this).val(formValues[index]); } }); // get and set check radio buttons $('.field1 input[type="radio"]').each(function () { if ($(this).is(':checked')) { var radioid = $(this).attr('id'); var reviewid = '#feedback-' + radioid; console.log('reviewid: ' + reviewid); $(reviewid).prop('checked', true); } }); //set fieldorder value $('input#fieldorder').val(forder); } }); //** Handle Form Submission Response ** // This event hander will listen for messages from the child var childWindow; window.addEventListener('message', function (e) { processChildMessage(e.data); // e.data hold the message }, false); function processChildMessage(message) { //alert(message); console.log("message: " + message); if (message == 'SUCCESS') { $('form').hide(); $('#submit-success').show(); } else if (message == 'FAILED') { $('#submit-fail').show(); } else { //do nothing } } function test() { childWindow.postMessage('Hello?', '*'); } }); $('input[name="Did you find what you were looking for on this website?"]').on('click', function () { if ($(this).val() == 'Yes' || 'No') { $('#textboxes').show(); } else { $('#textboxes').hide(); } }); /** GRECAPTCHA **/ function sendAjaxRequest() { $("form").submit(function (event) { var recaptcha = $("#g-recaptcha-response").val(); if (recaptcha === "") { event.preventDefault(); event.stopImmediatePropagation() $("#recaptcha-error").show(); return; } }); if (grecaptcha === undefined) { alert('Recaptcha not defined'); return; } var response = grecaptcha.getResponse(); var ajax = new XMLHttpRequest(); ajax.onreadystatechange = function () { if (this.readyState === 4) { if (this.status === 200) { } } } ajax.open('POST', '/wp-content/themes/mahelpline/recaptcha-verify.php', true); ajax.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); ajax.send('recaptcha=' + response); } </script> <div id="copyright"> <div class="wrapper"> <div class="left_footer" style="display: block; "> <img src="https://s18637.pcdn.co/wp-content/uploads/sites/66/International-Council-for-Helplines-Accreditation-Emblem.png" style="width: 58px; margin: -3px 0px -17px;"> </div> <div class="right_footer" style="display: block;"> <span>Copyright © 2024 Massachusetts Behavioral Health Help Line. All rights reserved. <ul id="menu-footer-links" class="menu"><li id="menu-item-5360" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-5360"><a href="https://www.masshelpline.com/sitemap/">Sitemap</a></li> <li id="menu-item-193" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-193"><a href="https://www.masshelpline.com/privacy-policy/">Privacy Policy</a></li> <li id="menu-item-201" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-201"><a href="https://www.masshelpline.com/terms-conditions/">Terms & Conditions</a></li> <li id="menu-item-204" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-204"><a href="https://get.adobe.com/reader/">Download Acrobat Reader</a></li> <li id="menu-item-192" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-192"><a href="https://www.masshelpline.com/accessibility-information/">Accessibility Information</a></li> </ul> </span> </div> </div> </div> </section> <script type="text/javascript" id="gt_widget_script_31370960-js-before"> /* <![CDATA[ */ window.gtranslateSettings = /* document.write */ window.gtranslateSettings || {};window.gtranslateSettings['31370960'] = {"default_language":"en","languages":["en","es","fr","ar","de","zh-CN","it","pt","nl","ru","hy","bn","ja","ko","fa","pl","pa","vi"],"url_structure":"sub_directory","native_language_names":1,"flag_style":"3d","flag_size":24,"wrapper_selector":"#gt-wrapper-31370960","alt_flags":{"en":"usa"},"switcher_open_direction":"top","switcher_horizontal_position":"inline","switcher_text_color":"#666","switcher_arrow_color":"#666","switcher_border_color":"#ccc","switcher_background_color":"#fff","switcher_background_shadow_color":"#efefef","switcher_background_hover_color":"#fff","dropdown_text_color":"#000","dropdown_hover_color":"#fff","dropdown_background_color":"#eee","flags_location":"\/wp-content\/plugins\/gtranslate\/flags\/"}; /* ]]> */ </script><script src="https://s18637.pcdn.co/wp-content/plugins/gtranslate/js/dwf.js?ver=6.6.2" data-no-optimize="1" data-no-minify="1" data-gt-orig-url="/chat/" data-gt-orig-domain="www.masshelpline.com" data-gt-widget-id="31370960" defer></script><script src="https://s18637.pcdn.co/wp-content/themes/mahelpline/js/sweetalert.js?v=1.3"></script> <div id="genCtrl" class="lob-bhhl"> <div id="chatImage" class="open open-button" onclick="openForm()"><img id="chatImg" class="genchat" src="https://s18637.pcdn.co/wp-content/themes/mahelpline/genchat/message-regular-chat-black.svg" height="42"><span id="btnSpanText"></span><div id="chatProgressDiv" style="display: none;"><span>Chat in Progress</span></div></div> </div><!--/#genCtrl--> <div id="gen-main"> <div class="chat-popup lob-bhhl" id="myForm"> <div id="chat-header"> <img src="https://s18637.pcdn.co/wp-content/themes/mahelpline/genchat/downarrow-blk.png" id="chat-close" onclick="closeForm()"> <img id="chat-logo" src="https://s18637.pcdn.co/wp-content/themes/mahelpline/genchat/masshelpline-logo.svg" style="clear:both;"> <div id="chat-intro">Thanks for reaching out. We are here to help. The fields below are optional and will only be used to follow up with your permission and/or to ensure your safety.<br><br>Text/Chat is currently only available in English. Please call the BHHL at 833-773-2445 to speak with representatives for assistance in your preferred language.<br><br><strong>If you have privacy or safety concerns, delete your chat history by selecting the trash can in the top right corner when it appears.</strong></div> </div> <div id="chat-form"> <div class="chat-field"><input type="text" placeholder="First Name" id="fname" name="fname"></div> <div class="chat-field"><input type="text" id="lname" name="lname" placeholder="Last Name"></div> <div class="chat-field"><input type="email" id="email" name="email" placeholder="Email"></div> <div class="chat-field"><input type="phone" id="phone" name="phone" placeholder="Phone Number"></div> <div class="chat-field"><input type="postal" id="postal" name="postal" placeholder="Zip Code"></div> <div class="chat-field chat-submit"><button id="startChat" type="submit" class="btn">Start Chat</button></div> </div> <!--<button type="button" class="btn cancel" onclick="closeForm()">Close</button> --> </div></div> <span class="chatvar" id="chatlat"></span> <span class="chatvar" id="chatlon"></span> <span class="chatvar" id="chatregion"></span> <span class="chatvar" id="chatcountry"></span> <span class="chatvar" id="location"></span> <span class="chatvar ctsuite-chat"></span> <script> function openForm() { document.getElementById("myForm").style.display = "block"; } function closeForm() { document.getElementById("myForm").style.display = "none"; } </script> <script> (function ($) { $(function () { setTimeout(function () { //$("#divChatBox").show(); //$("#chatCtrl").toggle(); //$("#xchatCtrl").show(); }, 1000); $(".xbodychatCtrl").on("click", function () { $("#divChatBox").show($(this).attr('href')); $("#chatCtrl").show(); }); $("#xsidechatCtrl").on("click", function () { $("#divChatBox").show(); $("#chatCtrl").toggle(); //$("#xsidechatCtrl").toggle(); //$("#xsidechatCtrlClose").toggle(); }); /*$("#xchatCtrlClose").on("click",function(){ $("#divChatBox").hide(); $("#xsidechatCtrlClose").toggle(); $("#xsidechatCtrl").toggle(); $("#chatCtrl").toggle(); });*/ }); })(jQuery); </script> </body> </html>