function ipsclass(){this.cookies=new Array();this.ignore_cookies=new Array(ipb_var_cookieid+'ipb_stronghold',ipb_var_cookieid+'session_id',ipb_var_cookieid+'ipb_admin_session_id',ipb_var_cookieid+'member_id',ipb_var_cookieid+'pass_hash');this.settings={'do_linked_resize':0,'resize_percent':50};this.init=function(){var _tmp=document.cookie.split(';');if(_tmp.length){for(i=0;i<_tmp.length;i++){if(_tmp[i].match(new RegExp(ipb_var_cookieid+".*$"))){var _data=_tmp[i].split('=');var _key=this.trim(_data[0]);var _value=unescape(this.trim(_data[1]));if(_key&&(!this.in_array(_key,this.ignore_cookies))){this.cookies[_key.replace(ipb_var_cookieid,'')]=_value}}}}_tmp=null};this.trim=function(text){if(typeof(text)=='undefined'){return''}text=text.replace(/^\s+/,'');return text.replace(/\s+$/,'')};this.html_entity_decode=function(text){if(typeof ca=='undefined'){var ca=document.createElement('textarea')}ca.innerHTML=text.replace(/</g,'&lt;').replace(/>/g,'&gt;');return ca.value};this.in_array=function(needle,haystack){if(!haystack.length){return false}for(var i=0;i<haystack.length;i++){if(haystack[i]===needle){return true}}return false};this.htmlspecialchars=function(text){text=text.replace(/</g,'&lt;');text=text.replace(/>/g,'&gt;');text=text.replace(/"/g,'&quot;');return text};this.un_htmlspecialchars=function(text){text=text.replace(/&lt;/g,'<');text=text.replace(/&gt;/g,'>');text=text.replace(/&quot;/g,'"');return text};this.get_editor_contents=function(editor_id,editor_array){var aIPS_editor=editor_array?editor_array:IPS_editor;if(!editor_id){for(var i in aIPS_editor){if(typeof(aIPS_editor[i])!='object'){continue}editor_id=i;break}}return aIPS_editor[editor_id].editor_get_contents};this.add_editor_contents=function(text,editor_id,editor_array){var aIPS_editor=editor_array?editor_array:IPS_editor;if(!editor_id){for(var i in aIPS_editor){if(typeof(aIPS_editor[i])!='object'){continue}editor_id=i;break}}return aIPS_editor[editor_id].insert_text(text)};this.convert_saved_tags_to_display_tags=function(text){text=text.replace(/(<|&lt;|&#60;)!--/,"{");text=text.replace(/--(>|&gt;|&#62;)/,"}");return text};this.include_javascript=function(_file,div_id){var _doc=(div_id)?document.getElementById(div_id):document.getElementsByTagName('head').item(0);var _js=document.createElement('script');_js.setAttribute('language','javascript');_js.setAttribute('type','text/javascript');_js.setAttribute('src',_file);_doc.appendChild(_js);return false};this.fade_in_element=function(div){var hash='#';var color_items="0123456789abcdef";var start_color='#ffff66';var orig_color=document.getElementById(div).style.backgroundColor;var temp_end='#ffffff';var iter=20;var time=80;var rbeg=color_items.indexOf(start_color.substr(1,1))*16+color_items.indexOf(start_color.substr(2,1));var gbeg=color_items.indexOf(start_color.substr(3,1))*16+color_items.indexOf(start_color.substr(4,1));var bbeg=color_items.indexOf(start_color.substr(5,1))*16+color_items.indexOf(start_color.substr(6,1));var rend=color_items.indexOf(temp_end.substr(1,1))*16+color_items.indexOf(temp_end.substr(2,1));var gend=color_items.indexOf(temp_end.substr(3,1))*16+color_items.indexOf(temp_end.substr(4,1));var bend=color_items.indexOf(temp_end.substr(5,1))*16+color_items.indexOf(temp_end.substr(6,1));for(i=1,r=rbeg,g=gbeg,b=bbeg;i<=iter;r=Math.round(rbeg+i*((rend-rbeg)/(iter-1))),g=Math.round(gbeg+i*((gend-gbeg)/(iter-1))),b=Math.round(bbeg+i*((bend-bbeg)/(iter-1))),i++){hstr='#'+color_items.charAt(Math.floor(r/16))+color_items.charAt(r%16)+color_items.charAt(Math.floor(g/16))+color_items.charAt(g%16)+color_items.charAt(Math.floor(b/16))+color_items.charAt(b%16);setTimeout('var div = document.getElementById("'+div+'"); div.style.backgroundColor = "'+hstr+'";',i*time)}setTimeout('var div = document.getElementById("'+div+'"); div.style.backgroundColor = "'+orig_color+'";',(i+1)*time)};this.lang_build_string=function(){if(!arguments.length||!arguments){return}var string=arguments[0];for(var i=1;i<arguments.length;i++){var match=new RegExp('<%'+i+'>','gi');string=string.replace(match,arguments[i])}return string};this.get_id_from_text=function(id){return id.replace(/.*(\-|_)(\S+)/,"$2")};this.get_name_from_text=function(id){return id.replace(/(.*)(\-|_)(\S+)/,"$1")};this.location_jump=function(url,full){url=url.replace(/&amp;/g,'&');if(full){window.location.href=url}else{window.location.href=ipb_var_base_url+url}};this.confirm_action=function(url,msg){if(!msg){msg='Для подтверждения нажмите ОК'}if(url){url=url.replace('&amp;','&')}else{url=''}if(confirm(msg)){window.location.href=url}else{alert(ipb_global_lang['action_cancelled']);return false}};this.pop_up_window=function(url,width,height,name){if(!name){var mydate=new Date();name=mydate.getTime()}var Win=window.open(url.replace('&amp;','&'),name,'width='+width+',height='+height+',resizable=1,scrollbars=1,location=no,directories=no,status=no,menubar=no,toolbar=no');Win.focus();return false};this.set_unselectable=function(obj){if(!is_ie4&&typeof(obj.tagName)!='undefined'){if(obj.hasChildNodes()){for(var i=0;i<obj.childNodes.length;i++){this.set_unselectable(obj.childNodes[i])}}obj.unselectable='on'}};this.get_obj_leftpos=function(obj){var curleft=0;if(obj.offsetParent){while(obj.offsetParent){curleft+=obj.offsetLeft;obj=obj.offsetParent}}else if(obj.x){curleft+=obj.x}return curleft};this.get_obj_toppos=function(obj){var curtop=0;if(obj.offsetParent){while(obj.offsetParent){curtop+=obj.offsetTop;obj=obj.offsetParent}}else if(obj.y){curtop+=obj.y}return curtop};this.cancel_bubble=function(obj,extra){if(extra!==false){extra=true}if(!obj||is_ie){if(extra){window.event.returnValue=false}window.event.cancelBubble=true;return window.event}else{obj.stopPropagation();if(extra){obj.preventDefault()}return obj}};this.cancel_bubble_all=function(obj){return ipsclass.cancel_bubble(obj,true)};this.cancel_bubble_low=function(obj){return ipsclass.cancel_bubble(obj,false)};this.my_getcookie=function(name){return this.cookies[name]};this.my_setcookie=function(name,value,sticky){expire="";domain="";path="/";if(sticky){expire="; expires=Wed, 1 Jan 2020 00:00:00 GMT"}if(ipb_var_cookie_domain!=""){domain='; domain='+ipb_var_cookie_domain}if(ipb_var_cookie_path!=""){path=ipb_var_cookie_path}document.cookie=ipb_var_cookieid+name+"="+value+"; path="+path+expire+domain+';';this.cookies[name]=value};this.array_stacksize=function(thearray){for(i=0;i<thearray.length;i++){if((thearray[i]=="")||(thearray[i]==null)||(thearray=='undefined')){return i}}return thearray.length};this.array_pushstack=function(thearray,newval){var arraysize=this.array_stacksize(thearray);thearray[arraysize]=newval};this.array_popstack=function(thearray){var arraysize=this.array_stacksize(thearray);var theval=thearray[arraysize-1];delete thearray[arraysize-1];return theval}}
var input_red='input-warn';var input_green='input-ok';var input_ok_box='input-ok-content';var input_warn_box='input-warn-content';var img_blank='blank.gif';var img_tick='aff_tick.gif';var img_cross='aff_cross.gif';var uagent=navigator.userAgent.toLowerCase();var is_safari=((uagent.indexOf('safari')!=-1)||(navigator.vendor=="Apple Computer, Inc.")||(uagent.indexOf('konqueror')!=-1)||(uagent.indexOf('khtml')!=-1));var is_opera=(uagent.indexOf('opera')!=-1);var is_webtv=(uagent.indexOf('webtv')!=-1);var is_ie=((uagent.indexOf('msie')!=-1)&&(!is_opera)&&(!is_safari)&&(!is_webtv));var is_ie4=((is_ie)&&(uagent.indexOf("msie 4.")!=-1));var is_ie7=((is_ie)&&(uagent.indexOf("msie 7.")!=-1));var is_moz=(navigator.product=='Gecko');var is_ns=((uagent.indexOf('compatible')==-1)&&(uagent.indexOf('mozilla')!=-1)&&(!is_opera)&&(!is_webtv)&&(!is_safari));var is_ns4=((is_ns)&&(parseInt(navigator.appVersion)==4));var is_win=((uagent.indexOf("win")!=-1)||(uagent.indexOf("16bit")!=-1));var is_mac=((uagent.indexOf("mac")!=-1)||(navigator.vendor=="Apple Computer, Inc."));var ua_vers=parseInt(navigator.appVersion);var ipb_pages_shown=0;var ipb_pages_array=new Array();var ipb_skin_url=ipb_skin_url?ipb_skin_url:ipb_var_image_url;function gbl_check_search_box(){try{var _cb=document.getElementById('gbl-search-checkbox');var _fd=document.getElementById('gbl-search-forums');if(_cb.checked&&ipb_input_f){_fd.value=ipb_input_f}else{_fd.value='all'}}catch(error){}};function show_inline_messages(){var _string=window.location.toString();var _msg_box=null;if(_string.indexOf('?___msg=')!=-1||_string.indexOf(';___msg=')!=-1||_string.indexOf('&___msg=')!=-1){try{if(parent.document.getElementById('ipd-msg-text')){_msg_box=parent.document.getElementById('ipd-msg-text')}else{_msg_box=document.getElementById('ipd-msg-text')}}catch(error){alert(error)}var message=_string.replace(/^.*[\?;&]___msg=(.+?)(&.*$|$)/,"$1");message=unescape(message);if(message_pop_up_lang[message]){try{_msg_box.innerHTML=message_pop_up_lang[message];centerdiv=new center_div();centerdiv.divname='ipd-msg-wrapper';centerdiv.move_div();var _this_to=setTimeout("hide_inline_messages_instant()",2000)}catch(anerror){alert(message_pop_up_lang[message])}}}};function show_inline_messages_instant(msg){_msg_box=document.getElementById('ipd-msg-text');_msg_box.innerHTML=message_pop_up_lang[msg];centerdiv=new center_div();centerdiv.divname='ipd-msg-wrapper';centerdiv.move_div();var _this_to=setTimeout("hide_inline_messages_instant()",2000)};function hide_inline_messages_instant(){try{document.getElementById('ipd-msg-wrapper').style.display='none';parent.document.getElementById('ipd-msg-wrapper').style.display='none'}catch(acold){}};function iframe_include(){this.iframe_id=null;this.iframe_obj=null;this.iframe_add_to_div=null;this.iframe_add_to_div_obj=null;this.iframe_main_wrapper=null;this.iframe_classname='GBL-component-iframe';this.ok_to_go=1;this.iframe_height=300;this.ajax=''};iframe_include.prototype.init=function(){try{this.iframe_add_to_div_obj=document.getElementById(this.iframe_add_to_div)}catch(error){this.ok_to_go=0}};iframe_include.prototype.include=function(url){if(!this.ok_to_go){return false}var iheight=parseInt(this.iframe_add_to_div_obj.style.height);var iwidth=parseInt(this.iframe_add_to_div_obj.style.width);if(this.iframe_obj){this.iframe_add_to_div_obj.removeChild(this.iframe_obj)}this.iframe_obj=document.createElement('IFRAME');this.iframe_obj.src=url;this.iframe_obj.id=this.iframe_id;this.iframe_obj.name=this.iframe_id;this.iframe_obj.scrolling='no';this.iframe_obj.frameBorder='no';this.iframe_obj.border='0';this.iframe_obj.className=this.iframe_classname;this.iframe_obj.style.width=iwidth?iwidth+'px':'100%';this.iframe_obj.style.height=iheight?iheight-5+'px':this.iframe_height+'px';this.iframe_obj.style.overflow='hidden';this.iframe_obj.style.padding='0px';this.iframe_obj.style.margin='0px';this.ajax=new ajax_request();this.iframe_add_to_div_obj.style.padding='0px';this.iframe_add_to_div_obj.style.margin='0px';if(is_ie&&!is_ie7){this.iframe_add_to_div_obj.style.paddingLeft='6px';this.iframe_add_to_div_obj.style.paddingRight='6px'}this.iframe_obj.iframe_loaded=0;this.iframe_obj.iframe_init=0;this.iframe_obj._this=this;this.iframe_add_to_div_obj.style.overflow='';this.iframe_add_to_div_obj.appendChild(this.iframe_obj);this.ajax.show_loading(ajax_load_msg);if(is_ie){this.iframe_obj.allowTransparency=true;this.iframe_obj.onreadystatechange=this.iframe_on_load_ie}else{this.iframe_obj.onload=this.iframe_onload}};iframe_include.prototype.iframe_onload=function(e){var _document=this._this.iframe_obj.contentDocument;if(is_safari){_document=window.frames[this.id].document}if(!this.iframe_init){this.iframe_init=1;this.iframe_loaded=1;_document.onmousedown=menu_action_close}else{this.iframe_loaded=1;_document.onmousedown=menu_action_close}this._this.ajax.hide_loading();try{_document.getElementsByTagName('body')[0].style.padding='0px';_document.getElementsByTagName('body')[0].style.margin='0px'}catch(error){}var _new_height=parseInt(_document.getElementById(this._this.iframe_main_wrapper).offsetHeight);if(_new_height>0){if(is_safari){_new_height+=3}this._this.iframe_obj.style.height=_new_height+"px";this._this.iframe_add_to_div_obj.style.height=_new_height+"px"}var style=document.getElementsByTagName('style');var _new_style='';for(i in style){_new_style+="\n"+style[i].innerHTML}try{_document.getElementsByTagName('style')[0].innerHTML=_new_style}catch(error){}};iframe_include.prototype.iframe_on_load_ie=function(e){if(this.readyState=='complete'){var _document='';if(this._this.iframe_obj.contentWindow){_document=this._this.iframe_obj.contentWindow.document}else if(this._this.iframe_obj.document){_document=this._this.iframe_obj.document}else{_document=window.frames[this.id].document}if(!this.iframe_init){this.iframe_init=1;this.iframe_loaded=1;_document.onmousedown=menu_action_close}else{this.iframe_loaded=1;_document.onmousedown=menu_action_close}var style=document.getElementsByTagName('style');var _new_style='';for(i in style){if(style[i].innerHTML){_new_style+="\n"+style[i].innerHTML}}var _urls=_new_style.match(/@import\s+?url\(\s+?['"](.+?)['"]\s+?\);/ig);if(_urls&&_urls.length){for(i=0;i<=_urls.length;i++){if(typeof(_urls[i])!='undefined'){_urls[i]=_urls[i].replace(/@import\s+?url\(\s+?['"](.+?)['"]\s+?\);/ig,"$1");if(typeof(_urls[i])!='undefined'){_document.createStyleSheet(_urls[i])}}}}this._this.ajax.hide_loading();try{_document.getElementsByTagName('body')[0].style.padding='0px';_document.getElementsByTagName('body')[0].style.margin='0px'}catch(error){}var _new_height=parseInt(_document.getElementById(this._this.iframe_main_wrapper).offsetHeight);var _new_width=parseInt(_document.getElementById(this._this.iframe_main_wrapper).offsetWidth);if(_new_height>0){this._this.iframe_obj.style.height=_new_height+"px";this._this.iframe_add_to_div_obj.style.height=_new_height+"px"}if(_new_width>0){this._this.iframe_obj.style.width=_new_width+"px";this._this.iframe_add_to_div_obj.style.width=_new_width+"px"}}};function ie_fix_png(){if(is_ie){document.onreadystatechange=ie_fix_png_do}}function ie_fix_png_do(){if(document.readyState=='complete'){var pos=navigator.userAgent.indexOf("MSIE ");var version=navigator.userAgent.substring(pos+5);var blanky=ipb_skin_url+"/blank.gif";var _sw=screen.width*(parseInt(ipsclass.settings['resize_percent'])/100);if(pos==-1){return false}if(!((version.indexOf("5.5")==0)||(version.indexOf("6")==0))&&(navigator.platform==("Win32"))){return}var images=document.getElementsByTagName('IMG');var _len=images.length;if(_len){for(var i=0;i<_len;i++){if(images[i].src.match(/\.png$/)){var element=images[i];var _width=0;var _height=0;var _src=0;element._width=element._width?parseInt(element._width):0;element._resized=parseInt(element._resized);if(!element.style.width){_width=element.width}if(!element.style.height){_height=element.height}_src=element.src;if(_width<_sw&&!element._resized&&element._width<_sw){element.src=blanky;if(_width){element.style.width=_width+"px"}if(_height){element.style.height=_height+"px"}element.runtimeStyle.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+_src+"',sizingMethod='scale')"}else{}}}}}}function add_onload_event(func){var oldonload=window.onload;if(typeof window.onload!='function'){window.onload=func}else{window.onload=function(){if(oldonload){oldonload()};func()}}}function add_shadow(wrapname,divname){var divobj=document.getElementById(divname);var wrapobj=document.getElementById(wrapname);if(is_ie){wrapobj.className='shadow-ie';wrapobj.style.width=divobj.offsetWidth+1+'px';wrapobj.style.height=divobj.offsetHeight+1+'px'}else{wrapobj.className='shadow-moz';wrapobj.style.width=divobj.offsetWidth+0+'px';wrapobj.style.height=divobj.offsetHeight+0+'px'}}function global_dst_check(tzo,dst){var op=tzo<0?'plus':'minus';tzo=Math.abs(tzo);var dstoffset=Math.abs(new Date().getTimezoneOffset()/60);var dstset=0;var url=ipb_var_base_url+'act=xmlout&do=dst-autocorrection&md5check='+ipb_md5_check;if(op=='plus'){var thisoffset=tzo-dst}else{var thisoffset=tzo+dst}var math=Math.abs(thisoffset-dstoffset);if(math!=0){try{xml_dst_set(url+'&xml=1');dstset=1}catch(e){dstset=0}if(dstset==0){window.location=url}}}function my_getcookie(name){return ipsclass.my_getcookie(name)}function my_setcookie(name,value,sticky){return ipsclass.my_setcookie(name,value,sticky)}function lang_build_string(){if(!arguments.length||!arguments){return}var string=arguments[0];for(var i=1;i<arguments.length;i++){var match=new RegExp('<%'+i+'>','gi');string=string.replace(match,arguments[i])}return string}function friends_pop(extra_url){ipb_var_base_url=ipb_var_base_url.replace('&amp;','&');if(extra_url){extra_url=extra_url.replace('&amp;','&')}else{extra_url=''}ipsclass.pop_up_window(ipb_var_base_url+'act=profile&CODE=friends_list_popup'+extra_url,450,400,'Friends')}function buddy_pop(){var not_loaded_yet=0;if(use_enhanced_js){try{xml_myassistant_init();not_loaded_yet=1}catch(e){not_loaded_yet=0}}if(!not_loaded_yet){ipb_var_base_url=ipb_var_base_url.replace('&amp;','&');window.open(ipb_var_base_url+'act=buddy','BrowserBuddy','width=250,height=500,resizable=yes,scrollbars=yes')}}function check_enter(pages_id,e){var keypress=e.keyCode?e.keyCode:e.which?e.which:e.charCode;if(keypress==13){do_multi_page_jump(pages_id)}}function do_multi_page_jump(pages_id){var pages=1;var cur_st=ipb_var_st;var cur_page=1;var total_posts=ipb_pages_array[pages_id][2];var per_page=ipb_pages_array[pages_id][1];var url_bit=ipb_pages_array[pages_id][0];var userPage=parseInt(document.getElementById('st-'+pages_id).value);var st_type=document.getElementById('st-type-'+pages_id).value;st_type=st_type?st_type:'st';url_bit=url_bit.replace(new RegExp("&amp;","g"),'&');if(total_posts%per_page==0){pages=total_posts/per_page}else{pages=Math.ceil(total_posts/per_page)}if(cur_st>0){cur_page=cur_st/per_page;cur_page=cur_page-1}if(userPage>0){if(userPage<1){userPage=1}if(userPage>pages){userPage=pages}if(userPage==1){start=0}else{start=(userPage-1)*per_page}if(start){window.location=url_bit+"&"+st_type+"="+start}else{window.location=url_bit}return false}}function pages_st_focus(pages_id){document.getElementById('st-'+pages_id).focus()}function ShowHide(id1,id2){if(id1!='')toggleview(id1);if(id2!='')toggleview(id2)}function my_getbyid(id){itm=null;if(document.getElementById){itm=document.getElementById(id)}else if(document.all){itm=document.all[id]}else if(document.layers){itm=document.layers[id]}return itm}function toggleview(id){if(!id)return;if(itm=my_getbyid(id)){if(itm.style.display=="none"){my_show_div(itm)}else{my_hide_div(itm)}}}function my_hide_div(itm){if(!itm)return;itm.style.display="none"}function my_show_div(itm){if(!itm)return;itm.style.display=""}function change_cell_color(id,cl){itm=my_getbyid(id);if(itm){itm.className=cl}}function togglecategory(fid,add){saved=new Array();clean=new Array();if(tmp=ipsclass.my_getcookie('collapseprefs')){saved=tmp.split(",")}for(i=0;i<saved.length;i++){if(saved[i]!=fid&&saved[i]!=""){clean[clean.length]=saved[i]}}if(add){clean[clean.length]=fid;my_show_div(my_getbyid('fc_'+fid));my_hide_div(my_getbyid('fo_'+fid))}else{my_show_div(my_getbyid('fo_'+fid));my_hide_div(my_getbyid('fc_'+fid))}ipsclass.my_setcookie('collapseprefs',clean.join(','),1)}function locationjump(url){window.location=ipb_var_base_url+url}function chooseskin(obj){choosebox=obj.options[obj.selectedIndex].value;extravars='';if(choosebox!=-1&&!isNaN(choosebox)){if(document.skinselectorbox.skinurlbits.value){extravars='&'+document.skinselectorbox.skinurlbits.value;extravars=extravars.replace(/setskin=\d{1,}/g,'');extravars=extravars.replace(/skinid=\d{1,}/g,'');extravars=extravars.replace(/cal_id=&/g,'');extravars=extravars.replace(/&{1,}/g,'&');extravars=extravars.replace(/s=&/g,'')}locationjump('setskin=1&skinid='+choosebox+extravars)}}function chooselang(obj){choosebox=obj.options[obj.selectedIndex].value;extravars='';if(document.langselectorbox.langurlbits.value){extravars='&'+document.langselectorbox.langurlbits.value;extravars=extravars.replace(/setlanguage=\d{1,}/g,'');extravars=extravars.replace(/cal_id=&/g,'');extravars=extravars.replace(/langid=\w{1,}/g,'');extravars=extravars.replace(/&{1,}/g,'&');extravars=extravars.replace(/s=&/g,'')}locationjump('setlanguage=1&langid='+choosebox+extravars)}function PopUp(url,name,width,height,center,resize,scroll,posleft,postop){showx="";showy="";if(posleft!=0){X=posleft}if(postop!=0){Y=postop}if(!scroll){scroll=1}if(!resize){resize=1}if((parseInt(navigator.appVersion)>=4)&&(center)){X=(screen.width-width)/2;Y=(screen.height-height)/2}if(X>0){showx=',left='+X}if(Y>0){showy=',top='+Y}if(scroll!=0){scroll=1}var Win=window.open(url,name,'width='+width+',height='+height+showx+showy+',resizable='+resize+',scrollbars='+scroll+',location=no,directories=no,status=no,menubar=no,toolbar=no')}function stacksize(thearray){for(i=0;i<thearray.length;i++){if((thearray[i]=="")||(thearray[i]==null)||(thearray=='undefined')){return i}}return thearray.length}function pushstack(thearray,newval){arraysize=stacksize(thearray);thearray[arraysize]=newval}function popstack(thearray){arraysize=stacksize(thearray);theval=thearray[arraysize-1];delete thearray[arraysize-1];return theval}function innerhtml_template_to_html(t){t=t.replace(/&lt;%(\d+?)&gt;/ig,"<%$1>");t=t.replace(/%3C%(\d+?)%3E/ig,"<%$1>");return t}function global_cancel_bubble(obj,extra){if(!obj||is_ie){if(extra){window.event.returnValue=false}window.event.cancelBubble=true;return window.event}else{obj.stopPropagation();if(extra){obj.preventDefault()}return obj}}function _get_obj_leftpos(obj){var left=obj.offsetLeft;while((obj=obj.offsetParent)!=null){left+=obj.offsetLeft}return left}function _get_obj_toppos(obj){var top=obj.offsetTop;while((obj=obj.offsetParent)!=null){top+=obj.offsetTop}return top}function center_div(){this.divname='';this.divobj='';this.shimobj=''}center_div.prototype.move_div=function(){try{if(parent.document.getElementById(this.divname)){this._document=parent.document;this._window=parent.window}}catch(e){return}this.divobj=this._document.getElementById(this.divname);var my_width=0;var my_height=0;if(typeof(this._window.innerWidth)=='number'){my_width=this._window.innerWidth;my_height=this._window.innerHeight}else if(this._document.documentElement&&(this._document.documentElement.clientWidth||this._document.documentElement.clientHeight)){my_width=this._document.documentElement.clientWidth;my_height=this._document.documentElement.clientHeight}else if(this._document.body&&(this._document.body.clientWidth||this._document.body.clientHeight)){my_width=this._document.body.clientWidth;my_height=this._document.body.clientHeight}this.divobj.style.position='absolute';this.divobj.style.display='block';this.divobj.style.zIndex=-1;if(is_ie){var layer_html=this.divobj.innerHTML;var full_html="<iframe id='"+this.divname+"-shim' src='"+ipb_var_image_url+"/iframe.html' class='iframshim' scrolling='no' frameborder='0' style='position:absolute; top:0px; left:0px; right:0px; display: none;'></iframe>"+layer_html;this.divobj.innerHTML=full_html}var divheight=parseInt(this.divobj.style.height)?parseInt(this.divobj.style.height):parseInt(this.divobj.offsetHeight);var divwidth=parseInt(this.divobj.style.width)?parseInt(this.divobj.style.width):parseInt(this.divobj.offsetWidth);divheight=divheight?divheight:200;divwidth=divwidth?divwidth:400;var scrolly=this.getYscroll();var setX=(my_width-divwidth)/2;var setY=(my_height-divheight)/2+scrolly;setX=(setX<0)?0:setX;setY=(setY<0)?0:setY;this.divobj.style.left=setX+"px";this.divobj.style.top=setY+"px";this.divobj.style.zIndex=99};center_div.prototype.hide_div=function(){try{if(!this.divobj){return}else{this.divobj.style.display='none'}}catch(e){return}};center_div.prototype.getYscroll=function(){var scrollY=0;if(this._document.documentElement&&this._document.documentElement.scrollTop){scrollY=this._document.documentElement.scrollTop}else if(this._document.body&&this._document.body.scrollTop){scrollY=this._document.body.scrollTop}else if(this._window.pageYOffset){scrollY=this._window.pageYOffset}else if(this._window.scrollY){scrollY=this._window.scrollY}return scrollY};
ipsmenu=new ips_menu();function ips_menu(){this.menu_registered=new Array();this.menu_openfuncs=new Array();this.menu_over_css=new Array();this.menu_out_css=new Array();this.menu_open_event=new Array();this.dynamic_register=new Array();this.menu_cur_open=null;this.dynamic_html=null}ips_menu.prototype.register=function(cid,callback,menu_over_css,menu_out_css,event_type){if(event_type){this.menu_open_event[cid]=(event_type=='onmouseover')?'onmouseover':'onclick'}this.menu_registered[cid]=new ips_menu_class(cid);if(callback){this.menu_openfuncs[cid]=callback}if(menu_over_css&&menu_out_css){this.menu_over_css[cid]=menu_over_css;this.menu_out_css[cid]=menu_out_css}return this.menu_registered[cid]};ips_menu.prototype.close=function(){if(this.menu_cur_open){this.menu_registered[this.menu_cur_open].close()}};function ips_menu_class(cid){this.cid=cid;this.initialized=false;this.init_control_object();this.init_menu()};ips_menu_class.prototype.init_control_object=function(){this.cid_obj=document.getElementById(this.cid);try{this.cid_obj.style.cursor="pointer"}catch(e){this.cid_obj.style.cursor="hand"}this.cid_obj.unselectable=true;if(ipsmenu.menu_open_event[this.cid]=='onmouseover'){this.cid_obj.onmouseover=ips_menu_events.prototype.event_onclick}else{this.cid_obj.onclick=ips_menu_events.prototype.event_onclick;this.cid_obj.onmouseover=ips_menu_events.prototype.event_onmouseover}this.cid_obj.onmouseout=ips_menu_events.prototype.event_onmouseout};ips_menu_class.prototype.init_menu=function(){this.cid_menu_obj=document.getElementById(this.cid+'_menu');if(this.cid_menu_obj){if(this.initialized){return}this.cid_menu_obj.style.display="none";this.cid_menu_obj.style.position="absolute";this.cid_menu_obj.style.left="0px";this.cid_menu_obj.style.top="0px";this.cid_menu_obj.onclick=ipsclass.cancel_bubble_low;this.cid_menu_obj.zIndex=50;this.initialized=true}};ips_menu_class.prototype.open=function(obj){if(!this.cid_menu_obj){this.initialized=false;this.init_menu()}if(ipsmenu.menu_cur_open!=null){ipsmenu.menu_registered[ipsmenu.menu_cur_open].close()}if(ipsmenu.menu_cur_open==obj.id){return false}ipsmenu.menu_cur_open=obj.id;var left_px=ipsclass.get_obj_leftpos(obj);var top_px=ipsclass.get_obj_toppos(obj)+obj.offsetHeight;var ifid=obj.id;this.cid_menu_obj.style.zIndex=-1;this.cid_menu_obj.style.display="";var width=parseInt(this.cid_menu_obj.style.width)?parseInt(this.cid_menu_obj.style.width):this.cid_menu_obj.offsetWidth;if((left_px+width)>=document.body.clientWidth){left_px=left_px+obj.offsetWidth-width}if(is_moz){top_px-=1}this.cid_menu_obj.style.left=left_px+"px";this.cid_menu_obj.style.top=top_px+"px";this.cid_menu_obj.style.zIndex=100;if(ipsmenu.menu_openfuncs[obj.id]){eval(ipsmenu.menu_openfuncs[obj.id])}if(is_ie){try{if(!document.getElementById('if_'+obj.id)){var iframeobj=document.createElement('iframe');iframeobj.src='javascript:;';iframeobj.id='if_'+obj.id;document.getElementsByTagName('body').appendChild(iframeobj)}else{var iframeobj=document.getElementById('if_'+obj.id)}iframeobj.scrolling='no';iframeobj.frameborder='no';iframeobj.className='iframeshim';iframeobj.style.position='absolute';iframeobj.style.width=parseInt(this.cid_menu_obj.offsetWidth)+'px';iframeobj.style.height=parseInt(this.cid_menu_obj.offsetHeight)+'px';iframeobj.style.top=this.cid_menu_obj.style.top;iframeobj.style.left=this.cid_menu_obj.style.left;iframeobj.style.zIndex=99;iframeobj.style.display="block"}catch(error){}}if(is_safari){try{mlinks=this.cid_menu_obj.getElementsByTagName('a');for(var i=0;i<=mlinks.length;i++){if(mlinks[i]!=null&&mlinks[i].href!=null&&mlinks[i].href&&(mlinks[i].href.indexOf('#',0)!=(mlinks[i].href.length-1))){mlinks[i].onmousedown=ips_menu_events.prototype.event_safari_onclick_handler;mlinks[i].id='saf-link-'+this.cid+i}}}catch(error){}}if(this.cid_obj.editor_id){this.cid_obj.state=true;IPS_editor[this.cid_obj.editor_id].set_menu_context(this.cid_obj,'mousedown')}return false};ips_menu_class.prototype.close=function(){if(this.cid_menu_obj!=null){this.cid_menu_obj.style.display="none"}else if(ipsmenu.menu_cur_open!=null){ipsmenu.menu_registered[ipsmenu.menu_cur_open].cid_menu_obj.style.display='none'}ipsmenu.menu_cur_open=null;if(this.cid_obj){if(ipsmenu.menu_out_css[this.cid_obj.id]){this.cid_obj.className=ipsmenu.menu_out_css[this.cid_obj.id]}}if(is_ie){try{document.getElementById('if_'+this.cid).style.display="none"}catch(error){}}if(this.cid_obj.editor_id){this.cid_obj.state=false;IPS_editor[this.cid_obj.editor_id].set_menu_context(this.cid_obj,'mouseout')}};ips_menu_class.prototype.hover=function(e){if(ipsmenu.menu_cur_open!=null){if(ipsmenu.menu_registered[ipsmenu.menu_cur_open].cid!=this.id){this.open(e)}}};function ips_menu_events(){};ips_menu_events.prototype.event_safari_onclick_handler=function(){if(this.id){window.location=document.getElementById(this.id).href}};ips_menu_events.prototype.event_onmouseover=function(e){e=ipsclass.cancel_bubble(e,true);ipsmenu.menu_registered[this.id].hover(this);if(ipsmenu.menu_over_css[this.id]){this.className=ipsmenu.menu_over_css[this.id]}};ips_menu_events.prototype.event_onmouseout=function(e){e=ipsclass.cancel_bubble(e,true);if(ipsmenu.menu_out_css[this.id]&&ipsmenu.menu_cur_open!=this.id){this.className=ipsmenu.menu_out_css[this.id]}};ips_menu_events.prototype.event_onclick=function(e){e=ipsclass.cancel_bubble(e,true);if(ipsmenu.menu_cur_open==null){if(ipsmenu.menu_over_css[this.id]){this.className=ipsmenu.menu_over_css[this.id]}ipsmenu.menu_registered[this.id].open(this)}else{if(ipsmenu.menu_cur_open==this.id){ipsmenu.menu_registered[this.id].close();if(ipsmenu.menu_out_css[this.id]){this.className=ipsmenu.menu_out_css[this.id]}}else{if(ipsmenu.menu_over_css[this.id]){this.className=ipsmenu.menu_over_css[this.id]}ipsmenu.menu_registered[this.id].open(this)}}};function menu_do_global_init(){document.onclick=menu_action_close;if(ipsmenu.dynamic_html!=null&&ipsmenu.dynamic_html!=''){}if(ipsmenu.dynamic_register.length){for(var i=0;i<ipsmenu.dynamic_register.length;i++){if(ipsmenu.dynamic_register[i]){ipsmenu.register(ipsmenu.dynamic_register[i])}}}};function menu_action_close(e){try{if(e.button==2||e.button==3){return}}catch(acold){};ipsmenu.close(e)};

var topic_dates={};var topic_flags={};var topic_state={};var forum_mark_time;var newer_topics=new Array;var newer_count=0;var flags_count=0;var forum_id;var url_extra='';var start_int=0;var forum_mark_sent=0;var span_html=new Array;var desc_html=new Array;var text_html=new Array;var folders=new Array;var _desc_clicked=0;var topic_links_init=0;var _this_select_all=0;var tid_date=new Array();var click_delay=1200;function forum_mod_pop(fid){try{menu_action_close();}catch(e){}PopUp(ipb_var_base_url+'act=mod&CODE=prune_start&f='+fid+'&auth_key='+ipb_md5_check,'PRUNE',600,500);}function forum_init_topic_links(){var pagelinks=document.getElementsByTagName('a');for(var i=0;i<=pagelinks.length;i++){try{if(!pagelinks[i].id){continue;}}catch(e){continue;}var linkid=pagelinks[i].id;var linkname=linkid.replace( /^(.*)-(\d+)$/,"$1");if(linkname=='tid-link'){pagelinks[i].onmousedown=topic_link_event_mousedown;pagelinks[i].onmouseup=topic_link_event_mouseup;if(!topic_links_init){pagelinks[i].title=pagelinks[i].title+'. '+lang_clickhold;}}}topic_links_init=1;}function topic_link_event_mousedown(event){event=global_cancel_bubble(event,true);var tid=_get_tid_from_id(this.id);tid_date[tid]=_get_time_now();setTimeout("topic_link_event_timer("+tid+")",5);}function topic_link_event_timer(tid){var timenow=_get_time_now();if(timenow>0&&tid_date[tid]>0&&((timenow-tid_date[tid])>click_delay)){tid_date[tid]=0;span_to_input(tid);return false;}if(tid_date[tid]>0){setTimeout("topic_link_event_timer("+tid+")",5);}else{return false;}}function topic_link_event_mouseup(event){event=global_cancel_bubble(event,true);var tid=_get_tid_from_id(this.id);tid_date[tid]=0;}function _get_time_now(){var mydate=new Date();return mydate.getTime();}function _get_tid_from_id(id){return id.replace( /.*\-(\d+)/,"$1");}function topic_toggle_folder(tid,state){if(!use_enhanced_js){return false;}if(!perm_can_open&&!perm_can_close){return false;}var td_content=document.getElementById('tid-folder-'+tid).innerHTML;if(topic_state[tid]){state=topic_state[tid];}if(state=='closed'){if(!perm_can_open){return false;}if(folders[tid]){td_content=folders[tid];}state='open';}else{if(!perm_can_close){return false;}folders[tid]=td_content;state='closed';}topic_state[tid]=state;do_request_function=function(){if(!xmlobj.readystate_ready_and_ok()){return;}var returned=xmlobj.xmlhandler.responseText;td_content=returned;document.getElementById('tid-folder-'+tid).innerHTML=td_content;};xmlobj=new ajax_request();xmlobj.onreadystatechange(do_request_function);xmlobj.process(ipb_var_base_url+'act=xmlout&do=save-topic&type=openclose&name='+state+'&md5check='+ipb_md5_check+'&tid='+tid);return false;}function span_to_input(tid){if(!use_enhanced_js){return false;}if(!perm_can_edit){return false;}if(_desc_clicked){return false;}span_html[tid]=document.getElementById('tid-span-'+tid).innerHTML;text_html[tid]=document.getElementById('tid-link-'+tid).innerHTML;perm_max_length=perm_max_length?perm_max_length:50;document.getElementById('tid-span-'+tid).innerHTML='<input id="edit-'+tid+'" class="dny-edit-title" maxlength="'+perm_max_length+'" type="text" size="40" value="'+text_html[tid].replace( /"/g,'&quot;')+'" />';//"'
document.getElementById( 'edit-' + tid ).onkeyup       = function( event ) { tid_keypress(event, tid) }
document.getElementById( 'edit-' + tid ).onblur        = function( event ) { tid_blur(tid) }
document.getElementById( 'edit-' + tid ).focus();
return false;
}
function span_desc_to_input( tid )
{
if ( ! use_enhanced_js )
{
return false;
}
if ( ! perm_can_edit )
{
return false;
}
if ( _desc_clicked )
{
return false;
}
_desc_clicked = 1;
desc_html[ tid ] = document.getElementById( 'tid-desc-' + tid ).innerHTML;
document.getElementById( 'tid-desc-' + tid ).innerHTML = '<input id="edit-'+tid+'" maxlength="70" class="dny-edit-title" type="text" size="40" onblur="tid_blur(\''+tid+'\', \'desc\')" onkeypress="tid_keypress(event, \''+tid+'\',\'desc\')" value="'+desc_html[tid].replace( /"/g,'&quot;')+'" />';//"'
document.getElementById( 'edit-'     + tid ).focus();
return false;
}
tid_blur = function( tid, type )
{
new_text = document.getElementById( 'edit-' + tid ).value;
if( type == 'desc' )
{
tid_save( tid, new_text, type );
}
else
{
if ( new_text != "" )
{
tid_save( tid, new_text, type );
}
}
}
tid_keypress = function( evt, tid, type )
{
if ( is_safari )
{
return false;
}
evt      = evt ? evt : window.event;
new_text = document.getElementById( 'edit-' + tid ).value;
if ( ( evt.keyCode == 13 || evt.keyCode == 3 ) && new_text != "" )
{
tid_save( tid, new_text, type );
}
else if( evt.keyCode == 27 )
{
if( type == 'desc' )
{
document.getElementById( 'tid-desc-' + tid ).innerHTML = desc_html[ tid ];
}
else
{
document.getElementById( 'tid-span-' + tid ).innerHTML = span_html[ tid ];
document.getElementById( 'tid-link-' + tid ).innerHTML = text_html[ tid ];
}
return false;
}	
}
tid_save = function( tid, new_text, type )
{
var donotedit = 0;
if ( type == 'desc' )
{
if ( new_text == desc_html[ tid ] )
{
donotedit = 1;
}
_desc_clicked = 0;
document.getElementById( 'tid-desc-' + tid ).innerHTML = new_text;
}
else
{
if ( new_text == text_html[ tid ] )
{
donotedit = 1;
}
type = 'title';
document.getElementById( 'tid-span-' + tid ).innerHTML = span_html[ tid ];
document.getElementById( 'tid-link-' + tid ).innerHTML = new_text;
forum_init_topic_links();
}
if ( donotedit )
{
return false;
}
var url    = ipb_var_base_url + 'act=xmlout&do=save-topic&type='+type+'&md5check='+ipb_md5_check+'&tid='+tid;
var fields = new Array();
fields['md5check'] = ipb_md5_check;
fields['tid']      = tid;
fields['act']      = 'xmlout';
fields['do']       = 'save-topic';
fields['type']     = type;
fields['name']     = new_text;
do_request_function = function()
{
if ( ! xmlobj.readystate_ready_and_ok() )
{
return;
}
var returned = xmlobj.xmlhandler.responseText;
if ( type != 'desc' && ! returned.match( /<null>s<\/null>/ ) )
{
document.getElementById( 'tid-link-' + tid ).innerHTML = returned;
}
};
xmlobj = new ajax_request();
xmlobj.onreadystatechange( do_request_function );
xmlobj.process( url, 'POST', xmlobj.format_for_post(fields) );
return false;
}
function who_posted(tid)
{
window.open( ipb_var_base_url+ "act=Stats&CODE=who&t="+tid, "WhoPosted", "toolbar=no,scrollbars=yes,resizable=yes,width=230,height=300");
}
function checkdelete()
{
if ( ! document.modform.selectedtids.value )
{
return false;
}
isDelete = document.modform.tact.options[document.modform.tact.selectedIndex].value;
if (isDelete == 'delete')
{
formCheck = confirm( lang_suredelete );
if (formCheck == true)
{
return true;
}
else
{
return false;
}
}
}
function forum_select_all()
{
clean                = new Array();
saved                = new Array();
var topics_this_page = new Array();
tmp = document.modform.selectedtids.value;
if ( tmp != "" )
{
saved = tmp.split(",");
}
if( _this_select_all == 0 )
{
var the_topics = document.getElementsByTagName('input');
for ( var i = 0 ; i <= the_topics.length ; i++ )
{
var e = the_topics[i];
if ( e && (e.type == 'hidden') && (! e.disabled) )
{
var s = e.id;
var a = s.replace( /^tid_(.+?)$/, "$1" );
if ( a )
{
try
{
document.getElementById( 'ipb-topic-' + a ).src = selectedbutton;
clean[clean.length]   = a;
topics_this_page[ a ] = 1;
}
catch(err)
{
}
}
}
}
document.getElementById( 'ipb-topics-all' ).src = selectedbutton;
_this_select_all = 1;
}
else
{
var the_topics = document.getElementsByTagName('input');
for ( var i = 0 ; i <= the_topics.length ; i++ )
{
var e = the_topics[i];
if ( e && (e.type == 'hidden') && (! e.disabled) )
{
var s = e.id;
var a = s.replace( /^tid_(.+?)$/, "$1" );
if ( a )
{
try
{
document.getElementById( 'ipb-topic-' + a ).src = unselectedbutton;
topics_this_page[ a ] = 1;
}
catch(err)
{
}
}
}
}
document.getElementById( 'ipb-topics-all' ).src = unselectedbutton;
_this_select_all = 0;
}
for( i = 0 ; i < saved.length; i++ )
{
if ( saved[i] != "" && topics_this_page[ saved[i] ] != 1 )
{
clean[clean.length] = saved[i];
}
}		
newvalue = clean.join(',');
var oldvalue = 0;
for( var k = 0; k < clean.length; k++ )
{
if( topics_this_page[ clean[ k ] ] != 1 )
{
oldvalue++;
}
}
my_setcookie( 'modtids', newvalue, 0 );
document.modform.selectedtids.value = newvalue;
newcount = stacksize(clean);
if( oldvalue > 0 )
{	
document.modform.gobutton.value = ipsclass.html_entity_decode( lang_gobutton ) + ' (' + newcount + ') (' + oldvalue + ' ' + ipsclass.html_entity_decode( lang_otherpage ) +' )';
}
else
{
document.modform.gobutton.value = ipsclass.html_entity_decode( lang_gobutton ) + ' (' + newcount + ')';
}
return false;	
}
function forum_toggle_tid( tid )
{
var saved = new Array();
var clean = new Array();
var add   = 1;
var _img  = document.getElementById( 'ipb-topic-' + tid );
tmp = document.modform.selectedtids.value;
if( tmp != "" )
{
saved = tmp.split(",");
}
for( i = 0 ; i < saved.length; i++ )
{
if ( saved[i] != "" )
{
if ( saved[i] == tid )
{
add = 0;
}
else
{
clean[clean.length] = saved[i];
}
}
}
if ( add )
{
clean[ clean.length ] = tid;
_img.src              = selectedbutton;
}
else
{
_img.src              = unselectedbutton;
}
newvalue             = clean.join(',');
var topics_this_page = new Array();
var oldvalue         = 0;
var the_topics       = document.getElementsByTagName('input');
for ( var i = 0 ; i <= the_topics.length ; i++ )
{
var e = the_topics[i];
if ( e && (e.type == 'hidden') && (! e.disabled) )
{
var s = e.id;
var a = s.replace( /^tid_(.+?)$/, "$1" );
if ( a )
{
topics_this_page[ a ] = 1;
}
}
}
for( var k = 0; k < clean.length; k++ )
{
if ( topics_this_page[ clean[ k ] ] != 1 )
{
oldvalue++;
}
}
my_setcookie( 'modtids', newvalue, 0 );
document.modform.selectedtids.value = newvalue;
newcount = stacksize(clean);
if ( oldvalue > 0 )
{	
document.modform.gobutton.value = ipsclass.html_entity_decode( lang_gobutton ) + ' (' + newcount + ') (' + oldvalue + ' ' + ipsclass.html_entity_decode( lang_otherpage ) +' )';
}
else
{
document.modform.gobutton.value = ipsclass.html_entity_decode( lang_gobutton ) + ' (' + newcount + ')';
}
return false;
}
function multi_page_jump( url_bit, total_posts, per_page )
{
pages = 1;
cur_st = ipb_var_st;
cur_page  = 1;
if ( total_posts % per_page == 0 )
{
pages = total_posts / per_page;
}
else
{
pages = Math.ceil( total_posts / per_page );
}
msg = ipb_lang_tpl_q1 + " " + pages;
if ( cur_st > 0 )
{
cur_page = cur_st / per_page; cur_page = cur_page -1;
}
show_page = 1;
if ( cur_page < pages )
{
show_page = cur_page + 1;
}
if ( cur_page >= pages )
{
show_page = cur_page - 1;
}
else
{
show_page = cur_page + 1;
}
userPage = prompt( msg, show_page );
if ( userPage > 0  )
{
if ( userPage < 1 )     {    userPage = 1;  }
if ( userPage > pages ) { userPage = pages; }
if ( userPage == 1 )    {     start = 0;    }
else { start = (userPage - 1) * per_page; }
window.location = url_bit + "&st=" + start + "&start=" + start;
}
}
function boards_send_marker_update( fid, is_subforum )
{
try
{
var imgsrc = document.getElementById( 'f-'+fid ).innerHTML;
if ( imgsrc )
{
var regex  = new RegExp( "src=['\"](.*/)("+regex_markers+")['\"]");var results=imgsrc.match(regex);if(img_markers[results[2]]){imgsrc=imgsrc.replace(regex,"src='$1"+img_markers[results[2]]+"'");document.getElementById('f-'+fid).innerHTML=imgsrc;}}}catch(e){}var text_return=0;do_request_function=function(){if(!xmlobj.readystate_ready_and_ok()){return;};text_return=xmlobj.xmlhandler.responseText;};xmlobj=new ajax_request();xmlobj.onreadystatechange(do_request_function);xmlobj.process(ipb_var_base_url+'act=xmlout&do=mark-forum&fid='+fid+'&sf='+is_subforum);if(text_return==1){return false;}}


function ajax_request(){this.isIE=false;this.allow_use=use_enhanced_js?true:false;this.xmlhandler=null;this.error_string='';this.nocache=true;this.do_request_functon=function(){};this.loading_fired=0;this.centerdiv=null;}ajax_request.prototype.xml_init=function(){try{this.xmlhandler=new XMLHttpRequest();this.ie=false;this.allow_use=true;return true;}catch(e){try{this.xmlhandler=new ActiveXObject('Microsoft.XMLHTTP');this.ie=true;this.allow_use=true;return true;}catch(e){this.ie=true;this.allow_use=false;return false;}}};ajax_request.prototype.process=function(url,type,post){type=type=="POST"?"POST":"GET";if(this.nocache==true&&type=='GET'){url=this.nocache_url(url);}if(!this.xmlhandler){this.xml_init();}if(!this.readystate_not_ready()){this.xmlhandler.open(type,url,true);if(type=="GET"){this.xmlhandler.send(null);}else{if(typeof(this.xmlhandler.setRequestHeader)!="undefined"){this.xmlhandler.setRequestHeader('Content-Type','application/x-www-form-urlencoded');}this.xmlhandler.send(post);}if(this.xmlhandler.readyState==4&&this.xmlhandler.status==200){return true;}}return false;};ajax_request.prototype.get_element_text_ns=function(prefix,local,parentElem,index){var result="";if(prefix&&this.isIE){result=parentElem.getElementsByTagName(prefix+":"+local)[index];}else{result=parentElem.getElementsByTagName(local)[index];}if(result){if(result.childNodes.length>1){return result.childNodes[1].nodeValue;}else{return result.firstChild.nodeValue;}}else{return "n/a";}};ajax_request.prototype.nocache_url=function(url){var sep=(-1<url.indexOf("?"))?"&":"?";var mydate=new Date();var newurl=url+sep+"__="+mydate.getTime();return newurl;};ajax_request.prototype.format_for_post=function(arrayfields){var str='';try{for(var i in arrayfields){str+=i+'='+this.encodeurl(arrayfields[i])+'&';}}catch(e){}return str;};ajax_request.prototype.encodeurl=function(url){url=url.toString();var regcheck=url.match(/[\x90-\xFF]/g);if(regcheck){for(var i=0;i<i.length;i++){url=url.replace(regcheck[i],'%u00'+(regcheck[i].charCodeAt(0)&0xFF).toString(16).toUpperCase());}}return escape(url).replace(/\+/g,"%2B");};ajax_request.prototype.readystate_not_ready=function(){return(this.xmlhandler.readyState&&(this.xmlhandler.readyState<4));};ajax_request.prototype.readystate_ready_and_ok=function(){return(this.xmlhandler.readyState==4&&this.xmlhandler.status==200)?true:false;};ajax_request.prototype.onreadystatechange=function(event){if(!this.xmlhandler){this.xml_init();}if(typeof(event)=='function'){this.xmlhandler.onreadystatechange=event;}};ajax_request.prototype.show_loading=function(message){if(!this.loading_fired){this.loading_fired=1;if(message){document.getElementById('loading-layer-text').innerHTML=message;}this.centerdiv=new center_div();this.centerdiv.divname='loading-layer';this.centerdiv.move_div();add_shadow('loading-layer-shadow','loading-layer-inner');}return;};ajax_request.prototype.hide_loading=function(){try{if(this.centerdiv&&this.centerdiv.divobj){this.centerdiv.hide_div();}}catch(e){}this.loading_fired=0;return;};ajax_request.prototype.execute_javascript=function(source_code){var text_blocks=new Array();var max_iteration=50;var i=0;while(_match=source_code.match(new RegExp("<script\\s+?type=['\"]text/javascript['\"]>([^`]+?)</script>","i"))){i++;if(i>=max_iteration){break;}else{text_blocks[text_blocks.length]=_match[1];source_code=source_code.replace(_match[0],'');}}try{if(text_blocks.length){for(i=0;i<text_blocks.length;i++){eval(text_blocks[i]);}}}catch(error){}};try{if(use_enhanced_js){use_enhanced_js=ajax_request.prototype.xml_init()?1:0;}}catch(error){var use_enhanced_js=0;}
var gnp_div='get-new-posts_menu';var msg_div='get-new-msgs_menu';var mem_div='get-members';var divobj;var divopen=0;var xmlobj;var reg_img='';var myass_main;var myass_loaded=0;var pm_cycle_count=0;var search_cache={};var posts_st=0;function xml_show_new_posts(st){posts_st=st;xml_myassistant_init('posts');}function xml_myassistant_init(tab){myass_main=document.getElementById('get-myassistant');myass_drag=document.getElementById('myass-drag');myass_content=document.getElementById('myass-content');do_request_function=function(){if(!xmlobj_myass.readystate_ready_and_ok()){return;}var html=xmlobj_myass.xmlhandler.responseText;if(is_ie){html="<iframe id='myass-shim' src='"+ipb_var_image_url+"/iframe.html' class='iframshim' scrolling='no' frameborder='0' style='position:absolute; top:0px; left:0px; right:0px; display: none;'></iframe>"+html;}myass_content.innerHTML=html;if(is_ie){drag_html=myass_drag.innerHTML;main_drag_html="<iframe id='myass-shim-two' src='"+ipb_var_image_url+"/iframe.html' class='iframshim' scrolling='no' frameborder='0' style='position:absolute; top:0px; left:0px; right:0px; display: none;'></iframe>"+drag_html;myass_drag.innerHTML=main_drag_html;}if(is_ie){myass_shim=document.getElementById('myass-shim');myass_shim.style.width=myass_content.offsetWidth;myass_shim.style.height=myass_content.offsetHeight;myass_shim.style.zIndex=myass_content.style.zIndex-1;myass_shim.style.top=myass_content.style.top;myass_shim.style.left=myass_content.style.left;myass_shim.style.display="block";myass_shim_d=document.getElementById('myass-shim-two');myass_shim_d.style.width=myass_drag.offsetWidth;myass_shim_d.style.height=myass_drag.offsetHeight;myass_shim_d.style.zIndex=myass_drag.style.zIndex-1;myass_shim_d.style.top=myass_drag.style.top;myass_shim_d.style.left=myass_drag.style.left;myass_shim_d.style.display="block";}};xmlobj_myass=new ajax_request();xmlobj_myass.onreadystatechange(do_request_function);if(!tab){xmlobj_myass.process(ipb_var_base_url+'act=buddy&xml=1');}else if(tab=='newpms'){var limit_a=0;pm_cycle_count++;if(pm_cycle_count<=ipb_new_msgs){limit_a=pm_cycle_count-1;}else{pm_cycle_count=1;}xmlobj_myass.process(ipb_var_base_url+'act=buddy&xml=1&tab='+tab+'&limit='+limit_a);myass_content.style.width='398px';myass_content.style.overflow='auto';myass_content.style.overflowX='hidden';}else if(tab=='posts'){xmlobj_myass.process(ipb_var_base_url+'act=buddy&xml=1&tab='+tab+'&st='+posts_st);}else{xmlobj_myass.process(ipb_var_base_url+'act=buddy&xml=1&tab='+tab);}myass_main.style.position='absolute';myass_main.style.display='block';myass_main.style.zIndex=99;if(!myass_loaded){var my_width=0;var my_height=0;if(typeof(window.innerWidth)=='number'){my_width=window.innerWidth;my_height=window.innerHeight;}else if(document.documentElement&&(document.documentElement.clientWidth||document.documentElement.clientHeight)){my_width=document.documentElement.clientWidth;my_height=document.documentElement.clientHeight;}else if(document.body&&(document.body.clientWidth||document.body.clientHeight)){my_width=document.body.clientWidth;my_height=document.body.clientHeight;}var divheight=parseInt(myass_main.style.Height);var divwidth=parseInt(myass_main.style.Width);divheight=divheight?divheight:400;divwidth=divwidth?divwidth:400;var divxy=my_getcookie('ipb-myass-div');var co_ords;if(divxy&&divxy!=null){co_ords=divxy.split(',');if(co_ords.length){var final_width=co_ords[0];var final_height=co_ords[1];if(co_ords[0]>my_width){final_width=my_width-divwidth;}if(co_ords[1]>my_height){final_height=my_height-divheight;}myass_main.style.left=final_width+'px';myass_main.style.top=final_height+'px';}}else{myass_main.style.left=my_width/2-(divwidth/2)+'px';myass_main.style.top=my_height/2-(divheight/2)+'px';}Drag.cookiename='ipb-myass-div';Drag.init(myass_drag,myass_main);myass_loaded=1;}};function xml_myassistant_search(url){var keywords=document.getElementById('myass-search-input').value;var msg_field=document.getElementById('myass-search-message');var url=ipb_var_base_url+'act=Search&CODE=01&forums=all&cat_forum=forum&joinname=1&search_in=posts&result_type=topics&xml=1&keywords='+escape(keywords);if(keywords.length<4){msg_field.innerHTML=ipb_myass_chars_lang;return false;}if(search_cache[keywords]){msg_field.innerHTML=search_cache[keywords];return;}do_request_function=function(){if(!xmlobj.readystate_ready_and_ok()){xmlobj.show_loading();return;}xmlobj.hide_loading();var html=xmlobj.xmlhandler.responseText;msg_field.innerHTML=html;search_cache[keywords]=html;};xmlobj=new ajax_request();xmlobj.onreadystatechange(do_request_function);xmlobj.process(url);};function xml_dst_set(url){do_request_function=function(){if(!xmlobj.readystate_ready_and_ok()){return;}var html=xmlobj.xmlhandler.responseText;if(html=='error'){window.location=url.replace('&xml=1','&xml=0');}};xmlobj=new ajax_request();xmlobj.onreadystatechange(do_request_function);xmlobj.process(url);};function init_gd_image(){var reg_img=document.getElementById('gd-antispam');try{reg_img.style.cursor='pointer';}catch(e){reg_img.style.cursor='hand';};reg_img._ready=1;reg_img.onclick=do_change_img;};function do_change_img(){var rc='';var act='Reg';var code='image';var reg_img=document.getElementById('gd-antispam');var qparts=reg_img.src.split("?");if(!reg_img._ready){return false;}if(qparts.length>1){var qvars=qparts[1].split("&");for(var i=0;(i<qvars.length);i++){var qparts=qvars[i].split("=");if(qparts[0]=='rc'){rc=qparts[1];};if(qparts[0]=='act'){act=qparts[1];};if(qparts[0]=='CODE'){code=qparts[1];};};};var url=ipb_var_base_url+'act=xmlout&do=change-gd-img&img='+rc;do_request_function=function(){if(!xmlobj.readystate_ready_and_ok()){return;}var html=xmlobj.xmlhandler.responseText;reg_img.src=ipb_var_base_url+'act='+act+'&CODE='+code+'&rc='+html;var reg_field=document.getElementById('regid');reg_field.value=html;reg_img._ready=1;};reg_img._ready=0;xmlobj=new ajax_request();xmlobj.onreadystatechange(do_request_function);xmlobj.process(url);}
var Drag={obj:null,fx:null,fy:null,cookiename:null,keeponscreen:true,init:function(o,oRoot,minX,maxX,minY,maxY,bSwapHorzRef,bSwapVertRef,fXMapper,fYMapper){o.onmousedown=Drag.start;o.onmouseover=Drag.cursorchange;o.hmode=bSwapHorzRef?false:true;o.vmode=bSwapVertRef?false:true;o.root=oRoot&&oRoot!=null?oRoot:o;if(o.hmode&&isNaN(parseInt(o.root.style.left)))o.root.style.left="0px";if(o.vmode&&isNaN(parseInt(o.root.style.top)))o.root.style.top="0px";if(!o.hmode&&isNaN(parseInt(o.root.style.right)))o.root.style.right="0px";if(!o.vmode&&isNaN(parseInt(o.root.style.bottom)))o.root.style.bottom="0px";o.minX=typeof minX!='undefined'?minX:null;o.minY=typeof minY!='undefined'?minY:null;o.maxX=typeof maxX!='undefined'?maxX:null;o.maxY=typeof maxY!='undefined'?maxY:null;o.xMapper=fXMapper?fXMapper:null;o.yMapper=fYMapper?fYMapper:null;if(Drag.keeponscreen){Drag.my_width=0;Drag.my_height=0;if(typeof(window.innerWidth)=='number'){Drag.my_width=window.innerWidth;Drag.my_height=window.innerHeight;}else if(document.documentElement&&(document.documentElement.clientWidth||document.documentElement.clientHeight)){Drag.my_width=document.documentElement.clientWidth;Drag.my_height=document.documentElement.clientHeight;}else if(document.body&&(document.body.clientWidth||document.body.clientHeight)){Drag.my_width=document.body.clientWidth;Drag.my_height=document.body.clientHeight;}}o.root.onDragStart=new Function();o.root.onDragEnd=new Function();o.root.onDrag=new Function();},cursorchange:function(e){var o=Drag.obj=this;o.style.cursor='move';},start:function(e){var o=Drag.obj=this;e=Drag.fixE(e);var y=parseInt(o.vmode?o.root.style.top:o.root.style.bottom);var x=parseInt(o.hmode?o.root.style.left:o.root.style.right);o.root.onDragStart(x,y);o.lastMouseX=e.clientX;o.lastMouseY=e.clientY;if(o.hmode){if(o.minX!=null)o.minMouseX=e.clientX-x+o.minX;if(o.maxX!=null)o.maxMouseX=o.minMouseX+o.maxX-o.minX;}else{if(o.minX!=null)o.maxMouseX=-o.minX+e.clientX+x;if(o.maxX!=null)o.minMouseX=-o.maxX+e.clientX+x;}if(o.vmode){if(o.minY!=null)o.minMouseY=e.clientY-y+o.minY;if(o.maxY!=null)o.maxMouseY=o.minMouseY+o.maxY-o.minY;}else{if(o.minY!=null)o.maxMouseY=-o.minY+e.clientY+y;if(o.maxY!=null)o.minMouseY=-o.maxY+e.clientY+y;}document.onmousemove=Drag.drag;document.onmouseup=Drag.end;return false;},drag:function(e){e=Drag.fixE(e);var o=Drag.obj;var ey=e.clientY;var ex=e.clientX;var y=parseInt(o.vmode?o.root.style.top:o.root.style.bottom);var x=parseInt(o.hmode?o.root.style.left:o.root.style.right);var nx,ny;if(o.minX!=null)ex=o.hmode?Math.max(ex,o.minMouseX):Math.min(ex,o.maxMouseX);if(o.maxX!=null)ex=o.hmode?Math.min(ex,o.maxMouseX):Math.max(ex,o.minMouseX);if(o.minY!=null)ey=o.vmode?Math.max(ey,o.minMouseY):Math.min(ey,o.maxMouseY);if(o.maxY!=null)ey=o.vmode?Math.min(ey,o.maxMouseY):Math.max(ey,o.minMouseY);nx=x+((ex-o.lastMouseX)*(o.hmode?1:-1));ny=y+((ey-o.lastMouseY)*(o.vmode?1:-1));if(o.xMapper)nx=o.xMapper(y);else if(o.yMapper)ny=o.yMapper(x);if(Drag.keeponscreen){ny=ny<0?0:ny;nx=nx<0?0:nx;if(Drag.my_width){nx=nx>Drag.my_width-parseInt(o.root.style.width)?Drag.my_width-parseInt(o.root.style.width):nx;}}Drag.obj.root.style[o.hmode?"left":"right"]=nx+"px";Drag.obj.root.style[o.vmode?"top":"bottom"]=ny+"px";Drag.obj.lastMouseX=ex;Drag.obj.lastMouseY=ey;Drag.obj.root.onDrag(nx,ny);return false;},end:function(){document.onmousemove=null;document.onmouseup=null;Drag.obj.root.onDragEnd(parseInt(Drag.obj.root.style[Drag.obj.hmode?"left":"right"]),parseInt(Drag.obj.root.style[Drag.obj.vmode?"top":"bottom"]));var o=Drag.obj;fy=parseInt(o.root.style.top);fx=parseInt(o.root.style.left);if(Drag.cookiename){try{ipsclass.my_setcookie(Drag.cookiename,fx+','+fy,1);}catch(e){}}Drag.obj=null;},addEvent:function(elm,evType,fn,useCapture){if(elm.addEventListener){elm.addEventListener(evType,fn,useCapture);return true;}else if(elm.attachEvent){var r=elm.attachEvent('on'+evType,fn);return r;}else{elm['on'+evType]=fn;}},fixE:function(e){if(typeof e=='undefined')e=window.event;if(typeof e.layerX=='undefined')e.layerX=e.offsetX;if(typeof e.layerY=='undefined')e.layerY=e.offsetY;return e;}};
