function startServerDate(n,t){if(n===undefined||n==null)throw"serverDateTime unknown";if(t===undefined||t==null)throw"clientTimerTickHandler unknown";_SERVER_DATE_TIME=n,_CLIENT_TIMER_TICK_HANDLER=t,setInterval(_timeTickHandlerInternal,_TIME_INTERVAL),_CLIENT_TIMER_TICK_HANDLER(_SERVER_DATE_TIME)}function getDateString(n){if(n===undefined||n==null)return"";var t=n.getDate()<10?"0"+n.getDate().toString():n.getDate().toString(),i=n.getMonth()+1<10?"0"+(n.getMonth()+1).toString():(n.getMonth()+1).toString(),u=n.getHours()<10?"0"+n.getHours().toString():n.getHours().toString(),f=n.getMinutes()<10?"0"+n.getMinutes().toString():n.getMinutes().toString(),r=["Воскресенье","Понедельник","Вторник","Среда","Четверг","Пятница","Суббота"];return r[n.getDay()]+" "+t+"."+i+"."+n.getFullYear()+" г."}function getTimeString(n){if(n===undefined||n==null)return"";var r=n.getDate()<10?"0"+n.getDate().toString():n.getDate().toString(),u=n.getMonth()+1<10?"0"+(n.getMonth()+1).toString():(n.getMonth()+1).toString(),t=n.getHours()<10?"0"+n.getHours().toString():n.getHours().toString(),i=n.getMinutes()<10?"0"+n.getMinutes().toString():n.getMinutes().toString(),f=["Воскресенье","Понедельник","Вторник","Среда","Четверг","Пятница","Суббота"];return t+(n.getSeconds()%2==0?"<span class='colon even'>:<\/span>":"<span class='colon odd'>:<\/span>")+i+" "}function _timeTickHandlerInternal(){if(_SERVER_DATE_TIME===undefined||_SERVER_DATE_TIME==null)throw"serverDateTime unknown";if(_CLIENT_TIMER_TICK_HANDLER===undefined||_CLIENT_TIMER_TICK_HANDLER==null)throw"clientTimerTickHandler unknown";_SERVER_DATE_TIME.setMilliseconds(_TIME_INTERVAL),_CLIENT_TIMER_TICK_HANDLER(_SERVER_DATE_TIME)}var highResolutionTimer=window.highResolutionTimer=window.highResolutionTimer||function(){return function(n){return this.timer=!1,this.total_ticks=0,this.start_time=undefined,this.current_time=undefined,this.duration=n.duration?n.duration:1e3,this.callback=n.callback?n.callback:function(){},this.run=function(){this.current_time=+new Date,this.start_time||(this.start_time=this.current_time),this.callback(this);var n=this.duration-(this.current_time-(this.start_time+this.total_ticks*this.duration));return this.total_ticks++,function(t){t.timer=setTimeout(function(){t.run()},n)}(this),this},this.stop=function(){return clearTimeout(this.timer),this},this}}();(function(n){function i(t,i){this.element=t,this.options=n.extend(!0,{},r,i),"placeholder"in this.options&&(this.options.texts.placeholder=this.options.placeholder,delete this.options.placeholder),"default"in this.options.searchOptions&&(this.options.texts.search=this.options.searchOptions["default"],delete this.options.searchOptions["default"]),this.load()}var r={columns:1,search:!1,searchOptions:{showOptGroups:!1,onSearch:function(){}},texts:{placeholder:"Select options",search:"Search",selectedOptions:" selected",selectAll:"Select all",noneSelected:"None Selected"},selectAll:!1,selectGroup:!1,minHeight:200,maxHeight:null,showCheckbox:!1,jqActualOpts:{},optionAttributes:[],onLoad:function(){},onOptionClick:function(){},onControlClose:function(){},maxWidth:null,minSelect:!1,maxSelect:!1},t=1;typeof Array.prototype.map!="function"&&(Array.prototype.map=function(t,i){return typeof i=="undefined"&&(i=this),n.isArray(i)?n.map(i,t):[]}),typeof String.prototype.trim!="function"&&(String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"")}),i.prototype={load:function(){var t=this,f,u,o,e;if(t.element.nodeName!="SELECT"||n(t.element).hasClass("jqmsLoaded"))return!0;n(t.element).addClass("jqmsLoaded").data("plugin_multiselect-instance",t),n(t.element).after('<div class="ms-options-wrap"><button>None Selected<\/button><div class="ms-options"><ul><\/ul><\/div><\/div>');var s=n(t.element).next(".ms-options-wrap").find("> button:first-child"),i=n(t.element).next(".ms-options-wrap").find("> .ms-options"),r=i.find("> ul"),h=n(t.element).find("optgroup").length?!0:!1;t.options.showCheckbox||i.addClass("hide-checkbox"),f=null,typeof t.options.width=="number"?(i.parent().css("position","relative"),f=t.options.width):typeof t.options.width=="string"?(n(t.options.width).css("position","relative"),f="100%"):i.parent().css("position","relative"),u=n(window).height()-i.offset().top+n(window).scrollTop()-20,t.options.maxHeight&&(u=t.options.maxHeight),u=u<t.options.minHeight?t.options.minHeight:u,i.css({maxWidth:f,minHeight:t.options.minHeight,maxHeight:u,overflow:"auto"}).hide(),i.bind("touchmove mousewheel DOMMouseScroll",function(t){if(n(this).outerHeight()<n(this)[0].scrollHeight){var i=t.originalEvent,r=i.wheelDelta||-i.detail;n(this).outerHeight()+n(this)[0].scrollTop>n(this)[0].scrollHeight&&(t.preventDefault(),this.scrollTop+=r<0?1:-1)}});n(document).off("click.ms-hideopts").on("click.ms-hideopts",function(t){n(t.target).closest(".ms-options-wrap").length||n(".ms-options-wrap > .ms-options:visible").length&&n(".ms-options-wrap > .ms-options:visible").each(function(){n(this).hide();var t=n(this).parent().prev(".jqmsLoaded").data("plugin_multiselect-instance");if(typeof t.options.onControlClose=="function")t.options.onControlClose(t.element)})});if(s.bind("mousedown",function(r){if(r.which!=1)return!0;if(n(".ms-options-wrap > .ms-options:visible").each(function(){n(this).parent().prev()[0]!=i.parent().prev()[0]&&n(this).hide()}),i.toggle(),i.is(":visible")){i.css("maxHeight","");var u=n(window).height()-i.offset().top+n(window).scrollTop()-20;t.options.maxHeight&&(u=t.options.maxHeight),u=u<t.options.minHeight?t.options.minHeight:u,i.css("maxHeight",u)}}).click(function(n){n.preventDefault()}),t.options.texts.placeholder&&s.text(t.options.texts.placeholder),t.options.search){r.before('<div class="ms-search"><input type="text" value="" placeholder="'+t.options.texts.search+'" /><\/div>'),o=i.find(".ms-search input");o.on("keyup",function(){if(n(this).data("lastsearch")==n(this).val())return!0;if(n(this).data("lastsearch",n(this).val()),typeof t.options.searchOptions.onSearch=="function")t.options.searchOptions.onSearch(t.element);r.find("li:not(.optgroup)").each(function(){var i=n(this).text();i.toLowerCase().indexOf(o.val().toLowerCase())>-1?n(this).show():n(this).hide(),!t.options.searchOptions.showOptGroups&&n(this).closest("li.optgroup")&&(n(this).closest("li.optgroup").show(),n(this).closest("li.optgroup").find("li:visible").length?n(this).closest("li.optgroup").show():n(this).closest("li.optgroup").hide())})})}t.options.selectAll&&r.before('<a href="#" class="ms-selectall global">'+t.options.texts.selectAll+"<\/a>");i.on("click",".ms-selectall",function(t){if(t.preventDefault(),n(this).hasClass("global"))r.find("li:not(.optgroup)").filter(":not(.selected)").filter(":visible").length?r.find("li:not(.optgroup)").filter(":not(.selected)").filter(":visible").find('input[type="checkbox"]').trigger("click"):r.find('li:not(.optgroup).selected:visible input[type="checkbox"]').trigger("click");else if(n(this).closest("li").hasClass("optgroup")){var i=n(this).closest("li.optgroup");i.find("li:not(.selected)").filter(":visible").length?i.find('li:not(.selected):visible input[type="checkbox"]').trigger("click"):i.find('li.selected:visible input[type="checkbox"]').trigger("click")}});e=[],n(t.element).children().each(function(){var u,f,i,r;if(this.nodeName=="OPTGROUP")u=[],n(this).children("option").each(function(){for(var f={},r,i=0;i<t.options.optionAttributes.length;i++)r=t.options.optionAttributes[i],n(this).attr(r)!==undefined&&(f[r]=n(this).attr(r));u.push({name:n(this).text(),value:n(this).val(),checked:n(this).prop("selected"),attributes:f})}),e.push({label:n(this).attr("label"),options:u});else if(this.nodeName=="OPTION"){for(f={},i=0;i<t.options.optionAttributes.length;i++)r=t.options.optionAttributes[i],n(this).attr(r)!==undefined&&(f[r]=n(this).attr(r));e.push({name:n(this).text(),value:n(this).val(),checked:n(this).prop("selected"),attributes:f})}else return!0}),t.loadOptions(e,!0,!1);i.on("click",'input[type="checkbox"]',function(){n(this).closest("li").toggleClass("selected");var r=i.parent().prev();if(r.find('option[value="'+n(this).val()+'"]').prop("selected",n(this).is(":checked")).closest("select").trigger("change"),typeof t.options.onOptionClick=="function")t.options.onOptionClick(t.element,this);t._updatePlaceholderText()});i.on("focusin",'input[type="checkbox"]',function(){n(this).closest("label").addClass("focused")}).on("focusout",'input[type="checkbox"]',function(){n(this).closest("label").removeClass("focused")});if(typeof t.options.onLoad=="function")t.options.onLoad(t.element);n(t.element).hide()},loadOptions:function(t,i,r){var a,l,y,s,p,h;Object.keys=Object.keys||function(n){var i=[],t;for(t in n)n.hasOwnProperty(t)&&i.push(t);return i},i=typeof i=="boolean"?i:!0,r=typeof r=="boolean"?r:!0;var f=this,o=n(f.element).next(".ms-options-wrap").find("> .ms-options > ul"),w=n(f.element).next(".ms-options-wrap").find("> .ms-options"),c=w.parent().prev();i&&(o.find("> li").remove(),r&&c.find("> *").remove());for(a in t)if(t.hasOwnProperty(a)){var u=t[a],e=n("<li><\/li>"),v=!0;if(u.hasOwnProperty("options")){o.find("> li.optgroup > span.label").each(function(){n(this).text()==u.label&&(e=n(this).closest(".optgroup"),v=!1)}),r&&(c.find('optgroup[label="'+u.label+'"]').length?l=c.find('optgroup[label="'+u.label+'"]'):(l=n('<optgroup label="'+u.label+'"><\/optgroup>'),c.append(l))),v&&(e.addClass("optgroup"),e.append('<span class="label">'+u.label+"<\/span>"),e.find("> .label").css({clear:"both"}),f.options.selectGroup&&e.append('<a href="#" class="ms-selectall">'+f.options.texts.selectAll+"<\/a>"),e.append("<ul><\/ul>"));for(y in u.options)u.options.hasOwnProperty(y)&&(s=u.options[y],p=n("<li><\/li>").addClass("ms-reflow"),f._addOption(p,s),e.find("> ul").append(p),r&&(h=n('<option value="'+s.value+'">'+s.name+"<\/option>"),s.hasOwnProperty("attributes")&&Object.keys(s.attributes).length,s.checked&&h.prop("selected",!0),l.append(h)))}else u.hasOwnProperty("value")&&(e.addClass("ms-reflow"),f._addOption(e,u),r&&(h=n('<option value="'+u.value+'">'+u.name+"<\/option>"),u.hasOwnProperty("attributes")&&Object.keys(u.attributes).length&&h.attr(u.attributes),u.checked&&h.prop("selected",!0),c.append(h)));v&&o.append(e)}o.find('.ms-reflow input[type="checkbox"]').each(function(){if(n(this).css("display").match(/block$/)){var i=n(this).outerWidth();i=i?i:15,n(this).closest("label").css("padding-left",parseInt(n(this).closest("label").css("padding-left"))*2+i),n(this).closest(".ms-reflow").removeClass("ms-reflow")}}),f._updatePlaceholderText(),w.find("ul").css({"column-count":"","column-gap":"","-webkit-column-count":"","-webkit-column-gap":"","-moz-column-count":"","-moz-column-gap":""}),c.find("optgroup").length?(o.find("> li:not(.optgroup)").css({float:"left",width:100/f.options.columns+"%"}),o.find("li.optgroup").css({clear:"both"}).find("> ul").css({"column-count":f.options.columns,"column-gap":0,"-webkit-column-count":f.options.columns,"-webkit-column-gap":0,"-moz-column-count":f.options.columns,"-moz-column-gap":0}),this._ieVersion()&&this._ieVersion()<10&&o.find("li.optgroup > ul > li").css({float:"left",width:100/f.options.columns+"%"})):(o.css({"column-count":f.options.columns,"column-gap":0,"-webkit-column-count":f.options.columns,"-webkit-column-gap":0,"-moz-column-count":f.options.columns,"-moz-column-gap":0}),this._ieVersion()&&this._ieVersion()<10&&o.find("> li").css({float:"left",width:100/f.options.columns+"%"}))},unload:function(){n(this.element).next(".ms-options-wrap").remove(),n(this.element).show(function(){n(this).css("display","").removeClass("jqmsLoaded")})},reload:function(){n(this.element).next(".ms-options-wrap").remove(),n(this.element).removeClass("jqmsLoaded"),this.load()},_updatePlaceholderText:function(){var i=this,t=n(i.element).next(".ms-options-wrap").find("> button:first-child"),f=n(i.element).next(".ms-options-wrap").find("> .ms-options"),e=f.parent().prev(),r=[];e.find("option:selected").each(function(){r.push(n(this).text())}),t.text(r.join(", "));var u=t.clone().css({display:"inline",width:"auto",visibility:"hidden"}).appendTo(f.parent()),o=typeof n.fn.actual!="undefined"?u.actual("width",i.options.jqActualOpts):u.width(),s=typeof n.fn.actual!="undefined"?t.actual("width",i.options.jqActualOpts):t.width();o>s?t.text(r.length+i.options.texts.selectedOptions):r.length?t.text(r.map(function(n){return n.trim()}).join(", ")):t.text(i.options.texts.placeholder),u.remove()},_addOption:function(i,r){var u,f;i.text(r.name),u=n('<input type="checkbox" value="" title="" />').val(r.value).attr("title",r.name).attr("id","ms-opt-"+t),r.hasOwnProperty("attributes")&&Object.keys(r.attributes).length&&u.attr(r.attributes),i.prepend(u),r.checked&&(i.addClass("default"),i.addClass("selected"),i.find('input[type="checkbox"]').prop("checked",!0)),f=n("<label><\/label>").attr("for","ms-opt-"+t),i.wrapInner(f),t=t+1},_ieVersion:function(){var n=navigator.userAgent.toLowerCase();return n.indexOf("msie")!=-1?parseInt(n.split("msie")[1]):!1}},n.fn.multiselect=function(t){var u=arguments,r;return t===undefined||typeof t=="object"?this.each(function(){n.data(this,"plugin_multiselect")||n.data(this,"plugin_multiselect",new i(this,t))}):typeof t=="string"&&t[0]!=="_"&&t!=="init"?(this.each(function(){var f=n.data(this,"plugin_multiselect");f instanceof i&&typeof f[t]=="function"&&(r=f[t].apply(f,Array.prototype.slice.call(u,1))),t==="unload"&&n.data(this,"plugin_multiselect",null)}),r):void 0}})(jQuery);var _SERVER_DATE_TIME=new Date,_CLIENT_TIMER_TICK_HANDLER=null,_TIME_INTERVAL=1e3;(function(n){typeof define=="function"&&define.amd?define(["jquery"],n):n(jQuery)})(function(n){function i(n){return t.raw?n:encodeURIComponent(n)}function f(n){return t.raw?n:decodeURIComponent(n)}function e(n){return i(t.json?JSON.stringify(n):String(n))}function o(n){n.indexOf('"')===0&&(n=n.slice(1,-1).replace(/\\"/g,'"').replace(/\\\\/g,"\\"));try{n=decodeURIComponent(n.replace(u," "))}catch(i){return}try{return t.json?JSON.parse(n):n}catch(i){}}function r(i,r){var u=t.raw?i:o(i);return n.isFunction(r)?r(u):u}var u=/\+/g,t=n.cookie=function(u,o,s){var y,a,h,v,c,p;if(o!==undefined&&!n.isFunction(o))return s=n.extend({},t.defaults,s),typeof s.expires=="number"&&(y=s.expires,a=s.expires=new Date,a.setDate(a.getDate()+y)),document.cookie=[i(u),"=",e(o),s.expires?"; expires="+s.expires.toUTCString():"",s.path?"; path="+s.path:"",s.domain?"; domain="+s.domain:"",s.secure?"; secure":""].join("");for(h=u?undefined:{},v=document.cookie?document.cookie.split("; "):[],c=0,p=v.length;c<p;c++){var w=v[c].split("="),b=f(w.shift()),l=w.join("=");if(u&&u===b){h=r(l,o);break}u||(l=r(l))===undefined||(h[b]=l)}return h};t.defaults={},n.removeCookie=function(t,i){return n.cookie(t)!==undefined?(n.cookie(t,"",n.extend({},i,{expires:-1})),!0):!1}}),function(n){var i={notSupportedMessage:'<div class="browser-message">                                <p><b>К сожалению, ваш браузер не поддерживается.<\/b><\/p><\/br>                                <p>Ваш браузер не поддерживается Электронной системой корпоративных закупок. Для работы с системой необходим один из следующих браузеров:<\/p><\/br>                                <p>                                - Google Chrome версии 19 или выше<br/>                                - Google Chrome для iOS версии 19 или выше<br/>                                - Mozilla Firefox версии 12 или выше<br/>                                - Internet Explorer версии 8 или выше<br/>                                - Safari версии 5 или выше<br/>                                - Opera версии 12 или выше<br/>                                <\/p>                              <\/div>',notStandardModeMessage:'<div class="browser-message">                                    <p><b>Включен некорректный режим браузера или документа.<\/b><\/p><\/br>                                    <p>Для корректной работы системы включите стандартные режимы браузера и документа.<\/p>                                 <\/div>'},t;n.fn.browserHandler=function(){return this.each(function(){t.handle(n(this))}),this},t={handle:function(n){var f=t.getBrowserInfo().split(" "),r=f[0],u=f[1],e=t.checkIsIeCompatibilityMode(r,u),o=t.checkIsSupported(r,u,e);o?(e||t.checkIsQuirksMode()||t.checkIsIeNotStandardMode(r,u))&&n.html(i.notStandardModeMessage):n.html(i.notSupportedMessage)},checkIsSupported:function(n,i,r){return t.checkIsIe(n)&&(i>=8||r)||n=="Firefox"&&i>=12||n=="Chrome"&&i>=19||n=="Safari"&&i>=5||n=="CriOS"&&i>=19||n=="Opera"&&i>=9},checkIsIeNotStandardMode:function(n,i){return t.checkIsIe(n)&&i!=document.documentMode},checkIsIeCompatibilityMode:function(n,i){return t.checkIsIe(n)&&i<8&&navigator.userAgent.indexOf("Trident/")!=-1},checkIsQuirksMode:function(){return document.compatMode=="BackCompat"},checkIsIe:function(n){return n=="MSIE"||n=="IE"},getBrowserInfo:function(){var i=navigator.userAgent,t,n=i.match(/(opera|chrome|safari|firefox|msie|crios|trident(?=\/))\/?\s*(\d+)/i)||[];return/trident/i.test(n[1])?(t=/\brv[ :]+(\d+)/g.exec(i)||[],"IE "+(t[1]||"")):n[1]==="Chrome"&&(t=i.match(/\bOPR\/(\d+)/),t!=null)?"Opera "+t[1]:(n=n[2]?[n[1],n[2]]:[navigator.appName,navigator.appVersion,"-?"],(t=i.match(/version\/(\d+)/i))!=null&&n.splice(1,1,t[1]),n.join(" "))}},n.getBrowserInfo=t.getBrowserInfo}(jQuery),function(n){var t={type:"POST",traditional:!0,url:"",data:{},success:function(){},error:function(n,t,i){Core.showError(i)},complete:function(){}};n.callService=function(i){n.extend(t,i),n.ajax({traditional:t.traditional,type:t.type,url:t.url,data:t.data,success:function(n,i,r){n.IsSuccess==!1?t.error(r,i,n.ErrorMessage):t.success(n,i,r)},error:t.error,complete:t.complete})}}(jQuery),function(n){n.fn.infoMenu=function(){var f="OPENED_MENU_ID_COOKIE_NAME",h=function(){return n.cookie(f)},e=function(t){n.cookie(f,t,{path:"/"})},t=this,i=t.parent(),c=i.length>0?i[0].style.marginBottom:"",o=function(n){t.parent()[0].style.marginBottom=20+n+"px"},s=function(){t.parent()[0].style.marginBottom=c},l=function(){t.children("ul").hide(),i.length>0&&s(),e(-1)},r=h(),u;if(!i.hasClass("infoMenu-done")){i.addClass("infoMenu-done");t.children("ul").on("click",function(n){n.target===this&&l()});return r>-1&&r<t.length&&(u=n(t.children("ul")[r]),u.toggle(!0),o(u.height())),t.each(function(){var i=n(this);i.children("ul").on("click",function(n){n.stopPropagation()});i.on("click",function(i){var r=n(this).children("ul"),f=n(this).siblings().children("ul"),u;f.hide(),r.toggle(),u=-1,r.is(":visible")?(u=t.children("ul").index(r),o(r.height())):s(),e(u),i.stopPropagation()})})}return t}}(jQuery)