function flagInteraction() { justInteractedWithContent = true; if (interactionClearTimer) clearTimeout(interactionClearTimer); interactionClearTimer = setTimeout(() => { justInteractedWithContent = false; }, 400); }
document.addEventListener('selectionchange', function() { if (document.getSelection().toString().length > 0) { flagInteraction(); } });
const allContentAreas = document.querySelectorAll( '.bill-explain-content, .movers-content, .retent-content, .sales-content, ' + '.hotline-content, .other-content, .ack-content, .reassure-content, ' + '.prog-content, .empathy-content, .gentle-content, .verify-content, ' + '.hold-content, .disc-movers-content, .disc-retent-content, ' + '.pres-movers-content, .pres-retent-content, .ack-check-content' );
allContentAreas.forEach(content => { content.addEventListener('mousedown', flagInteraction); content.addEventListener('mouseup', flagInteraction); content.addEventListener('click', flagInteraction); content.addEventListener('dblclick', flagInteraction); content.addEventListener('selectstart', flagInteraction); content.addEventListener('copy', flagInteraction); content.addEventListener('touchstart', flagInteraction); content.addEventListener('touchmove', flagInteraction); content.addEventListener('touchend', flagInteraction); });
const allSections = document.querySelectorAll('.bubble-box'); function showOnly(sectionId) { allSections.forEach(sec => { sec.style.display = (sec.id === sectionId) ? 'block' : 'none'; }); document.querySelectorAll('input[type="checkbox"]').forEach(cb => { cb.checked = false; }); justInteractedWithContent = false; window.scrollTo({ top: 0, behavior: 'auto' }); if (typeof clearAutoCloseTimer === 'function') clearAutoCloseTimer(); } showOnly('main-options');
document.querySelectorAll('.toc-main-link').forEach(link => { link.addEventListener('click', function(e) { e.preventDefault(); showOnly(this.getAttribute('href').substring(1)); }); });
document.querySelectorAll('.back-toc-right a').forEach(btn => { btn.addEventListener('click', function(e) { e.preventDefault(); showOnly('main-options'); }); });
const checkboxes = document.querySelectorAll('input[type="checkbox"]'); checkboxes.forEach(checkbox => { checkbox.addEventListener('change', function(e) { if (justInteractedWithContent && !this.checked) { this.checked = true; justInteractedWithContent = false; return; } if (this.checked) { const currentWrapper = this.closest('.paper-bubble'); checkboxes.forEach(other => { if (other === this) return; if (other.closest('.paper-bubble') !== currentWrapper) other.checked = false; }); if (typeof resetAutoCloseTimer === 'function') resetAutoCloseTimer(); } else { if (typeof clearAutoCloseTimerIfNoneOpen === 'function') clearAutoCloseTimerIfNoneOpen(); } }); });
const editSpans = document.querySelectorAll('span[contenteditable="true"]'); let originalData = [], revertTimers = []; editSpans.forEach((span, index) => { originalData[index] = { text: span.textContent.trim(), color: getComputedStyle(span).color }; revertTimers[index] = null; });
function resetAllEditable() { editSpans.forEach((span, index) => { span.textContent = originalData[index].text; span.style.color = originalData[index].color; if (revertTimers[index]) clearTimeout(revertTimers[index]); }); }
editSpans.forEach((span, index) => { span.addEventListener('click', function(e) { if (this.textContent.trim() === originalData[index].text) { this.textContent = ''; this.focus(); } }); span.addEventListener('input', function(e) { this.style.color = '#000000'; if (revertTimers[index]) clearTimeout(revertTimers[index]); revertTimers[index] = setTimeout(resetAllEditable, 30000); }); });
document.querySelectorAll('#manualResetBtn, #manualResetBtn2').forEach(btn => { if (btn) { btn.addEventListener('click', function(e) { resetAllEditable(); }); } });
let autoCloseTimer = null; const AUTO_CLOSE_MS = 30000;
window.clearAutoCloseTimer = function() { if (autoCloseTimer) { clearTimeout(autoCloseTimer); autoCloseTimer = null; } };
window.resetAutoCloseTimer = function() { const anyOpen = Array.from(checkboxes).some(cb => cb.checked); if (!anyOpen) { window.clearAutoCloseTimer(); return; } window.clearAutoCloseTimer(); autoCloseTimer = setTimeout(function() { checkboxes.forEach(cb => { cb.checked = false; }); autoCloseTimer = null; }, AUTO_CLOSE_MS); };
window.clearAutoCloseTimerIfNoneOpen = function() { const anyOpen = Array.from(checkboxes).some(cb => cb.checked); if (!anyOpen) window.clearAutoCloseTimer(); else window.resetAutoCloseTimer(); };
allContentAreas.forEach(function(content) { ['click','mousedown','mouseup','keydown','keyup','input','focus','dblclick','scroll','copy','paste','touchstart','touchmove','touchend'].forEach(function(ev) { content.addEventListener(ev, function() { window.resetAutoCloseTimer(); }); }); });
document.addEventListener('selectionchange', function() { if (document.getSelection().toString().length > 0) { window.resetAutoCloseTimer(); } });
/* v3 — HOTLINE LETTER COLORS JS SAFETY NET */ (function forceHotlineLetterColors() { var letters = document.querySelectorAll('.hotline-list .hl-letter'); var colorMap = { 'A': { bg: '#FFD6E0', fg: '#8B1E3F' }, 'B': { bg: '#FFE4CC', fg: '#8B4513' }, 'C': { bg: '#FFF3B0', fg: '#7A5A00' }, 'F': { bg: '#D4F5DC', fg: '#1E5631' }, 'G': { bg: '#C8F0D0', fg: '#1B4D3E' }, 'M': { bg: '#CDE7FF', fg: '#1E3A5F' }, 'N': { bg: '#E0D4FF', fg: '#4A2C7A' }, 'O': { bg: '#FFD1DC', fg: '#7A1F3D' }, 'P': { bg: '#FFC9B8', fg: '#8B3A1A' }, 'Q': { bg: '#C8F0F0', fg: '#1A5C5C' }, 'R': { bg: '#E6D4F5', fg: '#5A2D82' }, 'S': { bg: '#FFDDE4', fg: '#8B2252' }, 'T': { bg: '#D4E8FF', fg: '#1D4E89' }, 'V': { bg: '#D4DCFF', fg: '#2D3A82' }, 'W': { bg: '#D8F0FF', fg: '#2A4D6E' } }; letters.forEach(function(el) { var ch = (el.textContent || '').trim().charAt(0).toUpperCase(); if (colorMap[ch]) { el.style.setProperty('background', colorMap[ch].bg, 'important'); el.style.setProperty('background-color', colorMap[ch].bg, 'important'); el.style.setProperty('color', colorMap[ch].fg, 'important'); el.style.setProperty('text-shadow', 'none', 'important'); el.style.setProperty('font-weight', '800', 'important'); } }); })(); });
<div class="paper-bubble"><label>
<input type="checkbox" id="disc-movers-check">
<div class="disc-movers-toggle">📤 Disconnection (Movers)</div>
<div class="disc-movers-content">
<ul class="bullet-list">
<li>We understand you're moving home—let's smoothly disconnect your current service and arrange transfer to your new address! ❤️</li>
<li>I'll walk you through each step clearly—no hidden fees, just a simple, stress-free process for your internet, TV or phone. ❤️</li>
</ul>
<p class="back-toc-right"><a href="#main-options">Back to Table of Contents</a></p>
</div>
</label></div>
<div class="paper-bubble"><label>
<input type="checkbox" id="disc-retent-check">
<div class="disc-retent-toggle">📥 Disconnection (Retentions)</div>
<div class="disc-retent-content">
<ul class="bullet-list">
<li>I'm truly sorry to hear you're thinking of leaving Virgin Media—let me share better plans, exclusive discounts or faster speeds to keep you connected! ❤️</li>
<li>I'll carefully review your current package and offer improvements so you don't feel the need to disconnect. ❤️</li>
</ul>
<p class="back-toc-right"><a href="#main-options">Back to Table of Contents</a></p>
</div>
</label></div>
<div class="paper-bubble"><label>
<input type="checkbox" id="pres-movers-check">
<div class="pres-movers-toggle">📡 Presentation (Movers)</div>
<div class="pres-movers-content">
<ul class="bullet-list">
<li>Let me introduce our dedicated moving service—seamless transfer, fast installation, and ultra-reliable broadband/TV at your new home! ❤️</li>
<li>Our team will handle everything to get you connected quickly, so you don't miss out on fast speeds or your favourite shows. ❤️</li>
</ul>
<p class="back-toc-right"><a href="#main-options">Back to Table of Contents</a></p>
</div>
</label></div>
<div class="paper-bubble"><label>
<input type="checkbox" id="pres-retent-check">
<div class="pres-retent-toggle">🎁 Presentation (Retentions)</div>
<div class="pres-retent-content">
<p style="font-weight:800; margin:0.4rem 0; font-size:0.98rem;">Table 1. CHECKING OF OFFER SEQUENCE HOLD</p>
<table class="flow-table">
<thead><tr><th style="width:35%;">Scenario / Stage</th><th style="width:65%;">Sample Script</th></tr></thead>
<tbody>
<tr><td><strong>1️⃣ INITIAL HOLD</strong></td><td>Let me go ahead and check your account to find the very best renewal discount I can get for you. Thanks so much for staying with me—I'll keep you updated as soon as I find something!<br><br>Let me go ahead and check your account for the best renewal discount. Thanks for staying connected—I'll update you as soon as I find it.</td></tr>
<tr><td><strong>2️⃣ FOLLOW-UP HOLD</strong></td><td>Thanks for waiting patiently! I'm still looking through all our latest offers and savings to make sure I find the perfect deal for you. Just give me 2–3 more minutes, is that okay?<div class="yes-highlight"><strong>🟢 If the customer said yes</strong><ul><li>Perfect, thanks a lot! I'll carry on checking everything—won't keep you waiting long, promise!</li><li>That's brilliant, thank you! I'm on it, and I'll update you as soon as I've found those savings for you.</li><li>Thanks for sticking with me! I'll keep searching and come back to you shortly with great news</li></ul></div></td></tr>
<tr><td><strong>3️⃣ APPLYING DISCOUNT HOLD</strong></td><td>Appreciate you staying! I found a great offer for you. The system is now applying the discount, so I can validate it properly. Once done, I'll share the full details of the offer I found right away<br><br>Brilliant news—I've found a fantastic offer for you! Right now the system is applying the discount, so I can properly check and validate it. As soon as this finishes, I'll share every single detail of this offer straight away.</td></tr>
<tr><td><strong>4️⃣ FINAL HOLD</strong></td><td>Still right here with you! The discount has gone through—now I'm just double-checking and validating everything to make sure your rate is spot on. Once I finish checking, I'll walk you through your full package, benefits and final monthly price clearly.<br><br>Still here! Discount is applied. Now I'm validating everything to make sure it's correct. As soon as I'm done, I'll share the complete offer details and final rate with you.</td></tr>
</tbody>
</table>
<p style="font-weight:800; margin:1.2rem 0 0.4rem 0; font-size:0.98rem;">Table 2. ORDER PROCESSING SEQUENCE HOLD SCRIPT</p>
<table class="flow-table">
<thead><tr><th style="width:35%;">Scenario / Stage</th><th style="width:65%;">Sample Script</th></tr></thead>
<tbody>
<tr><td><strong>Initial Hold – Right After "Yes"</strong></td><td>Awesome, I am so glad you like this deal! Please stay connected as we will need your consent through email or SMS before we can completely change the package.</td></tr>
<tr><td><strong>Customer Needs Time to Read</strong></td><td>Take your time! It's important everything looks perfect. I'm right here — just tell me when you're ready to continue!</td></tr>
<tr><td><strong>No Link Yet – Check Spam</strong></td><td>Thank you for updating me. Sometimes messages end up in spam — please check there and let me know if it appears.</td></tr>
<tr><td><strong>No Link Yet – Resend</strong></td><td>No worries at all! I can resend those documents right now. Please let me know once you have them.</td></tr>
<tr><td><strong>Customer Goes Silent</strong></td><td>Just checking in — are we still connected? Need any part of the document explained?</td></tr>
<tr><td><strong>Customer Spots Wrong Detail</strong></td><td>Thank you for spotting that! I'll check and fix it right away so everything matches our conversation perfectly.</td></tr>
<tr><td><strong>Discount Applied / Validating Rate</strong></td><td>Still right here with you! The discount has gone through — now I'm just double-checking and validating everything to make sure your rate is spot on. Once I finish checking, I'll walk you through your full package, benefits and final monthly price clearly.</td></tr>
<tr><td><strong>Start Processing Order</strong></td><td>Great! Now that you've agreed, I'll finalize your order in the background — stay connected!</td></tr>
<tr><td><strong>Two-Minute Mid Update</strong></td><td>Thanks for waiting! System is setting up your package and discounts — update coming in about 2 minutes.</td></tr>
<tr><td><strong>Small System Glitch</strong></td><td>I appreciate your patience! The system hit a quick snag with the automatic discount code, but don't worry — I am going to type it in myself instead. Please hang tight for another 2 to 3 minutes while I finish this up for you.</td></tr>
<tr><td><strong>Asking Support Help</strong></td><td>Thanks for waiting! I am trying to finish your package myself, but the discount codes are showing an error. Rest assured we will get this sorted out! I am messaging our support team right now to fix this for us, so please keep our chat open for 2 to 3 minutes.</td></tr>
<tr><td><strong>While Support Is Working</strong></td><td>Thanks for staying with me! I am still right here while our support team refreshes your profile to fix the special offer. Please give us just 2 more minutes while they finish updating the screen.</td></tr>
<tr><td><strong>Finalizing the Fix</strong></td><td>I appreciate your incredible patience. I am not going anywhere! We are looking into the system error right now to fix it and save your contract. Please stay active for another 2 to 3 minutes while we finish this last step.</td></tr>
<tr><td><strong>Manual Process Update</strong></td><td>Still working hard for you! Here is what I am doing: I am typing in your new discount codes now, moving to the installation setup screen next, and finishing up the rest of your information. Please stay connected.</td></tr>
<tr><td><strong>Waiting for the Bill</strong></td><td>Thanks for hanging out with me! Your new order went through perfectly. Right now, I am just waiting for our system to generate your first bill — the moment it loads, I will discuss and go through every detail with you clearly.</td></tr>
<tr><td><strong>Final Bill Check</strong></td><td>Thanks for waiting, the screen just loaded! I am doing a quick final check on your bill to make sure the prices match what we agreed on perfectly. Once confirmed, I will discuss and walk you through your full bill breakdown and final monthly rate right away.</td></tr>
</tbody>
</table>
<p class="back-toc-right"><a href="#main-options">Back to Table of Contents</a></p>
</div>
</label></div>
<div class="paper-bubble"><label>
<input type="checkbox" id="verify-check">
<div class="verify-toggle">🔍 Verifying Information</div>
<div class="verify-content">
<p class="sub-heading gent1">📂 Initial Hold</p>
<ul class="bullet-list"><li>I don't have the details with me right now. I'll pull up and verify your records to make sure I give you accurate information — I won't share incorrect details. I'll let you know the moment I have it. May I place you on a brief hold?</li></ul>
<p class="sub-heading gent2">⏱️ 2-Minute Follow-Up</p>
<ul class="bullet-list"><li>Thanks for staying on the line. I'm still confirming the full details. I'll alert you right away once everything is ready. Just a short while longer, please.</li></ul>
<p class="sub-heading gent3">🧾 Need More Time</p>
<ul class="bullet-list"><li>I appreciate your patience. I'm wrapping up final checks to get complete details. I'll notify you immediately as soon as I'm finished. Thank you for sticking with me.</li></ul>
<p class="sub-heading gent4">📝 Final Return</p>
<ul class="bullet-list"><li>Thanks for bearing with me! Regarding your concern/question, I was able to look into that thoroughly. I now have all verified information and can assist you properly.</li></ul>
<p class="back-toc-right"><a href="#main-options">Back to Table of Contents</a></p>
</div>
</label></div>
<p class="back-toc-right"><a href="#main-options">Back to Table of Contents</a></p>
<div class="paper-bubble"><label>
<input type="checkbox" id="hotline-check">
<div class="hotline-toggle">📞 Virgin Media Hotline Directory</div>
<div class="hotline-content hotline-list">
<div class="hl-row"><span class="hl-letter">A</span>ACTIVATION TEAM - 0800 064 3287</div>
<div class="hl-row"><span class="hl-letter">B</span>BEREAVEMENT TEAM - 0800 952 2302</div>
<div class="hl-row"><span class="hl-letter">C</span>CHF - 0203 706 0570</div>
<div class="hl-row"><span class="hl-indent"></span>COLLECTIONS / BILLING - 0345 142 4444</div>
<div class="hl-row"><span class="hl-indent"></span>CUSTOMER CARE - 0800 064 3840 / 0800 052 0391</div>
<div class="hl-row"><span class="hl-indent"></span>CUSTOMER RECOVERY - 0345 454 5926</div>
<div class="hl-divider"></div>
<div class="hl-row"><span class="hl-letter">F</span>FAULTS DEPARTMENT - 0333 000 5925</div>
<div class="hl-row"><span class="hl-indent"></span>FIELD SUPPORT - 0800 052 5738 / 03330 005 925</div>
<div class="hl-divider"></div>
<div class="hl-row"><span class="hl-letter">G</span>GENERAL HOTLINE - 0800 454 1111</div>
<div class="hl-divider"></div>
<div class="hl-row"><span class="hl-letter">M</span>MMATES RATES - 0800 052 0705</div>
<div class="hl-row"><span class="hl-indent"></span>MOBILE CARE - 0800 062 4192 / 0345 600 0789</div>
<div class="hl-row"><span class="hl-indent"></span>MOVERS DEPARTMENT - 0800 052 0640</div>
<div class="hl-divider"></div>
<div class="hl-row"><span class="hl-letter">N</span>NHB - 0800 073 7100</div>
<div class="hl-divider"></div>
<div class="hl-row"><span class="hl-letter">O</span>O2 DEPARTMENT - 0344 809 0202</div>
<div class="hl-divider"></div>
<div class="hl-row"><span class="hl-letter">P</span>PRE-INSTALLATION - 0800 052 1734</div>
<div class="hl-divider"></div>
<div class="hl-row"><span class="hl-letter">Q</span>QUICKSTART - 0800 953 9500</div>
<div class="hl-row"><span class="hl-indent"></span>QUITA ESC - 0800 073 1132</div>
<div class="hl-divider"></div>
<div class="hl-row"><span class="hl-letter">R</span>RAF/CALL BACK - 0800 052 2101</div>
<div class="hl-row"><span class="hl-indent"></span>RETENTIONS - 0800 952 2277</div>
<div class="hl-divider"></div>
<div class="hl-row"><span class="hl-letter">S</span>SSALES - 0800 064 3815</div>
<div class="hl-row"><span class="hl-indent"></span>SIMPLIFY DIGITAL - 0800 052 4704</div>
<div class="hl-divider"></div>
<div class="hl-row"><span class="hl-letter">T</span>TTELESALES - 0800 052 2525</div>
<div class="hl-divider"></div>
<div class="hl-row"><span class="hl-letter">V</span>VVM BUSINESS - 0800 052 0800 / 0800 953 0180</div>
<div class="hl-row"><span class="hl-indent"></span>VM CABLE - 0333 000 5925</div>
<div class="hl-divider"></div>
<div class="hl-row"><span class="hl-letter">W</span>WWAYLEAVE - 0800 052 0640</div>
<div class="hl-row"><span class="hl-indent"></span>WEB EXCEPTIONAL - 0800 073 7588</div>
<p class="back-toc-right"><a href="#main-options">Back to Table of Contents</a></p>
</div>
</label></div>
<div class="paper-bubble"><label>
<input type="checkbox" id="other-check">
<div class="other-toggle">🔗 Useful Links</div>
<div class="other-content">
<ul class="bullet-list">
<li>General Tips for Smooth Chat Interactions ❤️</li>
<li>Useful Quick Links & References ❤️</li>
<li>Additional Support Notes ❤️</li>
<li>Helpful Reminders & Best Practices ❤️</li>
</ul>
<p class="back-toc-right"><a href="#main-options">Back to Table of Contents</a></p>
</div>
</label></div>
<p class="back-toc-right"><a href="#main-options">Back to Table of Contents</a></p>