function getUrlParameter(n,t){t=t.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var r=new RegExp("[\\?&]"+t+"=([^&#]*)"),i=r.exec(n);return i===null?"":decodeURIComponent(i[1].replace(/\+/g," "))}function onRegisterEmailFieldChange(){$("#errorMessagePanel").empty().hide();$("#submit_btn").disable(!1)}function requestRegisterUser(n){n.preventDefault();var t=$("#send_email_form").serializeArray(),i=$("#send_email_form").attr("action");executeAjaxPost(i,t,processResult,processCaptchaError)}function executeAjaxPost(n,t,i,r){r=r||$("#errorMessagePanel").html(message).show();$.ajaxSetup({beforeSend:function(){$("#contactBusyIndicator").show();$("#submit_btn").disable(!0)},complete:function(){$("#contactBusyIndicator").hide()}});$.ajax({type:"POST",url:n,contentType:"application/x-www-form-urlencoded",data:t,success:function(n){if(n)n.Success===!1?r(n,t):($("#contactEmailBody").val(""),i(n,t));else{var u=window.detailResource?window.detailResource.ResponseNull:n.Message;$("#errorMessagePanel").html(u).show()}},error:function(n){r(n.statusText,!0,t)}})}function processCaptchaError(n){if($("#submit_btn").disable(!1),n)if(n.IsValidCaptcha){var t=window.detailResource?window.detailResource.CAPTCHAFlagNotSet:n.Message;$("#errorMessagePanel").html(t).show()}else $("#errorMessagePanel").html(n.Message).show(),$("#CaptchaDeText").attr("value",n.DeText),$("#CaptchaImage").attr("src",n.Image)}function processResult(n){$("#errorMessagePanel").hide();$("#contact_form").hide();$("#contact_form_message").show();$("#contact_form_message").html("<div id='message'><\/div>");$("#submit_btn").disable(!1);var t=window.detailResource?window.detailResource.EmailSendSuccessfully:n.Message;$("#message").html(t).hide().fadeIn(1500,function(){$("#message");GNWCore.Dialog.close()})}window.pnrQuoteGalleryCarousel={isQuoteCarouselEnabled:function(){const n=document.getElementById("quote-carousel-container");return window.quoteCarouselSettings&&window.quoteCarouselSettings.isEnabled&&n},placeCarouselSection:function(){const r=window.quoteCarouselSettings;if(r&&r.isEnabled){const n=document.querySelector(".main-body-container").children;if(n&&n.length){let t=1;for(let i=t;i<n.length;i++)if(window.pnrQuoteGalleryCarousel.isValidPlaceForCarousel(n[i]))break;else t++;if(t!==n.length){const u=document.getElementsByClassName("main-body-container")[0];if(u){const f=document.getElementsByClassName("main-body-container")[0].children[t];if(f){const i=document.createElement("div");i.id="quote-carousel-container-body";i.className="quote-carousel-container-body";u.insertBefore(i,f);window.pnrQuoteGalleryCarousel.moveItem()}}}}}},moveItem:function(){const n=document.getElementById("quote-carousel-container-body");n||moveItem();const t=document.getElementById("quote-carousel-container");t||moveItem();t&&n&&n.appendChild(t)},isValidPlaceForCarousel:function(n){return n.textContent?n.textContent.length<225?!1:n.tagName!=="P"?!1:n.getAttribute("align")==="center"?!1:n.querySelector("img")!==null?!1:!0:!1}};window.onload=function(){setTimeout(function(){window.GNWCore.Dialog.init("pnr-dialog-contact-form","article-contact-by-email",{openCallBackFunction:function(){$("#contactBusyIndicator").hide()},closeCallBackFunction:function(){$("#dialog-container").remove()}});try{window.pnrQuoteGalleryCarousel.isQuoteCarouselEnabled()&&window.renderQuoteCarousel(window.quoteCarouselSettings)}catch(n){console.log(n)}},50)};document.addEventListener("DOMContentLoaded",function(){function f(){var n=$("#main-body-container").width()-15;$("#main-body-container table").each(function(){var r=!1,t=$(this)[0],u,i;t&&t.style&&t.style.width&&(r=t.style.width.indexOf("%")!==-1);u=$(this).outerWidth();i=$(this).parent();u>n?i.hasClass("table-wrap")||($(this).wrap('<div class="extended-table-container"><div class="table-wrap"><\/div><\/div>'),r||$(this).css("width",n+150+"px")):i.hasClass("table-wrap")&&($(this).unwrap(),$(this).css("width","auto"))})}var e,t,n,i,r;window.pnrQuoteGalleryCarousel.isQuoteCarouselEnabled()&&window.pnrQuoteGalleryCarousel.placeCarouselSection();$(".article-attachment").click(function(){if(window.analyticsTrackingId){var n="/activity/track?activity=attachmentview&trackingId="+window.analyticsTrackingId+"&language="+(pnrApplicationSettings.ArticleLanguage||"en")+"&nocache="+(new Date).getTime();$.ajax({cache:!1,url:n})}});const u=document.querySelector("#choose_lang");if(u&&(u.onchange=function(){window.location=this.value}),f(),$(".table-wrap")&&$(".table-wrap").length>0){let n=window.ZoomOutTitle||"Expand";$(".table-wrap").each(function(){$('<button class="extended-table-zoom border-0" type="button" value="'+n+'" title="Popup '+n+' Table" aria-label="Popup '+n+' Table"><svg xmlns="http://www.w3.org/2000/svg" height="20px" viewBox="0 -960 960 960" width="20px" fill="white"><path d="M144-144v-192h72v69l117-117 51 51-117 117h69v72H144Zm480 0v-72h69L576-333l51-51 117 117v-69h72v192H624ZM333-576 216-693v69h-72v-192h192v72h-69l117 117-51 51Zm294 0-51-51 117-117h-69v-72h192v192h-72v-69L627-576Z"/><\/svg><\/button>').prependTo($(this).parent())})}if($(".extended-table-zoom")&&$(".extended-table-zoom").length>0&&$(".extended-table-zoom").click(function(){window.expandContextTable($(this).next().html())}),$(window).resize(function(){f()}),$(".article-media-attachment")&&$(".article-media-attachment").length>0&&$(".article-media-attachment").click(function(n){n.preventDefault();let t=$(this).data("media");window.renderContextMedia(t)}),window.enableInlineImageZoom&&$(".article-body img")&&$(".article-body img").length>0&&(e=window.ZoomOutTitle||"Expand",$(".article-body img").each(function(n,t){const i=$(t).parent();i.hasClass("parent-ImageH")||$(".article-body img").length-1===n||($(t).wrap('<div class="parent-ImageH"><\/div>'),$(t).after('<a href="#" class="child-IconH expand-inline-image" title="'+e+'"><svg xmlns="http://www.w3.org/2000/svg" height="20px" viewBox="0 -960 960 960" width="20px" fill="white"><path d="M144-144v-192h72v69l117-117 51 51-117 117h69v72H144Zm480 0v-72h69L576-333l51-51 117 117v-69h72v192H624ZM333-576 216-693v69h-72v-192h192v72h-69l117 117-51 51Zm294 0-51-51 117-117h-69v-72h192v192h-72v-69L627-576Z"/><\/svg><\/a>'))}),t=document.querySelectorAll(".parent-ImageH > img"),t&&t.length>0)){for(n=0;n<t.length;n++)i=document.querySelectorAll(".parent-ImageH"),i&&i[n]&&(i[n].style.maxWidth=t[n].clientWidth?t[n].clientWidth+"px":"100%",r=t[n].getAttribute("data-mce-style"),r&&(r=r.trim().replaceAll(" ","").toLowerCase(),r.includes("float:left")?i[n].classList.add("float-left"):r.includes("float:right")?i[n].classList.add("float-right"):r.includes("display:block;margin-left:auto;margin-right:auto")&&i[n].classList.add("inline-image-div-center")));$(".expand-inline-image")&&$(".expand-inline-image").length>0&&$(".expand-inline-image").each(function(){$(this).click(function(n){n.preventDefault();window.renderInlineMedia($(this).prev()[0])})})}$("#contactByEmail").click(function(){$("#contact_form").show();$("#contact_form_message").hide();$("#contact_form #captcha a").click();$("#contactBusyIndicator").hide()});$(function(){$("#send_email_form").submit(requestRegisterUser);$("#contactFrom").keypress(onRegisterEmailFieldChange);$("#contactEmailBody").keypress(onRegisterEmailFieldChange);$("#CaptchaInputText").keypress(onRegisterEmailFieldChange);$("submit_btn").prop("disabled","false")});$(function(){jQuery.fn.extend({disable:function(n){return this.each(function(){this.disabled=n})}});$("#submit_btn").disable(!1)})},!1)