";new ipb.Popup('generic__okDialogue',{type:'pane',initial:okContent,stem:true,hideAtStart:false,hideClose:false,defer:false,w:400});},contextualSearch:function()
{if(!$('search_options')&&!$('search_options_menucontent')){return;}
if(!$('main_search'))
{return;}
$('main_search').defaultize(ipb.lang['search_default_value']);$('search').select('.submit_input').find(function(elem){$(elem).value='';});var update=function(noSelect)
{var checked=$('search_options_menucontent').select('input').find(function(elem){return $(elem).checked;});if(Object.isUndefined(checked)){checked=$('search_options_menucontent').select('input:first')[0];if(!checked){return;}
checked.checked=true;}
$('search_options').show().update($(checked).up('label').readAttribute('title')||'');if(noSelect!=true){$('main_search').focus();}
return true;};update(true);$('search_options_menucontent').select('input').invoke('observe','click',update);},fetchTid:function(e)
{var elem=Event.element(e);elem.identify();if(!elem.hasClassName('__topic'))
{elem=elem.up('.__topic');}
var id=elem.id;if(!id||!$(id))
{return 0;}
var m=$(id).className.match('__tid([0-9]+)');var tid=m[1];return tid;},displayWarnLogs:function(e,elem)
{mid=elem.id.match('warn_link_([0-9a-z]+)_([0-9]+)')[2];if(Object.isUndefined(mid)){return;}
if(parseInt(mid)==0){return false;}
Event.stop(e);var _url=ipb.vars['base_url']+'&app=core&module=ajax&secure_key='+ipb.vars['secure_hash']+'§ion=warn&do=view&mid='+mid;warnLogs=new ipb.Popup('warnLogs',{type:'pane',modal:false,w:'500px',h:500,ajaxURL:_url,hideAtStart:false,close:'.cancel'});},toggleFriend:function(e,elem)
{Event.stop(e);var id=$(elem).id.match('friend_(.*)_([0-9]+)');if(Object.isUndefined(id[2])){return;}
var isFriend=($(elem).hasClassName('is_friend'))?1:0;var urlBit=(isFriend)?'remove':'add';var url=ipb.vars['base_url']+"app=members§ion=friends&module=ajax&do="+urlBit+"&member_id="+id[2]+"&md5check="+ipb.vars['secure_hash'];new Ajax.Request(url,{method:'get',onSuccess:function(t)
{switch(t.responseText)
{case'pp_friend_timeflood':alert(ipb.lang['cannot_readd_friend']);Event.stop(e);break;case"pp_friend_already":alert(ipb.lang['friend_already']);Event.stop(e);break;case"error":return true;break;default:var newIcon=(isFriend)?ipb.templates['m_add_friend'].evaluate({id:id[2]}):ipb.templates['m_rem_friend'].evaluate({id:id[2]});var friends=$$('.mini_friend_toggle').each(function(fr){if($(fr).id.endsWith('_'+id[2]))
{if(isFriend){$(fr).removeClassName('is_friend').addClassName('is_not_friend').update(newIcon);}else{$(fr).removeClassName('is_not_friend').addClassName('is_friend').update(newIcon);}}});new Effect.Highlight($(elem),{startcolor:ipb.vars['highlight_color']});document.fire('ipb:friendRemoved',{friendID:id[2]});Event.stop(e);break;}}});},toggleFlagSpammer:function(memberId,flagStatus)
{if(flagStatus==true)
{if(confirm(ipb.lang['set_as_spammer']))
{var tid=0;var fid=0;var sid=0;if(typeof(ipb.topic)!='undefined')
{tid=ipb.topic.topic_id;fid=ipb.topic.forum_id;sid=ipb.topic.start_id;}
window.location=ipb.vars['base_url']+'app=core&module=modcp&do=setAsSpammer&member_id='+memberId+'&t='+tid+'&f='+fid+'&st='+sid+'&auth_key='+ipb.vars['secure_hash'];return false;}
else
{return false;}}
else
{alert(ipb.lang['is_spammer']);return false;}},toggleSpoiler:function(e,button)
{Event.stop(e);var returnvalue=$(button).up('.bbc_spoiler').down('.bbc_spoiler_wrapper').down('.bbc_spoiler_content').toggle();if(returnvalue.visible()){$(button).value=ipb.lang['spoiler_hide'];}else{$(button).value=ipb.lang['spoiler_show'];}},buildRSSmenu:function()
{$$('link').each(function(link)
{if(link.readAttribute('type')=="application/rss+xml")
{ipb.global.rssItems.push(ipb.templates['rss_item'].evaluate({url:link.readAttribute('href'),title:link.readAttribute('title').escapeHtml()}));}});if(ipb.global.rssItems.length>0)
{rssmenu=ipb.templates['rss_shell'].evaluate({items:ipb.global.rssItems.join("\n")});$('rss_feed').insert({after:rssmenu});new ipb.Menu($('rss_feed'),$('rss_menu'));}
else
{$('rss_feed').hide();}},repPopUp:function(e,repId,repApp,repType)
{if(ipb.global.popups['rep_'+repId]){ipb.global.popups['rep_'+repId].kill();}
var _url=ipb.vars['base_url']+'&app=core&module=ajax&secure_key='+ipb.vars['secure_hash']+'§ion=reputation&do=view&repApp='+repApp+'&repType='+repType+'&repId='+repId;ipb.global.popups['rep_'+repId]=new ipb.Popup('rep_'+repId,{type:'balloon',stem:true,attach:{target:e,position:'auto'},hideAtStart:false,ajaxURL:_url,w:'300px',h:400});},closePMpopup:function(e)
{if($('pm_notification'))
{new Effect.Parallel([new Effect.Fade($('pm_notification')),new Effect.BlindUp($('pm_notification'))],{duration:0.5});}
Event.stop(e);},markReadPMpopup:function(e)
{if($('pm_notification'))
{var elem=Event.findElement(e,'a');var href=elem.href.replace(/&/g,'&')+'&ajax=1';new Ajax.Request(href+"&md5check="+ipb.vars['secure_hash'],{method:'get',evalJSON:'force',onSuccess:function(t){}});new Effect.Parallel([new Effect.Fade($('pm_notification')),new Effect.BlindUp($('pm_notification'))],{duration:0.5});}
Event.stop(e);return false;},initGD:function()
{$('gd-antispam').observe('click',ipb.global.generateNewImage);if($('gd-image-link'))
{$('gd-image-link').observe('click',ipb.global.generateNewImage);}},generateImageExternally:function(elem)
{if(!$(elem)){return;}
$(elem).observe('click',ipb.global.generateNewImage);},generateNewImage:function(e)
{img=$('gd-antispam');Event.stop(e);oldSrc=img.src.toQueryParams();oldSrc=$H(oldSrc).toObject();if(!oldSrc['captcha_unique_id']){Debug.error("No captcha ID found");}
new Ajax.Request(ipb.vars['base_url']+"app=core&module=global§ion=captcha&do=refresh&captcha_unique_id="+oldSrc['captcha_unique_id']+'&secure_key='+ipb.vars['secure_hash'],{method:'get',onSuccess:function(t)
{oldSrc['captcha_unique_id']=t.responseText;img.writeAttribute({src:ipb.vars['base_url']+$H(oldSrc).toQueryString()});$('regid').value=t.responseText;}});},registerReputation:function(id,url,rating)
{if(!$(id)){return;}
var rep_up=$(id).down('.rep_up');var rep_down=$(id).down('.rep_down');var domLikeStripId=($(url.domLikeStripId))?$(url.domLikeStripId):false;var sendUrl=ipb.vars['base_url']+'&app=core&module=ajax§ion=reputation&do=add_rating&app_rate='+url.app+'&type='+url.type+'&type_id='+url.typeid+'&secure_key='+ipb.vars['secure_hash'];if($(rep_up)){$(rep_up).observe('click',ipb.global.repRate.bindAsEventListener(this,1,id));}
if($(rep_down)){$(rep_down).observe('click',ipb.global.repRate.bindAsEventListener(this,-1,id));}
ipb.global.reputation[id]={obj:$(id),domLikeStripId:domLikeStripId,url:url,sendUrl:sendUrl,currentRating:rating||0};Debug.write("Registered reputation");},repRate:function(e)
{Event.stop(e);var type=$A(arguments)[1];var id=$A(arguments)[2];var value=(type==1)?1:-1;if(!ipb.global.reputation[id]){return;}else{var rep=ipb.global.reputation[id];}
Debug.write(rep.sendUrl+'&rating='+value);new Ajax.Request(rep.sendUrl+'&rating='+value,{method:'get',onSuccess:function(t)
{if(t.responseJSON['status']=='ok')
{try{rep.obj.down('.rep_up').up('li').hide();rep.obj.down('.rep_down').up('li').hide();if(t.responseJSON['canRepUp']===true)
{rep.obj.down('.rep_up').up('li').show();}
if(t.responseJSON['canRepDown']===true)
{rep.obj.down('.rep_down').up('li').show();}}catch(err){Debug.error(err);}
var rep_display=rep.obj.down('.rep_show');if(rep_display)
{['positive','negative','zero'].each(function(c){rep_display.removeClassName(c);});var newValue=parseInt(t.responseJSON['rating']);if(newValue>0)
{rep_display.addClassName('positive');}
else if(newValue<0)
{rep_display.addClassName('negative');}
else
{rep_display.addClassName('zero');}
rep_display.update(newValue);}
if($(rep.domLikeStripId.id))
{if(t.responseJSON['likeData'].formatted!==false)
{$(rep.domLikeStripId.id).update(t.responseJSON['likeData'].formatted).show();}
else
{$(rep.domLikeStripId.id).update('').hide();}}}
else
{if(t.responseJSON['error']=='nopermission'||t.responseJSON['error']=='no_permission')
{ipb.global.errorDialogue(ipb.lang['no_permission']);}
else
{ipb.global.errorDialogue(t.responseJSON['error']);}}}});},repLikeMore:function(e,elem)
{Event.stop(e);try
{var id=elem.readAttribute('data-id');var app=elem.readAttribute('data-app');var type=elem.readAttribute('data-type');}
catch(e)
{Debug.error(e);}
if(!Object.isUndefined(ipb.global.popups['likeMore']))
{ipb.global.popups['likeMore'].kill();}
var popid='setfave_'+id;var _url=ipb.vars['base_url']+'&app=core&module=ajax§ion=reputation&do=more&secure_key='+ipb.vars['secure_hash']+'&f_app='+app+'&f_type='+type+'&f_id='+id;Debug.write(_url);ipb.global.popups['likeMore']=new ipb.Popup(popid,{type:'pane',ajaxURL:_url,stem:false,hideAtStart:false,h:500,w:'450px'});},convertSize:function(size)
{var kb=1024;var mb=1024*1024;var gb=1024*1024*1024;if(sizescreenDim.width){diff=menuDim.width-sourceDim.width;pos.left=_sourcePos.left-diff+this.options.offsetX;}else{pos.left=(_sourcePos.left)+this.options.offsetX;}
if((_sourcePos.top+menuDim.height)>screenDim.height){pos.top=_sourcePos.top-menuDim.height+this.options.offsetY;}else{pos.top=_sourcePos.top+sourceDim.height+this.options.offsetY;}
$(this.target).setStyle('top: '+(pos.top-1)+'px; left: '+pos.left+'px;');}
else
{if(_a!=_b)
{if((realSourcePos.left+menuDim.width)>screenDim.width){diff=menuDim.width-sourceDim.width;pos.left=_sourcePos.left-diff+this.options.offsetX;}else{if(Prototype.Browser.IE7){pos.left=(_sourcePos.left)+this.options.offsetX;}else{pos.left=(_sourcePos.left)+this.options.offsetX;}}
if((((realSourcePos.top+sourceDim.height)+menuDim.height)>screenDim.height)&&(_sourcePos.top-menuDim.height+this.options.offsetY)>0)
{pos.top=_sourcePos.top-menuDim.height+this.options.offsetY;}else{pos.top=_sourcePos.top+sourceDim.height+this.options.offsetY;}}
else
{Debug.write("MENU: source offset EQUALS target offset");if((realSourcePos.left+menuDim.width)>screenDim.width){diff=menuDim.width-sourceDim.width;pos.left=sourcePos.left-diff+this.options.offsetX;}else{pos.left=sourcePos.left+this.options.offsetX;}
if((((realSourcePos.top+sourceDim.height)+menuDim.height)>screenDim.height)&&(_sourcePos.top-menuDim.height+this.options.offsetY)>0)
{pos.top=sourcePos.top-menuDim.height+this.options.offsetY;}else{pos.top=sourcePos.top+sourceDim.height+this.options.offsetY;}}
$(this.target).setStyle('top: '+(pos.top-1)+'px; left: '+pos.left+'px;');}
$(this.source).addClassName('menu_active');Debug.write("Menu position: "+pos.top+" x "+pos.left);new Effect.Appear($(this.target),{duration:0.2,afterFinish:function(e){if(Object.isFunction(this.callbacks['afterOpen']))
{this.callbacks['afterOpen'](this);}}.bind(this)});Event.observe(document,'keypress',this.checkKeyPress.bindAsEventListener(this));},checkKeyPress:function(e)
{if(e.keyCode==Event.KEY_ESC)
{this.doClose();}},mouseOutClose:function()
{this.doClose();},doClose:function()
{new Effect.Fade($(this.target),{duration:0.3,afterFinish:function(e){if(Object.isFunction(this.callbacks['afterClose']))
{this.callbacks['afterClose'](this);}}.bind(this)});this.source.removeClassName('menu_active');},targetClick:function(e)
{if(!this.options.stopClose){this.doClose();}},eventClick:function(e,elem)
{if(this.options['eventType']=='click')
{Event.stop(e);if($(this.target).visible()){if(Object.isFunction(this.callbacks['beforeClose']))
{this.callbacks['beforeClose'](this);}
this.doClose();}else{ipb.menus.closeAll($(this.source).id);if(Object.isFunction(this.callbacks['beforeOpen']))
{this.callbacks['beforeOpen'](this);}
this.doOpen(elem);}}},eventOver:function()
{if(this.options['eventType']=='mouseover')
{if(!$(this.target).visible()){ipb.menus.closeAll($(this.source).id);if(Object.isFunction(this.callbacks['beforeOpen']))
{this.callbacks['beforeOpen'](this);}
this.doOpen();}}}});_popup=window.IPBoard;_popup.prototype.Popup=Class.create({initialize:function(id,options,callbacks)
{this.id='';this.wrapper=null;this.inner=null;this.stem=null;this.options={};this.timer=[];this.ready=false;this.visible=false;this._startup=null;this.hideAfterSetup=false;this.eventPairs={'mouseover':'mouseout','mousedown':'mouseup'};this._tmpEvent=null;this.id=id;this.options=Object.extend({type:'pane',w:'500px',modal:false,modalOpacity:0.4,hideAtStart:true,delay:{show:0,hide:0},defer:false,hideClose:false,black:false,warning:false,evalJs:true,evalScript:true,closeContents:ipb.templates['close_popup']},arguments[1]||{});this.callbacks=callbacks||{};if(this.options.defer&&$(this.options.attach.target))
{this._defer=this.init.bindAsEventListener(this);$(this.options.attach.target).observe(this.options.attach.event,this._defer);if(this.eventPairs[this.options.attach.event])
{this._startup=function(e){this.hideAfterSetup=true;this.hide();}.bindAsEventListener(this);$(this.options.attach.target).observe(this.eventPairs[this.options.attach.event],this._startup);}}
else
{this.init();}},init:function()
{try{Event.stopObserving($(this.options.attach.target),this.options.attach.event,this._defer);if($(this.options.attach.target))
{var toff=$(this.options.attach.target).positionedOffset();var menu=$(this.options.attach.target).up('.ipbmenu_content');if(toff.top==0&&toff.left==0||$(menu))
{this.options.type='modal';this.options.attach={};}}}catch(err){}
this.wrapper=new Element('div',{'id':this.id+'_popup'}).setStyle('z-index: 10001').hide().addClassName('popupWrapper');this.inner=new Element('div',{'id':this.id+'_inner'}).addClassName('popupInner');if(this.options.black)
{this.inner.addClassName('black_mode');}
if(this.options.warning)
{this.inner.addClassName('warning_mode');}
if(this.options.w){this.inner.setStyle('width: '+this.options.w);}
this.wrapper.insert(this.inner);if(this.options.hideClose!=true)
{this.closeLink=new Element('div',{'id':this.id+'_close'}).addClassName('popupClose').addClassName('clickable');this.closeLink.update(this.options.closeContents);this.closeLink.observe('click',this.hide.bindAsEventListener(this));this.wrapper.insert(this.closeLink);if(this.options.black||this.options.warning)
{this.closeLink.addClassName('light_close_button');}}
$$('body')[0].insert(this.wrapper);if(this.options.classname){this.wrapper.addClassName(this.options.classname);}
if(this.options.initial){this.update(this.options.initial,this.options.evalScript);}
if(Object.isFunction(this.callbacks['beforeAjax']))
{this.callbacks['beforeAjax'](this);}
if(this.options.ajaxURL){this.updateAjax();setTimeout(this.continueInit.bind(this),80);}else{this.ready=true;this.continueInit();}},continueInit:function()
{if(!this.ready)
{setTimeout(this.continueInit.bind(this),80);return;}
if(this.inner.select(".fixed_inner").size())
{Debug.write("Found fixed_inner");this.inner.select(".fixed_inner")[0].setStyle('height: '+this.options.h+'px; max-height: '+this.options.h+'px; overflow: auto');}
else
{var _vph=document.viewport.getDimensions().height-25;this.options.h=(this.options.h&&_vph>this.options.h)?this.options.h:_vph;this.inner.setStyle('max-height: '+this.options.h+'px');}
if(this.options.type=='balloon'){this.setUpBalloon();}else{this.setUpPane();}
try{if(this.options.close){closeElem=$(this.wrapper).select(this.options.close)[0];if(Object.isElement(closeElem))
{$(closeElem).observe('click',this.hide.bindAsEventListener(this));}}}catch(err){Debug.write(err);}
if(Object.isFunction(this.callbacks['afterInit']))
{this.callbacks['afterInit'](this);}
if(!this.options.hideAtStart&&!this.hideAfterSetup)
{this.show();}
if(this.hideAfterSetup&&this._startup)
{Event.stopObserving($(this.options.attach.target),this.eventPairs[this.options.attach.event],this._startup);}},updateAjax:function()
{Debug.write(this.options.ajaxURL);new Ajax.Request(this.options.ajaxURL,{method:'get',evalJS:this.options.evalJs,onSuccess:function(t)
{if(t.responseText!='error')
{try
{if(!Object.isUndefined(t.responseJSON)&&!Object.isUndefined(t.responseJSON['error']))
{if(t.responseJSON['__board_offline__'])
{ipb.global.errorDialogue(ipb.lang['board_offline']);ipb.menus.closeAll(e);}
else
{ipb.global.errorDialogue(t.responseJSON['error']);}
return false;}}catch(e){}
if(t.responseText=='nopermission')
{ipb.global.errorDialogue(ipb.lang['no_permission']);return;}
if(t.responseText.match("__session__expired__log__out__"))
{this.update('');alert(ipb.lang['session_timed_out']);return false;}
Debug.write("AJAX done!");this.update(t.responseText);this.ready=true;if(Object.isFunction(this.callbacks['afterAjax']))
{this.callbacks['afterAjax'](this,t.responseText);}}
else
{Debug.write(t.responseText);return;}}.bind(this)});},show:function(e)
{if(e){Event.stop(e);}
if(this.timer['show']){clearTimeout(this.timer['show']);}
if(this.options.delay.show!=0){this.timer['show']=setTimeout(this._show.bind(this),this.options.delay.show);}else{this._show();}},hide:function(e)
{if(e){Event.stop(e);}
if(this.document_event){Event.stopObserving(document,'click',this.document_event);Event.stopObserving(document,'touchstart',this.document_event);}
if(this.timer['hide']){clearTimeout(this.timer['hide']);}
if(this.options.delay.hide!=0){this.timer['hide']=setTimeout(this._hide.bind(this),this.options.delay.hide);}else{this._hide();}},kill:function()
{if(this.timer['hide']){clearTimeout(this.timer['hide']);}
if(this.timer['show']){clearTimeout(this.timer['show']);}
if($(this.wrapper))
{$(this.wrapper).remove();}},_show:function()
{this.visible=true;try
{if(this.options.warning)
{_wrap=this.inner.down('h3').next('div');if(_wrap)
{if(!_wrap.className.match(/moderated/))
{_wrap.addClassName('moderated');}}}}catch(e){}
if(this.options.modal==false){new Effect.Appear($(this.wrapper),{duration:0.3,afterFinish:function(){if(Object.isFunction(this.callbacks['afterShow']))
{this.callbacks['afterShow'](this);}}.bind(this)});this.document_event=this.handleDocumentClick.bindAsEventListener(this);this.setDocumentEvent();}else{new Effect.Appear($('document_modal'),{duration:0.3,to:this.options.modalOpacity,afterFinish:function(){new Effect.Appear($(this.wrapper),{duration:0.4,afterFinish:function(){if(Object.isFunction(this.callbacks['afterShow']))
{this.callbacks['afterShow'](this);}}.bind(this)});}.bind(this)});}},_hide:function()
{this.visible=false;if(this._tmpEvent!=null)
{Event.stopObserving($(this.wrapper),'mouseout',this._tmpEvent);this._tmpEvent=null;}
if(this.options.modal==false){new Effect.Fade($(this.wrapper),{duration:0.3,afterFinish:function(){if(Object.isFunction(this.callbacks['afterHide']))
{this.callbacks['afterHide'](this);}}.bind(this)});}else{new Effect.Fade($(this.wrapper),{duration:0.3,afterFinish:function(){new Effect.Fade($('document_modal'),{duration:0.2,afterFinish:function(){if(Object.isFunction(this.callbacks['afterHide']))
{this.callbacks['afterHide'](this);}}.bind(this)});}.bind(this)});}},setDocumentEvent:function()
{if(!ipb.vars['is_touch']){Event.observe(document,'click',this.document_event);return;}
Event.observe(document,'touchstart',this.document_event);},handleDocumentClick:function(e)
{Debug.write('document click: '+Event.element(e).id);if(!Event.element(e).descendantOf(this.wrapper)&&(this.options.attach&&(Event.element(e).id!=this.options.attach.target.id)))
{this.hide(e);}},update:function(content,evalScript)
{if(Object.isElement(content)){this.inner.insert({bottom:content});}else{this.inner.update(content);}
if(Object.isUndefined(evalScript)||evalScript!=false){this.inner.innerHTML.evalScripts();}},setUpBalloon:function()
{if(this.options.attach)
{var attach=this.options.attach;if(attach.target&&$(attach.target))
{if(this.options.stem==true)
{this.createStem();}
if(!attach.position){attach.position='auto';}
if(isRTL)
{if(Object.isUndefined(attach.offset)){attach.offset={top:0,right:0};}
if(Object.isUndefined(attach.offset.top)){attach.offset.top=0;}
if(Object.isUndefined(attach.offset.left)){attach.offset.right=0;}else{attach.offset.right=attach.offset.left;}}
else
{if(Object.isUndefined(attach.offset)){attach.offset={top:0,left:0};}
if(Object.isUndefined(attach.offset.top)){attach.offset.top=0;}
if(Object.isUndefined(attach.offset.left)){attach.offset.left=0;}}
if(attach.position=='auto')
{Debug.write("Popup: auto-positioning");var screendims=document.viewport.getDimensions();var screenscroll=document.viewport.getScrollOffsets();var toff=$(attach.target).viewportOffset();var wrapSize=$(this.wrapper).getDimensions();var delta=[0,0];if(Element.getStyle($(attach.target),'position')=='absolute')
{var parent=attach.target.getOffsetParent();delta=parent.viewportOffset();}
if(isRTL)
{toff['right']=screendims.width-(toff[0]-delta[0]);}
else
{toff['left']=toff[0]-delta[0];}
toff['top']=toff[1]-delta[1]+screenscroll.top;var start='top';if(isRTL){var end='right';}else{var end='left';}
if((toff.top-wrapSize.height-attach.offset.top)<(0+screenscroll.top)){var start='bottom';}
if(isRTL)
{if((toff.right+wrapSize.width-attach.offset.right)<(screendims.width-screenscroll.left)){var end='left';}}
else
{if((toff.left+wrapSize.width-attach.offset.left)>(screendims.width-screenscroll.left)){var end='right';}}
finalPos=this.position(start+end,{target:$(attach.target),content:$(this.wrapper),offset:attach.offset});if(this.options.stem==true)
{finalPos=this.positionStem(start+end,finalPos);}}
else
{Debug.write("Popup: manual positioning");finalPos=this.position(attach.position,{target:$(attach.target),content:$(this.wrapper),offset:attach.offset});if(this.options.stem==true)
{finalPos=this.positionStem(attach.position,finalPos);}}
if(!Object.isUndefined(attach.event)){$(attach.target).observe(attach.event,this.show.bindAsEventListener(this));if(attach.event!='click'&&!Object.isUndefined(this.eventPairs[attach.event])){$(attach.target).observe(this.eventPairs[attach.event],this.hide.bindAsEventListener(this));}
$(this.wrapper).observe('mouseover',this.wrapperEvent.bindAsEventListener(this));}}}
if(isRTL)
{Debug.write("Popup: Right: "+finalPos.right+"; Top: "+finalPos.top);$(this.wrapper).setStyle('top: '+finalPos.top+'px; right: '+finalPos.right+'px; position: absolute;');}
else
{Debug.write("Popup: Left: "+finalPos.left+"; Top: "+finalPos.top);$(this.wrapper).setStyle('top: '+finalPos.top+'px; left: '+finalPos.left+'px; position: absolute;');}},wrapperEvent:function(e)
{if(this.timer['hide'])
{clearTimeout(this.timer['hide']);this.timer['hide']=null;if(this.options.attach.event&&this.options.attach.event=='mouseover')
{if(this._tmpEvent==null){this._tmpEvent=this.hide.bindAsEventListener(this);$(this.wrapper).observe('mouseout',this._tmpEvent);}}}},positionStem:function(pos,finalPos)
{var stemSize={height:16,width:31};var wrapStyle={};var stemStyle={};switch(pos.toLowerCase())
{case'topleft':wrapStyle={marginBottom:stemSize.height+'px'};if(isRTL)
{stemStyle={bottom:-(stemSize.height)+'px',right:'5px'};finalPos.right=finalPos.right-15;}
else
{stemStyle={bottom:-(stemSize.height)+'px',left:'5px'};finalPos.left=finalPos.left-15;}
break;case'topright':wrapStyle={marginBottom:stemSize.height+'px'};if(isRTL)
{stemStyle={bottom:-(stemSize.height)+'px',left:'5px'};finalPos.right=finalPos.right+15;}
else
{stemStyle={bottom:-(stemSize.height)+'px',right:'5px'};finalPos.left=finalPos.left+15;}
break;case'bottomleft':wrapStyle={marginTop:stemSize.height+'px'};if(isRTL)
{stemStyle={top:-(stemSize.height)+'px',right:'5px'};finalPos.right=finalPos.right-15;}
else
{stemStyle={top:-(stemSize.height)+'px',left:'5px'};finalPos.left=finalPos.left-15;}
break;case'bottomright':wrapStyle={marginTop:stemSize.height+'px'};if(isRTL)
{stemStyle={top:-(stemSize.height)+'px',left:'5px'};finalPos.right=finalPos.right+15;}
else
{stemStyle={top:-(stemSize.height)+'px',right:'5px'};finalPos.left=finalPos.left+15;}
break;}
$(this.wrapper).setStyle(wrapStyle);$(this.stem).setStyle(stemStyle).setStyle('z-index: 6000').addClassName(pos.toLowerCase());return finalPos;},position:function(pos,v)
{finalPos={};v.target.identify();var toff=$(v.target.id).viewportOffset();var tsize=$(v.target.id).getDimensions();var wrapSize=$(v.content).getDimensions();var screenscroll=document.viewport.getScrollOffsets();var offset=v.offset;var delta=[0,0];if(Element.getStyle($(v.target.id),'position')=='absolute')
{var parent=$(v.target.id).getOffsetParent();delta=parent.viewportOffset();delta=[0,0];}
if(isRTL)
{toff['right']=document.viewport.getDimensions().width-(toff[0]-delta[0]);}
else
{toff['left']=toff[0]-delta[0];}
toff['top']=toff['top']-delta[1]+screenscroll.top;switch(pos.toLowerCase())
{case'topleft':finalPos.top=(toff.top-wrapSize.height-(tsize.height/2))-offset.top;if(isRTL)
{finalPos.right=toff.right+offset.right;}
else
{finalPos.left=toff.left+offset.left;}
break;case'topright':finalPos.top=(toff.top-wrapSize.height-(tsize.height/2))-offset.top;if(isRTL)
{finalPos.right=(toff.right-(wrapSize.width-tsize.width))-offset.right;}
else
{finalPos.left=(toff.left-(wrapSize.width-tsize.width))-offset.left;}
break;case'bottomleft':finalPos.top=(toff.top+tsize.height)+offset.top;if(isRTL)
{finalPos.right=toff.right+offset.right;}
else
{finalPos.left=toff.left+offset.left;}
break;case'bottomright':finalPos.top=(toff.top+tsize.height)+offset.top;if(isRTL)
{finalPos.right=(toff.right-(wrapSize.width-tsize.width))-offset.right;}
else
{finalPos.left=(toff.left-(wrapSize.width-tsize.width))-offset.left;}
break;}
return finalPos;},createStem:function()
{this.stem=new Element('div',{id:this.id+'_stem'}).update(' ').addClassName('stem');this.wrapper.insert({top:this.stem});},setUpPane:function()
{if(!$('document_modal')){this.createDocumentModal();}
this.positionPane();},positionPane:function()
{var elem_s=$(this.wrapper).getDimensions();var window_s=document.viewport.getDimensions();var window_offsets=document.viewport.getScrollOffsets();if(ipb.vars['is_touch']){window_s={width:window.innerWidth,height:window.innerHeight};}
if(isRTL)
{var center={right:((window_s['width']-elem_s['width'])/2),top:(((window_s['height']-elem_s['height'])/2)/2)};if(center.top<10){center.top=10;}
$(this.wrapper).setStyle('top: '+center['top']+'px; right: '+center['right']+'px; position: fixed;');}
else
{var center={left:((window_s['width']-elem_s['width'])/2),top:(((window_s['height']-elem_s['height'])/2)/2)};if(center.top<10){center.top=10;}
$(this.wrapper).setStyle('top: '+center['top']+'px; left: '+center['left']+'px; position: fixed;');}},createDocumentModal:function()
{var pageLayout=$(document.body).getLayout();var pageSize={width:pageLayout.get('width'),height:pageLayout.get('margin-box-height')};var viewSize=document.viewport.getDimensions();var dims=[];Debug.dir(pageSize);Debug.dir(viewSize);if(viewSize['height']";ipb.lang['ckeditor__gencontent']="Content";ipb.lang['ckeditor__general']="General";ipb.lang['ckeditor__genoption']="Option";ipb.lang['ckeditor__georgiannumb']="Georgian numbering (an, ban, gan, etc.)";ipb.lang['ckeditor__heading']="Heading";ipb.lang['ckeditor__height']="Height";ipb.lang['ckeditor__height_nan']="Height must be a number.";ipb.lang['ckeditor__hiddenfield']="Hidden Field";ipb.lang['ckeditor__hiddenfield']="Hidden Field";ipb.lang['ckeditor__highlight']="Highlight";ipb.lang['ckeditor__hr']="Insert Horizontal Line";ipb.lang['ckeditor__hspace']="HSpace";ipb.lang['ckeditor__hspace_nan']="HSpace must be a whole number.";ipb.lang['ckeditor__id']="Id";ipb.lang['ckeditor__iframe']="iFrame";ipb.lang['ckeditor__iframeborder']="Show frame border";ipb.lang['ckeditor__iframeprops']="iFrame Properties";ipb.lang['ckeditor__iframescroll']="Enable scrollbars";ipb.lang['ckeditor__iframeurl']="Please type the iFrame URL";ipb.lang['ckeditor__ignore']="Ignore";ipb.lang['ckeditor__ignoreallcaps']="Ignore All-Caps Words";ipb.lang['ckeditor__ignoredomains']="Ignore Domain Names";ipb.lang['ckeditor__ignoremixedc']="Ignore Words with Mixed Case";ipb.lang['ckeditor__ignorewnumber']="Ignore Words with Numbers";ipb.lang['ckeditor__ignore_all']="Ignore All";ipb.lang['ckeditor__image']="Image";ipb.lang['ckeditor__imagebutton']="Image Button";ipb.lang['ckeditor__imagebutton_p']="Image Button Properties";ipb.lang['ckeditor__imagetobutton']="Do you want to transform the selected image to a image button?";ipb.lang['ckeditor__image_info']="Image Info";ipb.lang['ckeditor__image_prop']="Image Properties";ipb.lang['ckeditor__image_url']="Please type the image URL";ipb.lang['ckeditor__inc_indent']="Increase Indent";ipb.lang['ckeditor__inlinestyle']="Inline Style";ipb.lang['ckeditor__inline_styles']="Inline Styles";ipb.lang['ckeditor__insdelbullist']="Insert/Remove Bulleted List";ipb.lang['ckeditor__insdelnumlist']="Insert/Remove Numbered List";ipb.lang['ckeditor__insertsmilie']="Insert a Smiley";ipb.lang['ckeditor__insertspecial']="Insert Special Character";ipb.lang['ckeditor__italic']="Italic";ipb.lang['ckeditor__justify']="Justify";ipb.lang['ckeditor__langcode']="Language Code";ipb.lang['ckeditor__languagedir']="Language Direction";ipb.lang['ckeditor__languages']="Languages";ipb.lang['ckeditor__left']="Left";ipb.lang['ckeditor__licvisitsite']="For licensing information please visit our web site:";ipb.lang['ckeditor__link']="Link";ipb.lang['ckeditor__linked_char']="Linked Resource Charset";ipb.lang['ckeditor__linkother']="";ipb.lang['ckeditor__link_info']="Link Info";ipb.lang['ckeditor__link_type']="Link Type";ipb.lang['ckeditor__list_nan']="List start number must be a whole number.";ipb.lang['ckeditor__lock_ratio']="Lock Ratio";ipb.lang['ckeditor__longdescurl']="Long Description URL";ipb.lang['ckeditor__loweralpha']="Lower Alpha (a, b, c, d, e, etc.)";ipb.lang['ckeditor__lowergreek']="Lower Greek (alpha, beta, gamma, etc.)";ipb.lang['ckeditor__lowerroman']="Lower Roman (i, ii, iii, iv, v, etc.)";ipb.lang['ckeditor__ltrlang']="Left to Right (LTR)";ipb.lang['ckeditor__match_case']="Match case";ipb.lang['ckeditor__match_cyclic']="Match cyclic";ipb.lang['ckeditor__match_word']="Match whole word";ipb.lang['ckeditor__maximize']="Maximize";ipb.lang['ckeditor__middle']="Middle";ipb.lang['ckeditor__minimize']="Minimize";ipb.lang['ckeditor__missingimgurl']="Image source URL is missing.";ipb.lang['ckeditor__moresuggs']="More suggestions";ipb.lang['ckeditor__more_colors']="More Colors...";ipb.lang['ckeditor__mymedia']="My Media";ipb.lang['ckeditor__name']="Name";ipb.lang['ckeditor__nan']="This value is not a number.";ipb.lang['ckeditor__newpage']="New Page";ipb.lang['ckeditor__noanchorsa']="(No anchors available in the document)";ipb.lang['ckeditor__nocleanword']="It was not possible to clean up the pasted data due to an internal error";ipb.lang['ckeditor__none']="None";ipb.lang['ckeditor__nooperalol']="Not supported by Opera";ipb.lang['ckeditor__normal']="Normal";ipb.lang['ckeditor__normal_div']="Normal (DIV)";ipb.lang['ckeditor__notemplates']="(No templates defined)";ipb.lang['ckeditor__notset']="";ipb.lang['ckeditor__numberedlist']="Numbered List Properties";ipb.lang['ckeditor__object_styles']="Object Styles";ipb.lang['ckeditor__ok']="OK";ipb.lang['ckeditor__options']="Options";ipb.lang['ckeditor__para_format']="Paragraph Format";ipb.lang['ckeditor__paste']="Paste";ipb.lang['ckeditor__paste_area']="Paste Area";ipb.lang['ckeditor__paste_box']="Please paste inside the following box using the keyboard (Ctrl/Cmd+V) and hit OK";ipb.lang['ckeditor__paste_err1']="Your browser security settings don\\'t permit the editor to automatically execute cutting operations. Please use the keyboard for that (Ctrl/Cmd+X).";ipb.lang['ckeditor__paste_err2']="Your browser security settings don\\'t permit the editor to automatically execute copying operations. Please use the keyboard for that (Ctrl/Cmd+C).";ipb.lang['ckeditor__paste_err3']="Because of your browser security settings, the editor is not able to access your clipboard data directly. You are required to paste it again in this window.";ipb.lang['ckeditor__paste_ptext']="Paste as Plain Text";ipb.lang['ckeditor__paste_word']="Paste from Word";ipb.lang['ckeditor__pb']="Insert Page Break for Printing";ipb.lang['ckeditor__pba']="Page Break";ipb.lang['ckeditor__popupdepend']="Dependent (Netscape)";ipb.lang['ckeditor__popupfeat']="Popup Window Features";ipb.lang['ckeditor__popupfullscr']="Full Screen (IE)";ipb.lang['ckeditor__popupleftpos']="Left Position";ipb.lang['ckeditor__popuplink']="";ipb.lang['ckeditor__popuplocation']="Location Bar";ipb.lang['ckeditor__popupmenubar']="Menu Bar";ipb.lang['ckeditor__popupresize']="Resizable";ipb.lang['ckeditor__popupscroll']="Scroll Bars";ipb.lang['ckeditor__popupstatusba']="Status Bar";ipb.lang['ckeditor__popuptoolbar']="Toolbar";ipb.lang['ckeditor__popuptoppos']="Top Position";ipb.lang['ckeditor__popupwinname']="Popup Window Name";ipb.lang['ckeditor__preview']="Preview";ipb.lang['ckeditor__preview']="Preview";ipb.lang['ckeditor__print']="Print";ipb.lang['ckeditor__properties']="Properties";ipb.lang['ckeditor__protocol']="Protocol";ipb.lang['ckeditor__pselectbbcode']="Please select";ipb.lang['ckeditor__quotelabel']="Quote";ipb.lang['ckeditor__radiobutton']="Radio Button";ipb.lang['ckeditor__redo']="Redo";ipb.lang['ckeditor__removeformat']="Remove Format";ipb.lang['ckeditor__remove_div']="Remove Div";ipb.lang['ckeditor__rename']="Rename";ipb.lang['ckeditor__repactconts']="Replace actual contents";ipb.lang['ckeditor__replace']="Replace";ipb.lang['ckeditor__replace_all']="Replace All";ipb.lang['ckeditor__replace_cnt']="%1 occurrence(s) replaced.";ipb.lang['ckeditor__replace_with']="Replace with:";ipb.lang['ckeditor__reset_size']="Reset Size";ipb.lang['ckeditor__restore']="Restore";ipb.lang['ckeditor__right']="Right";ipb.lang['ckeditor__rtllang']="Right to Left (RTL)";ipb.lang['ckeditor__save']="Save";ipb.lang['ckeditor__scayt']="Spell Check As You Type";ipb.lang['ckeditor__selectall']="Select All";ipb.lang['ckeditor__selectanchor']="Select an Anchor";ipb.lang['ckeditor__selectcolor']="Select color";ipb.lang['ckeditor__selectedcolor']="Selected Color";ipb.lang['ckeditor__selectfield']="Selection Field";ipb.lang['ckeditor__selectspecial']="Select Special Character";ipb.lang['ckeditor__server_send']="Send it to the Server";ipb.lang['ckeditor__show_blocks']="Show Blocks";ipb.lang['ckeditor__size']="Size";ipb.lang['ckeditor__smiley']="Smiley";ipb.lang['ckeditor__smileyopts']="Smiley Options";ipb.lang['ckeditor__source']="BBCode Mode";ipb.lang['ckeditor__speccharopts']="Special Character Options";ipb.lang['ckeditor__square']="Square";ipb.lang['ckeditor__start']="Start";ipb.lang['ckeditor__strike']="Strike Through";ipb.lang['ckeditor__style']="Style";ipb.lang['ckeditor__styles']="Styles";ipb.lang['ckeditor__subscript']="Subscript";ipb.lang['ckeditor__superscript']="Superscript";ipb.lang['ckeditor__tab_index']="Tab Index";ipb.lang['ckeditor__target']="Target";ipb.lang['ckeditor__targframename']="Target Frame Name";ipb.lang['ckeditor__templateopts']="Template Options";ipb.lang['ckeditor__templates']="Templates";ipb.lang['ckeditor__textarea']="Textarea";ipb.lang['ckeditor__textfield']="Text Field";ipb.lang['ckeditor__text_color']="Text Color";ipb.lang['ckeditor__text_notfound']="The specified text was not found.";ipb.lang['ckeditor__tnewwindow']="New Window (_blank)";ipb.lang['ckeditor__togglelabel']="Toggle editing mode";ipb.lang['ckeditor__togglescayt']="Toggle SCAYT";ipb.lang['ckeditor__toolbar']="Toolbar";ipb.lang['ckeditor__top']="Top";ipb.lang['ckeditor__tparentwindow']="Parent Window (_parent)";ipb.lang['ckeditor__tsamewindow']="Same Window (_self)";ipb.lang['ckeditor__ttopwindow']="Topmost Window (_top)";ipb.lang['ckeditor__type']="Type";ipb.lang['ckeditor__typeanchor']="Please type the anchor name";ipb.lang['ckeditor__type_email']="Please type the e-mail address";ipb.lang['ckeditor__type_url']="Please type the link URL";ipb.lang['ckeditor__unavailable']="unavailable";ipb.lang['ckeditor__underline']="Underline";ipb.lang['ckeditor__undo']="Undo";ipb.lang['ckeditor__unknownobj']="Unknown Object";ipb.lang['ckeditor__unlink']="Unlink";ipb.lang['ckeditor__unlock_ratio']="Unlock Ratio";ipb.lang['ckeditor__upload']="Upload";ipb.lang['ckeditor__upperalpha']="Upper Alpha (A, B, C, D, E, etc.)";ipb.lang['ckeditor__upperroman']="Upper Roman (I, II, III, IV, V, etc.)";ipb.lang['ckeditor__url']="URL";ipb.lang['ckeditor__value']="Value";ipb.lang['ckeditor__vspace']="VSpace";ipb.lang['ckeditor__vspace_nan']="VSpace must be a whole number.";ipb.lang['ckeditor__whichtempl']="Please select the template to open in the editor";ipb.lang['ckeditor__width']="Width";ipb.lang['ckeditor__width_nan']="Width must be a number.";ipb.lang['ckeditor__xelements']="%1 element";ipb.lang['ck_auto_saved']="Last auto saved: #{time}";ipb.lang['ck_restore']="Restore Content";ipb.lang['ck_saved']="Saved Content";ipb.lang['ck_saved_desc']="As you type, the text editor content is automatically saved so that if you had to reload this page you can restore what you've written so far.";ipb.lang['ck_saved_title']="About Saved Content";ipb.lang['ck_view_saved']="View Auto Saved Content (#{updatedDate})";ipb.lang['clear_markboard']="Are you sure you want to mark all content as read?";ipb.lang['click_to_attach']="Choose Files...";ipb.lang['click_to_show_opts']="Click to configure post options";ipb.lang['close_tpreview']="Close preview";ipb.lang['comment_requires_approval']="Your comment requires moderator approval before it will be shown.";ipb.lang['confirm_delete']="Are you sure you want to delete this folder? ALL messages in it will be deleted. This cannot be undone!";ipb.lang['confirm_empty']="Are you sure you want to empty this folder?";ipb.lang['copy_topic_link']="Copy the permalink below to store the direct address to this post in your clipboard";ipb.lang['cpt_approve']="Approve";ipb.lang['cpt_approve_f']="Approve";ipb.lang['cpt_close_f']="Lock";ipb.lang['cpt_delete']="Delete";ipb.lang['cpt_delete_f']="Delete";ipb.lang['cpt_hide']="Hide";ipb.lang['cpt_hide_f']="Hide";ipb.lang['cpt_merge']="Merge";ipb.lang['cpt_merge_f']="Merge";ipb.lang['cpt_move']="Move";ipb.lang['cpt_move_f']="Move";ipb.lang['cpt_open_f']="Unlock";ipb.lang['cpt_pin_f']="Pin";ipb.lang['cpt_split']="Split";ipb.lang['cpt_undelete']="Unhide";ipb.lang['cpt_unhide_f']="Unhide";ipb.lang['cpt_unpin_f']="Unpin";ipb.lang['date_am']="AM";ipb.lang['date_pm']="PM";ipb.lang['delete_confirm']="Are you sure you want to continue?";ipb.lang['delete_pm_confirm']="Are you sure you wish to permanently delete this conversation?";ipb.lang['delete_pm_many_confirm']="Are you sure you wish to delete these conversations?";ipb.lang['delete_post_confirm']="Are you sure you want to delete this post?";ipb.lang['delete_reply_confirm']="Are you sure you want to delete this reply?";ipb.lang['delete_topic_confirm']="Are you sure you want to delete this topic?";ipb.lang['editor_enter_list']="Enter list item (or hit Cancel to finish list)";ipb.lang['editor_prefs_updated']="Options saved. Changes will take affect from the next editor load";ipb.lang['email_banned']="✗ This email address has been banned";ipb.lang['email_doesnt_match']="✗ The addresses you entered don't match";ipb.lang['email_in_use']="✗ This email address is in use";ipb.lang['emo_show_all']="Show All";ipb.lang['enter_unlimited_names']="Enter names";ipb.lang['enter_x_names']="Enter up to [x] names";ipb.lang['error']="Error";ipb.lang['error_occured']="An error occurred";ipb.lang['error_security']="Security Error";ipb.lang['fail_cblock']="Failed to save content block changes";ipb.lang['fail_config']="Failed to save configuration";ipb.lang['folder_emptied']="Folder emptied successfully";ipb.lang['folder_not_found']="Cannot find that folder";ipb.lang['folder_protected']="Cannot perform that action on a protected folder";ipb.lang['follow_action_saved']="Your preferences have been saved";ipb.lang['follow_no_action']="You did not select any action to perform";ipb.lang['friend_already']="This member is already on your friends list";ipb.lang['from']="From";ipb.lang['gallery_rotate_failed']="There was an error rotating the image";ipb.lang['gbl_confirm_cancel']="Cancel";ipb.lang['gbl_confirm_desc']="Please confirm this action";ipb.lang['gbl_confirm_ok']="OK";ipb.lang['gbl_confirm_text']="Confirm";ipb.lang['gbl_months']="Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sept,Oct,Nov,Dec";ipb.lang['global_leave_msg']="Leave a message...";ipb.lang['global_status_update']="What's on your mind?";ipb.lang['go_to_category']="Go to this category";ipb.lang['hide']="×";ipb.lang['idm_comment_empty']="Comment is empty";ipb.lang['idm_invalid_file']="Invalid File";ipb.lang['idm_msg_email']="You did not enter an email address to send the email to";ipb.lang['idm_msg_text']="You did not enter any text to email to the user";ipb.lang['invalid_chars']="✗ This field contains invalid characters";ipb.lang['invalid_email']="✗ This isn't a valid address";ipb.lang['invalid_folder_name']="The folder name is invalid";ipb.lang['invalid_mime_type']="You aren't permitted to upload this kind of file";ipb.lang['is_required']="✗ This field is required";ipb.lang['is_spammer']="This account has been flagged as a spam account";ipb.lang['js_rte_erroriespell']="ieSpell was not detected. Click OK to go to the download page.";ipb.lang['js_rte_errorloadingiespell']="Error loading ieSpell. Exception: ";ipb.lang['justgo']="Go";ipb.lang['loading']="Loading...";ipb.lang['mark_read_forum']="There was a problem fetching this forum.";ipb.lang['mark_read_topic']="There was a problem fetching this topic.";ipb.lang['max_notes_reached']="You cannot add any more notes to this image, because you have reached the maximum number allowed";ipb.lang['member_no_exist']="Message Sent";ipb.lang['member_no_exist']="That member does not exist!";ipb.lang['message_sent']="Your message has been sent";ipb.lang['messenger_cancel']="Cancel";ipb.lang['messenger_edit']="Edit";ipb.lang['missing_data']="Missing data!";ipb.lang['mq_reply_swap']="Reply to #{num} quoted post(s)";ipb.lang['must_enter_name']="You must enter a name";ipb.lang['new_lowercase']="new";ipb.lang['note_confirm_delete']="Are you sure you want to delete this note?";ipb.lang['note_no_permission_a']="You do not have permission to add notes to this image";ipb.lang['note_no_permission_d']="You don't have permission to delete notes";ipb.lang['note_no_permission_e']="You do not have permission to edit this note";ipb.lang['note_save_empty']="Your note cannot be empty; click the Delete link for this note if you do not wish to keep it";ipb.lang['not_available']="✗ This name is taken!";ipb.lang['no_more_topics']="No more topics";ipb.lang['no_permission']="You do not have permission for this action";ipb.lang['no_permission_preview']="Sorry, you don't have permission to preview this topic.";ipb.lang['open_tpreview']="Preview this topic";ipb.lang['option_is_empty']="This tag's option cannot be left empty!";ipb.lang['out_of_diskspace']="You have run out of space for uploads";ipb.lang['pass_doesnt_match']="✗ The passwords you entered don't match";ipb.lang['pass_too_long']="✗ Your password is too long (max. 32 characters)";ipb.lang['pass_too_short']="✗ Your password is too short (min. 3 characters)";ipb.lang['pending']="Pending";ipb.lang['photo_editor_cropping_still']="Please finish cropping before clicking 'Done'";ipb.lang['photo_editor_enterurl']="Enter a url here";ipb.lang['poll_not_enough_choices']="One or more of your questions doesn't contain enough choices. Each question must contain at least 2 choices!";ipb.lang['poll_no_more_choices']="You cannot add any more choices to this question";ipb.lang['poll_no_more_q']="You cannot add any more questions to this poll!";ipb.lang['poll_questions_missing']="One or more of your questions doesn't have a valid title";ipb.lang['poll_stats']="You may add [q] more question(s), with [c] choices per question";ipb.lang['post_empty']="Your post is empty";ipb.lang['post_empty_post']="Sorry, you can't submit a blank post. Please enter some text in the editor box";ipb.lang['post_empty_title']="You must enter a topic title!";ipb.lang['post_empty_username']="You must enter a username";ipb.lang['post_hide_reason_default']="Enter a reason...";ipb.lang['post_too_short']="Your post is too short";ipb.lang['prof_comment_empty']="You must enter a comment";ipb.lang['prof_comment_mod']="Your comment was added, but requires approval before it will be displayed";ipb.lang['prof_comment_perm']="You do not have permission to post comments on this profile";ipb.lang['prof_update_button']="Update";ipb.lang['prof_update_default']="What's on your mind?";ipb.lang['prof_update_tooltip']="Update my status";ipb.lang['quickpm_enter_subject']="Please enter a subject";ipb.lang['quickpm_msg_blank']="Your message is blank";ipb.lang['quote_expand']="Click to view";ipb.lang['quote_on']="on";ipb.lang['quote_said']="said";ipb.lang['quote_title']="Quote";ipb.lang['quote__author']="#name# said";ipb.lang['quote__date_author']="#name#, on #date#, said:";ipb.lang['reached_max_folders']="You have reached the maximum number of allowed folders";ipb.lang['required_data_missing']="Some required data was missing";ipb.lang['rtg_already']="You've already rated this entry";ipb.lang['rtg_awesome']="Awesome!";ipb.lang['rtg_good']="Good";ipb.lang['rtg_nbad']="Not Bad";ipb.lang['rtg_ok']="Okay";ipb.lang['rtg_poor']="Poor";ipb.lang['rtg_topic_locked']="This topic is locked";ipb.lang['save_folder']=">";ipb.lang['saving_post']="Saving post...";ipb.lang['search_default_value']="Search...";ipb.lang['set_as_spammer']="Are you sure you want to flag this user as a spam account?";ipb.lang['signin_badopenid']="Supplied OpenID url is invalid";ipb.lang['signin_nopassword']="No password entered";ipb.lang['signin_nosigninname']="No sign in name entered";ipb.lang['silly_server']="The server returned an error during upload";ipb.lang['spoiler_hide']="Hide";ipb.lang['spoiler_show']="Show";ipb.lang['status_updated']="Your status has been updated";ipb.lang['success']="Success";ipb.lang['switch_to_advanced']="Try our advanced uploader which supports multiple file uploading (modern browser required)";ipb.lang['too_long']="✗ The name you entered is too long";ipb.lang['too_short']="✗ The name you entered is too short";ipb.lang['topic_polling']="#{count} new replies added. Show me";ipb.lang['trouble_uploading']="Trouble uploading?";ipb.lang['unapprove']="Unapprove";ipb.lang['unapproved']="Unapproved";ipb.lang['unhide']="...";ipb.lang['uploading']="Uploading...";ipb.lang['upload_done']="Done (uploaded [total])";ipb.lang['upload_failed']="This upload failed";ipb.lang['upload_limit_hit']="Upload limit exceeded";ipb.lang['upload_no_file']="No file was selected for upload";ipb.lang['upload_progress']="Uploaded [done] of [total]";ipb.lang['upload_queue']="You have attempted to queue too many files. The number of files you can queue is:";ipb.lang['upload_skipped']="Upload Skipped";ipb.lang['upload_too_big']="This file was too big to upload";ipb.lang['usercp_photo_upload']="You have not selected a file to upload";ipb.lang['vote_success']="Vote saved!";ipb.lang['vote_updated']="Vote updated!";ipb.lang['with_selected']="With Selected ({num})";;IPBoard.prototype.hoverCardRegister={mainStore:$H(),initialize:function(key,options)
{var store=$H();if(!ipb.hoverCardRegister.mainStore.get(key))
{ipb.hoverCardRegister.mainStore.set(key,options);}
$$('._hovertrigger').each(function(elem)
{try
{_key=$(elem).readAttribute("hovercard-ref");if(key==_key)
{$(elem).addClassName('___hover___'+key);store.set('key',key);$(elem).removeClassName('_hovertrigger');$(elem).addClassName('_hoversetup');}}
catch(err)
{Debug.error(err);}});store.each(function(elem)
{new ipb.hoverCard('___hover___'+elem.value,options);});},postAjaxInit:function()
{ipb.hoverCardRegister.mainStore.each(function(elem)
{ipb.hoverCardRegister.initialize(elem.key,elem.value);});}};IPBoard.prototype.hoverCard=Class.create({initialize:function(className,options)
{this.id=className;this.timer={},this.card=false,this.ajaxCache={},this.popupActive={},this.openId=false;this.curEvent=false;this.options=Object.extend({type:'balloon',position:'bottomLeft',w:'500px',openOnClick:false,openOnHover:true,ajaxUrl:false,delay:800,ajaxCacheExpire:0,black:false,getId:false,setIdParam:'id',callback:false},arguments[1]);this.init();},init:function()
{this.debugWrite("hoverCard.init()");var _hc=this;document.observe('mousemove',_hc.mMove.bindAsEventListener(_hc));$$('.'+this.id).each(function(elem)
{elem.identify();try
{Event.stopObserving($(elem.id),'mouseout');Event.stopObserving($(elem.id),'mouseover');$(elem.id).writeAttribute('title','');if($(elem.id).down('a'))
{$(elem.id).down('a').writeAttribute('title','');}
if($(elem.id).down('img'))
{$(elem.id).down('img').writeAttribute('title','');$(elem.id).down('img').writeAttribute('alt','');}}
catch(aBall){}
$(elem.id).observe('contextmenu',_hc.mContext.bindAsEventListener(_hc,elem.id));$(elem.id).observe('click',_hc.mClick.bindAsEventListener(_hc,elem.id));$(elem.id).observe('mouseover',_hc.mOver.bindAsEventListener(_hc,elem.id));$(elem.id).observe('mouseout',_hc.mOut.bindAsEventListener(_hc,elem.id));});},mMove:function(e)
{var _newEvent={};for(var i in e){_newEvent[i]=e[i];}
this.curEvent=_newEvent;},mClick:function(e,id)
{if(!this.options.openOnClick)
{this.close(id);}
else
{if($(id).tagName.toLowerCase()=='input'&&$(id).type.toLowerCase()=='checkbox')
{if($(id).checked!==true)
{return true;}}
this.show(id);}},mContext:function(e,id)
{this.close(id);},mOver:function(e,id)
{Event.stop(e);if(this.overPopUp(id)===true)
{return false;}
if(this.options.openOnHover!==true)
{return false;}
this.debugWrite("mover - setting time OVER "+id);if(!Object.isUndefined(this.timer[id+'_out']))
{clearTimeout(this.timer[id+'_out']);}
this.timer[id+'_over']=setTimeout(this.show.bind(this,id),this.options.delay);},mOut:function(e,id)
{Event.stop(e);if(this.overPopUp(id)===true)
{return false;}
Event.stopObserving($(id),'mouseover');$(id).observe('mouseover',this.mOver.bindAsEventListener(this,id));if(!Object.isUndefined(this.timer[id+'_over']))
{clearTimeout(this.timer[id+'_over']);}
this.debugWrite("Mout - setting time OUT "+id);this.timer[id+'_out']=setTimeout(this.close.bind(this,id),800);},show:function(id)
{var popup='pu__'+this.id+'_popup';if(!Object.isUndefined(this.timer[id+'_out']))
{clearTimeout(this.timer[id+'_out']);}
if(!Object.isUndefined(this.card)&&this.card!==false)
{this.card.kill();this.card=false;}
if($(popup))
{$(popup).remove();}
this.openId=id;var content=false;if(this.options.ajaxUrl)
{content="";}
else
{if(Object.isFunction(this.options.callback))
{content=this.options.callback(this,id);if(content===false)
{return false;}}
else
{Debug.error("No AJAX or Callback specified. Whaddayagonnado?!");}}
this.card=new ipb.Popup('pu__'+this.id,{type:'balloon',initial:content,stem:true,hideAtStart:false,hideClose:true,defer:false,black:this.options.black,attach:{target:$(id),position:this.options.position},w:this.options.w});Event.stopObserving($(id),'mouseout');Event.stopObserving($(id),'contextmenu');Event.stopObserving($(id),'click');$(id).observe('mouseout',this.mOut.bindAsEventListener(this,id));$(id).observe('contextmenu',this.mContext.bindAsEventListener(this,id));$(id).observe('click',this.mClick.bindAsEventListener(this,id));if(this.options.ajaxUrl)
{this.ajax(id);}},close:function(id)
{if(this.overPopUp(id)===true)
{return false;}
this.debugWrite("Close: "+id);if(!Object.isUndefined(this.timer[id+'_out']))
{this.debugWrite("-- Clearing: "+id+'_out');clearTimeout(this.timer[id+'_out']);}
if(!Object.isUndefined(this.timer[id+'_over']))
{this.debugWrite("-- Clearing: "+id+'_over');clearTimeout(this.timer[id+'_over']);}
if(!Object.isUndefined(this.card)&&this.card!==false&&id==this.openId)
{this.card.hide();this.card=false;this.openId=false;}},ajax:function(id)
{var now=this.unixtime();var url=this.options.ajaxUrl;var bDims={};var aDims={};var popup='pu__'+this.id+'_popup';bDims['height']=$(popup).getHeight();bDims['top']=parseInt($(popup).style.top);if(!Object.isUndefined(this.ajaxCache[id]))
{if(this.options.AjaxCacheExpire)
{if(now-parseInt(this.options.AjaxCacheExpire)/g,'>');$(form).insert(post).insert(subject).setStyle('position: absolute; left: -500px; top: 0');$(post).update(val);$$('body')[0].insert(form);$(form).submit();},doSend:function(e)
{Debug.write("Sending");if(!ipb.quickpm.sendingToUser){return;}
Event.stop(e);if($F('pm_subject_'+ipb.quickpm.sendingToUser).blank())
{ipb.quickpm.showError(ipb.lang['quickpm_enter_subject']);return;}
if($F('pm_textarea_'+ipb.quickpm.sendingToUser).blank())
{ipb.quickpm.showError(ipb.lang['quickpm_msg_blank']);return;}
var popup=ipb.quickpm.popupObj;if($(popup.getObj()).select('.input_submit')[0]){$(popup.getObj()).select('.input_submit')[0].disabled=true;};new Ajax.Request(ipb.vars['base_url']+'&app=members&module=ajax&secure_key='+ipb.vars['secure_hash']+'§ion=messenger&do=PMSend&toMemberID='+ipb.quickpm.sendingToUser,{method:'post',parameters:{'Post':$F('pm_textarea_'+ipb.quickpm.sendingToUser).encodeParam(),'std_used':1,'toMemberID':ipb.quickpm.sendingToUser,'subject':$F('pm_subject_'+ipb.quickpm.sendingToUser).encodeParam()},evalJSON:'force',onSuccess:function(t)
{if(Object.isUndefined(t.responseJSON)){alert(ipb.lang['action_failed']);}
if(t.responseJSON['error'])
{popup.hide();ipb.quickpm.sendingToUser=0;Event.stop(e);switch(t.responseJSON['error'])
{case'cannotUsePMSystem':case'nopermission':alert(ipb.lang['no_permission']);break;default:alert(t.responseJSON['error']);break;}}
else if(t.responseJSON['inlineError'])
{ipb.quickpm.showError(t.responseJSON['inlineError']);if($(popup.getObj()).select('.input_submit')[0]){$(popup.getObj()).select('.input_submit')[0].disabled=false;};return;}
else if(t.responseJSON['status'])
{popup.hide();ipb.quickpm.sendingToUser=0;Event.stop(e);ipb.global.showInlineNotification(ipb.lang['message_sent']);return;}
else
{Debug.dir(t.responseJSON);}}});},showError:function(msg)
{if(!ipb.quickpm.sendingToUser||!$('pm_error_'+ipb.quickpm.sendingToUser)){return;}
$('pm_error_'+ipb.quickpm.sendingToUser).select('.message')[0].update(msg);if(!$('pm_error_'+ipb.quickpm.sendingToUser).visible())
{new Effect.BlindDown($('pm_error_'+ipb.quickpm.sendingToUser),{duration:0.3});}
else
{}
return;}};ipb.quickpm.init();;var IPS_BBCODE_POPUP=null;var IPS_URL_STORE={};var IPS_SIZE_ARRAY={1:8,2:10,3:12,4:14,5:18,6:24,7:36,8:48};var ipsBbcodeTags={};var disabledTags=[];if(!Array.prototype.indexOf)
{Array.prototype.indexOf=function(elt)
{var len=this.length>>>0;var from=Number(arguments[1])||0;from=(from<0)?Math.ceil(from):Math.floor(from);if(from<0)
from+=len;for(;from0)
out.push(',\n');this.toJsonStringArray(arg[i],out);this.path.pop();}
out.push(']');return out;}else if(typeof arg.toString!='undefined'){out.push('{');var first=true;for(var i in arg){if(!this.includeProtos&&arg[i]===arg.constructor.prototype[i]){continue};this.path.push(i);var curr=out.length;if(!first)
out.push(this.compactOutput?',':',\n');this.toJsonStringArray(i,out);out.push(':');this.toJsonStringArray(arg[i],out);if(out[out.length-1]==u)
out.splice(curr,out.length-curr);else
first=false;this.path.pop();}
out.push('}');return out;}
return out;}
out.push('null');return out;case'unknown':case'undefined':case'function':if(!this.includeFunctions){out.push(u);return out};arg="JSONincludedFunc:"+arg;out.push('"');var a=['\n','\\n','\r','\\r','"','\\"'];arg+="";for(var i=0;i<6;i+=2){arg=arg.split(a[i]).join(a[i+1])};out.push(arg);out.push('"');return out;case'string':if(this.restore&&arg.indexOf("JSONcircRef:")==0){this.restoreCode.push('this.myObj.'+this.path.join(".")
+"="
+arg.split("JSONcircRef:").join("this.myObj."));};out.push('"');var a=['\n','\\n','\r','\\r','"','\\"'];arg+="";for(var i=0;i<6;i+=2){arg=arg.split(a[i]).join(a[i+1])};out.push(arg);out.push('"');return out;default:out.push(String(arg));return out;}}},isInArray:function(arr,token){for(var i=0;i(this.offset)){if(this.tagStack.length==0){this.tree.push(this.text.substring(this.offset,result.start));}else{this.tagStack[this.tagStack.length-1].children.push(this.text.substring(this.offset,result.start));}}
if(result.data.type=="start"){if(BBCodeUtils.isInArray(this.options.tagsSingle,result.data.tag)){if(this.tagStack.length==0){this.tree.push(result);}else{this.tagStack[this.tagStack.length-1].children.push(result);}}else{this.tagStack.push(result);}}else
if(this.tagStack.length>0){if(result.data.tag==this.tagStack[this.tagStack.length-1].data.tag){if(this.tagStack.length==1){this.tree.push(this.tagStack.pop());}else{this.tagStack[this.tagStack.length-2].children.push(this.tagStack.pop());}}else if(BBCodeUtils.filterArray(this.tagStack,function(el){return el.data.tag==this.data.tag;},result)){while(result.data.tag!==this.tagStack[this.tagStack.length-1].data.tag){if(this.tagStack.length-2>0)
{this.tagStack[this.tagStack.length-2].children.push(this.tagStack.pop());}
else
{break;}}
if(this.tagStack.length==1){this.tree.push(this.tagStack.pop());}else{this.tagStack[this.tagStack.length-2].children.push(this.tagStack.pop());}}else{}}else{}
this.offset=result.end;result=this.locateTagAfter(this.offset);}
if(this.offset0){if(this.tagStack.length==1){this.tree.push(this.tagStack.pop());}else{this.tagStack[this.tagStack.length-2].children.push(this.tagStack.pop());}}},locateTagAfter:function(offset){var foundAt=-2;while(foundAt==-2&&offset<=this.text.length){foundAt=this.text.substr(offset).indexOf(this.options.openSymbol);if(foundAt==-1){return false;}
var endAt=this.text.substr(offset+foundAt+1).indexOf(this.options.closeSymbol);if(this.text.substr(offset+foundAt+1).indexOf(this.options.openSymbol)=0)
{offset=offset+foundAt+1;foundAt=-2;}
else
{var tagName=this.text.substr(offset+foundAt+1,endAt);var ok=true;var test='';if(match=tagName.match(/^(?:\/)?(\S+?)(\s|=|$)/i))
{test=match[1].toLowerCase();}
if((ipsBbcodeTags.indexOf(test)==-1&&IPS_DEFAULT_TAGS.indexOf(test)==-1)||disabledTags.indexOf(test)!=-1)
{ok=false;offset=offset+foundAt+1;foundAt=-2;}
else if(tagName.substr(0,1)!="/"&&(tagName.match(/\s/)&&!tagName.match(/=/)))
{ok=false;offset=offset+foundAt+1;foundAt=-2;}
if(ok==true)
{return{data:this.tagToObject(tagName),start:(offset+foundAt),end:(offset+foundAt+endAt+2),children:[]};}}}
return false;},tagToObject:function(tag){var type='';if(tag.substr(0,1)=="/"){type="end";tag=tag.substr(1);}else{type="start";}
var hasEqual=false;parts=tag.match(/([^\s=]+(=("[^"]+"|'[^']+'|[^\s]+))?)/gi);var params={};if(parts==null||parts.length==0)
{return{tag:null,params:params,type:type,hasEqual:false,children:[]};}
if(parts[0].indexOf("=")>0)
{tag=parts[0].split("=")[0];}
else
{tag=parts[0];}
for(var i=0;i0)
{var value=parts[i].split("=").slice(1).join("=");hasEqual=true;if(value[0]=="\""&&value[value.length-1]=="\"")
{value=value.substring(1,value.length-1);}
else if(value[0]=="'"&&value[value.length-1]=="'")
{value=value.substring(1,value.length-1);}
key=parts[i].split("=")[0];if(key&&value)
{params[key.toLowerCase()]=value;}}
else
{if(tag=='font')
{params[tag]+=' '+parts[i];}
else
{params['__x'+i]=parts[i];}}}
return{tag:tag,params:params,type:type,hasEqual:hasEqual,children:[]};}};var BBCode=function(options){this.options={tagsSingle:[],openSymbol:"[",closeSymbol:"]"};for(var key in options){this.options[key]=options[key];}};BBCode.prototype={rules:[],BBTextFilters:[],HTMLTextFilters:[],addRule:function(rule){this.rules.push(new BBCodeConvertRule(rule));return this;},addBBTextFilter:function(filter){if(BBCodeUtils.type(filter)=="function")
this.BBTextFilters=BBCodeUtils.includeIntoArray(this.BBTextFilters,filter);return this;},addHTMLTextFilter:function(filter){if(BBCodeUtils.type(filter)=="function")
this.HTMLTextFilters=BBCodeUtils.includeIntoArray(this.HTMLTextFilters,filter);return this;},toBBCode:function(html){var html=this.preToBBConversion(html);var tmp=document.createElement("div");tmp.innerHTML=html;var ret=this.nodesToBBcode(tmp.childNodes);ret=this.postToBBConversion(ret);return ret;},toHTML:function(bbcode){var t=this.preToHtmlConversion(bbcode);t=new BBCodeTree(t,this.options);_ret=this.nodesToHTML(t.tree);_ret=this.postToHtmlConversion(_ret);return _ret;},applyBBTextFilters:function(text){if(text==undefined)
return"";for(var i=0;i0){ret+=contentrules[0].toBBContent(node);}else{ret+=this.nodesToBBcode(node.childNodes);}
for(var i=(localrules.length-1);i>=0;--i){var tmp=localrules[i].toBBEnd(node);if(typeof tmp!="undefined")
ret+=tmp;}
return ret;},nodesToBBcode:function(nodes){var ret="";for(var i=0;i0)
{ret+=contentrules[0].toHTMLContent(node);}
else
{
/*! ======= FIX TO PUSH IN UNMATCHED TAGS */
if(localrules.length==0)
{if(node.data.tag)
{ret+='['+node.data.tag;if(typeof(node.data.params)=='object')
{for(var i in node.data.params)
{if(i&&node.data.params[i]&&i!=node.data.tag&&node.data.params[i]!=node.data.tag)
{if(node.data.hasEqual===true)
{var _t=(node.data.params[i].match(/\s/))?'"'+node.data.params[i]+'"':node.data.params[i];if(i.match(/^__x(\d+?)$/))
{ret+=' '+_t;}
else
{ret+=' '+i+'='+_t;}}
else
{var _t=(node.data.params[i].match(/\s/))?'"'+node.data.params[i]+'"':node.data.params[i];ret+=' '+_t;}}
else if(i==node.data.tag&&i!=node.data.params[i])
{var _t=(node.data.params[i].match(/\s/))?'"'+node.data.params[i]+'"':node.data.params[i];ret+='='+_t;}}}
ret+=']';}}
ret+=this.nodesToHTML(node.children);if(localrules.length==0)
{if(node.data.tag&&ipsBbcodeTags.indexOf(node.data.tag)!=-1&&this.options.tagsSingle.indexOf(node.data.tag)==-1)
{ret+='[/'+node.data.tag+']';}}}
for(var i=(localrules.length-1);i>=0;--i){var tmp=localrules[i].toHTMLEnd(node);if(tmp!=undefined)
ret+=tmp;}
return ret;},nodesToHTML:function(nodes){var ret="";for(var i=0;i()]+)',text);var _c=0;if(_matches.length)
{$(_matches).each(function(i)
{if(i.length)
{if(i[1])
{var _url=null;try
{_url=decodeURI(i[1]).replace(/ /g,'%20');}
catch(err)
{IPS_URL_STORE[_c]=i[1].replace(/&/g,'&');_url='!!~~~~~~~~~url:'+_c+'~~~~~~~~~!!';_c++;}
text=text.replace(new RegExp(i[1].regExpEscape(),'g'),_url);}}});}
Debug.dir(IPS_URL_STORE);text=text.replace(/.+?<\/cite>/g,'');text=text.replace(/<(p|div)([^>]+?)dir=(['"])RTL(['"])/ig,'<$1$2style="text-align:right"');text=text.replace(/<(p|div)([^>]+?)align=(['"])right(['"])/ig,'<$1$2style="text-align:right"');text=text.replace(/<(p|div)([^>]+?)align=(['"])center(['"])/ig,'<$1$2style="text-align:center"');Debug.write("preToBBConversion: "+text);return text;},
/*! postBBConversion */
postToBBConversion:function(text)
{if(Prototype.Browser.IE)
{text=text.replace(/\!\!~~~~~~~~~~ie-sucks~~~~~~~~~~~~\!\!/g,"\n");}
text=ipb.textEditor.smiliesToCode(text);text=text.strip();if(typeof(IPS_URL_STORE)!='undefined')
{$H(IPS_URL_STORE).each(function(i)
{i.value=i.value.replace(/&/g,'&');text=text.replace(new RegExp('\!\!~~~~~~~~~url:'+i.key+'~~~~~~~~~\!\!','g'),i.value);});}
text=text.replace(/\[quote([^\]]+?)\][ \r\n\xA0]{1,}/ig,'[quote$1]\n');text=text.replace(/[ \r\n\xA0]{1,}\[\/quote\]/ig,'\n[/quote]');Debug.write("postToBBConversion: "+text);return text;},
/*! preTotHtmlConversion */
preToHtmlConversion:function(text)
{text=text.replace(/(\r\n|\r)/g,"\n");text=text.replace(/&(#[0-9]{1,4}|[a-zA-Z]{2,5})/g,'&$1');var _matches=phpjs.preg_match_all('\\[url=((?!\\[\\/url\\]).+)\\[\\/url\\]',text);if(_matches.length)
{$(_matches).each(function(i)
{if(i.length)
{if(i[1])
{Debug.write('**'+i[1]);var _PossibleTags=phpjs.preg_match_all('\\[([\\d\\w]+?)(\\s|=)?\\]',i[1]);var _final=i[0];if(_PossibleTags.length)
{$(_PossibleTags).each(function(t)
{if(ipsBbcodeTags.indexOf(t[1].toLowerCase())==-1&&IPS_DEFAULT_TAGS.indexOf(t[1].toLowerCase())==-1)
{var _r=t[0];_r=_r.replace(/\[/g,'%5B');_r=_r.replace(/\]/g,'%5D');_final=_final.replace(new RegExp(t[0].regExpEscape(),'g'),_r);}});}
if(_final.length)
{text=text.replace(new RegExp(i[0].regExpEscape(),'g'),_final);}}}});}
text=text.replace(new RegExp('\\\[img\\\]([^\\\[]+?)\\\[/img\\\]','gi'),'[img=$1]');var noParse=(typeof(CKEDITOR.config.IPS_BBCODE_NOPARSE)!='undefined'&&CKEDITOR.config.IPS_BBCODE_NOPARSE instanceof Array)?CKEDITOR.config.IPS_BBCODE_NOPARSE:[];noParse.push('codebox');noParse.push('code');noParse.each(function(tag)
{text=BBCode.prototype.processNoParseTags(tag,text);});var testTags=new Array();var brokenTags=new Array();ipsBbcodeTags.each(function(i)
{if(myParser.options.tagsSingle.indexOf(i)==-1)
{testTags.push(i);}
else
{Debug.write('Skipping: '+i);}});IPS_DEFAULT_TAGS.each(function(i)
{if(myParser.options.tagsSingle.indexOf(i)==-1&&i!='*')
{testTags.push(i);}
else
{Debug.write('Skipping: '+i);}});var testText=text.toLowerCase();testTags.each(function(i)
{var oCount=phpjs.substr_count(testText,'['+i+']')+phpjs.substr_count(testText,'['+i+'=')+phpjs.substr_count(testText,'['+i+' ');var cCount=phpjs.substr_count(testText,'[/'+i+']');if(oCount!=cCount)
{brokenTags.push(i);}});if(brokenTags.length>0)
{brokenTags.each(function(tag)
{text=text.replace(new RegExp('\\\['+tag+'(=[^\\\]]+?)?\\\]','gi'),'['+tag+'$1]');text=text.replace(new RegExp('\\\[/'+tag+'\\\]','gi'),'[/'+tag+']');});}
text=cleanBBCodeBlockElements(text);text=text.replace(//g,'>');text=text.replace(/§(?!;)/g,'§');var _matches=phpjs.preg_match_all('\\[list([^\\]]+?)?\\]((.|\n)+)\\[/list\\]',text);if(_matches.length)
{$(_matches).each(function(i)
{if(i.length)
{if(i[2]&&!i[2].match(/\[\/\*\]/))
{var _t=i[2]+'';_t=_t.replace(/\[\*\]/g,'
');_t=_t.replace(/^<\/li>/,'');text=text.replace(i[2],_t);}}});}
Debug.write("preToHtmlConversion: "+text);return text;},
/*! processNoParseTags */
processNoParseTags:function(tag,text)
{var map=IPSCKTools.getEmbeddedTagPositions(text,tag,['[',']']);var count=0;$H(map.open).each(function(m)
{count++;});if(count==0)
{return text;}
Debug.write("Count of map items to not parse is: "+count);for(var id=0;id0)
{slice=phpjs.substr(text,o,c);var _origLength=phpjs.strlen(slice);slice=slice.replace(/\$/g,'$');if(_origLength>0)
{slice=slice.replace(/\[/g,'[');slice=slice.replace(/\/(\w+?)\]/g,'/$1]');Debug.write("Slice for this is: "+slice);var _newLength=phpjs.strlen(slice);text=phpjs.substr_replace(text,slice,o,c);if(_newLength!=_origLength)
{$H(map.open).each(function(x)
{_id=x.key;_o=map['open'][_id];if(_o>o)
{map['open'][_id]+=(_newLength-_origLength);map['close'][_id]+=(_newLength-_origLength);}});}}}};return text;},
/*! postHtmlConversion */
postToHtmlConversion:function(text)
{text=text.replace(/(\r\n|\r)/g,"\n");text=ipb.textEditor.convertQuotes(text);var blocks={'div':['b','a'],'pre':['b','a'],'blockquote':['b','a'],'p':['b','a'],'ul':['b','a'],'ol':['b','a'],'li':['b','a']};$H(blocks).each(function(i)
{tag=i.key;arr=i.value;if(arr.indexOf('b')!=-1)
{}
if(arr.indexOf('a')!=-1)
{text=text.replace(new RegExp(''+tag+'>([ ]+?)?'+"(?:\n)",'gi'),''+tag+'>');}});text=ipb.textEditor.codeToSmilies(text);text=text.replace(/\n/g,' ');text=text.replace(/<\/cite>
');}
else
{var range=selection.getNative().getRangeAt(selection.rangeCount-1).cloneRange();var div=document.createElement('div');div.appendChild(range.cloneContents());return div.innerHTML;}},cleanHtmlForTagWrap:function(html,convert)
{var text=(typeof(html)!='undefined')?html.replace(/ $/,''):'';if(convert)
{text=text.replace(/</g,'<');text=text.replace(/>/g,'>');text=text.replace(/&/g,'&');text=text.replace(/'/g,"'");text=text.replace(/"/g,'"');}
return text;},stripHtmlTags:function(html)
{return html.stripTags();}};ipb.lang['ck_bbcode_error_title']="BBCode Error";ipb.lang['ck_bbcode_desc']="Errors have been found with your post, please correct these errors. Errors are usually caused by mismatched opening and closing tags or missing closing tags. You may use your post anyway but it may not display as intended. Tags with potential errors: #{tags}";ipb.lang['ck__bbcode_use_anyway']="Use Anyway";ipb.lang['ck__bbcode_close']="Close & Continue Editing";IPBoard.prototype.textEditor={mainStore:$H(),lastSetUp:null,htmlCheckbox:$H(),_tmpContent:'',IPS_TEXTEDITOR_POLLING:10000,IPS_NEW_POST_POLLING:(2*60000),IPS_SAVED_MSG:""+ipb.lang['ck_auto_saved']+"",IPS_AUTOSAVETEMPLATE:""+ipb.lang['ck_view_saved']+"",IPS_AUTOSAVEVIEW:"
"+ipb.lang['ck_saved']+"
#{content}
",IPS_AUTOSAVEEXPLAIN:"
"+ipb.lang['ck_saved_title']+"
"+ipb.lang['ck_saved_desc']+"
",IPS_BBCODE_ERROR:"
"+ipb.lang['ck_bbcode_error_title']+"
"+ipb.lang['ck_bbcode_desc']+"
#{content}
",ajaxUrl:'',initialize:function(editorId,options)
{if(inACP)
{ipb.textEditor.ajaxUrl=ipb.vars['base_url'];ipb.vars['secure_hash']=ipb.vars['md5_hash'];}
else
{ipb.textEditor.ajaxUrl=ipb.vars['base_url'];}
if(!ipb.textEditor.mainStore.get(editorId))
{newEditorObject=new ipb.textEditorObjects(editorId,options);ipb.textEditor.mainStore.set(editorId,newEditorObject);}
ipb.textEditor.lastSetUp=editorId;},bindPreviewButton:function(buttonElem,previewElem)
{if($(buttonElem)&&$(previewElem))
{var _bbcode=0;var _html=0;var _emos=0;var _area='topics';try
{_bbcode=($(buttonElem).readAttribute('bbcode'))?parseInt($(buttonElem).readAttribute('bbcode')):_bbcode;_html=($(buttonElem).readAttribute('html'))?parseInt($(buttonElem).readAttribute('html')):_html;_emos=($(buttonElem).readAttribute('emoticons'))?parseInt($(buttonElem).readAttribute('emoticons')):_emos;_area=($(buttonElem).readAttribute('area'))?$(buttonElem).readAttribute('area'):_area;}catch(ouch){}}},bindHtmlCheckbox:function(elem,editorId)
{editorId=(editorId)?editorId:ipb.textEditor.getEditor().editorId;if($(elem))
{ipb.textEditor.htmlCheckbox[editorId]=$(elem);$(elem).writeAttribute('data-editorId',editorId);$(elem).observe('change',ipb.textEditor.htmlModeToggled.bindAsEventListener(this,$(elem),true));}},htmlModeToggled:function(e,elem)
{var textObj=ipb.textEditor.getEditor($(elem).readAttribute('data-editorId'));var isRte=textObj.isRte();var button=$('cke_'+textObj.editorId).down('.cke_button_ipssource');ipb.lang['ckeditor__toggle_html_warning']="Toggling HTML to off will convert the editor's contents to BBCode resulting in the loss of any complex HTML you may have added";if(elem.checked==true)
{$('editor_html_message_'+textObj.editorId).show();textObj.CKEditor.ipsOptions.isHtml=1;if(isRte)
{var replaceWith=textObj.getText();$(elem).writeAttribute('data-was','rte');ipb.textEditor.switchEditor(textObj.editorId);textObj.CKEditor.setData(replaceWith.unEscapeHtml());}
button.hide();}
else
{if(isRte==0)
{var _ok=true;var replaceWith=textObj.getText();if(replaceWith.length)
{if(!confirm(ipb.lang['ckeditor__toggle_html_warning']))
{_ok=false;}}
if(_ok===true)
{$('editor_html_message_'+textObj.editorId).hide();textObj.CKEditor.ipsOptions.isHtml=0;if(!button.visible())
{button.show();}
_replaceWith=(isRte)?_replaceWith:ipb.textEditor.ckPre(myParser.toBBCode(replaceWith));textObj.CKEditor.setData(_replaceWith);}}}},switchEditor:function(editorId)
{var textObj=ipb.textEditor.getEditor(editorId);var isRte=textObj.isRte();textObj.setIsRte((isRte)?false:true,true);textObj.EditorObj.editor.setMode((isRte)?'ipssource':'wysiwyg');},getEditor:function(editorId)
{editorId=(!editorId)?ipb.textEditor.getCurrentEditorId():editorId;return ipb.textEditor.mainStore.get(editorId);},getCurrentEditorId:function()
{if(typeof(CKEDITOR)=='undefined'||Object.isUndefined(CKEDITOR))
{return ipb.textEditor.lastSetUp;}
else
{if(CKEDITOR.currentInstance&&ipb.textEditor.mainStore.get(CKEDITOR.currentInstance.name).CKEditor)
{return CKEDITOR.currentInstance.name;}
else
{return ipb.textEditor.lastSetUp;}}},
/*! Smilies to code */
smiliesToCode:function(text)
{if($(IPS_smiles.emoticons))
{$(IPS_smiles.emoticons).each(function(grin)
{if(grin.text!==null)
{grin.text=grin.text.replace(/</g,'<');grin.text=grin.text.replace(/>/g,'>');text=text.replace(new RegExp('\\\[img='+IPS_smiley_path+grin.src.regExpEscape()+'\\\]','g'),grin.text);}});}
return text;},
/*! Code to smilies */
codeToSmilies:function(text)
{var invalidWrappers="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'\"/";var position=0;var emoPosition=0;var codeBlocks=[];var _c=0;while(_matches=text.match(/(