if(!("is_ie" in window)){var uagent=navigator.userAgent.toLowerCase(),is_safari=-1!=uagent.indexOf("safari")||"Apple Computer, Inc."==navigator.vendor||-1!=uagent.indexOf("konqueror")||-1!=uagent.indexOf("khtml"),is_opera=-1!=uagent.indexOf("opera"),is_webtv=-1!=uagent.indexOf("webtv"),is_ie=-1!=uagent.indexOf("msie")&&!is_opera&&!is_safari&&!is_webtv,is_ie4=is_ie&&-1!=uagent.indexOf("msie 4."),is_ie7=is_ie&&-1!=uagent.indexOf("msie 7."),is_moz="Gecko"==navigator.product,is_ns=-1==uagent.indexOf("compatible")&&-1!=uagent.indexOf("mozilla")&&!is_opera&&!is_webtv&&!is_safari,is_ns4=is_ns&&4==parseInt(navigator.appVersion),is_win=-1!=uagent.indexOf("win")||-1!=uagent.indexOf("16bit"),is_mac=-1!=uagent.indexOf("mac")||"Apple Computer, Inc."==navigator.vendor,ua_vers=parseInt(navigator.appVersion);}
function BBToggles(g,h,a){this.initialize=!1;this.BBEditor=g;this.editor_id=g.editor_id;this._obj=g[h];this._obj._open="close";this._obj._close="open";this._to=g[a];this.init=function(){!this.initialize&&this._obj&&this._to&&(this.init_open_close(),this._obj.innerHTML=this._obj._close,this._to.style.display="none",this._obj.className="ed-vtoggle-normal",this._obj._is_down=!1,this._obj.editor_id=this.editor_id,this._obj._to=this._to,this._obj.onmousemove=function(){this._is_down||(this.className="ed-vtoggle-hover");
return!1},this._obj.onmousedown=function(){this._is_down=!0;this.className="ed-vtoggle-down"},this._obj.onmouseout=function(){this._is_down=!1;this.className="ed-vtoggle-normal"},this._obj.onmouseup=function(){this._is_down=!0;this.className="ed-vtoggle-hover";this._is_open?(this._is_open=0,this._to.style.display="none",this.innerHTML=this._close):(this._is_open=1,this._to.style.display="",this.innerHTML=this._open);ipsclass.my_setcookie(this.editor_id+this.id+this._to.id+"_panel_is_open",this._is_open,
1)},this.init_last_state(),this.initialize=!0)};this.init_open_close=function(){var a=this._obj.innerHTML.replace(/(\r|\n|\t)/g," ").replace(RegExp("<(.+?)>","ig"),"").split(" ");this._obj._close=a[0];this._obj._open=a[1]};this.init_last_state=function(){var a=ipsclass.my_getcookie(this.editor_id+this._obj.id+this._to.id+"_panel_is_open");if(!a||"undefined"==a||isNaN(a))a=1;1==a?(this._obj.innerHTML=this._obj._open,this._obj._is_open=1,this._to.style.display=""):(this._obj.innerHTML=this._obj._close,
this._obj._is_open=0,this._to.style.display="none")};this.init()}
var BBEditors_smiles={":mellow:":{image:"mellow.gif",click:"0"},":huh:":{image:"huh.gif",click:"0"},":happy:":{image:"happy.gif",click:"1"},":o":{image:"ohmy.gif",click:"0"},";)":{image:"wink.gif",click:"1"},":P":{image:"tongue.gif",click:"1"},":-D":{image:"biggrin.gif",click:"0"},":lol:":{image:"laugh.gif",click:"1"},"B)":{image:"cool.gif",click:"0"},":rolleyes:":{image:"rolleyes.gif",click:"1"},"-_-":{image:"sleep.gif",click:"0"},"&lt;_&lt;":{image:"dry.gif",click:"0"},":)":{image:"smile.gif",click:"1"},
":wub:":{image:"wub.gif",click:"0"},":angry:":{image:"angry.gif",click:"0"},":(":{image:"sad.gif",click:"0"},":unsure:":{image:"unsure.gif",click:"0"},":wacko:":{image:"wacko.gif",click:"0"},":blink:":{image:"blink.gif",click:"0"},":ph34r:":{image:"ph34r.gif",click:"0"},":banned:":{image:"banned.gif",click:"0"},":antifeminism:":{image:"antifeminism.gif",click:"0"},":beee:":{image:"beee.gif",click:"1"},":beta:":{image:"beta.gif",click:"0"},":boy_girl:":{image:"boy_girl.gif",click:"0"},":butcher:":{image:"butcher.gif",
click:"0"},":bubble:":{image:"bubble.gif",click:"0"},":censored:":{image:"censored.gif",click:"0"},":clap:":{image:"clap.gif",click:"0"},":close_tema:":{image:"close_tema.gif",click:"0"},":clapping:":{image:"clapping.gif",click:"0"},":coldly:":{image:"coldly.gif",click:"0"},":comando:":{image:"comando.gif",click:"0"},":congratulate:":{image:"congratulate.gif",click:"0"},":dance:":{image:"dance.gif",click:"0"},":daisy:":{image:"daisy.gif",click:"0"},":dancer:":{image:"dancer.gif",click:"0"},":derisive:":{image:"derisive.gif",
click:"0"},":dinamo:":{image:"dinamo.gif",click:"0"},":dirol:":{image:"dirol.gif",click:"0"},":diver:":{image:"diver.gif",click:"0"},":drag:":{image:"drag.gif",click:"0"},":download:":{image:"download.gif",click:"0"},":drinks:":{image:"drinks.gif",click:"0"},":first_move:":{image:"first_move.gif",click:"0"},":feminist:":{image:"feminist.gif",click:"0"},":flood:":{image:"flood.gif",click:"0"},":fool:":{image:"fool.gif",click:"0"},":friends:":{image:"friends.gif",click:"0"},":foto:":{image:"foto.gif",
click:"0"},":girl_blum:":{image:"girl_blum.gif",click:"0"},":girl_crazy:":{image:"girl_crazy.gif",click:"0"},":girl_curtsey:":{image:"girl_curtsey.gif",click:"0"},":girl_dance:":{image:"girl_dance.gif",click:"0"},":girl_flirt:":{image:"girl_flirt.gif",click:"0"},":girl_hospital:":{image:"girl_hospital.gif",click:"0"},":girl_hysterics:":{image:"girl_hysterics.gif",click:"0"},":girl_in_love:":{image:"girl_in_love.gif",click:"0"},":girl_kiss:":{image:"girl_kiss.gif",click:"0"},":girl_pinkglassesf:":{image:"girl_pinkglassesf.gif",
click:"0"},":girl_parting:":{image:"girl_parting.gif",click:"0"},":girl_prepare_fish:":{image:"girl_prepare_fish.gif",click:"0"},":good:":{image:"good.gif",click:"0"},":girl_spruce_up:":{image:"girl_spruce_up.gif",click:"0"},":girl_tear:":{image:"girl_tear.gif",click:"0"},":girl_tender:":{image:"girl_tender.gif",click:"0"},":girl_teddy:":{image:"girl_teddy.gif",click:"0"},":girl_to_babruysk:":{image:"girl_to_babruysk.gif",click:"0"},":girl_to_take_umbrage:":{image:"girl_to_take_umbrage.gif",click:"0"},
":girl_triniti:":{image:"girl_triniti.gif",click:"0"},":girl_tongue:":{image:"girl_tongue.gif",click:"0"},":girl_wacko:":{image:"girl_wacko.gif",click:"0"},":girl_werewolf:":{image:"girl_werewolf.gif",click:"0"},":girl_witch:":{image:"girl_witch.gif",click:"0"},":grabli:":{image:"grabli.gif",click:"0"},":good_luck:":{image:"good_luck.gif",click:"0"},":guess:":{image:"guess.gif",click:"0"},":hang:":{image:"hang.gif",click:"0"},":heart:":{image:"heart.gif",click:"0"},":help:":{image:"help.gif",click:"0"},
":helpsmilie:":{image:"helpsmilie.gif",click:"0"},":hemp:":{image:"hemp.gif",click:"0"},":heppy_dancing:":{image:"heppy_dancing.gif",click:"0"},":hysterics:":{image:"hysterics.gif",click:"0"},":indeec:":{image:"indeec.gif",click:"0"},":i-m_so_happy:":{image:"i-m_so_happy.gif",click:"0"},":kindness:":{image:"kindness.gif",click:"0"},":king:":{image:"king.gif",click:"0"},":laugh_wild:":{image:"laugh_wild.gif",click:"0"},":4PDA:":{image:"love_4PDA.gif",click:"0"},":nea:":{image:"nea.gif",click:"0"},
":moil:":{image:"moil.gif",click:"0"},":no:":{image:"no.gif",click:"0"},":nono:":{image:"nono.gif",click:"0"},":offtopic:":{image:"offtopic.gif",click:"0"},":ok:":{image:"ok.gif",click:"0"},":papuas:":{image:"papuas.gif",click:"0"},":party:":{image:"party.gif",click:"0"},":pioneer_smoke:":{image:"pioneer_smoke.gif",click:"0"},":pipiska:":{image:"pipiska.gif",click:"0"},":protest:":{image:"protest.gif",click:"0"},":popcorm:":{image:"popcorm.gif",click:"0"},":rabbi:":{image:"rabbi.gif",click:"0"},":resent:":{image:"resent.gif",
click:"0"},":roll:":{image:"roll.gif",click:"0"},":rofl:":{image:"rofl.gif",click:"1"},":rtfm:":{image:"rtfm.gif",click:"0"},":russian_garmoshka:":{image:"russian_garmoshka.gif",click:"0"},":russian:":{image:"russian.gif",click:"0"},":russian_ru:":{image:"russian_ru.gif",click:"0"},":scratch_one-s_head:":{image:"scratch_one-s_head.gif",click:"0"},":scare:":{image:"scare.gif",click:"0"},":search:":{image:"search.gif",click:"0"},":secret:":{image:"secret.gif",click:"0"},":skull:":{image:"skull.gif",
click:"0"},":shok:":{image:"shok.gif",click:"0"},":sorry:":{image:"sorry.gif",click:"0"},":smoke:":{image:"smoke.gif",click:"0"},":spiteful:":{image:"spiteful.gif",click:"0"},":stop_flood:":{image:"stop_flood.gif",click:"0"},":suicide:":{image:"suicide.gif",click:"0"},":stop_holywar:":{image:"stop_holywar.gif",click:"0"},":superman:":{image:"superman.gif",click:"0"},":superstition:":{image:"superstition.gif",click:"0"},":sveta:":{image:"sveta.gif",click:"1"},":tablet_za:":{image:"tablet_protiv.gif",
click:"0"},":tablet_protiv:":{image:"tablet_za.gif",click:"0"},":thank_you:":{image:"thank_you.gif",click:"1"},":this:":{image:"this.gif",click:"0"},":tomato:":{image:"tomato.gif",click:"0"},":to_clue:":{image:"to_clue.gif",click:"0"},":tommy:":{image:"tommy.gif",click:"0"},":tongue3:":{image:"tongue3.gif",click:"0"},":umnik:":{image:"umnik.gif",click:"0"},":victory:":{image:"victory.gif",click:"0"},":vinsent:":{image:"vinsent.gif",click:"0"},":wallbash:":{image:"wallbash.gif",click:"0"},":whistle:":{image:"whistle.gif",
click:"0"},":wink_kind:":{image:"wink_kind.gif",click:"0"},":yahoo:":{image:"yahoo.gif",click:"0"},":yes:":{image:"yes.gif",click:"0"},":[":{image:"confusion.gif",click:"0"},"]-:{":{image:"girl_devil.gif",click:"0"},":*":{image:"kiss.gif",click:"0"},":)":{image:"smile_good.gif",click:"0"},"@}-&#39;-,-":{image:"give_rose.gif",click:"0"},":&#39;(":{image:"cry.gif",click:"0"},"}-)":{image:"devil.gif",click:"1"},":-{":{image:"mad.gif",click:"0"},"=^.^=":{image:"kitten.gif",click:"0"},":girl_cray:":{image:"girl_cray.gif",
click:"0"},"(-=":{image:"girl_hide.gif",click:"0"},"(-;":{image:"girl_wink.gif",click:"0"},")-:{":{image:"girl_angry.gif",click:"0"},"*-:":{image:"girl_chmok.gif",click:"0"},")-:":{image:"girl_sad.gif",click:"0"},":girl_mad:":{image:"girl_mad.gif",click:"0"},"(-:":{image:"girl_smile.gif",click:"0"},":acute:":{image:"acute.gif",click:"0"},":aggressive:":{image:"aggressive.gif",click:"0"},":air_kiss:":{image:"air_kiss.gif",click:"0"},":D":{image:"biggrin2.gif",click:"1"},"o.O":{image:"blink2.gif",click:"1"},
o_O:{image:"blink3.gif",click:"0"},o_O:{image:"blink4.gif",click:"0"},"o.O":{image:"blink5.gif",click:"0"},"\u00ee_\u00ce":{image:"blink6.gif",click:"0"},"\u00ee_\u00ce":{image:"blink7.gif",click:"0"},"\u00ee.\u00ce":{image:"blink8.gif",click:"0"},"\u00ee.\u00ce":{image:"blink9.gif",click:"0"},":blush:":{image:"blush.gif",click:"1"},":yes2:":{image:"yes2.gif",click:"0"},":blush:":{image:"blush.gif",click:"1"},":yes2:":{image:"yes2.gif",click:"1"},"\u00c2)":{image:"cool2.gif",click:"1"},":-[":{image:"confusion2.gif",
click:"0"},"\u00c2-)":{image:"cool3.gif",click:"0"},":&#39;-(":{image:"cry2.gif",click:"0"},":lol_girl:":{image:"girl_haha.gif",click:"0"},")-&#39;:":{image:"girl_cray2.gif",click:"0"},":girl_cray:":{image:"girl_cray.gif",click:"0"},":girl_cray:":{image:"girl_cray.gif",click:"0"},"(;":{image:"girl_wink2.gif",click:"0"},":-*":{image:"kiss2.gif",click:"0"},":laugh:":{image:"laugh2.gif",click:"0"},":ohmy:":{image:"ohmy2.gif",click:"0"},":-(":{image:"sad2.gif",click:"0"},"8-)":{image:"rolleyes2.gif",
click:"0"},":-)":{image:"smile_good2.gif",click:"0"},":smile:":{image:"smile2.gif",click:"0"},":-P":{image:"tongue4.gif",click:"0"},":-P":{image:"tongue2.gif",click:"0"},":-\u00f0":{image:"tongue5.gif",click:"0"},":-\u00f0":{image:"tongue6.gif",click:"0"},";-)":{image:"wink2.gif",click:"0"},":girl_cray:":{image:"girl_cray.gif",click:"0"},":girl_cray:":{image:"girl_cray.gif",click:"1"},":girl_cray:":{image:"girl_cray.gif",click:"0"}};
function BBSmiles(g,h){this.initialize=!1;this.BBEditor=g;this.editor_id=g.editor_id;this._obj=g[h];this._obj_name=h;this.smiles=[];this.obj_sel=null;this.init=function(){if(!this.initialize&&this._obj){this._obj.innerHTML="";this._obj.className="ed-emo-panel";if(jsEmoticons){BBEditors_smiles=jsEmoticons.getEmots();for(var a in BBEditors_smiles)BBEditors_smiles[a]={image:BBEditors_smiles[a][0],click:BBEditors_smiles[a][1]?"1":"0"}}"undefined"==typeof BBEditors_smiles?(this.BBEditor.import_js("//s.4pda.to/9J0aNWJE7ShyrN1HgVLv9z1rMqrKqSscr/js_emo_"+
ipb_skin_emodir+".js",this.editor_id,1),window.setTimeout("BBEditors['"+this.editor_id+"']['"+this._obj_name+"'].cl.init();",200)):(this.build_smiles(!0),this.initialize=!0)}};this.parse_html_schar_stat=function(a){var b={"<":/\&lt\;/g,">":/\&gt\;/g},d;for(d in b)a=a.replace(b[d],d);return a};this.parse_html_schar_int=function(a,b){return String.fromCharCode(b)};this.insert_smile=function(a){a=a.replace(/\&\#([0-9]{1,4})\;/g,this.parse_html_schar_int);a=this.parse_html_schar_stat(a);this.BBEditor.insert_text(" "+
a+" ")};this.build_smiles=function(a){this._obj.innerHTML="";if(1==a)if(a=new String(unescape(ipsclass.my_getcookie("ed-custom-smiles-"+ipb_skin_emodir))),this.smiles=[],""==a||"undefined"==a)this.get_def_smiles();else for(this.smiles=a.split(","),a=0;a<this.smiles.length;a++){var b=this.smiles[a].replace(/\&\#44\;/g,",");this.smiles[a]=b}for(a=0;a<this.smiles.length;a++)""!=this.smiles[a]&&"object"==typeof BBEditors_smiles[this.smiles[a]]&&(b=document.createElement("img"),b.src="//s.4pda.to/9J0aNWJE7ShyrN1HgVLv9z1rMqrKqSscr/"+
ipb_skin_emodir+"/"+BBEditors_smiles[this.smiles[a]].image+"",b.border="0",b.className="ed-emo-normal",b.title=b.alt=this.smiles[a],b.emo=this.smiles[a],b.editor_id=this.editor_id,b._obj_name=this._obj_name,b._is_down=0,b.onmousemove=function(){this._is_down||(this.className="ed-emo-hover")},b.onmouseout=function(){this._is_down=0;this.className="ed-emo-normal"},b.onmousedown=function(){this._is_down=1;this.className="ed-emo-down"},b.onmouseup=function(){this._is_down=0;this.className="ed-emo-hover"},
b.onclick=function(){BBEditors[this.editor_id][this._obj_name].cl.insert_smile(this.emo)},this._obj.appendChild(b));a=document.createElement("div");a.className="ed-emo-link";a.innerHTML="";b=document.createElement("a");b.href="#";b.editor_id=this.editor_id;b._obj_name=this._obj_name;b.onclick=this.select_custom_emo;b.innerHTML="\u0432\u044b\u0431\u0440\u0430\u0442\u044c \u0441\u043c\u0430\u0439\u043b\u044b";a.appendChild(b);this._obj.appendChild(a);this.obj_sel=document.createElement("div");this.obj_sel.style.display=
"none";this.obj_sel._p=document.createElement("div");this.obj_sel._p.style.display="none";this._obj.appendChild(this.obj_sel);this._obj.appendChild(this.obj_sel._p)};this.get_def_smiles=function(){this.smiles=[];for(var a in BBEditors_smiles)1==parseInt(BBEditors_smiles[a].click)&&(this.smiles[this.smiles.length]=a)};this.select_custom_emo=function(){var a=BBEditors[this.editor_id][this._obj_name].cl,b=0,d=0,e=0,c=0,b=document.all?document.documentElement.scrollLeft:window.pageXOffset,d=document.all?
document.documentElement.scrollTop:window.pageYOffset,e=document.documentElement.clientWidth,c=document.documentElement.clientHeight,k=a.obj_sel,f=k._p;k.style.position="absolute";try{k.style.opacity="0.5",k.style.filter="alpha(opacity=50)"}catch(g){}k.style.backgroundColor="#000";k.style.left=b+"px";k.style.top=d+"px";k.style.width=e+"px";k.style.height=c+"px";k.style.zIndex="9998";f.style.position="absolute";f.style.width="400px";f.style.height="300px";f.style.border="solid 2px black";f.style.left=
b+(e-400)/2+"px";f.style.top=d+(c-300)/2+"px";f.style.background="white";f.style.overflow="auto";f.style.zIndex="9999";try{f.style.overflowX="hidden"}catch(g){}e=[];f.innerHTML="";var m;try{m=document.createElement('<div style="text-align:justyfy">')}catch(g){m=document.createElement("div"),m.style.textAlign="justyfy"}f.appendChild(m);for(var l in BBEditors_smiles){try{e[l]=document.createElement("<img />")}catch(g){e[l]=document.createElement("img")}try{e[l].align="middle"}catch(g){}e[l].style.margin=
"10px";e[l].src="//s.4pda.to/9J0aNWJE7ShyrN1HgVLv9z1rMqrKqSscr/"+ipb_skin_emodir+"/"+BBEditors_smiles[l].image;try{e[l].style.cursor="pointer",e[l].style.cursor="hand"}catch(g){}try{e[l].style.opacity="0.5"}catch(g){}try{e[l].style.filter="alpha(opacity=50)"}catch(g){}m.appendChild(e[l]);e[l].editor_id=this.editor_id;e[l]._obj_name=this._obj_name;try{e[l].type="checkbox"}catch(g){}e[l]._chk=!1;e[l].onclick=function(){var a=BBEditors[this.editor_id][this._obj_name].cl;if(0==this._chk){a.add_smile(this.value);
this._chk=!0;try{this.style.opacity="1"}catch(d){}try{this.style.filter=""}catch(d){}}else{a.del_smile(this.value);this._chk=!1;try{this.style.opacity="0.5"}catch(d){}try{this.style.filter="alpha(opacity=50)"}catch(d){}}};e[l].value=l}for(l=0;l<a.smiles.length;l++)if("object"==typeof e[a.smiles[l]]){try{e[a.smiles[l]].style.opacity=""}catch(g){}try{e[a.smiles[l]].style.filter=""}catch(g){}e[a.smiles[l]].checked=!0;e[a.smiles[l]]._chk=!0}f.appendChild(m);a=document.createElement("a");a.innerHTML="\u0421\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0438 \u0437\u0430\u043a\u0440\u044b\u0442\u044c";
a.href="#";a._o=k;a.style.color="black";a.style.fontSize="24px";a.style.textDecoration="none";a.style.fontWeight="bold";a.onclick=function(){this._o.onclick();return!1};f.style.textAlign="center";f.appendChild(a);k._onscroll=window.onscroll;eval("window.onscroll=function(){window.scroll("+b+","+d+");return false;};");try{k.style.cursor="pointer",k.style.cursor="hand"}catch(g){}k.editor_id=this.editor_id;k._obj_name=this._obj_name;k.onclick=function(){this.style.display="none";this._p.style.display=
"none";document.body.overflow="";window.onscroll=this._onscroll;BBEditors[this.editor_id][this._obj_name].cl.build_smiles()};k.style.display="";k._p.style.display="";window.setTimeout("window.scrollTo("+b+","+d+");",1);return!1};this.checksmile=function(){var a=BBEditors[this.editor_id][this._obj_name].cl,b=this.value,b=b.replace(/,/g,"&#44;");1==this.checked?a.add_smile(b):a.del_smile(b)};this.add_smile=function(a){a=a.replace(/,/g,"&#44;");this.smiles[this.smiles.length]=a;ipsclass.my_setcookie("ed-custom-smiles-"+
ipb_skin_emodir,escape(this.smiles.join(",")),1)};this.del_smile=function(a){for(var b=[],d=0;d<this.smiles.length;d++)"object"==typeof BBEditors_smiles[this.smiles[d]]&&this.smiles[d]!=a&&(b[b.length]=this.smiles[d]);this.smiles=[];this.smiles=b;ipsclass.my_setcookie("ed-custom-smiles-"+ipb_skin_emodir,escape(this.smiles.join(",")),1)};this.init()}
function BBAdvCodes(g,h){this.initialize=!1;this.BBEditor=g;this.editor_id=g.editor_id;this._obj=g[h];this._obj_name=h;this.init=function(){if(!this.initialize&&Adv_BBCodes){this._obj.innerHTML="";var a=document.createElement("table");a.cellSpacing="0";a.cellPadding="0";a.border="0";a.className="ed-adv-bbcodeboard";for(var b in Adv_BBCodes){var d=Adv_BBCodes[b],e=a.insertRow(-1);try{e.vAlign="middle"}catch(k){}var e=e.insertCell(-1),c=document.createElement("div");c.className="ed-adv-item-normal";
c._is_down=0;c._obj_name=this._obj_name;c.onmousemove=function(){this._is_down||(this.className="ed-adv-item-hover")};c.onmouseout=function(){this._is_down=0;this.className="ed-adv-item-normal"};c.onmousedown=function(){this._is_down=1;this.className="ed-adv-item-down"};c.onmouseup=function(){this._is_down=0;this.className="ed-adv-item-hover";BBEditors[this.editor_id][this._obj_name].cl.action_tag(this._tag_name)};c.innerHTML=d.title;c._tag_name=b;c.editor_id=this.editor_id;c.title=d.title+" \r\n\u041f\u0440\u0438\u043c\u0435\u0440:\r\n\t"+
d.example;e.appendChild(c)}this._obj.appendChild(a)}};this.action_tag=function(a){if(Adv_BBCodes[a]){a=Adv_BBCodes[a];var b="",d=this.BBEditor.get_select_text();if(!parseInt(a.use_option)||(b=prompt(a.text_option,""),b&&""!=b))if(d&&""!=d)parseInt(a.use_option)?this.BBEditor.wrap_text_option(a.tag,b):this.BBEditor.wrap_text("["+a.tag+"]","[/"+a.tag+"]");else if(d=prompt(a.text_content,""),parseInt(a.use_option)||d&&""!=d)parseInt(a.use_option)?(d||(d=""),this.BBEditor.insert_text("["+a.tag+"="+b+
"]"+d+"[/"+a.tag+"]")):this.BBEditor.insert_text("["+a.tag+"]"+d+"[/"+a.tag+"]")}};this.init()}
var BBCodes_title="",BBCodes_know={B:{tag:"<b>B</b>",img:"folder_editor_buttons/b.png",func:"B",title:"\u0416\u0438\u0440\u043d\u044b\u0439"},I:{tag:"<i>I</i>",img:"folder_editor_buttons/i.png",func:"I",title:"\u041a\u0443\u0440\u0441\u0438\u0432"},U:{tag:"<u>U</u>",img:"folder_editor_buttons/u.png",func:"U",title:"\u041f\u043e\u0434\u0447\u0451\u0440\u043a\u0438\u0432\u0430\u043d\u0438\u0435"},S:{tag:"<s>S</s>",img:"folder_editor_buttons/s.png",func:"S",title:"\u0417\u0430\u0447\u0451\u0440\u043a\u0438\u0432\u0430\u043d\u0438\u0435"},
SUB:{tag:"X<sub>2</sub>",img:"folder_editor_buttons/sub.png",func:"SUB",title:"\u041f\u043e\u0434\u0441\u0442\u0440\u043e\u0447\u043d\u044b\u0439 \u0442\u0435\u043a\u0441\u0442"},SUP:{tag:"X<sup>2</sup>",img:"folder_editor_buttons/sup.png",func:"SUP",title:"\u041d\u0430\u0434\u0441\u0442\u0440\u043e\u0447\u043d\u044b\u0439 \u0442\u0435\u043a\u0441\u0442"},LEFT:{tag:'<div style="width:30px;text-align:left;">&lt;=</div>',img:"folder_editor_buttons/left.png",func:"LEFT",title:"\u0412\u043b\u0435\u0432\u043e"},
CENTER:{tag:'<div style="width:30px;text-align:center;">&lt;=&gt;</div>',img:"folder_editor_buttons/center.png",func:"CENTER",title:"\u041f\u043e \u0446\u0435\u043d\u0442\u0440\u0443"},RIGHT:{tag:'<div style="width:30px;text-align:right;">=&gt;</div>',img:"folder_editor_buttons/right.png",func:"RIGHT",title:"\u0412\u043f\u0440\u0430\u0432\u043e"},URL:{tag:'<font color="blue"><b><u>http://</u></b></font>',img:"folder_editor_buttons/url.png",func:"URL",title:"\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0433\u0438\u043f\u0435\u0440\u0441\u0441\u044b\u043b\u043a\u0443"},
MAIL:{tag:'<font color="blue"><b><u>[@]</u></b></font>',img:"folder_editor_buttons/mail.png",func:"mail",title:"\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u044c E-Mail"},IMAGE:{tag:"\u041a\u0430\u0440\u0442\u0438\u043d\u043a\u0430",img:"folder_editor_buttons/image.png",func:"image",title:"\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0443"},QUOTE:{tag:"<b>&copy;</b>",img:"folder_editor_buttons/quote.png",func:"QUOTE",title:"\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0446\u0438\u0442\u0430\u0442\u0443"},
OFFTOP:{tag:"\u041e\u0444\u0444\u0442\u043e\u043f",img:"folder_editor_buttons/offtop.png",func:"OFFTOP",title:"\u041e\u0444\u0444\u0442\u043e\u043f"},CODE:{tag:"\u041a\u043e\u0434",img:"folder_editor_buttons/code.png",func:"CODE",title:"\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043a\u043e\u0434"},SPOILER:{tag:"\u0421\u043f\u043e\u0439\u043b\u0435\u0440",img:"folder_editor_buttons/spoiler.png",func:"SPOILER",title:"\u0421\u0434\u0435\u043b\u0430\u0442\u044c \u0442\u0435\u043a\u0441\u0442 \u0441\u0432\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0435\u043c\u044b\u043c"},
SPOIL:{tag:"\u0421\u043f\u043e\u0439\u043b\u0435\u0440 \u0441 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u043e\u043c",img:"folder_editor_buttons/spoil.png",func:"spoil",title:"\u0421\u0434\u0435\u043b\u0430\u0442\u044c \u0442\u0435\u043a\u0441\u0442 \u0441\u0432\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0435\u043c\u044b\u043c \u0438 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a"},HIDE:{tag:"\u0421\u043a\u0440\u044b\u0442\u044b\u0439 \u0442\u0435\u043a\u0441\u0442",
img:"folder_editor_buttons/hide.png",func:"HIDE",title:"\u0421\u043a\u0440\u044b\u0442\u044b\u0439 \u0442\u0435\u043a\u0441\u0442"},LIST:{tag:"\u0421\u043f\u0438\u0441\u043e\u043a",img:"folder_editor_buttons/list.png",func:"list",title:"\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0441\u043f\u0438\u0441\u043e\u043a"},"LIST=1":{tag:"\u041d\u0443\u043c\u0435\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0441\u043f\u0438\u0441\u043e\u043a",img:"folder_editor_buttons/numlist.png",func:"list1",
title:"\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043d\u0443\u043c\u0435\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0441\u043f\u0438\u0441\u043e\u043a"},CUR:{tag:'<font color="green"><b>C</b></font>',img:"folder_editor_buttons/cur.png",func:"CUR",title:"\u0421\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u043a\u0443\u0440\u0430\u0442\u043e\u0440\u0430"},MOD:{tag:'<font color="blue"><b>M</b></font>',img:"folder_editor_buttons/mod.png",func:"MOD",title:"\u0421\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u043c\u043e\u0434\u0435\u0440\u0430\u0442\u043e\u0440\u0430"},
EX:{tag:'<font color="red"><b>!</b></font>',img:"folder_editor_buttons/ex.png",func:"EX",title:"\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435"},CLEAR:{tag:"[x]",img:"folder_editor_buttons/clear.png",func:"clear_bb",title:"\u0423\u0434\u0430\u043b\u0438\u0442\u044c \u0432\u0441\u0435 BB \u043a\u043e\u0434\u044b"},BBHELP:{tag:"[?]",img:"folder_editor_buttons/bb_help.png",func:"bbhelp",title:"\u041f\u043e\u043c\u043e\u0449\u044c \u043f\u043e \u0411\u0411 \u043a\u043e\u0434\u0430\u043c"},
PLUS:{tag:"+",img:"folder_editor_buttons/area_plus.png",func:"PLUS",title:"\u0423\u0432\u0435\u043b\u0438\u0447\u0438\u0442\u044c \u0444\u043e\u0440\u043c\u0443 \u043e\u0442\u0432\u0435\u0442\u0430"},MINUS:{tag:"-",img:"folder_editor_buttons/area_minus.png",func:"MINUS",title:"\u0423\u043c\u0435\u043d\u044c\u0448\u0438\u0442\u044c \u0444\u043e\u0440\u043c\u0443 \u043e\u0442\u0432\u0435\u0442\u0430"}};
function BBCodes(g,h){this.initialize=!1;this.BBEditor=g;this.editor_id=g.editor_id;this._objname=h;this._obj=g[h];this.init=function(){if(!this.initialize&&this._obj){var a=this._obj.innerHTML.replace(/(\r|\n|\t)/g," ").replace(RegExp("<(.+?)>","ig"),"").split(" ");this._obj.innerHTML="";this._obj.style.width="100%";this.BBEditor.create_panel_title(this._obj,BBCodes_title);this._obj.className="ed-panel";for(var b=0;b<a.length;b++)if(BBCodes_know[a[b]]){var d=BBCodes_know[a[b]],e=null;d.img?(e=document.createElement("img"),
e.src=ipb_var_image_url+"/"+d.img,e.border="0",e.is_down=0,e.align="top",e.className="ed-bbcode-normal",e.onmousemove=function(){this.is_down||(this.className="ed-bbcode-hover")},e.onmousedown=function(){this.is_down=1;this.className="ed-bbcode-down"},e.onmouseup=function(){this.is_down=0;this.className="ed-bbcode-hover"},e.onmouseout=function(){this.is_down=0;this.className="ed-bbcode-normal"},d.title&&(e.alt=d.title)):(e=document.createElement("button"),e.className="ed-bbcode",e.innerHTML=d.tag);
if(d.style){var c=!0;try{e.style=d.style,c=!1}catch(f){}if(c){var c=this.BBEditor.parse_style(d.style),k;for(k in c)try{e.style[k]=c[k]}catch(f){}}}d.title&&(e.title=d.title);e.cmd=d.func;e.editor_id=this.editor_id;e._objname=this._objname;e.onclick=function(a){var d=!0;a||(a=window.event);"click"==a.type&&(d=BBEditors[this.editor_id][this._objname].cl.go_action(a,this));return d};this._obj.appendChild(e)}this.initialize=!0}};this.go_action=function(a,b){var d=!0;if("click"!=a.type)return d;this[b.cmd]?
d=this[b.cmd]():(this.BBEditor.wrap_text("["+b.cmd+"]","[/"+b.cmd+"]"),d=!1);return d};this.clear_bb=function(){var a=this.BBEditor._textarea;a.value=a.value.replace(/\[(.*?)\]/gi,"");return!1};this.spoil=function(){var a=this.BBEditor.get_select_text(),b=prompt("\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a \u0441\u043f\u043e\u0439\u043b\u0435\u0440\u0430","");if(!b||null==b||""==b)return!1;if(a&&null!=a&&""!=a)this.BBEditor.wrap_text_option("SPOILER",
b);else{a=prompt("\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u0435 \u0441\u043f\u043e\u0439\u043b\u0435\u0440\u0430","");if(!a||null==a||""==a)return!1;this.BBEditor.insert_text("[SPOILER="+b+"]"+a+"[/SPOILER]")}return!1};this.URL=function(){var a=this.BBEditor.get_select_text(),b=prompt(ipb_global_lang.editor_enter_url,"http://");if(!b||null==b||"http://"==b)return!1;if(a&&null!=a&&""!=a)this.BBEditor.wrap_text_option("URL",b);else{a=prompt(ipb_global_lang.editor_enter_title,
ipb_global_lang.visit_my_website);if(!a||null==a||""==a)return!1;"http//"==(b+"").substr(0,6).toLowerCase()&&(b="http://"+(b+"").substr(6));0>["http:","https","magne","ftp:/"].indexOf((b+"").substr(0,5).toLowerCase())&&(b="http://"+b);this.BBEditor.insert_text("[URL="+b+"]"+a+"[/URL]")}return!1};this.mail=function(){var a=this.BBEditor.get_select_text(),b=prompt(ipb_global_lang.editor_enter_email,"");if(!b||null==b||""==b)return!1;if(a&&null!=a&&""!=a)this.BBEditor.wrap_text_option("EMAIL",b);else{a=
prompt(ipb_global_lang.editor_enter_title,"");if(!a||null==a||""==a)return!1;this.BBEditor.insert_text("[EMAIL="+b+"]"+a+"[/EMAIL]")}return!1};this.image=function(){var a=this.BBEditor.get_select_text();if(a&&null!=a&&"http://"!=a&&""!=a)this.BBEditor.wrap_text("[IMG]","[/IMG]");else{a=prompt(ipb_global_lang.editor_enter_image,"http://");if(!a||null==a||"http://"==a)return!1;this.BBEditor.insert_text("[IMG]"+a+"[/IMG]")}return!1};this.list=function(){return this.createlist("LIST")};this.list1=function(){return this.createlist("LIST=1")};
this.createlist=function(a){var b=this.BBEditor.get_select_text(),d=[];if(""!=b)for(var e=b.replace(/(\r)/g,"").split("\n"),b="",c=0;c<e.length;c++)e[c]=e[c].replace(/^\s*(.*?)\s*$/g,"$1"),""!=e[c]&&(d[d.length]="[*]"+e[c]);else d=this.get_list_vals();0<d.length&&(b="["+a+"]"+d.join("\n")+"[/LIST]\n");this.BBEditor.insert_text(b);return!1};this.get_list_vals=function(){var a=[],b=null;do(b=prompt("\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u0435 "+
(a.length+1)+" \u043f\u0443\u043d\u043a\u0442\u0430 \u0441\u043f\u0438\u0441\u043a\u0430.",""))&&null!=b&&""!=b.replace(/^\s*(.*?)\s*$/g,"$1")&&(a[a.length]="[*]"+b);while(b&&null!=b&&""!=b);return a};this.PLUS=function(){var a=parseInt(this.BBEditor._textarea.rows),a=isNaN(a)?BBEditors_minimum_rows:a+5;ipsclass.my_setcookie("editor_"+this.editor_id+"_rows",a,1);this.BBEditor._textarea.rows=a;return!1};this.MINUS=function(){var a=parseInt(this.BBEditor._textarea.rows);isNaN(a)?a=BBEditors_minimum_rows:
(a-=5,a<BBEditors_minimum_rows&&(a=BBEditors_minimum_rows));ipsclass.my_setcookie("editor_"+this.editor_id+"_rows",a,1);this.BBEditor._textarea.rows=a;return!1};this.bbhelp=function(){window.open(ipb_var_base_url+"act=legends&CODE=bbcode","Legends","width=700,height=500,resizable=yes,scrollbars=yes");return!1};this.init()}var BBSizes_title="\u0420\u0430\u0437\u043c\u0435\u0440:",BBSizes_know=[1,2,3,4,5,6,7];
function BBSizes(g,h){this.initialize=!1;this.BBEditor=g;this.editor_id=g.editor_id;this._obj=g[h];this.init=function(){if(!this.initialize&&this._obj){this._obj.innerHTML="";var a=BBSizes_title;BBSizes_title="";this.BBEditor.create_panel_title(this._obj,BBSizes_title);BBSizes_title=a;this._obj.className="ed-panel";var b=document.createElement("table");b.cellPadding=0;b.cellSpacing=0;b.border=0;var d=b.insertRow(-1),e=d.insertCell(-1);e.innerHTML="&nbsp;";e=d.insertCell(-1);e.innerHTML=a;e.className=
"ed-panel-title";for(a=0;a<BBSizes_know.length;a++){e=d.insertCell(-1);e.width="1px";var c=document.createElement("div");c.editor_id=this.editor_id;c.innerHTML=c._fsize=new String(BBSizes_know[a]);c.className="ed-bbcode-normal";c.onclick=function(a){var d=!0;is_ie&&(a=window.event);"click"==a.type&&(d=BBEditors[this.editor_id].wrap_text_option("SIZE",this._fsize));return d};c.onmousemove=function(){this.is_down||(this.className="ed-bbcode-hover")};c.onmousedown=function(){this.is_down=1;this.className=
"ed-bbcode-down"};c.onmouseup=function(){this.is_down=0;this.className="ed-bbcode-hover"};c.onmouseout=function(){this.is_down=0;this.className="ed-bbcode-normal"};e.appendChild(c)}this._obj.appendChild(b);this.initialize=!0}};this.init()}var BBColors_title="\u0426\u0432\u0435\u0442:",BBColors_know="#000000 #FFFFFF skyblue royalblue blue darkblue orange orangered crimson red darkred green limegreen seagreen deeppink tomato coral purple indigo burlywood sandybrown sienna chocolate teal silver".split(" ");
function BBColors(g,h){this.initialize=!1;this.BBEditor=g;this.editor_id=g.editor_id;this._obj=g[h];this.init=function(){if(!this.initialize&&this._obj){this._obj.innerHTML="";var a=BBColors_title;BBColors_title="";this.BBEditor.create_panel_title(this._obj,BBColors_title);BBColors_title=a;this._obj.className="ed-panel";var b=document.createElement("table");b.cellPadding=0;b.cellSpacing=0;b.border=0;b.style.width="100%";var d=b.insertRow(-1),e=d.insertCell(-1);e.innerHTML=a;e.className="ed-panel-title";
for(a=0;a<BBColors_know.length;a++){e=d.insertCell(-1);e.className="ed-color-item";var c=document.createElement("div");c.editor_id=this.editor_id;c.innerHTML="&nbsp;";c.style.background=c._fcolor=new String(BBColors_know[a]);c.className="ed-color-normal";c.onclick=function(a){var d=!0;a||(a=window.event);"click"==a.type&&(d=BBEditors[this.editor_id].wrap_text_option("COLOR",this._fcolor));return d};c.onmousemove=function(){this.is_down||(this.className="ed-color-hover")};c.onmousedown=function(){this.is_down=
1;this.className="ed-color-down"};c.onmouseup=function(){this.is_down=0;this.className="ed-color-hover"};c.onmouseout=function(){this.is_down=0;this.className="ed-color-normal"};e.appendChild(c)}this._obj.appendChild(b);this.initialize=!0}};this.init()}
var BBModTags_arr={"\u041f\u0440\u0430\u0432\u0438\u043b\u0430 \u0444\u043e\u0440\u0443\u043c\u0430!":'[mod][b]\u041e\u0437\u043d\u0430\u043a\u043e\u043c\u044c\u0442\u0435\u0441\u044c \u0441 [url="http://4pda.ru/forum/index.php?act=boardrules"]\u041f\u0440\u0430\u0432\u0438\u043b\u0430\u043c\u0438 \u0424\u043e\u0440\u0443\u043c\u0430![/url][/b][/mod]',"\u0412\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435\u0441\u044c \u043f\u043e\u0438\u0441\u043a\u043e\u043c \u043f\u043e \u0444\u043e\u0440\u0443\u043c\u0443.":'[mod][b]\u0412\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435\u0441\u044c [url="http://4pda.ru/forum/index.php?act=search&f="][img]http:/'+'/s.4pda.to/forum/style_images/1/atb_search.gif[/img] \u043f\u043e\u0438\u0441\u043a\u043e\u043c \u043f\u043e \u0444\u043e\u0440\u0443\u043c\u0443.[/url][/b][/mod]',
"\u0422\u0435\u043c\u0430 \u0437\u0430\u043a\u0440\u044b\u0442\u0430.":"[mod]\u0422\u0435\u043c\u0430 \u0437\u0430\u043a\u0440\u044b\u0442\u0430.[/mod]",'\u0422\u0435\u043c\u0430 \u043f\u0435\u0440\u0435\u043d\u0435\u0441\u0435\u043d\u0430 \u0432 \u0440\u0430\u0437\u0434\u0435\u043b "".':"[mod]\u0422\u0435\u043c\u0430 \u043f\u0435\u0440\u0435\u043d\u0435\u0441\u0435\u043d\u0430 \u0432 \u0440\u0430\u0437\u0434\u0435\u043b \u00ab\u00bb.[/mod]","\u041f\u0440\u043e\u0448\u0443 \u043d\u0435 \u0444\u043b\u0443\u0434\u0438\u0442\u044c.":"[mod]\u041f\u0440\u043e\u0448\u0443 \u043d\u0435 \u0444\u043b\u0443\u0434\u0438\u0442\u044c.[/mod]",
"\u041f\u0440\u043e\u0447\u0438\u0442\u0430\u0439\u0442\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0440\u0430\u0437\u0434\u0435\u043b\u0430.":"[mod]\u041f\u0440\u043e\u0447\u0438\u0442\u0430\u0439\u0442\u0435 \u043f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430 \u0432\u043d\u0438\u043c\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0440\u0430\u0437\u0434\u0435\u043b\u0430![/mod]",
"\u041e\u0437\u043d\u0430\u043a\u043e\u043c\u044c\u0442\u0435\u0441\u044c \u0441 \u043f\u0440\u0430\u0432\u0438\u043b\u0430\u043c\u0438 \u0411\u0430\u0440\u0430\u0445\u043e\u043b\u043a\u0438.":'[mod][b]\u041e\u0437\u043d\u0430\u043a\u043e\u043c\u044c\u0442\u0435\u0441\u044c \u0441 [url="http://4pda.ru/forum/index.php?showtopic=78677"]\u041f\u0440\u0430\u0432\u0438\u043b\u0430\u043c\u0438 \u0444\u043e\u0440\u0443\u043c\u0430 "\u0411\u0430\u0440\u0430\u0445\u043e\u043b\u043a\u0430"[/url][/b][/mod]',
"\u0417\u0430\u043f\u0440\u0435\u0449\u0435\u043d\u043e \u043f\u043e\u0434\u043d\u0438\u043c\u0430\u0442\u044c \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u044f \u0447\u0430\u0449\u0435 \u0447\u0435\u043c \u043e\u0434\u0438\u043d \u0440\u0430\u0437 \u0432 48 \u0447\u0430\u0441\u043e\u0432.":"[mod]\u0417\u0430\u043f\u0440\u0435\u0449\u0435\u043d\u043e \u043f\u043e\u0434\u043d\u0438\u043c\u0430\u0442\u044c \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u044f \u0447\u0430\u0449\u0435 \u0447\u0435\u043c \u043e\u0434\u0438\u043d \u0440\u0430\u0437 \u0432 48 \u0447\u0430\u0441\u043e\u0432.[/mod]",
"\u0420\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438-warez \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0437\u0430\u043f\u0440\u0435\u0449\u0451\u043d \u043d\u0430 \u0444\u043e\u0440\u0443\u043c\u0435.":'[ex][b][url="http://4pda.ru/forum/index.php?act=announce&f=212&id=126"][color="red"]\u0420\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438-Warez \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0437\u0430\u043f\u0440\u0435\u0449\u0435\u043d \u043d\u0430 \u0444\u043e\u0440\u0443\u043c\u0435.[/color][/url][/b][/ex]',
"\u041d\u0430\u0440\u0443\u0448\u0435\u043d\u0438\u0435 \u041f\u0440\u0430\u0432\u0438\u043b \u043f.X.Y.":'[ex]\u041d\u0430\u0440\u0443\u0448\u0435\u043d\u0438\u0435 [url="http://4pda.ru/forum/index.php?act=boardrules"]\u041f\u0440\u0430\u0432\u0438\u043b[/url] \u043f.X.Y - Z \u0434\u043d\u0435\u0439 \u0420\u041e[/ex]'};
function BBModTags(g,h){this.initialize=!1;this.BBEditor=g;this.editor_id=g.editor_id;this._obj=g[h];this._obj_name=h;this.init=function(){if(!this.initialize&&this._obj){this._obj.innerHTML="";this._obj.className="ed-panel";var a=document.createElement("select");a.editor_id=this.editor_id;a.size=1;a.style.width="100%";var b=document.createElement("option");b.value="";b.innerHTML="\u041c\u043e\u0434\u0435\u0440\u0430\u0442\u043e\u0440\u0441\u043a\u0438\u0435 \u0442\u0435\u0433\u0438";a.appendChild(b);
for(var d in BBModTags_arr)b=document.createElement("option"),b.innerHTML=d,b.value=BBModTags_arr[d],a.appendChild(b);a.onchange=this.PasteModtag;this._obj.appendChild(a)}};this.PasteModtag=function(){var a=this.value;if(""!=a){BBEditors[this.editor_id].insert_text(a);for(a=1;a<this.childNodes.length;a++)this.childNodes[a].selected=!1;this.childNodes[0].selected=!0}};this.init()}
var BBEditors_loading_message="\u0418\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u0430",BBEditors_minimum_rows=17,BBEditors_textarea_cahnge_rows=3,BBEditors_panel_title_width=110;var BBEditors=[];
function BBEditor(g,h,a){this.editor_id=g;this.use_bbcode=h;this.file_path=a;""!=a&&"/"!=a.substr(a.length-1,1)&&(this.file_path+="/");this._wind_resize=this.initialize=!1;this._wrap=document.getElementById(this.editor_id+"_wrap");this._loader=document.getElementById(this.editor_id+"_loader");this.div_advanced_panel=document.getElementById(this.editor_id+"_ap");this.div_toggle_advanced_panel=document.getElementById(this.editor_id+"_t_ap");this.div_bbcode=document.getElementById(this.editor_id+"_bbc");
this.div_panel_size=document.getElementById(this.editor_id+"_ps");this.div_panel_color=document.getElementById(this.editor_id+"_pc");this.div_moder_tags=document.getElementById(this.editor_id+"_mt");this._textarea=document.getElementById(this.editor_id+"_textarea");this.div_textarea_functions=document.getElementById(this.editor_id+"_tf");this.div_smile_panel=document.getElementById(this.editor_id+"_sp");this.div_toggle_smile_panel=document.getElementById(this.editor_id+"_t_sp");this.div_adv_panel=
document.getElementById(this.editor_id+"_atp");this.div_toggle_adv_panel=document.getElementById(this.editor_id+"_t_atp");this.init=function(){if(!this.initialize){this.init_loader();for(var a=[this.div_smile_panel,this.div_toggle_smile_panel,this.div_bbcode,this.div_panel_size,this.div_panel_color,this.div_moder_tags,this.div_advanced_panel,this.div_toggle_advanced_panel],b=0;b<a.length;b++)a[b]&&(a[b].style.display="none");this._init_textarea();this._set_loader_text(1);this.init2()}};this.init2=
function(){if(this.div_toggle_advanced_panel&&this.div_advanced_panel){if("undefined"==typeof BBToggles){this.import_js(this.file_path+"ed_toggle.js");window.setTimeout("BBEditors['"+this.editor_id+"'].init2();",100);return}this._set_loader_text(2);this.div_toggle_advanced_panel.cl=new BBToggles(this,"div_toggle_advanced_panel","div_advanced_panel");this.div_toggle_advanced_panel.style.display=""}this.init3()};this.init3=function(){if(this.div_smile_panel){if("undefined"==typeof BBSmiles){this.import_js(this.file_path+
"ed_smiles.js?_=0.2");window.setTimeout("BBEditors['"+this.editor_id+"'].init3();",100);return}this._set_loader_text(3);this.div_smile_panel.cl=new BBSmiles(this,"div_smile_panel");this.div_smile_panel.style.display=""}this.init4()};this.init4=function(){if(this.div_smile_panel&&this.div_toggle_smile_panel){if("undefined"==typeof BBToggles){this.import_js(this.file_path+"ed_toggle.js");window.setTimeout("BBEditors['"+this.editor_id+"'].init4();",100);return}this._set_loader_text(4);this.div_toggle_smile_panel.cl=
new BBToggles(this,"div_toggle_smile_panel","div_smile_panel");this.div_toggle_smile_panel.style.display=""}this.init5()};this.init5=function(){if(this.div_adv_panel){if("undefined"==typeof BBAdvCodes){this.import_js(this.file_path+"ed_advbb.js");window.setTimeout("BBEditors['"+this.editor_id+"'].init5();",100);return}this._set_loader_text(5);this.div_adv_panel.cl=new BBAdvCodes(this,"div_adv_panel");this.div_adv_panel.style.display=""}this.init6()};this.init6=function(){if(this.div_adv_panel&&this.div_toggle_adv_panel){if("undefined"==
typeof BBToggles){this.import_js(this.file_path+"ed_toggle.js");window.setTimeout("BBEditors['"+this.editor_id+"'].init6();",100);return}this._set_loader_text(6);this.div_toggle_adv_panel.cl=new BBToggles(this,"div_toggle_adv_panel","div_adv_panel");this.div_toggle_adv_panel.style.display=""}this.init7()};this.init7=function(){"undefined"==typeof BBCodes?(this.import_js(this.file_path+"ed_bbcodes.js"),window.setTimeout("BBEditors['"+this.editor_id+"'].init7();",100)):(this._set_loader_text(7),this.div_textarea_functions&&
(this.div_textarea_functions.cl=new BBCodes(this,"div_textarea_functions")),this.use_bbcode&&this.div_bbcode&&(this.div_bbcode.cl=new BBCodes(this,"div_bbcode"),this.div_bbcode.style.display=""),this.init8())};this.init8=function(){if(this.use_bbcode){if(this.div_panel_size){if("undefined"==typeof BBSizes){this.import_js(this.file_path+"ed_sizes.js");window.setTimeout("BBEditors['"+this.editor_id+"'].init8();",100);return}this.div_panel_size.cl=new BBSizes(this,"div_panel_size");this.div_panel_size.style.display=
""}this._set_loader_text(8)}this.init9()};this.init9=function(){if(this.use_bbcode){if(this.div_panel_color){if("undefined"==typeof BBColors){this.import_js(this.file_path+"ed_colors.js");window.setTimeout("BBEditors['"+this.editor_id+"'].init9();",100);return}this.div_panel_color.cl=new BBColors(this,"div_panel_color");this.div_panel_color.style.display=""}this._set_loader_text(9)}this.init10()};this.init10=function(){if(this.use_bbcode&&this.div_moder_tags){if("undefined"==typeof BBModTags){this.import_js(this.file_path+
"ed_mod_tags.js");window.setTimeout("BBEditors['"+this.editor_id+"'].init10();",100);return}this.div_moder_tags.cl=new BBModTags(this,"div_moder_tags");this.div_moder_tags.style.display=""}this._set_loader_text(10);this.initialize=!0};this._set_loader_text=function(a){this._loader&&this._wrap&&(this._loader.innerHTML=BBEditors_loading_message+" ("+a+"/10).")};this.init_loader=function(){if(this._loader&&this._wrap){var a=this._loader;this._loader.style.display="block";this._wrap.style.display="none";
a.style.display="";a.style.border="solid 1px black";a._green=0;a._add=1;a._idtime=window.setInterval("BBEditors['"+this.editor_id+"']._loading();",20)}else this.loader&&(this.loader.style.display="none"),this._wrap&&(this._wrap.style.display="")};this._loading=function(){var a=this._loader;this.initialize?(window.clearInterval(a._idtime),a.style.display="none",this._wrap.style.display=""):(a.style.color=a.style.borderColor="#"+parseInt(a._green).toString(16)+parseInt(a._green).toString(16)+parseInt(a._green).toString(16),
a._green=parseInt(a._green)+parseInt(a._add),0>=parseInt(a._green)&&(a._add=1,a._green=0),15<=parseInt(a._green)&&(a._add=-1,a._green=15))};this.import_js=function(a,b,c){var k,f=document.getElementsByTagName("script");for(k=0;k<f.length;k++)if(!c&&1!=parseInt(c)){if(f[k].src==a)return!1}else if(f[k]._id==b)return!1;c=document.createElement("script");c.type="text/javascript";c.src=a;b&&"undefined"==b||(c._id=b);document.getElementsByTagName("head")[0].appendChild(c);return!0};this._fix_textarea_width=
function(){var a=this._textarea,b=100;try{b=a.parentNode.offsetWidth,parseInt(a.offsetWidth)+10!=b&&this.initialize&&this._wind_resize&&(a.style.width="1px",b=a.parentNode.offsetWidth,a.style.width=b-10+"px",this._wind_resize=!1)}catch(c){}"fix-textarea-width"in a||(a["fix-textarea-width"]=window.setInterval("BBEditors['"+this.editor_id+"']._fix_textarea_width();",500))};this._wind_on_resize=function(){for(var a in BBEditors)BBEditors[a]._wind_resize=!0;null!=window._onresize&&window._onresize()};
this._init_textarea=function(){var a=ipsclass.my_getcookie("editor_"+this.editor_id+"_rows");isNaN(parseInt(a))&&(a=BBEditors_minimum_rows);this._textarea.rows=a;"undefined"==window._onresize_hook&&(window._onresize_hook=!0,window._onresize="undefined"!=typeof window.onresize?window.onresize:null,window.onresize=this._wind_on_resize);window.setTimeout("BBEditors['"+this.editor_id+"']._fix_textarea_width();",500);this._textarea.onkeydown=function(a){if(13==a.keyCode&&a.ctrlKey){try{var b=this.form.querySelector("[name=submit]")||
this.form.querySelector("[name=dosubmit]")||this.form.querySelector("[type=button][onclick^=ajax_save_for_edit]");b&&b.click();a.preventDefault()}catch(d){}return!1}};is_ie?(this._textarea.onselect=this._textarea.onkeyup=this._textarea.onmouseup=function(a){this._sel=null;if("undefined"==typeof document.selection||"Text"==document.selection.type||"None"==document.selection.type)this._sel=document.selection.createRange()},this._textarea.onfocus=function(a){this._sel&&this._sel.select()}):(this._textarea._selStart=
0,this._textarea._selEnd=0,this._textarea.onblur=this._textarea.onclick=this._textarea.onmouseup=this._textarea.onmousedown=this._textarea.onselect=this._textarea.onkeyup=this._textarea_save_sel,this._textarea.onfocus=this._textarea_load_sel)};this._textarea_save_sel=function(){this._selStart=this.selectionStart;this._selEnd=this.selectionEnd};this._textarea_load_sel=function(){this.selectionStart=this._selStart;this.selectionEnd=this._selEnd};this.create_panel_title=function(a,b){a&&""!=b.replace(RegExp("^s*(.*?)s*$",
"g"),"$1")&&(a.innerHTML=b)};this.parse_style=function(a){var b=[];a=a.split(";");for(var c=0;c<a.length;c++){var k=a[c].split(":");if(2==k.length){var f=k[0].replace(RegExp("^s*(.*?)s*$","g"),"$1"),k=k[1].replace(RegExp("^s*(.*?)s*$","g"),"$1");b[f]=k;for(var g=f.split("-"),l=g[0],h=1;h<g.length;h++)var p=g[h].substr(0,1).toUpperCase()+g[h].substr(1).toLowerCase(),l=l+p;l!=f&&(b[l]=k)}}return b};this.set_focus=function(a){try{this._textarea._is_sel||this._textarea.focus()}catch(b){}};this.wrap_text=
function(a,b){var c=null,g="",f="",h="";is_ie?(this.set_focus(),"undefined"!=typeof document.selection&&"Text"!=document.selection.type&&"None"!=document.selection.type&&document.selection.clear(),c=this._textarea._sel?this._textarea._sel:document.selection.createRange(),f=c.text):(h=this._textarea.value,c=this._textarea._selStart,g=h.substr(0,this._textarea._selStart),f=h.substr(this._textarea._selStart,this._textarea._selEnd-this._textarea._selStart),h=h.substr(this._textarea._selEnd));f=f.substr(0,
a.length).toUpperCase()==a.toUpperCase()&&f.substr(f.length-b.length).toUpperCase()==b.toUpperCase()?f.substr(a.length,f.length-a.length-b.length):a+f+b;if(is_ie)try{c.text=f,this._textarea._sel=c,c.select()}catch(l){}else this._textarea.value=g+f+h,this._textarea._selStart=this._textarea._selEnd=c,this._textarea._selEnd+=f.length,this.set_focus(),window.setTimeout("var obj=BBEditors['"+this.editor_id+"']._textarea;obj.selectionStart="+c+";obj.selectionEnd="+(c+f.length)+";try{obj.onblur();}catch(e){}",
1);return!1};this.wrap_text_option=function(a,b){var c=null,g="",f="",h="";is_ie?(this.set_focus(),"undefined"!=typeof document.selection&&"Text"!=document.selection.type&&"None"!=document.selection.type&&document.selection.clear(),c=this._textarea._sel?this._textarea._sel:document.selection.createRange(),f=c.text):(c=this._textarea._selStart,h=this._textarea.value,g=h.substr(0,this._textarea._selStart),f=h.substr(this._textarea._selStart,this._textarea._selEnd-this._textarea._selStart),h=h.substr(this._textarea._selEnd));
if(f.substr(0,a.length+2)=="["+a+"="&&f.substr(f.length-a.length-3)=="[/"+a+"]"){var l=f.indexOf("]"),n=f.indexOf("[/"+a+"]");l<n&&l>a.length+2?(n=f.substr(0,a.length+b.length+3),f=f.substr(l+1,f.length-(a.length+4+l)),n!="["+a+"="+b+"]"&&(f="["+a+"="+b+"]"+f+"[/"+a+"]")):f="["+a+"="+b+"]"+f+"[/"+a+"]"}else f="["+a+"="+b+"]"+f+"[/"+a+"]";if(is_ie)try{c.text=f,this._textarea._sel=c,c.select()}catch(p){}else this._textarea.value=g+f+h,this._textarea._selStart=this._textarea._selEnd=c,this._textarea._selEnd+=
f.length,this.set_focus(),window.setTimeout("var obj=BBEditors['"+this.editor_id+"']._textarea;obj.selectionStart="+c+";obj.selectionEnd="+(c+f.length)+";try{obj.onblur();}catch(e){}",1);return!1};this.insert_text=function(a,b){var c=null;if(a&&0!=a.lenght&&""!=a.replace(RegExp("^s*(.*?)s*$","gm"),"$1"))if(is_ie){var g=document.body.scrollTop;this.set_focus();"undefined"!=typeof document.selection&&"Text"!=document.selection.type&&"None"!=document.selection.type&&document.selection.clear();c=document.selection.createRange();
c.text=a;this._textarea._sel=c;c.select();document.body.scrollTop=g}else{var f=this._textarea.value,c=this._textarea._selStart,g=f.substr(0,this._textarea._selStart),f=f.substr(this._textarea._selEnd);this._textarea.value=g+a+f;this._selStart=c;this._selEnd=c+a.length;!b&&this.set_focus();window.setTimeout(b?"var obj=BBEditors['"+this.editor_id+"']._textarea;obj.selectionStart=obj.selectionEnd="+(c+a.length)+";":"var obj=BBEditors['"+this.editor_id+"']._textarea;obj.selectionStart="+c+";obj.selectionEnd="+
(c+a.length)+";try{obj.onblur();}catch(e){}",1)}};this.get_select_text=function(){var a="";is_ie?(this.set_focus(),this._textarea._sel?sel=this._textarea._sel:("undefined"!=typeof document.selection&&"Text"!=document.selection.type&&"None"!=document.selection.type&&document.selection.clear(),sel=document.selection.createRange()),a=sel.text,sel.select()):(a=this._textarea,a=a.value.substr(a._selStart,a._selEnd-a._selStart));return a};this.init();var b=this;setTimeout(function(){b._textarea.value&&b._textarea.focus()},
100);this._textarea.BBEditor=this}function ValidateForm(){return validate_form()}function validate_form(){try{if(ipsattach.has_upload_pending&&!confirm(ipb_global_lang.post_upload_not_empty))return!1}catch(g){}return!0};if("$4" in window)$4.addModule("f-m-j",function(){return BBEditors});