Closes: Dec 17, 2025
";
//doc1.close();
doc1.getElementsByTagName('html')[0].class
List.add('imichatmsgpreview'); doc1.getElementById("ancclearcards"). addEventListener('click', function () {
if (parent. IMIChatInit != undefined) { parent. IMIChatInit.clearmsgcards();
} else { IMIChatInit.clearmsgcards();
} }); doc1.getElementById("greetingancclearcards").
addEventListener('click', function () { if (parent. IMIChatInit != undefined) { parent.
IMIChatInit.cleargreetingmsgcards(); } else {
IMIChatInit.cleargreetingmsgcards(); } });
document.getElementById('chatunread-frame'). style.display = "block"; this.bindGreetingMessage(msg);
IMIGeneral.store
Local("style_" + document.getElementById("divicw").get
Attribute("data-bind") + "_" + window.location.hostname, msg);
document.getElementById('chatbutton').style.display = "block";
} else {
document.getElementById("divicw").innerHTML = '';
}
} catch (e1) { }
},
bindGreetingMessage: function (data) {
if (session
Storage.get
Item("webex_engage_greetingmessage_shown") != null && session
Storage.get
Item("webex_engage_greetingmessage_shown") != undefined) {
return;
}
if (data.greetingmessage == undefined || data.greetingmessage == null || data.greetingmessage == '') {
return;
}
var node = document.create
Element("div");
var node1 = document.create
Element("div");
var textnode = document.createTextNode(IMIChatInit.extract
Content(data.greetingmessage));
node.class
Name = "msg";
node.style = "cursor:pointer;";
node.set
Attribute("tabindex", "0"); //ENG-1065 and ENG-3621 for tabindex
node1.class
Name = "msgclear"; node.id = "msg_greetingmessage"; // Create a text node node1.id = "msgclear_greetingmessage";
node1.style = "clear:both;"; node1.addEventListener('click', function () { console.log("switchicon called");
if (parent. IMIChatInit != undefined) { parent. IMIChatInit.chatswitchicon();
} else { IMIChatInit.chatswitchicon();
} }); node.addEventListener('click', function () {
console.log("switchicon called"); if (parent. IMIChatInit != undefined) { parent.
IMIChatInit.chatswitchicon(); } else {
IMIChatInit.chatswitchicon(); } });
node1.addEventListener('keydown', function (e) { if (e.which != 13) return;
console.log("switchicon called via keydown"); e.stop
Propagation();
e.prevent
Default();
node1.click();
});
node.addEventListener('keydown', function (e) {
if (e.which != 13)
return;
console.log("switchicon called via keydown");
e.stop
Propagation();
e.prevent
Default();
node.click();
});
var span = document.create
Element("span");
span.innerHTML = '';
node.append
Child(span);
node.append
Child(textnode);
var reference
Node = document.getElementById('chatunread-frame').content
Window.document.getElementById("greeting-msg-list"); // document.query
Selector('#some-element');
reference
Node.set
Attribute("aria-label", "Chat message from");
reference
Node.append
Child(node);
reference
Node.append
Child(node1);
document.getElementsByClassName("main-unreadchat-cont")[0].style.height = "100%";
document.getElementById('chatunread-frame').content
Window.document.getElementById("greetingancclearcards").style.display = "block";
session
Storage.set
Item("webex_engage_greetingmessage_shown", 1)
},
bindCookieConsentGreetingMessage: function (hue, saturation, lightness1, lightness2) {
if (session
Storage.get
Item("webex_engage_greetingmessage_shown") != null && session
Storage.get
Item("webex_engage_greetingmessage_shown") != undefined) {
return;
}
if (cookieConsentWidgetOptions.greeting
Message == undefined || cookieConsentWidgetOptions.greeting
Message == null || cookieConsentWidgetOptions.greeting
Message == '') {
return;
}
var doc1 = document.getElementById('chatunread-frame').content
Window.document;
doc1.head.innerHTML = "" +
"" +
"";
doc1.body.innerHTML = "
" + cookieConsentWidgetOptions.greetingMessage + "
";
doc1.getElementsByTagName('html')[0].class
List.add('imichatmsgpreview');
document.getElementById('chatunread-frame').style.display = "block";
document.getElementsByClassName("main-unreadchat-cont")[0].style.height = "100%";
document.getElementById('chatunread-frame').content
Window.document.getElementById("greetingancclearcards").style.display = "block";
session
Storage.set
Item("webex_engage_greetingmessage_shown", 1);
var node1 = doc1.getElementById('msgclear_greetingmessage');
var node = doc1.getElementById('msg_greetingmessage');
var reference
Node = doc1.getElementById('greeting-msg-list');
reference
Node.set
Attribute("aria-label", "Chat message from");
node1.addEventListener('keydown', function (e) {
if (e.which != 13)
return;
console.log("switchicon called via keydown");
e.stop
Propagation();
e.prevent
Default();
node1.click();
});
node.addEventListener('keydown', function (e) {
if (e.which != 13)
return;
console.log("switchicon called via keydown");
e.stop
Propagation();
e.prevent
Default();
node.click();
});
},
loadCookieConsentWidgetStyles: function () {
try {
if (cookieConsentWidgetOptions != '' && cookieConsentWidgetOptions != undefined && cookieConsentWidgetOptions != null && cookieConsentWidgetOptions != 'null') {
button
Type = cookieConsentWidgetOptions.button
Type;
var color = "#ffffff";
var lightness1 = 0;
var lightness = 0;
try {
var widgcolor = cookieConsentWidgetOptions.widget
Color;
r = parse
Int(widgcolor.substr(1, 2), 16);
g = parse
Int(widgcolor.substr(3, 2), 16);
b = parse
Int(widgcolor.substr(5, 2), 16); hue = IMIGeneral.rgbToHsl(r, g, b)[0]
- 360;
saturation = IMIGeneral.rgbToHsl(r, g, b)[1]
- 100;
lightness = IMIGeneral.rgbToHsl(r, g, b)[2]
- 100;
lightness1 = lightness + 10; lightness2 = 95; var lightness3 = 98; var lightness4 = lightness + 10; if (lightness > 80) { color = "#333333"; } } catch (e1) { } var badgecount = " {1} "; badgecount = badgecount.replace("{0}", "style=\"display:none;\""). replace("{1}", ""); var _IMIchat_browser_widget_lang = ''; //_IMIchat_widget_lang = cookieConsentWidgetOptions.widget
Lang;
if (cookieConsentWidgetOptions.widget
Lang == undefined || cookieConsentWidgetOptions.widget
Lang == "" || cookieConsentWidgetOptions.widget
Lang == null) {
cookieConsentWidgetOptions.widget
Lang = IMIGeneral.getMappedLocale();
_IMIchat_browser_widget_lang = IMIGeneral.getMappedLocale();
}
var chatbtn_tooltip_text = IMILocalisation.get
Value(cookieConsentWidgetOptions.widget
Lang, "chat_button_tooltip", "Live Chat");
var doc = document.getElementById('imi-chatbutton').content
Window.document;
doc.body.innerHTML = "" +
"" +
"" +
"" +
"" +
"" + badgecount + "";
doc.getElementById("cookieconsentwidgetlbtn").style.color = color;
doc.getElementById("cookieconsentwidgetlbtn").style.background
Color = cookieConsentWidgetOptions.widget
Color; doc.getElementById("cookieconsentwidgetlbtn"). style.display = 'block';
doc.getElementById("cookieconsentwidgetlbtn"). addEventListener('click', function () { if (parent. IMIChatInit != undefined) {
parent. IMIChatInit.chatcookieconsentswitchicon(); }
else { IMIChatInit.chatcookieconsentswitchicon(); }
}); document.getElementById('imi-chatbutton'). style.display = "block";
document.getElementById('chatunread-frame'). style.display = "block"; doc.getElementById("cookieconsentwidgetlbtn").
addEventListener('keydown', function (e) { if (e.key === 'Tab' && ! e.shift
Key) {
//debugger;
e.prevent
Default();
var widgetmain
Iframe = window.parent.document.getElementById("iframecookieconsentwindow");
if (document.getElementById("divchatmain").style.display == "block") {
widgetmain
Iframe.content
Window.post
Message({
action: 'cookieconsentbuttonkeypress',
}, "*");
this.blur();
}
}
});
this.bindCookieConsentGreetingMessage(hue, saturation, lightness1, lightness2);
var launch_livechat_iframe_title = IMILocalisation.get
Value(_IMIchat_browser_widget_lang, "launch_livechat_iframe_title", "Launch Livechat");
document.getElementById("imi-chatbutton").set
Attribute('title', launch_livechat_iframe_title);
var livechat_widget_iframe_title = IMILocalisation.get
Value(_IMIchat_browser_widget_lang, "livechat_widget_iframe_title", "Livechat widget");
document.getElementById("iframecookieconsentwindow").set
Attribute('title', livechat_widget_iframe_title);
document.getElementById('chatbutton').style.display = "block";
} else {
document.getElementById("divicw").innerHTML = '';
}
} catch (e1) { }
},
accept
Cookies: function (element) {
if (IMIChatInit.checklocal
Storage()) {
local
Storage.set
Item("webex_engage_cookieconsent_accepted", 1);
cookie_consent_accepted = 1;
IMIChatInit.init();
} else {
document.getElementById("divicw").innerHTML = "
We use cookies to enable best chat experience. Follow these directions to re-enable cookies specific to your browser type or re-open this website in a cookie-enabled browser.
";
console.log("Local storage not supported");
}
},
chatswitchicon: function (type) {
console.log("Chatswitchicon::" + type);
try {
var reference
Node = document.getElementById('chatunread-frame').content
Window.document.getElementById("greeting-msg-list");
if (reference
Node != undefined && reference
Node != null)
reference
Node.remove
Attribute('aria-label');
/*type=1-max and 0- min */
var is
Mobile = "0";
// if (window.inner
Width > 768) { // document.getElementById('divchatmain').class
Name = 'main-chat-cont';
// } else { // document.getElementById('divchatmain').class
Name = 'main-chat-cont chatmobile';
// is
Mobile="1";
// }
if ((navigator.user
Agent.index
Of("Mobile")) != -1) {
is
Mobile = "1";
}
session
Storage.set
Item("webex_engage_data-bind", document.getElementById("divicw").get
Attribute("data-bind"));
session
Storage.set
Item("webex_engage_data-org", document.getElementById("divicw").get
Attribute("data-org"));
var iframe = document.getElementById('imi-chatbutton');
if (iframe == null || iframe == undefined) return;
var inner
Doc = iframe.content
Document || iframe.content
Window.document;
//Open Widget
if (document.getElementById("divchatmain").style.display === 'none' && (type == 1 || type == 2 || type == undefined)) {
document.getElementById("divchatmain").style.display = "block";
IMIGeneral.checkmobile();
var widgetmain = document.getElementById("iframechatwindow");//ENG-1034
widgetmain.content
Window.focus();//ENG-1034
widgetmain.content
Window.post
Message({
action: 'widgetbuttonkeypress',
}, "*");
//if ((window.outer
Width < 497) && (document.document
Element.class
List.contains('imichatmobile-active') == false) && document.getElementById("divchatmain").style.display == "block") {
var class
Name = " " + document.document
Element.class
Name + " ";
if ((window.outer
Width < 700) && (" " + class
Name + " ").replace(/[\t]/g, " ").index
Of("imichatmobile-active") > -1 && document.getElementById("divchatmain").style.display == "block") {
// if((document.document
Element.class
List.value.split(/\s+|\./).filter(word => word === 'imichatmobile-active').length==1) == false){
document.document
Element.class
List.remove("imichatmobile-active");
document.document
Element.class
Name = document.document
Element.class
Name + " imichatmobile-active";
// }
} else {
document.document
Element.class
Name = document.document
Element.class
Name.replace(' imichatmobile-active', '');
}
document.getElementById('chatunread-frame').style.display = "none";
inner
Doc.getElementById("widgetlbtn").set
Attribute("class", "open-btn state1 " + button
Type + " close-btn");
// inner
Doc.getElementById("widgetlbtn").set
Attribute("aria-label", "Close web chat");
inner
Doc.getElementById("widgetlbtn").set
Attribute("aria-expanded", "true");
document.getElementById('imi-chatbutton').content
Window.document.getElementById("chattotalbadge").style.display = "none";
document.getElementById('imi-chatbutton').content
Window.document.getElementById("chattotalbadge").inner
Text = "";
local
Storage.set
Item(fingerprint + "_" + _skey + "_badgecount", 0);
local
Storage.set
Item(fingerprint + "_" + _skey + "_cardcount", 0);
var clear_badgecounter = IMILocalisation.get
Value(_IMIchat_widget_lang, "badge_counter_unread_messages", "Livechat Button - {0} unread messages").replace("{0}",0);
inner
Doc.getElementById("spnwidgetlbtn").set
Attribute("aria-label", clear_badgecounter);
IMIChatInit.clearmsgcards();
IMIChatInit.cleargreetingmsgcards();
// if (IMIGeneral.getBrowserName() == "safari") {
// if (IMIGeneral.detectIOS()) {
// document.body.class
List.add('chatnoscroll');
// }
// }
if (type === undefined) {
var destination = document.getElementById('iframechatwindow').content
Window;
msg = {
"action": "showiframe",
"host": window.location.hostname,
"chatmobile": is
Mobile
};
destination.post
Message(msg, domain
Url);
document.getElementById("iframechatwindow").set
Attribute("aria-hidden", "false");
}
return;
}
//Close Widget
if (document.getElementById("divchatmain").style.display === 'block' && (type == 0 || type == 2 || type == undefined)) {
document.document
Element.class
Name = document.document
Element.class
Name.replace(' imichatmobile-active', '');
//document.body.class
List.remove('chatnoscroll');
document.getElementById("divchatmain").style.display = "none";
inner
Doc.getElementById("widgetlbtn").set
Attribute("class", "open-btn state " + button
Type);
inner
Doc.getElementById("widgetlbtn").set
Attribute("aria-expanded", "false");
inner
Doc.getElementById("widgetlbtn").focus();
inner
Doc.getElementById("cookieconsentwidgetlbtn").focus();
document.getElementById('chatunread-frame').style.display = "block";
local
Storage.set
Item(fingerprint + "_" + _skey + "_cardcount", 0);
document.getElementById("iframechatwindow").set
Attribute("aria-hidden", "true");
return;
}
//var iframe
El = document.getElementById("iframechatwindow");
// Make sure you are sending a string, and to stringify JSON
// iframe
El.content
Window.post
Message("hello", '*');
return;
} catch (e) {
console.log("chatswitchicon:" + e.msg);
}
},
chatcookieconsentswitchicon: function (type) {
try {
var reference
Node = document.getElementById('chatunread-frame').content
Window.document.getElementById("greeting-msg-list");
if (reference
Node != undefined && reference
Node != null)
reference
Node.remove
Attribute('aria-label');
var is
Mobile = "0";
if ((navigator.user
Agent.index
Of("Mobile")) != -1) {
is
Mobile = "1";
}
var iframe = document.getElementById('imi-chatbutton');
if (iframe == null || iframe == undefined) return;
var inner
Doc = iframe.content
Document || iframe.content
Window.document;
//Open Widget
if (document.getElementById("divchatmain").style.display === 'none' && (type == 1 || type == 2 || type == undefined)) {
document.getElementById("divchatmain").style.display = "block";
IMIGeneral.checkmobile();
var widgetcookieconsent = document.getElementById('iframecookieconsentwindow').content
Window;
widgetcookieconsent.post
Message({
action: 'cookieconsentbuttonkeypress',
}, "*");
var class
Name = " " + document.document
Element.class
Name + " ";
//if ((window.outer
Width < 700) && (" " + class
Name + " ").replace(/[\t]/g, " ").index
Of("imichatmobile-active") > -1 && document.getElementById("divchatmain").style.display == "block") {
// // if((document.document
Element.class
List.value.split(/\s+|\./).filter(word => word === 'imichatmobile-active').length==1) == false){
// document.document
Element.class
List.remove("imichatmobile-active");
// document.document
Element.class
Name = document.document
Element.class
Name + " imichatmobile-active";
// // }
//} else {
// document.document
Element.class
Name = document.document
Element.class
Name.replace(' imichatmobile-active', '');
//}
document.getElementById('chatunread-frame').style.display = "none";
inner
Doc.getElementById("cookieconsentwidgetlbtn").set
Attribute("class", "open-btn state1 " + button
Type + " close-btn");
inner
Doc.getElementById("cookieconsentwidgetlbtn").set
Attribute("aria-expanded", "true");
document.getElementById('imi-chatbutton').content
Window.document.getElementById("chattotalbadge").style.display = "none";
document.getElementById('imi-chatbutton').content
Window.document.getElementById("chattotalbadge").inner
Text = "";
//IMIChatInit.clearmsgcards();
if (type === undefined) {
var destination = document.getElementById('iframecookieconsentwindow').content
Window;
msg = {
"action": "showiframe",
"host": window.location.hostname,
"chatmobile": is
Mobile
};
destination.post
Message(msg, domain
Url);
document.getElementById("iframecookieconsentwindow").set
Attribute("aria-hidden", "false");
}
IMIChatInit.cleargreetingmsgcards();
return;
}
//Close Widget
if (document.getElementById("divchatmain").style.display === 'block' && (type == 0 || type == 2 || type == undefined)) {
document.document
Element.class
Name = document.document
Element.class
Name.replace(' imichatmobile-active', '');
document.getElementById("divchatmain").style.display = "none";
inner
Doc.getElementById("cookieconsentwidgetlbtn").set
Attribute("class", "open-btn state " + button
Type);
inner
Doc.getElementById("cookieconsentwidgetlbtn").set
Attribute("aria-expanded", "false");
if (inner
Doc.getElementById("cookieconsentwidgetlbtn")) {
inner
Doc.getElementById("cookieconsentwidgetlbtn").focus();
document.addEventListener('keydown', function (event) {
if (event.key === "Tab") {
event.prevent
Default();
if (inner
Doc.getElementById("ancclearcards")) {
inner
Doc.getElementById("ancclearcards").focus();
} else if (inner
Doc.getElementById("greetingancclearcards")) {
inner
Doc.getElementById("greetingancclearcards").focus();
}
}
});
}
document.getElementById('chatunread-frame').style.display = "block";
document.getElementById("iframecookieconsentwindow").set
Attribute("aria-hidden", "true");
return;
}
return;
} catch (e) {
console.log("chatcookieconsentswitchicon:" + e.msg);
}
},
clearmsgcards: function () {
document.getElementById('chatunread-frame').content
Window.document.getElementById("msg-list").innerHTML = "";
document.getElementById('chatunread-frame').content
Window.document.getElementById("ancclearcards").style.display = "none";
//document.getElementById('imi-chatbutton').content
Window.document.getElementById("chattotalbadge").style.display = "none";
//document.getElementById('imi-chatbutton').content
Window.document.getElementById("chattotalbadge").inner
Text == "";
local
Storage.set
Item(fingerprint + "_" + _skey + "_cardcount", 0);
},
cleargreetingmsgcards: function () {
document.getElementById('chatunread-frame').content
Window.document.getElementById("greeting-msg-list").innerHTML = "";
document.getElementById('chatunread-frame').content
Window.document.getElementById("greetingancclearcards").style.display = "none";
},
openchat: function (event) {
document.getElementById('imichat-fullscreen-modal').class
Name = 'imichat-fullscreen-modal';
document.getElementById('imichat-fullscreen-modal').remove
Attribute('tabindex');
document.getElementById('imichat-fullscreen-modal').remove
Attribute('aria-hidden');
var destination = document.getElementById('iframechatwindow').content
Window;
destination.post
Message({
action: 'openchat',
threadid: event.data.threadid,
proactive_id: event.data.proactive_id
}, '*');
if (parent.IMIChatInit != undefined) {
parent.IMIChatInit.chatswitchicon(2);
}
else {
IMIChatInit.chatswitchicon(2);
}
},
extract
Content: function (s) {
var span = document.create
Element('span');
span.innerHTML = s;
return span.text
Content || span.inner
Text;
},
badgecount: function (event) {
try {
if (document.getElementById("divchatmain").style.display === 'none') {
var count = document.getElementById('imi-chatbutton').content
Window.document.getElementById("chattotalbadge").inner
Text;
if (count == 0 || count == "") {
count = 1;
} else {
count = parse
Int(count) + 1;
}
var duplicate = 0;
var inner
Divs;
var innerDivsCount = 0;
var ref
Child;
IMIChatInit.clearmsgcards();
var container
Div = document.getElementById('chatunread-frame').content
Window.document.getElementById("msg-list");
if (count > 1) {
inner
Divs = container
Div.getElementsByClassName("msg");
if (inner
Divs != undefined) {
innerDivsCount = inner
Divs.length;
for (var i = 0; i < inner
Divs.length; i++) {
if ("msg_" + event.data.msgtransid == inner
Divs[i].id) {
duplicate = 1;
}
}
ref
Child = inner
Divs[0];
}
}
var cardcount;
var checkbadgecount;
if (inner
Divs == undefined) {
local
Storage.set
Item(event.data.fingerprint + "_" + _skey + "_cardcount", 1);
}
document.getElementById('imi-chatbutton').content
Window.document.getElementById("chattotalbadge").style.display = "block";
if (duplicate == 0) {
if (parse
Int(innerDivsCount) == 5) {
container
Div.remove
Child(document.getElementById('chatunread-frame').content
Window.document.getElementsByClassName('msg')[4]);
container
Div.remove
Child(document.getElementById('chatunread-frame').content
Window.document.getElementsByClassName('msgclear')[4]);
innerDivsCount = innerDivsCount - 1;
}
if ((parse
Int(innerDivsCount) < 1 &&
event.data.badge_type === undefined) || event.data.badge_type === 2 || event.data.badge_type === 3) {
var node = document.create
Element("div");
var node1 = document.create
Element("div");
var textnode = document.createTextNode(IMIChatInit.extract
Content(event.data.msg));
if (textnode.data.length > 45) {
if (event.data.badge_type === undefined || event.data.badge_type === 2) {
textnode.data = textnode.data.substr(0, 45) + "...";
} else {
textnode.data = textnode.data;
}
}
node.class
Name = "msg";
node.style = "cursor:pointer;";
node.set
Attribute("tabindex", "0"); //ENG-1065 and ENG-3621 for tabindex
node1.class
Name = "msgclear";
node.id = "msg_" + event.data.msgtransid; // Create a text node
node1.id = "msgclear_" + event.data.msgtransid;
node1.style = "clear:both;";
node.addEventListener("click", function () {
window.parent.post
Message({
action: 'openchat',
threadid: event.data.threadid,
proactive_id: event.data.proactive_id
}, '*');
});
node1.addEventListener("click", function () {
window.parent.post
Message({
action: 'openchat',
threadid: event.data.threadid,
proactive_id: event.data.proactive_id
}, '*');
});
if (event.data.msg_from !== undefined && event.data.msg_from !== "") {
var span = document.create
Element("span");
//var span
span.innerHTML = '';
node.append
Child(span);
} else if (event.data.msg_from === undefined || event.data.msg_from == "") {
var span = document.create
Element("span");
//var span
span.innerHTML = '';
node.append
Child(span);
}
node.append
Child(textnode); var height = document.getElementsByClassName('main-unreadchat-cont')[0]. style.height;
if (height == "") { height = 70; }
if (innerDivsCount == 0) { height = document.getElementsByClassName('main-unreadchat-cont')[0]. style.height = "100%";
} /* else if (innerDivsCount == 2) { height = document.getElementsByClassName('main-unreadchat-cont')[0].
style.height = "150px"; } else if (innerDivsCount > 2) {*/
else { document.getElementsByClassName('main-unreadchat-cont')[0]. style.height = parse
Int(height) + 60 + "px";
}
var reference
Node = document.getElementById('chatunread-frame').content
Window.document.getElementById("msg-list"); // document.query
Selector('#some-element');
if (innerDivsCount == 0) {
reference
Node.append
Child(node);
reference
Node.append
Child(node1);
} else {
reference
Node.insert
Before(node, ref
Child);
reference
Node.insert
Before(node1, ref
Child);
if ((window.inner
Height + 100) < (document.getElementsByClassName("main-unreadchat-cont")[0].style.height)) {
var frame = document.getElementById('chatunread-frame');
var c = frame.content
Document || frame.content
Window.document;
c.getElementsByTagName("body")[0].offset
Height = '80%';
c.getElementsByTagName("body")[0].style.overflow = "auto";
}
}
if (event.data.badge_type === 3) {
document.getElementsByClassName("main-unreadchat-cont")[0].style.height = "100%";
var frame = document.getElementById('chatunread-frame');
var c = frame.content
Document || frame.content
Window.document;
c.getElementsByClassName("msg")[0].style.max
Height = "unset";
var frameheight = c.getElementsByTagName("body")[0].offset
Height;
document.getElementsByClassName("main-unreadchat-cont")[0].style.height = frameheight + "px";
}
} else if (event.data.badge_type === 4) {
var fullscreen_modal = document.getElementById('imichat-fullscreen-modal');
fullscreen_modal.class
Name = 'imichat-fullscreen-modal imichat-open';
fullscreen_modal.content
Window.post
Message({
action: 'bind_data',
proactive_id: event.data.proactive_id,
threadid: event.data.threadid,
msg_from: event.data.msg_from,
msg: event.data.msg,
btn_chat_now_open: IMILocalisation.get
Value(_IMIchat_widget_lang, "proactive_poupup_chat_now_button", "Chat Now"),
btn_chat_now_close: IMILocalisation.get
Value(_IMIchat_widget_lang, "proactive_poupup_close_button", "Close")
}, "*");
}
cardcount = parse
Int(local
Storage.get
Item(event.data.fingerprint + "_" + _skey + "_cardcount")) + 1;
local
Storage.set
Item(event.data.fingerprint + "_" + _skey + "_cardcount", cardcount);
local
Storage.set
Item("fingerprint", event.data.fingerprint);
local
Storage.set
Item(event.data.fingerprint + "_" + _skey + "_badgecount", count);
document.getElementById('imi-chatbutton').content
Window.document.getElementById("chattotalbadge").inner
Text = count;
var chatbtn_badge_counter = IMILocalisation.get
Value(_IMIchat_widget_lang, "badge_counter_unread_messages", "Livechat Button - {0} unread messages");
chatbtn_badge_counter = chatbtn_badge_counter.replace("{0}", count);
if (count > 0) {
//to do for ENG-1082 get localisation for chat button tooltip with count
//ENG-1055
document.getElementById('imi-chatbutton').content
Window.document.getElementById("spnwidgetlbtn").set
Attribute("aria-label", chatbtn_badge_counter); //ENG-1082
}
else {
document.getElementById('imi-chatbutton').content
Window.document.getElementById("spnwidgetlbtn").set
Attribute("aria-label", chatbtn_badge_counter); //ENG-1082
}
}
document.getElementById('chatunread-frame').style.display =
(event.data.badge_type === undefined || (event.data.badge_type === 2 || event.data.badge_type === 3)) ? "block" : "none";
document.getElementById('chatunread-frame').content
Window.document.getElementById("ancclearcards"). style.display = (event.data.badge_type === undefined || (event.data.badge_type === 2 || event.data.badge_type === 3)) ?
"block" : "none"; } } catch (e) {
console.log("badgecount:" + e.msg); } },
message: function (event) { try { if (event.data.action != null) {
if (event.data.action == 'openchat') { IMIChatInit.openchat(event); }
if (event.data.action == 'badgecount') { IMIChatInit.badgecount(event); }
if (event.data.action == 'chatswitchicon') { IMIChatInit.chatswitchicon(); //event }
if (event.data.action == 'Cookiechatswitchicon') { IMIChatInit.chatcookieconsentswitchicon(); //event }
if (event.data.action == 'imichat_custom_chat_fields') { if (event.data.type == 'add') { if (_IMIchat_callback_dic['imichat-widget:custom_chat_fields_init'] !== undefined) {
_IMIchat_callback_dic['imichat-widget:custom_chat_fields_init'](event.data.response); } }
else if (event.data.type == 'update') { if (_IMIchat_callback_dic['imichat-widget:custom_chat_fields_update'] !== undefined) { _IMIchat_callback_dic['imichat-widget:custom_chat_fields_update'](event.data.response);
} }//event }
if (event.data.action == 'accept
Cookies') {
IMIChatInit.accept
Cookies();
}
if (event.data.action == 'widgettabkeypress') {
var forkeyboard = document.getElementById('imi-chatbutton').content
Window.document;
forkeyboard.getElementById("widgetlbtn").focus();
}
if (event.data.action == 'cookieconsenttabkeypress') {
var forkeyboard = document.getElementById('imi-chatbutton').content
Window.document;
forkeyboard.getElementById("cookieconsentwidgetlbtn").focus();
}
if (event.data.action == 'loadcookieconsentwidgetstyles') {
IMIChatInit.loadCookieConsentWidgetStyles();
}
if (event.data.action == 'loadstyles') {
IMIChatInit.loadJQuery(_wxengage_domain_name, function () {
IMIChatInit.loadwidget
Styles(event.data.message); try { if (event.data.message != null) {
if (_IMIchat_callback_dic['imichat-widget:ready'] !== undefined) { _IMIchat_callback_dic['imichat-widget:ready'](_wxengage_attr_key); console.log("imichat-widget:ready fired");
} //eval('imichatWidgetLoaded();'); if (_IMIchat_callback_dic['imichat-widget:custom_chat_fields_init'] !== undefined) {
_IMIchat_callback_dic['imichat-widget:custom_chat_fields_init'](); }// debugger; var widget_data = JSON.parse(event.data.message);
hdr_bfp = widget_data.hdr_bfp; hdr_xtoken = widget_data.hdr_xtoken; hdr_tid = widget_data.hdr_tid;
is_abandonded = widget_data.abandon_chats } } catch (e) {
} IMIChatInit. LaunchProactiveMsgManager(_wxengage_domain_name, function () {
}); IMIChatInit.handleAbandonedChats(); if (cookie_consent_accepted == 1) {
var cookiefocus = document.getElementById('imi-chatbutton'). content
Window.document;
cookiefocus.getElementById("widgetlbtn").focus();
}
});
}
if (event.data.action == 'closemodelpopup') {
document.getElementById('imichat-fullscreen-modal').class
Name = 'imichat-fullscreen-modal';
document.getElementById('imichat-fullscreen-modal').set
Attribute('tabindex', '-1');
document.getElementById('imichat-fullscreen-modal').set
Attribute('aria-hidden', 'true');
}
if (event.data.action == 'setsession') {
session
Storage.set
Item(event.data.key, event.data.value);
}
if (event.data.action == 'setlocal') {
local
Storage.set
Item(event.data.key, event.data.value);
}
if (event.data.action == 'browserstorage') {
document.getElementById("divicw").innerHTML = "
We use cookies to enable best chat experience. Follow these directions to re-enable cookies specific to your browser type or re-open this website in a cookie-enabled browser.
";
console.log("Local storage not supported");
}
if (event.data.action == 'clearallsessionkeys') {
session
Storage.clear();
}
if (event.data.action == 'clearalllocalstoragekeys') {
local
Storage.clear();
}
if (event.data.action == 'cookierejectreload') {
IMIChatInit.removeStorageKeysWhenCookieRejected();
IMIChatInit.init();
}
}
} catch (e) { }
},
resize: function () {
try {
var destination = document.getElementById('iframechatwindow').content
Window;
destination.post
Message({
action: 'resize',
width: window.outer
Width //window.inner
Width//screen.width // document.body.client
Width
}, "*");
IMIGeneral.checkmobile();
} catch (e) { }
},
removeStorageKeysWhenCookieRejected: function () {
session
Storage.remove
Item(_wxengage_attr_key + "_imichat-reload-check");
session
Storage.remove
Item("webex_engage_data-bind");
session
Storage.remove
Item("webex_engage_data-org");
session
Storage.remove
Item("webex_engage_greetingmessage_shown")
local
Storage.remove
Item(fingerprint + "_" + _skey + "_badgecount");
local
Storage.remove
Item(fingerprint + "_" + _skey + "_cardcount");
local
Storage.remove
Item("style_" + document.getElementById("divicw").get
Attribute("data-bind") + "_" + window.location.hostname);
local
Storage.remove
Item("webex_engage_customer_first_seen");
local
Storage.remove
Item("webex_engage_customer_last_seen");
local
Storage.remove
Item("webex_engage_customer_last_seen_interval_id");
local
Storage.remove
Item("webex_engage_executed_proactive_ids");
local
Storage.remove
Item("fingerprint");
local
Storage.remove
Item("webex_engage_repeat_customer");
session
Storage.remove
Item("webex_engage_imichat_hasinitconvexist");
local
Storage.remove
Item("webex_engage_cookieconsent_accepted");
cookie_consent_accepted = 0;
},
clearBrowserStorage: function () {
try {
IMIChatInit.removeStorageKeysWhenCookieRejected();
var destination = document.getElementById('iframechatwindow').content
Window;
destination.post
Message({
action: 'clearbrowserstorage',
width: window.outer
Width //window.inner
Width//screen.width // document.body.client
Width
}, "*");
IMIChatInit.verifyCookieConsent();
console.log("browser storage cleared");
} catch (e) { }
},
LaunchProactiveMsgManager: function (domain
Name, callback) {
try {
var widget_styles = local
Storage.get
Item("style_" + document.getElementById("divicw").get
Attribute("data-bind") + "_" + window.location.hostname);
if (widget_styles == null && !JSON.parse(widget_styles).enable_proactive) {
callback();
return;
}
var body = document.getElementsByTagName('body')[0];
var script = document.create
Element('script');
script.type = 'text/javascript';
script.src = IMIChatInit.domain
Name() + '/js/proactive-msg-manager.js';
body.append
Child(script);
script.addEventListener('load', function (event) {
console.log('proactive manager loaded;');
var destination = document.getElementById('iframechatwindow').content
Window;
destination.post
Message({
action: 'proactive-manager-loaded',
attrkey: document.getElementById("divicw").get
Attribute("data-bind"),
host: window.location.hostname
}, "*");
callback();
});
} catch (e) {
console.log("LaunchProactiveMsgManager:" + e.msg);
}
},
processAbandonedChats: function (type) {
if (!imichatwidget.hasInitiatedChat()) {
return;
}
if (is_abandonded == false) {
return;
}
var browser_fingerprint = local
Storage.get
Item("fingerprint");
var url = IMIGeneral.profile
Url() + "livechats/" + _wxengage_attr_key + "/customers/" + browser_fingerprint + "/abandoned?host=" + window.document. URL; url = url + "&type=" + type; var body = JSON.stringify({ "is_reloaded": false, "is_closechat": true }); var headers = { 'type': 'application/json', 'fpid': hdr_bfp, 'Authorization': hdr_xtoken }; var blob = new Blob([body], headers); navigator.send
Beacon(url);
},
handleAbandonedChats: function () {
// Attach the event keypress to exclude the F5 refresh
//jQuery(window).on('keydown', function (e) {
window.addEventListener('keydown', function (e) {
if (e.key
Code == 116) {
_IMIchat_IsValidNavigation = true;
}
});
window.addEventListener("beforeunload", function (e) {
session
Storage.set
Item(_wxengage_attr_key + "_imichat-reload-check", document.referrer);
console.log(document.referrer);
//session
Storage.set
Item("imi_tabid", Math.random().to
String(16).slice(2));
if (_IMIchat_IsValidNavigation !== undefined && !_IMIchat_IsValidNavigation) {
IMIChatInit.processAbandonedChats("unload");
}
});
if (window.performance.navigation.type == 1) {
IMIChatInit.processAbandonedChats("load");
}
},
loadJQuery: function (domain
Name, callback) {
if (typeof (jQuery) !== 'undefined') {
callback();
return;
}
var body = document.getElementsByTagName('body')[0];
var script = document.create
Element('script');
script.type = 'text/javascript';
script.src = domain
Name + '/js/jquery.min.js';
body.append
Child(script);
script.addEventListener('load', function (event) {
callback();
});
return;
},
on: function (func_name, callback) {
if (typeof callback != 'function') {
console.error('function was expected.');
return;
}
switch (func_name) {
case 'imichat-widget:ready':
_IMIchat_callback_dic['imichat-widget:ready'] = callback;
break;
}
},
checklocal
Storage: function () {
var test = 'test';
try {
local
Storage.set
Item(test, test);
local
Storage.remove
Item(test);
return true;
} catch (e) {
return false;
}
},
call_previous_chats: function () {
try {
var destination = document.getElementById('iframechatwindow').content
Window;
msg = {
"action": "showiframe",
"host": window.location.hostname,
"chatmobile": ((navigator.user
Agent.index
Of("Mobile")) != -1) ? "1" : "0"
};
destination.post
Message(msg, domain
Url);
} catch (e) {
}
},
check_clear_session_chats: function () {
if (document.referrer == session
Storage.get
Item(_wxengage_attr_key + "_imichat-reload-check")) {
return false;
}
else if (session
Storage.get
Item(_wxengage_attr_key + "_imichat-reload-check") == undefined) {
return true;
}
else {
console.log("Hey, Thanks for visiting again");
return false;
}
},
verifyCookieConsent: function () {
var isCookieConsent = typeof cookieConsentWidgetOptions === 'undefined' ? false : true;
if (isCookieConsent != undefined && isCookieConsent != null && isCookieConsent && local
Storage.get
Item("webex_engage_cookieconsent_accepted") != "1") {
try {
var body = document.getElementsByTagName('body')[0];
var script = document.current
Script || (function () {
var scripts = document.getElementsByTagName('script');
return scripts[scripts.length - 1];
})();
var generalscript = document.create
Element('script');
generalscript.src = IMIChatInit.domain
Name() + "/js/imichatgeneral.js";
generalscript.type = 'text/javascript';
body.append
Child(generalscript);
generalscript.addEventListener('load', function (event) {
document.getElementById("divicw").innerHTML = "" +
"" +
"" +
"
" +
"
" +
"" +
"
" + ""; var iframeMainDoc = document.getElementById("iframecookieconsentwindow");
iframeMainDoc.addEventListener('load', function () { IMIChatInit.onCookieConsentWidgetIconIframeLoad();
}); iframeMainDoc.src = IMIGeneral.domainName() + "/cookieconsent.html"; window.removeEventListener('message', IMIChatInit.message);
window.addEventListener('message', IMIChatInit.message); }); } catch (e) {
console.log("LaunchProactiveMsgManager:" + e.msg); } }
else { if (IMIChatInit.checklocalStorage()) { IMIChatInit.init();
} else { document.getElementById("divicw"). innerHTML = "
We use cookies to enable best chat experience. Follow these directions to re-enable cookies specific to your browser type or re-open this website in a cookie-enabled browser.
";
console.log("Local storage not supported");
}
}
}
};
}();
IMIChatInit.verifyCookieConsent();
var imichatwidget = {
// get hasInitiatedConversation() {
// if (session
Storage.get
Item("webex_engage_imichat_hasinitconvexist") == null)
// return false;
// if (session
Storage.get
Item("webex_engage_imichat_hasinitconvexist") == "1") {
// return true;
// } else {
// return false;
// }
// },
hasInitiatedChat: function () {
if (session
Storage.get
Item("webex_engage_imichat_hasinitconvexist") == null)
return false;
if (session
Storage.get
Item("webex_engage_imichat_hasinitconvexist") == "1") {
return true;
} else {
return false;
}
},
show: function () {
//$("#divicw").show();return;
document.getElementById("divicw").style.display = 'block';
},
hide: function () {
// $("#divicw").hide();return;
document.getElementById("divicw").style.display = 'none';
},
/* test:function()
{
if(session
Storage.get
Item("webex_engage_imichat_hasinitconvexist")==null)
return false;
if(session
Storage.get
Item("webex_engage_imichat_hasinitconvexist")=="1")
{
return true;
}
else
{
return false;
}
},*/
maximize
Window: function () {
IMIChatInit.chatswitchicon(1);
IMIChatInit.resize();
IMIChatInit.call_previous_chats();
return;
},
minimize
Window: function () {
return IMIChatInit.chatswitchicon(0);
},
init: function (jsondata, callback) {
if (typeof callback != 'function') {
console.error('function was expected.');
return;
}
var destination = document.getElementById('iframechatwindow').content
Window;
destination.post
Message({
action: 'imichat_custom_chat_fields',
data: jsondata,
type: 'add'
}, '*');
_IMIchat_callback_dic['imichat-widget:custom_chat_fields_init'] = callback;
},
update: function (jsondata, callback) {
if (typeof callback != 'function') {
console.error('function was expected.');
return;
}
var destination = document.getElementById('iframechatwindow').content
Window;
destination.post
Message({ action: 'imichat_custom_chat_fields', data: jsondata,
type: 'update' }, '*'); _IMIchat_callback_dic['imichat-widget:custom_chat_fields_update'] = callback;
}, on: function (func_name, callback) { if (typeof callback != 'function') {
console.error('function was expected.'); return; }
switch (func_name) { case 'imichat-widget:ready': _IMIchat_callback_dic['imichat-widget:ready'] = callback;
break; } },
clearBrowserStorage: function () { IMIChatInit.clearBrowserStorage(); }
}; /* function imichatWidgetLoaded(){imi
imichatwidget.maximize
Window();
}*/
Skip to main content
ERROR 404 - PAGE NOT FOUND
Looks like we tripped a fuse.
While we try to get the power back on to this page, perhaps you could try finding what you're looking for here...