var md8c89721bcc15a1dba143d93b26b90cc5 = 'function ipsclass() {\n this.cookies = new Array();\n 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\');\n this.settings = {\n \'do_linked_resize\': 0,\n \'resize_percent\': 50\n };\n this.init = function () {\n var _tmp = document.cookie.split(\';\');\n if (_tmp.length) {\n for (i = 0; i < _tmp.length; i++) {\n if (_tmp[i].match(new RegExp(ipb_var_cookieid + \".*$\"))) {\n var _data = _tmp[i].split(\'=\');\n var _key = this.trim(_data[0]);\n var _value = unescape(this.trim(_data[1]));\n if (_key && (!this.in_array(_key, this.ignore_cookies))) {\n this.cookies[_key.replace(ipb_var_cookieid, \'\')] = _value;\n }\n }\n }\n }\n _tmp = null;\n };\n this.trim = function (text) {\n if (typeof (text) == \'undefined\') {\n return \'\';\n }\n text = text.replace(/^\\s+/, \'\');\n return text.replace(/\\s+$/, \'\');\n };\n this.html_entity_decode = function (text) {\n if (typeof ca == \'undefined\') {\n var ca = document.createElement(\'textarea\');\n }\n ca.innerHTML = text.replace(//g, \'>\');\n return ca.value;\n };\n this.in_array = function (needle, haystack) {\n if (!haystack.length) {\n return false;\n }\n for (var i = 0; i < haystack.length; i++) {\n if (haystack[i] === needle) {\n return true;\n }\n }\n return false;\n };\n this.htmlspecialchars = function (text) {\n text = text.replace(//g, \'>\');\n text = text.replace(/\"/g, \'"\');\n return text;\n };\n this.un_htmlspecialchars = function (text) {\n text = text.replace(/</g, \'<\');\n text = text.replace(/>/g, \'>\');\n text = text.replace(/"/g, \'\"\');\n return text;\n };\n this.get_editor_contents = function (editor_id, editor_array) {\n var aIPS_editor = editor_array ? editor_array : IPS_editor;\n if (!editor_id) {\n for (var i in aIPS_editor) {\n if (typeof (aIPS_editor[i]) != \'object\') {\n continue;\n }\n editor_id = i;\n break;\n }\n }\n return aIPS_editor[editor_id].editor_get_contents;\n };\n this.add_editor_contents = function (text, editor_id, editor_array) {\n var aIPS_editor = editor_array ? editor_array : IPS_editor;\n if (!editor_id) {\n for (var i in aIPS_editor) {\n if (typeof (aIPS_editor[i]) != \'object\') {\n continue;\n }\n editor_id = i;\n break;\n }\n }\n return aIPS_editor[editor_id].insert_text(text);\n };\n this.convert_saved_tags_to_display_tags = function (text) {\n text = text.replace(/(<|<|<)!--/, \"{\");\n text = text.replace(/--(>|>|>)/, \"}\");\n return text;\n };\n this.include_javascript = function (_file, div_id) {\n var _doc = (div_id) ? document.getElementById(div_id) : document.getElementsByTagName(\'head\').item(0);\n var _js = document.createElement(\'script\');\n _js.setAttribute(\'language\', \'javascript\');\n _js.setAttribute(\'type\', \'text/javascript\');\n _js.setAttribute(\'src\', _file);\n _doc.appendChild(_js);\n return false;\n };\n this.fade_in_element = function (div) {\n var hash = \'#\';\n var color_items = \"0123456789abcdef\";\n var start_color = \'#ffff66\';\n var orig_color = document.getElementById(div).style.backgroundColor;\n var temp_end = \'#ffffff\';\n var iter = 20;\n var time = 80;\n var rbeg = color_items.indexOf(start_color.substr(1, 1)) * 16 + color_items.indexOf(start_color.substr(2, 1));\n var gbeg = color_items.indexOf(start_color.substr(3, 1)) * 16 + color_items.indexOf(start_color.substr(4, 1));\n var bbeg = color_items.indexOf(start_color.substr(5, 1)) * 16 + color_items.indexOf(start_color.substr(6, 1));\n var rend = color_items.indexOf(temp_end.substr(1, 1)) * 16 + color_items.indexOf(temp_end.substr(2, 1));\n var gend = color_items.indexOf(temp_end.substr(3, 1)) * 16 + color_items.indexOf(temp_end.substr(4, 1));\n var bend = color_items.indexOf(temp_end.substr(5, 1)) * 16 + color_items.indexOf(temp_end.substr(6, 1));\n 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++) {\n 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);\n setTimeout(\'var div = document.getElementById(\"\' + div + \'\"); div.style.backgroundColor = \"\' + hstr + \'\";\', i * time);\n }\n setTimeout(\'var div = document.getElementById(\"\' + div + \'\"); div.style.backgroundColor = \"\' + orig_color + \'\";\', (i + 1) * time);\n };\n this.lang_build_string = function () {\n if (!arguments.length || !arguments) {\n return;\n }\n var string = arguments[0];\n for (var i = 1; i < arguments.length; i++) {\n var match = new RegExp(\'<%\' + i + \'>\', \'gi\');\n string = string.replace(match, arguments[i]);\n }\n return string;\n };\n this.get_id_from_text = function (id) {\n return id.replace(/.*(\\-|_)(\\S+)/, \"$2\");\n };\n this.get_name_from_text = function (id) {\n return id.replace(/(.*)(\\-|_)(\\S+)/, \"$1\");\n };\n this.location_jump = function (url, full) {\n url = url.replace(/&/g, \'&\');\n if (full) {\n window.location.href = url;\n } else {\n window.location.href = ipb_var_base_url + url;\n }\n };\n this.confirm_action = function (url, msg) {\n if (!msg) {\n msg = \'PLEASE CONFIRM:\\nOK to proceed?\';\n }\n if (url) {\n url = url.replace(\'&\', \'&\');\n } else {\n url = \'\';\n }\n if (confirm(msg)) {\n window.location.href = url;\n } else {\n alert(ipb_global_lang[\'action_cancelled\']);\n return false;\n }\n };\n this.pop_up_window = function (url, width, height, name) {\n if (!name) {\n var mydate = new Date();\n name = mydate.getTime();\n }\n var Win = window.open(url.replace(\'&\', \'&\'), name, \'width=\' + width + \',height=\' + height + \',resizable=1,scrollbars=1,location=no,directories=no,status=no,menubar=no,toolbar=no\');\n Win.focus();\n return false;\n };\n this.set_unselectable = function (obj) {\n if (!is_ie4 && typeof (obj.tagName) != \'undefined\') {\n if (obj.hasChildNodes()) {\n for (var i = 0; i < obj.childNodes.length; i++) {\n this.set_unselectable(obj.childNodes[i]);\n }\n }\n obj.unselectable = \'on\';\n }\n };\n this.get_obj_leftpos = function (obj) {\n var curleft = 0;\n if (obj.offsetParent) {\n while (obj.offsetParent) {\n curleft += obj.offsetLeft;\n obj = obj.offsetParent;\n }\n } else if (obj.x) {\n curleft += obj.x;\n }\n return curleft;\n };\n this.get_obj_toppos = function (obj) {\n var curtop = 0;\n if (obj.offsetParent) {\n while (obj.offsetParent) {\n curtop += obj.offsetTop;\n obj = obj.offsetParent;\n }\n } else if (obj.y) {\n curtop += obj.y;\n }\n return curtop;\n };\n this.cancel_bubble = function (obj, extra) {\n if (extra !== false) {\n extra = true;\n }\n if (!obj || is_ie) {\n if (extra) {\n window.event.returnValue = false;\n }\n window.event.cancelBubble = true;\n return window.event;\n } else {\n obj.stopPropagation();\n if (extra) {\n obj.preventDefault();\n }\n return obj;\n }\n };\n this.cancel_bubble_all = function (obj) {\n return ipsclass.cancel_bubble(obj, true);\n };\n this.cancel_bubble_low = function (obj) {\n return ipsclass.cancel_bubble(obj, false);\n };\n this.my_getcookie = function (name) {\n return this.cookies[name];\n };\n this.my_setcookie = function (name, value, sticky) {\n expire = \"\";\n domain = \"\";\n path = \"/\";\n if (sticky) {\n expire = \"; expires=Wed, 1 Jan 2020 00:00:00 GMT\";\n }\n if (ipb_var_cookie_domain != \"\") {\n domain = \'; domain=\' + ipb_var_cookie_domain;\n }\n if (ipb_var_cookie_path != \"\") {\n path = ipb_var_cookie_path;\n }\n document.cookie = ipb_var_cookieid + name + \"=\" + value + \"; path=\" + path + expire + domain + \';\';\n this.cookies[name] = value;\n };\n this.array_stacksize = function (thearray) {\n for (i = 0; i < thearray.length; i++) {\n if ((thearray[i] == \"\") || (thearray[i] == null) || (thearray == \'undefined\')) {\n return i;\n }\n }\n return thearray.length;\n };\n this.array_pushstack = function (thearray, newval) {\n var arraysize = this.array_stacksize(thearray);\n thearray[arraysize] = newval;\n };\n this.array_popstack = function (thearray) {\n var arraysize = this.array_stacksize(thearray);\n var theval = thearray[arraysize - 1];\n delete thearray[arraysize - 1];\n return theval;\n };\n}\n;var input_red = \'input-warn\';\nvar input_green = \'input-ok\';\nvar input_ok_box = \'input-ok-content\';\nvar input_warn_box = \'input-warn-content\';\nvar img_blank = \'blank.gif\';\nvar img_tick = \'aff_tick.gif\';\nvar img_cross = \'aff_cross.gif\';\nvar uagent = navigator.userAgent.toLowerCase();\nvar is_safari = ((uagent.indexOf(\'safari\') != -1) || (navigator.vendor == \"Apple Computer, Inc.\") || (uagent.indexOf(\'konqueror\') != -1) || (uagent.indexOf(\'khtml\') != -1));\nvar is_opera = (uagent.indexOf(\'opera\') != -1);\nvar is_webtv = (uagent.indexOf(\'webtv\') != -1);\nvar is_ie = ((uagent.indexOf(\'msie\') != -1) && (!is_opera) && (!is_safari) && (!is_webtv));\nvar is_ie4 = ((is_ie) && (uagent.indexOf(\"msie 4.\") != -1));\nvar is_ie7 = ((is_ie) && (uagent.indexOf(\"msie 7.\") != -1));\nvar is_moz = (navigator.product == \'Gecko\');\nvar is_ns = ((uagent.indexOf(\'compatible\') == -1) && (uagent.indexOf(\'mozilla\') != -1) && (!is_opera) && (!is_webtv) && (!is_safari));\nvar is_ns4 = ((is_ns) && (parseInt(navigator.appVersion) == 4));\nvar is_win = ((uagent.indexOf(\"win\") != -1) || (uagent.indexOf(\"16bit\") != -1));\nvar is_mac = ((uagent.indexOf(\"mac\") != -1) || (navigator.vendor == \"Apple Computer, Inc.\"));\nvar ua_vers = parseInt(navigator.appVersion);\nvar ipb_pages_shown = 0;\nvar ipb_pages_array = new Array();\nvar ipb_skin_url = ipb_skin_url ? ipb_skin_url: ipb_var_image_url;\nfunction gbl_check_search_box() {\n try {\n var _cb = document.getElementById(\'gbl-search-checkbox\');\n var _fd = document.getElementById(\'gbl-search-forums\');\n if (_cb && _cb.checked && ipb_input_f) {\n _fd.value = ipb_input_f;\n } else {\n _fd.value = \'all\';\n }\n } catch(error) {}\n};\nfunction show_inline_messages() {\n var _string = window.location.toString();\n var _msg_box = null;\n if (_string.indexOf(\'?___msg=\') != -1 || _string.indexOf(\';___msg=\') != -1 || _string.indexOf(\'&___msg=\') != -1) {\n try {\n if (parent.document.getElementById(\'ipd-msg-text\')) {\n _msg_box = parent.document.getElementById(\'ipd-msg-text\');\n } else {\n _msg_box = document.getElementById(\'ipd-msg-text\');\n }\n } catch(error) {\n alert(error);\n }\n var message = _string.replace(/^.*[\\?;&]___msg=(.+?)(&.*$|$)/, \"$1\");\n message = unescape(message);\n if (message_pop_up_lang[message]) {\n try {\n _msg_box.innerHTML = message_pop_up_lang[message];\n centerdiv = new center_div();\n centerdiv.divname = \'ipd-msg-wrapper\';\n centerdiv.move_div();\n var _this_to = setTimeout(\"hide_inline_messages_instant()\", 2000);\n } catch(anerror) {\n alert(message_pop_up_lang[message]);\n }\n }\n }\n};\nfunction show_inline_messages_instant(msg) {\n _msg_box = document.getElementById(\'ipd-msg-text\');\n _msg_box.innerHTML = message_pop_up_lang[msg];\n centerdiv = new center_div();\n centerdiv.divname = \'ipd-msg-wrapper\';\n centerdiv.move_div();\n var _this_to = setTimeout(\"hide_inline_messages_instant()\", 2000);\n};\nfunction hide_inline_messages_instant() {\n try {\n document.getElementById(\'ipd-msg-wrapper\').style.display = \'none\';\n parent.document.getElementById(\'ipd-msg-wrapper\').style.display = \'none\';\n } catch(acold) {}\n};\nfunction iframe_include() {\n this.iframe_id = null;\n this.iframe_obj = null;\n this.iframe_add_to_div = null;\n this.iframe_add_to_div_obj = null;\n this.iframe_main_wrapper = null;\n this.iframe_classname = \'GBL-component-iframe\';\n this.ok_to_go = 1;\n this.iframe_height = 300;\n this.ajax = \'\';\n};\niframe_include.prototype.init = function() {\n try {\n this.iframe_add_to_div_obj = document.getElementById(this.iframe_add_to_div);\n } catch(error) {\n this.ok_to_go = 0;\n }\n};\niframe_include.prototype.include = function(url) {\n if (!this.ok_to_go) {\n return false;\n }\n var iheight = parseInt(this.iframe_add_to_div_obj.style.height);\n var iwidth = parseInt(this.iframe_add_to_div_obj.style.width);\n if (this.iframe_obj) {\n this.iframe_add_to_div_obj.removeChild(this.iframe_obj);\n }\n this.iframe_obj = document.createElement(\'IFRAME\');\n this.iframe_obj.src = url;\n this.iframe_obj.id = this.iframe_id;\n this.iframe_obj.name = this.iframe_id;\n this.iframe_obj.scrolling = \'no\';\n this.iframe_obj.frameBorder = \'no\';\n this.iframe_obj.border = \'0\';\n this.iframe_obj.className = this.iframe_classname;\n this.iframe_obj.style.width = iwidth ? iwidth + \'px\': \'100%\';\n this.iframe_obj.style.height = iheight ? iheight - 5 + \'px\': this.iframe_height + \'px\';\n this.iframe_obj.style.overflow = \'hidden\';\n this.iframe_obj.style.padding = \'0px\';\n this.iframe_obj.style.margin = \'0px\';\n this.ajax = new ajax_request();\n this.iframe_add_to_div_obj.style.padding = \'0px\';\n this.iframe_add_to_div_obj.style.margin = \'0px\';\n if (is_ie && !is_ie7) {\n this.iframe_add_to_div_obj.style.paddingLeft = \'6px\';\n this.iframe_add_to_div_obj.style.paddingRight = \'6px\';\n }\n this.iframe_obj.iframe_loaded = 0;\n this.iframe_obj.iframe_init = 0;\n this.iframe_obj._this = this;\n this.iframe_add_to_div_obj.style.overflow = \'\';\n this.iframe_add_to_div_obj.appendChild(this.iframe_obj);\n this.ajax.show_loading(ajax_load_msg);\n if (is_ie) {\n this.iframe_obj.allowTransparency = true;\n this.iframe_obj.onreadystatechange = this.iframe_on_load_ie;\n } else {\n this.iframe_obj.onload = this.iframe_onload;\n }\n};\niframe_include.prototype.iframe_onload = function(e) {\n var _document = this._this.iframe_obj.contentDocument;\n if (is_safari) {\n _document = window.frames[this.id].document;\n }\n if (!this.iframe_init) {\n this.iframe_init = 1;\n this.iframe_loaded = 1;\n _document.onmousedown = menu_action_close;\n } else {\n this.iframe_loaded = 1;\n _document.onmousedown = menu_action_close;\n }\n this._this.ajax.hide_loading();\n try {\n _document.getElementsByTagName(\'body\')[0].style.padding = \'0px\';\n _document.getElementsByTagName(\'body\')[0].style.margin = \'0px\';\n } catch(error) {}\n var _new_height = parseInt(_document.getElementById(this._this.iframe_main_wrapper).offsetHeight);\n if (_new_height > 0) {\n if (is_safari) {\n _new_height += 3;\n }\n this._this.iframe_obj.style.height = _new_height + \"px\";\n this._this.iframe_add_to_div_obj.style.height = _new_height + \"px\";\n }\n var style = document.getElementsByTagName(\'style\');\n var _new_style = \'\';\n for (i in style) {\n _new_style += \"\\n\" + style[i].innerHTML;\n }\n try {\n _document.getElementsByTagName(\'style\')[0].innerHTML = _new_style;\n } catch(error) {}\n};\niframe_include.prototype.iframe_on_load_ie = function(e) {\n if (this.readyState == \'complete\') {\n var _document = \'\';\n if (this._this.iframe_obj.contentWindow) {\n _document = this._this.iframe_obj.contentWindow.document;\n } else if (this._this.iframe_obj.document) {\n _document = this._this.iframe_obj.document;\n } else {\n _document = window.frames[this.id].document;\n }\n if (!this.iframe_init) {\n this.iframe_init = 1;\n this.iframe_loaded = 1;\n _document.onmousedown = menu_action_close;\n } else {\n this.iframe_loaded = 1;\n _document.onmousedown = menu_action_close;\n }\n var style = document.getElementsByTagName(\'style\');\n var _new_style = \'\';\n for (i in style) {\n if (style[i].innerHTML) {\n _new_style += \"\\n\" + style[i].innerHTML;\n }\n }\n var _urls = _new_style.match(/@import\\s+?url\\(\\s+?[\'\"](.+?)[\'\"]\\s+?\\);/ig);\n if (_urls && _urls.length) {\n for (i = 0; i <= _urls.length; i++) {\n if (typeof(_urls[i]) != \'undefined\') {\n _urls[i] = _urls[i].replace(/@import\\s+?url\\(\\s+?[\'\"](.+?)[\'\"]\\s+?\\);/ig, \"$1\");\n if (typeof(_urls[i]) != \'undefined\') {\n _document.createStyleSheet(_urls[i]);\n }\n }\n }\n }\n this._this.ajax.hide_loading();\n try {\n _document.getElementsByTagName(\'body\')[0].style.padding = \'0px\';\n _document.getElementsByTagName(\'body\')[0].style.margin = \'0px\';\n } catch(error) {}\n var _new_height = parseInt(_document.getElementById(this._this.iframe_main_wrapper).offsetHeight);\n var _new_width = parseInt(_document.getElementById(this._this.iframe_main_wrapper).offsetWidth);\n if (_new_height > 0) {\n this._this.iframe_obj.style.height = _new_height + \"px\";\n this._this.iframe_add_to_div_obj.style.height = _new_height + \"px\";\n }\n if (_new_width > 0) {\n this._this.iframe_obj.style.width = _new_width + \"px\";\n this._this.iframe_add_to_div_obj.style.width = _new_width + \"px\";\n }\n }\n};\nfunction ie_fix_png() {\n if (is_ie) {\n document.onreadystatechange = ie_fix_png_do;\n }\n}\nfunction ie_fix_png_do() {\n if (document.readyState == \'complete\') {\n var pos = navigator.userAgent.indexOf(\"MSIE \");\n var version = navigator.userAgent.substring(pos + 5);\n var blanky = ipb_skin_url + \"/blank.gif\";\n var _sw = screen.width * (parseInt(ipsclass.settings[\'resize_percent\']) / 100);\n if (pos == -1) {\n return false;\n }\n if (! ((version.indexOf(\"5.5\") == 0) || (version.indexOf(\"6\") == 0)) && (navigator.platform == (\"Win32\"))) {\n return;\n }\n var images = document.getElementsByTagName(\'IMG\');\n var _len = images.length;\n if (_len) {\n for (var i = 0; i < _len; i++) {\n if (images[i].src.match(/\\.png$/)) {\n var element = images[i];\n var _width = 0;\n var _height = 0;\n var _src = 0;\n element._width = element._width ? parseInt(element._width) : 0;\n element._resized = parseInt(element._resized);\n if (!element.style.width) {\n _width = element.width;\n }\n if (!element.style.height) {\n _height = element.height;\n }\n _src = element.src;\n if (_width < _sw && !element._resized && element._width < _sw) {\n element.src = blanky;\n if (_width) {\n element.style.width = _width + \"px\";\n }\n if (_height) {\n element.style.height = _height + \"px\";\n }\n element.runtimeStyle.filter = \"progid:DXImageTransform.Microsoft.AlphaImageLoader(src=\'\" + _src + \"\',sizingMethod=\'scale\')\";\n } else {}\n }\n }\n }\n }\n}\nfunction add_onload_event(func) {\n var oldonload = window.onload;\n if (typeof window.onload != \'function\') {\n window.onload = func;\n } else {\n window.onload = function() {\n if (oldonload) {\n oldonload();\n };\n func();\n };\n }\n}\nfunction add_shadow(wrapname, divname) {\n var divobj = document.getElementById(divname);\n var wrapobj = document.getElementById(wrapname);\n if (is_ie) {\n wrapobj.className = \'shadow-ie\';\n wrapobj.style.width = divobj.offsetWidth + 1 + \'px\';\n wrapobj.style.height = divobj.offsetHeight + 1 + \'px\';\n } else {\n wrapobj.className = \'shadow-moz\';\n wrapobj.style.width = divobj.offsetWidth + 0 + \'px\';\n wrapobj.style.height = divobj.offsetHeight + 0 + \'px\';\n }\n}\nfunction global_dst_check(tzo, dst) {\n var op = tzo < 0 ? \'plus\': \'minus\';\n tzo = Math.abs(tzo);\n var dstoffset = Math.abs(new Date().getTimezoneOffset() / 60);\n var dstset = 0;\n var url = ipb_var_base_url + \'act=xmlout&do=dst-autocorrection&md5check=\' + ipb_md5_check;\n if (op == \'plus\') {\n var thisoffset = tzo - dst;\n } else {\n var thisoffset = tzo + dst;\n }\n var math = Math.abs(thisoffset - dstoffset);\n if (math != 0) {\n try {\n xml_dst_set(url + \'&xml=1\');\n dstset = 1;\n } catch(e) {\n dstset = 0;\n }\n if (dstset == 0) {\n window.location = url;\n }\n }\n}\nfunction my_getcookie(name) {\n return ipsclass.my_getcookie(name);\n}\nfunction my_setcookie(name, value, sticky) {\n return ipsclass.my_setcookie(name, value, sticky);\n}\nfunction lang_build_string() {\n if (!arguments.length || !arguments) {\n return;\n }\n var string = arguments[0];\n for (var i = 1; i < arguments.length; i++) {\n var match = new RegExp(\'<%\' + i + \'>\', \'gi\');\n string = string.replace(match, arguments[i]);\n }\n return string;\n}\nfunction friends_pop(extra_url) {\n ipb_var_base_url = ipb_var_base_url.replace(\'&\', \'&\');\n if (extra_url) {\n extra_url = extra_url.replace(\'&\', \'&\');\n } else {\n extra_url = \'\';\n }\n ipsclass.pop_up_window(ipb_var_base_url + \'act=profile&CODE=friends_list_popup\' + extra_url, 450, 400, \'Friends\');\n}\nfunction buddy_pop() {\n var not_loaded_yet = 0;\n if (use_enhanced_js) {\n try {\n xml_myassistant_init();\n not_loaded_yet = 1;\n } catch(e) {\n not_loaded_yet = 0;\n }\n }\n if (!not_loaded_yet) {\n ipb_var_base_url = ipb_var_base_url.replace(\'&\', \'&\');\n window.open(ipb_var_base_url + \'act=buddy\', \'BrowserBuddy\', \'width=250,height=500,resizable=yes,scrollbars=yes\');\n }\n}\nfunction check_enter(pages_id, e) {\n var keypress = e.keyCode ? e.keyCode: e.which ? e.which: e.charCode;\n if (keypress == 13) {\n do_multi_page_jump(pages_id);\n }\n}\nfunction do_multi_page_jump(pages_id) {\n var pages = 1;\n var cur_st = ipb_var_st;\n var cur_page = 1;\n var total_posts = ipb_pages_array[pages_id][2];\n var per_page = ipb_pages_array[pages_id][1];\n var url_bit = ipb_pages_array[pages_id][0];\n var userPage = parseInt(document.getElementById(\'st-\' + pages_id).value);\n var st_type = document.getElementById(\'st-type-\' + pages_id).value;\n st_type = st_type ? st_type: \'st\';\n url_bit = url_bit.replace(new RegExp(\"&\", \"g\"), \'&\');\n if (total_posts % per_page == 0) {\n pages = total_posts / per_page;\n } else {\n pages = Math.ceil(total_posts / per_page);\n }\n if (cur_st > 0) {\n cur_page = cur_st / per_page;\n cur_page = cur_page - 1;\n }\n if (userPage > 0) {\n if (userPage < 1) {\n userPage = 1;\n }\n if (userPage > pages) {\n userPage = pages;\n }\n if (userPage == 1) {\n start = 0;\n } else {\n start = (userPage - 1) * per_page;\n }\n if (start) {\n window.location = url_bit + \"&\" + st_type + \"=\" + start;\n } else {\n window.location = url_bit;\n }\n return false;\n }\n}\nfunction pages_st_focus(pages_id) {\n document.getElementById(\'st-\' + pages_id).focus();\n}\nfunction ShowHide(id1, id2) {\n if (id1 != \'\') toggleview(id1);\n if (id2 != \'\') toggleview(id2);\n}\nfunction my_getbyid(id) {\n itm = null;\n if (document.getElementById) {\n itm = document.getElementById(id);\n } else if (document.all) {\n itm = document.all[id];\n } else if (document.layers) {\n itm = document.layers[id];\n }\n return itm;\n}\nfunction toggleview(id) {\n if (!id) return;\n if (itm = my_getbyid(id)) {\n if (itm.style.display == \"none\") {\n my_show_div(itm);\n } else {\n my_hide_div(itm);\n }\n }\n}\nfunction my_hide_div(itm) {\n if (!itm) return;\n itm.style.display = \"none\";\n}\nfunction my_show_div(itm) {\n if (!itm) return;\n itm.style.display = \"\";\n}\nfunction change_cell_color(id, cl) {\n itm = my_getbyid(id);\n if (itm) {\n itm.className = cl;\n }\n}\nfunction togglecategory(fid, add) {\n saved = new Array();\n clean = new Array();\n if (tmp = ipsclass.my_getcookie(\'collapseprefs\')) {\n saved = tmp.split(\",\");\n }\n for (i = 0; i < saved.length; i++) {\n if (saved[i] != fid && saved[i] != \"\") {\n clean[clean.length] = saved[i];\n }\n }\n if (add) {\n clean[clean.length] = fid;\n my_show_div(my_getbyid(\'fc_\' + fid));\n my_hide_div(my_getbyid(\'fo_\' + fid));\n } else {\n my_show_div(my_getbyid(\'fo_\' + fid));\n my_hide_div(my_getbyid(\'fc_\' + fid));\n }\n ipsclass.my_setcookie(\'collapseprefs\', clean.join(\',\'), 1);\n}\nfunction locationjump(url) {\n window.location = ipb_var_base_url + url;\n}\nfunction chooseskin(obj) {\n choosebox = obj.options[obj.selectedIndex].value;\n extravars = \'\';\n if (choosebox != -1 && !isNaN(choosebox)) {\n if (document.skinselectorbox.skinurlbits.value) {\n extravars = \'&\' + document.skinselectorbox.skinurlbits.value;\n extravars = extravars.replace(/setskin=\\d{1,}/g, \'\');\n extravars = extravars.replace(/skinid=\\d{1,}/g, \'\');\n extravars = extravars.replace(/cal_id=&/g, \'\');\n extravars = extravars.replace(/&{1,}/g, \'&\');\n extravars = extravars.replace(/s=&/g, \'\');\n }\n locationjump(\'setskin=1&skinid=\' + choosebox + extravars);\n }\n}\nfunction chooselang(obj) {\n choosebox = obj.options[obj.selectedIndex].value;\n extravars = \'\';\n if (document.langselectorbox.langurlbits.value) {\n extravars = \'&\' + document.langselectorbox.langurlbits.value;\n extravars = extravars.replace(/setlanguage=\\d{1,}/g, \'\');\n extravars = extravars.replace(/cal_id=&/g, \'\');\n extravars = extravars.replace(/langid=\\w{1,}/g, \'\');\n extravars = extravars.replace(/&{1,}/g, \'&\');\n extravars = extravars.replace(/s=&/g, \'\');\n }\n locationjump(\'setlanguage=1&langid=\' + choosebox + extravars);\n}\nfunction PopUp(url, name, width, height, center, resize, scroll, posleft, postop) {\n showx = \"\";\n showy = \"\";\n if (posleft != 0) {\n X = posleft;\n }\n if (postop != 0) {\n Y = postop;\n }\n if (!scroll) {\n scroll = 1;\n }\n if (!resize) {\n resize = 1;\n }\n if ((parseInt(navigator.appVersion) >= 4) && (center)) {\n X = (screen.width - width) / 2;\n Y = (screen.height - height) / 2;\n }\n if (X > 0) {\n showx = \',left=\' + X;\n }\n if (Y > 0) {\n showy = \',top=\' + Y;\n }\n if (scroll != 0) {\n scroll = 1;\n }\n 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\');\n}\nfunction stacksize(thearray) {\n for (i = 0; i < thearray.length; i++) {\n if ((thearray[i] == \"\") || (thearray[i] == null) || (thearray == \'undefined\')) {\n return i;\n }\n }\n return thearray.length;\n}\nfunction pushstack(thearray, newval) {\n arraysize = stacksize(thearray);\n thearray[arraysize] = newval;\n}\nfunction popstack(thearray) {\n arraysize = stacksize(thearray);\n theval = thearray[arraysize - 1];\n delete thearray[arraysize - 1];\n return theval;\n}\nfunction innerhtml_template_to_html(t) {\n t = t.replace(/<%(\\d+?)>/ig, \"<%$1>\");\n t = t.replace(/%3C%(\\d+?)%3E/ig, \"<%$1>\");\n return t;\n}\nfunction global_cancel_bubble(obj, extra) {\n if (!obj || is_ie) {\n if (extra) {\n window.event.returnValue = false;\n }\n window.event.cancelBubble = true;\n return window.event;\n } else {\n obj.stopPropagation();\n if (extra) {\n obj.preventDefault();\n }\n return obj;\n }\n}\nfunction _get_obj_leftpos(obj) {\n var left = obj.offsetLeft;\n while ((obj = obj.offsetParent) != null) {\n left += obj.offsetLeft;\n }\n return left;\n}\nfunction _get_obj_toppos(obj) {\n var top = obj.offsetTop;\n while ((obj = obj.offsetParent) != null) {\n top += obj.offsetTop;\n }\n return top;\n}\nfunction center_div() {\n this.divname = \'\';\n this.divobj = \'\';\n this.shimobj = \'\';\n}\ncenter_div.prototype.move_div = function() {\n try {\n if (parent.document.getElementById(this.divname)) {\n this._document = parent.document;\n this._window = parent.window;\n }\n } catch(e) {\n return;\n }\n this.divobj = this._document.getElementById(this.divname);\n var my_width = 0;\n var my_height = 0;\n if (typeof(this._window.innerWidth) == \'number\') {\n my_width = this._window.innerWidth;\n my_height = this._window.innerHeight;\n } else if (this._document.documentElement && (this._document.documentElement.clientWidth || this._document.documentElement.clientHeight)) {\n my_width = this._document.documentElement.clientWidth;\n my_height = this._document.documentElement.clientHeight;\n } else if (this._document.body && (this._document.body.clientWidth || this._document.body.clientHeight)) {\n my_width = this._document.body.clientWidth;\n my_height = this._document.body.clientHeight;\n }\n this.divobj.style.position = \'absolute\';\n this.divobj.style.display = \'block\';\n this.divobj.style.zIndex = -1;\n if (is_ie) {\n var layer_html = this.divobj.innerHTML;\n var full_html = \"\" + layer_html;\n this.divobj.innerHTML = full_html;\n }\n var divheight = parseInt(this.divobj.style.height) ? parseInt(this.divobj.style.height) : parseInt(this.divobj.offsetHeight);\n var divwidth = parseInt(this.divobj.style.width) ? parseInt(this.divobj.style.width) : parseInt(this.divobj.offsetWidth);\n divheight = divheight ? divheight: 200;\n divwidth = divwidth ? divwidth: 400;\n var scrolly = this.getYscroll();\n var setX = (my_width - divwidth) / 2;\n var setY = (my_height - divheight) / 2 + scrolly;\n setX = (setX < 0) ? 0: setX;\n setY = (setY < 0) ? 0: setY;\n this.divobj.style.left = setX + \"px\";\n this.divobj.style.top = setY + \"px\";\n this.divobj.style.zIndex = 99;\n};\ncenter_div.prototype.hide_div = function() {\n try {\n if (!this.divobj) {\n return;\n } else {\n this.divobj.style.display = \'none\';\n }\n } catch(e) {\n return;\n }\n};\ncenter_div.prototype.getYscroll = function() {\n var scrollY = 0;\n if (this._document.documentElement && this._document.documentElement.scrollTop) {\n scrollY = this._document.documentElement.scrollTop;\n } else if (this._document.body && this._document.body.scrollTop) {\n scrollY = this._document.body.scrollTop;\n } else if (this._window.pageYOffset) {\n scrollY = this._window.pageYOffset;\n } else if (this._window.scrollY) {\n scrollY = this._window.scrollY;\n }\n return scrollY;\n};\n;//------------------------------------------\n// Invision Power Board v2.1\n// Forums JS File\n// (c) 2005 Invision Power Services, Inc.\n//\n// http://www.invisionboard.com\n//------------------------------------------\n\n/*--------------------------------------------*/\n// INIT\n/*--------------------------------------------*/\n\nvar topic_dates = {};\nvar topic_flags = {};\nvar topic_state = {};\nvar forum_mark_time;\nvar newer_topics = new Array;\nvar newer_count = 0;\nvar flags_count = 0;\nvar forum_id;\nvar url_extra = \'\';\nvar start_int = 0;\nvar forum_mark_sent = 0;\nvar span_html = new Array;\nvar desc_html = new Array;\nvar text_html = new Array;\nvar folders = new Array;\nvar _desc_clicked = 0;\nvar topic_links_init = 0;\n\nvar _this_select_all = 0;\n\nvar tid_date = new Array();\n\nvar click_delay = 1200; //microseconds (1.2 seconds)\n\n/*--------------------------------------------*/\n// Pop up mod options\n/*--------------------------------------------*/\n\nfunction forum_mod_pop( fid )\n{\n try\n {\n menu_action_close();\n }\n catch(e) { }\n \n PopUp( ipb_var_base_url + \'act=mod&CODE=prune_start&f=\'+fid+\'&auth_key=\'+ipb_md5_check, \'PRUNE\', 600,500);\n}\n\n/*--------------------------------------------*/\n// INIT topic links...\n/*--------------------------------------------*/\n\nfunction forum_init_topic_links()\n{\n //----------------------------------\n // Get page links...\n // Gah.. another safari bug\n //----------------------------------\n \n var pagelinks = document.getElementsByTagName(\'a\');\n \n //----------------------------------\n // Sort through and grab topic links\n //----------------------------------\n \n for ( var i = 0 ; i <= pagelinks.length ; i++ )\n {\n try\n {\n if ( ! pagelinks[i].id )\n {\n continue;\n }\n }\n catch(e)\n {\n continue;\n }\n \n var linkid = pagelinks[i].id;\n var linkname = linkid.replace( /^(.*)-(\\d+)$/, \"$1\" );\n \n if ( linkname == \'tid-link\' )\n {\n pagelinks[i].onmousedown = topic_link_event_mousedown;\n pagelinks[i].onmouseup = topic_link_event_mouseup;\n //pagelinks[i].style.cursor = \'text\';\n \n if ( ! topic_links_init )\n {\n pagelinks[i].title = pagelinks[i].title + \'. \' + lang_clickhold;\n }\n }\n }\n \n topic_links_init = 1;\n}\n\n/*--------------------------------------------*/\n// Mousedown, start timer\n/*--------------------------------------------*/\n\nfunction topic_link_event_mousedown( event )\n{\n //----------------------------------\n // Prevent link loading\n //----------------------------------\n \n event = global_cancel_bubble( event, true );\n \n //----------------------------------\n // Get TID\n //----------------------------------\n \n var tid = _get_tid_from_id( this.id );\n \n //----------------------------------\n // Start...\n //----------------------------------\n \n tid_date[ tid ] = _get_time_now();\n\n //----------------------------------\n // Start loop\n //----------------------------------\n \n setTimeout( \"topic_link_event_timer(\"+tid+\")\", 5 );\n}\n\n/*--------------------------------------------*/\n// Event, loop\n/*--------------------------------------------*/\n\nfunction topic_link_event_timer( tid )\n{\n //----------------------------------\n // Get time now\n //----------------------------------\n\n var timenow = _get_time_now();\n \n //----------------------------------\n // Click held for 1.5 s+?\n //----------------------------------\n \n if ( timenow > 0 && tid_date[tid] > 0 && ( (timenow - tid_date[tid] ) > click_delay ) )\n {\n //----------------------------------\n // Yeah.. wipe tid time and convert\n //----------------------------------\n \n tid_date[tid] = 0;\n span_to_input( tid );\n return false;\n }\n \n //----------------------------------\n // Not wiped? loop on!\n //----------------------------------\n \n if ( tid_date[tid] > 0 )\n {\n setTimeout( \"topic_link_event_timer(\"+tid+\")\", 5 );\n }\n else\n {\n return false;\n }\n}\n\n/*--------------------------------------------*/\n// Mouseup? Cancel timer to kill the loop\n/*--------------------------------------------*/\n\nfunction topic_link_event_mouseup( event )\n{\n //----------------------------------\n // Prevent link loading\n //----------------------------------\n \n event = global_cancel_bubble( event, true );\n \n //----------------------------------\n // Get TID\n //----------------------------------\n \n var tid = _get_tid_from_id( this.id );\n \n //----------------------------------\n // Reset timer\n //----------------------------------\n \n tid_date[tid] = 0;\n}\n\n/*--------------------------------------------*/\n// Get time now\n/*--------------------------------------------*/\n\nfunction _get_time_now()\n{\n var mydate = new Date();\n return mydate.getTime();\n}\n\n/*--------------------------------------------*/\n// Get TID from ID\n/*--------------------------------------------*/\n\nfunction _get_tid_from_id( id )\n{\n return id.replace( /.*\\-(\\d+)/, \"$1\" );\n}\n\n\n/*--------------------------------------------*/\n// Turn topic title into text input\n/*--------------------------------------------*/\n\nfunction topic_toggle_folder( tid, state )\n{\n //----------------------------------\n // Using fancy js?\n //----------------------------------\n \n if ( ! use_enhanced_js )\n {\n return false;\n }\n \n //----------------------------------\n // Can edit?\n //----------------------------------\n \n if ( ! perm_can_open && ! perm_can_close )\n {\n return false;\n }\n \n var td_content = document.getElementById( \'tid-folder-\' + tid ).innerHTML;\n\n if ( topic_state[ tid ] )\n {\n state = topic_state[ tid ];\n }\n \n if ( state == \'closed\' )\n {\n //----------------------------------\n // Can?\n //----------------------------------\n \n if ( ! perm_can_open )\n {\n return false;\n }\n \n //----------------------------------\n // Topic is locked\n //----------------------------------\n \n if ( folders[ tid ] )\n {\n td_content = folders[ tid ];\n }\n \n state = \'open\';\n }\n else\n {\n //----------------------------------\n // Can?\n //----------------------------------\n \n if ( ! perm_can_close )\n {\n return false;\n }\n \n //----------------------------------\n // Topic isn\'t locked\n //----------------------------------\n \n folders[ tid ] = td_content;\n state = \'closed\';\n }\n \n //-----------------------------------------\n // Store state\n //-----------------------------------------\n \n topic_state[ tid ] = state;\n \n /*--------------------------------------------*/\n // Main function to do on request\n // Must be defined first!!\n /*--------------------------------------------*/\n \n do_request_function = function()\n {\n //----------------------------------\n // Ignore unless we\'re ready to go\n //----------------------------------\n \n if ( ! xmlobj.readystate_ready_and_ok() )\n {\n // Could do a little loading graphic here?\n return;\n }\n \n //----------------------------------\n // INIT\n //----------------------------------\n \n var returned = xmlobj.xmlhandler.responseText;\n \n td_content = returned;\n document.getElementById( \'tid-folder-\' + tid ).innerHTML = td_content;\n };\n \n //----------------------------------\n // LOAD XML\n //----------------------------------\n \n xmlobj = new ajax_request();\n xmlobj.onreadystatechange( do_request_function );\n \n xmlobj.process( ipb_var_base_url + \'act=xmlout&do=save-topic&type=openclose&name=\'+state+\'&md5check=\'+ipb_md5_check+\'&tid=\'+tid );\n \n return false;\n}\n\n/*--------------------------------------------*/\n// Turn topic title into text input\n/*--------------------------------------------*/\n\nfunction span_to_input( tid )\n{\n //----------------------------------\n // Using fancy js?\n //----------------------------------\n \n if ( ! use_enhanced_js )\n {\n return false;\n }\n \n //----------------------------------\n // Can?\n //----------------------------------\n \n if ( ! perm_can_edit )\n {\n return false;\n }\n \n //----------------------------------\n // Prevent double click when desc open\n //----------------------------------\n \n if ( _desc_clicked )\n {\n return false;\n }\n \n span_html[ tid ] = document.getElementById( \'tid-span-\' + tid ).innerHTML;\n text_html[ tid ] = document.getElementById( \'tid-link-\' + tid ).innerHTML;\n \n //----------------------------------\n // Topic title\n //----------------------------------\n \n perm_max_length = perm_max_length ? perm_max_length : 50;\n \n document.getElementById( \'tid-span-\' + tid ).innerHTML = \'\'; //\"\'\n document.getElementById( \'edit-\' + tid ).onkeyup = function( event ) { tid_keypress(event, tid) }\n document.getElementById( \'edit-\' + tid ).onblur = function( event ) { tid_blur(tid) }\n document.getElementById( \'edit-\' + tid ).focus();\n \n return false;\n}\n\n/*--------------------------------------------*/\n// Turn topic DESC into text input\n/*--------------------------------------------*/\n\nfunction span_desc_to_input( tid )\n{\n //----------------------------------\n // Using fancy js?\n //----------------------------------\n \n if ( ! use_enhanced_js )\n {\n return false;\n }\n \n //----------------------------------\n // Can?\n //----------------------------------\n \n if ( ! perm_can_edit )\n {\n return false;\n }\n \n //----------------------------------\n // Prevent double click when desc open\n //----------------------------------\n \n if ( _desc_clicked )\n {\n return false;\n }\n \n _desc_clicked = 1;\n \n desc_html[ tid ] = document.getElementById( \'tid-desc-\' + tid ).innerHTML;\n \n //----------------------------------\n // Topic desc\n //----------------------------------\n \n document.getElementById( \'tid-desc-\' + tid ).innerHTML = \'\'; //\"\'\n document.getElementById( \'edit-\' + tid ).focus();\n \n return false;\n}\n\n/*--------------------------------------------*/\n// BLUR HANDLER\n/*--------------------------------------------*/\n\ntid_blur = function( tid, type )\n{\n new_text = document.getElementById( \'edit-\' + tid ).value;\n \n if( type == \'desc\' )\n {\n tid_save( tid, new_text, type );\n }\n else\n {\n if ( new_text != \"\" )\n {\n tid_save( tid, new_text, type );\n }\n }\n}\n\n/*--------------------------------------------*/\n// KEY PRESS HANDLER\n/*--------------------------------------------*/\n\ntid_keypress = function( evt, tid, type )\n{\n if ( is_safari )\n {\n return false;\n }\n \n evt = evt ? evt : window.event;\n \n new_text = document.getElementById( \'edit-\' + tid ).value;\n \n if ( ( evt.keyCode == 13 || evt.keyCode == 3 ) && new_text != \"\" )\n {\n tid_save( tid, new_text, type );\n }\n else if( evt.keyCode == 27 )\n {\n if( type == \'desc\' )\n {\n document.getElementById( \'tid-desc-\' + tid ).innerHTML = desc_html[ tid ];\n }\n else\n {\n document.getElementById( \'tid-span-\' + tid ).innerHTML = span_html[ tid ];\n document.getElementById( \'tid-link-\' + tid ).innerHTML = text_html[ tid ];\n }\n return false;\n } \n}\n\n/*--------------------------------------------*/\n// UDPATE DB\n/*--------------------------------------------*/\n\ntid_save = function( tid, new_text, type )\n{\n var donotedit = 0;\n \n if ( type == \'desc\' )\n {\n if ( new_text == desc_html[ tid ] )\n {\n donotedit = 1;\n }\n \n _desc_clicked = 0;\n \n document.getElementById( \'tid-desc-\' + tid ).innerHTML = new_text;\n }\n else\n {\n if ( new_text == text_html[ tid ] )\n {\n donotedit = 1;\n }\n \n type = \'title\';\n document.getElementById( \'tid-span-\' + tid ).innerHTML = span_html[ tid ];\n document.getElementById( \'tid-link-\' + tid ).innerHTML = new_text;\n \n //----------------------------------\n // Re-check topic links\n //----------------------------------\n \n forum_init_topic_links();\n }\n \n if ( donotedit )\n {\n return false;\n }\n \n var url = ipb_var_base_url + \'act=xmlout&do=save-topic&type=\'+type+\'&md5check=\'+ipb_md5_check+\'&tid=\'+tid;\n var fields = new Array();\n\n //----------------------------------\n // Populate fields\n //----------------------------------\n \n fields[\'md5check\'] = ipb_md5_check;\n fields[\'tid\'] = tid;\n fields[\'act\'] = \'xmlout\';\n fields[\'do\'] = \'save-topic\';\n fields[\'type\'] = type;\n fields[\'name\'] = new_text;\n \n /*--------------------------------------------*/\n // Main function to do on request\n // Must be defined first!!\n /*--------------------------------------------*/\n \n do_request_function = function()\n {\n //----------------------------------\n // Ignore unless we\'re ready to go\n //----------------------------------\n \n if ( ! xmlobj.readystate_ready_and_ok() )\n {\n // Could do a little loading graphic here?\n return;\n }\n \n //----------------------------------\n // INIT\n //----------------------------------\n \n var returned = xmlobj.xmlhandler.responseText;\n \n if ( type != \'desc\' && ! returned.match( /s<\\/null>/ ) )\n {\n document.getElementById( \'tid-link-\' + tid ).innerHTML = returned;\n }\n };\n \n //----------------------------------\n // LOAD XML\n //----------------------------------\n \n xmlobj = new ajax_request();\n xmlobj.onreadystatechange( do_request_function );\n xmlobj.process( url, \'POST\', xmlobj.format_for_post(fields) );\n\n \n return false;\n}\n\n\n/*--------------------------------------------*/\n// Who posted\n/*--------------------------------------------*/\n\nfunction who_posted(tid)\n{\n window.open( ipb_var_base_url+ \"act=Stats&CODE=who&t=\"+tid, \"WhoPosted\", \"toolbar=no,scrollbars=yes,resizable=yes,width=230,height=300\");\n}\n\n/*--------------------------------------------*/\n// Check delete\n/*--------------------------------------------*/\n\nfunction checkdelete()\n{\n if ( ! document.modform.selectedtids.value )\n {\n return false;\n }\n \n isDelete = document.modform.tact.options[document.modform.tact.selectedIndex].value;\n \n if (isDelete == \'delete\')\n {\n /* formCheck = confirm( lang_suredelete );\n \n if (formCheck == true)\n {\n return true;\n }\n else\n {\n return false;\n } */\n\n return true;\n }\n}\n\n/*--------------------------------------------*/\n// Toggle selection\n/*--------------------------------------------*/\n\nfunction forum_select_all()\n{\n clean = new Array();\n saved = new Array();\n var topics_this_page = new Array();\n \n tmp = document.modform.selectedtids.value;\n \n if ( tmp != \"\" )\n {\n saved = tmp.split(\",\");\n }\n \n if( _this_select_all == 0 )\n {\n var the_topics = document.getElementsByTagName(\'input\');\n \n for ( var i = 0 ; i <= the_topics.length ; i++ )\n {\n var e = the_topics[i];\n \n if ( e && (e.type == \'hidden\') && (! e.disabled) )\n {\n var s = e.id;\n var a = s.replace( /^tid_(.+?)$/, \"$1\" );\n \n if ( a )\n {\n try\n {\n document.getElementById( \'ipb-topic-\' + a ).src = selectedbutton;\n clean[clean.length] = a;\n topics_this_page[ a ] = 1;\n }\n catch(err)\n {\n }\n }\n }\n }\n \n document.getElementById( \'ipb-topics-all\' ).src = selectedbutton;\n \n _this_select_all = 1;\n }\n else\n {\n var the_topics = document.getElementsByTagName(\'input\');\n \n for ( var i = 0 ; i <= the_topics.length ; i++ )\n {\n var e = the_topics[i];\n \n if ( e && (e.type == \'hidden\') && (! e.disabled) )\n {\n var s = e.id;\n var a = s.replace( /^tid_(.+?)$/, \"$1\" );\n \n if ( a )\n {\n try\n {\n document.getElementById( \'ipb-topic-\' + a ).src = unselectedbutton;\n topics_this_page[ a ] = 1;\n }\n catch(err)\n {\n }\n }\n }\n }\n \n document.getElementById( \'ipb-topics-all\' ).src = unselectedbutton;\n \n _this_select_all = 0;\n }\n \n for( i = 0 ; i < saved.length; i++ )\n {\n if ( saved[i] != \"\" && topics_this_page[ saved[i] ] != 1 )\n {\n clean[clean.length] = saved[i];\n }\n } \n \n newvalue = clean.join(\',\');\n \n var oldvalue = 0;\n\n for( var k = 0; k < clean.length; k++ )\n {\n if( topics_this_page[ clean[ k ] ] != 1 )\n {\n oldvalue++;\n }\n }\n \n my_setcookie( \'modtids\', newvalue, 0 );\n \n document.modform.selectedtids.value = newvalue;\n \n newcount = stacksize(clean);\n\n\n var gobutton = $(\'modform\').retrieve(\'$gobutton\', $(\'modform\').getElement(\'button\') || $(\'modform\').getElement(\'input[type=submit]\')),\n set = (gobutton.get(\'tag\') == \'button\' ? \'text\' : \'value\');\n\n if( oldvalue > 0 )\n { \n gobutton.set(set, ipsclass.html_entity_decode( lang_gobutton ) + \' (\' + newcount + \') (\' + oldvalue + \' \' + ipsclass.html_entity_decode( lang_otherpage ) +\' )\');\n }\n else\n {\n gobutton.set(set, ipsclass.html_entity_decode( lang_gobutton ) + \' (\' + newcount + \')\');\n }\n \n return false; \n}\n\nfunction forum_toggle_tid( tid )\n{\n var saved = new Array();\n var clean = new Array();\n var add = 1;\n var _img = document.getElementById( \'ipb-topic-\' + tid );\n \n //-----------------------------------\n // Get form info\n //-----------------------------------\n \n tmp = document.modform.selectedtids.value;\n \n if( tmp != \"\" )\n {\n saved = tmp.split(\",\");\n }\n \n //-----------------------------------\n // Remove bit if exists\n //-----------------------------------\n \n for( i = 0 ; i < saved.length; i++ )\n {\n if ( saved[i] != \"\" )\n {\n if ( saved[i] == tid )\n {\n add = 0;\n }\n else\n {\n clean[clean.length] = saved[i];\n }\n }\n }\n \n //-----------------------------------\n // Add?\n //-----------------------------------\n \n if ( add )\n {\n clean[ clean.length ] = tid;\n _img.src = selectedbutton;\n }\n else\n {\n _img.src = unselectedbutton;\n }\n \n newvalue = clean.join(\',\');\n var topics_this_page = new Array();\n var oldvalue = 0;\n var the_topics = document.getElementsByTagName(\'input\');\n \n for ( var i = 0 ; i <= the_topics.length ; i++ )\n {\n var e = the_topics[i];\n \n if ( e && (e.type == \'hidden\') && (! e.disabled) )\n {\n var s = e.id;\n var a = s.replace( /^tid_(.+?)$/, \"$1\" );\n \n if ( a )\n {\n topics_this_page[ a ] = 1;\n }\n }\n }\n \n for( var k = 0; k < clean.length; k++ )\n {\n if ( topics_this_page[ clean[ k ] ] != 1 )\n {\n oldvalue++;\n }\n }\n \n my_setcookie( \'modtids\', newvalue, 0 );\n \n document.modform.selectedtids.value = newvalue;\n \n newcount = stacksize(clean);\n\n var gobutton = $(\'modform\').retrieve(\'$gobutton\', $(\'modform\').getElement(\'button\') || $(\'modform\').getElement(\'input[type=submit]\')),\n set = (gobutton.get(\'tag\') == \'button\' ? \'text\' : \'value\');\n\n if ( oldvalue > 0 )\n { \n gobutton.set(set, ipsclass.html_entity_decode( lang_gobutton ) + \' (\' + newcount + \') (\' + oldvalue + \' \' + ipsclass.html_entity_decode( lang_otherpage ) +\' )\');\n }\n else\n {\n gobutton.set(set, ipsclass.html_entity_decode( lang_gobutton ) + \' (\' + newcount + \')\');\n }\n \n return false;\n}\n\n/*--------------------------------------------*/\n// Do multi page jump\n/*--------------------------------------------*/\n\nfunction multi_page_jump( url_bit, total_posts, per_page )\n{\n pages = 1;\n cur_st = ipb_var_st;\n cur_page = 1;\n \n if ( total_posts % per_page == 0 )\n {\n pages = total_posts / per_page;\n }\n else\n {\n pages = Math.ceil( total_posts / per_page );\n }\n \n msg = ipb_lang_tpl_q1 + \" \" + pages;\n \n if ( cur_st > 0 )\n {\n cur_page = cur_st / per_page; cur_page = cur_page -1;\n }\n \n show_page = 1;\n \n if ( cur_page < pages )\n {\n show_page = cur_page + 1;\n }\n \n if ( cur_page >= pages )\n {\n show_page = cur_page - 1;\n }\n else\n {\n show_page = cur_page + 1;\n }\n \n userPage = prompt( msg, show_page );\n \n if ( userPage > 0 )\n {\n if ( userPage < 1 ) { userPage = 1; }\n if ( userPage > pages ) { userPage = pages; }\n if ( userPage == 1 ) { start = 0; }\n else { start = (userPage - 1) * per_page; }\n \n window.location = url_bit + \"&st=\" + start + \"&start=\" + start;\n }\n}\n\n\nfunction boards_send_marker_update( fid, is_subforum )\n{\n //----------------------------------\n // Get current image...\n //----------------------------------\n \n try\n {\n var imgsrc = document.getElementById( \'f-\'+fid ).innerHTML;\n \n if ( imgsrc )\n {\n //----------------------------------\n // Find out what img its using...\n //----------------------------------\n \n var regex = new RegExp( \"src=[\'\\\"](.*/)(\"+regex_markers+\")[\'\\\"]\" );\n \n var results = imgsrc.match( regex );\n \n //----------------------------------\n // Got a replacement?\n //----------------------------------\n \n if ( img_markers[ results[2] ] )\n {\n imgsrc = imgsrc.replace( regex, \"src=\'$1\"+img_markers[ results[2] ]+\"\'\" );\n \n document.getElementById( \'f-\'+fid ).innerHTML = imgsrc;\n }\n }\n }\n catch(e){}\n \n var text_return = 0;\n \n /*--------------------------------------------*/\n // Main function to do on request\n // Must be defined first!!\n /*--------------------------------------------*/\n \n do_request_function = function()\n {\n //----------------------------------\n // Ignore unless we\'re ready to go\n //----------------------------------\n \n if ( ! xmlobj.readystate_ready_and_ok() )\n {\n // Could do a little loading graphic here?\n return;\n };\n\n //----------------------------------\n // Do nothing\n //----------------------------------\n \n text_return = xmlobj.xmlhandler.responseText;\n };\n\n xmlobj = new ajax_request();\n xmlobj.onreadystatechange( do_request_function );\n \n xmlobj.process( ipb_var_base_url + \'act=xmlout&do=mark-forum&fid=\'+fid+\'&sf=\'+is_subforum );\n \n if ( text_return == 1 )\n {\n return false;\n }\n}\n\n;var mystored_selection = \'\';\nvar post_cache = new Array();\nvar ajax_loaded = 1;\nvar ignore_cache = new Array();\nvar rate_value = 0;\n//add_onload_event(fix_linked_image_sizes);\n\nfunction fix_linked_image_sizes_attach_thumb(attach_id, width, height, file_size) {\n var _img = \'\"\"\';\n var img_obj = document.getElementById(\'ipb-attach-img-\' + attach_id);\n var div_obj = document.getElementById(\'ipb-attach-div-\' + attach_id);\n var ct_obj = document.getElementById(\'ipb-attach-ct-\' + attach_id);\n var cb_obj = document.getElementById(\'ipb-attach-cb-\' + attach_id);\n var url_obj = document.getElementById(\'ipb-attach-url-\' + attach_id);\n var tbl_obj = document.getElementById(\'ipb-attach-table-\' + attach_id);\n var _width = parseInt(img_obj.width) ? parseInt(img_obj.width) : parseInt(img_obj.style.width);\n var _height = parseInt(img_obj.height) ? parseInt(img_obj.height) : parseInt(img_obj.style.height);\n var _padding = 5;\n var _percent = 0;\n if (is_ie) {\n _width = parseInt(img_obj.currentStyle[\'width\']);\n _height = parseInt(img_obj.currentStyle[\'height\']);\n }\n if (is_safari) {\n tbl_obj.style.display = \'inline-block\';\n }\n if (width && height) {\n _percent = Math.ceil(100 - parseInt(_width / width * 100));\n }\n img_obj.className = \'ipb\';\n img_obj.title = ipb_global_lang[\'click_to_view\'];\n img_obj.onmouseover = fix_attach_images_mouseover;\n img_obj.onclick = function (event) {\n ipsclass.pop_up_window(url_obj.href, width + 20, height + 20);\n ipsclass.cancel_bubble(event);\n };\n div_obj.style.width = (_width > 140 ? _width : 140) + \'px\';\n div_obj.style.height = _height + (_padding * 2) + 28 + \'px\';\n div_obj.className = \'resized-linked-image\';\n div_obj.style.paddingTop = _padding + \"px\";\n div_obj.style.paddingBottom = _padding + \"px\";\n div_obj.style.paddingLeft = _padding + 3 + \"px\";\n div_obj.style.paddingRight = _padding + 3 + \"px\";\n div_obj.style.textAlign = \'center\';\n div_obj.title = ipb_global_lang[\'click_to_view\'];\n ct_obj.style.fontSize = \'9px\';\n cb_obj.style.fontSize = \'9px\';\n cb_obj.style.textAlign = \'center\';\n if (_percent > 0) {\n ct_obj.innerHTML = _img + \' \' + ipsclass.lang_build_string(ipb_global_lang[\'image_attach_percent\'], _percent);\n } else {\n ct_obj.innerHTML = _img + \' \' + ipb_global_lang[\'image_attach_no_percent\'];\n }\n cb_obj.innerHTML = \"\";\n if (width && height) {\n cb_obj.innerHTML = ipsclass.lang_build_string(ipb_global_lang[\'image_attach_dims\'], width, height);\n }\n cb_obj.innerHTML += ipsclass.lang_build_string(ipb_global_lang[\'image_attach_size\'], file_size);\n}\nfunction fix_linked_image_sizes() {\n if (ipsclass.settings[\'do_linked_resize\'] != 1) {\n return true;\n }\n var images = document.getElementsByTagName(\'IMG\');\n var _padding = 2;\n var _count = 0;\n var _img = \'\"\"\';\n var _img2 = \'\"\"\';\n var _sw = screen.width * (parseInt(ipsclass.settings[\'resize_percent\']) / 100);\n for (var i = 0; i < images.length; i++) {\n if (images[i].className == \'linked-image\') {\n _count++;\n if (images[i].width > _sw) {\n var _width = images[i].width;\n var _height = images[i].height;\n var _percent = 0;\n images[i].width = _sw;\n if (images[i].width < _width && _width > 0 && images[i].width > 0) {\n _percent = Math.ceil(parseInt(images[i].width / _width * 100));\n }\n images[i].id = \'--ipb-img-resizer-\' + _count;\n images[i]._resized = 1;\n images[i]._width = _width;\n var div = document.createElement(\'div\');\n div.innerHTML = _img + \' \' + ipsclass.lang_build_string(ipb_global_lang[\'image_resized\'], _percent, _width, _height);\n div.style.width = images[i].width - (_padding * 2) + \'px\';\n div.className = \'resized-linked-image\';\n div.style.paddingTop = _padding + \"px\";\n div.style.paddingBottom = _padding + \"px\";\n div.style.paddingLeft = _padding + \"px\";\n div.style.paddingRight = _padding + \"px\";\n div._is_div = 1;\n div._resize_id = _count;\n div.onclick = fix_linked_images_onclick;\n div.onmouseover = fix_linked_images_mouseover;\n div.title = ipb_global_lang[\'click_to_view\'];\n div._src = images[i].src;\n images[i].parentNode.insertBefore(div, images[i]);\n }\n }\n }\n}\nfunction fix_linked_images_onclick(e) {\n PopUp(this._src, \'popup\', screen.width, screen.height, 1, 1, 1);\n e = ipsclass.cancel_bubble_all(e);\n return false;\n};\n\nfunction fix_attach_images_mouseover(e) {\n try {\n this.style.cursor = \'pointer\';\n } catch (acold) {}\n}\nfunction fix_linked_images_mouseover(e) {\n try {\n this.style.cursor = \'pointer\';\n } catch (acold) {}\n}\nfunction emoticon(ecode, eobj, eurl) {\n ecode = \' \' + ecode + \' \';\n var obj_ta = document.getElementById(\'fastreplyarea\');\n if ((ua_vers >= 4) && is_ie && is_win) {\n if (obj_ta.isTextEdit) {\n obj_ta.focus();\n var sel = document.selection;\n var rng = sel.createRange();\n rng.colapse;\n if ((sel.type == \"Text\" || sel.type == \"None\") && rng != null) {\n if (ecode != \"\" && rng.text.length > 0) ecode = rng.text + ecode;\n rng.text = ecode;\n }\n } else {\n obj_ta.value += ecode;\n }\n } else if (obj_ta.selectionEnd) {\n var ss = obj_ta.selectionStart;\n var st = obj_ta.scrollTop;\n var es = obj_ta.selectionEnd;\n if (es <= 2) {\n es = obj_ta.textLength;\n }\n var start = (obj_ta.value).substring(0, ss);\n var middle = (obj_ta.value).substring(ss, es);\n var end = (obj_ta.value).substring(es, obj_ta.textLength);\n if (obj_ta.selectionEnd - obj_ta.selectionStart > 0) {\n middle = ecode + middle;\n } else {\n middle = ecode + middle;\n }\n obj_ta.value = start + middle + end;\n var cpos = ss + (middle.length);\n obj_ta.selectionStart = cpos;\n obj_ta.selectionEnd = cpos;\n obj_ta.scrollTop = st;\n } else {\n obj_ta.value += ecode;\n }\n obj_ta.focus();\n if ((ua_vers >= 4) && is_ie && is_win && emowindow != \'undefined\') {\n emowindow.focus();\n }\n}\nfunction topic_scroll_to_post(post_id) {\n if (!post_id) {\n return false;\n }\n try {\n var post_main_obj = document.getElementById(\'post-main-\' + post_id);\n } catch (error) {\n var post_main_obj;\n }\n if (post_main_obj) {\n var post_box_top = _get_obj_toppos(post_main_obj);\n if (post_box_top) {\n scroll(0, post_box_top - 30);\n }\n }\n}\nfunction topic_show_ignored_post(pid) {\n try {\n var post_main = document.getElementById(\'post-main-\' + pid);\n var post_ignore = document.getElementById(\'post-ignore-\' + pid);\n post_main.innerHTML = ignore_cache[pid];\n } catch (e) {}\n return false;\n}\nfunction topic_init_ignored_post(pid) {\n try {\n var post_main = document.getElementById(\'post-main-\' + pid);\n var post_ignore = document.getElementById(\'post-ignore-\' + pid);\n ignore_cache[pid] = post_main.innerHTML;\n post_main.innerHTML = post_ignore.innerHTML;\n } catch (e) {}\n}\nfunction ajax_fulleditor_for_edit(post_id) {\n if (post_id && ipb_input_t && ipb_input_f) {\n var _form = document.getElementById(\'quick-edit-form-\' + post_id);\n var _url = ipb_var_base_url + \'act=post&do=edit_post&f=\' + ipb_input_f + \'&t=\' + ipb_input_t + \'&p=\' + post_id + \'&st=\' + ipb_var_st + \'&_from=quickedit\';\n _form.action = _url;\n _form.method = \'POST\';\n _form.submit();\n xmlobj.show_loading();\n return false;\n } else {\n return false;\n }\n}\nfunction ajax_cancel_for_edit(post_id) {\n if (post_cache[post_id] != \"\") {\n document.getElementById(\'post-\' + post_id).innerHTML = post_cache[post_id];\n }\n return false;\n}\nfunction ajax_save_for_edit(post_id) {\n var url = ipb_var_base_url + \'act=xmlout&do=post-edit-save&p=\' + post_id + \'&t=\' + ipb_input_t + \'&f=\' + ipb_input_f;\n var fields = new Array();\n fields[\'md5check\'] = ipb_md5_check;\n fields[\'t\'] = ipb_input_t;\n fields[\'f\'] = ipb_input_f;\n fields[\'p\'] = post_id;\n fields[\'act\'] = \'xmlout\';\n fields[\'do\'] = \'post-edit-save\';\n fields[\'Post\'] = document.getElementById(post_id + \'_textarea\').value;\n fields[\'std_used\'] = 1;\n try {\n fields[\'post_edit_reason\'] = document.getElementById(\'post_edit_reason\').value;\n } catch (err) {}\n var post_check = fields[\'Post\'];\n if (post_check.replace(/^\\s*|\\s*$/g, \"\") == \"\") {\n alert(js_no_empty_post);\n return false;\n }\n do_request_function = function () {\n if (!xmlobj.readystate_ready_and_ok()) {\n xmlobj.show_loading();\n return;\n }\n xmlobj.hide_loading();\n var html = xmlobj.xmlhandler.responseText;\n if (html == \'nopermission\') {\n alert(js_error_no_permission);\n document.getElementById(\'post-\' + post_id).innerHTML = post_cache[post_id];\n } else if (html != \'error\') {\n document.getElementById(\'post-\' + post_id).innerHTML = html;\n xmlobj.execute_javascript(html);\n //fix_linked_image_sizes();\n }\n };\n xmlobj = new ajax_request();\n xmlobj.onreadystatechange(do_request_function);\n var xmlreturn = xmlobj.process(url, \'POST\', xmlobj.format_for_post(fields));\n return false;\n}\nfunction ajax_prep_for_edit(post_id, event) {\n global_cancel_bubble(event, true);\n var post_main_obj = document.getElementById(\'post-main-\' + post_id);\n var post_box_top = _get_obj_toppos(post_main_obj);\n var url = ipb_var_base_url + \'act=xmlout&do=post-edit-show&p=\' + post_id + \'&t=\' + ipb_input_t + \'&f=\' + ipb_input_f;\n post_cache[post_id] = document.getElementById(\'post-\' + post_id).innerHTML;\n try {\n menu_action_close();\n } catch (e) {}\n do_request_function = function () {\n if (!xmlobj.readystate_ready_and_ok()) {\n xmlobj.show_loading();\n return;\n }\n xmlobj.hide_loading();\n var html = xmlobj.xmlhandler.responseText;\n if (html == \'nopermission\') {\n alert(js_error_no_permission);\n } else if (html != \'error\') {\n if (post_box_top) {\n scroll(0, post_box_top - 30);\n }\n document.getElementById(\'post-\' + post_id).innerHTML = html;\n IPS_Lite_Editor[post_id] = new ips_text_editor_lite(post_id);\n IPS_Lite_Editor[post_id].init();\n }\n };\n xmlobj = new ajax_request();\n xmlobj.onreadystatechange(do_request_function);\n xmlobj.process(url);\n return false;\n}\nfunction checkselection() {\n var myselection = \'\';\n if (window.getSelection) {\n myselection = window.getSelection();\n } else if (document.selection) {\n myselection = document.selection.createRange().text;\n } else if (document.getSelection) {\n myselection = document.getSelection();\n }\n if (myselection != \'\' && myselection != null) {\n if (myselection != mystored_selection) {\n document.getElementById(\'fastreply-pastesel\').style.display = \'\';\n mystored_selection = (myselection.toString() != \'\') ? myselection.toString() : null;\n }\n } else {\n mystored_selection = null;\n }\n}\nfunction pasteselection() {\n if (mystored_selection != \'\' && mystored_selection != null) {\n var fr = document.getElementById(\'fastreplyarea\');\n if (fr) {\n fr.value += \'[quote]\' + mystored_selection + \'[/quote]\\n\';\n fr.focus();\n }\n }\n return false;\n}\nfunction link_to_post(pid) {\n temp = prompt(ipb_lang_tt_prompt, ipb_var_base_url + \"showtopic=\" + ipb_input_t + \"&view=findpost&p=\" + pid);\n return false;\n}\nfunction delete_post(theURL) {\n if (confirm(ipb_lang_js_del_1)) {\n window.location.href = theURL;\n } else {\n alert(ipb_lang_js_del_2);\n }\n}\nfunction multiquote_add(id) {\n saved = new Array();\n clean = new Array();\n add = 1;\n\n if (tmp = my_getcookie(\'mqtids\')) {\n saved = tmp.split(\",\");\n }\n for (i = 0; i < saved.length; i++) {\n if (saved[i] != \"\") {\n if (saved[i] == id) {\n add = 0;\n } else {\n clean[clean.length] = saved[i];\n }\n }\n }\n\n if (add) {\n clean[clean.length] = id;\n $(\'btnMq\' + id).addClass(\'inset\');\n } else {\n $(\'btnMq\' + id).removeClass(\'inset\');\n }\n my_setcookie(\'mqtids\', clean.join(\',\'), 0);\n return false;\n}\nfunction checkdelete() {\n if (!document.modform.selectedpids.value) {\n return false;\n }\n isDelete = document.modform.tact.options[document.modform.tact.selectedIndex].value;\n if (isDelete == \'delete\') {\n formCheck = confirm(lang_suredelete);\n if (formCheck == true) {\n return true;\n } else {\n return false;\n }\n }\n}\nfunction topic_toggle_pid(pid) {\n if (isNaN(pid)) {\n return false;\n }\n saved = new Array();\n clean = new Array();\n add = 1;\n tmp = document.modform.selectedpids.value;\n saved = tmp.split(\",\");\n for (i = 0; i < saved.length; i++) {\n if (saved[i] != \"\") {\n if (saved[i] == pid) {\n add = 0;\n } else {\n clean[clean.length] = saved[i];\n }\n }\n }\n if (add) {\n clean[clean.length] = pid;\n eval(\"document.img\" + pid + \".src=selectedbutton\");\n } else {\n eval(\" document.img\" + pid + \".src=unselectedbutton\");\n }\n newvalue = clean.join(\',\');\n my_setcookie(\'modpids\', newvalue, 0);\n document.modform.selectedpids.value = newvalue;\n newcount = stacksize(clean);\n //document.modform.gobutton.value = lang_gobutton + \' (\' + newcount + \')\';\n return false;\n};\n\nfunction topic_rate() {\n this.settings = {\n \'allow_rating\': 0,\n \'default_rating\': 3,\n \'img_star_on\': \'star_filled.gif\',\n \'img_star_selected\': \'star_selected.gif\',\n \'img_star_off\': \'star_empty.gif\',\n \'img_main_star_0\': \'rating_0.gif\',\n \'img_main_star_1\': \'rating_1.gif\',\n \'img_main_star_2\': \'rating_2.gif\',\n \'img_main_star_3\': \'rating_3.gif\',\n \'img_main_star_4\': \'rating_4.gif\',\n \'img_main_star_5\': \'rating_5.gif\',\n \'img_base_url\': \'\',\n \'div_rating_wrapper\': \'topic-rating-wrapper\',\n \'text_rating_image\': \'topic-rating-img-\',\n \'topic-rating-img-main\': \'topic-rating-img-main\',\n \'topic-rating-my-rating\': \'topic-rating-my-rating\',\n \'topic-rating-hits\': \'topic-rating-hits\'\n };\n this.languages = {\n \'img_alt_rate\': \'\',\n \'rate_me\': \'\'\n };\n this.init_rating_images = function () {\n var html = \'\';\n if (!this.settings[\'allow_rating\']) {\n return false;\n }\n for (var i = 1; i <= 5; i++) {\n var _onmouseover = \'\';\n var _onmouseout = \'\';\n var _onclick = \'\';\n var _title = \'\';\n _onmouseover = \' onmouseover=\"this.style.cursor=\\\'pointer\\\'; topic_rate.show_rating_images(\' + i + \', 0)\"\';\n _onmouseout = \' onmouseout=\"topic_rate.show_rating_images(-1, 1)\"\';\n _onclick = \' onclick=\"topic_rate.send_rating(\' + i + \')\"\';\n _title = this.languages[\'img_alt_rate\'];\n html += \"\'-\'\";\n }\n document.getElementById(this.settings[\'div_rating_wrapper\']).innerHTML = this.languages[\'rate_me\'] + \' \' + html;\n this.show_rating_images(this.settings[\'default_rating\'], 1);\n };\n this.send_rating = function (rating) {\n rating = rating ? rating : 0;\n if (rating) {\n var url = ipb_var_base_url + \'act=xmlout&do=topic_rate&t=\' + ipb_input_t + \'&rating=\' + rating;\n do_request_function = function () {\n if (!xmlobj.readystate_ready_and_ok()) {\n xmlobj.show_loading(\'\');\n return;\n }\n xmlobj.hide_loading();\n var html = xmlobj.xmlhandler.responseText;\n if (html == \'no_permission\') {\n alert(js_error_no_permission);\n } else if (html != \'error\') {\n var _result = html.split(\',\');\n var _new_value = _result[0];\n var _new_hits = _result[1];\n var _new_stars = _result[2];\n var _type = _result[3];\n topic_rate.settings[\'default_rating\'] = parseInt(_new_stars);\n topic_rate.show_rating_images(topic_rate.settings[\'default_rating\'], 1);\n menu_action_close();\n document.getElementById(\'topic-rating-hits\').innerHTML = _new_hits;\n document.getElementById(\'topic-rating-my-rating\').innerHTML = rating;\n show_inline_messages_instant(\'rating_updated\');\n }\n };\n xmlobj = new ajax_request();\n xmlobj.onreadystatechange(do_request_function);\n xmlobj.process(url);\n return false;\n }\n };\n this.show_rating_images = function (rating, restore_default) {\n rating = restore_default ? this.settings[\'default_rating\'] : parseInt(rating);\n var star = restore_default ? this.settings[\'img_star_on\'] : this.settings[\'img_star_selected\'];\n for (var i = 1; i <= 5; i++) {\n var _img = document.getElementById(this.settings[\'text_rating_image\'] + i);\n _img.src = this.settings[\'img_base_url\'] + \'/\' + this.settings[\'img_star_off\'];\n }\n for (var i = 1; i <= rating; i++) {\n var _img = document.getElementById(this.settings[\'text_rating_image\'] + i);\n _img.src = this.settings[\'img_base_url\'] + \'/\' + star;\n }\n document.getElementById(this.settings[\'topic-rating-img-main\']).src = this.settings[\'img_base_url\'] + \'/\' + this.settings[\'img_main_star_\' + rating];\n };\n};\n;var IPS_Lite_Editor=new Array();function ips_text_editor_lite(editor_id){this.editor_id=editor_id;this.control_obj=document.getElementById(editor_id+\'-controls\');this.initialized=false;this.buttons=new Array();this.fonts=new Array();this.state=new Array();this.text_obj=document.getElementById(this.editor_id+\'_textarea\');this.open_brace=\'[\';this.close_brace=\']\';this.editor_document=this.text_obj;this.editor_window=this.editor_document;this._ie_cache=null;this.is_ie=is_ie;this.is_moz=is_moz;this.is_opera=is_opera;this.has_focus=false;this.emoticon_window_id=null;this.init=function(){var controls=new Array();if(!this.control_obj){return;}var items=this.control_obj.getElementsByTagName(\"DIV\");for(var i=0;i= 50 )\n{\nif ( direction == \'up\' )\n{\nnew_height = current_height - inc_value;\n}\nelse\n{\nnew_height = current_height + inc_value;\n}\nif ( new_height > 149 )\n{\nthis.text_obj.style.height = new_height + \'px\';\n}\n}\n};\n};\nfunction ips_editor_events()\n{\n}\nips_editor_events.prototype.button_onmouse_event = function(e)\n{\nif ( is_ie )\n{\ne = ipsclass.cancel_bubble(e, true);\n}\nif ( e.type == \'click\' )\n{\nIPS_Lite_Editor[this.editor_id].format_text(e, this.cmd, false, true);\n}\nIPS_Lite_Editor[this.editor_id].set_button_context(this, e.type);\n};\nips_editor_events.prototype.editor_window_onfocus = function(e)\n{\nthis.has_focus = true;\n};\nips_editor_events.prototype.editor_window_onblur = function(e)\n{\nthis.has_focus = false;\n};\nips_editor_events.prototype.editor_document_onkeypress = function(e)\n{ \nif ( e.ctrlKey )\n{\nswitch (String.fromCharCode(e.charCode).toLowerCase())\n{\ncase \'b\': cmd = \'bold\'; break;\ncase \'i\': cmd = \'italic\'; break;\ncase \'u\': cmd = \'underline\'; break;\ndefault: return;\n}\ne.preventDefault();\nIPS_Lite_Editor[this.editor_id].apply_formatting(cmd, false, null);\nreturn false;\n}\n};\n\n;ipsmenu = new ips_menu();\n\nfunction ips_menu() {\n this.menu_registered = new Array();\n this.menu_openfuncs = new Array();\n this.menu_over_css = new Array();\n this.menu_out_css = new Array();\n this.menu_open_event = new Array();\n this.dynamic_register = new Array();\n this.menu_cur_open = null;\n this.dynamic_html = null;\n}\n\nips_menu.prototype.register = function (cid, callback, menu_over_css, menu_out_css, event_type) {\n if (event_type) {\n this.menu_open_event[cid] = (event_type == \'onmouseover\') ? \'onmouseover\' : \'onclick\';\n }\n this.menu_registered[cid] = new ips_menu_class(cid);\n if (callback) {\n this.menu_openfuncs[cid] = callback;\n }\n if (menu_over_css && menu_out_css) {\n this.menu_over_css[cid] = menu_over_css;\n this.menu_out_css[cid] = menu_out_css;\n }\n return this.menu_registered[cid];\n};\n\nips_menu.prototype.close = function () {\n if (this.menu_cur_open) {\n this.menu_registered[this.menu_cur_open].close();\n }\n};\n\nfunction ips_menu_class(cid) {\n this.cid = cid;\n this.initialized = false;\n this.init_control_object();\n this.init_menu();\n};\n\nips_menu_class.prototype.init_control_object = function () {\n this.cid_obj = document.getElementById(this.cid);\n try {\n this.cid_obj.style.cursor = \"pointer\";\n } catch (e) {\n try {\n this.cid_obj.style.cursor = \"hand\";\n } catch (e) {}\n }\n try {\n this.cid_obj.unselectable = true;\n } catch (e) {}\n if (ipsmenu.menu_open_event[this.cid] == \'onmouseover\') {\n try {\n this.cid_obj.onmouseover = ips_menu_events.prototype.event_onclick;\n } catch (e) {}\n } else {\n try {\n this.cid_obj.onclick = ips_menu_events.prototype.event_onclick;\n this.cid_obj.onmouseover = ips_menu_events.prototype.event_onmouseover;\n } catch (e) {}\n };\n try {\n this.cid_obj.onmouseout = ips_menu_events.prototype.event_onmouseout;\n } catch (e) {};\n};\n\nips_menu_class.prototype.init_menu = function () {\n this.cid_menu_obj = document.getElementById(this.cid + \'_menu\');\n if (this.cid_menu_obj) {\n if (this.initialized) {\n return;\n }\n this.cid_menu_obj.style.display = \"none\";\n this.cid_menu_obj.style.position = \"absolute\";\n\n this.cid_menu_obj.style.left = \"0px\";\n\n\n this.cid_menu_obj.style.top = \"0px\";\n this.cid_menu_obj.onclick = ipsclass.cancel_bubble_low;\n this.cid_menu_obj.zIndex = 50;\n this.initialized = true;\n }\n};\n\nips_menu_class.prototype.open = function (obj) {\n $(obj);\n $(this.cid_menu_obj);\n\n if (!this.cid_menu_obj) {\n this.initialized = false;\n this.init_menu();\n }\n if (ipsmenu.menu_cur_open != null) {\n ipsmenu.menu_registered[ipsmenu.menu_cur_open].close();\n }\n if (ipsmenu.menu_cur_open == obj.id) {\n return false;\n }\n ipsmenu.menu_cur_open = obj.id;\n\n /*var left_px = ipsclass.get_obj_leftpos(obj);\n var top_px = ipsclass.get_obj_toppos(obj) + obj.offsetHeight;*/\n\n var ifid = obj.id;\n this.cid_menu_obj.style.zIndex = -1;\n this.cid_menu_obj.style.display = \"\";\n\n /*var width = parseInt(this.cid_menu_obj.style.width) ? parseInt(this.cid_menu_obj.style.width) : this.cid_menu_obj.offsetWidth;\n\n if ((left_px + width) >= document.body.clientWidth) {\n left_px = left_px + obj.offsetWidth - width;\n }\n if (is_moz) {\n top_px -= 1;\n }*/\n\n var position = obj.getPosition();\n position.y = position.y + obj.getSize().y;\n\n document.id(document.body).adopt(this.cid_menu_obj);\n\n this.cid_menu_obj.setPosition(position);\n\n //this.cid_menu_obj.style.left = left_px + \"px\";\n //this.cid_menu_obj.style.top = top_px + \"px\";\n\n //this.cid_menu_obj.style.right=\"13px\";\n\n this.cid_menu_obj.style.zIndex = 100;\n if (ipsmenu.menu_openfuncs[obj.id]) {\n eval(ipsmenu.menu_openfuncs[obj.id]);\n }\n if (is_ie) {\n try {\n if (!document.getElementById(\'if_\' + obj.id)) {\n var iframeobj = document.createElement(\'iframe\');\n iframeobj.src = \'javascript:;\';\n iframeobj.id = \'if_\' + obj.id;\n document.getElementsByTagName(\'body\').appendChild(iframeobj);\n } else {\n var iframeobj = document.getElementById(\'if_\' + obj.id);\n }\n iframeobj.scrolling = \'no\';\n iframeobj.frameborder = \'no\';\n iframeobj.className = \'iframeshim\';\n iframeobj.style.position = \'absolute\';\n iframeobj.style.width = parseInt(this.cid_menu_obj.offsetWidth) + \'px\';\n iframeobj.style.height = parseInt(this.cid_menu_obj.offsetHeight) + \'px\';\n iframeobj.style.top = this.cid_menu_obj.style.top;\n\n iframeobj.style.left = this.cid_menu_obj.style.left;\n\n iframeobj.style.zIndex = 99;\n iframeobj.style.display = \"block\";\n } catch (error) {}\n }\n if (is_safari) {\n try {\n mlinks = this.cid_menu_obj.getElementsByTagName(\'a\');\n for (var i = 0; i <= mlinks.length; i++) {\n if (mlinks[i] != null && mlinks[i].href != null && mlinks[i].href && (mlinks[i].href.indexOf(\'#\', 0) != (mlinks[i].href.length - 1))) {\n mlinks[i].onmousedown = ips_menu_events.prototype.event_safari_onclick_handler;\n mlinks[i].id = \'saf-link-\' + this.cid + i;\n }\n }\n } catch (error) {}\n }\n if (this.cid_obj.editor_id) {\n this.cid_obj.state = true;\n IPS_editor[this.cid_obj.editor_id].set_menu_context(this.cid_obj, \'mousedown\');\n }\n return false;\n};\n\nips_menu_class.prototype.close = function () {\n if (this.cid_menu_obj != null) {\n this.cid_menu_obj.style.display = \"none\";\n } else if (ipsmenu.menu_cur_open != null) {\n ipsmenu.menu_registered[ipsmenu.menu_cur_open].cid_menu_obj.style.display = \'none\';\n }\n ipsmenu.menu_cur_open = null;\n if (this.cid_obj) {\n if (ipsmenu.menu_out_css[this.cid_obj.id]) {\n this.cid_obj.className = ipsmenu.menu_out_css[this.cid_obj.id];\n }\n }\n if (is_ie) {\n try {\n document.getElementById(\'if_\' + this.cid).style.display = \"none\";\n } catch (error) {}\n }\n if (this.cid_obj.editor_id) {\n this.cid_obj.state = false;\n IPS_editor[this.cid_obj.editor_id].set_menu_context(this.cid_obj, \'mouseout\');\n }\n};\n\nips_menu_class.prototype.hover = function (e) {\n if (ipsmenu.menu_cur_open != null) {\n if (ipsmenu.menu_registered[ipsmenu.menu_cur_open].cid != this.id) {\n this.open(e);\n }\n }\n};\n\nfunction ips_menu_events() {};\n\nips_menu_events.prototype.event_safari_onclick_handler = function () {\n if (this.id) {\n window.location = document.getElementById(this.id).href;\n }\n};\n\nips_menu_events.prototype.event_onmouseover = function (e) {\n e = ipsclass.cancel_bubble(e, true);\n ipsmenu.menu_registered[this.id].hover(this);\n if (ipsmenu.menu_over_css[this.id]) {\n this.className = ipsmenu.menu_over_css[this.id];\n }\n};\n\nips_menu_events.prototype.event_onmouseout = function (e) {\n e = ipsclass.cancel_bubble(e, true);\n if (ipsmenu.menu_out_css[this.id] && ipsmenu.menu_cur_open != this.id) {\n this.className = ipsmenu.menu_out_css[this.id];\n }\n};\n\nips_menu_events.prototype.event_onclick = function (e) {\n e = ipsclass.cancel_bubble(e, true);\n if (ipsmenu.menu_cur_open == null) {\n if (ipsmenu.menu_over_css[this.id]) {\n this.className = ipsmenu.menu_over_css[this.id];\n }\n ipsmenu.menu_registered[this.id].open(this);\n } else {\n if (ipsmenu.menu_cur_open == this.id) {\n ipsmenu.menu_registered[this.id].close();\n if (ipsmenu.menu_out_css[this.id]) {\n this.className = ipsmenu.menu_out_css[this.id];\n }\n } else {\n if (ipsmenu.menu_over_css[this.id]) {\n this.className = ipsmenu.menu_over_css[this.id];\n }\n ipsmenu.menu_registered[this.id].open(this);\n };\n }\n};\n\nfunction menu_do_global_init() {\n document.onclick = menu_action_close;\n if (ipsmenu.dynamic_html != null && ipsmenu.dynamic_html != \'\') {}\n if (ipsmenu.dynamic_register.length) {\n for (var i = 0; i < ipsmenu.dynamic_register.length; i++) {\n if (ipsmenu.dynamic_register[i]) {\n ipsmenu.register(ipsmenu.dynamic_register[i]);\n }\n }\n }\n};\n\nfunction menu_action_close(e) {\n try {\n if (e.button == 2 || e.button == 3) {\n return;\n }\n } catch (acold) {};\n ipsmenu.close(e);\n};\n;/*-------------------------------------------------------------------------*/\n// IPS BASIC MENU CLASS (EXTENSION: BUILD SIMPLE MENU)\n// (c) 2005 Invision Power Services, Inc\n// Assumes that \"ips_menu.js\" has been loaded\n/*-------------------------------------------------------------------------*/\n\n//----------------------------------\n// INIT some CSS classes\n//----------------------------------\nvar css_mainwrap = \'popupmenu\';\nvar css_menusep = \'popupmenu-item\';\nvar css_menusep_last = \'popupmenu-item-last\';\n\n//----------------------------------\n// INIT some images\n//----------------------------------\nvar img_item = \"\'V\'\";\nvar img_action = \"\'V\'\";\n\n/*-------------------------------------------------------------------------*/\n// Return formed image\n/*-------------------------------------------------------------------------*/\n\nfunction make_image(img)\n {\n return \"\'-\'\";\n}\n\n/*-------------------------------------------------------------------------*/\n// menu_build_menu\n// cid: ID of opener object (img, div, etc)\n// menuinput: Array of menu entries | Variable of menu HTML\n// complexmenu: Treat as HTML stream if true, else treat as array of HTML\n/*-------------------------------------------------------------------------*/\n\nfunction menu_build_menu(cid, menuinput, complexmenu)\n {\n var html = \"\\n
\\n\";\n\n if (!complexmenu)\n {\n len = parseInt(menuinput.length);\n\n if (len > 0)\n {\n for (var i in menuinput)\n {\n t = parseInt(i) + 1;\n\n thisclass = (t == len) ? css_menusep_last: css_menusep;\n if (typeof(menuinput[i]) === \'string\') {\n if (menuinput[i].match(/^~~NODIV~~/)) {\n html += menuinput[i].replace(/^~~NODIV~~/, \'\');\n } else {\n html += \"
\\n\" + menuinput[i] + \"\\n
\\n\";\n }\n }\n }\n }\n }\n else\n {\n html += menuinput;\n }\n\n html += \"\\n
\\n\";\n\n //----------------------------------\n // Workaround for IE bug which shows\n // select boxes and other windows GUI\n // over divs. Write iframe\n //----------------------------------\n if (is_ie)\n {\n html += \"\\n\" + \'\' + \"\\n\";\n }\n\n //----------------------------------\n // Write the html\n //----------------------------------\n if (html != \'\')\n {\n try {\n document.getElementById(cid).parentNode.innerHTML += html;\n } catch (e) { }\n }\n\n //----------------------------------\n // Register and init\n //----------------------------------\n\n ipsmenu.dynamic_register[ipsmenu.dynamic_register.length + 1] = cid; \n\n}\n\n\n\n\n;/**\n* JS Language File: English\n*/\n\nvar message_pop_up_lang =\n{\n // DEFAULT\n \'error\' : \'An Error Occurred\',\n \'no_permission\' : \'You do not have permission for that action\',\n \'cannot_cont\' : \'Cannot continue with this request\',\n \'settings_updated\' : \'Settings Updated\',\n \n // Custom errors:\n \'pp_date_error\' : \'Date must be a legal valid date\',\n \'pp_comment_error\' : \'You cannot post empty comments\',\n \'pp_comment_not_allowed\' : \'Max comments reached or permission denied\',\n \'pp_friend_exist\' : \'That member does not appear to exist\',\n \'pp_friend_already\' : \'You already have that member as your friend\',\n \'pp_friend_removed\' : \'Friend(s) Removed\',\n \'pp_icq_error\' : \'Your ICQ identity must be numeric\',\n \n // Friend added:\n \'pp_friend_added\' : \'Your friend(s) have been added to your list!\',\n \'pp_friend_added_mod\' : \'Your friend must approve your request\',\n \'pp_friend_approved\' : \'Friend request approved\',\n \n // Comments update\n \'pp_comments_updated\' : \'Comments updated\',\n \'pp_comment_added_mod\' : \"Comment must be approved before it\'s shown\",\n \n // POLL MODULE\n \'already_voted\' : \'You have already voted\',\n \n // ARTICLES MODULE\n \'rating_updated\' : \'Your rating has been updated\',\n \'rating_added\' : \'Your rating has been added\',\n \'rating_already\' : \'You have rated this article already\'\n};\n\n/**\n* Global stuff\n*/\n\nvar ipb_global_lang =\n{\n // 2.3.2\n \'action_cancelled\' : \'OK, action cancelled!\',\n // ERROR\n \'post_upload_not_empty\' : \'You have an item to be uploaded. Click the UPLOAD button to upload it or click OK to continue without uploading\',\n // EDITORS\n \'editor_enter_url\' : \'Please enter the full URL\',\n \'editor_enter_title\' : \'Please enter the title for this item\',\n \'editor_enter_email\' : \'Please enter the email address\',\n \'editor_enter_image\' : \'Please enter the URL for this image\',\n \'editor_enter_list\' : \'Enter a list item\',\n // GENERAL\n \'general_error\' : \'Error\',\n \'general_ok\' : \'OK\',\n \'image_resized\' : \'Reduced: <%1>% of original size [ <%2> x <%3> ] - Click to view full image\',\n \'image_attach_percent\' : \'Reduced <%1>%\',\n \'image_attach_no_percent\' : \'Image Reduced\',\n \'image_attach_dims\' : \'<%1> x <%2>\',\n \'image_attach_size\' : \' (<%1>)\',\n \'click_to_view\' : \'Click to view full image\',\n \'view_full_size\' : \'View full size image\',\n \'visit_my_website\' : \'Visit My Website\'\n};\n\n;function ajax_request() {\n this.isIE = false;\n this.allow_use = use_enhanced_js ? true : false;\n this.xmlhandler = null;\n this.error_string = \'\';\n this.nocache = true;\n this.do_request_functon = function () {};\n this.loading_fired = 0;\n this.centerdiv = null;\n}\najax_request.prototype.xml_init = function () {\n try {\n this.xmlhandler = new XMLHttpRequest();\n this.ie = false;\n this.allow_use = true;\n return true;\n } catch (e) {\n try {\n this.xmlhandler = new ActiveXObject(\'Microsoft.XMLHTTP\');\n this.ie = true;\n this.allow_use = true;\n return true;\n } catch (e) {\n this.ie = true;\n this.allow_use = false;\n return false;\n }\n }\n};\najax_request.prototype.process = function (url, type, post) {\n type = type == \"POST\" ? \"POST\" : \"GET\";\n if (this.nocache == true && type == \'GET\') {\n url = this.nocache_url(url);\n }\n if (!this.xmlhandler) {\n this.xml_init();\n }\n if (!this.readystate_not_ready()) {\n this.xmlhandler.open(type, url, true);\n if (type == \"GET\") {\n this.xmlhandler.send(null);\n } else {\n if (typeof (this.xmlhandler.setRequestHeader) != \"undefined\") {\n this.xmlhandler.setRequestHeader(\'Content-Type\', \'application/x-www-form-urlencoded\');\n }\n this.xmlhandler.send(post);\n }\n if (this.xmlhandler.readyState == 4 && this.xmlhandler.status == 200) {\n return true;\n }\n }\n return false;\n};\najax_request.prototype.get_element_text_ns = function (prefix, local, parentElem, index) {\n var result = \"\";\n if (prefix && this.isIE) {\n result = parentElem.getElementsByTagName(prefix + \":\" + local)[index];\n } else {\n result = parentElem.getElementsByTagName(local)[index];\n }\n if (result) {\n if (result.childNodes.length > 1) {\n return result.childNodes[1].nodeValue;\n } else {\n return result.firstChild.nodeValue;\n }\n } else {\n return \"n/a\";\n }\n};\najax_request.prototype.nocache_url = function (url) {\n var sep = (-1 < url.indexOf(\"?\")) ? \"&\" : \"?\";\n var mydate = new Date();\n var newurl = url + sep + \"__=\" + mydate.getTime();\n return newurl;\n};\najax_request.prototype.format_for_post = function (arrayfields) {\n var str = \'\';\n try {\n for (var i in arrayfields) {\n str += i + \'=\' + this.encodeurl(arrayfields[i]) + \'&\';\n }\n } catch (e) {}\n return str;\n};\najax_request.prototype.encodeurl = function (url) {\n url = url.toString();\n var regcheck = url.match(/[\\x90-\\xFF]/g);\n if (regcheck) {\n for (var i = 0; i < i.length; i++) {\n url = url.replace(regcheck[i], \'%u00\' + (regcheck[i].charCodeAt(0) & 0xFF).toString(16).toUpperCase());\n }\n }\n return escape(url).replace(/\\+/g, \"%2B\");\n};\najax_request.prototype.readystate_not_ready = function () {\n return (this.xmlhandler.readyState && (this.xmlhandler.readyState < 4));\n};\najax_request.prototype.readystate_ready_and_ok = function () {\n return (this.xmlhandler.readyState == 4 && this.xmlhandler.status == 200) ? true : false;\n};\najax_request.prototype.onreadystatechange = function (event) {\n if (!this.xmlhandler) {\n this.xml_init();\n }\n if (typeof (event) == \'function\') {\n this.xmlhandler.onreadystatechange = event;\n }\n};\najax_request.prototype.show_loading = function (message) {\n var loadingLayer = $(\'loading-layer\');\n if(!loadingLayer) return; \n \n if (!this.loading_fired) {\n this.loading_fired = 1;\n if (message) {\n document.getElementById(\'loading-layer-text\').innerHTML = message;\n }\n this.centerdiv = new center_div();\n this.centerdiv.divname = \'loading-layer\';\n this.centerdiv.move_div();\n add_shadow(\'loading-layer-shadow\', \'loading-layer-inner\');\n }\n return;\n};\najax_request.prototype.hide_loading = function () {\n try {\n if (this.centerdiv && this.centerdiv.divobj) {\n this.centerdiv.hide_div();\n }\n } catch (e) {}\n this.loading_fired = 0;\n return;\n};\najax_request.prototype.execute_javascript = function (source_code) {\n var text_blocks = new Array();\n var max_iteration = 50;\n var i = 0;\n while (_match = source_code.match(new RegExp(\"([^`]+?)\", \"i\"))) {\n i++;\n if (i >= max_iteration) {\n break;\n } else {\n text_blocks[text_blocks.length] = _match[1];\n source_code = source_code.replace(_match[0], \'\');\n }\n }\n try {\n if (text_blocks.length) {\n for (i = 0; i < text_blocks.length; i++) {\n eval(text_blocks[i]);\n }\n }\n } catch (error) {}\n};\ntry {\n if (use_enhanced_js) {\n use_enhanced_js = ajax_request.prototype.xml_init() ? 1 : 0;\n }\n} catch (error) {\n var use_enhanced_js = 0;\n}\n;var gnp_div = \'get-new-posts_menu\';\nvar msg_div = \'get-new-msgs_menu\';\nvar mem_div = \'get-members\';\nvar divobj;\nvar divopen = 0;\nvar xmlobj;\nvar reg_img = \'\';\nvar myass_main;\nvar myass_loaded = 0;\nvar pm_cycle_count = 0;\nvar search_cache = {};\nvar posts_st = 0;\n\nfunction xml_show_new_posts(st) {\n posts_st = st;\n xml_myassistant_init(\'posts\');\n}\nfunction xml_myassistant_init(tab) {\n myass_main = document.getElementById(\'get-myassistant\');\n myass_drag = document.getElementById(\'myass-drag\');\n myass_content = document.getElementById(\'myass-content\');\n do_request_function = function () {\n if (!xmlobj_myass.readystate_ready_and_ok()) {\n return;\n }\n var html = xmlobj_myass.xmlhandler.responseText;\n if (is_ie) {\n html = \"\" + html;\n }\n myass_content.innerHTML = html;\n if (is_ie) {\n drag_html = myass_drag.innerHTML;\n main_drag_html = \"\" + drag_html;\n myass_drag.innerHTML = main_drag_html;\n }\n if (is_ie) {\n myass_shim = document.getElementById(\'myass-shim\');\n myass_shim.style.width = myass_content.offsetWidth;\n myass_shim.style.height = myass_content.offsetHeight;\n myass_shim.style.zIndex = myass_content.style.zIndex - 1;\n myass_shim.style.top = myass_content.style.top;\n myass_shim.style.left = myass_content.style.left;\n myass_shim.style.display = \"block\";\n myass_shim_d = document.getElementById(\'myass-shim-two\');\n myass_shim_d.style.width = myass_drag.offsetWidth;\n myass_shim_d.style.height = myass_drag.offsetHeight;\n myass_shim_d.style.zIndex = myass_drag.style.zIndex - 1;\n myass_shim_d.style.top = myass_drag.style.top;\n myass_shim_d.style.left = myass_drag.style.left;\n myass_shim_d.style.display = \"block\";\n }\n };\n xmlobj_myass = new ajax_request();\n xmlobj_myass.onreadystatechange(do_request_function);\n if (!tab) {\n xmlobj_myass.process(ipb_var_base_url + \'act=buddy&xml=1\');\n } else if (tab == \'newpms\') {\n var limit_a = 0;\n pm_cycle_count++;\n if (pm_cycle_count <= ipb_new_msgs) {\n limit_a = pm_cycle_count - 1;\n } else {\n pm_cycle_count = 1;\n }\n xmlobj_myass.process(ipb_var_base_url + \'act=buddy&xml=1&tab=\' + tab + \'&limit=\' + limit_a);\n myass_content.style.width = \'398px\';\n myass_content.style.overflow = \'auto\';\n myass_content.style.overflowX = \'hidden\';\n } else if (tab == \'posts\') {\n xmlobj_myass.process(ipb_var_base_url + \'act=buddy&xml=1&tab=\' + tab + \'&st=\' + posts_st);\n } else {\n xmlobj_myass.process(ipb_var_base_url + \'act=buddy&xml=1&tab=\' + tab);\n }\n myass_main.style.position = \'absolute\';\n myass_main.style.display = \'block\';\n myass_main.style.zIndex = 99;\n if (!myass_loaded) {\n var my_width = 0;\n var my_height = 0;\n if (typeof (window.innerWidth) == \'number\') {\n my_width = window.innerWidth;\n my_height = window.innerHeight;\n } else if (document.documentElement && (document.documentElement.clientWidth || document.documentElement.clientHeight)) {\n my_width = document.documentElement.clientWidth;\n my_height = document.documentElement.clientHeight;\n } else if (document.body && (document.body.clientWidth || document.body.clientHeight)) {\n my_width = document.body.clientWidth;\n my_height = document.body.clientHeight;\n }\n var divheight = parseInt(myass_main.style.Height);\n var divwidth = parseInt(myass_main.style.Width);\n divheight = divheight ? divheight : 400;\n divwidth = divwidth ? divwidth : 400;\n var divxy = my_getcookie(\'ipb-myass-div\');\n var co_ords;\n if (divxy && divxy != null) {\n co_ords = divxy.split(\',\');\n if (co_ords.length) {\n var final_width = co_ords[0];\n var final_height = co_ords[1];\n if (co_ords[0] > my_width) {\n final_width = my_width - divwidth;\n }\n if (co_ords[1] > my_height) {\n final_height = my_height - divheight;\n }\n myass_main.style.left = final_width + \'px\';\n myass_main.style.top = final_height + \'px\';\n }\n } else {\n myass_main.style.left = my_width / 2 - (divwidth / 2) + \'px\';\n myass_main.style.top = my_height / 2 - (divheight / 2) + \'px\';\n }\n Drag.cookiename = \'ipb-myass-div\';\n Drag.init(myass_drag, myass_main);\n myass_loaded = 1;\n }\n};\n\nfunction xml_myassistant_search(url) {\n var keywords = document.getElementById(\'myass-search-input\').value;\n var msg_field = document.getElementById(\'myass-search-message\');\n 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);\n if (keywords.length < 4) {\n msg_field.innerHTML = ipb_myass_chars_lang;\n return false;\n }\n if (search_cache[keywords]) {\n msg_field.innerHTML = search_cache[keywords];\n return;\n }\n do_request_function = function () {\n if (!xmlobj.readystate_ready_and_ok()) {\n xmlobj.show_loading();\n return;\n }\n xmlobj.hide_loading();\n var html = xmlobj.xmlhandler.responseText;\n msg_field.innerHTML = html;\n search_cache[keywords] = html;\n };\n xmlobj = new ajax_request();\n xmlobj.onreadystatechange(do_request_function);\n xmlobj.process(url);\n};\n\nfunction xml_dst_set(url) {\n do_request_function = function () {\n if (!xmlobj.readystate_ready_and_ok()) {\n return;\n }\n var html = xmlobj.xmlhandler.responseText;\n if (html == \'error\') {\n window.location = url.replace(\'&xml=1\', \'&xml=0\');\n }\n };\n xmlobj = new ajax_request();\n xmlobj.onreadystatechange(do_request_function);\n xmlobj.process(url);\n};\n\nfunction init_gd_image() {\n var reg_img = document.getElementById(\'gd-antispam\');\n try {\n reg_img.style.cursor = \'pointer\';\n } catch (e) {\n reg_img.style.cursor = \'hand\';\n };\n reg_img._ready = 1;\n reg_img.onclick = do_change_img;\n};\n\nfunction do_change_img() {\n var rc = \'\';\n var act = \'Reg\';\n var code = \'image\';\n var reg_img = document.getElementById(\'gd-antispam\');\n if (!reg_img._ready) {\n return false;\n }\n var url = ipb_var_base_url + \'act=xmlout&do=change-gd-img&img=\' + rc;\n do_request_function = function () {\n if (!xmlobj.readystate_ready_and_ok()) {\n return;\n }\n var html = xmlobj.xmlhandler.responseText;\n reg_img.src = ipb_var_base_url + \'act=captcha&showImage®id=\' + html;\n var reg_field = document.getElementById(\'regid\');\n reg_field.value = html;\n reg_img._ready = 1;\n };\n reg_img._ready = 0;\n xmlobj = new ajax_request();\n xmlobj.onreadystatechange(do_request_function);\n xmlobj.process(url);\n}\n;var Drag = {\n obj: null,\n fx: null,\n fy: null,\n cookiename: null,\n keeponscreen: true,\n init: function (o, oRoot, minX, maxX, minY, maxY, bSwapHorzRef, bSwapVertRef, fXMapper, fYMapper) {\n o.onmousedown = Drag.start;\n o.onmouseover = Drag.cursorchange;\n o.hmode = bSwapHorzRef ? false : true;\n o.vmode = bSwapVertRef ? false : true;\n o.root = oRoot && oRoot != null ? oRoot : o;\n if (o.hmode && isNaN(parseInt(o.root.style.left))) o.root.style.left = \"0px\";\n if (o.vmode && isNaN(parseInt(o.root.style.top))) o.root.style.top = \"0px\";\n if (!o.hmode && isNaN(parseInt(o.root.style.right))) o.root.style.right = \"0px\";\n if (!o.vmode && isNaN(parseInt(o.root.style.bottom))) o.root.style.bottom = \"0px\";\n o.minX = typeof minX != \'undefined\' ? minX : null;\n o.minY = typeof minY != \'undefined\' ? minY : null;\n o.maxX = typeof maxX != \'undefined\' ? maxX : null;\n o.maxY = typeof maxY != \'undefined\' ? maxY : null;\n o.xMapper = fXMapper ? fXMapper : null;\n o.yMapper = fYMapper ? fYMapper : null;\n if (Drag.keeponscreen) {\n Drag.my_width = 0;\n Drag.my_height = 0;\n if (typeof (window.innerWidth) == \'number\') {\n Drag.my_width = window.innerWidth;\n Drag.my_height = window.innerHeight;\n } else if (document.documentElement && (document.documentElement.clientWidth || document.documentElement.clientHeight)) {\n Drag.my_width = document.documentElement.clientWidth;\n Drag.my_height = document.documentElement.clientHeight;\n } else if (document.body && (document.body.clientWidth || document.body.clientHeight)) {\n Drag.my_width = document.body.clientWidth;\n Drag.my_height = document.body.clientHeight;\n }\n }\n o.root.onDragStart = new Function();\n o.root.onDragEnd = new Function();\n o.root.onDrag = new Function();\n },\n cursorchange: function (e) {\n var o = Drag.obj = this;\n o.style.cursor = \'move\';\n },\n start: function (e) {\n var o = Drag.obj = this;\n e = Drag.fixE(e);\n var y = parseInt(o.vmode ? o.root.style.top : o.root.style.bottom);\n var x = parseInt(o.hmode ? o.root.style.left : o.root.style.right);\n o.root.onDragStart(x, y);\n o.lastMouseX = e.clientX;\n o.lastMouseY = e.clientY;\n if (o.hmode) {\n if (o.minX != null) o.minMouseX = e.clientX - x + o.minX;\n if (o.maxX != null) o.maxMouseX = o.minMouseX + o.maxX - o.minX;\n } else {\n if (o.minX != null) o.maxMouseX = -o.minX + e.clientX + x;\n if (o.maxX != null) o.minMouseX = -o.maxX + e.clientX + x;\n }\n if (o.vmode) {\n if (o.minY != null) o.minMouseY = e.clientY - y + o.minY;\n if (o.maxY != null) o.maxMouseY = o.minMouseY + o.maxY - o.minY;\n } else {\n if (o.minY != null) o.maxMouseY = -o.minY + e.clientY + y;\n if (o.maxY != null) o.minMouseY = -o.maxY + e.clientY + y;\n }\n document.onmousemove = Drag.drag;\n document.onmouseup = Drag.end;\n return false;\n },\n drag: function (e) {\n e = Drag.fixE(e);\n var o = Drag.obj;\n var ey = e.clientY;\n var ex = e.clientX;\n var y = parseInt(o.vmode ? o.root.style.top : o.root.style.bottom);\n var x = parseInt(o.hmode ? o.root.style.left : o.root.style.right);\n var nx, ny;\n if (o.minX != null) ex = o.hmode ? Math.max(ex, o.minMouseX) : Math.min(ex, o.maxMouseX);\n if (o.maxX != null) ex = o.hmode ? Math.min(ex, o.maxMouseX) : Math.max(ex, o.minMouseX);\n if (o.minY != null) ey = o.vmode ? Math.max(ey, o.minMouseY) : Math.min(ey, o.maxMouseY);\n if (o.maxY != null) ey = o.vmode ? Math.min(ey, o.maxMouseY) : Math.max(ey, o.minMouseY);\n nx = x + ((ex - o.lastMouseX) * (o.hmode ? 1 : -1));\n ny = y + ((ey - o.lastMouseY) * (o.vmode ? 1 : -1));\n if (o.xMapper) nx = o.xMapper(y);\n else if (o.yMapper) ny = o.yMapper(x);\n if (Drag.keeponscreen) {\n ny = ny < 0 ? 0 : ny;\n nx = nx < 0 ? 0 : nx;\n if (Drag.my_width) {\n nx = nx > Drag.my_width - parseInt(o.root.style.width) ? Drag.my_width - parseInt(o.root.style.width) : nx;\n }\n }\n Drag.obj.root.style[o.hmode ? \"left\" : \"right\"] = nx + \"px\";\n Drag.obj.root.style[o.vmode ? \"top\" : \"bottom\"] = ny + \"px\";\n Drag.obj.lastMouseX = ex;\n Drag.obj.lastMouseY = ey;\n Drag.obj.root.onDrag(nx, ny);\n return false;\n },\n end: function () {\n document.onmousemove = null;\n document.onmouseup = null;\n Drag.obj.root.onDragEnd(parseInt(Drag.obj.root.style[Drag.obj.hmode ? \"left\" : \"right\"]), parseInt(Drag.obj.root.style[Drag.obj.vmode ? \"top\" : \"bottom\"]));\n var o = Drag.obj;\n fy = parseInt(o.root.style.top);\n fx = parseInt(o.root.style.left);\n if (Drag.cookiename) {\n try {\n ipsclass.my_setcookie(Drag.cookiename, fx + \',\' + fy, 1);\n } catch (e) {}\n }\n Drag.obj = null;\n },\n addEvent: function (elm, evType, fn, useCapture) {\n if (elm.addEventListener) {\n elm.addEventListener(evType, fn, useCapture);\n return true;\n } else if (elm.attachEvent) {\n var r = elm.attachEvent(\'on\' + evType, fn);\n return r;\n } else {\n elm[\'on\' + evType] = fn;\n }\n },\n fixE: function (e) {\n if (typeof e == \'undefined\') e = window.event;\n if (typeof e.layerX == \'undefined\') e.layerX = e.offsetX;\n if (typeof e.layerY == \'undefined\') e.layerY = e.offsetY;\n return e;\n }\n};\n;var ipsclass = new ipsclass();\nipsclass.init();\nipsclass.settings[\'do_linked_resize\'] = parseInt( \"1\" );\nipsclass.settings[\'resize_percent\'] = parseInt( \"50\" );';