robertheath.co.uk
Open in
urlscan Pro
2606:4700:3108::ac42:28d6
Public Scan
Submitted URL: http://www.robertheath.co.uk/
Effective URL: https://robertheath.co.uk/
Submission: On July 23 via manual from GB — Scanned from GB
Effective URL: https://robertheath.co.uk/
Submission: On July 23 via manual from GB — Scanned from GB
Form analysis
1 forms found in the DOMPOST /#wpcf7-f1417-p1037-o1
<form action="/#wpcf7-f1417-p1037-o1" method="post" class="wpcf7-form init" aria-label="Contact form" novalidate="novalidate" data-status="init">
<div style="display: none;">
<input type="hidden" name="_wpcf7" value="1417">
<input type="hidden" name="_wpcf7_version" value="5.7.7">
<input type="hidden" name="_wpcf7_locale" value="en_GB">
<input type="hidden" name="_wpcf7_unit_tag" value="wpcf7-f1417-p1037-o1">
<input type="hidden" name="_wpcf7_container_post" value="1037">
<input type="hidden" name="_wpcf7_posted_data_hash" value="">
<input type="hidden" name="_wpcf7_recaptcha_response"
value="03AFcWeA69jTc0QurjaEU5beXdQkuGQzdls36gP0C7TPmD0rHzQRGFMmrjOwSFWEHxEZ7c-WIFywylavFm9Zwm5tHh_QitMJW-Q47RmV8cOAi0pWR7OfrR_EMiacanOMpTbpx5f3ZP2THeZST-FnHoSO6MYvM8myvqbXE4iuCIvmhMrBmwRnHGO8HTQL3U7VoOBoOcMru4ianjjLNLazbTRR6PSr5JaXVWD0icnJMxBNYdquGW3h0TkaWCjuTeq7qhKjX86nfxRm0aeHYMOwWP25ypkMzWeGdYizauQkByEHO8dQmjTDQOd2bxTUuqzsnujJql2vv0pCyaFIFLcwNIx74UVq0NW-U6XkNdO1xeXd5MqE_BpAXJq0_8_dNQnFPkPyE6slP00wItFG9-gM3Q422uFkMj9FBXcsIAoLHCNTlid8MG0hjaSaEkOP-QuLjfixSeP3fsMigzHRFSIkaFkmw9deakOAONYEkBRhJ7zG9nCjcnpvxSZBjxxEZcyxvxLeHkah7EX34hvlU_eJq9p5FbQfyOYp5t_BNW54qbLgFXA0GEw7wHVqzOCvuvdTHzrrQ7wkJJTEmVcgDSwixZ6g1wAGPSztDJ8Nc9U72TjDz64kyVgK-BfZfrQqvy3Rd3BVjWuN4SGe1kvpGwgwUJKJ00Kejo0NlIDFx5RJGF-J9sPKp16-79ntElT49Kpp4cGGOhIPzkqm6YSTnzIJQ2NVbiQR7XWawwTecqVLz2MaaXnH9mqHhhPzTwgTYBvxOTCj8gkXkUedPlrMZqKuDEw0MRMnKoqiJ7zmbsqLdvBhQLBbBHp3jG1AwhZXzSTjn1VCHMNY-lkf0eMCes2C20t8KB33qm-Za9yw">
</div>
<p><span class="wpcf7-form-control-wrap" data-name="your-name"><input size="40" class="wpcf7-form-control wpcf7-text wpcf7-validates-as-required" aria-required="true" aria-invalid="false" placeholder="Name *" value="" type="text"
name="your-name"></span><br>
<span class="wpcf7-form-control-wrap" data-name="your-email"><input size="40" class="wpcf7-form-control wpcf7-text wpcf7-email wpcf7-validates-as-required wpcf7-validates-as-email" aria-required="true" aria-invalid="false" placeholder="Email *"
value="" type="email" name="your-email"></span><br>
<span class="wpcf7-form-control-wrap" data-name="phone"><input size="40" class="wpcf7-form-control wpcf7-text wpcf7-validates-as-required" aria-required="true" aria-invalid="false" placeholder="Phone *" value="" type="text"
name="phone"></span><br>
<span class="wpcf7-form-control-wrap" data-name="service"><select class="wpcf7-form-control wpcf7-select" aria-invalid="false" name="service">
<option value="Domestic Heating">Domestic Heating</option>
<option value="Commercial Heating">Commercial Heating</option>
<option value="Renewable Energy">Renewable Energy</option>
<option value="Electrical">Electrical</option>
<option value="Fire">Fire</option>
<option value="Security & Access Control">Security & Access Control</option>
</select></span><br>
<span class="wpcf7-form-control-wrap" data-name="message"><textarea cols="40" rows="10" class="wpcf7-form-control wpcf7-textarea" aria-invalid="false" placeholder="How Can We Help You?" name="message"></textarea></span><br>
<input class="wpcf7-form-control has-spinner wpcf7-submit" type="submit" value="Submit Request"><span class="wpcf7-spinner"></span>
</p>
<div class="wpcf7-response-output" aria-hidden="true"></div>
</form>
Text Content
We value your privacy We use cookies to enhance your browsing experience, serve personalized ads or content, and analyze our traffic. By clicking "Accept All", you consent to our use of cookies. Customize Reject All Accept All Customize Consent Preferences We use cookies to help you navigate efficiently and perform certain functions. You will find detailed information about all cookies under each consent category below. The cookies that are categorized as "Necessary" are stored on your browser as they are essential for enabling the basic functionalities of the site. ... Show more NecessaryAlways Active Necessary cookies are required to enable the basic features of this site, such as providing secure log-in or adjusting your consent preferences. These cookies do not store any personally identifiable data. * Cookie PHPSESSID * Duration session * Description This cookie is native to PHP applications. The cookie stores and identifies a user's unique session ID to manage user sessions on the website. The cookie is a session cookie and will be deleted when all the browser windows are closed. * Cookie _GRECAPTCHA * Duration 6 months * Description Google Recaptcha service sets this cookie to identify bots to protect the website against malicious spam attacks. * Cookie rc::a * Duration never * Description This cookie is set by the Google recaptcha service to identify bots to protect the website against malicious spam attacks. * Cookie rc::f * Duration never * Description This cookie is set by the Google recaptcha service to identify bots to protect the website against malicious spam attacks. * Cookie rc::c * Duration session * Description This cookie is set by the Google recaptcha service to identify bots to protect the website against malicious spam attacks. * Cookie rc::b * Duration session * Description This cookie is set by the Google recaptcha service to identify bots to protect the website against malicious spam attacks. * Cookie cookieyes-consent * Duration 1 year * Description CookieYes sets this cookie to remember users' consent preferences so that their preferences are respected on subsequent visits to this site. It does not collect or store any personal information about the site visitors. Functional Functional cookies help perform certain functionalities like sharing the content of the website on social media platforms, collecting feedback, and other third-party features. No cookies to display. Analytics Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics such as the number of visitors, bounce rate, traffic source, etc. * Cookie _ga_* * Duration 1 year 1 month 4 days * Description Google Analytics sets this cookie to store and count page views. * Cookie _ga * Duration 1 year 1 month 4 days * Description Google Analytics sets this cookie to calculate visitor, session and campaign data and track site usage for the site's analytics report. The cookie stores information anonymously and assigns a randomly generated number to recognise unique visitors. * Cookie _gid * Duration 1 day * Description Google Analytics sets this cookie to store information on how visitors use a website while also creating an analytics report of the website's performance. Some of the collected data includes the number of visitors, their source, and the pages they visit anonymously. * Cookie _gat_gtag_UA_* * Duration 1 minute * Description Google Analytics sets this cookie to store a unique user ID. Performance Performance cookies are used to understand and analyze the key performance indexes of the website which helps in delivering a better user experience for the visitors. No cookies to display. Advertisement Advertisement cookies are used to provide visitors with customized advertisements based on the pages you visited previously and to analyze the effectiveness of the ad campaigns. No cookies to display. Uncategorized Other uncategorized cookies are those that are being analyzed and have not been classified into a category as yet. * Cookie cf_clearance * Duration 1 year * Description Description is currently not available. * Cookie fingerprint * Duration never * Description No description available. Reject All Save My Preferences Accept All Powered by * Home * Who We Are * About Us * Careers * COVID 19 * What We Do * Domestic Heating * Commercial Heating * Renewable Energy * Electrical * Fire Safety * Security & Access Control * Contact Us Call Us Your Commercial and Residential Heating Experts since 1979 * Careers * Partner Access * 264 Burlington Road, London, KT3 4NN * E-mail: cs@robertheath.co.uk * 0333 014 1000 * Home * Who We Are * About Us * Careers * COVID 19 * What We Do * Domestic Heating * Commercial Heating * Renewable Energy * Electrical * Fire Safety * Security & Access Control * Contact Us Call Us Over 40 Years Of Award-winning Service Specialists in providing energy solutions and maintenance services Contact Us We’re Here to Help Robert Heath cover over 100,000 properties across the UK. Contact Us Video Player https://robertheath.co.uk/wp-content/uploads/2020/11/BE-Balanced-Energy-from-Robert-Heath-Heating.mp4 00:00 00:00 02:11 Use Up/Down Arrow keys to increase or decrease volume. WELCOME! WE’RE HERE TO HELP We always strive to work leaner and smarter to deliver the best value for money for our clients and the end users. All our services are coordinated from our head office in London and supported by regional offices around the country to ensure our operations run as smoothly as possible. More About Us YOUR COMFORT IS OUR BUSINESS Rely on us! Call one of our dedicated experts and see how we can help 0333 014 1000 HERE TO HELP HERE TO HELP 24/7 Rely on us! We have a dedicated team ready to help you 24/7 0333 014 1000 HERE TO HELP 40 YEARS OF EXPERTISE Rely on us! Expertise built up from over 40 years of reliable service 0333 014 1000 HERE TO HELP WHAT WE OFFER SERVICES OVERVIEW DOMESTIC HEATING Domestic Heating for Social Landlords, Housing Associations, Local Authorities and Private Homes RENEWABLE ENERGY It’s our mission to improve standards of living by combatting fuel poverty, while recognising the importance of reducing reliance on fossil fuels. COMMERCIAL HEATING Over 40 years of service, we are adept in heating systems of all sizes, annually delivering over 30 plant rooms nationwide. SECURITY & ACCESS CONTROL Leveraging the latest technology to enhance existing and new security systems, redefining industry standards in the process. FIRE SAFETY We protect our clients’ heritage and future with passive and active fire protection systems. ELECTRICAL We are passionate about preventative and proactive electrical care, as well as providing properties with cost-cutting energy efficient solutions. HEATING EMERGENCY? CALL US AT 0333 014 1000 24 HOURS, 7 DAYS A WEEK, 365 DAYS A YEAR! WHY CHOOSE US PROUDLY SERVING FOR OVER 40 YEARS 40 years of experience installing and maintaining boilers, we’ve cultivated a reputation for top quality service and expertise. DONE RIGHT THE FIRST TIME We pride ourselves on giving you the best possible service, top quality service every step of the way. 24/7 SERVICE, 365 DAYS A YEAR 24/7 365 Days a Year, Standby Response Service: Speak to an expert any time of day, any day of the year. PERSONALISED SOLUTIONS We offer bespoke surveys to determine your requirements. Providing a tailor made solution to best-fit your needs. MAKE AN ENQUIRY Domestic HeatingCommercial HeatingRenewable EnergyElectricalFireSecurity & Access Control SOME OF OUR PARTNERS HOW TO FIND US CONTACT INFO * 264 Burlington Road, London, KT3 4NN * E-mail: cs@robertheath.co.uk * Phone: 0333 014 1000 * OPEN 24/7 A COMPANY YOU CAN TRUST For over 40 years we’ve been delivering award-winning energy solutions and services. A family run business, Robert Heath Heating has grown from a local central heating installation company to one of the leading energy specialists in the UK. POLICIES * Corporate Responsibility * Modern Slavery Policy * Environmental & Waste Management * Equality & Diversity * Sustainability * Privacy Policy * Data Protection Policy * Carbon Reduction Plan FOLLOW US ON SOCIAL MEDIA * * CONTACT 264 Burlington Road, London, KT3 4NN Telephone: 0333 014 1000 E-mail: cs@robertheath.co.uk Open 24/7/365 © Copyright 2022. Robert Heath Heating Ltd. All Rights Reserved. " + "" + "" + "" + badgecount + ""; /* " "; */ doc.getElementById("widgetlbtn").style.color =color; doc.getElementById("widgetlbtn").style.backgroundColor = msg.widgetcolor; doc.getElementById("widgetlbtn").style.display = 'block'; doc.getElementById("widgetlbtn").addEventListener('click', function () { console.log("switchicon called"); if (parent.IMIChatInit != undefined) { parent.IMIChatInit.chatswitchicon(); } else { IMIChatInit.chatswitchicon(); } }); //console.log( doc.getElementById("widgetlbtn")); /*$('[data-toggle=\"tooltip\"]').tooltip();*/ // doc.close(); /* for test */ var doc1 = document.getElementById('chatunread-frame').contentWindow.document; // doc1.open(); doc1.head.innerHTML = "" + ""; doc1.body.innerHTML = "x "; // ""+ //"" + //""; //doc1.close(); doc1.getElementsByTagName('html')[0].classList.add('imichatmsgpreview'); doc1.getElementById("ancclearcards").addEventListener('click', function () { if (parent.IMIChatInit != undefined) { parent.IMIChatInit.clearmsgcards(); } else { IMIChatInit.clearmsgcards(); } }); IMIGeneral.storeLocal("style_" + document.getElementById("divicw").getAttribute("data-bind") + "_" + window.location.hostname, msg); document.getElementById('chatbutton').style.display = "block"; } else { document.getElementById("divicw").innerHTML = ''; } } catch (e1) { } }, chatswitchicon: function (type) { console.log("Chatswitchicon::" + type); try { /*type=1-max and 0- min */ var isMobile = "0"; // if (window.innerWidth > 768) { // document.getElementById('divchatmain').className = 'main-chat-cont'; // } else { // document.getElementById('divchatmain').className = 'main-chat-cont chatmobile'; // isMobile="1"; // } if ((navigator.userAgent.indexOf("Mobile")) != -1) { isMobile = "1"; } sessionStorage.setItem("data-bind", document.getElementById("divicw").getAttribute("data-bind")); sessionStorage.setItem("data-org", document.getElementById("divicw").getAttribute("data-org")); var iframe = document.getElementById('imi-chatbutton'); if (iframe == null || iframe == undefined) return; var innerDoc = iframe.contentDocument || iframe.contentWindow.document; //Open Widget if (document.getElementById("divchatmain").style.display === 'none' && (type == 1 || type == 2 || type == undefined)) { document.getElementById("divchatmain").style.display = "block"; IMIGeneral.checkmobile(); //if ((window.outerWidth < 497) && (document.documentElement.classList.contains('imichatmobile-active') == false) && document.getElementById("divchatmain").style.display == "block") { var className = " " + document.documentElement.className + " "; if ((window.outerWidth < 700) && (" " + className + " ").replace(/[\n\t]/g, " ").indexOf("imichatmobile-active") > -1 && document.getElementById("divchatmain").style.display == "block") { // if((document.documentElement.classList.value.split(/\s+|\./).filter(word => word === 'imichatmobile-active').length==1) == false){ document.documentElement.classList.remove("imichatmobile-active"); document.documentElement.className = document.documentElement.className + " imichatmobile-active"; // } } else { document.documentElement.className = document.documentElement.className.replace(' imichatmobile-active', ''); } document.getElementById('chatunread-frame').style.display = "none"; innerDoc.getElementById("widgetlbtn").setAttribute("class", "open-btn state1 " + buttonType + " close-btn"); // innerDoc.getElementById("widgetlbtn").setAttribute("aria-label", "Close web chat"); innerDoc.getElementById("widgetlbtn").setAttribute("aria-expanded", "true"); document.getElementById('imi-chatbutton').contentWindow.document.getElementById("chattotalbadge").style.display = "none"; document.getElementById('imi-chatbutton').contentWindow.document.getElementById("chattotalbadge").innerText = ""; localStorage.setItem(fingerprint + "_" + _skey + "_badgecount", 0); localStorage.setItem(fingerprint + "_" + _skey + "_cardcount", 0); IMIChatInit.clearmsgcards(); // if (IMIGeneral.getBrowserName() == "safari") { // if (IMIGeneral.detectIOS()) { // document.body.classList.add('chatnoscroll'); // } // } if (type === undefined) { var destination = document.getElementById('iframechatwindow').contentWindow; msg = { "action": "showiframe", "host": window.location.hostname, "chatmobile": isMobile }; destination.postMessage(msg, domainUrl); document.getElementById("iframechatwindow").setAttribute("aria-hidden","false"); } return; } //Close Widget if (document.getElementById("divchatmain").style.display === 'block' && (type == 0 || type == 2 || type == undefined)) { document.documentElement.className = document.documentElement.className.replace(' imichatmobile-active', ''); //document.body.classList.remove('chatnoscroll'); document.getElementById("divchatmain").style.display = "none"; innerDoc.getElementById("widgetlbtn").setAttribute("class", "open-btn state " + buttonType); innerDoc.getElementById("widgetlbtn").setAttribute("aria-expanded", "false"); innerDoc.getElementById("widgetlbtn").focus(); document.getElementById('chatunread-frame').style.display = "block"; localStorage.setItem(fingerprint + "_" + _skey + "_cardcount", 0); document.getElementById("iframechatwindow").setAttribute("aria-hidden", "true"); return; } //var iframeEl = document.getElementById("iframechatwindow"); // Make sure you are sending a string, and to stringify JSON // iframeEl.contentWindow.postMessage("hello", '*'); return; } catch (e) { console.log("LaunchProactiveMsgManager:" + e.msg); } }, clearmsgcards: function () { document.getElementById('chatunread-frame').contentWindow.document.getElementById("msg-list").innerHTML = ""; document.getElementById('chatunread-frame').contentWindow.document.getElementById("ancclearcards").style.display = "none"; //document.getElementById('imi-chatbutton').contentWindow.document.getElementById("chattotalbadge").style.display = "none"; //document.getElementById('imi-chatbutton').contentWindow.document.getElementById("chattotalbadge").innerText == ""; localStorage.setItem(fingerprint + "_" + _skey + "_cardcount", 0); }, openchat: function (event) { document.getElementById('imichat-fullscreen-modal').className = 'imichat-fullscreen-modal'; var destination = document.getElementById('iframechatwindow').contentWindow; destination.postMessage({ action: 'openchat', threadid: event.data.threadid, proactive_id: event.data.proactive_id }, '*'); if (parent.IMIChatInit != undefined) { parent.IMIChatInit.chatswitchicon(2); } else { IMIChatInit.chatswitchicon(2); } }, extractContent: function(s) { var span = document.createElement('span'); span.innerHTML = s; return span.textContent || span.innerText; }, badgecount: function (event) { try { if (document.getElementById("divchatmain").style.display === 'none') { var count = document.getElementById('imi-chatbutton').contentWindow.document.getElementById("chattotalbadge").innerText; if (count == 0 || count == "") { count = 1; } else { count = parseInt(count) + 1; } var duplicate = 0; var innerDivs; var innerDivsCount = 0; var refChild; IMIChatInit.clearmsgcards(); var containerDiv = document.getElementById('chatunread-frame').contentWindow.document.getElementById("msg-list"); if (count > 1) { innerDivs = containerDiv.getElementsByClassName("msg"); if (innerDivs != undefined) { innerDivsCount = innerDivs.length; for (var i = 0; i < innerDivs.length; i++) { if ("msg_" + event.data.msgtransid == innerDivs[i].id) { duplicate = 1; } } refChild = innerDivs[0]; } } var cardcount; var checkbadgecount; if (innerDivs == undefined) { localStorage.setItem(event.data.fingerprint + "_" + _skey + "_cardcount", 1); } document.getElementById('imi-chatbutton').contentWindow.document.getElementById("chattotalbadge").style.display = "block"; if (duplicate == 0) { if (parseInt(innerDivsCount) == 5) { containerDiv.removeChild(document.getElementById('chatunread-frame').contentWindow.document.getElementsByClassName('msg')[4]); containerDiv.removeChild(document.getElementById('chatunread-frame').contentWindow.document.getElementsByClassName('msgclear')[4]); innerDivsCount = innerDivsCount - 1; } if ((parseInt(innerDivsCount) < 1 && event.data.badge_type === undefined) || event.data.badge_type === 2 || event.data.badge_type === 3) { var node = document.createElement("div"); var node1 = document.createElement("div"); var textnode = document.createTextNode(IMIChatInit.extractContent(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.className = "msg"; node.style = "cursor:pointer;"; node1.className = "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.postMessage({ action: 'openchat', threadid: event.data.threadid, proactive_id: event.data.proactive_id }, '*'); }); node1.addEventListener("click", function () { window.parent.postMessage({ 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.createElement("span"); //var span span.innerHTML = '' + event.data.msg_from + ':'; node.appendChild(span); } else if (event.data.msg_from === undefined || event.data.msg_from == "") { var span = document.createElement("span"); //var span span.innerHTML = 'New Conversation:'; node.appendChild(span); } node.appendChild(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 = "150px"; } /* 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 = parseInt(height) + 60 + "px"; } var referenceNode = document.getElementById('chatunread-frame').contentWindow.document.getElementById("msg-list"); // document.querySelector('#some-element'); if (innerDivsCount == 0) { referenceNode.appendChild(node); referenceNode.appendChild(node1); } else { referenceNode.insertBefore(node, refChild); referenceNode.insertBefore(node1, refChild); if ((window.innerHeight + 100) < (document.getElementsByClassName("main-unreadchat-cont")[0].style.height)) { var frame = document.getElementById('chatunread-frame'); var c = frame.contentDocument || frame.contentWindow.document; c.getElementsByTagName("body")[0].offsetHeight = '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.contentDocument || frame.contentWindow.document; c.getElementsByClassName("msg")[0].style.maxHeight = "unset"; var frameheight = c.getElementsByTagName("body")[0].offsetHeight; 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.className = 'imichat-fullscreen-modal imichat-open'; fullscreen_modal.contentWindow.postMessage({ 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.getValue(_IMIchat_widget_lang, "proactive_poupup_chat_now_button", "Chat Now"), btn_chat_now_close: IMILocalisation.getValue(_IMIchat_widget_lang, "proactive_poupup_close_button", "Close") }, "*"); } cardcount = parseInt(localStorage.getItem(event.data.fingerprint + "_" + _skey + "_cardcount")) + 1; localStorage.setItem(event.data.fingerprint + "_" + _skey + "_cardcount", cardcount); localStorage.setItem("fingerprint", event.data.fingerprint); localStorage.setItem(event.data.fingerprint + "_" + _skey + "_badgecount", count); document.getElementById('imi-chatbutton').contentWindow.document.getElementById("chattotalbadge").innerText = count; } document.getElementById('chatunread-frame').contentWindow.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 == '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 == 'loadstyles') { IMIChatInit.loadJQuery(_domain_name, function () { IMIChatInit.loadwidgetStyles(event.data.message); try { if (event.data.message != null) { if (_IMIchat_callback_dic['imichat-widget:ready'] !== undefined) { _IMIchat_callback_dic['imichat-widget:ready'](_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; } } catch (e) { } IMIChatInit.LaunchProactiveMsgManager(_domain_name, function () { }); IMIChatInit.handleAbandonedChats(); }); } if (event.data.action == 'closemodelpopup') { document.getElementById('imichat-fullscreen-modal').className = 'imichat-fullscreen-modal'; } if (event.data.action == 'setsession') { sessionStorage.setItem(event.data.key, event.data.value); } if (event.data.action == 'setlocal') { localStorage.setItem(event.data.key, event.data.value); } if (event.data.action == 'browserstorage') { document.getElementById("divicw").innerHTML = " \n \n \nError: Cookies Disabled 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"); } } } catch (e) { } }, resize: function () { try { var destination = document.getElementById('iframechatwindow').contentWindow; destination.postMessage({ action: 'resize', width: window.outerWidth //window.innerWidth//screen.width // document.body.clientWidth }, "*"); IMIGeneral.checkmobile(); } catch (e) { } }, LaunchProactiveMsgManager: function (domainName, callback) { try { var widget_styles = localStorage.getItem("style_" + document.getElementById("divicw").getAttribute("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.createElement('script'); script.type = 'text/javascript'; script.src = IMIChatInit.domainName() + '/js/proactive-msg-manager.js'; body.appendChild(script); script.addEventListener('load', function (event) { console.log('proactive manager loaded;'); var destination = document.getElementById('iframechatwindow').contentWindow; destination.postMessage({ action: 'proactive-manager-loaded', attrkey: document.getElementById("divicw").getAttribute("data-bind"), host: window.location.hostname }, "*"); callback(); }); } catch (e) { console.log("LaunchProactiveMsgManager:" + e.msg); } }, processAbandonedChats: function (type) { if (!imichatwidget.hasInitiatedChat()) { return; } var browser_fingerprint = localStorage.getItem("fingerprint"); var url = IMIGeneral.profileUrl() + "livechats/" + _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, 'Tid': hdr_tid, 'X-Token': hdr_xtoken }; var blob = new Blob([body], headers); navigator.sendBeacon(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.keyCode == 116) { _IMIchat_IsValidNavigation = true; } }); window.addEventListener("beforeunload", function (e) { sessionStorage.setItem(_attr_key + "_imichat-reload-check", document.referrer); console.log(document.referrer); //sessionStorage.setItem("imi_tabid", Math.random().toString(16).slice(2)); if (_IMIchat_IsValidNavigation !== undefined && !_IMIchat_IsValidNavigation) { IMIChatInit.processAbandonedChats("unload"); } }); if (window.performance.navigation.type == 1) { IMIChatInit.processAbandonedChats("load"); } }, loadJQuery: function (domainName, callback) { if (typeof (jQuery) !== 'undefined') { callback(); return; } var body = document.getElementsByTagName('body')[0]; var script = document.createElement('script'); script.type = 'text/javascript'; script.src = domainName + '/js/jquery.min.js'; body.appendChild(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; } }, checklocalStorage: function () { var test = 'test'; try { localStorage.setItem(test, test); localStorage.removeItem(test); return true; } catch (e) { return false; } }, call_previous_chats: function () { try { var destination = document.getElementById('iframechatwindow').contentWindow; msg = { "action": "showiframe", "host": window.location.hostname, "chatmobile": ((navigator.userAgent.indexOf("Mobile")) != -1) ? "1" : "0" }; destination.postMessage(msg, domainUrl); } catch (e) { } }, check_clear_session_chats: function () { if (document.referrer == sessionStorage.getItem(_attr_key + "_imichat-reload-check")) { return false; } else if (sessionStorage.getItem(_attr_key + "_imichat-reload-check") == undefined) { return true; } else { console.log("Hey, Thanks for visiting again"); return false; } } }; }(); if (IMIChatInit.checklocalStorage()) { IMIChatInit.init(); } else { document.getElementById("divicw").innerHTML = " \n \n \nError: Cookies Disabled 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"); } var imichatwidget = { // get hasInitiatedConversation() { // if (sessionStorage.getItem("imichat_hasinitconvexist") == null) // return false; // if (sessionStorage.getItem("imichat_hasinitconvexist") == "1") { // return true; // } else { // return false; // } // }, hasInitiatedChat: function () { if (sessionStorage.getItem("imichat_hasinitconvexist") == null) return false; if (sessionStorage.getItem("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(sessionStorage.getItem("imichat_hasinitconvexist")==null) return false; if(sessionStorage.getItem("imichat_hasinitconvexist")=="1") { return true; } else { return false; } },*/ maximizeWindow: function () { IMIChatInit.chatswitchicon(1); IMIChatInit.resize(); IMIChatInit.call_previous_chats(); return; }, minimizeWindow: function () { return IMIChatInit.chatswitchicon(0); }, init: function (jsondata, callback) { if (typeof callback != 'function') { console.error('function was expected.'); return; } var destination = document.getElementById('iframechatwindow').contentWindow; destination.postMessage({ 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').contentWindow; destination.postMessage({ 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; } } }; /* function imichatWidgetLoaded(){imi imichatwidget.maximizeWindow(); }*/