var WizredirToChat=""; var WizautoOpen=0; var WizcurrentToken = ""; var WizaccessibilityMode = "1"; var WizSkipjQuery=("0"=="") ? "" : WizSkipjQuery="1"; var WizsideBarPosition = 0; var WizuseSide="left"; var WizchatServerName= "https://chatb.btl.gov.il/chat/"; var wizProfile = 78; var WizsideBarWidth=400; var WizmainURL = "https://chatb.btl.gov.il/chat/ICR/BOT.aspx?l=5365"; var WizcloseText = "האם ברצונך לסגור את השיחה?"; if (WizsideBarPosition==1) WizuseSide="right"; function setAttrToElement(elem,attr,value) { if (typeof jQuery === 'undefined') { (elem.startsWith("#")) ? document.getElementById(elem.substring(1)).setAttribute(attr,value) : document.getElementsByClassName(elem.substring(1))[0].setAttribute(attr,value); } else { $(elem).attr(attr,value); } } function setEventActions(data) { switch (data) { case "1": setAttrToElement("#wizIframeInBox","src",WizchatServerName + "irchat.aspx?profile=" + wizProfile); break; case "0": var z=document.getElementById("wizIframeInBox").getAttribute("src"); if (z.toString().toLowerCase().indexOf("bot")==-1) setAttrToElement("#wizIframeInBox","src",WizmainURL + "&ran=" + Math.random() + "&T=" + WizcurrentToken); if (elemHasClass(".closeMode","openMode")) return false; break; } } function elemHasClass(elem,className) { if (typeof jQuery === 'undefined') { if (elem.startsWith("#")) { var t=document.getElementById(elem.substring(1)); return t[0].classList.contains(className); } else { var t=document.getElementsByClassName(elem.substring(1)); return t[0].classList.contains(className); } } else { return $(elem).hasClass(className); } } function ShowOrHide(elem,mode) { if (typeof jQuery === 'undefined') { if (mode=="show") { (elem.startsWith("#")) ? document.getElementById(elem.substring(1)).style.display='block' : document.getElementsByClassName(elem.substring(1))[0].style.display='block'; } else { (elem.startsWith("#")) ? document.getElementById(elem.substring(1)).style.display='none' : document.getElementsByClassName(elem.substring(1))[0].style.display='none'; } } else { (mode=="show") ? $(elem).show() : $(elem).hide(); } } function setFocusToElem(elem) { if (typeof jQuery === 'undefined') { (elem.startsWith("#")) ? document.getElementById(elem.substring(1)).focus : document.getElementsByClassName(elem.substring(1))[0].focus; } else { (mode=="show") ? $(elem).show() : $(elem).hide(); } } try { var canRunCoBrowse=0; } catch(e) {} var WizloadjQuery=1; var WizisMobile=false; var WizfloaterState = 0; // 0 close , 1 open var WizdocHeight=0; var WizdocWidth=0; function runCoBrowse() { canRunCoBrowse=1;} function setCBroom(data) {CBroom=data;} function WizGetCookie(cname) { var name = cname + "="; var decodedCookie = decodeURIComponent(document.cookie); var ca = decodedCookie.split(';'); for(var i = 0; i < ca.length; i++) { var c = ca[i]; while (c.charAt(0) == ' ') { c = c.substring(1); } if (c.indexOf(name) == 0) { return c.substring(name.length, c.length); } } return ""; } function WizCheckForOpenCall(id) { if (!id) id=0; setTimeout(function () { if ($("#wizIframeInBox").attr("src")=="") setEventActions("0"); }, 1000); } function WizshowBar(isSkip) { if (typeof WizSideBarClickCustom == "function" && isSkip==undefined) { WizCheckForOpenCall(); WizSideBarClickCustom(); return false; } if (elemHasClass(".WizcloseMode","WizopenMode")) return true; var id=""; try {id=WizGetCookie("userkey").split("=")[1];} catch (e) {} WizCheckForOpenCall(id); //show the bar with animate ShowOrHide(".WizdataArea","show"); if (typeof jQuery === 'undefined') { if (WizuseSide=="right") { document.getElementsByClassName("WizcloseMode")[0].style.right=WizsideBarWidth + "px !important"; } else { document.getElementsByClassName("WizcloseMode")[0].style.left=WizsideBarWidth + "px !important"; } ShowOrHide(".WizclosedSideCenter","hide"); setAttrToElement(".WizclosedSideBubble","aria-expanded","true"); var element = document.getElementsByClassName("WizcloseMode")[0]; element.classList.add("WizopenMode"); } else { ShowOrHide(".WizclosedSideCenter","hide"); ShowOrHide(".WizcloseMode","show"); if (WizuseSide=="right") { $(".WizcloseMode").animate({ right: "0px" }, 500, function() { setAttrToElement(".WizclosedSideBubble","aria-expanded","true"); $(".WizcloseMode").addClass("WizopenMode"); }); } else { $(".WizcloseMode").animate({ left: "0px" }, 500, function() { setAttrToElement(".WizclosedSideBubble","aria-expanded","true"); $(".WizcloseMode").addClass("WizopenMode"); }); } } $('.WiztopBarCloseBtn').focus(); } function setTaps(mode) { if (mode=="1") { if ($("#WizagentTapping").length==0) { $(".WiztopBarTitle").append("