function $(a){return document.getElementById(a)}function showVacanci(b){var a=GetParentNode(b,"div","vacancie");var d=GetNextNode(a,"div","description");var c=GetNextNode(a,"div","exit");if(a){a.style.backgroundColor="#EFFBFF"}if(d){if(d.style.display=="block"){closeVacanci(b);return}d.style.display="block"}if(c){c.style.display="block"}}function closeVacanci(b){var a=GetParentNode(b,"div","vacancie");var d=GetNextNode(a,"div","description");var c=GetNextNode(a,"div","exit");if(a){a.style.backgroundColor="#FFFFFF"}if(d){d.style.display="none"}if(c){c.style.display="none"}}function GetParentNode(a,b,c){b=b.toUpperCase();c=c.toUpperCase();while(a){a=a.parentNode;if(a&&a.nodeName.toUpperCase()==b){if(c){if(c==a.className.toUpperCase()){return a}}else{return a}}}return null}function GetNextNode(a,b,c){b=b.toUpperCase();c=c.toUpperCase();if(a){a=a.firstChild}while(a){if(a&&a.nodeName.toUpperCase()==b){if(c){if(c==a.className.toUpperCase()){return a}}else{return a}}a=a.nextSibling}return null}var logger_div=null;var logger_timeout=null;var logger_timeout_show=null;function LoggerInfoHide(){window.clearTimeout(logger_timeout_show);logger_timeout_show=null;logger_timeout=window.setTimeout(LoggerInfoHideEnd,1000)}function LoggerInfoHideEnd(){window.clearTimeout(logger_timeout_show);logger_timeout_show=null;var a=document.getElementById("logger_tooltip");if(!a){return}a.style.display="none";window.clearTimeout(logger_timeout);logger_timeout=null}function LoggerInfoNeedShow(){window.clearTimeout(logger_timeout);logger_timeout=null}function LoggerInfoShow(a,b){LoggerInfoHideEnd();logger_div=a;logger_timeout_show=window.setTimeout("LoggerInfoShowTime("+b+")",500)}function LoggerInfoShowTime(b){var c=document.getElementById("tooltip_info");var d=document.getElementById("logger_info_"+b);var f=document.getElementById("logger_td_"+b);var k=document.getElementById("logger_tooltip");var j=document.getElementById("tooltip_img");window.clearTimeout(logger_timeout);logger_timeout=null;if(!c||!d||!k){return}var e=GetAbsolutCoordInContent(logger_div);var h=0;var i=document.body.scrollWidth-e[0];var a=0;var g=15;if(f){if(i>f.offsetWidth){h=i-f.offsetWidth}a=f.offsetHeight+20}if(j){g+=h;j.style.left=g+"px"}k.style.top="-1000px";k.style.left=e[0]-h+"px";k.style.width=i+"px";c.innerHTML=d.innerHTML;k.style.display="block";k.style.top=e[1]+document.body.scrollTop+a+"px"}function GetAbsolutCoord(b){var c=b;var a=0,d=0;do{a+=c.offsetLeft;d+=c.offsetTop;if(c.scrollTop&&b!=c){d-=c.scrollTop}}while(c=c.offsetParent);return[a,d]}function GetAbsolutCoordInContent(b){var c=b;var a=0,d=-20;do{a+=c.offsetLeft;d+=c.offsetTop;if(c.scrollTop&&b!=c){d-=c.scrollTop}if(c.className=="userList"&&c.tagName.toLowerCase()=="table"){break}}while(c=c.offsetParent);return[a,d]}function setTab(a,b){$("tab1").className=b==1?"selected":"";$("tab2").className=b==2?"selected":"";$("tab3").className=b==3?"selected":"";$("tab1-content").style.display=b==1?"block":"none";$("tab2-content").style.display=b==2?"block":"none";$("tab3-content").style.display=b==3?"block":"none";a.blur();return false}function showMenu(){return false}document.onclick=function(){$("lang_menu").className=""};window.onload=function(){Gallery.Init("image-slider","_switcher")};var Gallery={};Gallery.Init=function(g,p,o){if(!p){p="_switcher"}var l=[0];this.Slider=document.getElementById(g);var a=this.Slider;this.Current=0;var j=0;var k=null;if(!this.Slider){return null}var b=this.Slider.childNodes;var f=0;var m=function(r){var q=0;for(var s=0;s<=r;s++){q+=l[s]}return q};for(var d=0;d<b.length;d++){if(b[d].nodeName.indexOf("#")==0){continue}var c=l.length-1;l[l.length]=b[d].offsetWidth;var e=d;var h=document.getElementById(b[d].id+p);if(!h){continue}h.shiftIndex=c;if(c==0){k=h}var n=function(){var q=this.shiftIndex;if(j==q){return}if(!a.style.left||a.style.left==""){a.style.left="0px"}var r=-(m(j));var i=-(m(q));Gallery.Animate(a,"left","px",r,i,f,300,40,0.5,0);f+=500;setTimeout(function(){f-=500},500+0);k.className="";this.className="current";j=q;k=this};if(!o){o="onclick"}h[o]=n}};Gallery.Animate=function(f,o,n,k,h,g,c,l,a,p){if(a==0){a=1e-7}if(!p){p=0}var f=f;var d=0;var m=h-k;var b=(m!=Math.abs(m));var d=0;for(var e=0;e<=l;e++){setTimeout(function(){var i=m*Math.pow(d/m,1/a);if(p!=0){i+=Math.sin(Math.PI*d/m)*d*p}f.style[o]=(i+k)+n;d=b==true?Math.max(d+Math.floor(m/l),m):Math.min(d+Math.ceil(m/l),m)},((e/l)*c)+g)}};(function(){var d=0;var b;function c(q){var r=q.previousSibling;while(r&&r.nodeType!=1){r=r.previousSibling}return r}function g(q){return q.replace(/(^[ \r\n\t]+|[ \r\n\t]+$)/g,"")}function a(q){var r;if(window.MQRTE&&MQRTE.Editor(q.name)){return(!MQRTE.isEmpty(q.name))}if(!(r=q.value)||(r.replace(/( |\t|\n|\r|\f|\v)/g,"")=="")){return false}return true}function e(q){var r;if(!(r=q.value)||(/[^0-9]/.test(r))){return false}return true}function f(q){var r;if((r=q.value)&&(!/^[a-z][a-z\-.0-9_]+@[a-z]{1}[a-z\-.0-9_]+$/i.test(r)||r.length>=255)){return false}return true}function j(u,t,s){var r=u.value,q=t.value;if(s){r=r.toLowerCase();q=q.toLowerCase()}return(r==q)}function k(s,u,q){var t=new RegExp(u,q);return t.test(s.value)}function p(q){var s=q.value;function r(w,v,z){var y=0;for(var x=0;x<z;++x){var u=s.charAt(x),t=w[x];(u)&&(u=parseInt(u));y+=u*t}if(y==0){return false}y%=11;if(y>9){y%=10}return(y==v)}if(s.length==10){return r([2,4,10,3,5,9,4,6,8],parseInt(s.charAt(s.length-1)),9)}else{if(s.length==12){if(!r([7,2,4,10,3,5,9,4,6,8],parseInt(s.charAt(s.length-2)),10)){return false}if(!r([3,7,2,4,10,3,5,9,4,6,8],parseInt(s.charAt(s.length-1)),11)){return false}return true}}return false}function n(q){if(!q.value){return true}return/^((http|https):\/\/)?([\w-]+\.)+[\w-]+(\/[\w-_ .\/%]*)?(\/)?(\?[\w=%&]+)?$/i.test(q.value)}function m(q){for(i=0,sz=q.length;i<sz;i++){if(q[i].checked){return true}}return false}function h(r,u){var v=1;var q=c(r);if(b){b.style.display="block";return true}if(!q||q.className!="field-validation-error"||q.nodeName!="SPAN"){var t=document.createElement("span");t.innerHTML=u;t.className="field-validation-error";r.parentNode.insertBefore(t,r);r.parentNode.insertBefore(document.createTextNode("\n"),t)}else{q.innerHTML=u}}function l(r){var q=c(r);if(q&&q.className=="field-validation-error"){q.innerHTML=""}}function o(s,q){var x=s.parentNode;while(x){if(q){if(x.className=="gimel-placer"){x.className="gimel-placer field-validation-error";break}}else{if(x.className){if(x.className.indexOf("field-validation-error")!=-1){var v=x.className.split(" "),w=[];for(var u in v){if(v[u]!="field-validation-error"){w.push(v[u])}}x.className=w.join(" ");break}}}x=x.parentNode}}window.Validate=function(v){if(document.getElementById("validate_message")){b=document.getElementById("validate_message");b.style.display="none"}if(!window.V){var H="Задействована форма с валидацией, но нет ни одного правила";if(window.console){console.warn(H)}else{alert(H)}return false}var J=true,E,G,I={};++d;for(var A=0,x=V.length;A<x;++A){var q=true;if(G=v.elements[(E=V[A])[0]]){if(G.style&&G.style.display=="none"&&(!window.Gimel||!Gimel.Editor(E[0]))){continue}var z=document.getElementById("validate_"+E[0]);if(G.type=="text"||G.nodeName=="TEXTAREA"){G.value=g(G.value)}switch(E[1]){case 1:q=a(G);break;case 2:var B;if(E[3]!==null){B=parseInt(E[3]);var w;(E[4]&&(w=E[4]));q=G.value.length>=B&&(!w||G.value.length<=w)}break;case 3:q=e(G);break;case 4:q=f(G);break;case 5:q=j(G,v.elements[E[3]],E[4]);if(!q){var t;if(I[E[3]]){var F=document.getElementById("validate_"+E[3]);l(F);I[E[3]]=false}if(!(t=v.elements[E[3]]).className){t.className="field-validation-error"}else{t.className+=" field-validation-error"}}break;case 6:q=k(G,E[3],E[4]);break;case 7:q=p(G);break;case 8:q=n(G);break;case 9:q=m(G);break;case 10:try{q=E[3](G)}catch(C){if(window.console){console.error(C.message)}}break}if(!q&&G.iteration!=d){if(window.Gimel&&Gimel.Editor(G.name)){o(G,true)}else{if(!G.className){G.className="field-validation-error"}else{G.className+=" field-validation-error"}}h(z,E[2]);J=false;I[E[0]]=false;G.iteration=d}else{if(I[E[0]]!==false){I[E[0]]=true}}}}if(!J){for(var r in I){if(I[r]){var z=document.getElementById("validate_"+r);l(z);var C=v.elements[r];if(window.Gimel&&Gimel.Editor(r)){o(C,false)}else{function D(K){var L=K.className.split(" "),u=[];for(var y=0,s=L.length;y<s;++y){if(L[y]!="field-validation-error"){u.push(L[y])}}K.className=u.join(" ")}if(!C.nodeName){for(var x=C.length-1;x>=0;--x){D(C[x])}}else{D(C)}}}}if(window.form_is_not_valid){form_is_not_valid(v)}}else{if(window.form_is_valid){form_is_valid(v)}}return J}})();
