 var expires=new Date();expires.setTime(expires.getTime()+(1000 *86400 *365));var is_regexp=(window.RegExp)? true :false;var fontSize;function fn_getElementById(el_name){return gw_getElementById(el_name);}function gw_getElementById(el_name){if(document.getElementById){return(document.getElementById(el_name)==null)? false :document.getElementById(el_name);}else if(document.all){return(document.all[el_name]==null)? false :document.all[el_name];}return false;}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++){gw_getElementById("co-" +ar_coll_obj[i]).style.display="none";gw_getElementById("ci-" +ar_coll_obj[i]).src=path_img +"collapse_off.png";}}function uncollapse_all(is_save){if(is_save){is_cookie=fetch_cookie("tkit_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]){gw_getElementById("co-" +ar_coll_obj[i]).style.display="none";gw_getElementById("ci-" +ar_coll_obj[i]).src=path_img +"collapse_off.png";}}}}else {for(var i=0,length1=ar_coll_obj.length;i<length1;i++){gw_getElementById("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++){gw_getElementById("co-" +ar_coll_obj[i]).style.display="block";gw_getElementById("ci-" +ar_coll_obj[i]).src=path_img +"collapse_on.png";}}}function toggle_collapse(id_obj,el){if(!is_regexp){return false;}var obj=gw_getElementById("co-" +id_obj);var img=gw_getElementById("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 );jsF.disable_selection(el);el.style.cursor='pointer';if(obj.style.display=="none"){oToggle.style.display="block";jsSlider.slideContent( id_obj,jsF.Get( "slider_pixels" ));save_collapsed(id_obj,false);if(img){img_re=new RegExp("_off\\.png$");img.src=img.src.replace(img_re,'_on.png');}}else {jsSlider.slideContent( id_obj,(jsF.Get( "slider_pixels" )*-1));save_collapsed(id_obj,true);if(img){img_re=new RegExp("\\_on.png$");img.src=img.src.replace(img_re,'_off.png');}}return false;}function save_collapsed(id_obj,addcollapsed){var collapsed=fetch_cookie("tkit_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("tkit_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=/";}function JSfunc(){var _this=this;this.el=null;this.fontSize=100;this.iconSize=16;this.vars=[];this.Put=function(k,v){this.vars[k]=v;};this.Set=function(k,v){this.Put(k,v);};this.Get=function(k){return(typeof(this.vars[k])=='undefined')? k :this.vars[k];};this.fontInit=function(){fontSize=parseInt(fetch_cookie('gw2-fontsize'));if(!fontSize){fontSize=this.fontSize;}gw_getElementById('body').style.fontSize=fontSize +'%';};this.fontResize=function(a,increase){if(increase==null){fontSize=this.fontSize;}else {fontSize=(increase)?(fontSize +10):(fontSize - 10);}if(fontSize<=60){fontSize=60;}if(fontSize >=200){fontSize=200;}gw_getElementById('body').style.fontSize=fontSize +'%';a.blur();expires=new Date();expires.setTime(expires.getTime()+(1000 *86400 *365));set_cookie('gw2-fontsize',fontSize,expires);};this.checkFieldHeight=function(id){var el=gw_getElementById(id);if(!el){return;}var height=(4 +this.countLF(el.value));if((height > 25)){height=25;}el.style.height=height +'em';el.style.lineHeight="100%";};this.countLF=function(s){var cnt=1;var re=/\n+/g;while((ar=re.exec(s))!=null){cnt++;}return cnt;};this.checkFieldLength=function(id_field,target_id,max){var el=gw_getElementById(id_field);if(!el){return;}var left=(max - el.value.length);if(el.value.length > max){left=0;el.value=el.value.substring(0,max);}target_el=gw_getElementById(target_id);target_el.removeChild(target_el.lastChild);target_el.appendChild(document.createTextNode(left));};this.preview0z=function(target_id,el){if(!el){return;}el.value=this.str0z(el.value);var target_el=gw_getElementById(target_id);target_el.removeChild(target_el.lastChild);target_el.appendChild(document.createTextNode(el.value));};this.checkURL=function(id){var el=gw_getElementById(id);if(!el){return;}re=/[^0-9A-Za-z.,:\?&=+%#@!\*\(\)\[\]\/-]+/g;el.value=this.strTrim(el.value.replace(re,""));};this.strTrim=function(s){return s.replace(/^\s+/,"").replace(/\s+$/,"");};this.str0z=function(s){re=/[^0-9A-Za-z.]+/g;return s.replace(re,"-");};this.strReplace0z=function(el){if(!el){return;}el.value=this.str0z(el.value);el.value=el.value.toLowerCase();el.value=el.value.substr(0,255);};this.strNormalize=function(el){if(!el){return;}this.strTranslit(el);this.strReplace0z(el);};this.strTranslit=function(el){A=[];A["Ё"]="YO";A["Й"]="J";A["Ц"]="TS";A["У"]="U";A["К"]="K";A["Е"]="E";A["Н"]="N";A["Г"]="G";A["Ш"]="SH";A["Щ"]="SCH";A["З"]="Z";A["Х"]="H";A["Ъ"]="'";A["ё"]="yo";A["й"]="j";A["ц"]="ts";A["у"]="u";A["к"]="k";A["е"]="e";A["н"]="n";A["г"]="g";A["ш"]="sh";A["щ"]="sch";A["з"]="z";A["х"]="h";A["ъ"]="'";A["Ф"]="F";A["Ы"]="Y";A["В"]="V";A["А"]="A";A["П"]="P";A["Р"]="R";A["О"]="O";A["Л"]="L";A["Д"]="D";A["Ж"]="ZH";A["Э"]="E";A["ф"]="f";A["ы"]="y";A["в"]="v";A["а"]="a";A["п"]="p";A["р"]="r";A["о"]="o";A["л"]="l";A["д"]="d";A["ж"]="zh";A["э"]="e";A["Я"]="YA";A["Ч"]="CH";A["С"]="S";A["М"]="M";A["И"]="I";A["Т"]="T";A["Ь"]="'";A["Б"]="B";A["Ю"]="YU";A["я"]="ya";A["ч"]="ch";A["с"]="s";A["м"]="m";A["и"]="i";A["т"]="t";A["ь"]="'";A["б"]="b";A["ю"]="yu";el.value=el.value.replace(/([\u0410-\u0451])/g,function(str,p1,offset,s){if(A[str] !='undefined'){return A[str];}return false;});};this.formSubmit=function(el_a,id_form){if(this.Get("is_clicked"+id_form)==1){return false;}this.Put("is_clicked"+id_form,1);if(el_a){el_a.innerHTML=this.Get("oTkit_1067");}el_form=gw_getElementById(id_form);if(el_form){el_form.submit();}return false;};this.formKeypress=function(e,o){e=(e)? e :window.event;if(((e.keyCode==13)||(e.keyCode==10))&&(e.ctrlKey==true)){if(this.Get("is_clicked" +o.id)==1){return false;}this.Put("is_clicked" +o.id,1);o.submit();}return false;};this.formStatus=function(phrase,state){var el=gw_getElementById('ajax-status');switch(state){case 0:el.className="fade-FFCCCC error";break;case 1:el.className="fade-CCFFCC updated";break;case 2:el.className="pending";break;case 3:el.style.display="none";el.className="";break;}el.style.display="block";el.innerHTML=phrase;Fat.fade_all(1000);};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.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"],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;}};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.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.hasClass=function(obj){if(obj.getAttributeNode("class")!=null){return obj.getAttributeNode("class").value;}return false;};this.stripe=function(id){var even=false;var evenColor=arguments[1] ? arguments[1] :"#FDFAF4";var oddColor=arguments[2] ? arguments[2] :"#FFF";var table=gw_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(!jsF.hasClass(trs[i])&& !trs[i].style.backgroundColor){var tds=trs[i].getElementsByTagName("td");for(var j=0;j<tds.length;j++){if(!tds[j].style.backgroundColor &&(jsF.hasClass(tds[j])!='n')){tds[j].style.backgroundColor=even ? evenColor :oddColor;}}}even=!even;}}};}var jsF=new JSfunc();function apply_css(){var a1=document.getElementsByTagName("fieldset");for(var h=0;h<a1.length;h++){a1[h].style.cssText="-moz-border-radius:0.4em;-webkit-border-radius:0.8em;";}var a2=document.getElementsByTagName("legend");for(var h=0;h<a2.length;h++){a2[h].style.cssText="-moz-border-radius:0.2em;-webkit-border-radius:0.4em;";}var a3=document.getElementsByTagName("*");for(var h=0;h<a3.length;h++){var ar_classnames=a3[h].className.split(" ");for(var s=0;s<=ar_classnames.length;s++){if(typeof(ar_classnames[s])!="undefined" && ar_classnames[s]=="rounded"){a3[h].style.cssText="-moz-border-radius:0.4em;-webkit-border-radius:0.4em;";}}}oJS_floating_thead._("float-thead-short");oJS_floating_thead._("float-thead-long");jsF.fontInit();}var oJS_floating_thead=new function(){this.table_classname="tbl-list";this._=function(id){var thead=gw_getElementById(id);if(thead){var lastrow_pos=jsF.GetRealPos(thead.parentNode.rows[thead.parentNode.rows.length-1]);var theadClone=thead.cloneNode(true);var table=document.createElement("table");table.className=this.table_classname;table.style.display="none";table.style.opacity="0.9";table.style.backgroundColor="#FFF";table.setAttribute("cellspacing",1);table.setAttribute("width","100%");table.setAttribute("border",0);table.insertBefore( theadClone,table.firstChild );document.body.appendChild( table );var timer_pos_thead=setInterval(function(){oJS_floating_thead.correct(table,thead,lastrow_pos)},51);}};this.correct=function(el,parent_el,lastrow_pos){var pos=jsF.GetRealPos(parent_el);var scroll_top=jsF.scrollTop();if(scroll_top > pos["top"] && scroll_top -(pos["top"] - pos["bottom"])<lastrow_pos["bottom"]){el.style.display="block";el.style.position="absolute";el.style.top=scroll_top +"px";el.style.left=pos["left"] +"px";el.style.width=pos["right"]-pos["left"] +"px";}else {el.style.display="none";}};};function JCmod(){var _this=this;this.el=null;this.varObj=function(ar){_this.varObj.A=ar;_this.varObj.get=function(varname){if(!varname){return _this.varObj.A;}var len=_this.varObj.A.length;for(var i=0;i<len;i++){if(typeof(_this.varObj.A[i])=='object'){if(_this.varObj.A[i][0]==varname){return _this.varObj.A[i][1];}}}return -1;};_this.varObj.set=function(varname,value){var len=_this.varObj.A.length;for(var i=0;i<len;i++){if(_this.varObj.A[i][0]==varname){return _this.varObj.A[i][1]=value;}}return _this.varObj.A[len]=[varname,value];};_this.varObj.unset=function(varname){var len=_this.varObj.A.length;for(var i=0;i<len;i++){if(_this.varObj.A[i][0]==varname){_this.varObj.A.splice(i,1);return;}}};return _this.varObj;};this.m=function(id){_this.hideMenu();_this.el=gw_getElementById(id);_this.el.className="hover";setTimeout(function(){jsF.addEvent(document,"click",_this.isOver)},20);jsF.addEvent(document,"keypress",_this.OnKeyPress);};this.isOver=function(e){var x=e.clientX +document.body.scrollLeft;var y=e.clientY +document.body.scrollTop;var pos=jsF.GetRealPos(_this.el);if(x >=pos["left"] && x<=pos["right"] && y >=pos["top"] && y<=pos["bottom"]){return;}_this.hideMenu();};this.hideMenu=function(){if(_this.el){_this.el.className='';}return true;};this.OnKeyPress=function(e){if(!e){e=window.event;}if(!e){return;}if(e.keyCode==27){_this.hideMenu();}};this.menuUp=function(a){a.blur();_this.el_target=arguments[0];_this.el_menu=gw_getElementById('popupmenu');var pos=jsF.GetRealPos(_this.el_target);while(_this.el_menu.rows.length > 0){_this.el_menu.deleteRow(0);}for(var i=1;i<arguments.length;i++){if(typeof(arguments[i][1])=='undefined'){continue;}var row=_this.el_menu.insertRow(-1);var cell=row.insertCell(-1);if(arguments[i][2]){}var onclick='this.blur()';if(arguments[i][3]){onclick=arguments[i][3];}cell.innerHTML='<a onclick="'+onclick+'" href="' +arguments[i][0] +'">' +arguments[i][1] +'</a>';}_this.el_menu.style.position="absolute";_this.el_menu.style.zIndex=1000;_this.el_menu.style.opacity=1;_this.el_menu.style.visibility='visible';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(window,"resize",_this.menuUpdateXY);},10);setTimeout(function(){jsF.addEvent(document,"click",_this.menuIsOver)},20);jsF.addEvent(document,"keypress",_this.menuKeyPress);return false;};this.menuIsOver=function(e){var x=e.clientX +document.body.scrollLeft;var y=e.clientY +document.body.scrollTop;var pos=jsF.GetRealPos(_this.el_menu);if(x >=pos["left"] && x<=pos["right"] && y >=pos["top"] && y<=pos["bottom"]){return;}_this.menuHide();};this.menuKeyPress=function(e){if(!e){e=window.event;}if(!e){return;}if(e.keyCode==27){_this.menuHide();}};this.menuHide=function(){setTimeout(function(){_this.el_menu.style.opacity=0.7},20);setTimeout(function(){_this.el_menu.style.opacity=0.5},40);setTimeout(function(){_this.el_menu.style.opacity=0.3},60);setTimeout(function(){_this.el_menu.style.visibility='hidden'},100);setTimeout(function(){jsF.removeEvent(window,"resize",_this.menuUpdateXY)},10);setTimeout(function(){jsF.removeEvent(document,"click",_this.menuIsOver)},20);};this.menuUpdateXY=function(){var pos=jsF.GetRealPos(_this.el_target);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';};this.saveSearch=function(){_this.menuHide();};}var jsMod=new JCmod();var jsSlider=new function(){this.init=function(){jsF.Set("slider_pixels",66);};this.slideContent=function(id_target,pixels){oToggle=gw_getElementById("co-" +id_target);oToggle.style.overflow="hidden";oToggle.style.position="relative";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;}oToggleDiv.style.top=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 {jsF.Set( "slider_id_active",id_target );}}};};jsSlider.init();var oAds=new function(){this.show=function(ar){this.pointer=0;this.messages=[];this.delay=10000;this.opacity=0.1;this.y=0;this.el=document.getElementById("ads-top");this.el.onmouseover=function(){oAds.is_mouseover=1;};this.el.onmouseout=function(){oAds.is_mouseover=0;};var span=document.createElement('span');var a=document.createElement('a');for(var i=0;i<=ar.length;i++){if(typeof(ar[i])!="undefined"){var aClone=a.cloneNode(false);var spanClone=span.cloneNode(false);spanClone.className='ad';spanClone.style.position='relative';spanClone.style.opacity=0;spanClone.style.color='#000';spanClone.style.top=0;aClone.href=ar[i][1];aClone.setAttribute('onclick','nw(this);return false');aClone.appendChild( document.createTextNode(ar[i][0]));spanClone.appendChild( aClone );this.messages[i]=spanClone;}}this.rotate();};this.rotate=function(){if(this.is_mouseover){setTimeout( function(){oAds.rotate()},100 );}else {this.fade("reset");this.fadetimer1=setInterval(function(){oAds.fade('up','fadetimer1')},100);this.pointer=(this.pointer<this.messages.length - 1)? this.pointer +1 :0;if(this.el.childNodes.length > 0){this.el.removeChild( this.el.childNodes[0] );}this.el.appendChild(this.messages[this.pointer]);setTimeout(function(){oAds.startslide()},this.delay);}};this.fade=function(type,id_timer){if(type=="reset"){this.opacity=0;this.y=0;this.messages[this.pointer].style.top=this.y +"px";}else {if(type=="up"){this.opacity +=0.1;}if(type=="up" && this.opacity >=1 ){clearInterval(this[id_timer]);}}this.messages[this.pointer].style.opacity=this.opacity;};this.startslide=function(){this.movetimer1=setInterval(function(){oAds.moveout(oAds.y)},50);};this.moveout=function(y){this.y=y +1;if(y<=this.messages[this.pointer].offsetHeight-10){this.messages[this.pointer].style.top=this.y +"px";}else {clearInterval(this.movetimer1);oAds.rotate();}};};var oC=new function(){this.ar_checked_sites=[];this.cnt=0;this.select=function(id){id=id.replace('uri-','');if(typeof(this.oChecked)=='undefined'){this.oChecked=jsMod.varObj([]);}if(gw_getElementById('uri-'+id).checked){if(this.cnt >=10){this.oChecked.unset(id);gw_getElementById('uri-'+id).checked=false;return false;}this.cnt++;this.oChecked.set(id,1);}else {this.cnt--;this.oChecked.unset(id);}this.save();this.diplay_status();return true;};this.save=function(){set_cookie("oChecked",this.oChecked.get().join("\n"),expires);};this.load=function(){var A=[];var is_cookie=fetch_cookie("oChecked");if(is_cookie !=null){var A1=is_cookie.split("\n");var len=A1.length;for(var i=0;i<len;i++){A[i]=A1[i].split(",");if(A[i][0] !=''){gw_getElementById('uri-'+A[i][0]).checked=true;this.cnt++;}}}this.diplay_status();this.oChecked=jsMod.varObj( A );};this.reset=function(){this.cnt=0;var A=this.oChecked.get();var len=A.length;for(var i=0;i<len;i++){if(A[i][0] !=''){gw_getElementById('uri-'+A[i][0]).checked=false;}}this.oChecked=jsMod.varObj([]);this.save();this.diplay_status();return false;};this.diplay_status=function(){if(this.cnt >=2){gw_getElementById('sites-selected').innerHTML='выбрано:\u0020<span><strong id="checked">'+this.cnt+'</strong></span>';gw_getElementById('sites-reset').innerHTML='<a href="#" class="btn remove" onclick="return oC.reset()">Отменить выбор</a> '+'<a href="#" class="btn edit" onclick="return oC.compare()">Сравнить выбранные</a>';}else {gw_getElementById('sites-selected').innerHTML='';gw_getElementById('sites-reset').innerHTML='';}};this.compare=function(){var f=gw_getElementById('form-compare');var ar_area=[];var A=this.oChecked.get();var len=A.length;var cnt=0;for(var i=0;i<len;i++){if(A[i][0] !=''){ar_area[cnt]=A[i][0];cnt++;}}if(cnt==0){return false;}f['arg[urls]'].value=ar_area.join(',');f.submit();return false;};};var oForm3js=new function(){this.field=function(id_name,index){}};var oOption=new function(){this.ar_see_also=[];this.link_type_changed=function(id_name,index){this.remove(id_name,index);};this.html=function(){var fn=fn_option_see_also;var ar_option=jsF.Get("ar_option-see-also");this.el_fieldset=gw_getElementById("subfieldset-option-see-also");el_labels=this.el_fieldset.getElementsByTagName("label");var len=el_labels.length;var parent=el_labels[0].parentNode;var el_remove_len=parent.childNodes.length;for(var i=0;i<el_remove_len;i++){parent.removeChild( parent.lastChild );}for(var i=0;i<ar_option.length;i++){parent.appendChild(fn(ar_option[i][0],ar_option[i][1],ar_option[i][2]));}};this.promt=function(id_name,index){this.el_remove=gw_getElementById(id_name +'-remove-' +index);this.el_value=gw_getElementById(id_name +'-value-' +index);var link_type=gw_getElementById(id_name +'-' +index).value;return false;if(link_type==1){}return false;};this.select=function(e){if(!e){e=window.event;}if(e.target){target=e.target;}else if(e.srcElement){target=e.srcElement;}if(target.nodeType==3){target=target.parentNode;}oOption.showhide_window(false);alert( target.text );};this.remove=function(id_name,index){var el_fieldset=gw_getElementById("fs-"+id_name+"-"+index);var parent=el_fieldset[0].parentNode;oOption.el_remove=gw_getElementById(id_name +'-remove-' +index);oOption.el_value=gw_getElementById(id_name +'-value-' +index);alert( id_name +'-remove-' +index );return;var el_remove_len=oOption.el_remove.childNodes.length;if(el_remove_len > 0){for(var i=0;i<el_remove_len;i++){oOption.el_remove.removeChild( oOption.el_remove.lastChild );}}var el_value_len=oOption.el_value.childNodes.length;if(el_value_len > 0){for(var i=0;i<el_value_len;i++){oOption.el_value.removeChild( oOption.el_value.lastChild );}}};this.promt_options=function(){this.showhide_window(true,document.createTextNode('Идёт загрузка...'));oTG.init(oOption);oTG.oParams['arg[action]']='browse';oTG.oParams['arg[target]']='options';};this.showhide_window=function(state,el_show){el1=gw_getElementById('waitplease');el2=gw_getElementById('waitplease_bg');if(el1 && el2){document.body.removeChild( el1 );document.body.removeChild( el2 );}if(state==false){clearInterval(this.timer_pos);return;}div_bg=document.createElement('div');div_bg.id='waitplease_bg';div_bg.style.position='absolute';div_bg.style.top=0;div_bg.style.left=0;div_bg.style.opacity=0.7;div_bg.style.zIndex=99;div_bg.style.width="100%";div_bg.style.height=document.documentElement.offsetHeight +"px";div_bg.style.background='#FFF';div_bg.style.border='none';document.body.appendChild( div_bg );document.body.appendChild( this.make_msg_el(el_show));};this.make_msg_el=function(el_show){var x=document.documentElement.clientWidth;var y=document.documentElement.clientHeight;var div=document.createElement('div');divClone=div.cloneNode(true);div.id='waitplease';div.style.position='absolute';div.style.font='100% "Segoe UI",sans-serif';div.style.textAlign='left';div.style.padding='10px';div.style.color='#000';div.style.background='#f4f8e9';div.style.border='2px solid #8e9283';div.style.zIndex=100;div.style.width=700 +"px";var span=document.createElement('span');span.className='fright';var a=document.createElement("a");a.href="javascript:oOption.showhide_window(false)";a.className='btn remove';a.appendChild( document.createTextNode('Закрыть ×'));span.appendChild( a );div.appendChild( span );divClone.style.textAlign='center';divClone.style.width='100%';divClone.style.clear='both';divClone.appendChild( el_show );div.appendChild( divClone );this.msg_div=div;this.timer_pos=setInterval(function(){oOption.correct_window(oOption.msg_div)},50);return this.msg_div;};this.correct_window=function(el){el.style.top=(document.documentElement.clientHeight / 10)+jsF.scrollTop()+"px";el.style.left=(document.documentElement.clientWidth / 2)- 700 / 2 +"px";};};var oTG=new function(){var _this=this;_this.el=null;_this.is_clicked=false;this.init=function(oTarget){_this.oTarget=oTarget;_this.oParams={};_this.oParams.prepare=function(){var ar_param=[];var i=0;for(var prop in _this.oParams){if(typeof(_this.oParams[prop])!="function"){_this.oParams[prop]=_this.oParams[prop] +'';}if(typeof(_this.oParams[prop])!="function" && _this.oParams[prop].length > 0){ar_param[i]=prop +"=" +_this.oParams[prop];i++;}}return ar_param.join("&");};_this.oParams.ajax=1;_this.oParams.page=1;setTimeout(function(){_this.check_query()},50);};this.check_query=function(){_this.post( _this.oParams.prepare());};this.parse=function(str){var oJSon=eval( "(" +str +")" );_this.create_table( oJSon[1],oJSon[2] );};this.create_table=function(oJSon,oJSonColsAttr){var table=document.createElement('table');table.setAttribute('border',1);table.setAttribute('width','100%');table.appendChild( document.createElement('tbody'));var tr=document.createElement('tr');var th=document.createElement('th');var td=document.createElement('td');var thead=document.createElement('thead');var a=document.createElement('a');for(var i1=0;i1<oJSon.length - 1;i1++){var tbody_tr=tr.cloneNode(false);for(var prop in oJSon[i1]){if(typeof(oJSon[i1][prop])!="function"){tbody_td=td.cloneNode(false);if( oJSonColsAttr[prop] !=undefined){for(var attr in oJSonColsAttr[prop]){if(typeof(oJSonColsAttr[prop][attr])!="function"){tbody_td.setAttribute(attr,oJSonColsAttr[prop][attr]);}}}tbody_td.appendChild( eval( "(" +oJSon[i1][prop] +")" ));tbody_tr.appendChild( tbody_td );}}table.tBodies[0].appendChild( tbody_tr );}_this.is_clicked=0;_this.oTarget.showhide_window(true,table);};this.post=function(params){if(_this.is_clicked==1){}if( Ajax.getTransport()){var completefn=function(r){if(r.responseText.length==1){}else if(r.responseText.length > 1){_this.parse( r.responseText );}};new Ajax.Request(jsF.Get("path_server_dir")+'/'+jsF.Get("file_member"),{method:"post",parameters:params,onComplete:completefn});}};};function DOM_make_38x31(el_name,gw_ar_img){var el=document.getElementById(el_name);var oImg=document.createElement("img");oImg.width=38;oImg.height=31;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);};