jsMenu=new function(){this.el_menu=false;this.el_target=false;this.updateXY=function(){return false;};this.show=function(a){a.blur();this.el_target=arguments[0];if(this.el_menu){document.body.removeChild(this.el_menu);}this.el_menu=document.createElement("div");this.el_menu.id="jsmenu";var table=document.createElement("table");table.className="jsmenu";table.style.cssText="-webkit-box-shadow:0 3px 5px #333;-webkit-border-radius:5px;-moz-box-shadow:0 3px 5px #333;-moz-border-radius:5px;";var tr=document.createElement("tr");var th=document.createElement("th");var td=document.createElement("td");var tbody=document.createElement("tbody");var a=document.createElement("a");var pos=jsF.GetRealPos(jsMenu.el_target);pos["left"]+=0;for(var i=1;i<arguments.length;i++){var tbody_tr=tr.cloneNode(false);var tbody_td=td.cloneNode(false);var tbody_a=a.cloneNode(false);tbody_a.href=arguments[i][0];tbody_a.setAttribute("title",arguments[i][1]);if(arguments[i][2] !=undefined){tbody_a.className=arguments[i][2];}if(arguments[i][3] !=undefined){tbody_a.onclick=arguments[i][3];}else{tbody_a.onclick=jsMenu.hide;}tbody_a.appendChild(document.createTextNode(arguments[i][1]));tbody_td.appendChild(tbody_a);tbody_tr.appendChild(tbody_td);tbody.appendChild(tbody_tr);}table.appendChild(tbody);this.el_menu.appendChild(table);this.el_menu.style.position="absolute";this.el_menu.style.zIndex=1000;this.el_menu.style.opacity=1;this.el_menu.style.visibility='visible';document.body.appendChild(this.el_menu);var pos=jsF.AlignToPos(pos,this.el_menu.offsetWidth,this.el_menu.offsetHeight);this.el_menu.style.left=pos["left"]+'px';this.el_menu.style.top=pos["top"]+'px';setTimeout(function(){jsF.addEvent(document,"click",jsMenu.is_over)},30);setTimeout(function(){jsF.addEvent(document,"keypress",jsMenu.keypress)},20);return false;};this.is_over=function(e){var x=e.clientX+document.body.scrollLeft;var y=e.clientY+jsF.scrollTop();var pos=jsF.GetRealPos(jsMenu.el_target);var pos2=jsF.GetRealPos(jsMenu.el_menu);if((x>=pos["left"]&&x<=pos["right"]&&y>=pos["top"]&&y<=pos["bottom"])||(x>=pos2["left"]&&x<=pos2["right"]&&y>=pos2["top"]&&y<=pos2["bottom"])){return false;}jsMenu.hide();};this.hide=function(){setTimeout(function(){jsMenu.el_menu.style.opacity=0.8},20);setTimeout(function(){jsMenu.el_menu.style.opacity=0.6},40);setTimeout(function(){jsMenu.el_menu.style.opacity=0.4},60);setTimeout(function(){jsMenu.el_menu.style.opacity=0.2},80);setTimeout(function(){jsMenu.el_menu.style.visibility="hidden"},100);jsF.removeEvent(document,"click",jsMenu.is_over);jsF.removeEvent(document,"keypress",jsMenu.keypress);};this.keypress=function(e){if(!e){e=window.event;}if(!e){return;}if(e.keyCode==27){jsMenu.hide();};};};Function.prototype.bind=function(object){var __method=this;return function(){__method.apply(object,arguments);}};if(!Array.prototype.push){Array.prototype.push=function(){var startLength=this.length;for(var i=0;i<arguments.length;i++){this[startLength+i]=arguments[i];}return this.length;}};oAjax=new function(){this.empty_function=function(){};this.trythese=function(){var r;for(var i=0;i<arguments.length;i++){var lambda=arguments[i];try{r=lambda();break;}catch(e){};}return r;};this.get_transport=function(){return oAjax.trythese(function(){return new ActiveXObject('Msxml2.XMLHTTP')},function(){return new ActiveXObject('Microsoft.XMLHTTP')},function(){return new XMLHttpRequest()})||false;};this.set_options=function(destination,source){for(property in source){destination[property]=source[property];}return destination;};this.Request=function(url,new_options){this.events=['Uninitialized','Loading','Loaded','Interactive','Complete'];this.options={method:'post',asynchronous:true,parameters:''};this.transport=oAjax.get_transport();this.request=function(url){var parameters=this.options.parameters||'';if(parameters.length>0){parameters+='&_=';}try{if(this.options.method=='get'){url+='?'+parameters;}this.transport.open(this.options.method,url,this.options.asynchronous);if(this.options.asynchronous){this.transport.onreadystatechange=this.onStateChange.bind(this);setTimeout((function(){this.respondToReadyState(1)}).bind(this),10);}this.setRequestHeaders();this.body=(this.options.method=='post'?(this.options.postBody||parameters):null);this.transport.send(this.body);}catch(e){};};this.onStateChange=function(){var readyState=this.transport.readyState;if(readyState !=1){this.respondToReadyState(this.transport.readyState);}};this.respondToReadyState=function(readyState){var event=this.events[readyState];if(event=='Complete'){(this.options['on'+this.transport.status]||this.options['on'+(this.responseIsSuccess()?'Success':'Failure')]||oAjax.empty_function)(this.transport);}(this.options['on'+event]||oAjax.empty_function)(this.transport);if(event=='Complete'){this.transport.onreadystatechange=oAjax.empty_function;}};this.responseIsSuccess=function(){return this.transport.status==undefined||this.transport.status==0||(this.transport.status>=200&&this.transport.status<300);};this.responseIsFailure=function(){return !this.responseIsSuccess();};this.setRequestHeaders=function(){var requestHeaders=['X-Requested-With','XMLHttpRequest'];if(this.options.method=='post'){requestHeaders.push('Content-type','application/x-www-form-urlencoded');if(this.transport.overrideMimeType){requestHeaders.push('Connection','close');}}if(this.options.requestHeaders){requestHeaders.push.apply(requestHeaders,this.options.requestHeaders);}for(var i=0;i<requestHeaders.length;i+=2){this.transport.setRequestHeader(requestHeaders[i],requestHeaders[i+1]);}};oAjax.set_options(this.options,new_options);this.request(url);};};﻿ var oDownloadsWeb=new function(){this.l=function(download_uri,uniqid){jsF.inner_text($("dl-b-"+uniqid),jsF.Get("oTkit_1082"));var params=[ "arg[sef_output]=ajax","arg[area][a]=getlink","arg[area][t]=downloads","arg[uri]="+download_uri,"arg[r]="+Math.random(),jsF.Get("sef_append"),jsF.Get("sef_append_ajax")];params=params.join("&");var oncompletefn=function(r){if(!r.responseText||r.responseText.length==0){return;}var oJSon=eval("("+r.responseText+")");switch(parseInt(oJSon.responseStatus)){case 200:var el_contents=$("dl-c-"+uniqid);jsF.inner_text(el_contents,"\u0020");var el_href=$("dl-b-"+uniqid);el_href.blur();jsF.inner_text(el_href,jsF.Get("oTkit_1030"));el_href.href=oJSon.href;el_href.onclick=function(){};el_href.className="submitnext";var textarea=document.createElement("textarea");textarea.className="inp";textarea.rows=3;textarea.style.fontSize="85%";textarea.style.height="3em";textarea.appendChild(document.createTextNode(oJSon.href));el_contents.appendChild(textarea);el_contents.appendChild(document.createTextNode(jsF.Get("l_valid_note")));setTimeout(function(){document.location.href=oJSon.href},100);break;default:alert(oJSon.responseMessage);break;}};new oAjax.Request(jsF.Get("path_server_dir")+"/"+jsF.Get("file_index"),{method:"get",parameters:params,onComplete:oncompletefn});};};var oCommentsWeb=new function(){this.msg_body="";this.msg_body_edit="";this.msg_body_kb="";this.msg_body_quote="";this.id_comment=0;this.id_comment_quote=0;this.id_comment_edit=0;this.set_ajax_status=function(phrase,classname){var el=$("ajax-status");if(!el){return;}jsF.inner_text(el,phrase);el.className=classname;};this.preview=function(){this.msg_body=$("msg-body").value;this.set_ajax_status("\u0020","");$("msg-body").className="inp";if(!this.validate_input_textarea(this.msg_body)){this.set_ajax_status(jsF.Get("Incorrect comment"),"warning");$("msg-body").className="inp state-warning";return;}oW._(jsF.Get("oTkit_1082"));var params=[ "arg[sef_output]=ajax","arg[area][a]=preview","arg[area][t]=comments","arg[msg-body]="+encodeURIComponent(this.msg_body),"arg[r]="+Math.random(),jsF.Get("sef_append"),jsF.Get("sef_append_ajax")];params=params.join("&");var oncompletefn=function(r){oW.__();if(!r.responseText||r.responseText.length==0){return;}var oJSon=eval("("+r.responseText+")");switch(parseInt(oJSon.responseStatus)){case 200:jsF.inner_text($("msg-preview"),"\u0020");$("msg-preview").appendChild(stringToDOM(oJSon.html));break;default:alert(oJSon.responseMessage);break;}};new oAjax.Request(jsF.Get("path_server_dir")+"/"+jsF.Get("file_index"),{method:"post",parameters:params,onComplete:oncompletefn});};this.post=function(id_item,id_module){var o=oCommentsWeb;this.msg_body=$("msg-body").value;this.set_ajax_status("","");$("msg-body").className="inp";if(!this.validate_input_textarea(this.msg_body)){this.set_ajax_status(jsF.Get("Incorrect comment."),"warning");$("msg-body").className="inp state-warning";return;}oW._(jsF.Get("oTkit_1082"));var params=[ "arg[sef_output]=ajax","arg[area][a]=add","arg[area][t]=comments","arg[msg-body]="+encodeURIComponent(this.msg_body),"arg[id_item]="+id_item,"arg[id_module]="+id_module,"arg[is_private]="+($("msg-is-private").checked?1:0),"arg[r]="+Math.random(),jsF.Get("sef_append"),jsF.Get("sef_append_ajax")];params=params.join("&");var oncompletefn=function(r){oW.__();if(!r.responseText||r.responseText.length==0){return;}var oJSon=eval("("+r.responseText+")");switch(parseInt(oJSon.responseStatus)){case 200:jsF.inner_text($("msg-preview"),"\u0020");$("msg-preview").appendChild(stringToDOM(oJSon.html));o.set_ajax_status(jsF.Get("Comment has been added."),"allow");jsF.destroy_el($("fs-msg-body").parentNode);break;default:alert(oJSon.resposeMessage);break;}};new oAjax.Request(jsF.Get("path_server_dir")+"/"+jsF.Get("file_index"),{method:"post",parameters:params,onComplete:oncompletefn});};this.quote=function(id_comment){var o=oCommentsWeb;this.destroy_edit_form();if(this.id_comment_quote==id_comment&&this.msg_body_quote !=""){$("msg-body").value=this.msg_body_quote+"\n";var pos=jsF.GetRealPos($("tr-0"));unbounce_scroll(50,pos["top"]);$("msg-body").focus();return;}oW._(jsF.Get("oTkit_1082"));var params=[ "arg[sef_output]=ajax","arg[area][a]=quote","arg[area][t]=comments","arg[id]="+id_comment,"arg[r]="+Math.random(),jsF.Get("sef_append"),jsF.Get("sef_append_ajax")];params=params.join("&");var oncompletefn=function(r){oW.__();if(!r.responseText||r.responseText.length==0){return;}var oJSon=eval("("+r.responseText+")");switch(parseInt(oJSon.responseStatus)){case 200:o.msg_body_quote=oJSon.code;o.id_comment_quote=id_comment;$("msg-body").value=oJSon.code+"\n";var pos=jsF.GetRealPos($("tr-0"));unbounce_scroll(50,pos["top"]);$("msg-body").focus();break;default:alert(oJSon.responseMessage);break;}};new oAjax.Request(jsF.Get("path_server_dir")+"/"+jsF.Get("file_index"),{method:"post",parameters:params,onComplete:oncompletefn});};this.quote_kb=function(id_kb){var o=oCommentsWeb;this.destroy_edit_form();if(this.msg_body_kb !=""){$("msg-body").value=this.msg_body_kb+"\n";var pos=jsF.GetRealPos($("tr-0"));unbounce_scroll(50,pos["top"]);$("msg-body").focus();return;}oW._(jsF.Get("oTkit_1082"));var params=[ "arg[sef_output]=ajax","arg[area][a]=quote","arg[area][t]=kb","arg[area][s]=records","arg[id]="+id_kb,"arg[r]="+Math.random(),jsF.Get("sef_append"),jsF.Get("sef_append_ajax")];params=params.join("&");var oncompletefn=function(r){oW.__();if(!r.responseText||r.responseText.length==0){return;}var oJSon=eval("("+r.responseText+")");switch(parseInt(oJSon.responseStatus)){case 200:o.msg_body_kb=oJSon.code;$("msg-body").value=oJSon.code+"\n";var pos=jsF.GetRealPos($("tr-0"));unbounce_scroll(50,pos["top"]);$("msg-body").focus();break;default:alert(oJSon.responseMessage);break;}};new oAjax.Request(jsF.Get("path_server_dir")+"/"+jsF.Get("file_index"),{method:"post",parameters:params,onComplete:oncompletefn});};this.destroy_edit_form=function(){if(this.id_comment_edit){jsF.inner_text($("form-reply-"+this.id_comment_edit),"\u0020");}if($("co-fs-msg-body")&&$("co-fs-msg-body").style.display=="none"){toggle_collapse("fs-msg-body");}jsF.inner_text($("msg-preview"),"\u0020");};this.edit=function(id_comment){var o=oCommentsWeb;var el_comment=$("form-reply-"+id_comment);if(!el_comment){return;}this.destroy_edit_form();if($("co-fs-msg-body")&&$("co-fs-msg-body").style.display !="none"){toggle_collapse("fs-msg-body");}if(this.id_comment_edit==id_comment&&this.msg_body_edit !=""){el_comment.appendChild(o.make_form(this.msg_body_edit));$("textarea-edit").focus();return;}this.id_comment_edit=id_comment;oW._(jsF.Get("oTkit_1082"));var params=[ "arg[sef_output]=ajax","arg[area][a]=quote","arg[area][t]=comments","arg[id]="+id_comment,"arg[is_quote]="+0,"arg[r]="+Math.random(),jsF.Get("sef_append"),jsF.Get("sef_append_ajax")];params=params.join("&");var oncompletefn=function(r){oW.__();if(!r.responseText||r.responseText.length==0){return;}var oJSon=eval("("+r.responseText+")");switch(parseInt(oJSon.responseStatus)){case 200:jsF.inner_text(el_comment,"\u0020");o.msg_body_edit=oJSon.code;el_comment.appendChild(o.make_form(oJSon.code));break;default:alert(oJSon.responseMessage);break;}};new oAjax.Request(jsF.Get("path_server_dir")+"/"+jsF.Get("file_index"),{method:"post",parameters:params,onComplete:oncompletefn});};this.save=function(){var o=oCommentsWeb;this.msg_body=$("textarea-edit").value;oW._(jsF.Get("oTkit_1082"));var params=[ "arg[sef_output]=ajax","arg[area][a]=edit","arg[area][t]=comments","arg[msg-body]="+encodeURIComponent(this.msg_body),"arg[id]="+this.id_comment_edit,"arg[r]="+Math.random(),jsF.Get("sef_append"),jsF.Get("sef_append_ajax")];params=params.join("&");var oncompletefn=function(r){oW.__();if(!r.responseText||r.responseText.length==0){return;}var oJSon=eval("("+r.responseText+")");switch(parseInt(oJSon.responseStatus)){case 200:o.destroy_edit_form();var msg_reply=$("msg-reply-"+o.id_comment_edit);jsF.inner_text(msg_reply,"\u0020");msg_reply.appendChild(stringToDOM(oJSon.html));o.msg_body_edit="";o.id_comment_edit=0;break;default:alert(oJSon.responseMessage);break;}};new oAjax.Request(jsF.Get("path_server_dir")+"/"+jsF.Get("file_index"),{method:"post",parameters:params,onComplete:oncompletefn});};this.remove_confirm=function(id_comment){if(confirm(jsF.Get("oTkit_1043")+':\u0020'+jsF.Get("oTkit_1051"))){this.remove(id_comment);}};this.remove=function(id_comment){oW._(jsF.Get("oTkit_1082"));var params=[ "arg[sef_output]=ajax","arg[area][a]=remove","arg[area][t]=comments","arg[id_comment]="+id_comment,"arg[r]="+Math.random(),jsF.Get("sef_append"),jsF.Get("sef_append_ajax")];params=params.join("&");var oncompletefn=function(r){oW.__();if(!r.responseText||r.responseText.length==0){return;}var oJSon=eval("("+r.responseText+")");switch(parseInt(oJSon.responseStatus)){case 200:jsF.destroy_el($("tr-"+id_comment));break;default:alert(oJSon.responseMessage);break;}};new oAjax.Request(jsF.Get("path_server_dir_admin")+'/'+jsF.Get("file_index"),{method:"get",parameters:params,onComplete:oncompletefn});};this.make_form=function(value){var a=document.createElement("a");var em=document.createElement("em");var div=document.createElement("div");var legend=document.createElement("legend");var fieldset=document.createElement("fieldset");var ul=document.createElement("ul");var li=document.createElement("li");legend.appendChild(document.createTextNode(jsF.Get("l_form_legend_title")));div.className="inp";var textarea=document.createElement("textarea");textarea.className="inp";textarea.setAttribute("rows",5);textarea.id="textarea-edit";textarea.style.overflow="scroll";textarea.value=value;var ul_=ul.cloneNode(false);ul_.className="wysiwyg";var li_=li.cloneNode(false);var a_=a.cloneNode(false);a_.id="trigger-file"+this.id_comment_edit;a_.className="btn";a_.href="javascript:void(0)";a_.appendChild(document.createTextNode(jsF.Get("l_attach_file")));fieldset.appendChild(legend);fieldset.appendChild(textarea);li_.appendChild(a_);ul_.appendChild(li_);fieldset.appendChild(ul_);div.appendChild(fieldset);var div_clone=div.cloneNode(false);div_clone.className="submit-buttons";var a=a.cloneNode(false);a.id="btn-save-comment";a.setAttribute("style","float:left");a.setAttribute("class","submitok");a.href="javascript:void(oCommentsWeb.save())";a.appendChild(document.createTextNode(jsF.Get("l_form_btn_save")));div_clone.appendChild(a);a=a.cloneNode(false);a.setAttribute("style","float:left");a.setAttribute("class","submitcancel");a.href="javascript:void(oCommentsWeb.destroy_edit_form())";a.appendChild(document.createTextNode(jsF.Get("l_form_btn_cancel")));div_clone.appendChild(a);div.appendChild(div_clone);this.timer_autoheight=setInterval(function(){jsF.checkFieldHeightChar("textarea-edit");},201);oUploadFile=new oUploadForm;setTimeout((function(obj){return function(){oUploadFile.init("trigger-file"+obj.id_comment_edit,textarea.id,jsF.Get("ar_js_data_file"));}})(this),40);return div;};this.validate_input_textarea=function(s){s=jsF.strTrim(s);return(s !="")};};function stringToDOM(q){var r=function(a){a=a.replace(/\r/g," ");a=a.replace(/\n/g," ");return a};var s=function(a){a=a.replace(/&amp;/g,"&");a=a.replace(/&gt;/g,">");a=a.replace(/&lt;/g,"<");a=a.replace(/&nbsp;/g," ");a=a.replace(/&quot;/g,'"');return a};var t=function(a){a=a.replace(/ /g,"");return a};var u=function(a){var b=document.createDocumentFragment();var c=a.indexOf(' ');if(c===-1){var d=a.toLowerCase();b.appendChild(document.createElement(d))}else{d=t(a.substring(0,c)).toLowerCase();if(document.all&&d==='input'){b.appendChild(document.createElement('<'+a+'/>'));return b}a=a.substring(c+1);b.appendChild(document.createElement(d));while(a.length>0){var e=a.indexOf('=');if(e>=0){var f=t(a.substring(0,e)).toLowerCase();var g=a.indexOf('"');a=a.substring(g+1);g=a.indexOf('"');var h=s(a.substring(0,g));a=a.substring(g+2);if(document.all&&f==='style'){b.lastChild.style.cssText=h}else{b.lastChild.setAttribute(f,h)}}else{break}}}return b};var v=function(a,b,c){var d=a;var e=b;c=c.toLowerCase();var f=e.indexOf('</'+c+'>');d=d.concat(e.substring(0,f));e=e.substring(f);while(d.indexOf('<'+c)!=-1){d=d.substring(d.indexOf('<'+c));d=d.substring(d.indexOf('>')+1);e=e.substring(e.indexOf('>')+1);f=e.indexOf('</'+c+'>');d=d.concat(e.substring(0,f));e=e.substring(f)}return b.length-e.length};var w=function(a){var b=document.createDocumentFragment();while(a&&a.length>0){var c=a.indexOf("<");if(c===-1){a=s(a);b.appendChild(document.createTextNode(a));a=null}if(c>0){var d=s(a.substring(0,c));b.appendChild(document.createTextNode(d));a=a.substring(c)}if(c===0){var e=a.indexOf('<!--');if(e===0){var f=a.indexOf('-->');var g=a.substring(4,f);g=s(g);b.appendChild(document.createComment(g));a=a.substring(f+3)}else{var h=a.indexOf('>');if(a.substring(h-1,h)==='/'){var i=a.indexOf('/>');var j=a.substring(1,i);b.appendChild(u(j));a=a.substring(i+2)}else{var k=a.indexOf('>');var l=a.substring(1,k);var m=document.createDocumentFragment();m.appendChild(u(l));a=a.substring(k+1);var n=a.substring(0,a.indexOf('</'));a=a.substring(a.indexOf('</'));if(n.indexOf('<')!=-1){var o=m.lastChild.nodeName;var p=v(n,a,o);n=n.concat(a.substring(0,p));a=a.substring(p)}a=a.substring(a.indexOf('>')+1);m.lastChild.appendChild(w(n));b.appendChild(m)}}}}return b};var x=w(q);return x}oUploadForm=function(){this.uid_input=0;this.uid_form=0;this._el_input=false;this._el_button=false;this._el_textarea=false;this._form_data={};this.cfg={is_autosubmit:1};this.site_oncomplete=function(o,r){oW.__();if(!r||r.length==0){return;}var oJSon=eval("("+r+")");switch(parseInt(oJSon.responseStatus)){case 200:o._el_textarea.value+="\n"+oJSon.code;o._el_textarea.focus();break;default:alert(oJSon.responseMessage);break;}};this.site_onsubmit=function(){oW._(jsF.Get("oTkit_1082"));};this.submit=function(o){this.site_onsubmit();this.uid_input++;var id="oUpload"+this.uid_input;var str_iframe=isIE?"<iframe id=\""+id+"\" src=\"javascript:false\" name=\""+id+"\" />":"iframe";var el_iframe=document.createElement(str_iframe);el_iframe.name=id;el_iframe.setAttribute("name",id);el_iframe.id=id;el_iframe.style.display="none";var el_form=document.createElement("form");el_form.setAttribute("method","post");el_form.setAttribute("enctype","multipart/form-data");el_form.setAttribute("action",jsF.Get("path_server_dir")+"/"+jsF.Get("file_index"));el_form.setAttribute("target",el_iframe.name);el_form.style.display="none";el_form.appendChild(el_iframe);var input=document.createElement("input");for(var prop in o._form_data){var input_clone=input.cloneNode(false);input_clone.setAttribute("type","hidden");input_clone.setAttribute("name",prop);input_clone.setAttribute("value",o._form_data[prop]);el_form.appendChild(input_clone);}this._el_input.style.top="-3000px";el_form.appendChild(this._el_input);document.body.appendChild(el_form);el_form.submit();jsF.addEvent(el_iframe,'load',function(){$("arp-descr-").value+="\n"+el_iframe.src;var doc=el_iframe.contentDocument?el_iframe.contentDocument:window.frames[el_iframe.id].document;if(doc.readyState&&doc.readyState !='complete'){return;}if(doc.body&&doc.body.innerHTML=="false"){return;}var response=doc.body.textContent?doc.body.textContent:doc.body.innerText;setTimeout(function(){jsF.destroy_el(el_form);o.uid_input=false;},100);o._trigger_off(o);o.site_oncomplete(o,response);});};this._trigger_on=function(o){if(!o.uid_input){o._create_input(o);}var t=o._el_input.parentNode;t.style.opacity=0;if(typeof(t.filters)!='undefined'){t.style.filter="alpha(opacity=0)";o._el_input.style.filter="alpha(opacity=0)";}var pos_button=jsF.GetRealPos(o._el_button);var pos=jsF.AlignToPos(pos_button,o._el_button.offsetWidth,o._el_button.offsetHeight);t.style.left=pos["left"]+"px";t.style.top=(pos["top"]-o._el_button.offsetHeight)+"px";t.style.width=o._el_button.offsetWidth+"px";t.style.height=o._el_button.offsetHeight+"px";o._el_button.className="btn-hover btn add";o._el_input.style.top=0;};this._trigger_off=function(o){o._el_input.parentNode.style.top=0;o._el_input.style.top="-3000px";o._el_button.className="btn";};this._create_input=function(o){var input=document.createElement("input");input.id="form-input";input.setAttribute("type","file");input.setAttribute("name","filename");input.style.position="absolute";input.style.top=0;input.style.right=0;input.style.margin=0;input.style.fontSize="300px";input.style.cursor="pointer";var div=document.createElement("div");div.id="form-div";div.style.position="absolute";div.style.display="block";div.style.top=0;div.style.left=0;div.style.opacity=0;div.style.overflow="hidden";div.zIndex=1000;div.appendChild(input);document.body.appendChild(div);jsF.addEvent(input,"mouseout",(function(obj){return function(){obj._trigger_off(obj)}})(this));jsF.addEvent(input,"change",function(){if(!input||input.value===""){return;}if(o.cfg.is_autosubmit){o.submit(o)}});this.uid_input++;this._el_input=input;};this.init=function(id_button,id_textarea,form_data){this._el_button=$(id_button);this._el_textarea=$(id_textarea);this._form_data=form_data;if(!this._el_button||!this._el_textarea){return;}jsF.addEvent(this._el_button,"mouseover",(function(obj){return function(){obj._trigger_on(obj)}})(this));};};var expires=new Date();expires.setTime(expires.getTime()+(1000*86400*365));var fontSize;var isIE=!-[1,];function $(el_name){return(document.getElementById(el_name)==null)?false:document.getElementById(el_name);}function fn_getElementById(el_name){return $(el_name);}function nw(href){window.open(href);return false;}var ar_coll_obj=[];function collapse_all(){for(var i=0,length1=ar_coll_obj.length;i<length1;i++){$("co-"+ar_coll_obj[i]).style.display="none";var el_img=$("ci-"+ar_coll_obj[i]);el_img.src=el_img.src.replace("_on.png","_off.png");}}function uncollapse_all(is_save){if(is_save){is_cookie=fetch_cookie("biz_collapse");if(is_cookie !=null){collapsed=is_cookie.split("\n");for(var i=0,length1=ar_coll_obj.length;i<length1;i++){for(var i2=0,length2=collapsed.length;i2<length2;i2++){if(collapsed[i2]==ar_coll_obj[i]){$("co-"+ar_coll_obj[i]).style.display="none";var el_img=$("ci-"+ar_coll_obj[i]);el_img.src=el_img.src.replace("_on.png","_off.png");}}}}else{for(var i=0,length1=ar_coll_obj.length;i<length1;i++){$("co-"+ar_coll_obj[i]).style.display="none";toggle_collapse(ar_coll_obj[i]);}}}else{for(var i=0,length1=ar_coll_obj.length;i<length1;i++){$("co-"+ar_coll_obj[i]).style.display="block";var el_img=$("ci-"+ar_coll_obj[i]);el_img.src=el_img.src.replace("_off.png","_on.png");}}}function toggle_collapse(id_obj,el,is_save){var obj=$("co-"+id_obj);var img=$("ci-"+id_obj);if(!obj){if(img){img.style.display="none";}return false;}jsF.Set("slider_is_progress",true);jsF.Set("slider_id_slided",false);if(el){jsF.disable_selection(el);el.style.cursor="pointer";}if(obj.style.display=="none"){oToggle=$("co-"+id_obj);oToggle.style.display="block";jsSlider.slideContent(id_obj,jsF.Get("slider_pixels"));save_collapsed(id_obj,false);if(img){img.src=img.src.replace("_off.png","_on.png");}}else{jsSlider.slideContent(id_obj,(jsF.Get("slider_pixels")*-1));if(is_save){save_collapsed(id_obj,true);}if(img){img.src=img.src.replace('_on.png','_off.png');}}return false;}function save_collapsed(id_obj,addcollapsed){var collapsed=fetch_cookie("biz_collapse");var tmp=new Array();if(collapsed !=null){collapsed=collapsed.split("\n");for(var i2=0,length2=collapsed.length;i2<length2;i2++){if(collapsed[i2] !=id_obj&&collapsed[i2] !=""){tmp[tmp.length]=collapsed[i2];}}}if(addcollapsed){tmp[tmp.length]=id_obj;}expires=new Date();expires.setTime(expires.getTime()+(1000*86400*365));set_cookie("biz_collapse",tmp.join("\n"),expires);}function set_cookie(name,value,expires){if(!expires){expires=new Date();}document.cookie=name+"="+escape(value)+";expires="+expires.toGMTString()+";path=/";}function fetch_cookie(name){var cookie_name=name+"=";var cookie_length=document.cookie.length;var cookie_begin=0;while(cookie_begin<cookie_length){var value_begin=cookie_begin+cookie_name.length;if(document.cookie.substring(cookie_begin,value_begin)==cookie_name){var value_end=document.cookie.indexOf(";",value_begin);if(value_end==-1){value_end=cookie_length;}return unescape(document.cookie.substring(value_begin,value_end));}cookie_begin=document.cookie.indexOf(" ",cookie_begin)+1;if(cookie_begin==0){break;}}return null;}function delete_cookie(name){var expireNow=new Date();document.cookie=name+"="+";expires=Thu,01-Jan-70 00:00:01 GMT"+";path=/";}var jsVarObj=new function(){var _this=this;this.A="";this._=function(ar){_this.A=ar;return _this;};this.get=function(varname){if(!varname){return _this.A;}var len=_this.A.length;for(var i=0;i<len;i++){if(typeof(_this.A[i])=="object"){if(_this.A[i][0]==varname){return _this.A[i][1];}}}return-1;};this.set=function(varname,value){var len=_this.A.length;for(var i=0;i<len;i++){if(_this.A[i][0]==varname){return _this.A[i][1]=value;}}return _this.A[len]=[varname,value];};this.unset=function(varname){var len=_this.A.length;for(var i=0;i<len;i++){if(_this.A[i][0]==varname){_this.A.splice(i,1);return;}}};return this;};var jsF=new function(){var _this=this;this.el=null;this.fontSize=100;this.vars=[];this.Set=function(k,v){this.vars[k]=v;};this.Get=function(k){return(typeof(this.vars[k])=="undefined")?k:this.vars[k];};this.checkFieldHeightChar=function(id){var el=fn_getElementById(id);if(!el){return;}var height=3+parseInt(el.value.length / 65);height+=this.countLF(el.value);if(height>35){height=35;}el.style.height=height+"em";};this.countLF=function(s){return s.split("\n").length;};this.checkFieldLength=function(id_field,target_id){var el=$(id_field);if(!el){return;}var target_el=$(target_id);target_el.replaceChild(document.createTextNode(el.value.length),target_el.firstChild);};this.checkFieldLengthLeft=function(id_field,target_id,max){var el=$(id_field);if(!el){return;}var chars_left=max-el.value.length;if(el.value.length>max){chars_left=0;el.value=el.value.substring(0,max);}var target_el=$(target_id);target_el.replaceChild(document.createTextNode(chars_left),target_el.firstChild);};this.checkURL=function(id){var el=fn_getElementById(id);if(!el){return;}re=/[^0-9A-Za-z.,:\?&=+%#@!\*\(\)\[\]\/-]+/g;el.value=this.strTrim(el.value.replace(re,""));};this.strTrim=function(s){var s=s.replace(/^\s\s*/,''),ws=/\s/,i=s.length;while(ws.test(s.charAt(--i)));return s.slice(0,i+1);};this.FindParentObject=function(obj,tag_name,class_name){if(!obj){return null;}var o=obj;var tag=tag_name.toUpperCase();var cl=(class_name?class_name.toLowerCase():null);while(o.parentNode){var parent=o.parentNode;if(parent.tagName&&parent.tagName.toUpperCase()==tag){if(!class_name||parent.className.toLowerCase()==cl){return parent;}}o=parent;}return null;};this.css_class_change=function(tag,src,trg){var el=document.getElementsByTagName(tag);for(var i=0;i<el.length;i++){if(jsF.hasClass(el[i])==src){el[i].className=trg;}}};this.AlignToPos=function(pos,w,h){var x=pos["left"];var y=pos["bottom"];var body=document.body;if((body.clientWidth+body.scrollLeft)-(pos["left"]+w)<0){if(pos["right"]-w>=0){x=pos["right"]-w;}else{x=body.scrollLeft;}}if((body.clientHeight+jsF.scrollTop())-(pos["bottom"]+h)<0){if(pos["top"]-h>=0){y=pos["top"]-h;}else{y=jsF.scrollTop();}}return{'left':x,'top':y};};this.GetRealPos=function(el){if(!el||!el.offsetParent){return false;}var res=[];res["left"]=el.offsetLeft;res["top"]=el.offsetTop;var objParent=el.offsetParent;while(objParent&&objParent.tagName !="BODY"){res["left"]+=objParent.offsetLeft;res["top"]+=objParent.offsetTop;objParent=objParent.offsetParent;}res["right"]=res["left"]+el.offsetWidth;res["bottom"]=res["top"]+el.offsetHeight;return res;};this.arEvents=[];this.addEvent=function(el,evname,func,capture){if(el.attachEvent){el.attachEvent("on"+evname,func);}else if(el.addEventListener){el.addEventListener(evname,func,false);}else{el["on"+evname]=func;}this.arEvents[this.arEvents.length]={'element':el,'event':evname,'fn':func};};this.removeEvent=function(el,evname,func){if(el.detachEvent){el.detachEvent("on"+evname,func);}else if(el.removeEventListener){el.removeEventListener(evname,func,false);}else{el["on"+evname]=null;}for(var i in this.arEvents){if(this.arEvents[i]&&this.arEvents[i].event==evname){this.arEvents[i]=null;}}};this.removeAllEvents=function(el){for(var i in this.arEvents){if(this.arEvents[i]&&(el==false||el==this.arEvents[i].element)){jsF.removeEvent(this.arEvents[i].element,this.arEvents[i].event,this.arEvents[i].fn);this.arEvents[i]=null;}}if(el==false){this.arEvents.length=0;}};this.cancelEvent=function(){return false;};this.scrollTop=function(){if(document.documentElement&&document.documentElement.scrollTop){return document.documentElement.scrollTop;}else if(document.body&&document.body.scrollTop){return document.body.scrollTop;}else if(window.scrollY){return window.scrollY;}return 0;};this.formSubmit=function(el_a,id_form){if(this.Get("is_clicked"+id_form)==1){return false;}this.Set("is_clicked"+id_form,1);this.inner_text(el_a,this.Get("oTkit_1067"));el_form=fn_getElementById(id_form);if(el_form){el_form.submit();}return false;};this.inner_text=function(el,text){if(!el){return;}for(var i=0,el_remove_len=(el.childNodes&&el.childNodes.length)||0;i<el_remove_len;i++){el.removeChild(el.lastChild);}el.appendChild(document.createTextNode(text));};this.formKeypress=function(ev,el_form){ev=(ev)?ev:window.event;if(((ev.keyCode==13)||(ev.keyCode==10))&&(ev.ctrlKey==true)){if(this.Get("is_clicked"+el_form.id)==1){return false;}this.Set("is_clicked"+el_form.id,1);el_form.submit();}return false;};this.disable_selection=function(el){if(typeof(el.onselectstart)!="undefined"){el.onselectstart=function(){return false}}else if(typeof(el.style.MozUserSelect)!="undefined"){el.style.MozUserSelect="none";}else{el.onmousedown=function(){return false}}el.style.cursor="default";};this.hasClass=function(obj){if(obj.getAttributeNode("class")!=null){return obj.getAttributeNode("class").value;}return false;};this.hasClassName=function(obj,classname){if(obj.getAttributeNode("class")!=null){var ar=obj.className.split(" ");for(var i=0;i<ar.length;i++){if(ar[i]==classname){return true;}}}return false;};this.stripe=function(id){var even=false;var oddColor=arguments[2]?arguments[2]:"#FFF";var evenColor=arguments[1]?arguments[1]:"#F6F6F9";var table=fn_getElementById(id);if(!table){return;}var tbodies=table.getElementsByTagName("tbody");for(var h=0;h<tbodies.length;h++){var trs=tbodies[h].getElementsByTagName("tr");for(var i=0;i<trs.length;i++){if(!trs[i].style.backgroundColor){var tds=trs[i].getElementsByTagName("td");for(var j=0;j<tds.length;j++){if(!tds[j].style.backgroundColor&&!jsF.hasClassName(tds[j],"n")){tds[j].style.backgroundColor=even?evenColor:oddColor;}}}even=!even;}}};this.stripe_tags=function(id,tagname){var even=false;var oddColor=arguments[3]?arguments[3]:"#FFF";var evenColor=arguments[2]?arguments[2]:"#F6F6F9";var el_with_tags=fn_getElementById(id);if(!el_with_tags){return;}var ar_tags=el_with_tags.getElementsByTagName(tagname);for(var i=0;i<ar_tags.length;i++){if(!ar_tags[i].style.backgroundColor&&!jsF.hasClass(ar_tags[i])){ar_tags[i].style.backgroundColor=even?evenColor:oddColor;}even=!even;}};this.is_object=function(mixed_var){if(mixed_var instanceof Array){return false;}else{return(mixed_var !==null)&&(typeof(mixed_var)=='object');}};this.wordwrap=function(str,int_width,str_break,is_binary){int_width=((arguments.length>=2)?arguments[1]:25);str_break=((arguments.length>=3)?arguments[2]:"\n");is_binary=((arguments.length>=4)?arguments[3]:false);var i,j,l,s,r;str+='';if(int_width<1){return str;}for(i=-1,l=(r=str.split(/\r\n|\n|\r/)).length;++i<l;r[i]+=s){for(s=r[i],r[i]="";s.length>int_width;r[i]+=s.slice(0,j)+((s=s.slice(j)).length?str_break:"")){j=is_binary==2||(j=s.slice(0,int_width+1).match(/\S*(\s)?$/))[1]?int_width:j.input.length-j[0].length||is_binary==1&&int_width||j.input.length+(j=s.slice(int_width).match(/^\S*/)).input.length;}}return r.join("\n");};this.FX_fade_out=function(id){var el=fn_getElementById(id);if(!el||!el.parentNode){return false;}var h=el.parentNode.clientHeight;var int_steps=15,ms_step=30,ms=1;var opacity_step=1 / int_steps;var height_step=h / int_steps;var opacity=1.1;for(var i=1;i<=int_steps;i++){ms+=ms_step;opacity-=opacity_step;h-=height_step;setTimeout("jsF.FX_fade_out_set('"+id+"','"+opacity+"')",ms);setTimeout("jsF.FX_height_set('"+id+"','"+h+"')",200+ms);}setTimeout(function(){el.style.display='none';},300+ms);setTimeout(function(){jsF.destroy_el(el.parentNode)},300+ms);};this.FX_height_set=function(id,h){var el=fn_getElementById(id);if(h<0){h=0;}el.parentNode.style.height=h+"px";el.style.position="relative";el.style.top=h-el.clientHeight+"px";};this.FX_fade_out_set=function(id,opacity){var el=fn_getElementById(id);if(!el){return false;}el.style.opacity=opacity;el.style.filter="alpha(opacity="+(opacity*100)+")";};this.destroy_el=function(id_or_el){if(typeof(id_or_el)=="object"){var el=id_or_el;}else{var el=fn_getElementById(id_or_el);}if(!el){return false;}var el_remove_len=el.childNodes.length;for(var i=0;i<el_remove_len;i++){el.removeChild(el.lastChild);}el.parentNode.removeChild(el);return false;};};function JS_slider(){this.init=function(){jsF.Set("slider_pixels",55);};this.slideContent=function(id_target,pixels){oToggle=fn_getElementById("co-"+id_target);oToggle.style.overflow="hidden";oToggle.style.position="static";oToggleDiv=oToggle.childNodes[0];oToggleDiv.style.overflow="hidden";oToggleDiv.style.position="relative";oToggleDiv.style.marginTop=0;oToggleDiv.style.top=0;jsF.Set("slider_is_repeat",true);var height=oToggle.clientHeight;if(height==0){height=oToggle.offsetHeight;}height=height+pixels;if(height>oToggleDiv.offsetHeight){height=oToggleDiv.offsetHeight;jsF.Set("slider_is_repeat",false);}if(parseFloat(height)<=1){height=1;jsF.Set("slider_is_repeat",false);}var y_pos=height-oToggleDiv.offsetHeight;if(y_pos>0){y_pos=0;}if(height<50){pixels=-20;}if(height<25){pixels=-10;}if(height<10){pixels=-3;}if(oToggleDiv.offsetHeight-height<50){pixels=20;}if(oToggleDiv.offsetHeight-height<25){pixels=10;}if(oToggleDiv.offsetHeight-height<10){pixels=3;}oToggleDiv.style.marginTop=y_pos+"px";oToggle.style.height=height+"px";if(jsF.Get("slider_is_repeat")){setTimeout('jsSlider.slideContent("'+id_target+'",'+pixels+')',0);}else{if(height<=1){oToggle.style.display="none";}else{oToggle.style.height='';jsF.Set("slider_id_active",id_target);}}};}var jsSlider=new JS_slider();jsSlider.init();function DOM_make_38x31(el_name,gw_ar_img){var el=document.getElementById(el_name);var oImg=document.createElement("img");oImg.width=100;oImg.height=20;var oA=document.createElement("a");oA.setAttribute("onclick","nw(this.href);return false");for(var i=0;i<gw_ar_img.length;i++){oA=oA.cloneNode(false);oImg=oImg.cloneNode(false);oA.href=gw_ar_img[i][1];oImg.src=js_path_img+"/"+gw_ar_img[i][0];oImg.setAttribute("alt",gw_ar_img[i][2]);oImg.setAttribute("title",gw_ar_img[i][2]);oA.appendChild(oImg);el.appendChild(oA);}};function DOM_make_cnt(countername){var el_name='cntrs';var el=document.getElementById(el_name);var oImg=document.createElement('img');switch(countername){case 'rax':oImg.src='http://counter.yadro.ru/hit?r'+escape(document.referrer)+((typeof(screen)=='undefined')?'':';s'+screen.width+'*'+screen.height+'*'+(screen.colorDepth?screen.colorDepth:screen.pixelDepth))+';'+Math.random();oImg.height=1;oImg.width=1;break;}el.appendChild(oImg);};function smooth_scroll(){var h=jsF.scrollTop();var steps=5;var step=h / steps;var cur_pos=h-step;var timeout=0;for(var i=2;i<=steps;i++){setTimeout("scrollTo(0,"+cur_pos+")",timeout);cur_pos=h-(step*i);timeout+=50;}setTimeout("scrollTo(0,0)",timeout);bounce_scroll(timeout,0);return false;}function bounce_scroll(timeout,y){timeout+=60;setTimeout("scrollTo(0,"+(y+10)+")",timeout);timeout+=70;setTimeout("scrollTo(0,"+(y+6)+")",timeout);timeout+=80;setTimeout("scrollTo(0,"+(y+2)+")",timeout);timeout+=90;setTimeout("scrollTo(0,"+y+")",timeout);}function unbounce_scroll(timeout,y){timeout+=50;setTimeout("scrollTo(0,"+(y-20)+")",timeout);timeout+=60;setTimeout("scrollTo(0,"+(y-10)+")",timeout);timeout+=70;setTimeout("scrollTo(0,"+(y-6)+")",timeout);timeout+=80;setTimeout("scrollTo(0,"+(y-2)+")",timeout);timeout+=90;setTimeout("scrollTo(0,"+y+")",timeout);}oW=new function(){this.msg="";this.div=document.createElement("div");this.span=document.createElement("span");this.div_msg=null;this.div_bg=null;this.__=function(){if(oW.div_bg==null){return;}oW._anim_out();};this._=function(msg){if(this.msg !=""){jsF.destroy_el("ow_div_msg");jsF.destroy_el("ow_div_bg");}this.msg=msg;var x=document.documentElement.clientWidth;var y=document.documentElement.clientHeight;var div_bg=this.div.cloneNode(false);div_bg.id="ow_div_bg";div_bg.style.zIndex=1998;div_bg.style.background="#FFF";div_bg.style.position="absolute";div_bg.style.left=0;div_bg.style.cursor="default";div_bg.style.top=0;div_bg.style.width=x+"px";div_bg.style.height=document.body.offsetHeight+"px";var div_msg=this.div.cloneNode(false);div_msg.id="ow_div_msg";div_msg.style.zIndex=1999;div_msg.style.position="absolute";div_msg.style.width="300px";div_msg.style.cursor="wait";div_msg.style.border="5px solid #BDC2B4";div_msg.style.padding="2px";div_msg.style.background="#686964";div_msg.style.font="90% 'Segoe UI',Tahoma,sans-serif";div_msg.style.boxShadow="0 1px 5px #000";div_msg.style.borderRadius="5px";var div_text=this.div.cloneNode(false);div_text.style.background="#F2F2E8";div_text.style.padding="16px 12px";var el_anim=this.div.cloneNode(false);el_anim.style.width="1em";el_anim.style.styleFloat="left";el_anim.style.float="left";el_anim.style.color="#0C0";el_anim.style.marginRight="10px";el_anim.style.marginTop="-5px";el_anim.style.textAlign="center";el_anim.style.font="32px Consolas,'Courier New',monospace";this.el_anim=el_anim;div_text.appendChild(el_anim);div_text.appendChild(document.createTextNode(this.msg));div_msg.appendChild(div_text);document.body.appendChild(div_msg);document.body.appendChild(div_bg);div_msg.style.left=(x / 2)-(div_msg.offsetWidth / 2)+"px";div_bg.style.display="none";div_msg.style.display="none";this.timer_pos=setInterval(function(){oW.correct_onscroll()},50);jsF.addEvent(window,'resize',this.correct_onresize);jsF.addEvent(document,'keypress',this.keypress);if(parseInt(div_msg.style.left)<1){div_msg.style.left=1+"px";}if(parseInt(div_msg.style.top)<1){div_msg.style.top=1+"px";}this.div_bg=div_bg;this.div_msg=div_msg;this._anim_in();};this.keypress=function(event){if(!event){event=window.event;}if(!event){return;}if(event.keyCode==27){oW.__();}};this.correct_onscroll=function(){var scroll_top=jsF.scrollTop();var y=document.documentElement.clientHeight;oW.div_msg.style.top=(y / 2-50)-(oW.div_msg.offsetHeight / 2)+scroll_top+"px";if(parseInt(oW.div_msg.style.top)-scroll_top<1){oW.div_msg.style.top=scroll_top+1+"px";}};this.correct_onresize=function(){var x=document.documentElement.clientWidth;oW.div_bg.style.width=x+"px";oW.div_msg.style.left=(x / 2)-(oW.div_msg.offsetWidth / 2)+"px";if(parseInt(oW.div_msg.style.left)<1){oW.div_msg.style.left=1+"px";}};this._anim_in=function(){oW.set_chars();this.timer_anim=setInterval("oW.set_chars()",800);var opacity=0.7;this.div_msg.style.display="block";this.div_bg.style.display="block";if(isIE){this.div_bg.style.filter="alpha(opacity="+(opacity*100)+")";}this.div_bg.style.opacity=opacity;};this._anim_out=function(){var el=this.div_bg;var int_steps=10,ms_step=15,ms=1;var opacity_step=1 / int_steps;var opacity=0.8;for(var i=1;i<=int_steps;i++){ms+=ms_step;opacity-=opacity_step;setTimeout("oW.set_opacity(oW.div_bg,'"+opacity+"')",ms);}clearInterval(this.timer_anim);clearInterval(this.timer_pos);jsF.removeEvent(window,'resize',this.correct_onresize);jsF.removeEvent(document,'keypress',this.keypress);setTimeout('oW.div_msg.style.display="none";',1);setTimeout('jsF.destroy_el("ow_div_msg");jsF.destroy_el("ow_div_bg");',ms);};this.set_chars=function(){setTimeout("jsF.inner_text(oW.el_anim,'⇑')",1);setTimeout("jsF.inner_text(oW.el_anim,'⇗')",100);setTimeout("jsF.inner_text(oW.el_anim,'⇒')",200);setTimeout("jsF.inner_text(oW.el_anim,'⇘')",300);setTimeout("jsF.inner_text(oW.el_anim,'⇓')",400);setTimeout("jsF.inner_text(oW.el_anim,'⇙')",500);setTimeout("jsF.inner_text(oW.el_anim,'⇐')",600);setTimeout("jsF.inner_text(oW.el_anim,'⇖')",700);};this.set_opacity=function(el,value){el.style.opacity=value;el.style.filter="alpha(opacity="+(value*100)+")";};};
