PageSourceSearch

https://www.ophthalmologyweb.com/rand-20260923043006/keys-k-i-j-cg-d-w-zk/ControlJavaScript.ashx

js ophthalmologyweb.com collected 2026-09-24 19:10:06 UTC 59,252 bytes, 1 lines download raw bytes

1RegisterNamespace("VP.Search");var showSearchResults=!1,minSearchLength=3,latestSearch="";VP.Search.IsAutoCompleteEnable=null;VP.Search.IsShowCategoryEnable=null;$(document).ready(function(){$("#txtSearchFor").keypress(function(n){if(n.which==13)return VP.Search.SearchFor(),n.returnValue=!1,n.cancel=!0,n.keyCode=0,!1});$("#txtSearchFor").keyup(VP.Util.Debounce(async function(n){n.which!=13&&(VP.Search.FormatSearchText().length>minSearchLength&&$(".autoCompleteSpinner").show(),latestSearch=VP.Search.RemoveSpecialCharacters(),VP.Search.IsAutoCompleteEnable=="true"?VP.Search.AutoCompleteResults():VP.Search.IsShowCategoryEnable=="true"&&await VP.Search.ShowCategories())},300));$(".autoCompleteContainer").length>0&&($(".autoCompleteContainer").hover(function(){showSearchResults=!0},function(){showSearchResults=!1}),$("body").mouseup(function(){showSearchResults||$(".autoCompleteContainer").hide()}),$("#txtSearchFor").focusin(function(){showSearchResults=!0;$(".autoCompleteContainer").show()}));$(".autoCompleteSpinner").hide();$("#btnSearch").click(function(){VP.Search.SearchFor()})});VP.Search.SearchFor=function(){const n=$("#txtSearchFor"),r=n.val(),t=n.data("inputPreviewText"),i=VP.Search.FormatSearchText();if(i!=""&&typeof t!="undefined"&&r!=t){const n=encodeURIComponent(decodeHtml(decodeURIComponent(i))),t=$("#hdnSearchResultsPageUrl").val()+"?search="+n;window.location=t}};VP.Search.FormatSearchText=function(){var n=$("#txtSearchFor").val();return n=n.replace(/</g,""),n=n.replace(/"/g," "),n=n.replace(/>/g,""),n=n.replace(/^\s+/,""),n==""&&$("#txtSearchFor").val(n),n};VP.Search.AutoCompleteResults=function(){var i,t=VP.Search.RemoveSpecialCharacters(),n=$(".autoCompleteContainer"),r=truncationLength;t.length>minSearchLength&&n.length>0?$.ajax({type:"POST","async":!0,cache:!1,url:VP.AjaxWebServiceUrl+"/GetSearchHeaderAutoCompletedResultsAsync",data:"{'siteId' : '"+VP.SiteId+"','searchText' : '"+t+"','size' : '5','maxLength' : '"+r+"'}",contentType:"application/json; charset=utf-8",dataType:"json",success:function(r){t==latestSearch&&(i=r.d.Result,n.html(""),n.append(i),$(".autoCompleteSpinner").hide());$(".autoCompleteContainer").show()},error:function(n){var t=n;$(".autoCompleteContainer").hide();$(".autoCompleteSpinner").hide()}}):($(".autoCompleteSpinner").hide(),n.html(""))};VP.Search.ShowCategories=async function(){var t=VP.Search.RemoveSpecialCharacters(),n=$(".categoryListContainer"),i;if(t.length>minSearchLength&&n.length>0&&t===latestSearch){if($(".autoCompleteSpinner").show(),n.html(""),i=await VP.CommonSearch.GetCategoriesBySiteId(t),i&&Object.keys(i).length>0){let r="<ul class='category-list'>";Object.entries(i).forEach(([n,i])=>{const u=new RegExp(`(${t})`,"gi"),f=i.replace(u,`<b>$1</b>`);r+="<li class='category-item'>";r+=`<a href="${n}" rel="${n}"><span class="hint">${f}</span></a>`;r+="<\/li>"});r+="<\/ul>";n.append(r);n.show()}else n.hide();$(".autoCompleteSpinner").hide()}else n.hide()};VP.Search.RemoveSpecialCharacters=function(){var n=$("#txtSearchFor").val();return n=n.replace(/</g,""),n=n.replace(/"/g," "),n=n.replace(/>/g,""),n=n.replace(/^\s+/,""),n=n.replace(/{/,""),n=n.replace(/}/,""),n==""&&$("#txtSearchFor").val(n),n};RegisterNamespace("VP.Login");VP.Login.ModalDialog=null;VP.Login.CurrentPageUrl=null;VP.Login.SiteUrl=null;VP.Login.PasswordResetPageUrl=null;VP.Login.RegisterFields=[];VP.Login.IsValidateAllPages=!1;VP.Login.ValidatePageId=null;VP.Login.IsLogged=null;VP.Login.UserProfilePage=null;VP.Login.UserProfilePageFromCountryFlag=null;VP.Login.RedirectPageUrl=null;VP.Login.DefaultAdminContactEmail=null;VP.Login.DisableCloseOnEsc=!1;VP.Login.SailthruCookieKey="sailthru_hid";VP.Login.SailthruContentCookieKey="sailthru_content";VP.Login.Initialize=function(){$(document).ready(function(){VP.Login.ModalDialog=$("#modalPopup");VP.Login.ModalDialog.jqm({modal:!0});$(".loginPopup").click(function(){$(".loginPopup").text()=="Sign In"?VP.Login.ShowLoginDialog():VP.Login.Logout()});$(".login-link").click(function(){VP.Login.ShowLoginDialog()});$(".navMenu").on("click","li[data-on-click='SignIn']",function(){VP.Login.ShowLoginDialog()});
1$(".navMenu").on("click","li[data-on-click='SignOut']",VP.Login.Logout);$(".navMenu").on("click","li[data-on-click='Register']",VP.Login.ShowRegisterDialog);$(".loginlink").click(function(){VP.Login.ShowLoginDialog()});$(".registerPopup").click(function(){VP.Login.ShowRegisterDialog()});$(document).keyup(function(n){n.keyCode==27&&VP.Login.CloseBtnRedirectToPreviousPage()});$(".countryFlag").click(function(){VP.Login.IsLogged=="true"?window.location=VP.Login.UserProfilePageFromCountryFlag:VP.Login.ShowChangeCountry()});VP.Login.GetQueryStringParameter("slp")!==""&&setTimeout(function(){VP.Login.ShowLoginDialogWithRegisterPageRedirect()},VP.Login.GetQueryStringParameter("slp")*1e3)})};VP.Login.GetQueryStringParameter=function(n){n=n.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var i=new RegExp("[\\?&]"+n+"=([^&#]*)"),t=i.exec(location.search);return t==null?"":decodeURIComponent(t[1].replace(/\+/g," "))};VP.Login.ShowDialog=function(n){VP.Login.ModalDialog.empty();VP.Login.ModalDialog.css("top",n);VP.Login.ModalDialog.jqmShow()};VP.Login.HideDialog=function(){VP.Login.ModalDialog.jqmHide()};VP.Login.CloseBtnRedirectToPreviousPage=function(){VP.Login.DisableCloseOnEsc?window.history.back():VP.Login.ModalDialog.jqmHide()};VP.Login.ShowLoginDialog=function(n){const t=VP.Login.GetRedirectUrlFromQueryParameter(),i=t?"/GetLoginHtmlWithSsoRedirect":"/GetLoginHtml",r=t?{redirectUrl:t}:{};VP.Login.ShowDialog("5%");$.ajax({type:"POST","async":!1,cache:!1,url:VP.AjaxWebServiceUrl+i,data:JSON.stringify(r),contentType:"application/json; charset=utf-8",dataType:"json",success:function(t){VP.Login.ModalDialog.append(t.d);VP.Login.SetLoginProperties(n);VP.Login.BindToLoginEvents();VP.Login.RedirectPageUrl=null}})};VP.Login.ShowLoginDialogWithRegisterPageRedirect=function(n,t=false){VP.Login.ShowDialog("5%");$.ajax({type:"POST","async":!1,cache:!1,url:VP.AjaxWebServiceUrl+"/GetLoginHtml",data:"{}",contentType:"application/json; charset=utf-8",dataType:"json",success:function(i){VP.Login.ModalDialog.append(i.d);VP.Login.SetLoginProperties(n);var r=window.location.pathname+window.location.search;VP.Login.BindToLoginEvents(r);VP.Login.RedirectPageUrl=null;t&&(VP.Login.DisableCloseOnEsc=!0)}})};VP.Login.ShowLoginDialogWithRedirectUrl=function(n){VP.Login.ShowDialog("5%");$.ajax({type:"POST","async":!1,cache:!1,url:VP.AjaxWebServiceUrl+"/GetLoginHtml",data:"{}",contentType:"application/json; charset=utf-8",dataType:"json",success:function(t){VP.Login.ModalDialog.append(t.d);VP.Login.BindToLoginEvents();VP.Login.RedirectPageUrl=n}})};VP.Login.ShowRegisterDialog=function(){$.ajax({type:"POST","async":!1,cache:!1,url:VP.AjaxWebServiceUrl+"/GetRegisterUserHtml",data:"{'siteId':'"+VP.SiteId+"'}",contentType:"application/json; charset=utf-8",dataType:"json",success:function(n){var t=n.d;window.location=t}})};VP.Login.ShowRegisterDialogWithRedirect=function(n){$.ajax({type:"POST","async":!1,cache:!1,url:VP.AjaxWebServiceUrl+"/GetRegisterUserHtmlRedirect",data:"{'redirectUrl':'"+n+"'}",contentType:"application/json; charset=utf-8",dataType:"json",success:function(n){var t=n.d;window.location=t}})};VP.Login.SetLoginProperties=function(n){n!=null?($("#txtEmail",VP.Login.ModalDialog).val(n),$("#txtPassword",VP.Login.ModalDialog).focus()):$("#txtEmail",VP.Login.ModalDialog).focus()};VP.Login.SetRegisterProperties=function(n){VP.Login.ShowPage(n);VP.Login.RegisterFields=$("#hiddenFields",VP.Login.ModalDialog).text().split(",")};VP.Login.StopEventPropagation=function(n){n.stopPropagation?n.stopPropagation():n.cancelBubble=!0};VP.Login.BindToLoginEvents=function(n){$("div.login",VP.Login.ModalDialog).unbind("keypress").keypress(function(n){VP.Login.KeyPressEvent(n,"btnLogin");VP.Login.StopEventPropagation(n)});$("div.forgotPassword",VP.Login.ModalDialog).unbind("keypress").keypress(function(n){n.which==13&&VP.Login.StopEventPropagation(n)});$("#btnLogin",VP.Login.ModalDialog).click(function(){VP.Login.ClearPasswordResetControls();$("#loginMessage",VP.Login.ModalDialog).text("");VP.Login.ValidateLogin()&&VP.Login.Authenticate()});$("#btnForgotPassword",VP.Login.ModalDialog).click(function(){VP.Login.ClearLoginControls();VP.Login.ClearPasswordMessageControls();$("#forgotPasswordMessage",VP.Login.ModalDialog).text("");VP.Login.ValidateResetPassword()&&VP.Login.ResetPassword()});
1$("#btnRegister",VP.Login.ModalDialog).click(function(){VP.Login.HideDialog();var t=VP.Login.GetRedirectUrlFromQueryParameter();t||(t=window.location.href);n!==null&&n!==undefined?VP.Login.ShowRegisterDialogWithRedirect(n):t?VP.Login.ShowRegisterDialogWithRedirect(t):VP.Login.ShowRegisterDialog()});$("#btnCancelLogin",VP.Login.ModalDialog).click(function(){VP.Login.HideDialog()});$("#btnClose",VP.Login.ModalDialog).click(function(){VP.Login.CloseBtnRedirectToPreviousPage()});$("#btnLoginOTP",VP.Login.ModalDialog).click(function(){VP.Login.ClearPasswordMessageControls();VP.Login.ValidateResetPassword()&&VP.Login.SendOTP()})};VP.Login.BindToRegisterEvents=function(){VP.Login.ModalDialog.unbind("keypress").keypress(function(n){if(n.which==13)return VP.Login.Register("p_0"),n.returnValue=!1,n.cancel=!0,n.keyCode=0,!1});$("#btnSignIn",VP.Login.ModalDialog).click(function(){VP.Login.HideDialog();VP.Login.ShowLoginDialog()})};VP.Login.BindToOTPEvents=function(){$("#btnClose",VP.Login.ModalDialog).click(function(){VP.Login.CloseBtnRedirectToPreviousPage()});$("#btnSendOTP",VP.Login.ModalDialog).click(function(){VP.Login.ValidateOTPEmail()&&VP.Login.SendOTP()})};VP.Login.BindToOTPConfirmationEvents=function(){$("#btnClose",VP.Login.ModalDialog).click(function(){VP.Login.CloseBtnRedirectToPreviousPage()});$("#btnConfirmOTP",VP.Login.ModalDialog).click(function(){VP.Login.ValidateOTPText()&&VP.Login.LoginFromOTP()});$("#btnResendOTP",VP.Login.ModalDialog).click(function(){VP.Login.ValidateOTPEmail()&&VP.Login.SendOTP(!0)});VP.Login.SetOTPAutoFocus()};VP.Login.SetOTPAutoFocus=function(){$("#num1").focus();var n=$(".splitBox").children();n.each(function(n,t){$(t).keyup(function(n){VP.Login.SplitBoxEventHandler(n)})})};VP.Login.SplitBoxEventHandler=function(n){var f=document.activeElement,t=document.activeElement.value,e=new RegExp("^[0-9]+$"),i,r,u;t.match(e)?t.toString().length>1&&(i=t.toString(),f.value=parseInt(i[i.length-1])):f.value="";n.which!==8?(r=document.activeElement.nextElementSibling,r&&r.focus()):(u=document.activeElement.previousElementSibling,u&&u.focus())};VP.Login.KeyPressEvent=function(n,t){if(n.which==13)return $("#"+t,VP.Login.ModalDialog).click(),n.returnValue=!1,n.cancel=!0,n.keyCode=0,!1};VP.Login.ClearPasswordResetControls=function(){$("#txtForgotPasswordEmail",VP.Login.ModalDialog).val("");$("#rfvForgotPasswordEmail",VP.Login.ModalDialog).text("").css("display","none");$("#lblForgotPasswordEmail",VP.Login.ModalDialog).text("").css("display","none");$("#forgotPasswordMessage",VP.Login.ModalDialog).text("")};VP.Login.ClearPasswordMessageControls=function(){$("#rfvForgotPasswordEmail",VP.Login.ModalDialog).text("").css("display","none");$("#lblForgotPasswordEmail",VP.Login.ModalDialog).text("").css("display","none")};VP.Login.ClearLoginControls=function(){$("#txtEmail",VP.Login.ModalDialog).val("");$("#rfvEmail",VP.Login.ModalDialog).text("").css("display","none");$("#txtPassword",VP.Login.ModalDialog).val("");$("#rfvPassword",VP.Login.ModalDialog).text("").css("display","none");$("#loginMessage",VP.Login.ModalDialog).text("")};VP.Login.SetCookie=function(n){if(n.Persistance==!0){var t=new Date;t.setTime(t.getTime()+n.CookieExpirationPeriod*864e5);document.cookie="VpLogin="+n.CookieValue+"; path=/;expires="+t.toGMTString()}else document.cookie="VpLogin="+n.CookieValue+"; path=/;"};VP.Login.RedirectToCurrentPage=function(){VP.Login.RedirectRelativeURL(VP.Login.CurrentPageUrl)};VP.Login.Authenticate=function(){$.ajax({type:"POST",url:VP.AjaxWebServiceUrl+"/Authenticate","async":!1,cache:!1,data:"{'email':'"+$("#txtEmail",VP.Login.ModalDialog).val()+"','password':'"+$("#txtPassword",VP.Login.ModalDialog).val()+"','siteId':'"+VP.SiteId+"'}",contentType:"application/json; charset=utf-8",dataType:"json",success:function(n){var t=n.d.CookieValue.trim().split(";");if(t[0]=="Locked:False")$("#loginMessage",VP.Login.ModalDialog).text("Incorrect password or email"),$("#txtPassword",VP.Login.ModalDialog).val("");else if(t[0]=="Locked:True")$("#loginMessage",VP.Login.ModalDialog).html(t[1]);else if(n.d.RedirectUrl!==""&&(VP.Login.CurrentPageUrl+=n.d.RedirectUrl),VP.Login.ClearUserInfo(),VP.Login.SetCookie(n.d),VP.Login.HideDialog(),VP.Login.RedirectPageUrl==null){const n=VP.Login.GetRedirectUrlFromQueryParameter();n?window.location.href=n:VP.Login.RedirectToCurrentPage()}else VP.Login.RedirectRelativeURL(VP.Login.CurrentPageUrl)}})};VP.Login.Logout=function(){$.ajax({type:"POST",url:VP.AjaxWebServiceUrl+"/Logout","async":!1,cache:!1,data:"{}",contentType:"application/json; charset=utf-8",dataType:"json",success:function(){var t=new Date;t.setTime(t.getTime()+-1728e5);document.cookie="VpLogin=something; expires="+t.toGMTString()+"; path=/";VP.Login.ClearUserInfo();VP.Login.ClearSailthruCookie();let n=VP.Login.CurrentPageUrl;n+=n.indexOf("?")>-1?"&":"?";n+="ts="+(new Date).getTime();VP.Login.RedirectRelativeURL(n)},error:function(n,t,i){console.error("Logout failed:",t,i)}})};VP.Login.RedirectRelativeURL=function(n){var t=/(^\w+:|^)\/\//,i=location.href.replace(t,"").split("#")[0],r=n.replace(t,"").split("#")[0];i.split("?")[0]==r.split("?")[0]?window.location.reload(!0):window.location=n};VP.Login.ResetPassword=function(){let n=VP.Login.GetRedirectUrlFromQueryParameter();n||(n=window.location.href);const t={email:$("#txtForgotPasswordEmail",VP.Login.ModalDialog).val(),siteId:VP.SiteId,siteHomeUrl:VP.Login.SiteUrl,passwordResetUrl:VP.Login.PasswordResetPageUrl,redirectUrl:n};$.ajax({type:"POST",url:VP.AjaxWebServiceUrl+"/ResetPassword","async":!1,cache:!1,data:JSON.stringify(t),contentType:"application/json; charset=utf-8",dataType:"json",success:function(n){n.d.IsSuccessful?$("#lblForgotPasswordEmail",VP.Login.ModalDialog).text(n.d.Message).css("display","block"):$("#rfvForgotPasswordEmail",VP.Login.ModalDialog).text(n.d.Message).css("display","block");$("#txtForgotPasswordUserName",VP.Login.ModalDialog).val("")}})};VP.Login.Register=function(n){if(VP.Login.ValidateRegister(n)){var t=VP.Login.GetRegisterFormData();$.ajax({type:"POST",url:VP.AjaxWebServiceUrl+"/RegisterPublicUser","async":!1,cache:!1,data:'{"args":"'+t+'"}',contentType:"application/json; charset=utf-8",dataType:"json",success:function(n){var i=n.d.CookieValue.charAt(0),t;i=="-"?(t=n.d.CookieValue.substring(1,n.d.CookieValue.length),$("#modalPopup .formList").append("<li id='errorMessage'>"+t+"<\/li>")):(VP.Login.ClearUserInfo(),VP.Login.SetCookie(n.d),VP.Login.HideDialog(),VP.Login.RedirectToCurrentPage())},error:function(){$(".formList",VP.Login.ModalDialog).append("<li id='errorMessage'>User creation failed. Please try again later<\/li>")}})}};VP.Login.ShowOTPDialog=function(){$.ajax({type:"POST",url:VP.AjaxWebServiceUrl+"/GetOTPHtml","async":!1,cache:!1,data:"{}",contentType:"application/json;
1 charset=utf-8",dataType:"json",success:function(n){VP.Login.ModalDialog.append(n.d);VP.Login.BindToOTPEvents()}})};VP.Login.SendOTP=function(n=false){let t="";t=n?$("#txtEmail").val().trim():$("#txtForgotPasswordEmail").val().trim();let i={email:t,siteId:parseInt(VP.SiteId),isResend:n};$.ajax({type:"POST",url:VP.AjaxWebServiceUrl+"/SendOTP","async":!1,cache:!1,data:JSON.stringify(i),contentType:"application/json; charset=utf-8",dataType:"json",success:function(t){t.d.IsValid?n?n&&($("#lblEmailMessage",VP.Login.ModalDialog).css("color","#138f13").text("The One Time password has been resent to this email."),VP.Login.ClearOtpValue(),$("#rfvOTP").text("")):($(".loginModule",VP.Login.ModalDialog).remove(),VP.Login.ModalDialog.append(t.d.OtpHtml),VP.Login.BindToOTPConfirmationEvents()):$("#rfvForgotPasswordEmail",VP.Login.ModalDialog).text(t.d.ErrorMessage).css("display","block")}})};VP.Login.LoginFromOTP=function(){let n=$("#txtEmail").val().trim(),t=parseInt(VP.Login.GetOtpValue().trim()),i={email:n,siteId:parseInt(VP.SiteId),otp:t};$.ajax({type:"POST",url:VP.AjaxWebServiceUrl+"/OTPLogin","async":!1,cache:!1,data:JSON.stringify(i),contentType:"application/json; charset=utf-8",dataType:"json",success:function(n){var t,i;if(n.d.IsSuccessful)if(t=n.d.LoginResult.CookieValue.trim().split(";"),t[0]=="Locked:True")i=VP.Login.DefaultAdminContactEmail,t.length>1&&t[1].trim().length>0&&(i=t[1]),$("#loginMessage",VP.Login.ModalDialog).html("This account has been locked due to multiple failed login attempts. Please send an email to <a href='mailto:"+i+"'>"+i+"<\/a> to unlock it.");else if(n.d.RedirectUrl!==""&&(VP.Login.CurrentPageUrl+=n.d.RedirectUrl),VP.Login.ClearUserInfo(),VP.Login.SetCookie(n.d.LoginResult),VP.Login.HideDialog(),VP.Login.RedirectPageUrl==null){const n=VP.Login.GetRedirectUrlFromQueryParameter();n?window.location.href=n:VP.Login.RedirectToCurrentPage()}else VP.Login.RedirectRelativeURL(VP.Login.CurrentPageUrl);else $("#rfvOTP",VP.Login.ModalDialog).css("display","block").text(n.d.ErrorMessage)}})};VP.Login.GetOtpValue=function(){for(var i=$(".splitBox").children(),t="",n=0;n<6;n++)t+=i[n].value;return t};VP.Login.ClearOtpValue=function(){for(var t=$(".splitBox").children(),n=0;n<6;n++)t[n].value=""};VP.Login.ValidateOTPEmail=function(){return VP.Login.ValidateEmail("txtEmail","rfvEmail")&&!0};VP.Login.ValidateOTPText=function(){var n=!0,t=VP.Login.GetOtpValue(),i=new RegExp("^[0-9]+$");return t.match(i)||($("#rfvOTP",VP.Login.ModalDialog).text("One Time Password must be an Integer.").css("display","inline"),n=!1),t.length<6&&($("#rfvOTP",VP.Login.ModalDialog).text("One Time Password must contain 6 digits.").css("display","inline"),n=!1),n};VP.Login.ValidateLogin=function(){var n=!0;return n=VP.Login.ValidateEmail("txtEmail","rfvEmail")&&n,VP.Login.ValidateTextBox("txtPassword","rfvPassword")&&n};VP.Login.ValidateResetPassword=function(){return VP.Login.ValidateEmail("txtForgotPasswordEmail","rfvForgotPasswordEmail")&&!0};VP.Login.ValidateRegister=function(n){return VP.Login.IsValidateAllPages=!0,VP.Login.ValidatePageId=n,VP.Login.ValidateRegisterFormData()};VP.Login.ValidateRegisterPage=function(n){return VP.Login.IsValidateAllPages=!1,VP.Login.ValidatePageId=n,VP.Login.ValidateRegisterFormData()};VP.Login.ValidateRegisterFormData=function(){VP.Login.ClearAllErrorMessages();var n=VP.Login.ClientValidate();return n||$(".formList",VP.Login.ModalDialog).prepend("<li id='errorMessage'>"+$("#"+VP.Login.ValidatePageId,VP.Login.ModalDialog).find(".hiddenPageError").html()+"<\/li>"),n};VP.Login.ValidateEmail=function(n,t){var i=VP.Login.ValidateTextBox(n,t);return i&&(i=VP.Login.ValidateEmailAddress($("#"+n,VP.Login.ModalDialog).val()),i||$("#"+t,VP.Login.ModalDialog).text("Invalid email").css("display","inline")),i};VP.Login.ValidateOTP=function(n,t){var i=VP.Login.ValidateTextBox(n,t);return i&&(i=VP.Login.ValidateOTPWithRegEx($("#"+n,VP.Login.ModalDialog).val()),i||$("#"+t,VP.Login.ModalDialog).text("One Time Password must be an Integer").css("display","inline")),i};VP.Login.ValidateOTPWithRegEx=function(n){return n!=""?(n=n.trim(),/^[0-9]+$/.test(n)):!1};VP.Login.ValidateEmailAddress=function(n){var t=!1,i;return n!=""&&(i=new RegExp("(^([\\w-+]+(?:\\.[\\w-+]+)*(?:[\\+]){0,1})@((?:[\\w-]+\\.)*\\w[\\w-]{0,66})\\.([A-Za-z]{2,6}(?:\\.[A-Za-z]{2})?)$)","i"),n.match(i)&&(t=!0)),t};VP.Login.ValidateTextBox=function(n,t){return $("#"+n,VP.Login.ModalDialog).val()==""?($("#"+t,VP.
1Login.ModalDialog).text("* Required").css("display","inline"),!1):($("#"+t,VP.Login.ModalDialog).css("display","none"),!0)};VP.Login.PreviousPage=function(n){var r,t,i,u;for(VP.Login.ClearAllErrorMessages(),r=$(".formHolder",VP.Login.ModalDialog),t=null,i=0;i<r.length;i++){if(u=$(r[i]).attr("id"),u==n&&t!=null){VP.Login.ShowPage(t);page=t;break}t=u}return!1};VP.Login.NextPage=function(n){var r,u,t,i;if(VP.Login.ValidateRegisterPage(n))for(r=$(".formHolder",VP.Login.ModalDialog),u=!1,t=0;t<r.length;t++){if(i=$(r[t]).attr("id"),u){VP.Login.ShowPage(i);page=i;break}i==n&&(u=!0)}return!1};VP.Login.ShowPage=function(n){for(var i=$(".formHolder",VP.Login.ModalPopup),t=0;t<i.length;t++)$(i[t]).attr("id")==n?$(i[t]).show():$(i[t]).hide()};VP.Login.ValidateField=function(n,t,i,r,u,f,e,o,s){var h=!0;return r&&(h=VP.Login.ValidateRequiredField(n,t,i,u,s)),h&&f&&(h=VP.Login.ValidateRegularExpressionField(n,t,i,e,o,s)),h};VP.Login.ValidateRequiredField=function(n,t,i,r,u){switch(n){case 1:return VP.Login.ValidateDropdownInput(t,i,r,u);case 2:case 5:case 12:return VP.Login.ValidateTextboxInput(t,i,r,u);case 3:return VP.Login.ValidateCheckboxlistInput(t,i,r,u)}return!0};VP.Login.ValidateRegularExpressionField=function(n,t,i,r,u,f){switch(n){case 2:case 5:case 12:return VP.Login.ValidateRegularExpression(t,i,r,u,f)}return!0};VP.Login.ClearAllErrorMessages=function(){$(".formList",VP.Login.ModalDialog).find("#errorMessage").remove();$(".formList li",VP.Login.ModalDialog).removeClass("error").find(".error").remove()};VP.Login.ClearErrorMessage=function(n){$("#"+n,VP.Login.ModalDialog).removeClass("error").find(".error").remove()};VP.Login.AddErrorMessage=function(n,t){VP.Login.ModalDialog.find("#"+n+" p.error").length==0?VP.Login.ModalDialog.find("#"+n).addClass("error").append('<p class="error">'+t+"<\/p>"):VP.Login.ModalDialog.find("#"+n+" p.error").append("<br />"+t)};VP.Login.ValidateRegularExpression=function(n,t,i,r,u){if(VP.Login.ShouldValidate(n,u)){var e=$("#modalPopup #"+n).val(),f=null;try{f=new RegExp(i,"i")}catch(o){return!0}return e.match(f)!=null?!0:(r==""&&(r="Value not in correct format"),VP.Login.AddErrorMessage(t,r),!1)}return!0};VP.Login.ShouldValidate=function(n){if(!VP.Login.IsValidateAllPages){var t=$("#"+VP.Login.ValidatePageId+" #"+n,VP.Login.ModalDialog);if(t.length==0)return!1}return!0};VP.Login.ValidateTextboxInput=function(n,t,i,r){if(VP.Login.ShouldValidate(n,r)){var u=$("#"+n,VP.Login.ModalDialog).val();return u==""?(i==""&&(i="This field is required"),VP.Login.AddErrorMessage(t,i),!1):!0}return!0};VP.Login.ValidateDropdownInput=function(n,t,i,r){if(VP.Login.ShouldValidate(n,r)){var u=$("#"+n,VP.Login.ModalDialog).val();return u==""?(i==""&&(i="This field is required"),VP.Login.AddErrorMessage(t,i),!1):!0}return!0};VP.Login.RegisterDatePicker=function(n,t,i){$(document).ready(function(){$("#"+n,VP.Login.ModalDialog).datepicker({changeYear:!0,yearRange:t+":"+i})})};VP.Login.ValidateCheckboxlistInput=function(n,t,i,r){var o=$("#"+r+" #"+t+" #"+n+" input[type=checkbox]",VP.Login.ModalDialog),u,e,f;if(o.length==0)return!0;for(u=!1,e=$("#"+t+" #"+n+" input[type=checkbox]",VP.Login.ModalDialog),f=0;f<e.length;f++)u=$(e[f]).attr("checked")||u;return u==!1&&(i==""&&(i="This field is required"),VP.Login.AddErrorMessage(t,i)),u};VP.Login.CheckEmail=function(n,t){var i=$("#"+n,VP.Login.ModalDialog).val(),r;VP.Login.ValidateEmailAddress(i)&&(VP.Login.ClearErrorMessage(t),i!=""&&(r=new RegExp("(^([\\w-+]+(?:\\.[\\w-+]+)*(?:[\\+]){0,1})@((?:[\\w-]+\\.)*\\w[\\w-]{0,66})\\.([A-Za-z]{2,6}(?:\\.[A-Za-z]{2})?)$)","i"),i.match(r)&&$.ajax({type:"POST","async":!1,cache:!1,url:VP.AjaxWebServiceUrl+"/IsUserExist",data:"{'email' : '"+i+"','siteId' : '"+VP.SiteId+"'}",contentType:"application/json; charset=utf-8",dataType:"json",success:function(n){n.d&&VP.Login.AddErrorMessage(t,"This email is already taken. Please provide another")}})))};VP.Login.ValidateRegistrationConfirmPassword=function(n,t,i,r){return $("#"+n,VP.Login.ModalDialog).val()==$("#"+t,VP.Login.ModalDialog).val()?!0:(VP.Login.ModalDialog.find("#"+r+" p.error").length==0&&(VP.Login.AddErrorMessage(r,"Passwords do not match"),$("#"+n,VP.Login.ModalDialog).val(""),$("#"+t,VP.
1Login.ModalDialog).val(""),VP.Login.ModalDialog.find("#"+i).addClass("error")),!1)};VP.Login.GetRegisterFormData=function(){for(var n,s,f,r,e,u,t=VP.SiteId,i,o=0;o<VP.Login.RegisterFields.length;o++){n=[];n=VP.Login.RegisterFields[o].split(":");s=n[2];switch(s){case"1":typeof t=="undefined"?t=n[0]+":"+$("#"+n[1],VP.Login.ModalDialog).val():t+=";"+n[0]+":"+$("#"+n[1],VP.Login.ModalDialog).val();break;case"2":typeof t=="undefined"?t=n[0]+":"+$("#"+n[1],VP.Login.ModalDialog).val():t+=";"+n[0]+":"+$("#"+n[1],VP.Login.ModalDialog).val();break;case"3":for(f=$("#"+n[1]+" .checkbox",VP.Login.ModalDialog),i="",r=0;r<f.length;r++)f[r].checked&&(i=i?i+"|"+f[r].value:f[r].value);typeof t=="undefined"?t=n[0]+":"+i:t+=";"+n[0]+":"+i;break;case"5":typeof t=="undefined"?t=n[0]+":"+$("#"+n[1],VP.Login.ModalDialog).val():t+=";"+n[0]+":"+$("#"+n[1],VP.Login.ModalDialog).val();break;case"6":for(e=$("#"+n[1]+" .radio",VP.Login.ModalDialog),u=0;u<e.length;u++)e[u].checked&&(typeof t=="undefined"?t=n[0]+":"+e[u].value:t+=";"+n[0]+":"+e[u].value);break;case"12":typeof t=="undefined"?t=n[0]+":"+$("#"+n[1],VP.Login.ModalDialog).val():t+=";"+n[0]+":"+$("#"+n[1],VP.Login.ModalDialog).val();break;case"15":typeof t=="undefined"?t=n[0]+":"+$("#"+n[1],VP.Login.ModalDialog)[0].checked:t+=";"+n[0]+":"+$("#"+n[1],VP.Login.ModalDialog)[0].checked}}return t};VP.Login.ShowChangeCountry=function(){VP.Login.ShowDialog("5%");$.ajax({type:"POST","async":!1,cache:!1,url:VP.AjaxWebServiceUrl+"/GetChangeCountryPopup",data:"{'countryId':'"+VP.Login.CountryId+"','siteId':'"+VP.SiteId+"'}",contentType:"application/json; charset=utf-8",dataType:"json",success:function(n){VP.Login.ModalDialog.append(n.d);VP.Login.BindToChangeCountryEvents()}})};VP.Login.BindToChangeCountryEvents=function(){$("#btnSetCountry",VP.Login.ModalDialog).click(function(){var n=$("#ddlCountry").val();VP.Login.SetUserInfo(n);VP.Login.HideDialog();VP.Login.RedirectToCurrentPage()});$(".exit",VP.Login.ModalDialog).click(function(){VP.Login.HideDialog()});$("#btnCancel",VP.Login.ModalDialog).click(function(){VP.Login.HideDialog()});$("#lnkRegister",VP.Login.ModalDialog).click(function(){VP.Login.HideDialog();VP.Login.ShowRegisterDialog()});$("#lnkLogin",VP.Login.ModalDialog).click(function(){VP.Login.HideDialog();VP.Login.ShowLoginDialog()})};VP.Login.SetUserInfo=function(n){document.cookie="VpUserInfo="+n+"; path=/"};VP.Login.ClearUserInfo=function(){var n=new Date;n.setTime(n.getTime()+-1728e5);document.cookie="VpUserInfo=sometghing; expires="+n.toGMTString()+"; path=/"};VP.Login.ClearSailthruCookie=function(){var n=new Date;n.setTime(n.getTime()+-1728e5);document.cookie=VP.Login.SailthruCookieKey+"=something; expires="+n.toGMTString()+"; path=/";document.cookie=VP.Login.SailthruContentCookieKey+"=something; expires="+n.toGMTString()+"; path=/"};VP.Login.GetRedirectUrlFromQueryParameter=function(){const n=VP.Login.GetQueryStringParameter("ru");if(!n)return null;const t=new URL(n,window.location.origin);return t.searchParams.set("ts",(new Date).getTime()),t.toString()};VP.Login.Initialize();RegisterNamespace("VP.NavigationMenu");VP.NavigationMenu.CurrentPageTitle="";VP.NavigationMenu.Initialize=function(){$(document).ready(function(){for(var i,t=$(".menuLink"),r,n=0;n<t.length;n++)i=$(t[n]).attr("title"),i!=null&&($(t[n]).addClass(i.replace(/ /gi,"")),i==VP.NavigationMenu.CurrentPageTitle&&($(t[n]).parent().addClass("active"),r=n));$("body").trigger({type:"menuReady",menuItems:t,menuIndex:r})})};VP.NavigationMenu.Initialize();RegisterNamespace("VP.PrimaryContainer");VP.PrimaryContainer.SaveContentButtonSessionKey="SAVE_CONTENT_PENDING";VP.PrimaryContainer._isSaveContentButtonInitialized=!1;$(document).ready(function(){VP.PrimaryContainer.InitializeSaveContentButton()});VP.PrimaryContainer.InitializeSaveContentButton=function(){if(!VP.PrimaryContainer._isSaveContentButtonInitialized){const n=document.getElementById("btnSaveContent");n&&(VP.PrimaryContainer._isSaveContentButtonInitialized=!0,VP.PrimaryContainer.SetSaveButtonTitle(),VP.PrimaryContainer.HandlePendingSaveContentAction(),$("#btnSaveContent").click(n=>{if(n.preventDefault(),!VP.Login.IsLogged||VP.Login.IsLogged!=="true"){sessionStorage.setItem(VP.PrimaryContainer.SaveContentButtonSessionKey,"true");VP.Login.ShowLoginDialog();return}const t=!!n.target.getAttribute("data-id");t?VP.PrimaryContainer.RemoveSavedContent():(VP.PrimaryContainer.TriggerSavedContentClickthrough(),VP.PrimaryContainer.SaveContent())}
1))}};VP.PrimaryContainer.SaveContent=function(){const n=document.getElementById("btnSaveContent"),t=`/WebServices/AjaxService.asmx/CreatePublicUserSavedContent`,i={contentId:n.getAttribute("data-contentId"),contentType:n.getAttribute("data-contentType"),url:window.location.pathname+window.location.search,title:document.querySelector("div.header h1").innerText,clientTimezoneOffset:0-(new Date).getTimezoneOffset()/60};n.disabled=!0;n.classList.add("btn-save-content-add-loader");$.ajax({type:"POST","async":!0,cache:!1,url:t,data:JSON.stringify(i),contentType:"application/json; charset=utf-8",dataType:"json",success:function(t){n.disabled=!1;n.classList.remove("btn-save-content-add-loader");n.classList.add("saved");n.setAttribute("data-id",t.d.Id);n.value="Saved";VP.PrimaryContainer.SetSaveButtonTitle()},error:function(n,t,i){console.error(i)}})};VP.PrimaryContainer.RemoveSavedContent=function(){const n=document.getElementById("btnSaveContent"),t={publicUserSavedContentId:n.getAttribute("data-id")};n.disabled=!0;n.classList.add("btn-save-content-remove-loader");$.ajax({type:"POST","async":!0,cache:!1,url:"/WebServices/AjaxService.asmx/RemovePublicUserSavedContent",data:JSON.stringify(t),contentType:"application/json; charset=utf-8",dataType:"json",success:function(){n.disabled=!1;n.classList.remove("btn-save-content-remove-loader");n.classList.remove("saved");n.removeAttribute("data-id");n.value="Save";VP.PrimaryContainer.SetSaveButtonTitle()},error:function(n,t,i){console.error(i)}})};VP.PrimaryContainer.SetSaveButtonTitle=function(){const t=document.getElementById("btnSaveContent");if(t){const i=t.hasAttribute("data-id");let n;switch(t.getAttribute("data-contentType")){case"1":n="Search Result";break;case"2":n="Product";break;case"4":n="Article";break;default:n=""}const r=i?`Remove Saved ${n}`:`Save ${n} for Later`;t.title=r}};VP.PrimaryContainer.HandlePendingSaveContentAction=function(){const n=VP.PrimaryContainer.SaveContentButtonSessionKey;sessionStorage.getItem(n)==="true"&&(sessionStorage.removeItem(n),VP.Login.IsLogged!=="true"||$("#btnSaveContent").attr("data-id")||(VP.PrimaryContainer.TriggerSavedContentClickthrough(),VP.PrimaryContainer.SaveContent()))};VP.PrimaryContainer.TriggerSavedContentClickthrough=function(){if(window.s){const u=document.getElementById("btnSaveContent"),i=+u.getAttribute("data-contentType"),r="event21";let n,t;switch(i){case 1:n=["events","products","eVar1","eVar2","eVar7","eVar9","eVar20","eVar37","eVar39","eVar40","eVar43","prop13","prop14","prop15","prop16","prop18","prop25"];t="Matrix Content Save Button Click";break;case 2:n=["events","products","eVar1","eVar7","eVar9","eVar20","eVar39","prop13","prop14","prop15","prop16","prop25"];t="Product Content Save Button Click";break;case 4:n=["events","eVar20","eVar25","eVar26","prop13","prop14","prop15","prop25"];t="Article Content Save Button Click";break;default:throw`Content type ${i} is not supported.`;}s.linkTrackEvents=r;s.events=r;s.linkTrackVars=n.join(",");try{s.tl(!0,"o",t)}finally{s.linkTrackEvents="";s.events="";s.linkTrackVars=""}}};function elementInViewport(n,t){var i=$(window),r={top:i.scrollTop(),left:i.scrollLeft()};r.bottom=r.top+i.height();let f=$("#"+n),e=$("#"+t),o=f.offset(),u=e.offset();return u.bottom=u.top+e.outerHeight(),o.bottom=u.bottom+f.outerHeight(),r.bottom<o.bottom?!1:!0}function SetCheckedOptionCount(n){let t=$(".search-option input:checkbox:checked",n).length;t>0?n.siblings(".lbl-select").html("Selected ("+t+") Options"):n.siblings(".lbl-select").html("Select Options")}RegisterNamespace("VP.ArticleList");VP.ArticleList=function(n,t,i,r,u,f){function s(){let t=$(".search-option input:checkbox:checked",e._element),n="";return t.each(function(){let t=$(this).parent(),i=t.attr("id").replace("optid_","");n+=i+","}),n.slice(0,-1)}var e;this._moduleId=n;this._element="#"+t;e=this;$("#btnFilter",this._element).click(function(){var n=e.GetFilterUrl(document.location,$(".vendors select",e._element).val(),$(".categories select",e._element).val(),s(),!1);window.location.href===n?location.reload(!0):window.location.href=n});
1$("#btnReset",this._element).click(function(){document.location=e.GetFilterUrl(document.location,"-1","-1",!0)});$("#filterHeader",this._element).click(function(){$("#filterHeader.hidden",e._element).length>0?($("#filterHeader",e._element).removeClass("hidden"),$("#filterBody",e._element).show("slow"),$("#filterHeader",e._element).text("Hide Filter")):($("#filterHeader",e._element).addClass("hidden"),$("#filterBody",e._element).hide("slow"),$("#filterHeader",e._element).text("Show Filter"))});var o=$("#filterBody",this._element),h=$(".categories",o),c=$(".vendors",o),l=$(".custom",o),a=$(".search-groups",o);i||r||u||f||$(".filter",this._element).hide()};VP.ArticleList.prototype.GetFilterUrl=function(n,t,i,r,u){var c=n.href.split("?"),v=c[0]+"?",h=!1,f=0,o=-1,e=[],l,s,a;if(c.length==2)for(l=c[1].split("#")[0],e=l.split("&"),f=0;f<e.length;f++)e[f].indexOf("afcid_"+this._moduleId)>=0?(u?(e.splice(f,1),f--,o--):e[f]="afcid_"+this._moduleId+"="+i,h=!0):e[f].indexOf("afvid_"+this._moduleId)>=0?(u?(e.splice(f,1),f--,o--):e[f]="afvid_"+this._moduleId+"="+t,h=!0):e[f].indexOf("alpi_"+this._moduleId)>=0?u?o=f:e[f]="alpi_"+this._moduleId+"=1":e[f].indexOf("asoids_"+this._moduleId)>=0&&(u?(e.splice(f,1),f--,o--):e[f]="asoids_"+this._moduleId+"="+r,h=!0);h||u||(t!=undefined&&e.push("afvid_"+this._moduleId+"="+t),i!=undefined&&e.push("afcid_"+this._moduleId+"="+i),r!=undefined&&e.push("asoids_"+this._moduleId+"="+r));o=this.SetCustomPropertyFilter(u,e,o);u&&o>=0&&e.splice(o,1);s="";f=0;for(f in e)s?s+="&"+e[f]:s=e[f];return a=v+s,a+"#al"+this._moduleId};VP.ArticleList.prototype.SetCustomPropertyFilter=function(n,t,i){for(var f=[],l=".ddlCustomProperty_"+this._moduleId,s=$(l,this._element),r=0,e,h,c,u,o,r=0;r<s.length;r++)e=s[r].id,h=n===!1?$("#"+e,this._element).val():"-1",c=e.split("CustomProperty"),f["cpf"+c[1]]=encodeURIComponent(h);u=0;for(u in f){for(o=!1,r=0;r<t.length;r++)t[r].indexOf(u)>=0&&(n?(t.splice(r,1),r--,i--):t[r]=u+"="+f[u],o=!0);o||n||t.push(u+"="+f[u])}return i};VP.ArticleList.RenderRatingControl=function(n){n.raty({readOnly:!0,starOff:"/Images/star-off.png",starOn:"/Images/star-on.png",starHalf:"/Images/star-half.png",halfShow:!0,hints:["Ratings","Ratings","Ratings","Ratings","Ratings"],noRatedMsg:"Ratings",score:function(){return $(this).attr("ratingScore")}})};VP.ArticleList.ShowHideSearchGroupOptions=function(n,t){let r=$("#"+n),i=$("#"+t);if($("#"+t).is(":hidden")){if(elementInViewport(t,n))i.css("margin-top","unset");else{let n=r.outerHeight()+i.outerHeight(),t="-"+n+"px";i.css("margin-top",t)}i.show()}else i.hide(),r.focus();return!1};VP.ArticleList.SetCheckBoxStates=function(n,t){var f=$(t.currentTarget).attr("class").split(" ")[0],u=$(t.currentTarget),i;let r=$("#"+n);if(f=="search-group")i=$(u)[0].id,$("input:checkbox",u).is(":checked")?$(".search-option."+i+" input:checkbox",r).prop("checked",!0):$(".search-option."+i+" input:checkbox",r).prop("checked",!1);else{i=$(t.currentTarget).attr("class").split(" ")[1];let n=$("."+i+" input:checkbox",r).length,u=$("."+i+" input:checkbox:checked",r).length;u==n?$("#"+i+" input:checkbox",r).prop("checked",!0):$("#"+i+" input:checkbox",r).prop("checked",!1)}SetCheckedOptionCount(r)};RegisterNamespace("VP.CarouselView");VP.CarouselView=function(n,t=null){function g(){i=$(l);p=$("li.articleListRow",i).length;e="click";o=!1;r=$(".articleList",i).width()+10;d=$("li.articleListRow",i).height()+10;s=t?t:tt(r);u=r/s;a=u*p;h=Math.ceil(a/r);v=0-(h-1)*r+u}function nt(){$("ul.articleList",i).css({width:a+"px"});$(l+" ul.articleList li").css({width:u+"px",float:"left"});$(l+" ul.articleList").css({left:"0px","column-count":"unset",position:"relative"});$(".articleList",i).css("overflow","hidden")}function tt(n){var t=4;return n<=1400&&(t=3),n<=800&&(t=2),n<=480&&(t=1),t}function it(){e="ontouchstart"in document.documentElement?"touchend":"click"}function c(){return Math.ceil(0-f()/r)+1}function f(){return parseInt($("ul.articleList",i).css("left"))}function w(n){o||(o=!0,$("ul.articleList",i).animate({left:n},700,function(){o=!1;b();k()}))}function rt(){c()>1?y(c()-1):f()<0&&w(0)}function ut(){return f()>=v&&y(c()+1),!1}function y(n){var t=-1*(n-1)*s*u;w(t)}function ft(){$("div.carouselNavigation",i).remove();i.append('<div class="carouselNavigation"><\/div>');$("div.carouselNavigation",i).append('<a class="carouselLeft">Left<\/a>');$("div.carouselNavigation",i).append('<a class="carouselRight">Right<\/a>');$("div.carouselNavigation",i).css("width",$("div.carouselNavigation",i).parent().parent().width());$("a.carouselRight",i).removeClass("disabled");$("a.carouselLeft",i).addClass("disabled");$("a.carouselLeft",i).click(function(n){n.preventDefault();rt()});$("a.carouselRight",i).click(function(n){n.preventDefault();ut()});h==1&&($("a.carouselRight",i).addClass("disabled"),$("a.carouselLeft",i).addClass("disabled"))}function et(){var n,t;for($("div.carouselCircleNavigation",i).remove(),i.append('<div class="carouselCircleNavigation"><\/div>'),n=1;n<=h;n++)t='<a class="carouselCircleButton" data-section="'+n+'">Circle Button<\/a>',$("div.carouselCircleNavigation",i).append(t);$(".carouselCircleNavigation a",i).removeClass("active");$(".carouselCircleNavigation a:eq(0)",i).addClass("active");$(".carouselCircleNavigation",i).width($(".carouselCircleNavigation a",i).length*16);$("a.carouselCircleButton",i).bind(e,function(){y(parseInt($(this).data("section")))})}function b(){$(".carouselNavigation a",i).removeClass("disabled");f()===0&&$("a.carouselLeft",i).addClass("disabled");f()<v&&$("a.carouselRight",i).addClass("disabled")}function k(){$("a.carouselCircleButton",i).removeClass("active");$("a.carouselCircleButton:eq("+(c()-1)+")",i).addClass("active")}let l=`.carouselView#${n}`,i=null,p=null,e=null,o=!1,r=null,s=null,u=null,a=null,d=null,h=null,v=null;g();it();nt();ft();et();b();k()};$(document).ready(function(){typeof VP.ratyInitialized!="undefined"&&VP.ratyInitialized||(VP.ratyInitialized=!0,VP.ArticleList.RenderRating
1Control($(".ratingControl")));$(document).click(function(n){var t=$(".lbl-select");$(n.target).hasClass("lbl-select")&&t.length>1&&(t=$.grep(t,function(t){return t.id!=n.target.id}),$.each(t,function(){let n=$(this).siblings(".search-items");n.hide()}));$(n.target).hasClass("lbl-select")||$(n.target).parents(".search-items").length!==0||$(".search-items").hide();n.stopPropagation});$(window).scroll(function(){$(".search-items").each(function(){$(this).is(":visible")&&$(this).hide()})})});RegisterNamespace("VP.TabContainer");var tabContainers=[];VP.TabContainer=function(n,t,i,r){this._moduleInstanceId=n;this._tabElementId=t;this._element=null;this._persistState=i;this._serverRenderTabs=r};VP.TabContainer.prototype.Initialize=function(){var n=this,t=!0;$(document).ready(function(){var r,u,e,s,h,i,o,f;if(n._element=$("#"+n._tabElementId),r=0,u=!0,this.location.hash==""&&(u=!1),e=VP.TabContainer.GetQueryStringParameters(),s=e.includes("srptab"),s&&(u=!0,h=e.srptab.toLowerCase().split("#"),f={product:"products",category:"categories",article:"articles"},this.location.hash=f[h[0]]),i="tab"+n._moduleInstanceId,u)f=this.location.hash.substring(1).replace(/\s/g,""),$(".tab > ul > li").each(function(t,u){var e=u.textContent;return e=e.split("(")[0].replace(/\s/g,"").toLowerCase(),f==e?(r=t,n._persistState&&(i="tab"+n._moduleInstanceId,$.Cookie(i,r)),!1):void 0});else{o=$.Cookie(i);o&&(r=parseInt(o,10));const u=new URLSearchParams(window.location.search),t=u.get("tab");t&&(r=VP.TabContainer.GetSelectedTabIndex(t));n._persistState||$.Cookie(i,null)}n._element.tabs({active:r,activate:function(r,u){var f=u.newTab.text(),e,o,s;f=f.split("(")[0].replace(/\s/g,"").toLowerCase();t||(n._serverRenderTabs.includes(f)?(e=window.location.search,e.includes("tab")?window.location.hash=f:e.includes(f)?(o=window.location.href,s=VP.TabContainer.UpdateTabQueryParamValue(o,f),window.open(s,"_parent")):window.open(e?e+"&tab="+f:"?tab="+f,"_parent")):window.location.hash=f);n._persistState&&$.Cookie(i,$(this).tabs("option","active"))}});n._persistState?tabContainers.push(i):$(".pages.module li").bind("click",function(){$.Cookie(i,$(".content.tab").tabs("option","active"))});t=!1})};VP.TabContainer.GetSelectedTabIndex=function(n){var t=0;return $(".tab > ul > li").each(function(i,r){var u=r.textContent;u=u.split("(")[0].replace(/\s/g,"").toLowerCase();u==n&&(t=i)}),t};VP.TabContainer.UpdateTabQueryParamValue=function(n,t){var i;return n=i.split("#")[0],i=new URL(n),i.searchParams.set("tab",t),i.href};VP.TabContainer.prototype.SelectTab=function(n,t){n.tabs({active:t})};$(document).ready(function(){setTimeout(function(){VP.TabContainer.CleanCookies()},500)});VP.TabContainer.CleanCookies=function(){var n,t;if(tabContainers&&(n=$.Cookie.Match("tab"),n))for(t in n)$.inArray(t,tabContainers)<0&&$.Cookie(t,null)};VP.TabContainer.GetQueryStringParameters=function(){for(var t=[],n,r=window.location.href.slice(window.location.href.indexOf("?")+1).split("&"),i=0;i<r.length;i++)n=r[i].split("="),t.push(n[0]),t[n[0]]=n[1];return t};RegisterNamespace("VP.SelectedProducts");VP.SelectedProducts.Products=[];VP.SelectedProducts.LeadDisabledProducts=[];VP.SelectedProducts.FeaturedProducts=[];VP.SelectedProducts.ProductPositions=[];VP.SelectedProducts.Container=null;VP.SelectedProducts.Form=null;VP.SelectedProducts.ContainerHidden=!0;VP.SelectedProducts.MaxProducts=5;VP.SelectedProducts.ProductUrl=null;VP.SelectedProducts.AnimationTime=0;VP.SelectedProducts.HasProducts=!1;VP.SelectedProducts.CurrentTip={};VP.SelectedProducts.CountDown=null;VP.SelectedProducts.LeadTypes=[];VP.SelectedProducts.CategoryId=0;VP.SelectedProducts.SelectedElem=null;VP.SelectedProducts.Init=function(){$(document).ready(function(){VP.SelectedProducts.Container=$("#selectedProducts");VP.SelectedProducts.ProductUrl=$.vp.globals.productDirectoryLocation||"/";VP.SelectedProducts.CategoryId=$("input[id$='hdnCategoryId']",VP.SelectedProducts.Container).val();VP.SelectedProducts.Form=$("#frmMain");typeof VP.ratyInitialized!="undefined"&&VP.ratyInitialized||(VP.ratyInitialized=!0,VP.SelectedProducts.RenderRating
1Control());$("body").bind("productSelected",function(n,t){VP.SelectedProducts.Products.length<VP.SelectedProducts.MaxProducts&&VP.SelectedProducts.Add(t)});$("body").bind("productDeselected",function(n,t){VP.SelectedProducts.Remove(t)});$("a[id$='lnkSelProAction']",VP.SelectedProducts.Container).click(function(n){VP.SelectedProducts.Action($(this).attr("href"));n.preventDefault()});$("a[id$='lnkSelProCompare']",VP.SelectedProducts.Container).click(function(n){VP.SelectedProducts.Products.length<2?alert("Please select at least two products"):VP.SelectedProducts.Compare($(this).attr("href"));$("a[id$='clearSelectedProds']",VP.SelectedProducts.Container).click(function(n){VP.SelectedProducts.Action($(this).attr("href"));n.preventDefault()});n.preventDefault()});$("h5",VP.SelectedProducts.Container).click(function(n){VP.SelectedProducts.ToggleView(n,!0)});$("a.find",VP.SelectedProducts.Container).attr("href",VP.SelectedProducts.ProductUrl);VP.SelectedProducts.Load();$(VP.SelectedProducts.Container).on("mouseover","ul li.active",function(n){VP.SelectedProducts.StopCountDown(n);VP.SelectedProducts.ShowProductInfo(n);n.preventDefault()});$(VP.SelectedProducts.Container).on("mouseout","ul li.active",function(n){VP.SelectedProducts.StartCountDown(n);n.preventDefault()});$(VP.SelectedProducts.Container).on("mouseover",".qtip",function(n){VP.SelectedProducts.StopCountDown(n);n.preventDefault()});$(VP.SelectedProducts.Container).on("mouseout",".qtip",function(n){VP.SelectedProducts.StartCountDown(n);n.preventDefault()});VP.SelectedProducts.ToggleGetQuoteButton()})};VP.SelectedProducts.RenderRatingControl=function(){$(".ratingControl").raty({readOnly:!0,starOff:"/Images/star-off.png",starOn:"/Images/star-on.png",starHalf:"/Images/star-half.png",halfShow:!0,hints:["Ratings","Ratings","Ratings","Ratings","Ratings"],noRatedMsg:"Ratings",score:function(){return $(this).attr("ratingScore")}})};VP.SelectedProducts.Action=function(n){if(VP.SelectedProducts.Products.length>0&&!$("a[id$='lnkSelProAction']").is(".disabled")){var t=VP.SelectedProducts.GetCommonLeadType();t>0&&(n=VP.SelectedProducts.UpdateLeadType(n,t));window.location=n+"&ilt=true&cids="+VP.SelectedProducts.GetSelectedProductIds()+"&ppim="+VP.SelectedProducts.ProductPositions.join()}};VP.SelectedProducts.DetermineInitialState=function(){$.Cookie("selectedProductsToggle")!=null&&$.Cookie("selectedProductsToggle")!=""?$.Cookie("selectedProductsToggle")=="open"?VP.SelectedProducts.ShowContainer(null):$.Cookie("selectedProductsToggle")=="closed"&&VP.SelectedProducts.HideContainer(null):VP.SelectedProducts.HasProducts?VP.SelectedProducts.ShowContainer(null):VP.SelectedProducts.Form.hasClass("VerticalMatrix")?VP.SelectedProducts.ShowContainer(null):VP.SelectedProducts.HideContainer(null)};VP.SelectedProducts.StartCountDown=function(){clearTimeout(VP.SelectedProducts.CountDown);VP.SelectedProducts.CountDown=setTimeout("VP.SelectedProducts.HideProductInfo()",400)};VP.SelectedProducts.StopCountDown=function(){clearTimeout(VP.SelectedProducts.CountDown)};VP.SelectedProducts.HideProductInfo=function(){VP.SelectedProducts.CurrentTip&&VP.SelectedProducts.CurrentTip.qtip("toggle",!1);clearTimeout(VP.SelectedProducts.CountDown)};VP.SelectedProducts.ImageLoaded=function(){if(VP.SelectedProducts.SelectedElem){var t=$(VP.SelectedProducts.SelectedElem).offset().top,n=$("div[aria-hidden='false'].qtip"),i=$(n).outerHeight(),r=t-i-10;$(n).offset({top:r})}};VP.SelectedProducts.ShowProductInfo=function(n){var t=$(n.currentTarget);VP.SelectedProducts.SelectedElem=t;t.data("hasTip")||$(t).qtip({overwrite:!1,content:{text:unescape($(t).attr("data-content")),title:{text:unescape($(t).attr("data-title")),button:"Close"}},show:{event:n.type,ready:!0,solo:!0},hide:{event:"unfocus"},position:{my:"bottom left",at:"top center",container:VP.SelectedProducts.Container,viewport:!1},style:{tip:!0,classes:"qtip-light qtip-titlebar ui-tooltip-rounded matrix-zoom"},prerender:!1},n);t.data("hasTip",!0);VP.SelectedProducts.CurrentTip=t};VP.SelectedProducts.Compare=function(n){VP.SelectedProducts.Products.length>0&&(window.location=n+"?compare="+VP.SelectedProducts.GetSelectedProductIds()+"&ppim="+VP.SelectedProducts.ProductPositions.join()+VP.SelectedProducts.GetCategoryQueryString()+"&fpids="+VP.SelectedProducts.FeaturedProducts.join())};VP.SelectedProducts.GetPageIndex=function(){var r=1,u=location.search.substring(1),t,n,i,f;if(u!="")for(t=u.split("&"),n=0;n<t.length;n++)if(i=t[n].split("="),f=i[0].split("_"),f[0]=="vmpi"){r=i[1];break}return r};VP.SelectedProducts.Add=function(n){var r=n.id+"_"+VP.SelectedProducts.CategoryId,i,t,u;if($.inArray(r,VP.SelectedProducts.Products)==-1){if(VP.SelectedProducts.Products.push(r),i=$("input:checkbox.action"),n.position)VP.SelectedProducts.ProductPositions.push(n.id+"_"+n.position);else{for(t=0;t<i.length;t++)if(n.id==i[t].value){var f=VP.SelectedProducts.GetPageIndex(),e=i.length,o=(f*1-1)*e+t+1,s=n.id+"_"+o;VP.SelectedProducts.ProductPositions.push(s);i[t].attributes.featuredProduct.value=="True"&&VP.SelectedProducts.FeaturedProducts.push(n.id)}VP.SelectedProducts.Products.length>VP.SelectedProducts.MaxProducts&&VP.SelectedProducts.Delete(VP.SelectedProducts.Products[0].split("_")[0]);u=VP.SelectedProducts.GetProducts(n.id.toString());VP.SelectedProducts.Render(u);$.Cookie("selectedProducts",VP.SelectedProducts.Products.join());$.Cookie("selectedProductPositions",VP.SelectedProducts.ProductPositions.join());$.Cookie("selectedFeaturedProducts",VP.SelectedProducts.FeaturedProducts.join())}n.actionDisabled&&(VP.SelectedProducts.LeadDisabledProducts.push(r),$.Cookie("leadDisabledProducts",VP.SelectedProducts.LeadDisabledProducts.join()));VP.SelectedProducts.ToggleGetQuoteButton()}};VP.SelectedProducts.Render=function(n){n!=null&&VP.SelectedProducts.Append(n);VP.SelectedProducts.RenderEmptyItems();VP.SelectedProducts.RenderCount()};VP.SelectedProducts.RenderEmptyItems=function(){if($("li[rel='-1']",VP.SelectedProducts.Container).remove(),VP.SelectedProducts.Products.length<VP.SelectedProducts.MaxProducts){var n=VP.SelectedProducts.Products.length;for(n;n<VP.SelectedProducts.MaxProducts;n++)$("ul",VP.SelectedProducts.Container).append("<li rel='-1'><\/li>")}};
1VP.SelectedProducts.RenderCount=function(){$("#productCount",VP.SelectedProducts.Container).text(VP.SelectedProducts.Products.length);VP.SelectedProducts.Products.length>0?(VP.SelectedProducts.Container.addClass("hasSelected"),$("ul",VP.SelectedProducts.Container).addClass("selected")):(VP.SelectedProducts.Container.removeClass("hasSelected"),$("ul",VP.SelectedProducts.Container).removeClass("selected"))};VP.SelectedProducts.uuidv4=function(){var n=([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,n=>(n^crypto.getRandomValues(new Uint8Array(1))[0]&15>>n/4).toString(16));return"?t="+n};VP.SelectedProducts.Append=function(n){for(var r="",t=0;t<n.length;t++){var f=null,i="",e="",u="";parseInt(n[t].DefaultActionId)>0&&VP.SelectedProducts.LeadTypes.push(parseInt(n[t].DefaultActionId));n[t].ImageUrl&&(f="<a title='"+n[t].ProductName+"' href='"+n[t].ProductUrl+"'><img onload='VP.SelectedProducts.ImageLoaded()' src='"+n[t].ImageUrl.replace("52x39","400x300")+"' alt='"+n[t].ProductName+"' title='"+n[t].ProductName+"' /><\/a>");n[t].GetQuoteUrl==null&&n[t].ClickThroughUrl==null?i="<span>"+n[t].LeadTurnOffText+"<\/span>":n[t].GetQuoteUrl!=null?i="<a title='Get Quote for "+n[t].ProductName+"' href='"+n[t].GetQuoteUrl+"' class='button action-1 btnRequestQuote'>"+n[t].GetQuoteButtonText+"<\/a>":n[t].ClickThroughUrl!=null&&(i="<a title='"+n[t].ProductName+"'",n[t].NewWindow!=null&&(i+="target='_blank'"),i+="href='"+n[t].ClickThroughUrl+"' class='button action-1 clickThrough'>"+n[t].ClickThroughType+"<\/a>");e="<a title='"+n[t].ProductName+"' href='"+n[t].ProductUrl+"'>"+n[t].ProductName+"<\/a> from <span class='company'>"+n[t].ManufacturerName+"<\/span>";u="<div id='zoom_"+n[t].ProductId+"' class='zoomedContent'>";f&&(u+="<div class='image'>"+f+"<\/div>");u+="<div class='actions module'><a class='icon externalLink productLink' href='"+n[t].ProductUrl+"'>View Details<\/a><a class='icon close' onclick='VP.SelectedProducts.Delete("+n[t].ProductId+");'>Remove Item<\/a>"+i+"<\/div><\/div>";r+='<li class="active" rel="'+n[t].ProductId+'" data-content="'+escape(u)+'"data-title="'+escape(e)+'"><div class="itemHolder">';n[t].ImageUrl!=null&&(r+='<img src="'+n[t].ImageUrl+'" alt="'+n[t].ProductName+'" title="'+n[t].ProductName+'">');r+='<a class="icon compact close" onclick="VP.SelectedProducts.Delete('+n[t].ProductId+');">Remove Item<\/a><\/div><\/li>'}$("ul",VP.SelectedProducts.Container).append(r);VP.SelectedProducts.ShowContainer()};VP.SelectedProducts.Delete=function(n){VP.SelectedProducts.Remove({id:n});$("body").trigger("productRemoved",{id:n})};VP.SelectedProducts.Remove=function(n){var t,i,r,u,h,e,f,o,s;$("li[rel='"+n.id+"']",VP.SelectedProducts.Container).remove();t=0;i=0;r=0;u=0;try{for(t;t<VP.SelectedProducts.Products.length;t++)if(f=VP.SelectedProducts.Products[t].split("_")[0],f==n.id){VP.SelectedProducts.RemoveLeadType(n.id);VP.SelectedProducts.Products.splice(t,1);break}}catch(c){console.log("error occurred, Removed product will be reverted.");h=VP.SelectedProducts.GetProducts(n.id.toString());VP.SelectedProducts.Render(h)}for(i;i<VP.SelectedProducts.ProductPositions.length;i++)if(e=VP.SelectedProducts.ProductPositions[i],e!=undefined&&(f=e.split("_"),f[0]==n.id)){VP.SelectedProducts.ProductPositions.splice(i,1);break}for(r;r<VP.SelectedProducts.FeaturedProducts.length;r++)if(o=VP.SelectedProducts.FeaturedProducts[r],o!=undefined&&o==n.id){VP.SelectedProducts.FeaturedProducts.splice(r,1);break}for(u;u<VP.SelectedProducts.LeadDisabledProducts.length;u++)if(s=VP.SelectedProducts.LeadDisabledProducts[u].split("_")[0],s!=undefined&&s==n.id){VP.SelectedProducts.LeadDisabledProducts.splice(u,1);break}$.Cookie("selectedProducts",VP.SelectedProducts.Products.join());$.Cookie("selectedProductPositions",VP.SelectedProducts.ProductPositions.join());$.Cookie("selectedFeaturedProducts",VP.SelectedProducts.FeaturedProducts.join());$.Cookie("leadDisabledProducts",VP.SelectedProducts.LeadDisabledProducts.join());VP.SelectedProducts.Products.length==0&&(VP.SelectedProducts.ContainerHidden=!0);VP.SelectedProducts.RenderEmptyItems();VP.SelectedProducts.RenderCount();VP.SelectedProducts.ToggleGetQuoteButton()};VP.SelectedProducts.ToggleView=function(n,t){VP.SelectedProducts.ContainerHidden?VP.SelectedProducts.ShowContainer(t):VP.SelectedProducts.HideContainer(t)};VP.SelectedProducts.ShowContainer=function(n){VP.SelectedProducts.Container.animate({bottom:"8px"},VP.SelectedProducts.AnimationTime);VP.SelectedProducts.ContainerHidden=!1;VP.SelectedProducts.Container.removeClass("closed");VP.SelectedProducts.AnimationTime=200;
1n&&$.Cookie("selectedProductsToggle","open")};VP.SelectedProducts.HideContainer=function(n){VP.SelectedProducts.Container.animate({bottom:"-42px"},VP.SelectedProducts.AnimationTime);VP.SelectedProducts.Container.addClass("closed");VP.SelectedProducts.ContainerHidden=!0;VP.SelectedProducts.AnimationTime=200;n&&$.Cookie("selectedProductsToggle","closed")};VP.SelectedProducts.Load=function(){var o=$.Cookie("selectedProducts"),h=$.Cookie("selectedProductPositions"),c=$.Cookie("selectedFeaturedProducts"),a,i,t,u,n,e,s,l;if(o!=null&&o!=""&&h!=null&&h!=""){if(VP.SelectedProducts.HasProducts=!0,a=o.split(","),VP.SelectedProducts.Products=o.split(","),i=h.split(","),t=VP.SelectedProducts.GetProducts(VP.SelectedProducts.GetSelectedProductIds()),c!=null&&c!=""&&(VP.SelectedProducts.FeaturedProducts=c.split(",")),t.length>0){var r="",f="";if(t.length<a.length){for(n=0,n;n<t.length;n++)for(r+=VP.SelectedProducts.GetProductCategory(t[n].ProductId)+",",u=0;u<i.length;u++)s=i[u].split("_"),s[0]==t[n].ProductId&&(f+=i[u]+",",VP.SelectedProducts.ProductPositions.push(i[u]));r=r.substr(0,r.length-1);f=f.substr(0,f.length-1);VP.SelectedProducts.Products=r.split(",");$.Cookie("selectedProducts",null);$.Cookie("selectedProducts",r);$.Cookie("selectedProductPositions",null);$.Cookie("selectedProductPositions",f)}else for(n=0,n;n<t.length;n++)for(e=0;e<i.length;e++)if(s=i[e].split("_"),s[0]==t[n].ProductId){VP.SelectedProducts.ProductPositions.push(i[e]);break}VP.SelectedProducts.Render(t)}else VP.SelectedProducts.Render(null),VP.SelectedProducts.HasProducts=!1,$.Cookie("selectedProducts",null),VP.SelectedProducts.Products.splice(0,VP.SelectedProducts.Products.length),$.Cookie("selectedProductPositions",null),VP.SelectedProducts.ProductPositions.splice(0,VP.SelectedProducts.ProductPositions.length),$.Cookie("selectedFeaturedProducts",null),VP.SelectedProducts.FeaturedProducts.splice(0,VP.SelectedProducts.FeaturedProducts.length);l=VP.SelectedProducts.GetLeadDisabledSelectedProducts();$.Cookie("leadDisabledProducts",null);VP.SelectedProducts.LeadDisabledProducts.splice(0,VP.SelectedProducts.LeadDisabledProducts.length);$.Cookie("leadDisabledProducts",l);VP.SelectedProducts.LeadDisabledProducts=l.split(",")}else VP.SelectedProducts.Render(null);VP.SelectedProducts.DetermineInitialState();$("body").trigger("selectedProductsLoaded")};VP.SelectedProducts.GetCommonLeadType=function(){var i,t,r,n;if(i=0,VP.SelectedProducts.LeadTypes.length>0){t=[];r=0;for(n in VP.SelectedProducts.LeadTypes)t[VP.SelectedProducts.LeadTypes[n]]=(t[VP.SelectedProducts.LeadTypes[n]]||0)+1,t[VP.SelectedProducts.LeadTypes[n]]>r&&(r=t[VP.SelectedProducts.LeadTypes[n]],i=VP.SelectedProducts.LeadTypes[n])}return i};VP.SelectedProducts.UpdateLeadType=function(n,t){var u,r,i;if(u=n.split("?"),u.length>1)for(r=u[1].split("&"),i=0;i<r.length;i++)if(r[i].indexOf("ltid")>=0){n=n.replace(r[i],"ltid="+t);break}return n};VP.SelectedProducts.RemoveLeadType=function(n){var i,t;i=VP.SelectedProducts.GetProducts(n);t=$.inArray(i[0].DefaultActionId,VP.SelectedProducts.LeadTypes);t>-1&&VP.SelectedProducts.LeadTypes.splice(t,1)};VP.SelectedProducts.GetCategoryQueryString=function(){var t,r,n,u;for(t="",n=[],i=0;i<VP.SelectedProducts.Products.length;i++)r=VP.SelectedProducts.Products[i].split("_")[1],u=$.inArray(r,n),u==-1&&n.push(r);return n.length==1&&(t="&catid="+n[0]),t};VP.SelectedProducts.GetSelectedProductIds=function(){for(var t=[],n=0;n<VP.SelectedProducts.Products.length;n++)t.push(VP.SelectedProducts.Products[n].split("_")[0]);return t.join()};VP.SelectedProducts.GetProductCategory=function(n){for(var i,t=0;t<VP.SelectedProducts.Products.length;t++)if(i=VP.SelectedProducts.Products[t],i.split("_")[0]==n)break;return i};VP.SelectedProducts.GetProducts=function(n){var t;return $.ajax({type:"POST","async":!1,cache:!1,url:VP.AjaxWebServiceUrl+"/GetProductInformation",data:"{'productIds':'"+n+"', 'countryId':'"+VP.Login.CountryId+"'}",contentType:"application/json; charset=utf-8",dataType:"json",success:function(n){t=n.d}}),t};VP.SelectedProducts.ToggleGetQuoteButton=function(){VP.SelectedProducts.Products.length==0||VP.SelectedProducts.Products.length>VP.SelectedProducts.LeadDisabledProducts.length?$("a[id$='lnkSelProAction']").attr("class","button"):$("a[id$='lnkSelProAction']").attr("class","button disabled")};VP.SelectedProducts.IsLeadEnabled=function(n){var t;return $.ajax({type:"POST","async":!1,cache:!1,url:VP.AjaxWebServiceUrl+"/IsLeadEnabled",data:"{'productId':'"+n+"'}",contentType:"application/json; charset=utf-8",dataType:"json",success:function(n){t=n.d}}),t};VP.SelectedProducts.GetCommaSeparatedLeadDisabledProductIds=function(n){var t;return $.ajax({type:"POST","async":!1,cache:!1,url:VP.AjaxWebServiceUrl+"/GetLeadDisabledProductIds",data:"{'productIds':"+JSON.stringify(n)+"}",contentType:"application/json; charset=utf-8",dataType:"json",success:function(n){t=n.d}}),t.join()};VP.SelectedProducts.GetLeadDisabledSelectedProducts=function(){var n="",t=[];return $.each(VP.SelectedProducts.Products,function(n,i){i!=undefined&&i.split("_")[0]!=""&&t.push(parseInt(i.split("_")[0]))}),n=VP.SelectedProducts.GetCommaSeparatedLeadDisabledProductIds(t),n.length>0&&(n=n.substr(0,n.length-1)),n};VP.SelectedProducts.ClearAll=function(){$("li",VP.SelectedProducts.Container).remove();VP.SelectedProducts.Products=[];VP.SelectedProducts.LeadDisabledProducts=[];VP.SelectedProducts.FeaturedProducts=[];VP.SelectedProducts.ProductPositions=[];VP.SelectedProducts.LeadTypes=[];VP.SelectedProducts.ContainerHidden=!0;VP.SelectedProducts.HasProducts=!1;$.Cookie("selectedProducts",null);$.Cookie("selectedProductPositions",null);$.Cookie("selectedFeaturedProducts",null);$.Cookie("leadDisabledProducts",null);VP.SelectedProducts.RenderEmptyItems();VP.SelectedProducts.RenderCount();VP.SelectedProducts.ToggleGetQuoteButton();$("body").trigger("allProductsRemoved")};VP.SelectedProducts.Init();

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.