var U_GROUP_TESTER = 1; var U_GROUP_ADMIN = 2; var U_GROUP_EDITOR = 4; var U_GROUP_MOD = 8; var U_GROUP_BUREAU = 16; var U_GROUP_DEV = 32; var U_GROUP_VIP = 64; var U_GROUP_BLOGGER = 128; var U_GROUP_PREMIUM = 256; var U_GROUP_LOCALIZER = 512; var U_GROUP_SALESAGENT = 1024; var U_GROUP_SCREENSHOT = 2048; var U_GROUP_VIDEO = 4096; var U_GROUP_APIONLY = 8192; var U_GROUP_PENDING = 16384; var U_GROUP_STAFF = U_GROUP_ADMIN | U_GROUP_EDITOR | U_GROUP_MOD | U_GROUP_BUREAU | U_GROUP_DEV | U_GROUP_BLOGGER | U_GROUP_LOCALIZER | U_GROUP_SALESAGENT; var U_GROUP_EMPLOYEE = U_GROUP_ADMIN | U_GROUP_BUREAU | U_GROUP_DEV; var U_GROUP_GREEN_TEXT = U_GROUP_MOD | U_GROUP_BUREAU | U_GROUP_DEV; var U_GROUP_MODERATOR = U_GROUP_ADMIN | U_GROUP_MOD | U_GROUP_BUREAU; var U_GROUP_COMMENTS_MODERATOR = U_GROUP_MODERATOR | U_GROUP_LOCALIZER; var U_GROUP_PREMIUM_PERMISSIONS = U_GROUP_PREMIUM | U_GROUP_STAFF | U_GROUP_VIP; function $(z) { if (arguments.length > 1) { var el = []; var len; for (var i = 0, len = arguments.length; i < len; ++i) { el.push($(arguments[i])); } return el; } if (typeof z == 'string') { z = ge(z); } return z; } function $E(e) { if (!e) { if (typeof event != 'undefined') { e = event; } else { return null; } } // Netscape standard (1 = Left, 2 = Middle, 3 = Right) if (e.which) { e._button = e.which; } else { e._button = e.button; // IE8 doesnt have a button set, so add 1 to at least register as a left click if (Browser.ie6789 && e._button) { if (e._button & 4) { e._button = 2; // Middle } else if (e._button & 2) { e._button = 3; // Right } } else { e._button = e.button + 1 } } e._target = e.target ? e.target : e.srcElement; e._wheelDelta = e.wheelDelta ? e.wheelDelta : -e.detail; return e; } function $A(a) { var r = []; for (var i = 0, len = a.length; i < len; ++i) { r.push(a[i]); } return r; } function bindfunc() { args = $A(arguments); var __method = args.shift(); var object = args.shift(); return function() { return __method.apply(object, args.concat($A(arguments))); }; } if (!Function.prototype.bind) { Function.prototype.bind = function() { var __method = this, args = $A(arguments), object = args.shift(); return function() { return __method.apply(object, args.concat($A(arguments))); }; }; } if (!String.prototype.ltrim) { String.prototype.ltrim = function() { return this.replace(/^\s*/, ''); } } if (!String.prototype.rtrim) { String.prototype.rtrim = function() { return this.replace(/\s*$/, ''); } } if (!String.prototype.trim) { String.prototype.trim = function() { return this.ltrim().rtrim(); } } if (!String.prototype.removeAllWhitespace) { String.prototype.removeAllWhitespace = function() { return this.replace('/s+/g', ''); } } function strcmp(a, b) { if (a == b) { return 0; } if (a == null) { return -1; } if (b == null) { return 1; } // Natural sorting for strings starting with a number var _a = parseFloat(a), _b = parseFloat(b); if (!isNaN(_a) && !isNaN(_b) && _a != _b) { return _a < _b ? -1 : 1; } // String comparison done with a native JS function that supports accents and non-latin characters if (typeof a == 'string' && typeof b == 'string') { return a.localeCompare(b); } // Other return a < b ? -1 : 1; } function trim(str) { return str.replace(/(^\s*|\s*$)/g, ''); } function rtrim(z, y) { var a = z.length; while (--a > 0 && z.charAt(a) == y) { } z = z.substring(0, a + 1); if (z == y) { z = ''; } return z; } function sprintf(z) { var i; for (i = 1, len = arguments.length; i < len; ++i) { z = z.replace('$' + i, arguments[i]); } return z; } // This version supports multiple occurences of the same token. function sprintfa(z) { var i; for (i = 1, len = arguments.length; i < len; ++i) { z = z.replace(new RegExp('\\$' + i, 'g'), arguments[i]); } return z; } // This version works with an array object as the paremeter. function sprintfo(z) { if (typeof z == 'object' && z.length) { var args = z; z = args[0]; var i; for (i = 1; i < args.length; ++i) { z = z.replace('$' + i, args[i]); } return z; } } function str_replace(z, a, b) { while (z.indexOf(a) != -1) { z = z.replace(a, b); } return z; } // Encode URL for internal use (e.g. Ajax) function urlencode(z) { z = encodeURIComponent(z); z = str_replace(z, '+', '%2B'); return z; } // Encode URL for visible use (e.g. href) function urlencode2(z) { z = encodeURIComponent(z); z = str_replace(z, '%20', '+'); z = str_replace(z, '%3D', '='); return z; } // Group digits (e.g. 1234 --> 1,234) function number_format(z) { x = ('' + parseFloat(z)).split('.'); z = x[0]; x = x.length > 1 ? "." + x[1] : ''; if (z.length <= 3) { return z + x; } return number_format(z.substr(0, z.length - 3)) + ',' + z.substr(z.length - 3) + x; } function is_array(arr) { return !!(arr && arr.constructor == Array); } function in_array(arr, val, func, idx) { if (arr == null) { return -1; } if (func) { return in_arrayf(arr, val, func, idx); } for (var i = idx || 0, len = arr.length; i < len; ++i) { if (arr[i] == val) { return i; } } return -1; } function in_arrayf(arr, val, func, idx) { for (var i = idx || 0, len = arr.length; i < len; ++i) { if (func(arr[i]) == val) { return i; } } return -1; } function rs() { var e = rs.random; var b = ''; for (var a = 0; a < 16; a++) { var d = Math.floor(Math.random() * e.length); if (a == 0 && d < 11) { d += 10; } b += e.substring(d, d + 1); } return b; } rs.random = "0123456789abcdefghiklmnopqrstuvwxyz"; function isset(name) { return typeof window[name] != "undefined"; } function array_filter(a, f) { var res = []; for (var i = 0, len = a.length; i < len; ++i) { if (f(a[i])) { res.push(a[i]); } } return res; } function array_walk(a, f, ud) { var res; for (var i = 0, len = a.length; i < len; ++i) { res = f(a[i], ud, a, i); if (res != null) { a[i] = res; } } } function array_apply(a, f, ud) { var res; for (var i = 0, len = a.length; i < len; ++i) { f(a[i], ud, a, i); } } // Get element function ge(z) { if(typeof z != 'string') { return z; } return document.getElementById(z); } // Get elements by tag name function gE(z, y) { return z.getElementsByTagName(y); } // Create element function ce(z, p, c) { var a = document.createElement(z); if (p) { cOr(a, p); } if (c) { ae(a, c); } return a; } // Delete element function de(z) { if (!z || !z.parentNode) { return; } z.parentNode.removeChild(z); } // Append element function ae(z, y) { if (is_array(y)) { array_apply(y, z.appendChild.bind(z)); return y; } else { return z.appendChild(y); } } // Prepend element function aef(z, y) { return z.insertBefore(y, z.firstChild); } // Empty element function ee(z, y) { if (!y) { y = 0; } while (z.childNodes[y]) { z.removeChild(z.childNodes[y]); } } // Create text element function ct(z) { return document.createTextNode(z); } // Set element's text function st(z, y) { if (z.firstChild && z.firstChild.nodeType == 3) { z.firstChild.nodeValue = y; } else { aef(z, ct(y)); } } // Add "white-space: nowrap" style to element function nw(z) { z.style.whiteSpace = "nowrap"; } // Return false function rf() { return false; } // Return false only if no control key is pressed function rf2(e) { e = $E(e); if (e.ctrlKey || e.shiftKey || e.altKey || e.metaKey) { return; } return false; } // Remove focus from current element function tb() { this.blur(); } function ac(el, fixedPos) { var x = 0, y = 0, el2; while (el) { x += el.offsetLeft; y += el.offsetTop; el2 = el.parentNode; while (el2 && el2 != el.offsetParent && el2.offsetParent) { // Considers scroll position for elements inside an 'overflow: auto' div. if (el2.scrollLeft || el2.scrollTop) { x -= (el2.scrollLeft | 0); y -= (el2.scrollTop | 0); break; } el2 = el2.parentNode; } el = el.offsetParent; } if (isset('Lightbox') && Lightbox.isVisible()) { // Assumes that calls made while the Lightbox is visible are on 'position: fixed' elements. fixedPos = true; } if (fixedPos) { var scroll = g_getScroll(); x += scroll.x; y += scroll.y } var result = [x, y]; result.x = x; result.y = y; return result; } // Attach event function aE(z, y, x) { if (z.addEventListener) { z.addEventListener(y, x, false); } else if (z.attachEvent) { z.attachEvent('on' + y, x); } } // Detach event function dE(z, y, x) { if (z.removeEventListener) { z.removeEventListener(y, x, false); } else if (z.detachEvent) { z.detachEvent('on' + y, x); } } // Stop propagation function sp(z) { if (!z) { z = event; } if (Browser.ie6789) { z.cancelBubble = true } else { z.stopPropagation(); } } // Set cookie function sc(z, y, x, w, v) { var a = new Date(); var b = z + "=" + escape(x) + "; "; a.setDate(a.getDate() + y); b += "expires=" + a.toUTCString() + "; "; if (w) { b += "path=" + w + "; "; } if (v) { b += "domain=" + v + "; "; } document.cookie = b; gc(z); gc.C[z] = x; } // Delete cookie function dc(z) { sc(z, -1); gc.C[z] = null; } // Get all cookies (return value is cached) function gc(z) { if (gc.I == null) { // Initialize cookie table var words = unescape(document.cookie).split("; "); gc.C = {}; for (var i = 0, len = words.length; i < len; ++i) { var pos = words[i].indexOf("="), name, value; if (pos != -1) { name = words[i].substr(0, pos); value = words[i].substr(pos + 1); } else { name = words[i]; value = ""; } gc.C[name] = value; } gc.I = 1; } if (!z) { return gc.C; } else { return gc.C[z]; } } // Prevent element from being selected/dragged (IE only) function ns(a) { if (Browser.ie6789) { a.onfocus = tb; a.onmousedown = a.onselectstart = a.ondragstart = rf; } } // Empty object function eO(z) { for (var p in z) { delete z[p]; } } // Duplicate object function dO(s) { function f(){}; f.prototype = s; return new f; } // Copy object function cO(d, s) { for (var p in s) { if (s[p] !== null && typeof s[p] == "object" && s[p].length) { d[p] = s[p].slice(0); } else { d[p] = s[p]; } } return d; } // Copy object (recursive) function cOr(d, s) { for (var p in s) { if (typeof s[p] == 'object') { if (s[p].length) { d[p] = s[p].slice(0); } else { if (!d[p]) { d[p] = {}; } cOr(d[p], s[p]); } } else { d[p] = s[p]; } } return d; } Browser = { ie: !!(window.attachEvent && !window.opera), opera: !!window.opera, safari: navigator.userAgent.indexOf('Safari') != -1, firefox: navigator.userAgent.indexOf('Firefox') != -1, chrome: navigator.userAgent.indexOf('Chrome') != -1 }; Browser.ie9 = Browser.ie && navigator.userAgent.indexOf('MSIE 9.0') != -1; Browser.ie8 = Browser.ie && navigator.userAgent.indexOf('MSIE 8.0') != -1&& !Browser.ie9; Browser.ie7 = Browser.ie && navigator.userAgent.indexOf('MSIE 7.0') != -1 && !Browser.ie8; Browser.ie6 = Browser.ie && navigator.userAgent.indexOf('MSIE 6.0') != -1 && !Browser.ie7; Browser.ie67 = Browser.ie6 || Browser.ie7; Browser.ie678 = Browser.ie67 || Browser.ie8; Browser.ie6789 = Browser.ie678 || Browser.ie9; navigator.userAgent.match(/Gecko\/([0-9]+)/); Browser.geckoVersion = parseInt(RegExp.$1) | 0; OS = { windows: navigator.appVersion.indexOf('Windows') != -1, mac: navigator.appVersion.indexOf('Macintosh') != -1, linux: navigator.appVersion.indexOf('Linux') != -1 }; var DomContentLoaded = new function() { var _now = []; var _del = []; this.now = function() { array_apply(_now, function(f) { f(); }); }; this.delayed = function() { array_apply(_del, function(f) { f(); }); DomContentLoaded = null; }; this.addEvent = function(f) { _now.push(f); }; this.addDelayedEvent = function(f) { _del.push(f); } }; function g_getWindowSize() { var width = 0, height = 0; if (document.documentElement && (document.documentElement.clientWidth || document.documentElement.clientHeight)) { // IE 6+ in 'standards compliant mode' width = document.documentElement.clientWidth; height = document.documentElement.clientHeight; } else if (document.body && (document.body.clientWidth || document.body.clientHeight)) { // IE 4 compatible width = document.body.clientWidth; height = document.body.clientHeight; } else if (typeof window.innerWidth == 'number') { // Non-IE width = window.innerWidth; height = window.innerHeight; } return { w: width, h: height }; } function g_getScroll() { var x = 0, y = 0; if (typeof(window.pageYOffset) == "number") { // Netscape compliant x = window.pageXOffset; y = window.pageYOffset } else if (document.body && (document.body.scrollLeft || document.body.scrollTop)) { // DOM compliant x = document.body.scrollLeft; y = document.body.scrollTop } else if (document.documentElement && (document.documentElement.scrollLeft || document.documentElement.scrollTop)) { // IE6 standards compliant mode x = document.documentElement.scrollLeft; y = document.documentElement.scrollTop } return { x: x, y: y }; } function g_getCursorPos(e) { var x, y; if (window.innerHeight) { // ok, something of a workaround here... MS9+ sends a MSEventObj istead of mouseEvent . whatever // but the properties for that are client[X|Y] DIAF! if (!e.pageX || !e.pageY) { x = e.clientX; y = e.clientY } else { x = e.pageX; y = e.pageY } } else { var scroll = g_getScroll(); x = e.clientX + scroll.x; y = e.clientY + scroll.y } return { x: x, y: y }; } function g_scrollTo(n, p) { var _, windowSize = g_getWindowSize(), scroll = g_getScroll(), bcw = windowSize.w, bch = windowSize.h, bsl = scroll.x, bst = scroll.y; n = $(n); // Padding if (p == null) { p = []; } else if (typeof p == 'number') { p = [p]; } _ = p.length; if (_ == 0) { p[0] = p[1] = p[2] = p[3] = 0; } else if (_ == 1) { p[1] = p[2] = p[3] = p[0]; } else if (_ == 2) { p[2] = p[0]; p[3] = p[1]; } else if (_ == 3) { p[3] = p[1]; } _ = ac(n); var nl = _[0] - p[3], nt = _[1] - p[0], nr = _[0] + n.offsetWidth + p[1], nb = _[1] + n.offsetHeight + p[2]; if (nr - nl > bcw || nl < bsl) { bsl = nl; } else if (nr - bcw > bsl) { bsl = nr - bcw; } if (nb - nt > bch || nt < bst) { bst = nt; } else if (nb - bch > bst) { bst = nb - bch; } scrollTo(bsl, bst); } function g_addCss(b) { var c = ce("style"); c.type = "text/css"; if (c.styleSheet) { c.styleSheet.cssText = b } else { ae(c, ct(b)) } var a = gE(document, "head")[0]; ae(a, c) } function g_setTextNodes(c, b) { if (c.nodeType == 3) { c.nodeValue = b } else { for (var a = 0; a < c.childNodes.length; ++a) { g_setTextNodes(c.childNodes[a], b) } } } function g_setInnerHtml(d, c, a) { if (d.nodeName.toLowerCase() == a) { d.innerHTML = c } else { for (var b = 0; b < d.childNodes.length; ++b) { g_setInnerHtml(d.childNodes[b], c, a) } } } function g_getTextContent(c) { var a = ""; for (var b = 0; b < c.childNodes.length; ++b) { if (c.childNodes[b].nodeValue) { a += c.childNodes[b].nodeValue } else { if (c.childNodes[b].nodeName == "BR") { if (Browser.ie) { a += "\r" } else { a += "\n" } } } a += g_getTextContent(c.childNodes[b]) } return a } function g_pickerWheel(evt) { evt = $E(evt); if (evt._wheelDelta < 0) this.scrollTop += 27; else this.scrollTop -= 27; } function g_setSelectedLink(c, b) { if (!g_setSelectedLink.groups) { g_setSelectedLink.groups = {} } var a = g_setSelectedLink.groups; if (a[b]) { a[b].className = a[b].className.replace("selected", "") } c.className += " selected"; a[b] = c } function g_setCheckedRow(c, b) { if (!g_setCheckedRow.groups) { g_setCheckedRow.groups = {} } var a = g_setCheckedRow.groups; if (a[b]) { a[b].className = a[b].className.replace("checked", "") } c.className += " checked"; a[b] = c } function g_toggleDisplay(a) { if (a.style.display == "none") { a.style.display = ""; return true } else { a.style.display = "none"; return false } } function g_enableScroll(a) { if (!a) { aE(document, "mousewheel", g_enableScroll.F); aE(window, "DOMMouseScroll", g_enableScroll.F) } else { dE(document, "mousewheel", g_enableScroll.F); dE(window, "DOMMouseScroll", g_enableScroll.F) } } g_enableScroll.F = function(a) { if (a.stopPropagation) { a.stopPropagation() } if (a.preventDefault) { a.preventDefault() } a.returnValue = false; a.cancelBubble = true; return false }; function g_getGets() { if (g_getGets.C != null) { return g_getGets.C } var e = {}; if (location.search) { var f = decodeURIComponent(location.search.substr(1)).split("&"); for (var c = 0, a = f.length; c < a; ++c) { var g = f[c].indexOf("="), b, d; if (g != -1) { b = f[c].substr(0, g); d = f[c].substr(g + 1) } else { b = f[c]; d = "" } e[b] = d } } g_getGets.C = e; return e } function g_createRect(d, c, a, b) { return { l: d, t: c, r: d + a, b: c + b } } function g_intersectRect(d, c) { return ! (d.l >= c.r || c.l >= d.r || d.t >= c.b || c.t >= d.b) } function g_createRange(c, a) { range = {}; for (var b = c; b <= a; ++b) { range[b] = b } return range } function g_sortIdArray(a, b, c) { a.sort(c ? function(e, d) { return strcmp(b[e][c], b[d][c]) }: function(e, d) { return strcmp(b[e], b[d]) }) } function g_sortJsonArray(e, d, f, a) { var c = []; for (var b in e) { if (d[b] && (a == null || a(d[b]))) { c.push(b) } } if (f != null) { c.sort(f) } else { g_sortIdArray(c, d) } return c } function g_urlize(str, allowLocales, profile) { var ta = ce('textarea'); ta.innerHTML = str.replace(//g,">"); str = ta.value; str = str_replace(str, ' / ', '-'); str = str_replace(str, "'", ''); if (profile) { str = str_replace(str, '(', ''); str = str_replace(str, ')', ''); var accents = { "ß": "ss", "á": "a", "ä": "a", "à": "a", "â": "a", "è": "e", "ê": "e", "é": "e", "ë": "e", "í": "i", "î": "i", "ì": "i", "ï": "i", "ñ": "n", "ò": "o", "ó": "o", "ö": "o", "ô": "o", "ú": "u", "ü": "u", "û": "u", "ù": "u", "œ": "oe", "Á": "A", "Ä": "A", "À": "A", "Â": "A", "È": "E", "Ê": "E", "É": "E", "Ë": "E", "Í": "I", "Î": "I", "Ì": "I", "Ï": "I", "Ñ": "N", "Ò": "O", "Ó": "O", "Ö": "O", "Ô": "O", "Ú": "U", "Ü": "U", "Û": "U", "Ù": "U", "œ": "Oe" }; for (var character in accents) { str = str.replace(new RegExp(character, "g"), accents[character]); } } str = trim(str); if (allowLocales) { str = str_replace(str, ' ', '-'); } else { str = str.replace(/[^a-z0-9]/ig, '-'); } str = str_replace(str, '--', '-'); str = str_replace(str, '--', '-'); str = rtrim(str, '-'); str = str.replace(/[A-Z]/g, function(x) { return x.toLowerCase(); }); return str; } function g_getLocale(a) { if (a && g_locale.id == 25) { return 0 } return g_locale.id } function g_createReverseLookupJson(b) { var c = {}; for (var a in b) { c[b[a]] = a } return c } function g_isUsernameValid(a) { return (a.match(/[^a-z0-9]/i) == null && a.length >= 4 && a.length <= 16) } function g_createHeader(c) { var k = ce("dl"), p = (c == 5); for (var j = 0, l = mn_path.length; j < l; ++j) { var f = ce("dt"); var q = ce("a"); var m = ce("ins"); var g = ce("big"); var e = ce("span"); var o = mn_path[j][0]; var h = (o == c); var d = (!h && mn_path[j][3]); if (p && o == 5) { d = true; mn_path[j][3] = mn_profiles } if (d) { q.menu = mn_path[j][3]; q.onmouseover = Menu.show; q.onmouseout = Menu.hide } else { q.onmouseover = Menu._hide } if (mn_path[j][2]) { q.href = mn_path[j][2] } else { q.href = "javascript:;"; ns(q); q.style.cursor = "default" } if (h) { q.className = "selected" } ae(g, ct(mn_path[j][1].charAt(0))); ae(m, g); ae(m, ct(mn_path[j][1].substr(1))); ae(q, m); ae(q, e); ae(f, q); ae(k, f) } ae(ge("toptabs-generic"), k); var b = ge("topbar-generic"); if (c != null && c >= 0 && c < mn_path.length) { c = parseInt(c); switch (c) { case 0: // Database Menu.addButtons(b, [ [0, LANG.menu_browse, null, mn_database], // Browse [1, mn_tools[7][1], null, mn_tools[7][3]], // Utilities [2, mn_tools[7][3][1][1], mn_tools[7][3][1][2]] // Random Page ]); break; case 1: Menu.addButtons(b, [ [0, LANG.calculators, null, mn_tools.slice(0,4)], // Calculators [1, mn_tools[4][1], mn_tools[4][2]], // Maps [2, mn_tools[7][1], null, mn_tools[7][3]], // Utilities [3, mn_tools[6][1], null, mn_tools[6][3]] // Guides ]); break; case 2: Menu.addButtons(b, Menu.explode(mn_more)); break; case 3: Menu.addButtons(b, Menu.explode(mn_forums)); break; case 5: pr_initTopBarSearch(); break } } else { ae(b, ct(String.fromCharCode(160))) } } function g_updateHeader(a) { ee(ge("toptabs-generic")); ee(ge("topbar-generic")); g_createHeader(a) } function g_initHeader(a) { g_createHeader(a); var d = ge("livesearch-generic"); var b = d.previousSibling; var c = d.parentNode; ns(b); b.onclick = function() { this.parentNode.onsubmit() }; if (Browser.ie) { setTimeout(function() { d.value = "" }, 1) } if (d.value == "") { d.className = "search-database" } d.onmouseover = function() { if (trim(this.value) != "") { this.className = "" } }; d.onfocus = function() { this.className = "" }; d.onblur = function() { if (trim(this.value) == "") { this.className = "search-database"; this.value = "" } }; c.onsubmit = function() { var e = this.elements[0].value; if (trim(e) == "") { return false } this.submit() } } function g_initHeaderMenus() { var c = ge("toptabs-menu-user"); if (c) { c.menu = [[0, LANG.userpage, "?user=" + g_user.name], [0, LANG.settings, "?account"], [0, LANG.signout, "?account=signout"]]; if (location.href.match(new RegExp("/?user=" + g_user.name + "$", "i"))) { c.menu[0].checked = 1 } else { if (location.href.indexOf("?account") != -1) { c.menu[1].checked = 1 } } c.onmouseover = Menu.show; c.onmouseout = Menu.hide; c.href = "?user=" + g_user.name } c = ge("toptabs-menu-profiles"); if (c) { c.menu = []; if (g_user.characters) { c.menu.push([, LANG.tab_characters]); for (var f = 0, b = g_user.characters.length; f < b; ++f) { var h = g_user.characters[f], e = [0, h.name + " (" + h.realmname + LANG.hyphen + h.region.toUpperCase() + ")", "?profile=" + h.region + "." + h.realm + "." + g_cleanCharacterName(h.name)]; e.smallIcon = h.icon ? h.icon: "chr_" + g_file_races[h.race] + "_" + g_file_genders[h.gender] + "_" + g_file_classes[h.classs] + "0" + (h.level > 59 ? (Math.floor((h.level - 60) / 10) + 2) : 1); c.menu.push(e) } } c.menu.push([, LANG.tab_profiles]); if (g_user.profiles) { for (var f = 0, b = g_user.profiles.length; f < b; ++f) { var h = g_user.profiles[f], e = [0, h.name, "?profile=" + h.id]; e.smallIcon = h.icon ? h.icon: "chr_" + g_file_races[h.race] + "_" + g_file_genders[h.gender] + "_" + g_file_classes[h.classs] + "0" + (h.level > 59 ? (Math.floor((h.level - 60) / 10) + 2) : 1); c.menu.push(e) } } var e = [0, "(" + LANG.button_new + ")", "?profile&new"]; e.smallIcon = "inv_misc_questionmark"; c.menu.push(e); c.menu.rightAligned = 1; c.onmouseover = Menu.show; c.onmouseout = Menu.hide; c.href = "?user=" + g_user.name + (g_user.profiles ? "#profiles": (g_user.characters ? "#characters": "")) } c = ge("toptabs-menu-language"); if (c) { var g = "www", d = location.href, j = location.hostname.indexOf("."); if (j != -1 && j <= 5) { g = location.hostname.substr(0, j) } j = d.indexOf("#"); if (j != -1) { d = d.substr(0, j) } //c.menu = [[0, "Deutsch", (g_locale.id != 3 ? d.replace(g, "de") : null)], [0, "English", (g_locale.id != 0 ? d.replace(g, "www") : null)], [0, "Espa" + String.fromCharCode(241) + "ol", (g_locale.id != 6 ? d.replace(g, "es") : null)], [0, "Fran" + String.fromCharCode(231) + "ais", (g_locale.id != 2 ? d.replace(g, "fr") : null)], [0, String.fromCharCode(1056, 1091, 1089, 1089, 1082, 1080, 1081), (g_locale.id != 8 ? d.replace(g, "ru") : null)]]; var rel = d.match(/()\?((item|quest|spell|achievement|npc|object)=([0-9]+))/); rel = (rel && rel[2]) ? rel[2] : ""; c.menu = [ [0, "Deutsch", (g_locale.id != 3 ? "?locale=3" : null), , {rel: rel + " domain=de"}], [0, "English", (g_locale.id != 0 ? "?locale=0" : null), , {rel: rel + " domain=en"}], [0, "Espa" + String.fromCharCode(241) + "ol", (g_locale.id != 6 ? "?locale=6" : null), , {rel: rel + " domain=es"}], [0, "Fran" + String.fromCharCode(231) + "ais", (g_locale.id != 2 ? "?locale=2" : null), , {rel: rel + " domain=fr"}], [0, String.fromCharCode(1056, 1091, 1089, 1089, 1082, 1080, 1081), (g_locale.id != 8 ? "?locale=8" : null), , {rel: rel + " domain=ru"}] ]; c.menu.rightAligned = 1; if (g_locale.id != 25) { c.menu[{ 0 : 1, 2 : 3, 3 : 0, 6 : 2, 8 : 4 } [g_locale.id]].checked = 1 } c.onmouseover = Menu.show; c.onmouseout = Menu.hide } } function g_initPath(q, f) { var h = mn_path, c = null, k = null, p = 0, l = ge("main-precontents"), o = ce("div"); ee(l); if (g_initPath.lastIt) { g_initPath.lastIt.checked = null } o.className = "path"; if (f != null) { var m = ce("div"); m.className = "path-right"; var r = ce("a"); r.href = "javascript:;"; r.id = "fi_toggle"; ns(r); r.onclick = fi_toggle; if (f) { r.className = "disclosure-on"; ae(r, ct(LANG.fihide)) } else { r.className = "disclosure-off"; ae(r, ct(LANG.fishow)) } ae(m, r); ae(l, m) } for (var g = 0; g < q.length; ++g) { var r, b, t = 0; for (var e = 0; e < h.length; ++e) { if (h[e][0] == q[g]) { t = 1; h = h[e]; h.checked = 1; break } } if (!t) { p = 1; break } r = ce("a"); b = ce("span"); if (h[2]) { r.href = h[2] } else { r.href = "javascript:;"; ns(r); r.style.textDecoration = "none"; r.style.color = "white"; r.style.cursor = "default" } if (g < q.length - 1 && h[3]) { b.className = "menuarrow" } //ae(r, ct(h[4] == null ? h[1] : h[4])); ae(r, ct(h[1])); if (g == 0) { r.menu = mn_path } else { r.menu = c[3] } r.onmouseover = Menu.show; r.onmouseout = Menu.hide; ae(b, r); ae(o, b); k = b; c = h; h = h[3]; if (!h) { p = 1; break } } if (p && k) { k.className = "" } else { if (c && c[3]) { k.className = "menuarrow"; r = ce("a"); b = ce("span"); r.href = "javascript:;"; ns(r); r.style.textDecoration = "none"; r.style.paddingRight = "16px"; r.style.color = "white"; r.style.cursor = "default"; ae(r, ct("...")); r.menu = c[3]; r.onmouseover = Menu.show; r.onmouseout = Menu.hide; ae(b, r); ae(o, b) } } var m = ce("div"); m.className = "clear"; ae(o, m); ae(l, o); g_initPath.lastIt = c } function g_addTooltip(b, c, a) { if (!a && c.indexOf("") == -1) { a = "q" } b.onmouseover = function(d) { Tooltip.showAtCursor(d, c, 0, 0, a) }; b.onmousemove = Tooltip.cursorUpdate; b.onmouseout = Tooltip.hide } function g_addStaticTooltip(b, c, a) { if (!a && c.indexOf("
") == -1) { a = "q" } b.onmouseover = function(d) { Tooltip.show(b, c, 0, 0, a) }; b.onmouseout = Tooltip.hide } function g_formatTimeElapsed(e) { function c(m, l, i) { if (i && LANG.timeunitsab[l] == "") { i = 0 } if (i) { return m + " " + LANG.timeunitsab[l] } else { return m + " " + (m == 1 ? LANG.timeunitssg[l] : LANG.timeunitspl[l]) } } var g = [31557600, 2629800, 604800, 86400, 3600, 60, 1]; var a = [1, 3, 3, -1, 5, -1, -1]; e = Math.max(e, 1); for (var f = 3, h = g.length; f < h; ++f) { if (e >= g[f]) { var d = f; var k = Math.floor(e / g[d]); if (a[d] != -1) { var b = a[d]; e %= g[d]; var j = Math.floor(e / g[b]); if (j > 0) { return c(k, d, 1) + " " + c(j, b, 1) } } return c(k, d, 0) } } return "(n/a)" } function g_formatDate(c, j, a, d, k) { var f = new Date(); var b = new Date(); b.setTime(f.getTime() - (1000 * j)); var e; var g = new Date(b.getYear(), b.getMonth(), b.getDate()); var l = new Date(f.getYear(), f.getMonth(), f.getDate()); var i = (l.getTime() - g.getTime()); i /= 1000; i /= 86400; i = Math.round(i); if (j >= 2592000) { e = LANG.date_on + g_formatDateSimple(a, d) } else { if (i > 1) { e = sprintf(LANG.ddaysago, i); if (c) { var h = new Date(); h.setTime(a.getTime() + (g_localTime - g_serverTime)); c.className += " tip"; c.title = h.toLocaleString() } } else { if (j >= 43200) { if (f.getDay() == b.getDay()) { e = LANG.today } else { e = LANG.yesterday } e = g_formatTimeSimple(b, e); if (c) { var h = new Date(); h.setTime(a.getTime() + (g_localTime - g_serverTime)); c.className += " tip"; c.title = h.toLocaleString() } } else { var e = sprintf(LANG.date_ago, g_formatTimeElapsed(j)); if (c) { var h = new Date(); h.setTime(a.getTime() + (g_localTime - g_serverTime)); c.className += " tip"; c.title = h.toLocaleString() } } } } if (k == 1) { e = e.substr(0, 1).toUpperCase() + e.substr(1) } if (c) { ae(c, ct(e)) } else { return e } } function g_formatDateSimple(d, time) { function __twoDigits(n) { return (n < 10 ? '0' + n : n); } var b = "", day = d.getDate(), month = d.getMonth() + 1, year = d.getFullYear(); if (year <= 1970) { b += LANG.unknowndate_stc; } else { b += sprintf(LANG.date_simple, __twoDigits(day), __twoDigits(month), year); } if (time != null) { b = g_formatTimeSimple(d, b); } return b; } function g_formatTimeSimple(d, txt, noPrefix) { function __twoDigits(n) { return (n < 10 ? '0' + n : n); } var hours = d.getHours(), minutes = d.getMinutes(); if (txt == null) { txt = ''; } txt += (noPrefix ? ' ' : LANG.date_at); if (hours == 12) { txt += LANG.noon; } else if (hours == 0) { txt += LANG.midnight; } else if (hours > 12) { txt += (hours - 12) + ':' + __twoDigits(minutes) + ' ' + LANG.pm; } else { txt += hours + ':' + __twoDigits(minutes) + ' ' + LANG.am; } return txt; } function g_cleanCharacterName(e) { var d = ""; for (var c = 0, a = e.length; c < a; ++c) { var b = e.charAt(c).toLowerCase(); if (b >= "a" && b <= "z") { d += b } else { d += e.charAt(c) } } return d } function g_createGlow(a, h) { var e = ce("span"); for (var c = -1; c <= 1; ++c) { for (var b = -1; b <= 1; ++b) { var g = ce("div"); g.style.position = "absolute"; g.style.whiteSpace = "nowrap"; g.style.left = c + "px"; g.style.top = b + "px"; if (c == 0 && b == 0) { g.style.zIndex = 4 } else { g.style.color = "black"; g.style.zIndex = 2 } g.innerHTML = a; ae(e, g) } } e.style.position = "relative"; e.className = "glow" + (h != null ? " " + h: ""); var f = ce("span"); f.style.visibility = "hidden"; ae(f, ct(a)); ae(e, f); return e } function g_createProgressBar(c) { if (c == null) { c = {} } if (!c.text) { c.text = " " } if (c.color == null) { c.color = "rep0" } if (c.width == null || c.width > 100) { c.width = 100 } var d, e; if (c.hoverText) { d = ce("a"); d.href = "javascript:;" } else { d = ce("span") } d.className = "progressbar"; if (c.text || c.hoverText) { e = ce("div"); e.className = "progressbar-text"; if (c.text) { var a = ce("del"); ae(a, ct(c.text)); ae(e, a) } if (c.hoverText) { var b = ce("ins"); ae(b, ct(c.hoverText)); ae(e, b) } ae(d, e) } e = ce("div"); e.className = "progressbar-" + c.color; e.style.width = c.width + "%"; ae(e, ct(String.fromCharCode(160))); ae(d, e); return d } function g_createReputationBar(g) { var f = g_createReputationBar.P; if (!g) { g = 0 } g += 42000; if (g < 0) { g = 0 } else { if (g > 84999) { g = 84999 } } var e = g, h, b = 0; for (var d = 0, a = f.length; d < a; ++d) { if (f[d] > e) { break } if (d < a - 1) { e -= f[d]; b = d + 1 } } h = f[b]; var c = { text: g_reputation_standings[b], hoverText: e + " / " + h, color: "rep" + b, width: parseInt(e / h * 100) }; return g_createProgressBar(c) } g_createReputationBar.P = [36000, 3000, 3000, 3000, 6000, 12000, 21000, 999]; function g_createAchievementBar(b, d, a) { if (!b) { b = 0 } var c = { text: b + (d > 0 ? " / " + d: ""), color: (a ? "rep7": "ach" + (d > 0 ? 0 : 1)), width: (d > 0 ? parseInt(b / d * 100) : 100) }; return g_createProgressBar(c) } function g_setRatingLevel(f, e, b, c) { var d = prompt(sprintf(LANG.prompt_ratinglevel, 1, 80), e); if (d != null) { d |= 0; if (d != e && d >= 1 && d <= 80) { e = d; var a = g_convertRatingToPercent(e, b, c); a = (Math.round(a * 100) / 100); if (b != 12 && b != 37) { a += "%" } f.innerHTML = sprintf(LANG.tooltip_combatrating, a, e); f.onclick = g_setRatingLevel.bind(0, f, e, b, c) } } } function g_convertRatingToPercent(g, b, f, d) { var e = g_convertRatingToPercent.RB; if (g < 0) { g = 1 } else { if (g > 80) { g = 80 } } if ((b == 14 || b == 12 || b == 15) && g < 34) { g = 34 } if ((b == 28 || b == 36) && (d == 2 || d == 6 || d == 7 || d == 11)) { e[b] /= 1.3 } if (f < 0) { f = 0 } var a; if (e[b] == null) { a = 0 } else { var c; if (g > 70) { c = (82 / 52) * Math.pow((131 / 63), ((g - 70) / 10)) } else { if (g > 60) { c = (82 / (262 - 3 * g)) } else { if (g > 10) { c = ((g - 8) / 52) } else { c = 2 / 52 } } } a = f / e[b] / c } return a } g_convertRatingToPercent.RB = { 12 : 1.5, 13 : 12, 14 : 15, 15 : 5, 16 : 10, 17 : 10, 18 : 8, 19 : 14, 20 : 14, 21 : 14, 22 : 10, 23 : 10, 24 : 0, 25 : 0, 26 : 0, 27 : 0, 28 : 10, 29 : 10, 30 : 10, 31 : 10, 32 : 14, 33 : 0, 34 : 0, 35 : 25, 36 : 10, 37 : 2.5, 44 : 3.756097412109376 }; var g_statToJson = { 1 : "health", 2 : "mana", 3 : "agi", 4 : "str", 5 : "int", 6 : "spi", 7 : "sta", 12 : "defrtng", 13 : "dodgertng", 14 : "parryrtng", 15 : "blockrtng", 16 : "mlehitrtng", 17 : "rgdhitrtng", 18 : "splhitrtng", 19 : "mlecritstrkrtng", 20 : "rgdcritstrkrtng", 21 : "splcritstrkrtng", 22 : "_mlehitrtng", 23 : "_rgdhitrtng", 24 : "_splhitrtng", 25 : "_mlecritstrkrtng", 26 : "_rgdcritstrkrtng", 27 : "_splcritstrkrtng", 28 : "mlehastertng", 29 : "rgdhastertng", 30 : "splhastertng", 31 : "hitrtng", 32 : "critstrkrtng", 33 : "_hitrtng", 34 : "_critstrkrtng", 35 : "resirtng", 36 : "hastertng", 37 : "exprtng", 38 : "atkpwr", 43 : "manargn", 44 : "armorpenrtng", 45 : "splpwr" }; function g_convertScalingFactor(c, b, g, d, j) { var f = g_convertScalingFactor.SV; var e = g_convertScalingFactor.SD; var i = {}, h = f[c], a = e[g]; if (!a || !(d >= 0 && d <= 9)) { i.v = h[b] } else { i.n = g_statToJson[a[d]]; i.s = a[d]; i.v = Math.floor(h[b] * a[d + 10] / 10000) } return (j ? i: i.v) } g_convertScalingFactor.SV = { 1 : [2, 2, 1, 3, 1, 10, 32, 32, 64, 6, 8, 6, 8, 6, 8, 1, 0, 0, 1, 7, 13, 43, 43, 85], 2 : [3, 3, 1, 3, 1, 12, 35, 35, 70, 6, 9, 6, 9, 7, 9, 2, 0, 0, 2, 8, 16, 47, 47, 93], 3 : [3, 3, 1, 4, 1, 13, 39, 39, 76, 7, 9, 7, 9, 7, 10, 3, 0, 0, 2, 9, 17, 52, 52, 101], 4 : [3, 3, 1, 4, 1, 14, 42, 42, 83, 7, 10, 7, 10, 8, 11, 3, 0, 0, 2, 9, 19, 56, 56, 111], 5 : [4, 4, 2, 5, 2, 16, 45, 45, 89, 8, 10, 8, 10, 8, 12, 4, 0, 0, 3, 11, 21, 60, 60, 119], 6 : [4, 4, 2, 5, 2, 17, 48, 48, 95, 8, 11, 8, 11, 9, 12, 5, 0, 0, 3, 11, 23, 64, 64, 127], 7 : [4, 4, 3, 6, 2, 19, 51, 51, 101, 9, 11, 9, 11, 9, 13, 6, 0, 0, 3, 13, 25, 68, 68, 135], 8 : [5, 5, 3, 7, 2, 20, 54, 54, 107, 9, 12, 9, 12, 9, 14, 7, 0, 0, 4, 13, 27, 72, 72, 143], 9 : [5, 5, 3, 7, 2, 22, 56, 56, 113, 10, 13, 10, 13, 10, 15, 7, 0, 0, 4, 15, 29, 75, 75, 151], 10 : [6, 6, 3, 8, 2, 23, 57, 57, 119, 10, 13, 10, 13, 10, 16, 8, 0, 0, 4, 15, 31, 76, 76, 159], 11 : [6, 6, 4, 8, 3, 24, 59, 59, 125, 11, 14, 11, 14, 11, 16, 9, 0, 0, 5, 16, 32, 79, 79, 167], 12 : [7, 7, 4, 9, 3, 25, 60, 60, 131, 11, 15, 11, 15, 12, 17, 10, 0, 0, 5, 17, 33, 80, 80, 175], 13 : [7, 7, 4, 9, 3, 26, 61, 61, 133, 12, 16, 12, 16, 12, 18, 10, 0, 0, 5, 17, 35, 81, 81, 177], 14 : [8, 8, 4, 10, 3, 27, 63, 63, 136, 12, 16, 12, 16, 13, 19, 11, 0, 0, 6, 18, 36, 84, 84, 181], 15 : [8, 8, 5, 11, 3, 28, 64, 64, 138, 13, 17, 13, 17, 13, 20, 12, 0, 0, 6, 19, 37, 85, 85, 184], 16 : [8, 8, 5, 11, 4, 29, 65, 65, 141, 14, 18, 14, 18, 14, 21, 13, 0, 0, 6, 19, 39, 87, 87, 188], 17 : [9, 9, 5, 12, 4, 30, 67, 67, 143, 14, 19, 14, 19, 14, 22, 14, 0, 0, 7, 20, 40, 89, 89, 191], 18 : [9, 9, 5, 12, 4, 30, 68, 68, 146, 15, 19, 15, 19, 15, 23, 14, 0, 0, 7, 20, 40, 91, 91, 195], 19 : [10, 10, 6, 13, 4, 31, 69, 69, 148, 15, 20, 15, 20, 15, 24, 15, 0, 0, 7, 21, 41, 92, 92, 197], 20 : [10, 10, 6, 14, 4, 32, 71, 71, 151, 16, 21, 16, 21, 16, 25, 16, 0, 0, 8, 21, 43, 95, 95, 201], 21 : [11, 11, 6, 14, 5, 33, 72, 72, 153, 16, 21, 16, 21, 16, 26, 17, 0, 0, 8, 22, 44, 96, 96, 204], 22 : [11, 11, 6, 15, 5, 34, 73, 73, 156, 17, 22, 17, 22, 17, 27, 18, 0, 0, 8, 23, 45, 97, 97, 208], 23 : [12, 12, 7, 15, 5, 34, 75, 75, 158, 17, 23, 17, 23, 17, 28, 18, 0, 0, 9, 23, 45, 100, 100, 211], 24 : [12, 12, 7, 16, 5, 35, 76, 76, 161, 18, 23, 18, 23, 18, 29, 19, 0, 0, 9, 23, 47, 101, 101, 215], 25 : [12, 12, 7, 17, 5, 35, 77, 77, 163, 19, 24, 19, 24, 19, 29, 20, 0, 0, 9, 23, 47, 103, 103, 217], 26 : [13, 13, 7, 17, 5, 36, 78, 78, 166, 19, 25, 19, 25, 19, 30, 21, 0, 0, 10, 24, 48, 104, 104, 221], 27 : [13, 13, 8, 18, 6, 37, 80, 80, 168, 20, 26, 20, 26, 20, 31, 22, 0, 0, 10, 25, 49, 107, 107, 224], 28 : [14, 14, 8, 18, 6, 37, 81, 81, 171, 21, 27, 21, 27, 21, 32, 22, 0, 0, 10, 25, 49, 108, 108, 228], 29 : [14, 14, 8, 19, 6, 38, 82, 82, 173, 22, 29, 22, 29, 22, 32, 23, 0, 0, 11, 25, 51, 109, 109, 231], 30 : [15, 15, 8, 20, 6, 38, 84, 84, 176, 23, 30, 23, 30, 22, 33, 24, 0, 0, 11, 25, 51, 112, 112, 235], 31 : [15, 15, 9, 20, 6, 39, 85, 85, 178, 24, 31, 24, 31, 23, 34, 25, 0, 0, 11, 26, 52, 113, 113, 237], 32 : [16, 16, 9, 21, 7, 40, 86, 86, 181, 25, 32, 25, 32, 24, 34, 25, 0, 0, 12, 27, 53, 115, 115, 241], 33 : [16, 16, 9, 21, 7, 41, 88, 88, 184, 25, 33, 25, 33, 25, 35, 26, 0, 0, 12, 27, 55, 117, 117, 245], 34 : [16, 16, 9, 22, 7, 43, 90, 90, 187, 26, 34, 26, 34, 26, 36, 27, 0, 0, 12, 29, 57, 120, 120, 249], 35 : [17, 17, 10, 23, 7, 44, 91, 91, 190, 27, 35, 27, 35, 26, 37, 28, 0, 0, 13, 29, 59, 121, 121, 253], 36 : [17, 17, 10, 23, 7, 44, 93, 93, 193, 28, 36, 28, 36, 27, 38, 29, 0, 0, 13, 29, 59, 124, 124, 257], 37 : [18, 18, 10, 24, 8, 46, 95, 95, 196, 28, 37, 28, 37, 28, 39, 29, 0, 0, 13, 31, 61, 127, 127, 261], 38 : [18, 18, 10, 24, 8, 47, 97, 97, 199, 29, 38, 29, 38, 28, 40, 30, 0, 0, 14, 31, 63, 129, 129, 265], 39 : [19, 19, 11, 25, 8, 48, 99, 99, 202, 29, 38, 29, 38, 29, 41, 31, 0, 0, 14, 32, 64, 132, 132, 269], 40 : [19, 19, 11, 26, 8, 49, 100, 205, 360, 30, 39, 30, 39, 30, 42, 32, 0, 0, 14, 33, 65, 133, 273, 480], 41 : [20, 20, 11, 26, 8, 50, 102, 209, 368, 31, 40, 31, 40, 30, 43, 33, 0, 0, 15, 33, 67, 136, 279, 491], 42 : [20, 20, 11, 27, 8, 51, 104, 213, 375, 31, 41, 31, 41, 31, 44, 33, 0, 0, 15, 34, 68, 139, 284, 500], 43 : [20, 20, 12, 27, 9, 52, 106, 217, 382, 32, 41, 32, 41, 31, 45, 34, 0, 0, 15, 35, 69, 141, 289, 509], 44 : [21, 21, 12, 28, 9, 53, 108, 221, 389, 32, 42, 32, 42, 32, 47, 35, 0, 0, 16, 35, 71, 144, 295, 519], 45 : [21, 21, 12, 28, 9, 54, 109, 225, 396, 33, 43, 33, 43, 33, 48, 36, 0, 0, 16, 36, 72, 145, 300, 528], 46 : [22, 22, 12, 29, 9, 55, 111, 229, 403, 34, 44, 34, 44, 33, 50, 37, 0, 0, 16, 37, 73, 148, 305, 537], 47 : [22, 22, 13, 30, 9, 56, 113, 233, 410, 34, 45, 34, 45, 34, 51, 37, 0, 0, 17, 37, 75, 151, 311, 547], 48 : [23, 23, 13, 30, 10, 57, 115, 238, 418, 35, 45, 35, 45, 34, 52, 38, 0, 0, 17, 38, 76, 153, 317, 557], 49 : [23, 23, 13, 31, 10, 58, 117, 242, 425, 35, 46, 35, 46, 35, 53, 39, 0, 0, 17, 39, 77, 156, 323, 567], 50 : [24, 24, 13, 31, 10, 59, 118, 246, 433, 36, 47, 36, 47, 36, 54, 40, 0, 0, 18, 39, 79, 157, 328, 577], 51 : [24, 24, 14, 32, 10, 60, 120, 250, 440, 37, 48, 37, 48, 36, 54, 40, 0, 0, 18, 40, 80, 160, 333, 587], 52 : [24, 24, 14, 33, 10, 61, 122, 254, 448, 37, 49, 37, 49, 37, 55, 41, 0, 0, 18, 41, 81, 163, 339, 597], 53 : [25, 25, 14, 33, 11, 62, 124, 258, 455, 38, 49, 38, 49, 38, 57, 42, 0, 0, 19, 41, 83, 165, 344, 607], 54 : [25, 25, 14, 34, 11, 63, 126, 262, 463, 38, 50, 38, 50, 38, 58, 43, 0, 0, 19, 42, 84, 168, 349, 617], 55 : [26, 26, 15, 34, 11, 64, 127, 266, 470, 39, 51, 39, 51, 39, 59, 44, 0, 0, 19, 43, 85, 169, 355, 627], 56 : [26, 26, 15, 35, 11, 65, 129, 270, 478, 40, 52, 40, 52, 39, 61, 44, 0, 0, 20, 43, 87, 172, 360, 637], 57 : [27, 27, 15, 36, 11, 66, 131, 274, 485, 40, 53, 40, 53, 40, 62, 45, 0, 0, 20, 44, 88, 175, 365, 647], 58 : [34, 34, 19, 46, 14, 83, 159, 344, 611, 50, 65, 46, 60, 48, 85, 46, 0, 0, 25, 55, 111, 212, 459, 815], 59 : [36, 36, 20, 47, 15, 86, 164, 356, 633, 51, 67, 47, 61, 50, 88, 52, 0, 0, 27, 57, 115, 219, 475, 844], 60 : [37, 37, 21, 49, 16, 88, 169, 368, 655, 53, 68, 47, 62, 51, 91, 57, 0, 0, 28, 59, 117, 225, 491, 873], 61 : [39, 39, 22, 51, 16, 91, 174, 380, 677, 54, 70, 48, 63, 52, 94, 63, 0, 0, 29, 61, 121, 232, 507, 903], 62 : [40, 40, 22, 53, 17, 94, 178, 392, 699, 55, 72, 49, 64, 53, 97, 68, 0, 0, 30, 63, 125, 237, 523, 932], 63 : [41, 41, 23, 54, 17, 97, 183, 404, 721, 56, 73, 50, 65, 54, 100, 73, 0, 0, 31, 65, 129, 244, 539, 961], 64 : [42, 42, 24, 55, 18, 100, 187, 416, 742, 58, 75, 50, 66, 55, 104, 80, 0, 0, 31, 67, 133, 249, 555, 989], 65 : [43, 43, 24, 57, 18, 102, 192, 428, 764, 60, 78, 52, 67, 57, 109, 89, 0, 0, 32, 68, 136, 256, 571, 1019], 66 : [44, 44, 25, 58, 18, 105, 197, 440, 786, 62, 81, 53, 69, 59, 113, 98, 0, 0, 33, 70, 140, 263, 587, 1048], 67 : [45, 45, 25, 59, 19, 108, 203, 452, 808, 65, 84, 54, 71, 61, 117, 107, 0, 0, 34, 72, 144, 271, 603, 1077], 68 : [62, 62, 36, 84, 26, 157, 294, 654, 1169, 91, 119, 70, 91, 82, 168, 220, 0, 0, 47, 105, 209, 392, 872, 1559], 69 : [64, 64, 37, 87, 27, 161, 303, 675, 1206, 93, 121, 71, 92, 84, 172, 228, 0, 0, 48, 107, 215, 404, 900, 1608], 70 : [67, 67, 39, 90, 28, 166, 312, 695, 1242, 95, 124, 72, 94, 86, 175, 238, 0, 0, 50, 111, 221, 416, 927, 1656], 71 : [69, 69, 40, 93, 29, 171, 321, 715, 1278, 97, 127, 73, 95, 88, 179, 246, 0, 0, 52, 114, 228, 428, 953, 1704], 72 : [72, 72, 42, 97, 30, 176, 331, 736, 1315, 99, 129, 75, 97, 90, 183, 255, 0, 0, 54, 117, 235, 441, 981, 1753], 73 : [75, 75, 43, 101, 32, 181, 340, 756, 1351, 102, 132, 76, 99, 92, 187, 265, 0, 0, 56, 121, 241, 453, 1008, 1801], 74 : [78, 78, 45, 104, 33, 186, 349, 776, 1387, 104, 135, 77, 100, 94, 191, 275, 0, 0, 58, 124, 248, 465, 1035, 1849], 75 : [81, 81, 46, 108, 34, 191, 358, 797, 1423, 106, 138, 79, 102, 96, 196, 285, 0, 0, 60, 127, 255, 477, 1063, 1897], 76 : [84, 84, 48, 113, 35, 196, 367, 817, 1460, 109, 141, 80, 104, 98, 200, 296, 0, 0, 63, 131, 261, 489, 1089, 1947], 77 : [87, 87, 50, 117, 37, 200, 376, 837, 1496, 111, 145, 81, 106, 101, 205, 307, 0, 0, 65, 133, 267, 501, 1116, 1995], 78 : [90, 90, 52, 121, 38, 205, 386, 858, 1532, 114, 148, 83, 108, 103, 210, 319, 0, 0, 68, 137, 273, 515, 1144, 2043], 79 : [94, 94, 54, 126, 40, 208, 390, 868, 1551, 117, 152, 85, 110, 105, 215, 331, 0, 0, 71, 139, 277, 520, 1157, 2068], 80 : [97, 97, 56, 131, 41, 210, 395, 878, 1570, 120, 156, 86, 112, 108, 220, 343, 0, 0, 73, 140, 280, 527, 1171, 2093] }; g_convertScalingFactor.SD = { 1 : [4, 7, 32, -1, -1, -1, -1, -1, -1, -1, 5259, 7888, 5259, 0, 0, 0, 0, 0, 0, 0, 80], 2 : [38, 3, 31, -1, -1, -1, -1, -1, -1, -1, 14532, 4106, 3193, 0, 0, 0, 0, 0, 0, 0, 80], 3 : [38, 7, 32, -1, -1, -1, -1, -1, -1, -1, 5068, 5065, 6666, 0, 0, 0, 0, 0, 0, 0, 80], 4 : [38, 32, 31, -1, -1, -1, -1, -1, -1, -1, 13332, 4767, 3900, 0, 0, 0, 0, 0, 0, 0, 80], 5 : [7, 5, 32, -1, -1, -1, -1, -1, -1, -1, 7150, 5850, 4766, 0, 0, 0, 0, 0, 0, 0, 80], 6 : [7, 5, 43, -1, -1, -1, -1, -1, -1, -1, 5067, 7601, 1350, 0, 0, 0, 0, 0, 0, 0, 80], 7 : [4, 7, 32, -1, -1, -1, -1, -1, -1, -1, 6666, 6666, 4445, 0, 0, 0, 0, 0, 0, 0, 80], 8 : [38, 3, 7, 5, -1, -1, -1, -1, -1, -1, 10518, 5258, 5641, 3076, 0, 0, 0, 0, 0, 0, 80], 9 : [45, 7, 5, 43, -1, -1, -1, -1, -1, -1, 5201, 6666, 4444, 1778, 0, 0, 0, 0, 0, 0, 80], 10 : [38, 31, 7, -1, -1, -1, -1, -1, -1, -1, 14532, 4106, 4789, 0, 0, 0, 0, 0, 0, 0, 80], 11 : [45, 7, 5, 6, -1, -1, -1, -1, -1, -1, 6153, 3996, 3997, 5258, 0, 0, 0, 0, 0, 0, 80], 12 : [0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 5000, 5000, 0, 0, 0, 0, 0, 0, 0, 0, 10], 13 : [42, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10], 14 : [38, 39, 40, 41, 42, 43, 0, 0, 0, 0, 6500, 6500, 10000, 10000, 10000, 10000, 0, 0, 0, 0, 15], 15 : [40, 41, 42, 0, 0, 0, 0, 0, 0, 0, 4200, 5200, 6200, 0, 0, 0, 0, 0, 0, 0, 10], 16 : [45, 7, 5, 6, -1, -1, -1, -1, -1, -1, 6153, 3996, 3997, 5258, 0, 0, 0, 0, 0, 0, 80], 21 : [12, 13, 14, 15, 16, 0, 0, 0, 0, 0, 5000, 6000, 7000, 8000, 9000, 0, 0, 0, 0, 0, 10], 41 : [3, 4, 5, 6, 7, 12, 13, 14, 15, 16, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10], 42 : [17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10], 43 : [27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10], 102 : [44, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15], 103 : [3, -1, -1, -1, -1, -1, -1, -1, -1, -1, 10000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], 104 : [32, -1, -1, -1, -1, -1, -1, -1, -1, -1, 10000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 80], 105 : [13, -1, -1, -1, -1, -1, -1, -1, -1, -1, 10000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], 221 : [4, 7, 32, 36, -1, -1, -1, -1, -1, -1, 4844, 7266, 4106, 3193, 0, 0, 0, 0, 0, 0, 80], 222 : [3, 44, 7, -1, -1, -1, -1, -1, -1, -1, 5259, 3506, 5259, 0, 0, 0, 0, 0, 0, 0, 80], 223 : [7, 5, 32, -1, -1, -1, -1, -1, -1, -1, 4859, 5732, 2519, 0, 0, 0, 0, 0, 0, 0, 80], 224 : [38, 3, 31, 7, -1, -1, -1, -1, -1, -1, 9688, 4844, 3193, 6159, 0, 0, 0, 0, 0, 0, 80], 241 : [45, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 80], 251 : [36, -1, -1, -1, -1, -1, -1, -1, -1, -1, 6666, 0, 0, 0, 0, 0, 0, 0, 0, 0, 80], 271 : [45, -1, -1, -1, -1, -1, -1, -1, -1, -1, 7800, 0, 0, 0, 0, 0, 0, 0, 0, 0, 80], 291 : [38, -1, -1, -1, -1, -1, -1, -1, -1, -1, 23252, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], 292 : [38, 7, 35, -1, -1, -1, -1, -1, -1, -1, 10518, 7888, 5258, 0, 0, 0, 0, 0, 0, 0, 80], 293 : [4, 7, 35, -1, -1, -1, -1, -1, -1, -1, 7266, 4789, 4106, 0, 0, 0, 0, 0, 0, 0, 80], 294 : [38, 32, 35, -1, -1, -1, -1, -1, -1, -1, 8212, 7266, 3193, 0, 0, 0, 0, 0, 0, 0, 80], 295 : [7, 35, 43, -1, -1, -1, -1, -1, -1, -1, 6666, 6666, 1777, 0, 0, 0, 0, 0, 0, 0, 80], 296 : [7, 31, 35, -1, -1, -1, -1, -1, -1, -1, 7888, 5259, 5258, 0, 0, 0, 0, 0, 0, 0, 80], 297 : [35, -1, -1, -1, -1, -1, -1, -1, -1, -1, 5259, 0, 0, 0, 0, 0, 0, 0, 0, 0, 80], 298 : [35, -1, -1, -1, -1, -1, -1, -1, -1, -1, 6667, 0, 0, 0, 0, 0, 0, 0, 0, 0, 80], 299 : [35, -1, -1, -1, -1, -1, -1, -1, -1, -1, 6667, 0, 0, 0, 0, 0, 0, 0, 0, 0, 80], 300 : [4, 7, 35, -1, -1, -1, -1, -1, -1, -1, 5259, 7888, 5258, 0, 0, 0, 0, 0, 0, 0, 80], 301 : [45, 7, 43, 35, -1, -1, -1, -1, -1, -1, 5200, 6666, 1776, 4444, 0, 0, 0, 0, 0, 0, 80], 302 : [38, 3, 7, 35, -1, -1, -1, -1, -1, -1, 8888, 4444, 6668, 4444, 0, 0, 0, 0, 0, 0, 80], 303 : [45, 7, 5, 35, -1, -1, -1, -1, -1, -1, 6153, 5259, 3506, 5258, 0, 0, 0, 0, 0, 0, 80], 304 : [38, 3, 7, 35, -1, -1, -1, -1, -1, -1, 8888, 3899, 6666, 4767, 0, 0, 0, 0, 0, 0, 80], 305 : [45, 7, 6, 35, -1, -1, -1, -1, -1, -1, 6153, 5259, 3506, 5258, 0, 0, 0, 0, 0, 0, 80], 306 : [45, 7, 32, 35, -1, -1, -1, -1, -1, -1, 6153, 5259, 3506, 5258, 0, 0, 0, 0, 0, 0, 80], 311 : [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], 331 : [38, 3, 7, 5, -1, -1, -1, -1, -1, -1, 10518, 5258, 5259, 3506, 0, 0, 0, 0, 0, 0, 80], 332 : [45, 7, 5, 43, -1, -1, -1, -1, -1, -1, 6153, 3997, 3997, 2629, 0, 0, 0, 0, 0, 0, 80], 333 : [4, 7, 32, -1, -1, -1, -1, -1, -1, -1, 5996, 5996, 5258, 0, 0, 0, 0, 0, 0, 0, 80], 334 : [45, 7, 5, 6, -1, -1, -1, -1, -1, -1, 6153, 3997, 3997, 5259, 0, 0, 0, 0, 0, 0, 80], 335 : [38, 7, 31, -1, -1, -1, -1, -1, -1, -1, 10518, 7888, 5259, 0, 0, 0, 0, 0, 0, 0, 80], 336 : [45, 7, 5, 6, -1, -1, -1, -1, -1, -1, 6153, 3997, 3997, 5259, 0, 0, 0, 0, 0, 0, 80], 351 : [3, 38, 7, 32, -1, -1, -1, -1, -1, -1, 5259, 7012, 7889, 3506, 0, 0, 0, 0, 0, 0, 80], 352 : [3, 44, 7, 38, -1, -1, -1, -1, -1, -1, 5259, 3506, 7889, 7012, 0, 0, 0, 0, 0, 0, 80], 371 : [32, 31, 7, -1, -1, -1, -1, -1, -1, -1, 7266, 4106, 4789, 0, 0, 0, 0, 0, 0, 0, 80] }; function g_setJsonItemLevel(t, a) { if (!t.scadist || !t.scaflags) { return } t.bonuses = t.bonuses || {}; var c = -1, r = -1, k = -1, p = -1, f = 262175, o = 16253408, d = 32256, g = 32768, b = 5120; for (var h = 0; h < 24; ++h) { var l = 1 << h; if (l & t.scaflags) { if (l & f && c < 0) { c = h } else { if (l & o && r < 0) { r = h } else { if (l & d && k < 0) { k = h } else { if (l & g && p < 0) { p = h } } } } } } if (c >= 0) { for (var h = 0; h < 10; ++h) { var q = g_convertScalingFactor(a, c, t.scadist, h, 1); if (q.n) { t[q.n] = q.v } t.bonuses[q.s] = q.v } } if (r >= 0) { t.armor = g_convertScalingFactor(a, r) } if (k >= 0) { var j = (t.scaflags & b ? 0.2 : 0.3), m = (t.mledps ? "mle": "rgd"); t.speed /= t.speed > 1000 ? 1000 : 1; // summary expects speed in sec; different version of script is different t.dps = t[m + "dps"] = g_convertScalingFactor(a, k); t.dmgmin = t[m + "dmgmin"] = Math.floor(t.dps * t.speed * (1 - j)); t.dmgmax = t[m + "dmgmax"] = Math.floor(t.dps * t.speed * (1 + j)) if (t.feratkpwr) { // yes thats custom too.. t.feratkpwr = Math.max(0, Math.floor((t.dps - 54.8) * 14)); } } if (p >= 0) { t.splpwr = t.bonuses[45] = g_convertScalingFactor(a, p) } if (t.gearscore != null) { if (t._gearscore == null) { t._gearscore = t.gearscore } var e = Math.min(80, a + 1); if (e >= 70) { n = ((e - 70) * 9.5) + 105 } else { if (e >= 60) { n = ((e - 60) * 4.5) + 60 } else { n = e + 5 } } t.gearscore = (t._gearscore * n) / 1.8 } } function g_setTooltipItemLevel(a, g) { var d = typeof a; if (d == "number") { if (isset("g_items") && g_items[a] && g_items[a]["tooltip_" + g_locale.name]) { a = g_items[a]["tooltip_" + g_locale.name] } else { return a } } else { if (d != "string") { return a } } d = a.match(//); if (!d) { return a } var b = d[2] || 0, c = d[3] || 0; if (b && c) { var f = a.match(/(\d\.\d+)/); if (f) { f = Math.floor(parseFloat(f[1]) * 1000) } var e = { scadist: b, scaflags: c, speed: f || 0 }; g_setJsonItemLevel(e, g); a = a.replace(/()([^<]+)/, function(j, h, i) { d = i; if (g < 40 && (i == 3 || i == 4)) {--d } return h + g_itemset_types[d] }); a = a.replace(/()\d+(\D+)\d+/, function(j, h, i) { return h + e.dmgmin + i + e.dmgmax }); a = a.replace(/(\D*?)(\d+\.\d)/, function(i, h) { return h + e.dps.toFixed(1) }); a = a.replace(/(\D*?)(\d+)(\D*?)<\/span>(
)?/i, function(l, h, i, m, j) { var k; i = Math.floor((e.dps - 54.8) * 14); if (e.dps > 54.8 && i > 0) { k = ""; j = (j ? "
": "") } else { i = 0; k = ' style="display: none"'; j = (j ? "": "") } return '" + h + i + m + "" + j }); a = a.replace(/()\d+/, function(i, h) { return h + e.armor }); a = a.replace(/[-+]\d+(\D*?)<\/span>()?()?(
)?/gi, function(l, i, h, o, p, j) { var k, m = e.bonuses[i]; if (m) { m = (m > 0 ? "+": "-") + m; k = ""; j = (j ? "
": "") } else { m = "+0"; k = ' style="display: none"'; j = (j ? "": "") } return "" + m + h + "
" + (o || "") + (p || "") + j }); a = a.replace(/(.*?)\d+(.*?)<\/span>(
)?/gi, function(h, k, m, p, l, i, q) { var j, o = e.bonuses[m]; if (o) { j = ""; q = (q ? "
": "") } else { j = ' style="display: none"'; q = (q ? "": "") } return '" + k + "" + o + p + "" + q }) } a = a.replace(/()([\.0-9]+)/g, function(j, h, k, i) { d = a.match(new RegExp("(\\d+)")); if (!d) { return j } return h + Math.round(g_convertRatingToPercent(g, k, d[1]) * 100) / 100 }); a = a.replace(/()/, "$1" + g + "$2"); a = a.replace(/\d+/g, "" + g); return a } function g_enhanceTooltip(a, c) { var b = typeof a; if (b == "number") { if (isset("g_items") && g_items[a] && g_items[a]["tooltip_" + g_locale.name]) { a = g_items[a]["tooltip_" + g_locale.name] } else { return a } } else { if (b != "string") { return a } } if (c) { a = a.replace(/.*?<\/span><\/span>/i, function(d, e) { return '' + d + "" }); a = a.replace(/\(([^\)]*?[^\(]*?)\)/gi, function(e, d) { return '(' + d + ")" }) } return a } function g_staticTooltipLevelClick(g, f) { while (g.className.indexOf("tooltip") == -1) { g = g.parentNode } var c = g.innerHTML; c = c.match(/