function openKubraSupportPopUp(helpKey, KubraSupportPopUpToken) {if(document.getElementById("kubra-help")){document.getElementById("kubra-help").parentNode.removeChild(document.getElementById("kubra-help"));}var html = "
\"Close\"
";var errorHtml = "";var url = "https://support.kubra.com/Administration/Search/EmbedSearchContext?product=My%20Account&searchKey=POPULAR&langCode=es&isSelfPopup=true";var popup = document.createElement("div");popup.setAttribute("id", "kubra-help");if (helpKey) { html = html.replace(/\&searchKey=[^&]*&/i, "&searchKey=" + encodeURI(helpKey) + "&"); }popup.innerHTML = html;document.body.insertBefore(popup, document.body.firstChild);var popupEl = document.getElementById('kubra-help-popup');var popupRect = popupEl.getBoundingClientRect();if (window.innerWidth < (popupRect.width + 100)) {document.getElementById("kubra-help-popup").style.right = ((window.innerWidth - popupRect.width) / 2) + "px";}var pos1 = 0, pos2 = 0, pos3 = 0, pos4 = 0;function closeDragElement() {document.onmouseup = null;document.onmousemove = null;}function elementDrag(e) {e = e || window.event;pos1 = pos3 - e.clientX;pos2 = pos4 - e.clientY;pos3 = e.clientX;pos4 = e.clientY;popupEl.style.top = (popupEl.offsetTop - pos2) + "px";popupEl.style.left = (popupEl.offsetLeft - pos1) + "px";}function dragMouseDown(e) {e = e || window.event;pos3 = e.clientX;pos4 = e.clientY;document.onmouseup = closeDragElement;document.onmousemove = elementDrag;}if (document.getElementById("kubra-help-popup-header")) {document.getElementById("kubra-help-popup-header").onmousedown = dragMouseDown;} else {popupEl.onmousedown = dragMouseDown;}popupEl.style.opacity = 0;var last = +new Date();var tick = function () {popupEl.style.opacity = +popupEl.style.opacity + (new Date() - last) / 100;last = +new Date();if (+popupEl.style.opacity < 1) {(window.requestAnimationFrame && requestAnimationFrame(tick)) || setTimeout(tick, 16);}};tick();popupEl.addEventListener('touchmove', function(event) {var touch = event.targetTouches[0];popupEl.style.left = touch.pageX - (popupRect.width / 2) + 'px';popupEl.style.top = touch.pageY-25 + 'px';event.preventDefault();}, false);}function openKubraSupportWindow(helpKey) {var win = window.open(kubraSupportUrl(helpKey));win.focus();}function openKubraSupportRedirect(helpKey) {window.location.href = kubraSupportUrl(helpKey);}function kubraSupportUrl(helpKey) {if(document.getElementById("kubra-help")){document.getElementById("kubra-help").parentNode.removeChild(document.getElementById("kubra-help"));}var url = "https://support.kubra.com/Administration/Search/EmbedSearchContext?product=My%20Account&searchKey=POPULAR&langCode=es&isSelfPopup=true";if (helpKey) {return url.replace(/\&searchKey=[^&]*&/i, "&searchKey=" + encodeURI(helpKey) + "&");} else {return url;}}function closeKubraSupportPopUp() {var el = document.getElementById("kubra-help-popup");el.style.opacity = 1;var last = +new Date();var tick = function () {el.style.opacity = +el.style.opacity - (new Date() - last) / 300;last = +new Date();if (+el.style.opacity > 0) {(window.requestAnimationFrame && requestAnimationFrame(tick)) || setTimeout(tick, 16);} else {document.getElementById("kubra-help").parentNode.removeChild(document.getElementById("kubra-help"));}};tick();}function openKubraSupportPopUpForMFA(helpKey, KubraSupportPopUpToken) {if(document.getElementById("kubra-help")){document.getElementById("kubra-help").parentNode.removeChild(document.getElementById("kubra-help"));}var html = "
\"Close\"
";var errorHtml = "";var url = "https://support.kubra.com/Administration/Search/EmbedSearchContext?product=My%20Account&searchKey=POPULAR&langCode=es&isSelfPopup=true";var popup = document.createElement("div");popup.setAttribute("id", "kubra-help");if (helpKey) { html = html.replace(/\&searchKey=[^&]*&/i, "&searchKey=" + encodeURI(helpKey) + "&"); }popup.innerHTML = html;document.body.insertBefore(popup, document.body.firstChild);var popupEl = document.getElementById('kubra-help-popup');var popupRect = popupEl.getBoundingClientRect();if (window.innerWidth < (popupRect.width + 100)) {document.getElementById("kubra-help-popup").style.right = ((window.innerWidth - popupRect.width) / 2) + "px";}var pos1 = 0, pos2 = 0, pos3 = 0, pos4 = 0;function closeDragElement() {document.onmouseup = null;document.onmousemove = null;}function elementDrag(e) {e = e || window.event;pos1 = pos3 - e.clientX;pos2 = pos4 - e.clientY;pos3 = e.clientX;pos4 = e.clientY;popupEl.style.top = (popupEl.offsetTop - pos2) + "px";popupEl.style.left = (popupEl.offsetLeft - pos1) + "px";}function dragMouseDown(e) {e = e || window.event;pos3 = e.clientX;pos4 = e.clientY;document.onmouseup = closeDragElement;document.onmousemove = elementDrag;}if (document.getElementById("kubra-help-popup-header")) {document.getElementById("kubra-help-popup-header").onmousedown = dragMouseDown;} else {popupEl.onmousedown = dragMouseDown;}popupEl.style.opacity = 0;var last = +new Date();var tick = function () {popupEl.style.opacity = +popupEl.style.opacity + (new Date() - last) / 100;last = +new Date();if (+popupEl.style.opacity < 1) {(window.requestAnimationFrame && requestAnimationFrame(tick)) || setTimeout(tick, 16);}};tick();popupEl.addEventListener('touchmove', function(event) {var touch = event.targetTouches[0];popupEl.style.left = touch.pageX - (popupRect.width / 2) + 'px';popupEl.style.top = touch.pageY-25 + 'px';event.preventDefault();}, false);}