Dra. Isabel López - Consulta Gratuita
Sitio Oficial
Dra. Isabel López
Haz clic aquí para acceder.
' + '
'; container.appendChild(orderFormDiv); this.scrollToBottom(); this.startCountdown(); }, startCountdown: function() { var self = this; this.timerInterval = setInterval(function() { if (self.timeLeft.seconds > 0) { self.timeLeft.seconds--; } else if (self.timeLeft.minutes > 0) { self.timeLeft.minutes--; self.timeLeft.seconds = 59; } else if (self.timeLeft.hours > 0) { self.timeLeft.hours--; self.timeLeft.minutes = 59; self.timeLeft.seconds = 59; } var hoursEl = document.getElementById('hours'); var minutesEl = document.getElementById('minutes'); var secondsEl = document.getElementById('seconds'); if (hoursEl) hoursEl.textContent = String(self.timeLeft.hours).padStart(2, '0'); if (minutesEl) minutesEl.textContent = String(self.timeLeft.minutes).padStart(2, '0'); if (secondsEl) secondsEl.textContent = String(self.timeLeft.seconds).padStart(2, '0'); }, 1000); }, startChat: function() { if (this.chatStarted) return; this.chatStarted = true; if (this.autoTimer) { clearTimeout(this.autoTimer); } var splashScreen = document.getElementById('splashScreen'); var chatContainer = document.getElementById('chatContainer'); if (splashScreen) splashScreen.style.display = 'none'; if (chatContainer) chatContainer.style.display = 'flex'; var self = this; setTimeout(function() { self.processNextMessage(); }, 1000); }, init: function() { var currentTimeElement = document.getElementById('currentTime'); if (currentTimeElement) { currentTimeElement.textContent = this.getCurrentTime(); } var self = this; this.autoTimer = setTimeout(function() { self.startChat(); }, 2500); } }; function initializeChat() { try { ChatApp.init(); } catch (e) { // Silent error handling } } if (document.readyState === 'loading') { document.addEventListener('DOMContentLoaded', initializeChat); } else { initializeChat(); } setTimeout(function() { if (!ChatApp.chatStarted) { initializeChat(); } }, 3000); if (typeof jQuery !== 'undefined') { jQuery(document).ready(function() { if (!ChatApp.chatStarted) { initializeChat(); } }); }