function AjaxGetDialog(n,t,i,r,u,f,e,o,s){var h=window.location.protocol+"//"+window.location.host+"/Notsys/"+t+"/"+n;i.length>0&&(h=window.location.protocol+"//"+window.location.host+"/Notsys/"+i+"/"+t+"/"+n);$.ajax({url:h,type:"GET",data:{id:r||0,diagContainerDivId:u,divToRefreshId:f||""}}).done(function(n){$("#"+u).hasClass("hidden")&&$("#"+u).toggleClass("hidden");dialog=$("#"+u).empty().append(n).dialog({modal:!0,title:e,minHeight:400,minWidth:640,maxHeight:1024,maxWidth:1980,height:s||"auto",width:o||800,close:function(){$(this).empty().dialog("close")}})})}function AjaxPostForm(n,t,i){var r=!1,u={beforeSend:function(){},uploadProgress:function(){},success:function(n){$("#"+t).html(n).fadeIn("slow");r=!0},error:function(){alert("general request error")},complete:function(){i&&i()}};$(n).ajaxSubmit(u)}function AjaxPostDialogForm(n,t,i,r){var u=0,f={data:{diagContainerDivId:t,divToRefreshId:i},beforeSend:function(){},uploadProgress:function(){},success:function(n){if(n){var r=$(n).find("span.field-validation-error"),f=$(n).find("div.custom-error");(f&&f.length>0||r&&r.length>0)&&(u=1)}u==0?(dialog.toggleClass("hidden").dialog("close"),$("#"+i).html(n).fadeIn("slow")):$("#"+t).empty().append(n)},error:function(){alert("general request error")},complete:function(){}};r&&$(r).each(function(){});$(n).ajaxSubmit(f)}function AjaxPostFileForm(n,t,i,r){var e=0,o;if(!$("input[type=file]")[0].files[0])return(alert("please select a PDF file to be uploaded"),r)?r(!1):void 0;if(o=$("input[type=file]")[0].files[0],o.size>7999999)return(alert("The file size exceeds the maximum allowed (8MB)"),r)?r(!1):void 0;var u=$(".bar"),f=$(".percent"),s=$("#status"),h={data:{diagContainerDivId:t,divToRefreshId:i},beforeSend:function(){s.empty();var n="0%";u.width(n);f.html(n)},uploadProgress:function(n,t,i,r){var e=r+"%";u.width(e);f.html(e)},success:function(n){var o="100%",r;u.width(o);f.html(o);n&&(r=$(n).find("span.field-validation-error"),r&&r.length>0&&(e=1));e==0?(dialog.toggleClass("hidden").dialog("close"),$("#"+i).html(n).fadeIn("slow")):$("#"+t).empty().append(n)},error:function(){alert("general request error")},complete:function(n){s.html(n.responseText)}};$(n).ajaxSubmit(h)}function detectBrowser(){var n=navigator.userAgent.toLowerCase(),t="";_browser.msie=/msie/.test(n)||/trident/.test(n)||/edge/.test(n);_browser.version="";for(x in _browser)_browser[x]&&(t=n.match(new RegExp("("+(x==="msie"?"msie|edge":x)+")( |/)([0-9]+)")),t&&(_browser.version=t[3],(!_browser.version||_browser.version<10)&&alert("Sorry, your web browser might be not fully supported.\n\nYou may experience serius display and function issues.\n\nIf you're running Internet Explorer please ensure it is version 10 or newer. Thanks.")))}function iSBrowserIE(){var n=navigator.userAgent.toLowerCase(),t="";_browser.msie=/msie/.test(n)||/trident/.test(n)||/edge/.test(n);for(x in _browser)if(_browser[x]&&(t=n.match(new RegExp("("+(x==="msie"?"msie|edge":x)+")( |/)([0-9]+)")),t))return!0;return!1}var dialog;_browser={}