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.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()}})},50)};$(document).ready(function(){function t(){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"))})}$(".article-attachment").click(function(){if(window.analyticsTrackingId){var n="/activity/track?activity=attachmentview&trackingId="+window.analyticsTrackingId+"&nocache="+(new Date).getTime();$.ajax({cache:!1,url:n})}});const n=document.querySelector("#choose_lang");n&&(n.onchange=function(){window.location=this.value});t();$(".table-wrap")&&$(".table-wrap").length>0&&$(".table-wrap").each(function(){$('<span class="extended-table-zoom"><\/span>').prependTo($(this).parent())});$(".extended-table-zoom")&&$(".extended-table-zoom").length>0&&$(".extended-table-zoom").click(function(){window.expandContextTable($(this).next().html())});$(window).resize(function(){t()});$(".article-media-attachment")&&$(".article-media-attachment").length>0&&$(".article-media-attachment").click(function(n){n.preventDefault();let t=$(this).data("media");window.renderContextMedia(t)});$("#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)})})