var DomContentLoaded=new function(){var b=[];var a=[];this.now=function(){array_apply(b,function(c){c()})};this.delayed=function(){array_apply(a,function(c){c()});DomContentLoaded=null};this.addEvent=function(c){b.push(c)};this.addDelayedEvent=function(c){a.push(c)}};function g_trackPageview(a){var b=function(){if(isset("pageTracker")){pageTracker._trackPageview(a)}};if(DomContentLoaded){DomContentLoaded.addDelayedEvent(b)}else{b()}}function g_addAnalytics(){var c={oneliner:"/tracker/home/oneliner/",featuredbox:"/tracker/home/featured/","sidebar-contents":"/tracker/sidebar/image/","toptabs-promo":"/tracker/header/icon/"};for(var a in c){var b=ge(a);if(b){g_addAnalyticsToNode(b,c[a])}}}DomContentLoaded.addEvent(g_addAnalytics);function g_addAnalyticsToNode(c,a){if(c.nodeName=="A"){var e="";var d=g_getFirstTextContent(c);if(d){e=g_urlize(d)}else{if(c.title){e=g_urlize(c.title)}else{if(c.id){e=g_urlize(c.id)}else{return}}}aE(c,"click",function(){g_trackPageview(a+e)})}else{if(c.nodeName=="IFRAME"){return}else{for(var b=0;b<c.childNodes.length;++b){g_addAnalyticsToNode(c.childNodes[b],a)}}}}function g_pickerWheel(a){a=$E(a);if(a._wheelDelta<0){this.scrollTop+=27}else{this.scrollTop-=27}}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=document.getElementsByTagName("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_getFirstTextContent(c){for(var b=0;b<c.childNodes.length;++b){if(c.childNodes[b].nodeName=="#text"){return c.childNodes[b].nodeValue}var a=g_getFirstTextContent(c.childNodes[b]);if(a){return a}}return false}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_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_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(b,c){var a=ce("textarea");a.innerHTML=b.replace(/</g,"&lt;").replace(/>/g,"&gt;");b=a.value;b=str_replace(b,"'","");b=trim(b);if(c){b=str_replace(b," ","-")}else{b=b.replace(/[^a-z0-9]/ig,"-")}b=str_replace(b,"--","-");b=str_replace(b,"--","-");b=rtrim(b,"-");b=b.toLowerCase();return b}function g_getLocale(a){if(a&&g_locale.id==25){return 0}return g_locale.id}function g_isUsernameValid(a){return(a.match(/[^a-z0-9]/i)==null&&a.length>=4&&a.length<=16)}function g_isIpAddress(a){return/[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+/.test(a)}function g_getCurrentDomain(){if(g_getCurrentDomain.CACHE){return g_getCurrentDomain.CACHE}var a=location.hostname;if(!g_isIpAddress(a)){var b=a.split(".");if(b.length>2){b.splice(0,b.length-2)}a=b.join(".")}g_getCurrentDomain.CACHE=a;return a}function g_isExternalUrl(a){if(!a){return false}return(a.indexOf("http")==0&&a.indexOf(g_getCurrentDomain())==-1)}function g_createHeader(c){var k=ce("dl"),p=((typeof(mn_profiles)!="undefined"));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==1){mn_path[j][3][2][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("ptewhjkst46"),k);var b=ge("kbl34h6b43");if(c!=null&&c>=0&&c<mn_path.length){c=parseInt(c);switch(c){case 0:var n=[[0,LANG.menu_browse,,mn_database]];Menu.addButtons(b,n);Menu.addButtons(b,[Menu.find(mn_tools,[8,4])]);break;case 1:if(p){pr_initTopBarSearch()}else{Menu.addButtons(b,Menu.explode(mn_tools))}break;case 2:Menu.addButtons(b,Menu.explode(mn_more));break;case 3:Menu.addButtons(b,Menu.explode(mn_community));break}}else{ae(b,ct(String.fromCharCode(160)))}}function g_updateHeader(a){ee(ge("ptewhjkst46"));ee(ge("kbl34h6b43"));g_createHeader(a)}function g_initHeader(a){g_createHeader(a);var d=ge("oh2345v5ks");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(g_user&&!g_user.premium){c.menu.splice(2,0,[0,"Premium Upgrade","/?premium"])}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}else{if(g_user&&!g_user.premium&&location.href.indexOf("/?premium")!=-1){c.menu[2].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!=7?d.replace(g,"ru"):null)]];c.menu.rightAligned=1;if(g_locale.id!=25){c.menu[{0:1,2:3,3:0,6:2,7:4}[g_locale.id]].checked=1}c.onmouseover=Menu.show;c.onmouseout=Menu.hide}if(g_getLocale(true)!=0){Menu.sortMenu(mn_items,2,{2:1,3:1,4:1,5:1,8:1});Menu.sortMenu(mn_itemSets);Menu.sortMenu(mn_npcs);Menu.sortMenu(mn_quests,2);Menu.sortMenu(mn_spells,2);Menu.sortMenu(mn_objects);Menu.sortMenu(mn_factions,2)}}function g_initPath(p,f){var h=mn_path,c=null,k=null,o=0,l=ge("main-precontents"),n=ce("div");ee(l);if(g_initPath.lastIt){g_initPath.lastIt.checked=null}n.className="path";if(f!=null){var m=ce("div");m.className="path-right";var q=ce("a");q.href="javascript:;";q.id="fi_toggle";ns(q);q.onclick=fi_toggle;if(f){q.className="disclosure-on";ae(q,ct(LANG.fihide))}else{q.className="disclosure-off";ae(q,ct(LANG.fishow))}ae(m,q);ae(l,m)}for(var g=0;g<p.length;++g){var q,b,r=0;for(var e=0;e<h.length;++e){if(h[e][0]==p[g]){r=1;h=h[e];h.checked=1;break}}if(!r){o=1;break}q=ce("a");b=ce("span");if(h[2]){q.href=h[2]}else{q.href="javascript:;";ns(q);q.style.textDecoration="none";q.style.color="white";q.style.cursor="default"}if(g<p.length-1&&h[3]){b.className="menuarrow"}ae(q,ct(h[4]==null?h[1]:h[4]));if(g==0){q.menu=mn_path}else{q.menu=c[3]}q.onmouseover=Menu.show;q.onmouseout=Menu.hide;ae(b,q);ae(n,b);k=b;c=h;h=h[3];if(!h){o=1;break}}if(o&&k){k.className=""}else{if(c&&c[3]){k.className="menuarrow";q=ce("a");b=ce("span");q.href="javascript:;";ns(q);q.style.textDecoration="none";q.style.paddingRight="16px";q.style.color="white";q.style.cursor="default";ae(q,ct("..."));q.menu=c[3];q.onmouseover=Menu.show;q.onmouseout=Menu.hide;ae(b,q);ae(n,b)}}var m=ce("div");m.className="clear";ae(n,m);ae(l,n);g_initPath.lastIt=c}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_formatDateSimple(g,c){function a(b){return(b<10?"0"+b:b)}var i="",j=g.getDate(),f=g.getMonth()+1,h=g.getFullYear();i+=sprintf(LANG.date_simple,a(j),a(f),h);if(c==1){var k=g.getHours()+1,e=g.getMinutes()+1;i+=LANG.date_at+a(k)+":"+a(e)}return i}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,e){if(!b){b=0}var c={text:b+(e>0?"(+"+e+")":"")+(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_createCaptcha(c){var b=ce("a");b.href="javascript:;";b.className="captcha";b.title=LANG.tooltip_captcha;if(c&1){b.style.marginLeft=b.style.marginRight="auto"}if(Browser.ie6){var d=ce("img");d.src="/?captcha&foo="+Math.random();ae(b,d);b.onclick=function(){de(this.firstChild);var a=ce("img");a.src="/?captcha&foo="+Math.random();ae(b,a);this.blur()}}else{b.style.backgroundImage="url(/?captcha&foo="+Math.random()+")";b.onclick=function(){this.style.backgroundImage="url(/?captcha&foo="+Math.random()+")"}}return b}function g_revealCaptcha(a){if((g_user.permissions&1)==0){var c=ge("klrbetkjerbt46");if(!c.firstChild){var b=g_createCaptcha(a);ae(c,b);c.parentNode.style.display=""}}}function g_getMoneyHtml(c){var b=0,a="";if(c>=10000){b=1;a+='<span class="moneygold">'+Math.floor(c/10000)+"</span>";c%=10000}if(c>=100){if(b){a+=" "}else{b=1}a+='<span class="moneysilver">'+Math.floor(c/100)+"</span>";c%=100}if(c>=1){if(b){a+=" "}else{b=1}a+='<span class="moneycopper">'+c+"</span>"}return a}function g_getMoneyHtml2(f,c,b,a){var e=g_getMoneyHtml(f);if(c!==undefined&&c!==null&&c!=0){if(e.length>0){e+=" "}e+='<span class="money'+(c<0?"horde":"alliance")+' tip" onmouseover="Listview.funcBox.moneyHonorOver(event)" onmousemove="Tooltip.cursorUpdate(event)" onmouseout="Tooltip.hide()">'+g_numberFormat(Math.abs(c))+"</span>"}if(b!==undefined&&b!==null&&b>0){if(e.length>0){e+=" "}e+='<span class="moneyarena tip" onmouseover="Listview.funcBox.moneyArenaOver(event)" onmousemove="Tooltip.cursorUpdate(event)" onmouseout="Tooltip.hide()">'+g_numberFormat(b)+"</span>"}if(a!==undefined&&a!==null&&a.length>0){for(var d=0;d<a.length;++d){if(e.length>0){e+=" "}var h=a[d][0];var g=a[d][1];e+='<a href="/?item='+h+'" class="moneyitem" style="background-image: url(http://static.wowhead.com/images/icons/tiny/'+(g_items[h]&&g_items[h]["icon"]?g_items[h]["icon"]:"inv_misc_questionmark").toLowerCase()+'.gif)">'+g+"</a>"}}return e}function g_numberFormat(f,b,l,h){var c=f,a=b;var e=function(r,q){var i=Math.pow(10,q);return(Math.round(r*i)/i).toString()};c=!isFinite(+c)?0:+c;a=!isFinite(+a)?0:Math.abs(a);var p=(typeof h==="undefined")?",":h;var d=(typeof l==="undefined")?".":l;var o=(a>0)?e(c,a):e(Math.round(c),a);var m=e(Math.abs(c),a);var k,g;if(m>=1000){k=m.split(/\D/);g=k[0].length%3||3;k[0]=o.slice(0,g+(c<0))+k[0].slice(g).replace(/(\d{3})/g,p+"$1");o=k.join(d)}else{o=o.replace(".",d)}var j=o.indexOf(d);if(a>=1&&j!==-1&&(o.length-j-1)<a){o+=new Array(a-(o.length-j-1)).join(0)+"0"}else{if(a>=1&&j===-1){o+=d+new Array(a).join(0)+"0"}}return o}function g_getPatchVersionIndex(e){var d=g_getPatchVersion;var b=0,c=d.T.length-2,a;while(c>b){a=Math.floor((c+b)/2);if(e>=d.T[a]&&e<d.T[a+1]){return a}if(e>=d.T[a]){b=a+1}else{c=a-1}}a=Math.ceil((c+b)/2);return a}function g_getPatchVersion(b){var a=g_getPatchVersionIndex(b);return g_getPatchVersion.V[a]}g_getPatchVersion.V=["1.12.0","1.12.1","1.12.2","2.0.1","2.0.3","2.0.4","2.0.5","2.0.6","2.0.7","2.0.8","2.0.10","2.0.12","2.1.0","2.1.1","2.1.2","2.1.3","2.2.0","2.2.2","2.2.3","2.3.0","2.3.2","2.3.3","2.4.0","2.4.1","2.4.2","2.4.3","3.0.2","3.0.3","3.0.8","3.0.9","3.1.0","3.1.1","3.1.2","3.1.3","3.2.0","3.2.2","3.3.0","3.3.2","???"];g_getPatchVersion.T=[1153540800000,1159243200000,1160712000000,1165294800000,1168318800000,1168578000000,1168750800000,1169528400000,1171342800000,1171602000000,1173157200000,1175572800000,1179806400000,1181016000000,1182225600000,1184040000000,1190692800000,1191297600000,1191902400000,1194930000000,1199768400000,1200978000000,1206417600000,1207022400000,1210651200000,1216094400000,1223956800000,1225774800000,1232427600000,1234242000000,1239681600000,1240286400000,1242705600000,1243915200000,1249358400000,1253595600000,1260266400000,1265104800000,9999999999999];function g_expandSite(){Ads.removeAll();var a=ge("topbar-expand");if(a){de(a)}a=ge("sidebar");if(a){de(a)}ge("wrapper").className="nosidebar noads"}function g_insertTag(d,a,i,j){var b=ge(d);b.focus();if(b.selectionStart!=null){var l=b.selectionStart,h=b.selectionEnd,k=b.scrollLeft,c=b.scrollTop;var g=b.value.substring(l,h);if(typeof j=="function"){g=j(g)}b.value=b.value.substr(0,l)+a+g+i+b.value.substr(h);b.selectionStart=b.selectionEnd=h+a.length;b.scrollLeft=k;b.scrollTop=c}else{if(document.selection&&document.selection.createRange){var f=document.selection.createRange();if(f.parentElement()!=b){return}var g=f.text;if(typeof j=="function"){g=j(g)}f.text=a+g+i}}if(b.onkeyup){b.onkeyup()}}function g_getIngameLink(a,c,b){prompt(LANG.prompt_ingamelink,'/script DEFAULT_CHAT_FRAME:AddMessage("\\124c'+a+"\\124H"+c+"\\124h["+b+']\\124h\\124r");')}function g_isEmailValid(a){return a.match(/^([a-z0-9._-]+)(\+[a-z0-9._-]+)?(@[a-z0-9.-]+\.[a-z]{2,4})$/i)!=null}function g_onAfterTyping(a,d,c){var e;var b=function(){if(e){clearTimeout(e);e=null}e=setTimeout(d,c)};a.onkeyup=b}function g_onClick(c,d){var b=0;function a(e){if(b){if(b!=e){return}}else{b=e}d(true)}c.oncontextmenu=function(){a(1);return false};c.onmouseup=function(f){f=$E(f);if(f._button==3||f.shiftKey||f.ctrlKey){a(2)}else{if(f._button==1){d(false)}}return false}}function g_isLeftClick(a){a=$E(a);return(a&&a._button==1)}function g_createOrRegex(c){c=c.replace(/(\(|\)|\|\+|\*|\?|\$|\^)/g,"\\$1");var e=c.split(" "),d="";for(var b=0,a=e.length;b<a;++b){if(b>0){d+="|"}d+=e[b]}return new RegExp("("+d+")","gi")}function g_addPages(l,b){function o(q,d){var i;if(q==b.page){i=ce("span");i.className="selected"}else{i=ce("a");i.href=(q>1?b.url+b.sep+q+b.pound:b.url+b.pound)}ae(i,ct(d!=null?d:q));return i}if(!b.pound){b.pound=""}if(!b.sep){b.sep="."}if(b.allOrNothing&&b.nPages<=1){return}var c=(b.align&&b.align=="left");var e=ce("div"),k,p=ce("var");e.className="pages";if(c){e.className+=" pages-left"}if(b.nPages>1){k=ce("div");k.className="pages-numbers";var n=Math.max(2,b.page-3);var h=Math.min(b.nPages-1,b.page+3);var m=[];if(b.page!=b.nPages){m.push(o(b.page+1,LANG.lvpage_next+String.fromCharCode(8250)))}m.push(o(b.nPages));if(h<b.nPages-1){var a=ce("span");ae(a,ct("..."));m.push(a)}for(var g=h;g>=n;--g){m.push(o(g))}if(n>2){var a=ce("span");ae(a,ct("..."));m.push(a)}m.push(o(1));if(b.page!=1){m.push(o(b.page-1,String.fromCharCode(8249)+LANG.lvpage_previous))}if(c){m.reverse()}for(var g=0,j=m.length;g<j;++g){ae(k,m[g])}k.firstChild.style.marginRight="0";k.lastChild.style.marginLeft="0"}var p=ce("var");ae(p,ct(sprintf(LANG[b.wording[b.nItems==1?0:1]],b.nItems)));if(b.nPages>1){var a=ce("span");ae(a,ct(String.fromCharCode(8211)));ae(p,a);var f=ce("a");f.className="gotopage";f.href="javascript:;";ns(f);if(Browser.ie){ae(f,ct(" "))}f.onclick=function(){var d=prompt(sprintf(LANG.prompt_gotopage,1,b.nPages),b.page);if(d!=null){d|=0;if(d!=b.page&&d>=1&&d<=b.nPages){document.location.href=(d>1?b.url+b.sep+d+b.pound:b.url+b.pound)}}};f.onmouseover=function(d){Tooltip.showAtCursor(d,LANG.tooltip_gotopage,0,0,"q2")};f.onmousemove=Tooltip.cursorUpdate;f.onmouseout=Tooltip.hide;ae(p,f)}if(c){ae(e,p);if(k){ae(e,k)}}else{if(k){ae(e,k)}ae(e,p)}ae(l,e)}function g_disclose(a,b){b.className="disclosure-"+(g_toggleDisplay(a)?"on":"off");return false}function co_addYourComment(){tabsContribute.focus(0);var a=gE(document.forms.addcomment,"textarea")[0];a.focus()}function co_cancelReply(){ge("gjkdlfgkjh436").style.display="none";document.forms.addcomment.elements.replyto.value=""}function co_validateForm(b){var a=gE(b,"textarea")[0];if(Listview.funcBox.coValidate(a)){if(g_user.permissions&1){return true}if(b.elements.captcha.value.length==5){return true}else{alert(LANG.message_codenotentered);b.elements.captcha.focus()}}return false}function ss_submitAScreenshot(){tabsContribute.focus(1)}function ss_validateForm(a){if(!a.elements.screenshotfile.value.length){alert(LANG.message_noscreenshot);return false}return true}function ss_appendSticky(){var m=ge("infobox-sticky");var i=g_pageInfo.type;var h=g_pageInfo.typeId;var k=in_array(lv_screenshots,1,function(a){return a.sticky});if(k!=-1){var c=lv_screenshots[k];var l=ce("a");l.href="#screenshots:id="+c.id;l.onclick=function(a){ScreenshotViewer.show({screenshots:lv_screenshots,pos:k});return rf2(a)};var f=ce("img"),e=Math.min(150/c.width,150/c.height);f.src="http://static.wowhead.com/uploads/screenshots/thumb/"+c.id+".jpg";f.className="border";ae(l,f);ae(m,l);var g=ce("div");var n=ce("small");l=ce("a");if(g_user.id>0){l.href="javascript:;";l.onclick=ss_submitAScreenshot}else{l.href="/?account=signin"}ae(l,ct(LANG.infobox_submitone));ae(n,l);ae(n,ct(" "+String.fromCharCode(160)));var j=ce("b");ae(j,ct("|"));ae(n,j);ae(n,ct(String.fromCharCode(160)+" "));l=ce("a");l.href="javascript:;";l.onclick=function(){tabsRelated.focus(-1);return false};ae(l,ct(sprintf(LANG.infobox_showall,lv_screenshots.length)));ae(n,l);ae(g,n);ae(m,g)}else{var l;if(g_user.id>0){l='<a href="javascript:;" onclick="ss_submitAScreenshot(); return false">'}else{l='<a href="/?account=signin">'}m.innerHTML=sprintf(LANG.infobox_noneyet,l+LANG.infobox_submitone+"</a>")}}var suDialog;function su_addToSaved(c,d,a,e){if(!c){return}if(!Dialog.templates.docompare){Dialog.templates.docompare={title:LANG.dialog_compare,width:400,height:138,buttons:["okay","cancel"],fields:[{id:"selecteditems",type:"caption",compute:function(h,g,f,i){i.innerHTML=sprintf((g==1?LANG.dialog_selecteditem:LANG.dialog_selecteditems),g)}},{id:"action",type:"radio",label:"",value:3,submitOnDblClick:1,options:{1:LANG.dialog_nosaveandview,2:LANG.dialog_saveandview,3:LANG.dialog_saveforlater}}]}}if(!suDialog){suDialog=new Dialog()}var b=function(h){var g=gc("compare_groups"),f="/?compare";if(h.action>1){if(g){c=g+";"+c}sc("compare_groups",20,c,"/",".wowhead.com");if(e){sc("compare_level",20,e,"/",".wowhead.com")}}else{f+="="+c+(e?"&l="+e:"")}if(h.action<3){if(a){window.open(f)}else{location.href=f}}};suDialog.show("docompare",{data:{selecteditems:d,action:1},onSubmit:b})}function Ajax(b,c){if(!b){return}var a;try{a=new XMLHttpRequest()}catch(d){try{a=new ActiveXObject("Msxml2.XMLHTTP")}catch(d){try{a=new ActiveXObject("Microsoft.XMLHTTP")}catch(d){if(window.createRequest){a=window.createRequest()}else{alert(LANG.message_ajaxnotsupported);return}}}}this.request=a;cO(this,c);this.method=this.method||(this.params&&"POST")||"GET";a.open(this.method,b,this.async==null?true:this.async);a.onreadystatechange=Ajax.onReadyStateChange.bind(this);if(this.method.toUpperCase()=="POST"){a.setRequestHeader("Content-Type",(this.contentType||"application/x-www-form-urlencoded")+"; charset="+(this.encoding||"UTF-8"))}a.send(this.params)}Ajax.onReadyStateChange=function(){if(this.request.readyState==4){if(this.request.status==0||(this.request.status>=200&&this.request.status<300)){this.onSuccess!=null&&this.onSuccess(this.request,this)}else{this.onFailure!=null&&this.onFailure(this.request,this)}if(this.onComplete!=null){this.onComplete(this.request,this)}}};var Menu={iframes:[],divs:[],selection:[],show:function(){try{clearTimeout(Menu.timer);if(Menu.currentLink){Menu._show(this)}else{if(this.className.indexOf("open")==-1){this.className+=" open"}Menu.timer=setTimeout(Menu._show.bind(0,this),100)}}catch(a){}},_show:function(b){if(Menu.currentLink!=b){var a=ac(b);Menu._hide();Menu.selection=[-1];Menu.currentLink=b;Menu.showDepth(0,b.menu,a[0],a[1]+b.offsetHeight+1,b.offsetHeight+8,b.offsetWidth,a[1],false);if(b.className.indexOf("open")==-1){b.className+=" open"}}else{Menu.truncate(0);Menu.clean(0)}},showAtCursor:function(b,a,d){clearTimeout(Menu.timer);Menu._hide();Menu.selection=[-1];Menu.currentLink=null;if(!(a&&d)){b=$E(b);var c=g_getCursorPos(b);a=c.x;d=c.y}if(Browser.ie6){a-=2;d-=2}Menu.showDepth(0,this.menu,a,d,0,0,0,true)},hide:function(){try{clearTimeout(Menu.timer);if(Menu.currentLink){Menu.timer=setTimeout(Menu._hide,333)}else{this.className=this.className.replace("open","")}}catch(a){}},_hide:function(){for(var b=0,a=Menu.selection.length;b<a;++b){Menu.divs[b].style.display="none";Menu.divs[b].style.visibility="hidden";if(Browser.ie6){Menu.iframes[b].style.display="none"}}Menu.selection=[];if(Menu.currentLink){Menu.currentLink.className=Menu.currentLink.className.replace("open","")}Menu.currentLink=null},sepOver:function(){var b=this.d;var a=b.i;Menu.truncate(a);Menu.clean(a);Menu.selection[a]=-1},elemOver:function(){var g=this.d;var f=g.i;var e=this.i;var a=this.k;var b=this.firstChild.className=="menusub";Menu.truncate(f+b);if(b&&a!=Menu.selection[f]){var h=ac(this);Menu.selection[f+1]=-1;Menu.showDepth(f+1,g.menuArray[e][3],h[0],h[1]-2,this.offsetHeight,this.offsetWidth-3,0,false)}Menu.clean(f);Menu.selection[f]=a;if(this.className.length){this.className+=" open"}else{this.className="open"}},elemClick:function(a){Menu._hide();a()},getIframe:function(a){var b;if(Menu.iframes[a]==null){b=ce("iframe");b.src="javascript:0;";b.frameBorder=0;ae(ge("layers"),b);Menu.iframes[a]=b}else{b=Menu.iframes[a]}return b},getDiv:function(a,b){var c;if(Menu.divs[a]==null){c=ce("div");c.className="menu";ae(ge("layers"),c);Menu.divs[a]=c}else{c=Menu.divs[a]}c.i=a;c.menuArray=b;return c},showDepth:function(Q,c,E,D,R,H,B,A){var ab,Y=Menu.getDiv(Q,c);while(Y.firstChild){de(Y.firstChild)}var z=ce("table"),C=ce("tbody"),W=ce("tr"),f=ce("td"),T=ce("div"),M=ce("div");var L=999;var b=g_getWindowSize(),l=g_getScroll(),g=b.w,o=b.h,aa=l.x,S=l.y;if(R>0&&(Q>0||c.length>20)){if((25+1)*c.length>o-25-B){for(var O=2;O<4;++O){if(R/O*c.length+30<o-B){break}}L=Math.floor(c.length/O)}}var r=0;var N=0;for(var O=0,t=c.length;O<t;++O){var U=c[O];if(U[0]==null){var q=ce("span");q.className="separator";ns(q);ae(q,ct(U[1]));q.d=Y;q.onmouseover=Menu.sepOver;ae(M,q)}else{var Z=ce("a");Z.d=Y;Z.k=N++;Z.i=O;if(U[2]){if(Menu.currentLink&&Menu.currentLink.menuappend){if(U[2].indexOf(Menu.currentLink.menuappend)==-1){Z.href=U[2]+Menu.currentLink.menuappend}else{Z.href=U[2]}}else{if(typeof U[2]=="function"){Z.href="javascript:;";Z.onclick=Menu.elemClick.bind(0,U[2]);ns(Z)}else{Z.href=U[2]}}}else{Z.href="javascript:;";Z.style.cursor="default";ns(Z)}Z.onmouseover=Menu.elemOver;var J=ce("span"),X=ce("span");if(U[3]!=null){J.className="menusub"}if(U.checked){X.className="menucheck"}if(U.newWindow||g_isExternalUrl(Z.href)){Z.target="_blank";U.newWindow=true}if(U.className){X.className+=U.className}if(U.tinyIcon){X.style.background="url(http://static.wowhead.com/images/icons/tiny/"+U.tinyIcon.toLowerCase()+".gif) left center no-repeat"}else{if(U.socketColor){X.className+=" socket-"+g_file_gems[U.socketColor]}else{if(U.smallIcon){Z.style.padding="0px";X.style.padding="4px 18px 4px 28px";X.style.background="url(http://static.wowhead.com/images/icon_border_small.png) left center no-repeat transparent";J.style.background="url(http://static.wowhead.com/images/icons/small/"+U.smallIcon.toLowerCase()+".jpg) 4px 3px no-repeat transparent"}else{if(U.otherImage){var V=ce("span");ae(J,V);X.style.display="inline";if(Browser.ie67){V.style.display="inline-block"}else{V.style.display="inline"}X.style.paddingLeft="3px";V.style.paddingLeft="16px";V.style.width="0px";V.style.height="16px";V.style.cssFloat=V.style.styleFloat="left";V.style.background="url("+U.otherImage[0]+") "+U.otherImage[1]+"px center no-repeat transparent"}}}}ae(X,ct(U[1]));ae(J,X);ae(Z,J);if(U.analytics){g_addAnalyticsToNode(Z,U.analytics)}ae(M,Z)}if(r++==L){T.onmouseover=Menu.divOver;T.onmouseout=Menu.divOut;ae(T,M);if(!Browser.ie6){var K=ce("p");var P=ce("em");var I=ce("var");var u=ce("strong");P.onmouseover=Menu.divOver;P.onmouseout=Menu.divOut;I.onmouseover=Menu.divOver;I.onmouseout=Menu.divOut;u.onmouseover=Menu.divOver;u.onmouseout=Menu.divOut;ae(K,P);ae(K,I);ae(K,u);ae(K,T);ae(f,K)}else{ae(f,T)}ae(W,f);f=ce("td");K=ce("p");T=ce("div");M=ce("div");r=0}}T.onmouseover=Menu.divOver;T.onmouseout=Menu.divOut;ae(T,M);if(!Browser.ie6){if(L!=999){var K=ce("p");var P=ce("em");var I=ce("var");var u=ce("strong");P.onmouseover=Menu.divOver;P.onmouseout=Menu.divOut;I.onmouseover=Menu.divOver;I.onmouseout=Menu.divOut;u.onmouseover=Menu.divOver;u.onmouseout=Menu.divOut;ae(K,P);ae(K,I);ae(K,u);ae(K,T);ae(f,K)}else{var P=ce("em");var I=ce("var");var u=ce("strong");P.onmouseover=Menu.divOver;P.onmouseout=Menu.divOut;I.onmouseover=Menu.divOver;I.onmouseout=Menu.divOut;u.onmouseover=Menu.divOver;u.onmouseout=Menu.divOut;ae(Y,P);ae(Y,I);ae(Y,u);ae(f,T)}}else{ae(f,T)}ae(W,f);ae(C,W);ae(z,C);ae(Y,z);Y.style.left=Y.style.top="-2323px";Y.style.display="";var e=z.offsetWidth,n=z.offsetHeight,G=true,F=true;if(!Browser.ie6){e+=5;n+=6}if(E+e>g+aa||c.rightAligned){G=false}if(G){if(E+H+e>g){E=Math.max(0,E-e)}else{if(Q>0){E+=H}}}else{E=E+H-e;if(Browser.ie){E-=3}}if((Q>0||A)&&D+n>o+S){D=Math.max(S+5,o+S-n)}if(c.forceUpwards&&(D+n>o+S)){D=D-n-25}Y.style.left=E+"px";Y.style.top=D+"px";if(Browser.ie6){ab=Menu.getIframe(Q);ab.style.left=E+"px";ab.style.top=D+"px";ab.style.width=e+"px";ab.style.height=n+"px";ab.style.display="";ab.style.visibility="visible"}Y.style.visibility="visible";if(Browser.opera){Y.style.display="none";Y.style.display=""}},divOver:function(){clearTimeout(Menu.timer)},divOut:function(){clearTimeout(Menu.timer);Menu.timer=setTimeout(Menu._hide,333)},truncate:function(b){var c;while(Menu.selection.length-1>b){c=Menu.selection.length-1;Menu.divs[c].style.display="none";Menu.divs[c].style.visibility="hidden";if(Browser.ie6){Menu.iframes[c].style.display="none"}Menu.selection.pop()}},clean:function(b){for(var c=b;c<Menu.selection.length;++c){if(Menu.selection[c]!=-1){var e=gE(Menu.divs[c],"a")[Menu.selection[c]];if(e.className.indexOf("sub")!=-1){e.className="sub"}else{e.className=""}Menu.selection[c]=-1}}},append:function(b,c){b[2]+=c;if(b[3]!=null){Menu._append(b[3],c)}},_append:function(b,d){var e,g=0;for(var c=0;c<b.length;++c){var f=b[c][2].indexOf("&filter=");if(f!=-1&&d.indexOf("&filter=")==0){d=Menu._fixCollision(b[c][2].substr(f),d)}b[c][2]+=d;if(b[c][3]){Menu._append(b[c][3],d)}}},_splitFilter:function(b){var g=b.substr(8).split(";"),c={};for(var e=0,a=g.length;e<a;++e){var h=g[e].indexOf("="),d,f;if(h!=-1){d=g[e].substr(0,h);f=g[e].substr(h+1)}else{d=g[e];f=""}c[d]=f}return c},_fixCollision:function(d,a){var b=Menu._splitFilter(d),c=Menu._splitFilter(a);a="";for(var e in c){if(!b[e]&&e!="sl"&&e!="cl"){a+=";";a+=e+"="+c[e]}}return a},fixUrls:function(g,c,e,b,f){if(!f){f=0}for(var d=0,a=g.length;d<a;++d){if(g[d][2]==null){g[d][2]=c+g[d][0]+(e?e:"")}if(g[d][3]){if(b==true||(typeof b=="object"&&b[f]==true)){Menu.fixUrls(g[d][3],c,e,b,f+1)}else{Menu.fixUrls(g[d][3],c+g[d][0]+".",e,b,f+1)}}}},sortMenu:function(g,f,e){var h=[],b=[];var d=function(k,m){k.sort(function(n,i){return strcmp(n[1],i[1])});for(var l=0,j=k.length;l<j;++l){m.push(k[l])}};for(var c=0,a=g.length;c<a;++c){if(g[c][3]&&f!=1&&(!e||e[c])){Menu.sortMenu(g[c][3])}if(f==2){h.push(g[c])}else{if(g[c][0]==null){d(b,h);h.push(g[c]);b=[]}else{b.push(g[c])}}}d(b,h);g.splice(0,g.length);for(var c=0,a=h.length;c<a;++c){g.push(h[c])}},addButtons:function(h,g){if(!g){return}for(var e=0,b=g.length;e<b;++e){if(g[e][0]==null){continue}var c=ce("a"),f=ce("span");if(g[e][2]){c.href=g[e][2];if(g[e].newWindow||g_isExternalUrl(g[e][2])){c.target="_blank";g[e].newWindow=true}}else{c.href="javascript:;";c.style.cursor="default";c.style.textDecoration="none";ns(c)}if(g[e][3]!=null){f.className="menuarrowd";c.menu=g[e][3];c.onmouseover=Menu.show;c.onmouseout=Menu.hide}else{c.onmouseover=Menu._hide}ae(f,ct(g[e][1]));ae(c,f);ae(h,c)}},explode:function(h,c){c=c||{};var e=[],g=null,d;var f=!(c.ignoreSeparators);for(var b=0,a=h.length;b<a;++b){if(h[b][0]!=null){if(g!=null){d.push(h[b])}else{e.push(h[b])}}if(g!=null&&(h[b][0]==null||b==a-1)){e.push([0,g[1],,d])}if(h[b][0]==null&&f){g=h[b];d=[]}}return e},find:function(c,b){if(c&&b){for(var a=0;a<b.length;++a){var e=b[a];if(c.length<5){c=c[3]}if(c){var d=in_array(c,e,function(f){return f[0]});if(d!=-1){c=c[d]}}}}return c}};function Tabs(a){cO(this,a);if(this.parent){this.parent=ge(this.parent)}else{return}this.oldMode=(Browser.geckoVersion>20000000&&Browser.geckoVersion<=20060414);this.selectedTab=-1;this.uls=[];this.tabs=[];this.nShows=0;if(this.poundable==null){this.poundable=1}this.poundedTab=null;if(this.onLoad==null){this.onLoad=Tabs.onLoad.bind(this)}if(this.onShow==null){this.onShow=Tabs.onShow.bind(this)}if(this.onHide){this.onHide=this.onHide.bind(this)}}Tabs.prototype={add:function(a,d){var c,b=this.tabs.length;c={caption:a,index:b,owner:this};cO(c,d);this.tabs.push(c);return b},hide:function(c,e){if(this.tabs[c]){var b=this.selectedTab;if(c!=this.poundedTab){this.selectedTab=-1}ee(this.parent);this.tabs[c].hidden=!e;this.flush();if(!e&&c==b){for(var d=0,a=this.tabs.length;d<a;++d){if(d!=c&&!this.tabs[d].hidden){return this.show(d,1)}}}}},focus:function(a){if(a<0){a=this.tabs.length+a}this.forceScroll=1;gE(this.uls[this.oldMode?0:2],"a")[a].onclick({},true);this.forceScroll=null},show:function(c,e){var b;if(isNaN(c)||c<0||this.tabs[c].hidden){c=0}else{if(c>=this.tabs.length){c=this.tabs.length-1}}if(e==null&&c==this.selectedTab){return}if(this.selectedTab!=-1){b=this.tabs[this.selectedTab];if(this.onHide&&!this.onHide(b)){return}if(b.onHide&&!b.onHide()){return}}++this.nShows;var a=this.oldMode?0:3;for(var d=0;d<=a;++d){b=gE(this.uls[d],"a");if(this.selectedTab!=-1){b[this.selectedTab].className=""}b[c].className="selected"}b=this.tabs[c];if(b.onLoad){b.onLoad();b.onLoad=null}this.onShow(this.tabs[c],this.tabs[this.selectedTab]);if(b.onShow){b.onShow(this.tabs[this.selectedTab])}this.selectedTab=c},flush:function(p){if(this.oldMode){var m,t,e,r;m=ce("ul");m.className="old-tabs";for(var k=0;k<this.tabs.length;++k){var f=this.tabs[k];t=ce("li");e=ce("div");r=ce("a");if(f.hidden){t.style.display="none"}if(this.poundable){r.href="#"+f.id}else{r.href="javascript:;"}ns(r);r.onclick=Tabs.onClick.bind(f,r);ae(r,ct(f.caption));ae(t,e);ae(t,r);ae(m,t)}this.uls[0]=m;ae(this.parent,m);var u=ce("div");u.style.cssFloat=u.style.styleFloat="left";ae(this.parent,u)}else{var u,g,r,q,o,c;var n=ce("div");n.className="tabs-container";o=ce("div");o.style.visibility="hidden";this.uls[0]=ce("ul");this.uls[0].className="tabs";ae(o,this.uls[0]);ae(n,o);o=ce("div");o.className="tabs-levels";for(var k=1;k<=3;++k){c=ce("div");c.className="tabs-level";this.uls[k]=ce("ul");this.uls[k].className="tabs";this.uls[k].style.top=(-30*(3-k))+"px";ae(c,this.uls[k]);ae(o,c)}ae(n,o);for(var k=0;k<this.tabs.length;++k){var f=this.tabs[k];for(var h=0;h<=3;++h){g=ce("li");r=ce("a");q=ce("b");if(f.hidden){g.style.display="none"}if(this.poundable){r.href="#"+f.id}else{r.href="javascript:;"}if(h>0){ns(r);r.onclick=Tabs.onClick.bind(f,r)}if(!Browser.ie6){o=ce("div");if(f.icon){s=ce("span");s.className="icontiny";s.style.backgroundImage="url(http://static.wowhead.com/images/icons/tiny/"+f.icon.toLowerCase()+".gif)";ae(o,s)}ae(o,ct(f.caption));ae(r,o)}if(f.icon){s=ce("span");s.className="icontiny";s.style.backgroundImage="url(http://static.wowhead.com/images/icons/tiny/"+f.icon.toLowerCase()+".gif)";ae(q,s)}ae(q,ct(f.caption));ae(r,q);ae(g,r);ae(this.uls[h],g)}}ae(this.parent,n)}if(this.onLoad){u=this.onLoad();if(u!=null){this.poundedTab=p=u}}this.show(p)},setTabName:function(d,c){var a=this.oldMode?0:3;this.tabs[d].caption=c;for(var e=0;e<=a;++e){var b=gE(this.uls[e],"a");g_setTextNodes(b[d],c)}},setTabPound:function(d,a){if(!this.poundable){return}var b=this.oldMode?0:3;for(var e=0;e<=b;++e){var c=gE(this.uls[e],"a");c[d].href="#"+this.tabs[d].id+":"+a}},getSelectedTab:function(){return this.selectedTab}};Tabs.onClick=function(b,g,f){if(f==null&&this.index==this.owner.selectedTab){return}var d=rf2(g);if(d==null){return}this.owner.show(this.index,f);if(this.owner.poundable){var c=b.href.indexOf("#");c!=-1&&location.replace(b.href.substr(c))}return d};Tabs.onLoad=function(){if(!this.poundable||!location.hash.length){return}var a=location.hash.substr(1).split(":")[0];if(a){return in_array(this.tabs,a,function(b){return b.id})}};Tabs.onShow=function(d,e){var b;if(e){ge("tab-"+e.id).style.display="none"}b=ge("tab-"+d.id);b.style.display="";if((this.nShows==1&&this.poundedTab!=null&&this.poundedTab>=0)||this.forceScroll){var c,a;if(this.__st){c=this.__st;a=15}else{c=b;a=this.parent.offsetHeight+15}if(Browser.ie){setTimeout(g_scrollTo.bind(this,c,a),1)}else{g_scrollTo(c,a)}}};var Icon={sizes:["small","medium","large"],sizes2:[18,36,56],premiumOffsets:[[-56,-36],[-56,0],[0,0]],create:function(c,k,h,b,e,j){var g=ce("div"),d=ce("ins"),f=ce("del");if(k==null){k=1}g.className="icon"+Icon.sizes[k];ae(g,d);ae(g,f);Icon.setTexture(g,k,c);if(b){var i=ce("a");i.href=b;if(b.indexOf("wowhead.com")==-1&&b.substr(0,5)=="http:"){i.target="_blank"}ae(g,i)}else{if(Browser.opera){g.onclick=Icon.onClick}else{g.ondblclick=Icon.onDblClick}}Icon.setNumQty(g,e,j);return g},createUser:function(d,f,c,b,a){if(d==2){f="http://static.wowhead.com/uploads/avatars/"+f+".jpg"}var e=Icon.create(f,c,null,b);if(a){e.className+=" "+e.className+"-premium"}if(d==2){Icon.moveTexture(e,c,Icon.premiumOffsets[c][0],Icon.premiumOffsets[c][1],true)}return e},setTexture:function(d,c,b){if(!b){return}var a=d.firstChild.style;if(b.indexOf("/")!=-1){a.backgroundImage="url("+b+")"}else{a.backgroundImage="url(http://static.wowhead.com/images/icons/"+Icon.sizes[c]+"/"+b.toLowerCase()+".jpg)"}Icon.moveTexture(d,c,0,0)},moveTexture:function(e,c,a,f,d){var b=e.firstChild.style;if(a||f){if(d){b.backgroundPosition=a+"px "+f+"px"}else{b.backgroundPosition=(-a*Icon.sizes2[c])+"px "+(-f*Icon.sizes2[c])+"px"}}else{if(b.backgroundPosition){b.backgroundPosition=""}}},setNumQty:function(e,c,f){var b=gE(e,"span");for(var d=0,a=b.length;d<a;++d){if(b[d]){de(b[d])}}if(c!=null&&((c>1&&c<2147483647)||c.length)){b=g_createGlow(c,"q1");b.style.right="0";b.style.bottom="0";b.style.position="absolute";ae(e,b)}if(f!=null&&f>0){b=g_createGlow("("+f+")","q");b.style.left="0";b.style.top="0";b.style.position="absolute";ae(e,b)}},getLink:function(a){return gE(a,"a")[0]},showIconName:function(a){if(a.firstChild){var c=a.firstChild.style;if(c.backgroundImage.length&&c.backgroundImage.indexOf("http://static.wowhead.com")>=4){var d=c.backgroundImage.lastIndexOf("/"),b=c.backgroundImage.indexOf(".jpg");if(d!=-1&&b!=-1){prompt("",c.backgroundImage.substring(d+1,b))}}}},onDblClick:function(){if(this.firstChild){var b=this.firstChild.style;if(b.backgroundImage.length&&b.backgroundImage.indexOf("http://static.wowhead.com")>=4){if(b.backgroundImage.indexOf("/avatars/")!=-1){return}var c=b.backgroundImage.lastIndexOf("/"),a=b.backgroundImage.indexOf(".jpg");if(c!=-1&&a!=-1){prompt("",b.backgroundImage.substring(c+1,a))}}}},onClick:function(){if(this.lastClick){var a=new Date().getTime();if(a-this.lastClick<400){Icon.onDblClick.bind(this)();this.lastClick=null}else{this.lastClick=a}}else{this.lastClick=new Date().getTime()}}};var RedButton={create:function(k,g,j){var d=ce("a"),f=ce("em"),c=ce("b"),e=ce("i"),h=ce("span");d.href="javascript:;";d.className="button-red";ae(c,e);ae(f,c);ae(f,h);ae(d,f);RedButton.setText(d,k);RedButton.enable(d,g);RedButton.setFunc(d,j);return d},setText:function(a,b){st(a.firstChild.childNodes[0].firstChild,b);st(a.firstChild.childNodes[1],b)},enable:function(a,b){if(b||b==null){a.className=a.className.replace("button-red-disabled","")}else{if(a.className.indexOf("button-red-disabled")==-1){a.className+=" button-red-disabled"}}},setFunc:function(a,b){a.onclick=(b?b:null)}};var g_listviews={};function Listview(a){cO(this,a);if(this.id){var n=(this.tabs?"tab-":"lv-")+this.id;if(this.parent){var l=ce("div");l.id=n;ae(ge(this.parent),l);this.container=l}else{this.container=ge(n)}}else{return}var c=g_getGets();if((c.debug!=null||g_user.debug)&&g_user.roles&26){this.debug=true}if(this.template&&Listview.templates[this.template]){this.template=Listview.templates[this.template]}else{return}g_listviews[this.id]=this;if(this.data==null){this.data=[]}if(this.poundable==null){if(this.template.poundable!=null){this.poundable=this.template.poundable}else{this.poundable=true}}if(this.searchable==null){if(this.template.searchable!=null){this.searchable=this.template.searchable}else{this.searchable=false}}if(this.filtrable==null){if(this.template.filtrable!=null){this.filtrable=this.template.filtrable}else{this.filtrable=false}}if(this.sortable==null){if(this.template.sortable!=null){this.sortable=this.template.sortable}else{this.sortable=true}}if(this.data.length==1){this.filtrable=false;this.searchable=false}if(this.searchable&&this.searchDelay==null){if(this.template.searchDelay!=null){this.searchDelay=this.template.searchDelay}else{this.searchDelay=333}}if(this.clickable==null){if(this.template.clickable!=null){this.clickable=this.template.clickable}else{this.clickable=true}}if(this.hideBands==null){this.hideBands=this.template.hideBands}if(this.hideNav==null){this.hideNav=this.template.hideNav}if(this.hideHeader==null){this.hideHeader=this.template.hideHeader}if(this.hideCount==null){this.hideCount=this.template.hideCount}if(this.computeDataFunc==null&&this.template.computeDataFunc!=null){this.computeDataFunc=this.template.computeDataFunc}if(this.createCbControls==null&&this.template.createCbControls!=null){this.createCbControls=this.template.createCbControls}if(this.template.onBeforeCreate!=null){if(this.onBeforeCreate==null){this.onBeforeCreate=this.template.onBeforeCreate}else{this.onBeforeCreate=[this.template.onBeforeCreate,this.onBeforeCreate]}}if(this.onAfterCreate==null&&this.template.onAfterCreate!=null){this.onAfterCreate=this.template.onAfterCreate}if(this.onNoData==null&&this.template.onNoData!=null){this.onNoData=this.template.onNoData}if(this.createNote==null&&this.template.createNote!=null){this.createNote=this.template.createNote}if(this.customFilter==null&&this.template.customFilter!=null){this.customFilter=this.template.customFilter}if(this.onSearchSubmit==null&&this.template.onSearchSubmit!=null){this.onSearchSubmit=this.template.onSearchSubmit}if(this.clip==null&&this.template.clip!=null){this.clip=this.template.clip}if(this.mode==null){this.mode=this.template.mode}if(this.nItemsPerPage==null){if(this.template.nItemsPerPage!=null){this.nItemsPerPage=this.template.nItemsPerPage}else{this.nItemsPerPage=50}}this.nItemsPerPage|=0;if(this.nItemsPerPage<=0){this.nItemsPerPage=0}this.nFilters=0;this.resetRowVisibility();if(this.mode==Listview.MODE_TILED){if(this.nItemsPerRow==null){var r=this.template.nItemsPerRow;this.nItemsPerRow=(r!=null?r:4)}this.nItemsPerRow|=0;if(this.nItemsPerRow<=1){this.nItemsPerRow=1}}else{this.nItemsPerRow=1}this.columns=[];for(var f=0,k=this.template.columns.length;f<k;++f){var q=this.template.columns[f],e={};cO(e,q);this.columns.push(e)}if(this.extraCols!=null){for(var f=0,k=this.extraCols.length;f<k;++f){var m=null;var b=this.extraCols[f];if(b.after||b.before){var j=in_array(this.columns,(b.after?b.after:b.before),function(d){return d.id});if(j!=-1){m=(b.after?j+1:j-1)}}if(m==null){m=this.columns.length}if(b.id=="debug-id"){this.columns.splice(0,0,b)}else{this.columns.splice(m,0,b)}}}this.visibility=[];var o=[],p=[];if(this.visibleCols!=null){array_walk(this.visibleCols,function(d){o[d]=1})}if(this.hiddenCols!=null){array_walk(this.hiddenCols,function(d){p[d]=1})}for(var f=0,k=this.columns.length;f<k;++f){var b=this.columns[f];if(o[b.id]!=null||(!b.hidden&&p[b.id]==null)){this.visibility.push(f)}}if(this.sort==null&&this.template.sort){this.sort=this.template.sort.slice(0)}if(this.sort!=null){var h=this.sort;this.sort=[];for(var f=0,k=h.length;f<k;++f){var b=parseInt(h[f]);if(isNaN(b)){var g=0;if(h[f].charAt(0)=="-"){g=1;h[f]=h[f].substring(1)}var j=in_array(this.columns,h[f],function(d){return d.id});if(j!=-1){if(g){this.sort.push(-(j+1))}else{this.sort.push(j+1)}}}else{this.sort.push(b)}}}else{this.sort=[]}if((this.debug||g_user.debug)&&this.id!="topics"&&this.id!="recipes"){this.columns.splice(0,0,{id:"debug-id",compute:function(d,i){if(d.id){ae(i,ct(d.id))}},getVisibleText:function(d){if(d.id){return d.id}else{return""}},sortFunc:function(i,d,t){if(i.id==null){return -1}else{if(d.id==null){return 1}}return strcmp(i.id,d.id)},name:"ID",width:"5%",tooltip:"ID"});this.visibility.splice(0,0,-1);for(var f=0,k=this.visibility.length;f<k;++f){this.visibility[f]=this.visibility[f]+1}for(var f=0,k=this.sort.length;f<k;++f){if(this.sort[f]<0){this.sort[f]=this.sort[f]-1}else{this.sort[f]=this.sort[f]+1}}}if(this.tabs){this.tabIndex=this.tabs.add(this.getTabName(),{id:this.id,onLoad:this.initialize.bind(this)})}else{this.initialize()}}Listview.MODE_DEFAULT=0;Listview.MODE_CHECKBOX=1;Listview.MODE_DIV=2;Listview.MODE_TILED=3;Listview.prototype={initialize:function(){if(this.data.length){if(this.computeDataFunc!=null){for(var d=0,a=this.data.length;d<a;++d){this.computeDataFunc(this.data[d])}}}if(this.tabs){this.pounded=(this.tabs.poundedTab==this.tabIndex);if(this.pounded){this.readPound()}}else{this.readPound()}this.applySort();var b;if(this.onBeforeCreate!=null){if(typeof this.onBeforeCreate=="function"){b=this.onBeforeCreate()}else{for(var d=0;d<this.onBeforeCreate.length;++d){(this.onBeforeCreate[d].bind(this))()}}}this.noData=ce("div");this.noData.className="listview-nodata text";if(this.mode==Listview.MODE_DIV){this.mainContainer=this.mainDiv=ce("div");this.mainContainer.className="listview-mode-div"}else{this.mainContainer=this.table=ce("table");this.thead=ce("thead");this.tbody=ce("tbody");if(this.clickable){this.tbody.className="clickable"}if(this.mode==Listview.MODE_TILED){this.table.className="listview-mode-tiled";var e=(100/this.nItemsPerRow)+"%",f=ce("colgroup"),c;for(var d=0;d<this.nItemsPerRow;++d){c=ce("col");c.style.width=e;ae(f,c)}ae(this.mainContainer,f)}else{this.table.className="listview-mode-default";this.createHeader();this.updateSortArrow()}ae(this.table,this.thead);ae(this.table,this.tbody);if(this.mode==Listview.MODE_CHECKBOX&&Browser.ie){setTimeout(Listview.cbIeFix.bind(this),1)}}this.createBands();if(this.customFilter!=null){this.updateFilters()}this.updateNav();this.refreshRows();if(this.onAfterCreate!=null){this.onAfterCreate(b)}},createHeader:function(){var h=ce("tr");if(this.mode==Listview.MODE_CHECKBOX){var g=ce("th"),j=ce("div"),c=ce("a");g.style.width="33px";c.href="javascript:;";c.className="listview-cb";ns(c);ae(c,ct(String.fromCharCode(160)));ae(j,c);ae(g,j);ae(h,g)}for(var f=0,b=this.visibility.length;f<b;++f){var e=this.visibility[f],d=this.columns[e],g=ce("th");j=ce("div"),c=ce("a"),outerSpan=ce("span"),innerSpan=ce("span");d.__th=g;c.href="javascript:;";if(this.filtrable&&(d.filtrable==null||d.filtrable)){c.onmouseup=Listview.headerClick.bind(this,d,e);c.onclick=c.oncontextmenu=rf}else{if(this.sortable){c.onclick=this.sortBy.bind(this,e+1)}}if(c.onclick){c.onmouseover=Listview.headerOver.bind(this,c,d);c.onmouseout=Tooltip.hide;ns(c)}else{c.className="static"}if(d.width!=null){g.style.width=d.width}if(d.align!=null){g.style.textAlign=d.align}if(d.span!=null){g.colSpan=d.span}ae(innerSpan,ct(d.name));ae(outerSpan,innerSpan);ae(c,outerSpan);ae(j,c);ae(g,j);ae(h,g)}if(this.hideHeader){this.thead.style.display="none"}ae(this.thead,h)},createBands:function(){var i=ce("div"),k=ce("div"),l=ce("div"),j=ce("div");this.bandTop=i;this.bandBot=k;this.noteTop=l;this.noteBot=j;i.className="listview-band-top";k.className="listview-band-bottom";this.navTop=this.createNav(true);this.navBot=this.createNav(false);l.className=j.className="listview-note";if(this.note){l.innerHTML=this.note;var n=ge("fi");if(this.note.indexOf("fi_toggle()")>-1&&n&&n.style.display=="none"){fi_toggle()}}else{if(this.createNote){this.createNote(l,j)}}if(this.debug&&this.id!="topics"){ae(l,ct(" ("));var b=ce("a");b.onclick=this.getList.bind(this);ae(b,ct("CSV"));ae(l,b);ae(l,ct(")"))}if(!l.firstChild&&this.mode!=Listview.MODE_CHECKBOX){ae(l,ct(String.fromCharCode(160)))}if(this.mode!=Listview.MODE_CHECKBOX){ae(j,ct(String.fromCharCode(160)))}ae(i,this.navTop);if(this.searchable){var m=this.updateFilters.bind(this,true),e=(this._truncated?"search-within-results2":"search-within-results"),d=ce("span"),c=ce("em"),h=ce("a"),g=ce("input");d.className="listview-quicksearch";ae(d,c);h.href="javascript:;";h.onclick=function(){var a=this.nextSibling;a.value="";a.className=e;m()};h.style.display="none";ae(h,ce("span"));ae(d,h);ns(h);g.setAttribute("type","text");g.className=e;g.style.width=(this._truncated?"19em":"15em");g_onAfterTyping(g,m,this.searchDelay);g.onmouseover=function(){if(trim(this.value)!=""){this.className=""}};g.onfocus=function(){this.className=""};g.onblur=function(){if(trim(this.value)==""){this.className=e;this.value=""}};g.onkeypress=this.submitSearch.bind(this);if(Browser.ie){setTimeout(function(){g.value=""},1)}ae(d,g);this.quickSearchBox=g;this.quickSearchGlass=c;this.quickSearchClear=h;ae(i,d)}ae(i,l);ae(k,this.navBot);ae(k,j);if(this.mode==Listview.MODE_CHECKBOX){if(this.note){l.style.paddingBottom="5px"}this.cbBarTop=this.createCbBar(true);this.cbBarBot=this.createCbBar(false);ae(i,this.cbBarTop);ae(k,this.cbBarBot);if(!this.noteTop.firstChild&&!this.cbBarTop.firstChild){this.noteTop.innerHTML="&nbsp;"}if(!this.noteBot.firstChild&&!this.cbBarBot.firstChild){this.noteBot.innerHTML="&nbsp;"}if(this.noteTop.firstChild&&this.cbBarTop.firstChild){this.noteTop.style.paddingBottom="6px"}if(this.noteBot.firstChild&&this.cbBarBot.firstChild){this.noteBot.style.paddingBottom="6px"}}if(this.hideBands&1){i.style.display="none"}if(this.hideBands&2){k.style.display="none"}ae(this.container,this.bandTop);if(this.clip){var f=ce("div");f.className="listview-clip";f.style.width=this.clip.w+"px";f.style.height=this.clip.h+"px";this.clipDiv=f;ae(f,this.mainContainer);ae(f,this.noData);ae(this.container,f)}else{ae(this.container,this.mainContainer);ae(this.container,this.noData)}ae(this.container,this.bandBot)},createNav:function(g){var c=ce("div"),d=ce("a"),b=ce("a"),a=ce("a"),j=ce("a"),i=ce("span"),h=ce("b"),f=ce("b"),e=ce("b");c.className="listview-nav";d.href=b.href=a.href=j.href="javascript:;";ae(d,ct(String.fromCharCode(171)+LANG.lvpage_first));ae(b,ct(String.fromCharCode(8249)+LANG.lvpage_previous));ae(a,ct(LANG.lvpage_next+String.fromCharCode(8250)));ae(j,ct(LANG.lvpage_last+String.fromCharCode(187)));ns(d);ns(b);ns(a);ns(j);d.onclick=this.firstPage.bind(this);b.onclick=this.previousPage.bind(this);a.onclick=this.nextPage.bind(this);j.onclick=this.lastPage.bind(this);ae(h,ct("a"));ae(f,ct("a"));ae(e,ct("a"));ae(i,h);ae(i,ct(LANG.hyphen));ae(i,f);ae(i,ct(LANG.lvpage_of));ae(i,e);ae(c,d);ae(c,b);ae(c,i);ae(c,a);ae(c,j);if(g){if(this.hideNav&1){c.style.display="none"}}else{if(this.hideNav&2){c.style.display="none"}}return c},createCbBar:function(a){var b=ce("div");if(this.createCbControls){this.createCbControls(b,a)}if(b.firstChild){b.className="listview-withselected"+(a?"":"2")}return b},refreshRows:function(){var a=(this.mode==Listview.MODE_DIV?this.mainContainer:this.tbody);ee(a);if(this.nRowsVisible==0){if(!this.filtered){this.bandTop.style.display=this.bandBot.style.display="none";this.mainContainer.style.display="none"}this.noData.style.display="";this.showNoData();return}var n,b,c;if(!(this.hideBands&1)){this.bandTop.style.display=""}if(!(this.hideBands&2)){this.bandBot.style.display=""}if(this.nItemsPerPage>0){n=this.rowOffset;b=Math.min(n+this.nRowsVisible,n+this.nItemsPerPage);if(this.filtered&&this.rowOffset>0){for(var f=0,g=0;f<this.data.length&&g<this.rowOffset;++f){var o=this.data[f];if(o.__hidden||o.__deleted){++n}else{++g}}b+=(n-this.rowOffset)}}else{n=0;b=this.nRowsVisible}var h=b-n;if(this.mode==Listview.MODE_DIV){for(var e=0;e<h;++e){var f=n+e,o=this.data[f];if(!o){break}if(o.__hidden||o.__deleted){++h;continue}ae(this.mainDiv,this.getDiv(f))}}else{if(this.mode==Listview.MODE_TILED){var d=0,l=ce("tr");for(var e=0;e<h;++e){var f=n+e,o=this.data[f];if(!o){break}if(o.__hidden||o.__deleted){++h;continue}ae(l,this.getCell(f));if(++d==this.nItemsPerRow){ae(this.tbody,l);if(e+1<h){l=ce("tr")}d=0}}if(d!=0){for(;d<4;++d){var m=ce("td");m.className="empty-cell";ae(l,m)}ae(this.tbody,l)}}else{for(var e=0;e<h;++e){var f=n+e,o=this.data[f];if(!o){break}if(o.__hidden||o.__deleted){++h;continue}ae(this.tbody,this.getRow(f))}}}this.mainContainer.style.display="";this.noData.style.display="none"},showNoData:function(){var b=this.noData;ee(b);var a=-1;if(this.onNoData){a=(this.onNoData.bind(this,b))()}if(a==-1){ae(this.noData,ct(this.filtered?LANG.lvnodata2:LANG.lvnodata))}},getDiv:function(a){var b=this.data[a];if(b.__div==null||this.minPatchVersion!=b.__minPatch){this.createDiv(b,a)}return b.__div},createDiv:function(b,a){var c=ce("div");b.__div=c;if(this.minPatchVersion){b.__minPatch=this.minPatchVersion}(this.template.compute.bind(this,b,c,a))()},getCell:function(a){var b=this.data[a];if(b.__div==null){this.createCell(b,a)}return b.__td},createCell:function(b,a){var c=ce("td");b.__td=c;(this.template.compute.bind(this,b,c,a))();if(this.template.getItemLink){c.onclick=this.itemClick.bind(this,b)}if(Browser.ie6){c.onmouseover=Listview.itemOver;c.onmouseout=Listview.itemOut}},getRow:function(a){var b=this.data[a];if(b.__tr==null){this.createRow(b)}return b.__tr},setRow:function(a){if(this.data[a.pos]){this.data[a.pos]=a;this.data[a.pos].__tr=a.__tr;this.createRow(this.data[a.pos]);this.refreshRows()}},createRow:function(j){var g=ce("tr");j.__tr=g;if(this.mode==Listview.MODE_CHECKBOX){var c=ce("td");if(!j.__nochk){c.className="listview-cb";c.onclick=Listview.cbCellClick;var b=ce("input");ns(b);b.type="checkbox";b.onclick=Listview.cbClick;if(j.__chk){b.checked=true;if(Browser.ie){b.defaultChecked=true}}j.__cb=b;ae(c,b)}ae(g,c)}for(var d=0,e=this.visibility.length;d<e;++d){var f=this.visibility[d],a=this.columns[f],c=ce("td"),h;if(a.align!=null){c.style.textAlign=a.align}if(a.compute){h=(a.compute.bind(this,j,c,g,f))()}else{if(j[a.value]!=null){h=j[a.value]}else{h=-1}}if(h!=-1&&h!=null){c.insertBefore(ct(h),c.firstChild)}ae(g,c)}if(this.mode==Listview.MODE_CHECKBOX&&j.__chk){g.className="checked"}if(this.template.getItemLink){g.onclick=this.itemClick.bind(this,j)}if(Browser.ie6){g.onmouseover=Listview.itemOver;g.onmouseout=Listview.itemOut}},itemClick:function(d,c){c=$E(c);var a=0,b=c._target;while(b&&a<3){if(b.nodeName=="A"){return}b=b.parentNode}location.href=this.template.getItemLink(d)},submitSearch:function(c){c=$E(c);if(!this.onSearchSubmit||c.keyCode!=13){return}for(var b=0,a=this.data.length;b<a;++b){if(this.data[b].__hidden){continue}(this.onSearchSubmit.bind(this,this.data[b]))()}},validatePage:function(){var c=this.nItemsPerPage,b=this.rowOffset,a=this.nRowsVisible;if(b<0){this.rowOffset=0}else{this.rowOffset=this.getRowOffset(b+c>a?a-1:b)}},getRowOffset:function(b){var a=this.nItemsPerPage;return(a>0&&b>0?Math.floor(b/a)*a:0)},resetRowVisibility:function(){for(var b=0,a=this.data.length;b<a;++b){this.data[b].__hidden=false}this.filtered=false;this.rowOffset=0;this.nRowsVisible=this.data.length},getColText:function(b,a){if(a.getVisibleText){return a.getVisibleText(b)}if(a.getValue){return a.getValue(b)}if(a.value){return b[a.value]}if(a.compute){return a.compute(b)}return""},resetFilters:function(){for(var d=0,a=this.visibility.length;d<a;++d){var c=this.visibility[d];var b=this.columns[c];if(b.__filter){b.__th.firstChild.firstChild.className="";b.__filter=null;--(this.nFilters)}}},updateFilters:function(d){Tooltip.hide();this.resetRowVisibility();var x,q,c;if(this.searchable){this.quickSearchBox.parentNode.style.display="";x=trim(this.quickSearchBox.value);if(x){this.quickSearchGlass.style.display="none";this.quickSearchClear.style.display="";x=x.toLowerCase().replace(/\s+/g," ");q=x.split(" ");c=q.length}else{this.quickSearchGlass.style.display="";this.quickSearchClear.style.display="none"}}else{if(this.quickSearchBox){this.quickSearchBox.parentNode.style.display="none"}}if(!x&&this.nFilters==0&&this.customFilter==null){if(d){this.updateNav();this.refreshRows()}return}var A={1:function(i,j){return i>j},2:function(i,j){return i==j},3:function(i,j){return i<j},4:function(i,j){return i>=j},5:function(i,j){return i<=j},6:function(i,k,j){return k<=i&&i<=j}};var p={1:function(j,i,k){return i>k},2:function(j,i,k){return j<=k&&k<=i},3:function(j,i,k){return j<k},4:function(j,i,k){return i>=k},5:function(j,i,k){return j<=k},6:function(j,i,C,k){return C<=i&&j<=k}};var o=0;for(var v=0,w=this.data.length;v<w;++v){var g=this.data[v],m=0;nSearchMatches=0,matches=[];g.__hidden=true;if(this.customFilter&&!this.customFilter(g,v)){continue}for(var u=0,h=this.visibility.length;u<h;++u){var n=this.visibility[u];var e=this.columns[n];if(e.__filter){var a=e.__filter,b=false;if(e.type==null||e.type=="num"||a.type>0){var r=null;if(e.getValue){r=e.getValue(g)}else{if(e.value){r=parseFloat(g[e.value])}}if(!r){r=0}b=(A[a.type])(r,a.value,a.value2)}else{if(e.type=="range"){var B=e.getMinValue(g),z=e.getMaxValue(g);b=(p[a.type])(B,z,a.value,a.value2)}else{var l=this.getColText(g,e);if(l){l=l.toString().toLowerCase();if(a.invert){b=l.match(a.regex)!=null}else{var y=0;for(var t=0,f=a.words.length;t<f;++t){if(l.indexOf(a.words[t])!=-1){++y}else{break}}b=(y==a.words.length)}}}}if(a.invert){b=!b}if(b){++m}else{break}}if(x){var l=this.getColText(g,e);if(l){l=l.toString().toLowerCase();for(var t=0,f=q.length;t<f;++t){if(!matches[t]){if(l.indexOf(q[t])!=-1){matches[t]=1;++nSearchMatches}}}}}}if(g.__alwaysvisible||((this.nFilters==0||m==this.nFilters)&&(!x||nSearchMatches==c))){g.__hidden=false;++o}}this.filtered=(o<this.data.length);this.nRowsVisible=o;if(d){this.updateNav();this.refreshRows()}},changePage:function(){this.validatePage();this.refreshRows();this.updateNav();this.updatePound();var a=g_getScroll(),b=ac(this.container);if(a.y>b[1]){scrollTo(a.x,b[1])}},firstPage:function(){this.rowOffset=0;this.changePage();return false},previousPage:function(){this.rowOffset-=this.nItemsPerPage;this.changePage();return false},nextPage:function(){this.rowOffset+=this.nItemsPerPage;this.changePage();return false},lastPage:function(){this.rowOffset=99999999;this.changePage();return false},addSort:function(a,c){var b=in_array(a,Math.abs(c),function(d){return Math.abs(d)});if(b!=-1){c=a[b];a.splice(b,1)}a.splice(0,0,c)},sortBy:function(a){if(a<=0||a>this.columns.length){return}if(Math.abs(this.sort[0])==a){this.sort[0]=-this.sort[0]}else{var b=-1;if(this.columns[a-1].type=="text"){b=1}this.addSort(this.sort,b*a)}this.applySort();this.refreshRows();this.updateSortArrow();this.updatePound()},applySort:function(){if(this.sort.length==0){return}Listview.sort=this.sort;Listview.columns=this.columns;if(this.indexCreated){this.data.sort(Listview.sortIndexedRows)}else{this.data.sort(Listview.sortRows)}this.updateSortIndex()},setSort:function(b,c,a){if(this.sort.toString()!=b.toString()){this.sort=b;this.applySort();if(c){this.refreshRows()}if(a){this.updatePound()}}},readPound:function(){if(!this.poundable||!location.hash.length){return false}var b=location.hash.substr(1);if(this.tabs){var g=b.indexOf(":");if(g==-1){return false}b=b.substr(g+1)}var a=parseInt(b);if(!isNaN(a)){this.rowOffset=a;this.validatePage();if(this.poundable!=2){var d=[];var f=b.match(/(\+|\-)[0-9]+/g);if(f!=null){for(var c=f.length-1;c>=0;--c){var e=parseInt(f[c])|0;var b=Math.abs(e);if(b<=0||b>this.columns.length){break}this.addSort(d,e)}this.setSort(d,false,false)}}if(this.tabs){this.tabs.setTabPound(this.tabIndex,this.getTabPound())}}},updateSortArrow:function(){if(!this.sort.length||!this.thead||this.mode==Listview.MODE_TILED){return}var a=in_array(this.visibility,Math.abs(this.sort[0])-1);if(a==-1){return}if(this.mode==Listview.MODE_CHECKBOX){a+=1}var b=this.thead.firstChild.childNodes[a].firstChild.firstChild.firstChild;if(this.lsa&&this.lsa!=b){this.lsa.className=""}b.className=(this.sort[0]<0?"sortdesc":"sortasc");this.lsa=b},updateSortIndex:function(){var b=this.data;for(var c=0,a=b.length;c<a;++c){b[c].__si=c}this.indexCreated=true},updateTabName:function(){if(this.tabs&&this.tabIndex!=null){this.tabs.setTabName(this.tabIndex,this.getTabName())}},updatePound:function(){if(!this.poundable){return}var a=this.getTabPound();if(this.tabs){this.tabs.setTabPound(this.tabIndex,a);location.replace("#"+this.id+":"+a)}else{location.replace("#"+a)}},updateNav:function(){var e=[this.navTop,this.navBot],j=this.nItemsPerPage,h=this.rowOffset,d=this.nRowsVisible,g=0,b=0,f=0,k=0;if(d>0){if(!(this.hideNav&1)){e[0].style.display=""}if(!(this.hideNav&2)){e[1].style.display=""}}else{e[0].style.display=e[1].style.display="none"}if(j){if(h>0){b=1;if(h>=j+j){g=1}}if(h+j<d){f=1;if(h+j+j<d){k=1}}}for(var c=0;c<2;++c){var a=e[c].childNodes;a[0].style.display=(g?"":"none");a[1].style.display=(b?"":"none");a[3].style.display=(f?"":"none");a[4].style.display=(k?"":"none");a=a[2].childNodes;a[0].firstChild.nodeValue=h+1;a[2].firstChild.nodeValue=j?Math.min(h+j,d):d;a[4].firstChild.nodeValue=d}},getTabName:function(){var b=this.name,d=this.data.length;for(var c=0,a=this.data.length;c<a;++c){if(this.data[c].__hidden||this.data[c].__deleted){--d}}if(d>0&&!this.hideCount){b+=sprintf(LANG.qty,d)}return b},getTabPound:function(){var a="";a+=this.rowOffset;if(this.poundable!=2&&this.sort.length){a+=("+"+this.sort.join("+")).replace(/\+\-/g,"-")}return a},getCheckedRows:function(){var d=[];for(var c=0,a=this.data.length;c<a;++c){var b=this.data[c];if((b.__cb&&b.__cb.checked)||(!b.__cb&&b.__chk)){d.push(b)}}return d},resetCheckedRows:function(){for(var c=0,a=this.data.length;c<a;++c){var b=this.data[c];if(b.__cb){b.__cb.checked=false}else{if(b.__chk){b.__chk=null}}if(b.__tr){b.__tr.className=b.__tr.className.replace("checked","")}}},deleteRows:function(c){if(!c||!c.length){return}for(var b=0,a=c.length;b<a;++b){var d=c[b];if(!d.__hidden&&!d.__hidden){this.nRowsVisible-=1}d.__deleted=true}this.updateTabName();if(this.rowOffset>=this.nRowsVisible){this.previousPage()}else{this.refreshRows();this.updateNav()}},setData:function(a){this.data=a;this.indexCreated=false;this.resetCheckedRows();this.resetRowVisibility();if(this.tabs){this.pounded=(this.tabs.poundedTab==this.tabIndex);if(this.pounded){this.readPound()}}else{this.readPound()}this.applySort();this.updateSortArrow();if(this.customFilter!=null){this.updateFilters()}this.updateNav();this.refreshRows()},getClipDiv:function(){return this.clipDiv},getNoteTopDiv:function(){return this.noteTop},focusSearch:function(){this.quickSearchBox.focus()},clearSearch:function(){this.quickSearchBox.value=""},getList:function(){if(!this.debug){return}var b="";for(var a=0;a<this.data.length;a++){if(!this.data[a].__hidden){b+=this.data[a].id+", "}}prompt("",b)}};Listview.sortRows=function(e,d){var j=Listview.sort,k=Listview.columns;for(var h=0,c=j.length;h<c;++h){var g,f=k[Math.abs(j[h])-1];if(f.sortFunc){g=f.sortFunc(e,d,j[h])}else{g=strcmp(e[f.value],d[f.value])}if(g!=0){return g*j[h]}}return 0},Listview.sortIndexedRows=function(d,c){var g=Listview.sort,h=Listview.columns,e=h[Math.abs(g[0])-1],f;if(e.sortFunc){f=e.sortFunc(d,c,g[0])}else{f=strcmp(d[e.value],c[e.value])}if(f!=0){return f*g[0]}return(d.__si-c.__si)},Listview.cbSelect=function(c){for(var e=0,b=this.data.length;e<b;++e){var d=this.data[e];var g=c;if(d.__hidden){continue}if(!d.__nochk&&d.__cb){var a=d.__cb,f=a.parentNode.parentNode;if(g==null){g=!a.checked}if(a.checked!=g){a.checked=g;f.className=(a.checked?f.className+" checked":f.className.replace("checked",""));if(Browser.ie){a.defaultChecked=g;if(Browser.ie6){(Listview.itemOut.bind(f))()}}}}else{if(g==null){g=true}}d.__chk=g}};Listview.cbClick=function(a){setTimeout(Listview.cbUpdate.bind(0,0,this,this.parentNode.parentNode),1);sp(a)};Listview.cbCellClick=function(a){setTimeout(Listview.cbUpdate.bind(0,1,this.firstChild,this.parentNode),1);sp(a)};Listview.cbIeFix=function(){var d=gE(this.tbody,"tr");for(var c=0,a=d.length;c<a;++c){var b=d[c].firstChild.firstChild;if(b){b.checked=b.defaultChecked=false}}};Listview.cbUpdate=function(c,a,b){if(c){a.checked=!a.checked}b.className=(a.checked?b.className+" checked":b.className.replace("checked",""));if(Browser.ie){a.defaultChecked=a.checked;if(Browser.ie6){(Listview.itemOver.bind(b))()}}};Listview.itemOver=function(){this.style.backgroundColor=(this.className=="checked"?"#2C2C2C":"#202020")};Listview.itemOut=function(){this.style.backgroundColor=(this.className=="checked"?"#242424":"transparent")};Listview.headerClick=function(a,b,c){c=$E(c);if(c._button==3||c.shiftKey||c.ctrlKey){Tooltip.hide();setTimeout(Listview.headerFilter.bind(this,a,null),1)}else{this.sortBy(b+1)}return false};Listview.headerFilter=function(c,f){var j="";if(c.__filter){if(c.__filter.invert){j+="!"}j+=c.__filter.text}if(f==null){var f=prompt(sprintf(LANG.prompt_colfilter1+(c.type=="text"?LANG.prompt_colfilter2:LANG.prompt_colfilter3),c.name),j)}if(f!=null){var e={text:"",type:-1};f=trim(f.replace(/\s+/g," "));if(f){if(f.charAt(0)=="!"||f.charAt(0)=="-"){e.invert=1;f=f.substr(1)}if(c.type=="text"){e.type=0;e.text=f;if(e.invert){e.regex=g_createOrRegex(f)}else{e.words=f.toLowerCase().split(" ")}}var i,b;if(f.match(/(>|=|<|>=|<=)\s*([0-9\.]+)/)){i=parseFloat(RegExp.$2);if(!isNaN(i)){switch(RegExp.$1){case">":e.type=1;break;case"=":e.type=2;break;case"<":e.type=3;break;case">=":e.type=4;break;case"<=":e.type=5;break}e.value=i;e.text=RegExp.$1+" "+i}}else{if(f.match(/([0-9\.]+)\s*\-\s*([0-9\.]+)/)){i=parseFloat(RegExp.$1);b=parseFloat(RegExp.$2);if(!isNaN(i)&&!isNaN(b)){if(i>b){var g=i;i=b;b=g}if(i==b){e.type=2;e.value=i;e.text="= "+i}else{e.type=6;e.value=i;e.value2=b;e.text=i+" - "+b}}}else{var d=f.toLowerCase().split(" ");if(!c.allText&&d.length==1&&!isNaN(i=parseFloat(d[0]))){e.type=2;e.value=i;e.text="= "+i}else{if(c.type=="text"){e.type=0;e.text=f;if(e.invert){e.regex=g_createOrRegex(f)}else{e.words=d}}}}}if(e.type==-1){alert(LANG.message_invalidfilter);return}}if(!c.__filter||e.text!=c.__filter.text||e.invert!=c.__filter.invert){var h=c.__th.firstChild.firstChild;if(f&&e.text){if(!c.__filter){h.className="q5";++(this.nFilters)}c.__filter=e}else{if(c.__filter){h.className="";--(this.nFilters)}c.__filter=null}this.updateFilters(1)}}};Listview.headerOver=function(b,c,f){var d="";d+='<b class="q1">'+(c.tooltip?c.tooltip:c.name)+"</b>";if(c.__filter){d+="<br />"+sprintf((c.__filter.invert?LANG.tooltip_colfilter2:LANG.tooltip_colfilter1),c.__filter.text)}d+='<br /><span class="q2">'+LANG.tooltip_lvheader1+"</span>";if(this.filtrable&&(c.filtrable==null||c.filtrable)){d+='<br /><span class="q2">'+(Browser.opera?LANG.tooltip_lvheader3:LANG.tooltip_lvheader2)+"</span>"}Tooltip.show(b,d,0,0,"q")};Listview.extraCols={id:{id:"id",name:"ID",width:"5%",compute:function(a,b){if(a.id){ae(b,ct(a.id))}}},cost:{id:"cost",name:LANG.cost,getValue:function(a){if(a.cost){return(a.cost[3]&&a.cost[3][0]?a.cost[3][0][1]:0)||a.cost[2]||a.cost[1]||a.cost[0]}},compute:function(a,b){if(a.cost){Listview.funcBox.appendMoney(b,a.cost[0],null,a.cost[1],a.cost[2],a.cost[3])}},sortFunc:function(d,c,e){if(d.cost==null){return -1}else{if(c.cost==null){return 1}}var g=0,f=0;if(d.cost[3]!=null){array_walk(d.cost[3],function(a,b,j,h){g+=Math.pow(10,h)+a[1]})}if(c.cost[3]!=null){array_walk(c.cost[3],function(a,b,j,h){f+=Math.pow(10,h)+a[1]})}return strcmp(g,f)||strcmp(d.cost[2],c.cost[2])||strcmp(d.cost[1],c.cost[1])||strcmp(d.cost[0],c.cost[0])}},count:{id:"count",name:LANG.count,width:"11%",value:"count",compute:function(b,c){if(!(this._totalCount>0||b.outof>0)){return}if(b.outof){var a=ce("div");a.className="small q0";ae(a,ct(sprintf(LANG.lvdrop_outof,b.outof)));ae(c,a)}return b.count},getVisibleText:function(a){var b=a.count;if(a.outof){b+=" "+a.outof}return b},sortFunc:function(d,c,e){if(d.count==null){return -1}else{if(c.count==null){return 1}}return strcmp(d.count,c.count)}},percent:{id:"percent",name:"%",width:"10%",value:"percent",compute:function(a,b){if(a.count<=0){return"??"}if(a.percent>=1.95){return a.percent.toFixed(0)}else{return parseFloat(a.percent.toFixed(1))}},getVisibleText:function(a){if(a.count<=0){return"??"}if(a.percent>=1.95){return a.percent.toFixed(0)}else{return parseFloat(a.percent.toFixed(1))}},sortFunc:function(e,c,f){if(e.count==null){return -1}else{if(c.count==null){return 1}}if(e.percent>=1.95){var d=e.percent.toFixed(0)}else{d=parseFloat(e.percent.toFixed(1))}if(c.percent>=1.95){var g=c.percent.toFixed(0)}else{g=parseFloat(c.percent.toFixed(1))}return strcmp(d,g)}},stock:{id:"stock",name:LANG.stock,width:"10%",value:"stock",compute:function(a,b){if(a.stock>0){return a.stock}else{b.style.fontFamily="Verdana, sans-serif";return String.fromCharCode(8734)}},getVisibleText:function(a){if(a.stock>0){return a.stock}else{return String.fromCharCode(8734)+" infinity"}}}};Listview.funcBox={createSimpleCol:function(c,d,a,b){return{id:c,name:(LANG[d]!==undefined?LANG[d]:d),width:a,value:b}},initLootTable:function(b){var a;if(this._totalCount!=null){a=this._totalCount}else{a=b.outof}if(a==0){if(b.count!=-1){b.percent=b.count}else{b.percent=0}}else{b.percent=b.count/a*100}},assocArrCmp:function(e,d,c){if(e==null){return -1}else{if(d==null){return 1}}var h=Math.max(e.length,d.length);for(var g=0;g<h;++g){if(e[g]==null){return -1}else{if(d[g]==null){return 1}}var f=strcmp(c[e[g]],c[d[g]]);if(f!=0){return f}}return 0},location:function(f,g){if(f.location==null){return -1}for(var d=0,b=f.location.length;d<b;++d){if(d>0){ae(g,ct(LANG.comma))}var e=f.location[d];if(e==-1){ae(g,ct(LANG.ellipsis))}else{var c=ce("a");c.className="q1";c.href="/?zone="+e;ae(c,ct(g_zones[e]));ae(g,c)}}},arrayText:function(b,e){if(b==null){return}else{if(!is_array(b)){return e[b]}}var d="";for(var c=0,a=b.length;c<a;++c){if(c>0){d+=" "}if(!e[b[c]]){continue}d+=e[b[c]]}return d},createCenteredIcons:function(k,f,t,o){if(k!=null){var n=ce("div"),b=ce("div");if(t){var m=ce("div");m.style.position="relative";m.style.width="1px";var p=ce("div");p.className="q0";p.style.position="absolute";p.style.right="2px";p.style.lineHeight="26px";p.style.fontSize="11px";p.style.whiteSpace="nowrap";ae(p,ct(t));ae(m,p);ae(n,m)}var j=g_items;if(o==1){j=g_spells}for(var g=0,l=k.length;g<l;++g){var q;if(k[g]==null){q=ce("div");q.style.width=q.style.height="26px"}else{var e,h;if(typeof k[g]=="object"){e=k[g][0];h=k[g][1]}else{e=k[g]}if(e){q=j.createIcon(e,0,h)}else{q=Icon.create("inventoryslot_empty",0,null,"javascript:;")}}if(k.length==1&&o==2){if(e){ee(n);var u=g_items[e],r=ce("a"),c=ce("span");c.style.paddingTop="4px";r.href="/?item="+e;r.className="q"+u.quality+" icontiny";r.style.backgroundImage="url(http://static.wowhead.com/images/icons/tiny/"+u.icon.toLowerCase()+".gif)";r.style.whiteSpace="nowrap";st(r,u["name_"+g_locale.name]);ae(c,r);if(h>1){ae(c,ct(" ("+h+")"))}if(t){var m=ce("span");var p=ce("span");m.className=p.className="q0";m.style.fontSize=p.style.fontSize="11px";m.style.fontSize=p.style.fontSize="nowrap";p.style.visibility="hidden";ae(m,ct(t));ae(p,ct(t));ae(n,m);ae(n,c);ae(n,p)}else{ae(n,c)}}}else{q.style.cssFloat=q.style.styleFloat="left";ae(n,q);n.style.margin="0 auto";n.style.textAlign="left";n.style.width=(26*k.length)+"px"}}b.className="clear";ae(f,n);ae(f,b);return true}},createSocketedIcons:function(b,e,c,g,n){var m=0,k=ce("div"),a=ce("div");for(var f=0,h=b.length;f<h;++f){var l,j=c[f];if(!c||!j){l=Icon.create(null,0,null,"javascript:;")}else{if(g_items[j]){l=g_items.createIcon(j,0)}else{l=Icon.create(g_gems[j].icon,0,null,"/?item="+j)}}l.className+=" iconsmall-socket-"+g_file_gems[b[f]]+(!c||!j?"-empty":"");l.style.cssFloat=l.style.styleFloat="left";if(g&&g[f]){l.insertBefore(ce("var"),l.childNodes[1]);++m}ae(k,l)}k.style.margin="0 auto";k.style.textAlign="left";k.style.width=(26*b.length)+"px";a.className="clear";ae(e,k);ae(e,a);if(n&&m==b.length){k=ce("div");k.style.paddingTop="4px";ae(k,ct(n));ae(e,k)}},getItemType:function(c,a,b){if(b!=null&&g_item_subsubclasses[c]!=null&&g_item_subsubclasses[c][a]!=null){return{url:"/?items="+c+"."+a+"."+b,text:g_item_subsubclasses[c][a][b]}}if(g_item_subclasses[c]!=null){return{url:"/?items="+c+"."+a,text:g_item_subclasses[c][a]}}else{return{url:"/?items="+c,text:g_item_classes[c]}}},getQuestCategory:function(a){return g_quest_sorts[a]},getQuestReputation:function(d,b){if(b.reprewards){for(var c=0,a=b.reprewards.length;c<a;++c){if(b.reprewards[c][0]==d){return b.reprewards[c][1]}}}},getFactionCategory:function(b,a){if(b){return g_faction_categories[b]}else{return g_faction_categories[a]}},getEventNextDates:function(e,a,h){if(typeof e!="string"||typeof a!="string"){return[null,null]}e=new Date(e.replace(/-/g,"/"));a=new Date(a.replace(/-/g,"/"));if(isNaN(e.getTime())||isNaN(a.getTime())){return[null,null]}var b=0;if(h==-1){var j=new Date(g_serverTime.getFullYear(),g_serverTime.getMonth(),1,e.getHours(),e.getMinutes(),e.getSeconds());for(var c=0;c<2;++c){j.setDate(1);j.setMonth(j.getMonth()+c);var g=j.getDay();var f=1;if(j.getYear()==2009){f=0}if(g>f){j.setDate(j.getDate()+(7-g))}var d=new Date(j);d.setDate(d.getDate()+(7-f));if(g_serverTime.getTime()<d.getTime()){break}}b=j.getTime()-e.getTime()}else{if(h>0){h*=1000;b=Math.ceil((g_serverTime.getTime()-a.getTime())/h)*h}}e.setTime(e.getTime()+b);a.setTime(a.getTime()+b);return[e,a]},createTextRange:function(b,a){b|=0;a|=0;if(b>1||a>1){if(b!=a&&a>0){return b+"-"+a}else{return b+""}}return null},coReport:function(d,b,f){if(!g_user.id||!g_report_reasons[f]){return}var a="";if(f==4||f==7){a=prompt(LANG.prompt_details,"")}else{if(d==2){if(!confirm((f==5?LANG.confirm_report3:LANG.confirm_report4))){return}}else{if(!confirm(sprintf((d==0?LANG.confirm_report:LANG.confirm_report2),g_report_reasons[f]))){return}}}if(a!=null){var e="/?report&type="+d+"&typeid="+b+"&reason="+f;if(a){e+="&reasonmore="+urlencode(a)}new Ajax(e);var c=ce("span");ae(c,ct(LANG.lvcomment_reported));this.parentNode.replaceChild(c,this)}},coReportClick:function(b,a,c){this.menu=[[2,g_report_reasons[2],Listview.funcBox.coReport.bind(this,a,b.id,2)],[1,g_report_reasons[1],Listview.funcBox.coReport.bind(this,a,b.id,1)],[3,g_report_reasons[3],Listview.funcBox.coReport.bind(this,a,b.id,3)],[4,g_report_reasons[4],Listview.funcBox.coReport.bind(this,a,b.id,4)]];if(a==1&&b.op&&typeof g_pageInfo!="undefined"&&!g_pageInfo.sticky){this.menu.splice(3,0,[0,g_report_reasons[0],Listview.funcBox.coReport.bind(this,a,b.id,0)])}if(a==1&&g_users[b.user].avatar==2){this.menu.push([5,g_report_reasons[5],Listview.funcBox.coReport.bind(this,2,g_users[b.user].avatarmore,5)])}(Menu.showAtCursor.bind(this,c))()},coGetColor:function(c,a){if(c.user&&g_customColors[c.user]){return" comment-"+g_customColors[c.user]}switch(a){case -1:var b=c.divPost.childNodes[1].className.match(/comment-([a-z]+)/);if(b!=null){return" comment-"+b[1]}break;case 3:case 4:if(c.roles&56){return" comment-green"}else{if(c.roles&64){return" comment-gold"}}break}if(c.roles&2){return" comment-blue"}else{if(c.rating>=10){return" comment-green"}else{if(c.rating<0){return" comment-bt"}}}return""},coToggleVis:function(b){this.firstChild.nodeValue=(g_toggleDisplay(b.divBody)?LANG.lvcomment_hide:LANG.lvcomment_show);var a=b.divHeader.firstChild.lastChild;if(b.ratable){a.style.display=""}else{if(b.deleted||b.purged){a.style.fontWeight="normal";a.className="q10";a.innerHTML=(b.deleted?LANG.lvcomment_deleted:LANG.lvcomment_purged);a.style.display=""}}g_toggleDisplay(b.divLinks);if(b.lastEdit!=null){g_toggleDisplay(b.divLastEdit)}},coDisplayRating:function(b){if(typeof(Listview._ratingMode)=="undefined"){Listview._ratingMode=0}var c=Listview._ratingMode;if(c==0){if(b.rating<0){return b.rating}else{return"+"+b.rating}}if(c==1){var e=0,d=0;for(var a=0;a<b.raters.length;a++){if(b.raters[a][1]<0){e+=b.raters[a][1]}else{d+=b.raters[a][1]}}return"+"+d+" / "+e}},coToggleRating:function(){if(typeof(Listview._ratingMode)=="undefined"){Listview._ratingMode=0}if(++Listview._ratingMode>1){Listview._ratingMode=0}for(var c=0;c<this.data.length;++c){if(this.data[c].__div){var b=this.data[c].__div.firstChild.firstChild;var a=b.firstChild.lastChild.lastChild;if(!a){a=b.firstChild.nextSibling.nextSibling.lastChild.lastChild}a.nodeValue=Listview.funcBox.coDisplayRating(this.data[c])}}},coRate:function(e,a){if(a==0){var c=5;if(g_user.roles&2){c=25}else{if(g_user.roles&16){c=15}}var d=prompt(sprintf(LANG.prompt_customrating,c,c),0);if(d==null){return}else{d|=0;if(d!=0&&Math.abs(d)<=c){a=d}}if(a==0){return}}else{if(g_user.roles&26){a*=5}}new Ajax("/?comment=rate&id="+e.id+"&rating="+a);e.rating+=a;e.raters.push([g_user.id,a]);var b=e.divHeader.firstChild;b=b.childNodes[b.childNodes.length-3];b.lastChild.firstChild.nodeValue=Listview.funcBox.coDisplayRating(e);Tooltip.hide();de(b.nextSibling);de(b.nextSibling)},coDelete:function(a){if(a.purged){alert(LANG.message_cantdeletecomment)}else{if(confirm(LANG.confirm_deletecomment)){new Ajax("/?comment=delete&id="+a.id);this.deleteRows([a])}}},coDetach:function(a){if(a.replyTo==0){alert(LANG.message_cantdetachcomment)}else{if(confirm(LANG.confirm_detachcomment)){new Ajax("/?comment=detach&id="+a.id);a.replyTo=0;alert(LANG.message_commentdetached)}}},coEdit:function(g,e){g.divBody.style.display="none";g.divLinks.firstChild.style.display="none";var f=ce("div");f.className="comment-edit";g.divEdit=f;if(e==-1){if(g_users[g.user]!=null){g.roles=g_users[g.user].roles}}var a=Listview.funcBox.coEditAppend(f,g,e);var b=ce("div");b.className="comment-edit-buttons";var d=ce("input");d.type="button";d.value=LANG.compose_save;d.onclick=Listview.funcBox.coEditButton.bind(d,g,true,e);ae(b,d);ae(b,ct(" "));d=ce("input");d.type="button";d.value=LANG.compose_cancel;d.onclick=Listview.funcBox.coEditButton.bind(d,g,false,e);ae(b,d);ae(f,b);var c=f;if(Browser.ie6){c=ce("div");c.style.width="99%";ae(c,f)}if(e==-1){g.divPost.insertBefore(c,g.divBody.nextSibling)}else{g.__div.insertBefore(c,g.divBody.nextSibling)}a.focus()},coEditAppend:function(m,b,l){var f=Listview.funcBox.coGetCharLimit(l);if(l==1||l==3||l==4){b.user=g_user.name;b.roles=g_user.roles;b.rating=1}else{if(l==2){b.roles=g_user.roles;b.rating=1}}if(l==-1||l==0){var j=ce("div");j.className="comment-edit-modes";ae(j,ct(LANG.compose_mode));var o=ce("a");o.className="selected";o.onclick=Listview.funcBox.coModeLink.bind(o,1,l,b);o.href="javascript:;";ae(o,ct(LANG.compose_edit));ae(j,o);ae(j,ct("|"));var v=ce("a");v.onclick=Listview.funcBox.coModeLink.bind(v,2,l,b);v.href="javascript:;";ae(v,ct(LANG.compose_preview));ae(j,v);ae(m,j)}var a=ce("div");a.style.display="none";a.className="comment-body"+Listview.funcBox.coGetColor(b,l);ae(m,a);var h=ce("div");h.className="comment-edit-body";var e=ce("div");e.className="toolbar";var g=ce("textarea");g.className="comment-editbox";g.rows=10;g.value=b.body;switch(l){case 1:g.name="commentbody";g.onfocus=g_revealCaptcha;break;case 2:g.name="desc";g.originalValue=b.body;break;case 3:g.name="body";g.onfocus=g_revealCaptcha;break;case 4:g.name="sig";g.originalValue=b.body;g.rows=(Browser.gecko?2:3);g.style.height="auto";break}if(l!=-1&&l!=0){var d=ce("h3"),w=ce("a"),u=ce("div"),t=ce("div");var c=Listview.funcBox.coLivePreview.bind(g,b,l,u);if(b.body){w.className="disclosure-off";u.style.display="none"}else{w.className="disclosure-on"}ae(w,ct(LANG.compose_livepreview));ae(d,w);w.href="javascript:;";w.onclick=function(){c(1);w.className="disclosure-"+(g_toggleDisplay(u)?"on":"off")};ns(w);d.className="first";t.className="pad";ae(a,d);ae(a,u);ae(a,t);g_onAfterTyping(g,c,50);aE(g,"focus",function(){c();a.style.display="";if(l!=4){g.style.height="22em"}})}else{if(l!=4){aE(g,"focus",function(){g.style.height="22em"})}}var r=[{id:"b",title:LANG.markup_b,pre:"[b]",post:"[/b]"},{id:"i",title:LANG.markup_i,pre:"[i]",post:"[/i]"},{id:"u",title:LANG.markup_u,pre:"[u]",post:"[/u]"},{id:"s",title:LANG.markup_s,pre:"[s]",post:"[/s]"},{id:"small",title:LANG.markup_small,pre:"[small]",post:"[/small]"},{id:"url",title:LANG.markup_url,onclick:function(){var i=prompt(LANG.prompt_linkurl,"http://");if(i){g_insertTag(g,"[url="+i+"]","[/url]")}}},{id:"quote",title:LANG.markup_quote,pre:"[quote]",post:"[/quote]"},{id:"code",title:LANG.markup_code,pre:"[code]",post:"[/code]"},{id:"ul",title:LANG.markup_ul,pre:"[ul]\n[li]",post:"[/li]\n[/ul]",rep:function(i){return i.replace(/\n/g,"[/li]\n[li]")}},{id:"ol",title:LANG.markup_ol,pre:"[ol]\n[li]",post:"[/li]\n[/ol]",rep:function(i){return i.replace(/\n/g,"[/li]\n[li]")}},{id:"li",title:LANG.markup_li,pre:"[li]",post:"[/li]"}];for(var p=0,q=r.length;p<q;++p){var k=r[p];if(l==4&&k.id=="quote"){break}var n=ce("button");var x=ce("img");n.setAttribute("type","button");n.title=k.title;if(k.onclick!=null){n.onclick=k.onclick}else{n.onclick=g_insertTag.bind(0,g,k.pre,k.post,k.rep)}x.src="http://static.wowhead.com/images/pixel.gif";x.className="toolbar-"+k.id;ae(n,x);ae(e,n)}ae(h,e);ae(h,g);ae(h,ce("br"));if(l==4){ae(h,ct(sprintf(LANG.compose_limit2,f,3)))}else{ae(h,ct(sprintf(LANG.compose_limit,f)))}ae(m,h);return g},coLivePreview:function(f,e,a,b){if(b!=1&&a.style.display=="none"){return}var c=this,i=Listview.funcBox.coGetCharLimit(e),g=(c.value.length>i?c.value.substring(0,i):c.value);if(e==4){var h;if((h=g.indexOf("\n"))!=-1&&(h=g.indexOf("\n",h+1))!=-1&&(h=g.indexOf("\n",h+1))!=-1){g=g.substring(0,h)}}var d=Markup.toHtml(g,{mode:Markup.MODE_COMMENT,roles:f.roles});if(d){a.innerHTML=d}else{a.innerHTML='<span class="q6">...</span>'}},coEditButton:function(f,d,e){if(d){var a=gE(f.divEdit,"textarea")[0];if(!Listview.funcBox.coValidate(a,e)){return}if(a.value!=f.body){var c=0;if(f.lastEdit!=null){c=f.lastEdit[1]}++c;f.lastEdit=[g_serverTime,c,g_user.name];Listview.funcBox.coUpdateLastEdit(f);var b=Listview.funcBox.coGetCharLimit(e);f.divBody.innerHTML=Markup.toHtml((a.value.length>b?a.value.substring(0,b):a.value),{mode:Markup.MODE_COMMENT,roles:f.roles});f.body=a.value;if(e==-1){new Ajax("/?forums=editpost&id="+f.id,{method:"POST",params:"body="+urlencode(f.body)})}else{new Ajax("/?comment=edit&id="+f.id,{method:"POST",params:"body="+urlencode(f.body)})}}}f.divBody.style.display="";f.divLinks.firstChild.style.display="";de(f.divEdit);f.divEdit=null},coGetCharLimit:function(a){if(a==2){return 7500}if(a==4){return 250}if(g_user.roles&254){return 16000000}var b=1;if(g_user.premium){b=3}switch(a){case 0:case 1:return 7500*b;case -1:case 3:return 15000*b}},coModeLink:function(e,b,f){var j=Listview.funcBox.coGetCharLimit(b);var c=Markup.MODE_COMMENT;array_walk(gE(this.parentNode,"a"),function(k){k.className=""});this.className="selected";var d=gE(this.parentNode.parentNode,"textarea")[0],i=d.parentNode,a=i.previousSibling;if(b==4){c=Markup.MODE_SIGNATURE}switch(e){case 1:i.style.display="";a.style.display="none";i.firstChild.focus();break;case 2:i.style.display="none";var g=(d.value.length>j?d.value.substring(0,j):d.value);if(b==4){var h;if((h=g.indexOf("\n"))!=-1&&(h=g.indexOf("\n",h+1))!=-1&&(h=g.indexOf("\n",h+1))!=-1){g=g.substring(0,h)}}a.innerHTML=Markup.toHtml(g,{mode:c,roles:f.roles});a.style.display="";break}},coReply:function(b){document.forms.addcomment.elements.replyto.value=b.replyTo;var a=ge("gjkdlfgkjh436");gE(a,"span")[0].innerHTML=b.user;a.style.display="";co_addYourComment()},coValidate:function(a,c){c|=0;if(c==1||c==-1){if(trim(a.value).length<1){alert(LANG.message_forumposttooshort);return false}}else{if(trim(a.value).length<10){alert(LANG.message_commenttooshort);return false}}var b=Listview.funcBox.coGetCharLimit(c);if(a.value.length>b){if(!confirm(sprintf(c==1?LANG.confirm_forumposttoolong:LANG.confirm_commenttoolong,b,a.value.substring(b-30,b)))){return false}}return true},coCustomRatingOver:function(a){Tooltip.showAtCursor(a,LANG.tooltip_customrating,0,0,"q")},coPlusRatingOver:function(a){Tooltip.showAtCursor(a,LANG.tooltip_uprate,0,0,"q2")},coMinusRatingOver:function(a){Tooltip.showAtCursor(a,LANG.tooltip_downrate,0,0,"q10")},coSortDate:function(a){a.nextSibling.nextSibling.className="";a.className="selected";this.mainDiv.className+=" listview-aci";this.setSort([1],true,false)},coSortHighestRatedFirst:function(a){a.previousSibling.previousSibling.className="";a.className="selected";this.mainDiv.className=this.mainDiv.className.replace("listview-aci","");this.setSort([-3,2],true,false)},coFilterByPatchVersion:function(a){this.minPatchVersion=a.value;this.refreshRows()},coUpdateLastEdit:function(f){var b=f.divLastEdit;if(!b){return}if(f.lastEdit!=null){var e=f.lastEdit;b.childNodes[1].firstChild.nodeValue=e[2];b.childNodes[1].href="/?user="+e[2];var c=new Date(e[0]);var d=(g_serverTime-c)/1000;if(b.childNodes[3].firstChild){de(b.childNodes[3].firstChild)}Listview.funcBox.coFormatDate(b.childNodes[3],d,c);var a="";if(f.rating!=null){a+=sprintf(LANG.lvcomment_patch,g_getPatchVersion(c))}if(e[1]>1){a+=LANG.dash+sprintf(LANG.lvcomment_nedits,e[1])}b.childNodes[4].nodeValue=a;b.style.display=""}else{b.style.display="none"}},coFormatDate:function(f,e,b,g,h){var d;if(e<2592000){var a=sprintf(LANG.date_ago,g_formatTimeElapsed(e));var c=new Date();c.setTime(b.getTime()+(g_localTime-g_serverTime));f.style.cursor="help";f.title=c.toLocaleString()}else{a=LANG.date_on+g_formatDateSimple(b,g)}if(h==1){a=a.substr(0,1).toUpperCase()+a.substr(1)}d=ct(a);ae(f,d)},coFormatFileSize:function(c){var b=-1;var a="KMGTPEZY";while(c>=1024&&b<7){c/=1024;++b}if(b<0){return c+" byte"+(c>1?"s":"")}else{return c.toFixed(1)+" "+a[b]+"B"}},ssCellOver:function(){this.className="screenshot-caption-over"},ssCellOut:function(){this.className="screenshot-caption"},ssCellClick:function(b,d){d=$E(d);if(d.shiftKey||d.ctrlKey){return}var a=0,c=d._target;while(c&&a<3){if(c.nodeName=="A"){return}if(c.nodeName=="IMG"){break}c=c.parentNode}ScreenshotViewer.show({screenshots:this.data,pos:b})},ssCreateCb:function(d,b){if(b.__nochk){return}var c=ce("div");c.className="listview-cb";c.onclick=Listview.cbCellClick;var a=ce("input");a.type="checkbox";a.onclick=Listview.cbClick;ns(a);if(b.__chk){a.checked=true;if(Browser.ie){a.defaultChecked=true}}b.__cb=a;ae(c,a);ae(d,c)},ssCreateCbNote:function(b,a){if(this.createCbControls){this.createCbControls(b,a)}if(b.firstChild){b.className="listview-withselected"+(a?"":"2")}},moneyHonorOver:function(a){Tooltip.showAtCursor(a,LANG.tooltip_honorpoints,0,0,"q")},moneyArenaOver:function(a){Tooltip.showAtCursor(a,LANG.tooltip_arenapoints,0,0,"q")},moneyAchievementOver:function(a){Tooltip.showAtCursor(a,LANG.tooltip_achievementpoints,0,0,"q")},appendMoney:function(g,a,f,m,j,c,l){var k,h=0;if(a>=10000){h=1;k=ce("span");k.className="moneygold";ae(k,ct(Math.floor(a/10000)));ae(g,k);a%=10000}if(a>=100){if(h){ae(g,ct(" "))}else{h=1}k=ce("span");k.className="moneysilver";ae(k,ct(Math.floor(a/100)));ae(g,k);a%=100}if(a>=1||f!=null){if(h){ae(g,ct(" "))}else{h=1}k=ce("span");k.className="moneycopper";ae(k,ct(a));ae(g,k)}if(m!=null&&m!=0){if(h){ae(g,ct(" "))}else{h=1}k=ce("span");k.className="money"+(m<0?"horde":"alliance")+" tip";k.onmouseover=Listview.funcBox.moneyHonorOver;k.onmousemove=Tooltip.cursorUpdate;k.onmouseout=Tooltip.hide;ae(k,ct(number_format(Math.abs(m))));ae(g,k)}if(j>=1){if(h){ae(g,ct(" "))}else{h=1}k=ce("span");k.className="moneyarena tip";k.onmouseover=Listview.funcBox.moneyArenaOver;k.onmousemove=Tooltip.cursorUpdate;k.onmouseout=Tooltip.hide;ae(k,ct(number_format(j)));ae(g,k)}if(c!=null){for(var b=0;b<c.length;++b){if(h){ae(g,ct(" "))}else{h=1}var n=c[b][0];var e=c[b][1];k=ce("a");k.href="/?item="+n;k.className="moneyitem";k.style.backgroundImage="url(http://static.wowhead.com/images/icons/tiny/"+g_items.getIcon(n).toLowerCase()+".gif)";ae(k,ct(e));ae(g,k)}}if(l!=null){if(h){ae(g,ct(" "))}else{h=1}k=ce("span");k.className="moneyachievement tip";k.onmouseover=Listview.funcBox.moneyAchievementOver;k.onmousemove=Tooltip.cursorUpdate;k.onmouseout=Tooltip.hide;ae(k,ct(number_format(l)));ae(g,k)}},getUpperSource:function(a,b){switch(a){case 2:if(b.z){return LANG.source_zonedrop}break;case 4:return LANG.source_quests;case 5:return LANG.source_vendors}return g_sources[a]},getLowerSource:function(a,d,c){switch(a){case 3:if(d.p&&g_sources_pvp[d.p]){return{text:g_sources_pvp[d.p]}}break}switch(c){case 0:case 1:case 2:if(d.z){var b={url:"/?zone="+d.z,text:g_zones[d.z]};if(d.t&&a==5){b.pretext=LANG.lvitem_vendorin}if(d.dd&&d.dd!=99){if(d.dd<0){b.posttext=sprintf(LANG.lvitem_dd,"",(d.dd<-1?LANG.lvitem_heroic:LANG.lvitem_normal))}else{b.posttext=sprintf(LANG.lvitem_dd,(d.dd&1?LANG.lvitem_raid10:LANG.lvitem_raid25),(d.dd>2?LANG.lvitem_heroic:LANG.lvitem_normal))}}return b}break;case 5:return{url:"/?quests="+d.c2+"."+d.c,text:Listview.funcBox.getQuestCategory(d.c)};break;case 6:if(d.c&&d.s){return{url:"/?spells="+d.c+"."+d.s,text:g_spell_skills[d.s]}}else{return{url:"/?spells=0",text:"??"}}break}}};Listview.templates={faction:{sort:[1],nItemsPerPage:-1,searchable:1,filtrable:1,columns:[{id:"name",name:LANG.name,type:"text",align:"left",value:"name",compute:function(d,e){var b=ce("a");b.style.fontFamily="Verdana, sans-serif";b.href=this.template.getItemLink(d);ae(b,ct(d.name));if(d.expansion){var c=ce("span");c.className=(d.expansion==1?"bc-icon":"wotlk-icon");ae(c,b);ae(e,c)}else{ae(e,b)}},getVisibleText:function(a){var b=a.name;if(a.expansion==1){b+=" bc"}else{if(a.expansion==2){b+="wotlk wrath"}}return b}},{id:"side",name:LANG.side,type:"text",compute:function(a,c){if(a.side&&a.side!=3){var b=ce("span");b.className=(a.side==1?"alliance-icon":"horde-icon");b.onmouseover=function(d){Tooltip.showAtCursor(d,g_sides[a.side],0,0,"q")};b.onmousemove=Tooltip.cursorUpdate;b.onmouseout=Tooltip.hide;ae(c,b)}},getVisibleText:function(a){if(a.side){return g_sides[a.side]}},sortFunc:function(d,c,e){return strcmp(g_sides[d.side],g_sides[c.side])}},{id:"category",name:LANG.category,type:"text",width:"16%",compute:function(d,e){if(d.category2!=null){e.className="small q1";var b=ce("a"),c="/?factions="+d.category2;if(d.category){c+="."+d.category}b.href=c;ae(b,ct(Listview.funcBox.getFactionCategory(d.category,d.category2)));ae(e,b)}},getVisibleText:function(a){return Listview.funcBox.getFactionCategory(a.category,a.category2)},sortFunc:function(d,c,f){var e=Listview.funcBox.getFactionCategory;return strcmp(e(d.category,d.category2),e(c.category,c.category2))}}],getItemLink:function(a){return"/?faction="+a.id}},item:{sort:[1],searchable:1,filtrable:1,columns:[{id:"name",name:LANG.name,type:"text",align:"left",span:2,value:"name",compute:function(n,e,l){var g=ce("td");g.style.width="1px";g.style.padding="0";g.style.borderRight="none";var h=null,o=null;if(n.stack!=null){h=Listview.funcBox.createTextRange(n.stack[0],n.stack[1])}if(n.avail!=null){o=n.avail}ae(g,g_items.createIcon(n.id,(this.iconSize==null?1:this.iconSize),h,o));ae(l,g);e.style.borderLeft="none";var m=ce("a");m.className="q"+(7-parseInt(n.name.charAt(0)));m.style.fontFamily="Verdana, sans-serif";m.href=this.template.getItemLink(n);if(n.rel){Icon.getLink(g.firstChild).rel=n.rel;m.rel=n.rel}ae(m,ct(n.name.substring(1)));var b=ce("div");b.style.position="relative";ae(b,m);if(n.heroic){var j=ce("div");j.className="small q2";j.style.fontStyle="italic";j.style.position="absolute";j.style.right="3px";j.style.bottom="3px";ae(j,ct(LANG.lvitem_heroicitem));ae(b,j)}ae(e,b);if(typeof fi_nExtraCols=="number"&&fi_nExtraCols>=5){if(n.source!=null&&n.source.length==1){var j=ce("div");j.className="small2";var c=(n.sourcemore?n.sourcemore[0]:{});var k=0;if(c.t){k=c.t;var m=ce("a");if(c.q!=null){m.className="q"+c.q}else{m.className="q1"}m.href="/?"+g_types[c.t]+"="+c.ti;if(c.n.length<=30){ae(m,ct(c.n))}else{m.title=c.n;ae(m,ct(trim(c.n.substr(0,27))+"..."))}ae(j,m)}else{ae(j,ct(Listview.funcBox.getUpperSource(n.source[0],c)))}var f=Listview.funcBox.getLowerSource(n.source[0],c,k);if(f!=null){ae(j,ct(LANG.hyphen));if(f.pretext){ae(j,ct(f.pretext))}if(f.url){var m=ce("a");m.className="q1";m.href=f.url;ae(m,ct(f.text));ae(j,m)}else{ae(j,ct(f.text))}if(f.posttext){ae(j,ct(f.posttext))}}ae(e,j)}}},getVisibleText:function(c){var e=c.name.substring(1);if(c.heroic){e+=" "+LANG.lvitem_heroicitem}if(typeof fi_nExtraCols=="number"&&fi_nExtraCols>=5){if(c.source!=null&&c.source.length==1){var d=(c.sourcemore?c.sourcemore[0]:{});var b=0;if(d.t){b=d.t;e+=" "+d.n}else{e+=" "+Listview.funcBox.getUpperSource(c.source[0],d)}var a=Listview.funcBox.getLowerSource(c.source[0],d,b);if(a!=null){if(a.pretext){e+=" "+a.pretext}e+=" "+a.text;if(a.posttext){e+=" "+a.posttext}}}}return e}},{id:"level",name:LANG.level,value:"level"},{id:"reqlevel",name:LANG.req,tooltip:LANG.tooltip_reqlevel,value:"reqlevel",compute:function(a,b){if(a.reqlevel>1){return a.reqlevel}}},{id:"side",name:LANG.side,type:"text",compute:function(a,c){if(a.side&&a.side!=3){var b=ce("span");b.className=(a.side==1?"alliance-icon":"horde-icon");b.onmouseover=function(d){Tooltip.showAtCursor(d,g_sides[a.side],0,0,"q")};b.onmousemove=Tooltip.cursorUpdate;b.onmouseout=Tooltip.hide;ae(c,b)}},getVisibleText:function(a){if(a.side){return g_sides[a.side]}},sortFunc:function(d,c,e){return strcmp(g_sides[d.side],g_sides[c.side])}},{id:"dps",name:LANG.dps,value:"dps",compute:function(a,b){return(a.dps||0).toFixed(1)},hidden:true},{id:"speed",name:LANG.speed,value:"speed",compute:function(a,b){return(a.speed||0).toFixed(2)},hidden:true},{id:"armor",name:LANG.armor,value:"armor",compute:function(a,b){if(a.armor>0){return a.armor}},hidden:true},{id:"slot",name:LANG.slot,type:"text",compute:function(a,b){nw(b);return g_item_slots[a.slot]},getVisibleText:function(a){return g_item_slots[a.slot]},sortFunc:function(d,c,e){return strcmp(g_item_slots[d.slot],g_item_slots[c.slot])},hidden:true},{id:"slots",name:LANG.slots,value:"nslots",hidden:true},{id:"skill",name:LANG.skill,value:"skill",hidden:true},{id:"glyph",name:LANG.glyphtype,type:"text",value:"glyph",compute:function(a,b){if(a.glyph){return g_item_glyphs[a.glyph]}},getVisibleText:function(a){return g_item_glyphs[a.glyph]},sortFunc:function(d,c,e){return strcmp(g_item_glyphs[d.glyph],g_item_glyphs[c.glyph])},hidden:true},{id:"source",name:LANG.source,type:"text",compute:function(k,d){if(this.iconSize==0){d.className="small"}if(k.source!=null){if(k.source.length==1){nw(d);var c=(k.sourcemore?k.sourcemore[0]:{});var h=0;if(c.t){h=c.t;var j=ce("a");if(c.q!=null){j.className="q"+c.q}else{j.className="q1"}j.href="/?"+g_types[c.t]+"="+c.ti;if(this.iconSize==0||c.n.length<=20){ae(j,ct(c.n))}else{j.title=c.n;ae(j,ct(trim(c.n.substr(0,17))+"..."))}ae(d,j)}else{ae(d,ct(Listview.funcBox.getUpperSource(k.source[0],c)))}var f=Listview.funcBox.getLowerSource(k.source[0],c,h);if(this.iconSize!=0&&f!=null){var b=ce("div");b.className="small2";if(f.pretext){ae(b,ct(f.pretext))}if(f.url){var j=ce("a");j.className="q1";j.href=f.url;ae(j,ct(f.text));ae(b,j)}else{ae(b,ct(f.text))}if(f.posttext){ae(b,ct(f.posttext))}ae(d,b)}}else{var l="";for(var e=0,g=k.source.length;e<g;++e){if(e>0){l+=LANG.comma}l+=g_sources[k.source[e]]}return l}}},getVisibleText:function(c){if(c.source!=null){if(c.source.length==1){var e="";var d=(c.sourcemore?c.sourcemore[0]:{});var b=0;if(d.t){b=d.t;e+=" "+d.n}else{e+=" "+Listview.funcBox.getUpperSource(c.source[0],d)}var a=Listview.funcBox.getLowerSource(c.source[0],d,b);if(a!=null){if(a.pretext){e+=" "+a.pretext}e+=" "+a.text;if(a.posttext){e+=" "+a.posttext}}return e}else{return Listview.funcBox.arrayText(c.source,g_sources)}}},sortFunc:function(f,d){var g=Listview.funcBox.assocArrCmp(f.source,d.source,g_sources);if(g!=0){return g}var e=(f.sourcemore&&f.source.length==1?f.sourcemore[0].n:null),c=(d.sourcemore&&d.source.length==1?d.sourcemore[0].n:null);return strcmp(e,c)}},{id:"type",name:LANG.type,type:"text",compute:function(d,e){e.className="small q1";nw(e);var b=ce("a");var c=Listview.funcBox.getItemType(d.classs,d.subclass,d.subsubclass);b.href=c.url;ae(b,ct(c.text));ae(e,b)},getVisibleText:function(a){return Listview.funcBox.getItemType(a.classs,a.subclass,a.subsubclass).text},sortFunc:function(d,c,f){var e=Listview.funcBox.getItemType;return strcmp(e(d.classs,d.subclass,d.subsubclass).text,e(c.classs,c.subclass,c.subsubclass).text)}}],getItemLink:function(a){return"/?item="+a.id},onBeforeCreate:function(){var b=false;for(var c=0,a=this.data.length;c<a;++c){var d=this.data[c];if((d.slot>0&&d.slot!=18)||(in_array(ModelViewer.validSlots,d.slotbak)>=0&&d.displayid>0)||d.modelviewer){++b}else{d.__nochk=1}}if(b>0){this.mode=1;this._nComparable=b}},createCbControls:function(e,d){if(!d&&this._nComparable<15){return}var c=ce("input"),b=ce("input"),a=ce("input");c.type=b.type=a.type="button";c.value=LANG.button_compare;b.value=LANG.button_viewin3d;a.value=LANG.button_deselect;c.onclick=this.template.compareItems.bind(this);b.onclick=this.template.viewIn3d.bind(this);a.onclick=Listview.cbSelect.bind(this,false);ae(e,c);ae(e,b);ae(e,a)},compareItems:function(){var b=this.getCheckedRows();if(!b.length){return}var a="";array_walk(b,function(c){if(c.slot==0||c.slot==18){return}a+=c.id+";"});su_addToSaved(rtrim(a,";"),b.length)},viewIn3d:function(){var j=this.getCheckedRows();if(!j.length){return}var g=false,e=false,f=false;var c={};var d=null;array_walk(j,function(i){if(in_array(ModelViewer.validSlots,i.slotbak)>=0&&i.displayid>0){var k=ModelViewer.slotMap[i.slotbak];if(c[k]){e=true}c[k]=i.displayid;g=true}else{if(i.modelviewer){d=i.modelviewer}else{f=true}}});var h=null;if(d){if(g||f){h=LANG.dialog_cantdisplay}ModelViewer.show({type:d.type,displayId:d.displayid,slot:d.slot,message:h})}else{if(e||f){h=LANG.dialog_cantdisplay}var a=[];for(var b in c){a.push(parseInt(b));a.push(c[b])}if(a.length>0){ModelViewer.show({type:4,equipList:a,message:h})}else{alert(LANG.message_nothingtoviewin3d)}}}},itemset:{sort:[1],nItemsPerPage:75,searchable:1,filtrable:1,columns:[{id:"name",name:LANG.name,type:"text",align:"left",value:"name",compute:function(c,g){var b=ce("a");b.className="q"+(7-parseInt(c.name.charAt(0)));b.style.fontFamily="Verdana, sans-serif";b.href=this.template.getItemLink(c);ae(b,ct(c.name.substring(1)));var f=ce("div");f.style.position="relative";ae(f,b);if(c.heroic){var e=ce("div");e.className="small q2";e.style.fontStyle="italic";e.style.position="absolute";e.style.right="3px";e.style.bottom="3px";ae(e,ct(LANG.lvitem_heroicitem));ae(f,e)}ae(g,f);if(c.note){var e=ce("div");e.className="small";ae(e,ct(g_itemset_notes[c.note]));ae(g,e)}},getVisibleText:function(a){var b=a.name.substring(1);if(a.note){b+=" "+g_itemset_notes[a.note]}return b}},{id:"level",name:LANG.level,type:"range",getMinValue:function(a){return a.minlevel},getMaxValue:function(a){return a.maxlevel},compute:function(a,b){if(a.minlevel>0&&a.maxlevel>0){if(a.minlevel!=a.maxlevel){return a.minlevel+LANG.hyphen+a.maxlevel}else{return a.minlevel}}else{return -1}},sortFunc:function(d,c,e){if(e>0){return strcmp(d.minlevel,c.minlevel)||strcmp(d.maxlevel,c.maxlevel)}else{return strcmp(d.maxlevel,c.maxlevel)||strcmp(d.minlevel,c.minlevel)}}},{id:"pieces",name:LANG.pieces,getValue:function(a){return a.pieces.length},compute:function(a,b){b.style.padding="0";Listview.funcBox.createCenteredIcons(a.pieces,b)},sortFunc:function(d,c){var f=(d.pieces!=null?d.pieces.length:0);var e=(c.pieces!=null?c.pieces.length:0);return strcmp(f,e)}},{id:"type",name:LANG.type,type:"text",compute:function(a,b){return g_itemset_types[a.type]},sortFunc:function(d,c,e){return strcmp(g_itemset_types[d.type],g_itemset_types[c.type])}},{id:"classes",name:LANG.classes,type:"text",compute:function(d,e){if(d.classes!=null){for(var b=0,a=d.classes.length;b<a;++b){if(b>0){ae(e,ct(LANG.comma))}var c=ce("span");c.className="c"+d.classes[b];ae(c,ct(g_chr_classes[d.classes[b]]));ae(e,c)}}},sortFunc:function(d,c,e){return Listview.funcBox.assocArrCmp(d.classes,c.classes,g_chr_classes)}}],getItemLink:function(a){return"/?itemset="+a.id}},npc:{sort:[1],nItemsPerPage:100,searchable:1,filtrable:1,columns:[{id:"name",name:LANG.name,type:"text",align:"left",value:"name",compute:function(c,f){if(c.boss){f.className="boss-icon-lv"}var b=ce("a");b.style.fontFamily="Verdana, sans-serif";b.href=this.template.getItemLink(c);ae(b,ct(c.name));ae(f,b);if(c.tag!=null){var e=ce("div");e.className="small";ae(e,ct("<"+c.tag+">"));ae(f,e)}},getVisibleText:function(a){var b=a.name;if(a.tag){b+=" <"+a.tag+">"}if(a.boss){b+=" boss skull"}return b},sortFunc:function(d,c,e){return strcmp(c.boss,d.boss)||strcmp(d.name,c.name)}},{id:"level",name:LANG.level,type:"range",width:"10%",getMinValue:function(a){return a.minlevel},getMaxValue:function(a){return a.maxlevel},compute:function(a,c){if(a.classification){var b=ce("div");b.className="small";ae(b,ct(g_npc_classifications[a.classification]));ae(c,b)}if(a.classification==3){return"??"}if(a.minlevel>0&&a.maxlevel>0){if(a.minlevel!=a.maxlevel){return a.minlevel+LANG.hyphen+a.maxlevel}else{return a.minlevel}}return -1},getVisibleText:function(a){var b="";if(a.classification){b+=" "+g_npc_classifications[a.classification]}if(a.minlevel>0&&a.maxlevel>0){b+=" ";if(a.minlevel!=a.maxlevel){b+=a.minlevel+LANG.hyphen+a.maxlevel}else{b+=a.minlevel}}return b},sortFunc:function(d,c,e){if(e>0){return strcmp(d.minlevel,c.minlevel)||strcmp(d.maxlevel,c.maxlevel)||strcmp(d.classification,c.classification)}else{return strcmp(d.maxlevel,c.maxlevel)||strcmp(d.minlevel,c.minlevel)||strcmp(d.classification,c.classification)}}},{id:"location",name:LANG.location,type:"text",compute:function(a,b){return Listview.funcBox.location(a,b)},getVisibleText:function(a){return Listview.funcBox.arrayText(a.location,g_zones)},sortFunc:function(d,c,e){return Listview.funcBox.assocArrCmp(d.location,c.location,g_zones)}},{id:"react",name:LANG.react,type:"text",width:"10%",value:"react",filtrable:0,compute:function(b,g){if(b.react==null){return -1}var d=[LANG.lvnpc_alliance,LANG.lvnpc_horde];var f=0;for(var a=0;a<2;++a){if(b.react[a]!=null){if(f++>0){ae(g,ct(" "))}var e=ce("span");e.className=(b.react[a]<0?"q10":(b.react[a]>0?"q2":"q"));ae(e,ct(d[a]));ae(g,e)}}}},{id:"skin",name:LANG.skin,type:"text",value:"skin",compute:function(c,d){if(c.skin){var b=ce("a");b.className="q1";b.href="/?npcs&filter=cr=35;crs=0;crv="+c.skin;ae(b,ct(c.skin));ae(d,b)}},hidden:1},{id:"petfamily",name:LANG.petfamily,type:"text",width:"12%",compute:function(c,d){d.className="q1";var b=ce("a");b.href="/?pet="+c.family;ae(b,ct(g_pet_families[c.family]));ae(d,b)},getVisibleText:function(a){return g_pet_families[a.family]},sortFunc:function(d,c,e){return strcmp(g_pet_families[d.family],g_pet_families[c.family])},hidden:1},{id:"type",name:LANG.type,type:"text",width:"12%",compute:function(c,d){d.className="small q1";var b=ce("a");b.href="/?npcs="+c.type;ae(b,ct(g_npc_types[c.type]));ae(d,b)},getVisibleText:function(a){return g_npc_types[a.type]},sortFunc:function(d,c,e){return strcmp(g_npc_types[d.type],g_npc_types[c.type])}}],getItemLink:function(a){return"/?npc="+a.id}},object:{sort:[1],nItemsPerPage:100,searchable:1,filtrable:1,columns:[{id:"name",name:LANG.name,type:"text",align:"left",value:"name",compute:function(c,d){var b=ce("a");b.style.fontFamily="Verdana, sans-serif";b.href=this.template.getItemLink(c);ae(b,ct(c.name));ae(d,b)}},{id:"location",name:LANG.location,type:"text",compute:function(a,b){return Listview.funcBox.location(a,b)},getVisibleText:function(a){return Listview.funcBox.arrayText(a.location,g_zones)},sortFunc:function(d,c,e){return Listview.funcBox.assocArrCmp(d.location,c.location,g_zones)}},{id:"skill",name:LANG.skill,width:"10%",value:"skill",hidden:true},{id:"type",name:LANG.type,type:"text",width:"12%",compute:function(c,d){d.className="small q1";var b=ce("a");b.href="/?objects="+c.type;ae(b,ct(g_object_types[c.type]));ae(d,b)},getVisibleText:function(a){return g_object_types[a.type]},sortFunc:function(d,c,e){return strcmp(g_object_types[d.type],g_object_types[c.type])}}],getItemLink:function(a){return"/?object="+a.id}},quest:{sort:[1,2],nItemsPerPage:100,searchable:1,filtrable:1,columns:[{id:"name",name:LANG.name,type:"text",align:"left",value:"name",compute:function(c,d){var b=ce("a");b.style.fontFamily="Verdana, sans-serif";b.href=this.template.getItemLink(c);ae(b,ct(c.name));ae(d,b)}},{id:"level",name:LANG.level,width:"7%",value:"level",compute:function(a,c){if(a.type||a.daily||a.weekly){var b=ce("div");b.className="small";nw(b);if(a.daily){if(a.type){ae(b,ct(sprintf(LANG.lvquest_daily,g_quest_types[a.type])))}else{ae(b,ct(LANG.daily))}}else{if(a.weekly){if(a.type){ae(b,ct(sprintf(LANG.lvquest_weekly,g_quest_types[a.type])))}else{ae(b,ct(LANG.weekly))}}else{if(a.type){ae(b,ct(g_quest_types[a.type]))}}}ae(c,b)}return a.level},getVisibleText:function(a){var b="";if(a.type){b+=" "+g_quest_types[a.type]}if(a.daily){b+=" "+LANG.daily}else{if(a.weekly){b+=" "+LANG.weekly}}if(a.level){b+=" "+a.level}return b},sortFunc:function(d,c,e){return strcmp(d.level,c.level)||strcmp(d.type,c.type)}},{id:"reqlevel",name:LANG.req,tooltip:LANG.tooltip_reqlevel,width:"7%",value:"reqlevel"},{id:"side",name:LANG.side,type:"text",compute:function(a,c){if(a.side&&a.side!=3){var b=ce("span");b.className=(a.side==1?"alliance-icon":"horde-icon");b.onmouseover=function(d){Tooltip.showAtCursor(d,g_sides[a.side],0,0,"q")};b.onmousemove=Tooltip.cursorUpdate;b.onmouseout=Tooltip.hide;ae(c,b)}},getVisibleText:function(a){if(a.side){return g_sides[a.side]}},sortFunc:function(d,c,e){return strcmp(g_sides[d.side],g_sides[c.side])}},{id:"rewards",name:LANG.rewards,filtrable:0,width:"25%",compute:function(b,g){var a=(b.itemchoices!=null||b.itemrewards!=null);if(a){g.style.padding="0";var f,e;if(b.itemchoices&&b.itemchoices.length>1){f=LANG.lvquest_pickone;if(b.itemrewards&&b.itemrewards.length>0){e=LANG.lvquest_alsoget}}Listview.funcBox.createCenteredIcons(b.itemchoices,g,f,2);Listview.funcBox.createCenteredIcons(b.itemrewards,g,e,2)}if(b.xp>0||b.money>0){var c=ce("div");if(a){c.style.padding="4px"}if(b.xp>0){ae(c,ct(sprintf(LANG.lvquest_xp,b.xp)+(b.money>0?" + ":"")))}if(b.money>0){Listview.funcBox.appendMoney(c,b.money)}ae(g,c)}},getVisibleText:function(a){var b="";if(a.itemchoices&&a.itemchoices.length){b+=" "+LANG.lvquest_pickone;if(a.itemrewards&&a.itemrewards.length){b+=" "+LANG.lvquest_alsoget}}if(a.xp>0){b+=" "+sprintf(LANG.lvquest_xp,a.xp)}return b},sortFunc:function(d,c,e){var g=(d.itemchoices!=null?d.itemchoices.length:0)+(d.itemrewards!=null?d.itemrewards.length:0);var f=(c.itemchoices!=null?c.itemchoices.length:0)+(c.itemrewards!=null?c.itemrewards.length:0);return strcmp(g,f)||strcmp((d.xp|0)+(d.money|0),(c.xp|0)+(c.money|0))}},{id:"reputation",name:LANG.reputation,width:"14%",value:"id",hidden:true},{id:"category",name:LANG.category,type:"text",width:"16%",compute:function(c,d){if(c.category!=0){d.className="small q1";var b=ce("a");b.href="/?quests="+c.category2+"."+c.category;ae(b,ct(Listview.funcBox.getQuestCategory(c.category)));ae(d,b)}},getVisibleText:function(a){return Listview.funcBox.getQuestCategory(a.category)},sortFunc:function(d,c,f){var e=Listview.funcBox.getQuestCategory;return strcmp(e(d.category),e(c.category))}}],getItemLink:function(a){return"/?quest="+a.id}},spell:{sort:["name","skill","level"],searchable:1,filtrable:1,columns:[{id:"name",name:LANG.name,type:"text",align:"left",span:2,value:"name",compute:function(g,e,k){var f=ce("td"),o;f.style.width="44px";f.style.padding="0";f.style.borderRight="none";if(g.creates!=null){o=g_items.createIcon(g.creates[0],1,Listview.funcBox.createTextRange(g.creates[1],g.creates[2]))}else{o=g_spells.createIcon(g.id,1)}o.style.cssFloat=o.style.styleFloat="left";ae(f,o);ae(k,f);e.style.borderLeft="none";var b=ce("div");var n=ce("a");var l=g.name.charAt(0);if(l!="@"){n.className="q"+(7-parseInt(l))}n.style.fontFamily="Verdana, sans-serif";n.href=this.template.getItemLink(g);ae(n,ct(g.name.substring(1)));ae(b,n);if(g.rank){var j=ce("div");j.className="small2";ae(j,ct(g.rank));ae(b,j)}if(g.races!=null){b.style.position="relative";var j=ce("div");j.className="small";j.style.fontStyle="italic";j.style.position="absolute";j.style.right=j.style.bottom="3px";var m=g.races.toString();if(m=="1,3,4,7,11"){ae(j,ct(g_sides[1]))}else{if(m=="2,5,6,8,10"){ae(j,ct(g_sides[2]))}else{for(var f=0,h=g.races.length;f<h;++f){if(f>0){ae(j,ct(LANG.comma))}ae(j,ct(g_chr_races[g.races[f]]))}}}ae(b,j)}ae(e,b)},getVisibleText:function(a){var b=a.name;if(a.rank){b+=" "+a.rank}if(a.races){b+=" "+Listview.funcBox.arrayText(a.races,g_chr_races)}return b}},{id:"level",name:LANG.level,width:"10%",value:"level",compute:function(a,b){if(a.level>0){return a.level}},hidden:true},{id:"school",name:LANG.school,type:"text",width:"10%",hidden:true,compute:function(a,b){return g_spell_resistances[a.school]},sortFunc:function(d,c,e){return strcmp(g_spell_resistances[d.school],g_spell_resistances[c.school])}},{id:"reagents",name:LANG.reagents,align:"left",width:"9%",getValue:function(a){return(a.reagents?a.reagents.length:0)},compute:function(g,c){var a=(g.reagents!=null);if(a){c.style.padding="0";var k=ce("div");var j=g.reagents;k.style.width=(44*j.length)+"px";for(var e=0,h=j.length;e<h;++e){var b=j[e][0];var f=j[e][1];var l=g_items.createIcon(b,1,f);l.style.cssFloat=l.style.styleFloat="left";ae(k,l);if(this.centerReagents){k.style.margin="0 auto"}}ae(c,k)}},sortFunc:function(d,c){var f=(d.reagents!=null?d.reagents.length:0);var e=(c.reagents!=null?c.reagents.length:0);if(f>0&&f==e){return strcmp(d.reagents.toString(),c.reagents.toString())}else{return strcmp(f,e)}}},{id:"tp",name:LANG.tp,tooltip:LANG.tooltip_trainingpoints,width:"7%",hidden:true,value:"tp",compute:function(a,b){if(a.tp>0){return a.tp}}},{id:"source",name:LANG.source,type:"text",width:"12%",hidden:true,compute:function(b,e){if(b.source!=null){var d="";for(var c=0,a=b.source.length;c<a;++c){if(c>0){d+=LANG.comma}d+=g_sources[b.source[c]]}return d}},sortFunc:function(d,c,e){return Listview.funcBox.assocArrCmp(d.source,c.source,g_sources)}},{id:"skill",name:LANG.skill,type:"text",width:"16%",getValue:function(a){return a.learnedat},compute:function(h,f,l,q){if(h.skill!=null){this.skillsColumn=q;var c=ce("div");c.className="small";for(var g=0,j=h.skill.length;g<j;++g){if(g>0){ae(c,ct(LANG.comma))}if(h.skill[g]==-1){ae(c,ct(LANG.ellipsis))}else{if(in_array([7,-2,-3,-5,-6,-7,11,9],h.cat)!=-1){var n=ce("a");n.className="q1";if(in_array([-5,-6,-7],h.cat)!=-1){n.href="/?spells="+h.cat}else{n.href="/?spells="+h.cat+"."+(h.chrclass?(1+Math.log(h.chrclass)/Math.LN2)+".":"")+h.skill[g]}var p=document.location.href.split("?")[1];var e=p.substring(p.indexOf("=")+1,(p.indexOf("#")!=-1?p.indexOf("#"):p.length)).split(".");if(h.chrclass){if(g<1&&((1+Math.log(h.chrclass)/Math.LN2)!=e[1])){var b=ce("a");b.className="q0";b.href="/?spells="+h.cat+"."+(1+Math.log(h.chrclass)/Math.LN2);ae(b,ct(g_chr_classes[(1+Math.log(h.chrclass)/Math.LN2)]));ae(c,b);ae(c,ce("br"))}}ae(n,ct(g_spell_skills[h.skill[g]]));ae(c,n)}else{ae(c,ct(g_spell_skills[h.skill[g]]))}}}if(h.learnedat>0){ae(c,ct(" ("));var d=ce("span");if(h.learnedat==9999){d.className="q0";ae(d,ct("??"))}else{if(h.learnedat>0){ae(d,ct(h.learnedat));d.style.fontWeight="bold"}}ae(c,d);ae(c,ct(")"))}ae(f,c);if(h.colors!=null){this.columns[q].type=null;var k=h.colors,o=0;for(var g=0;g<k.length;++g){if(k[g]>0){++o;break}}if(o>0){o=0;c=ce("div");c.className="small";c.style.fontWeight="bold";for(var g=0;g<k.length;++g){if(k[g]>0){if(o++>0){ae(c,ct(" "))}var m=ce("span");m.className="r"+(g+1);ae(m,ct(k[g]));ae(c,m)}}ae(f,c)}}}},getVisibleText:function(a){var b=Listview.funcBox.arrayText(a.skill,g_spell_skills);if(a.learnedat>0){b+=" "+(a.learnedat==9999?"??":a.learnedat)}return b},sortFunc:function(e,c){if(e.chrclass&&c.chrclass){return strcmp(g_chr_classes[(1+Math.log(e.chrclass)/Math.LN2)],g_chr_classes[(1+Math.log(c.chrclass)/Math.LN2)])}var d=[e.learnedat,c.learnedat];for(var g=0;g<2;++g){var h=(g==0?e:c);if(d[g]==9999&&h.colors!=null){var f=0;while(h.colors[f]==0&&f<h.colors.length){f++}if(f<h.colors.length){d[g]=h.colors[f]}}}var j=strcmp(d[0],d[1]);if(j!=0){return j}if(e.colors!=null&&c.colors!=null){for(var f=0;f<4;++f){j=strcmp(e.colors[f],c.colors[f]);if(j!=0){return j}}}return Listview.funcBox.assocArrCmp(e.skill,c.skill,g_spell_skills)}}],getItemLink:function(a){return"/?spell="+a.id},onBeforeCreate:function(){if(this.centerReagents){this.columns[3].align=null}}},zone:{sort:[1],nItemsPerPage:-1,searchable:1,filtrable:1,columns:[{id:"name",name:LANG.name,type:"text",align:"left",value:"name",compute:function(c,e){var b=ce("a");b.style.fontFamily="Verdana, sans-serif";b.href=this.template.getItemLink(c);ae(b,ct(c.name));if(c.expansion){var d=ce("span");d.className=(c.expansion==1?"bc-icon":"wotlk-icon");ae(d,b);ae(e,d)}else{ae(e,b)}},getVisibleText:function(a){var b=a.name;if(a.expansion==1){b+=" bc"}else{if(a.expansion==2){b+="wotlk wrath"}}return b}},{id:"level",name:LANG.level,type:"range",width:"10%",getMinValue:function(a){return a.minlevel},getMaxValue:function(a){return a.maxlevel},compute:function(a,b){if(a.minlevel>0&&a.maxlevel>0){if(a.minlevel!=a.maxlevel){return a.minlevel+LANG.hyphen+a.maxlevel}else{return a.minlevel}}},sortFunc:function(d,c,e){if(e>0){return strcmp(d.minlevel,c.minlevel)||strcmp(d.maxlevel,c.maxlevel)}else{return strcmp(d.maxlevel,c.maxlevel)||strcmp(d.minlevel,c.minlevel)}}},{id:"territory",name:LANG.territory,type:"text",width:"13%",compute:function(a,c){var b=ce("span");switch(a.territory){case 0:b.className="alliance-icon";break;case 1:b.className="horde-icon";break;case 4:b.className="ffapvp-icon";break}ae(b,ct(g_zone_territories[a.territory]));ae(c,b)},getVisibleText:function(a){return g_zone_territories[a.territory]},sortFunc:function(d,c,e){return strcmp(g_zone_territories[d.territory],g_zone_territories[c.territory])}},{id:"instancetype",name:LANG.instancetype,type:"text",compute:function(a,d){if(a.instance>0){var b=ce("span");if((a.instance>=1&&a.instance<=5)||a.instance==7){b.className="instance-icon"+a.instance}if(a.nplayers==-2){a.nplayers="10/25"}var c=g_zone_instancetypes[a.instance];if(a.nplayers&&((a.instance!=2&&a.instance!=5)||a.nplayers>5)){c+=" (";if(a.instance==4){c+=sprintf(LANG.lvzone_xvx,a.nplayers,a.nplayers)}else{c+=sprintf(LANG.lvzone_xman,a.nplayers)}c+=")"}ae(b,ct(c));ae(d,b)}},getVisibleText:function(a){if(a.instance>0){var b=g_zone_instancetypes[a.instance];if(a.nplayers&&((a.instance!=2&&a.instance!=5)||a.nplayers>5)){if(a.instance==4){b+=" "+sprintf(LANG.lvzone_xvx,a.nplayers,a.nplayers)}else{b+=" "+sprintf(LANG.lvzone_xman,a.nplayers)}}return b}},sortFunc:function(d,c,e){return strcmp(g_zone_instancetypes[d.instance],g_zone_instancetypes[c.instance])||strcmp(d.instance,c.instance)||strcmp(d.nplayers,c.nplayers)}},{id:"category",name:LANG.category,type:"text",width:"15%",compute:function(c,d){d.className="small q1";var b=ce("a");b.href="/?zones="+c.category;ae(b,ct(g_zone_categories[c.category]));ae(d,b)},getVisibleText:function(a){return g_zone_categories[a.category]},sortFunc:function(d,c,e){return strcmp(g_zone_categories[d.category],g_zone_categories[c.category])}}],getItemLink:function(a){return"/?zone="+a.id}},holiday:{sort:[1],nItemsPerPage:-1,searchable:1,columns:[{id:"name",name:LANG.name,type:"text",align:"left",value:"name",compute:function(c,d){var b=ce("a");b.style.fontFamily="Verdana, sans-serif";b.href=this.template.getItemLink(c);ae(b,ct(c.name));ae(d,b)},getVisibleText:function(a){return a.name}},{id:"date",name:LANG.date,type:"text",width:"16%",compute:function(b,e){if(b.startDate&&b.endDate){var c=Listview.funcBox.getEventNextDates(b.startDate,b.endDate,b.rec||0);if(c[0]&&c[1]){var d=g_formatDateSimple(c[0]),a=g_formatDateSimple(c[1]);if(d!=a){ae(e,ct(d+LANG.hyphen+a))}else{ae(e,ct(d))}return}}},getVisibleText:function(b){if(b.startDate&&b.endDate){var c=Listview.funcBox.getEventNextDates(b.startDate,b.endDate,b.rec||0);if(c[0]&&c[1]){var d=g_formatDateSimple(c[0]),a=g_formatDateSimple(c[1]);if(d!=a){return d+LANG.hyphen+a}else{return d}}}return""},sortFunc:function(e,c,g){if(e.startDate&&c.startDate){var d=Listview.funcBox.getEventNextDates(e.startDate,e.endDate,e.rec||0);var f=Listview.funcBox.getEventNextDates(c.startDate,c.endDate,c.rec||0);if(d[0]&&f[0]){return d[0]-f[0]}}else{if(e.startDate){return -1}else{if(c.startDate){return 1}}}return 0}},{id:"category",name:LANG.category,type:"text",width:"16%",compute:function(d,e){e.className="small q1";var b=ce("a"),c="/?events="+d.category;b.href=c;ae(b,ct(g_holiday_categories[d.category]));ae(e,b)},getVisibleText:function(a){return g_holiday_categories[a.category]},sortFunc:function(d,c,e){return strcmp(g_holiday_categories[d.category],g_holiday_categories[c.category])}}],getItemLink:function(a){return"/?event="+a.id}},comment:{sort:[1],mode:2,nItemsPerPage:40,poundable:2,columns:[{value:"number"},{value:"id"},{value:"rating"}],compute:function(u,I){var M,t=new Date(u.date),G=(g_serverTime-t)/1000,d=(g_user.roles&26)!=0,J=u.rating<0||u.purged||u.deleted||(u.__minPatch&&g_getPatchVersion.T[u.__minPatch]>t),D=d||u.user.toLowerCase()==g_user.name.toLowerCase(),w=D&&u.deleted==0,c=D&&u.replyTo!=u.id,K=((u.roles&26)==0),E=u.purged==0&&u.deleted==0&&g_user.id&&u.user.toLowerCase()!=g_user.name.toLowerCase()&&in_array(u.raters,g_user.id,function(N){return N[0]})==-1,i=u.rating>=0&&(g_user.id==0||E);u.ratable=E;I.className="comment";if(u.indent){I.className+=" comment-indent"}var x=ce("div");var n=ce("div");var k=ce("div");u.divHeader=x;u.divBody=n;u.divLinks=k;x.className=(J?"comment-header-bt":"comment-header");var g=ce("div");g.className="comment-rating";if(J){var p=ce("a");p.href="javascript:;";p.onclick=Listview.funcBox.coToggleVis.bind(p,u);ae(p,ct(LANG.lvcomment_show));ae(g,p);ae(g,ct(" "+String.fromCharCode(160)+" "))}var m=ce("a");m.href="javascript:;";ae(m,ct(LANG.lvcomment_rating));var q=ce("span");ae(q,ct(Listview.funcBox.coDisplayRating(u)));m.onclick=Listview.funcBox.coToggleRating.bind(this);ae(m,q);ae(g,m);ae(g,ct(" "));var C=ce("span");var j=ce("a"),L=ce("a");if(E){j.href=L.href="javascript:;";j.onclick=Listview.funcBox.coRate.bind(j,u,1);L.onclick=Listview.funcBox.coRate.bind(L,u,-1);if(d){var B=ce("a");B.href="javascript:;";B.onclick=Listview.funcBox.coRate.bind(B,u,0);B.onmouseover=Listview.funcBox.coCustomRatingOver;B.onmousemove=Tooltip.cursorUpdate;B.onmouseout=Tooltip.hide;ae(B,ct("[~]"));ae(C,B);ae(C,ct(" "))}}else{j.href=L.href="/?account=signin"}ae(j,ct("[+]"));j.onmouseover=Listview.funcBox.coPlusRatingOver;L.onmouseover=Listview.funcBox.coMinusRatingOver;j.onmousemove=L.onmousemove=Tooltip.cursorUpdate;j.onmouseout=L.onmouseout=Tooltip.hide;ae(L,ct("[-]"));ae(C,L);ae(C,ct(" "));ae(C,j);ae(g,C);if(!i){C.style.display="none"}ae(x,g);ae(x,ct(LANG.lvcomment_by));var H=ce("a");H.href="/?user="+u.user;ae(H,ct(u.user));ae(x,H);ae(x,ct(" "));var a=ce("a");a.className="q0";a.id="comments:id="+u.id;a.href="#"+a.id;Listview.funcBox.coFormatDate(a,G,t);a.style.cursor="pointer";ae(x,a);ae(x,ct(sprintf(LANG.lvcomment_patch,g_getPatchVersion(t))));ae(I,x);n.className="comment-body"+Listview.funcBox.coGetColor(u);if(u.indent){n.className+=" comment-body-indent"}n.innerHTML=Markup.toHtml(u.body,{mode:Markup.MODE_COMMENT,roles:u.roles});ae(I,n);if((u.roles&26)==0||g_user.roles&26){var F=ce("div");u.divLastEdit=F;F.className="comment-lastedit";ae(F,ct(LANG.lvcomment_lastedit));var o=ce("a");ae(o,ct(" "));ae(F,o);ae(F,ct(" "));var A=ce("span");ae(F,A);ae(F,ct(" "));Listview.funcBox.coUpdateLastEdit(u);if(J){F.style.display="none"}ae(I,F)}k.className="comment-links";if(D){var b=ce("span");var z=ce("a");ae(z,ct(LANG.lvcomment_edit));z.onclick=Listview.funcBox.coEdit.bind(this,u,0);ns(z);z.href="javascript:;";ae(b,z);ae(b,ct("|"));ae(k,b)}if(w){var l=ce("span");var r=ce("a");ae(r,ct(LANG.lvcomment_delete));r.onclick=Listview.funcBox.coDelete.bind(this,u);ns(r);r.href="javascript:;";ae(l,r);ae(l,ct("|"));ae(k,l)}if(c){var y=ce("span");var e=ce("a");ae(e,ct(LANG.lvcomment_detach));e.onclick=Listview.funcBox.coDetach.bind(this,u);ns(e);e.href="javascript:;";ae(y,e);ae(y,ct("|"));ae(k,y)}if(K){var v=ce("span");var f=ce("a");ae(f,ct(LANG.lvcomment_report));if(g_user.id>0){f.onclick=Listview.funcBox.coReportClick.bind(f,u,0);f.href="javascript:;"}else{f.href="/?account=signin"}ae(v,f);ae(v,ct("|"));ae(k,v)}var h=ce("a");ae(h,ct(LANG.lvcomment_reply));if(g_user.id>0){h.onclick=Listview.funcBox.coReply.bind(this,u);h.href="javascript:;"}else{h.href="/?account=signin"}ae(k,h);if(J){n.style.display="none";k.style.display="none"}ae(I,k)},createNote:function(b){var g=ce("small");var l=ce("a");if(g_user.id>0){l.href="javascript:;";l.onclick=co_addYourComment}else{l.href="/?account=signin"}ae(l,ct(LANG.lvcomment_add));ae(g,l);var e=ce("span");e.style.padding="0 5px";e.style.color="white";ae(e,ct("|"));ae(g,e);ae(g,ct(LANG.lvcomment_sort));var m=ce("a");m.href="javascript:;";ae(m,ct(LANG.lvcomment_sortdate));m.onclick=Listview.funcBox.coSortDate.bind(this,m);ae(g,m);ae(g,ct(LANG.comma));var n=ce("a");n.href="javascript:;";ae(n,ct(LANG.lvcomment_sortrating));n.onclick=Listview.funcBox.coSortHighestRatedFirst.bind(this,n);ae(g,n);if(g_user&&g_user.settings&&g_user.settings.commentsort=="2"){n.onclick()}else{m.onclick()}var e=ce("span");e.style.padding="0 5px";e.style.color="white";ae(e,ct("|"));ae(g,e);var o=ce("select");var f=ce("option");f.value=0;f.selected="selected";ae(o,f);var k={};for(var i=0;i<this.data.length;++i){var h=new Date(this.data[i].date).getTime();k[g_getPatchVersionIndex(h)]=true}var j=[];for(var c in k){j.push(c)}j.sort(function(p,d){return d-p});for(var c=0;c<j.length;++c){var f=ce("option");f.value=j[c];ae(f,ct(g_getPatchVersion.V[j[c]]));ae(o,f)}o.onchange=Listview.funcBox.coFilterByPatchVersion.bind(this,o);ae(g,ct(LANG.lvcomment_patchfilter));ae(g,o);ae(b,g)},onNoData:function(c){if(typeof g_pageInfo=="object"&&g_pageInfo.type>0){var a="<b>"+LANG.lvnodata_co1+'</b><div class="pad2"></div>';if(g_user.id>0){var b=LANG.lvnodata_co2;b=b.replace("<a>",'<a href="javascript:;" onclick="co_addYourComment()" onmousedown="return false">');a+=b}else{var b=LANG.lvnodata_co3;b=b.replace("<a>",'<a href="/?account=signin">');b=b.replace("<a>",'<a href="/?account=signup">');a+=b}c.style.padding="1.5em 0";c.innerHTML=a}},onBeforeCreate:function(){if(location.hash&&location.hash.match(/:id=([0-9]+)/)!=null){var a=in_array(this.data,parseInt(RegExp.$1),function(b){return b.id});this.rowOffset=this.getRowOffset(a);return this.data[a]}},onAfterCreate:function(a){if(a!=null){var b=a.__div;this.tabs.__st=b;b.firstChild.style.border="1px solid #505050"}}},commentpreview:{sort:[3],nItemsPerPage:75,columns:[{id:"subject",name:LANG.subject,align:"left",value:"subject",compute:function(f,e){var b=ce("a");b.style.fontFamily="Verdana, sans-serif";b.href=this.template.getItemLink(f);ae(b,ct(f.subject));ae(e,b);var c=ce("div");c.className="small";ae(c,ct(LANG.types[f.type][0]));ae(e,c)}},{id:"preview",name:LANG.preview,align:"left",width:"50%",value:"preview",compute:function(e,b,g){var f=ce("div");f.className="crop";if(e.rating>=10){f.className+=" comment-green"}ae(f,ct(Markup.removeTags(e.preview,{mode:Markup.MODE_ARTICLE})));ae(b,f);var c=e.rating!=null;var j=e.user!=null;if(c||j){f=ce("div");f.className="small3";if(j){ae(f,ct(LANG.lvcomment_by));var i=ce("a");i.href="/?user="+e.user;ae(i,ct(e.user));ae(f,i);if(c){ae(f,ct(LANG.hyphen))}}if(c){ae(f,ct(LANG.lvcomment_rating+(e.rating>0?"+":"")+e.rating));var k=ce("span"),h="";k.className="q10";if(e.deleted){h=LANG.lvcomment_deleted}else{if(e.purged){h=LANG.lvcomment_purged}}ae(k,ct(h));ae(f,k);g.__status=k}ae(b,f)}}},{id:"posted",name:LANG.posted,width:"16%",value:"elapsed",compute:function(e,d){var a=new Date(e.date),c=(g_serverTime-a)/1000;var b=ce("span");Listview.funcBox.coFormatDate(b,c,a,0,1);ae(d,b)}}],getItemLink:function(a){return"/?"+g_types[a.type]+"="+a.typeId+(a.id!=null?"#comments:id="+a.id:"")}},screenshot:{sort:[],mode:3,nItemsPerPage:40,nItemsPerRow:4,poundable:2,columns:[],compute:function(k,e,l){var u,o=new Date(k.date),f=(g_serverTime-o)/1000;e.className="screenshot-cell";e.vAlign="bottom";var q=ce("a");q.href="#screenshots:id="+k.id;q.onclick=rf2;var v=ce("img"),t=Math.min(150/k.width,150/k.height);v.src="http://static.wowhead.com/uploads/screenshots/thumb/"+k.id+".jpg";ae(q,v);ae(e,q);var p=ce("div");p.className="screenshot-cell-user";var m=(k.user!=null&&k.user.length);if(m){q=ce("a");q.href="/?user="+k.user;ae(q,ct(k.user));ae(p,ct(LANG.lvscreenshot_from));ae(p,q);ae(p,ct(" "))}var j=ce("span");if(m){Listview.funcBox.coFormatDate(j,f,o)}else{Listview.funcBox.coFormatDate(j,f,o,0,1)}ae(p,j);ae(e,p);p=ce("div");p.style.position="relative";p.style.height="1em";if(g_getLocale(true)!=0&&k.caption){k.caption=""}var h=(k.caption!=null&&k.caption.length);var g=(k.subject!=null&&k.subject.length);if(h||g){var r=ce("div");r.className="screenshot-caption";if(g){var c=ce("small");ae(c,ct(LANG.types[k.type][0]+LANG.colon));var b=ce("a");ae(b,ct(k.subject));b.href="/?"+g_types[k.type]+"="+k.typeId;ae(c,b);ae(r,c);if(h&&k.caption.length){ae(c,ct(" (...)"))}ae(c,ce("br"))}if(h){aE(e,"mouseover",Listview.funcBox.ssCellOver.bind(r));aE(e,"mouseout",Listview.funcBox.ssCellOut.bind(r));var n=ce("span");n.innerHTML=k.caption;ae(r,n)}ae(p,r)}aE(e,"click",Listview.funcBox.ssCellClick.bind(this,l));ae(e,p)},createNote:function(d){if(typeof g_pageInfo=="object"&&g_pageInfo.type>0){var c=ce("small");var b=ce("a");if(g_user.id>0){b.href="javascript:;";b.onclick=ss_submitAScreenshot}else{b.href="/?account=signin"}ae(b,ct(LANG.lvscreenshot_submit));ae(c,b);ae(d,c)}},onNoData:function(c){if(typeof g_pageInfo=="object"&&g_pageInfo.type>0){var a="<b>"+LANG.lvnodata_ss1+'</b><div class="pad2"></div>';if(g_user.id>0){var b=LANG.lvnodata_ss2;b=b.replace("<a>",'<a href="javascript:;" onclick="ss_submitAScreenshot()" onmousedown="return false">');a+=b}else{var b=LANG.lvnodata_ss3;b=b.replace("<a>",'<a href="/?account=signin">');b=b.replace("<a>",'<a href="/?account=signup">');a+=b}c.style.padding="1.5em 0";c.innerHTML=a}else{return -1}},onBeforeCreate:function(){if(location.hash&&location.hash.match(/:id=([0-9]+)/)!=null){var a=in_array(this.data,parseInt(RegExp.$1),function(b){return b.id});this.rowOffset=this.getRowOffset(a);return a}},onAfterCreate:function(a){if(a!=null){setTimeout((function(){ScreenshotViewer.show({screenshots:this.data,pos:a})}).bind(this),1)}}},pet:{sort:[1],nItemsPerPage:-1,searchable:1,filtrable:1,columns:[{id:"name",name:LANG.name,type:"text",align:"left",value:"name",span:2,compute:function(b,k,g){var e=ce("td");e.style.width="1px";e.style.padding="0";e.style.borderRight="none";ae(e,Icon.create(b.icon,0));ae(g,e);k.style.borderLeft="none";var j=ce("div");var c=ce("a");c.style.fontFamily="Verdana, sans-serif";c.href=this.template.getItemLink(b);ae(c,ct(b.name));if(b.expansion){var f=ce("span");f.className=(b.expansion==1?"bc-icon":"wotlk-icon");ae(f,c);ae(j,f)}else{ae(j,c)}if(b.exotic){j.style.position="relative";var h=ce("div");h.className="small";h.style.fontStyle="italic";h.style.position="absolute";h.style.right="3px";h.style.bottom="0px";ae(h,ct(LANG.lvpet_exotic));ae(j,h)}ae(k,j)},getVisibleText:function(a){var b=a.name;if(a.expansion==1){b+=" bc"}else{if(a.expansion==2){b+="wotlk wrath"}}if(a.exotic){b+=" "+LANG.lvpet_exotic}return b}},{id:"level",name:LANG.level,type:"range",getMinValue:function(a){return a.minlevel},getMaxValue:function(a){return a.maxlevel},compute:function(a,b){if(a.minlevel>0&&a.maxlevel>0){if(a.minlevel!=a.maxlevel){return a.minlevel+LANG.hyphen+a.maxlevel}else{return a.minlevel}}else{return -1}},sortFunc:function(d,c,e){if(e>0){return strcmp(d.minlevel,c.minlevel)||strcmp(d.maxlevel,c.maxlevel)}else{return strcmp(d.maxlevel,c.maxlevel)||strcmp(d.minlevel,c.minlevel)}}},{id:"damage",name:LANG.damage,value:"damage",compute:function(a,b){ae(b,this.template.getStatPct(a.damage))}},{id:"armor",name:LANG.armor,value:"armor",compute:function(a,b){ae(b,this.template.getStatPct(a.armor))}},{id:"health",name:LANG.health,value:"health",compute:function(a,b){ae(b,this.template.getStatPct(a.health))}},{id:"abilities",name:LANG.abilities,type:"text",getValue:function(b){if(!b.spells){return""}if(b.spells.length>0){var d="";for(var c=0,a=b.spells.length;c<a;++c){if(b.spells[c]){d+=g_spells[b.spells[c]]["name_"+g_locale.name]}}return d}},compute:function(a,b){if(!a.spells){return""}if(a.spells.length>0){b.style.padding="0";Listview.funcBox.createCenteredIcons(a.spells,b,"",1)}},sortFunc:function(d,c){if(!d.spells||!c.spells){return 0}return strcmp(d.spellCount,c.spellCount)||strcmp(d.spells,c.spells)},hidden:true},{id:"diet",name:LANG.diet,type:"text",compute:function(a,e){if(e){e.className="small"}var b=0,c="";for(var d in g_pet_foods){if(a.diet&d){if(b++>0){c+=LANG.comma}c+=g_pet_foods[d]}}return c},sortFunc:function(d,c){return strcmp(c.foodCount,d.foodCount)||Listview.funcBox.assocArrCmp(d.diet,c.diet,g_pet_foods)}},{id:"type",name:LANG.type,type:"text",compute:function(b,d){if(b.type!=null){d.className="small q1";var c=ce("a");c.href="/?pets="+b.type;ae(c,ct(g_pet_types[b.type]));ae(d,c)}},getVisibleText:function(a){if(a.type!=null){return g_pet_types[a.type]}},sortFunc:function(d,c,e){return strcmp(g_pet_types[d.type],g_pet_types[c.type])}}],getItemLink:function(a){return"/?pet="+a.id},getStatPct:function(b){var a=ce("span");if(!isNaN(b)&&b>0){a.className="q2";ae(a,ct("+"+b+"%"))}else{if(!isNaN(b)&&b<0){a.className="q10";ae(a,ct(b+"%"))}}return a}},achievement:{sort:[1,2],nItemsPerPage:100,searchable:1,filtrable:1,columns:[{id:"name",name:LANG.name,type:"text",align:"left",value:"name",span:2,compute:function(c,j,g){var b=null;if(c.who&&c.completed){b="who="+c.who+"&when="+c.completed.getTime()}var f=ce("td");f.style.width="1px";f.style.padding="0";f.style.borderRight="none";ae(f,g_achievements.createIcon(c.id,1));Icon.getLink(f.firstChild).rel=b;ae(g,f);j.style.borderLeft="none";var e=ce("a");e.style.fontFamily="Verdana, sans-serif";e.href=this.template.getItemLink(c);e.rel=b;ae(e,ct(c.name));ae(j,e);if(c.description!=null){var h=ce("div");h.className="small";ae(h,ct(c.description));ae(j,h)}},getVisibleText:function(a){var b=a.name;if(a.description){b+=" "+a.description}return b}},{id:"side",name:LANG.side,type:"text",compute:function(a,c){if(a.side&&a.side!=3){var b=ce("span");b.className=(a.side==1?"alliance-icon":"horde-icon");b.onmouseover=function(d){Tooltip.showAtCursor(d,g_sides[a.side],0,0,"q")};b.onmousemove=Tooltip.cursorUpdate;b.onmouseout=Tooltip.hide;ae(c,b)}},getVisibleText:function(a){if(a.side){return g_sides[a.side]}},sortFunc:function(d,c,e){return strcmp(g_sides[d.side],g_sides[c.side])}},{id:"points",name:LANG.points,type:"number",width:"10%",value:"points",compute:function(a,b){if(a.points){Listview.funcBox.appendMoney(b,0,null,0,0,0,a.points)}}},{id:"rewards",name:LANG.rewards,type:"text",width:"20%",compute:function(h,d){if(h.rewards){var c=[];var b=[];var f=[];for(var e=0;e<h.rewards.length;e++){if(h.rewards[e][0]==11){f.push(h.rewards[e][1])}else{if(h.rewards[e][0]==3){c.push(h.rewards[e][1])}else{if(h.rewards[e][0]==6){b.push(h.rewards[e][1])}}}}if(c.length>0){for(var e=0;e<c.length;e++){if(!g_items[c[e]]){return}var l=g_items[c[e]];var j=ce("a");j.href="/?item="+c[e];j.className="q"+l.quality+" icontiny";j.style.backgroundImage="url(http://static.wowhead.com/images/icons/tiny/"+l.icon.toLowerCase()+".gif)";ae(j,ct(l["name_"+g_locale.name]));var k=ce("span");ae(k,j);ae(d,k);ae(d,ce("br"))}}if(b.length>0){for(var e=0;e<b.length;e++){if(!g_spells[b[e]]){return}var l=g_spells[b[e]];var j=ce("a");j.href="/?spell="+b[e];j.className="q8 icontiny";j.style.backgroundImage="url(http://static.wowhead.com/images/icons/tiny/"+l.icon.toLowerCase()+".gif)";ae(j,ct(l["name_"+g_locale.name]));var k=ce("span");ae(k,j);ae(d,k);ae(d,ce("br"))}}if(f.length>0){for(var e=0;e<f.length;e++){if(!g_titles[f[e]]){return}var g=g_titles[f[e]]["name_"+g_locale.name];g=g.replace("%s",'<span class="q0">&lt;'+LANG.name+"&gt;</span>");var k=ce("span");k.className="q1";k.innerHTML=g;ae(d,k);ae(d,ce("br"))}}}else{if(h.reward){var k=ce("span");k.className="q1";ae(k,ct(h.reward));ae(d,k)}}},getVisibleText:function(a){var c="";if(a.rewards){for(var b=0;b<a.rewards.length;b++){if(a.rewards[b][0]==11){c+=" "+g_titles[a.rewards[b][1]]["name_"+g_locale.name].replace("%s","<"+LANG.name+">")}else{if(a.rewards[b][0]==3){c+=" "+g_items[a.rewards[b][1]]["name_"+g_locale.name]}else{if(a.rewards[b][0]==6){c+=" "+g_spells[a.rewards[b][1]]["name_"+g_locale.name]}}}}}else{if(a.reward){c+=" "+a.reward}}return c}},{id:"category",name:LANG.category,type:"text",width:"15%",compute:function(c,e){e.className="small";if(in_array([14808,14821,14822,14823,14861,14862,14863,14864,14865,14866],c.category)!=-1&&c.parentcat!=-1){var b=ce("a");b.className="q0";b.href="/?achievements="+c.parentcat;ae(b,ct(g_achievement_categories[c.parentcat]));ae(e,b);ae(e,ce("br"))}var d=ce("a");d.className="q1";d.href="/?achievements="+c.category;ae(d,ct(g_achievement_categories[c.category]));ae(e,d)},getVisibleText:function(a){return g_achievement_categories[a.category]},sortFunc:function(d,c,e){return strcmp(g_achievement_categories[d.category],g_achievement_categories[c.category])},hidden:true}],getItemLink:function(a){return"/?achievement="+a.id}},title:{sort:[1],nItemsPerPage:-1,searchable:1,filtrable:1,clickable:0,columns:[{id:"name",name:LANG.name,type:"text",align:"left",value:"name",compute:function(e,g,d){var c=ce("span"),f=ce("span"),b=ct(str_replace(e.name,"%s",""));g.style.whiteSpace="nowrap";g.style.fontFamily="Verdana, sans-serif";if(e.who){ae(f,ct(e.who))}else{ae(f,ct("<"+LANG.name+">"));f.className="q0"}if(e.name.indexOf("%s")>0){ae(c,b);ae(c,f)}else{if(e.name.indexOf("%s")==0){ae(c,f);ae(c,b)}}if(e.expansion){var a=ce("span");a.className=(e.expansion==1?"bc-icon":"wotlk-icon");ae(a,c);ae(g,a)}else{ae(g,c)}},sortFunc:function(d,c,e){return strcmp(d.sort,c.sort)},getVisibleText:function(a){var b=a.name;if(a.expansion==1){b+=" bc"}else{if(a.expansion==2){b+="wotlk wrath"}}return b}},{id:"side",name:LANG.side,type:"text",compute:function(a,c){if(a.side&&a.side!=3){var b=ce("span");b.className=(a.side==1?"alliance-icon":"horde-icon");b.onmouseover=function(d){Tooltip.showAtCursor(d,g_sides[a.side],0,0,"q")};b.onmousemove=Tooltip.cursorUpdate;b.onmouseout=Tooltip.hide;ae(c,b)}},getVisibleText:function(a){if(a.side){return g_sides[a.side]}},sortFunc:function(d,c,e){return strcmp(g_sides[d.side],g_sides[c.side])}},{id:"source",name:LANG.source,type:"text",width:"50%",compute:function(o,c){var l={achievements:g_achievements,quests:g_quests},e=0;for(var g in l){var h=l[g],b=o[g];if(!h||!b||(b.length==1&&!b[0])){continue}b.sort(function(j,i){return h[j]&&h[i]?h[j].side-h[i].side:j|i});for(var f=0,d=b.length;f<d;++f){if(h[b[f]]&&(!o.faction||!h[b[f]].side||(h[b[f]].side&o.faction))){if(e++>0){ae(c,ct(" / "))}var n=ce("a");n.className="q1";n.href="/?"+g.slice(0,-1)+"="+b[f];switch(g){case"achievements":if(h[b[f]].side!=3){n.className+=(h[b[f]].side==1?" alliance-icon":" horde-icon")}break;case"quests":n.className+=" icontiny";n.style.backgroundImage="url(http://static.wowhead.com/images/icons/tiny/quest_start.gif)";break}ae(n,ct(h[b[f]]["name_"+g_locale.name]||h[b[f]].name));ae(c,n)}}}for(var g=0,m=o.pvp.length;g<m;++g){if(o.pvp[g]){if(e++>0){ae(c,ct(" / "))}ae(c,ct(o.pvp[g]))}}},getVisibleText:function(l){var g={achievements:g_achievements,quests:g_quests},m="",c=0;for(var e in g){var f=g[e],a=l[e];if(!f||!a){continue}for(var d=0,b=a.length;d<b;++d){if(f[a[d]]){if(c++>0){m+=" "}m+=(f[a[d]]["name_"+g_locale.name]||f[a[d]].name)}}}for(var e=0,h=l.pvp.length;e<h;++e){if(l.pvp[e]){if(c++>0){m+=" "}m+=l.pvp[e]}}return m},sortFunc:function(d,c,e){return strcmp(this.getVisibleText(d),this.getVisibleText(c))}},{id:"category",name:LANG.category,type:"text",width:"15%",compute:function(c,d){d.className="small q1";var b=ce("a");b.href="/?titles="+c.category;ae(b,ct(g_title_categories[c.category]));ae(d,b)},getVisibleText:function(a){return g_title_categories[a.category]},sortFunc:function(d,c,e){return strcmp(g_title_categories[d.category],g_title_categories[c.category])},hidden:true}]},profile:{sort:[],nItemsPerPage:50,searchable:1,filtrable:1,columns:[{id:"name",name:LANG.name,value:"name",type:"text",align:"left",span:2,compute:function(f,c,h){if(f.level){var e=ce("td");e.style.width="1px";e.style.padding="0";e.style.borderRight="none";ae(e,Icon.create(f.icon?f.icon:"chr_"+g_file_races[f.race]+"_"+g_file_genders[f.gender]+"_"+g_file_classes[f.classs]+"0"+(f.level>59?(Math.floor((f.level-60)/10)+2):1),1,null,this.template.getItemLink(f)));ae(h,e);c.style.borderLeft="none"}else{c.colSpan=2}var b=ce("div");b.style.position="relative";var k=ce("a");k.style.fontFamily="Verdana, sans-serif";k.href=this.template.getItemLink(f);ae(k,ct(f.name));ae(b,k);var g=ce("div");g.className="small";g.style.marginRight="20px";if(f.guild){var k=ce("a");k.className="q1";k.href="/?profiles="+f.region+"."+f.realm+"&filter=cr=9;crs=0;crv="+str_replace(urlencode(f.guild),"%20","+")+"&roster=1";ae(k,ct(f.guild));ae(g,ct("<"));ae(g,k);ae(g,ct(">"))}else{if(f.description){ae(g,ct(f.description))}}var l=ce("span"),j="";l.className="q10";if(f.deleted){j=LANG.lvcomment_deleted}ae(l,ct(j));ae(g,l);ae(b,g);var g=ce("div");g.className="small";g.style.fontStyle="italic";g.style.position="absolute";g.style.right="3px";g.style.bottom="0px";h.__status=g;if(f.published===0){ae(g,ct(LANG.privateprofile))}ae(b,g);ae(c,b)},getVisibleText:function(a){var b=a.name;if(a.guild){b+=" "+a.guild}return b}},{id:"faction",name:LANG.faction,type:"text",compute:function(a,f){if(!a.size&&!a.members&&!a.level){return}var e=ce("div"),c=ce("div"),b;b=Icon.create("faction_"+g_file_factions[a.faction+1],0);b.onmouseover=function(d){Tooltip.showAtCursor(d,g_sides[a.faction+1],0,0,"q")};b.onmousemove=Tooltip.cursorUpdate;b.onmouseout=Tooltip.hide;b.style.cssFloat=b.style.syleFloat="left";e.style.margin="0 auto";e.style.textAlign="left";e.style.width="26px";c.className="clear";ae(e,b);ae(f,e);ae(f,c)},getVisibleText:function(a){return g_sides[a.faction+1]},sortFunc:function(d,c,e){return strcmp(this.getVisibleText(d),this.getVisibleText(c))}},{id:"members",name:LANG.members,value:"members",hidden:1},{id:"size",name:"Size",value:"size",hidden:1},{id:"rank",name:"Rank",value:"rank",hidden:1},{id:"race",name:LANG.race,type:"text",compute:function(a,f){if(a.race){var e=ce("div"),c=ce("div"),b;b=Icon.create("race_"+g_file_races[a.race]+"_"+g_file_genders[a.gender],0);b.onmouseover=function(d){Tooltip.showAtCursor(d,g_chr_races[a.race],0,0,"q")};b.onmousemove=Tooltip.cursorUpdate;b.onmouseout=Tooltip.hide;b.style.cssFloat=b.style.syleFloat="left";e.style.margin="0 auto";e.style.textAlign="left";e.style.width="26px";c.className="clear";ae(e,b);ae(f,e);ae(f,c)}},getVisibleText:function(a){return g_file_genders[a.gender]+" "+g_chr_races[a.race]},sortFunc:function(d,c,e){return strcmp(g_chr_races[d.race],g_chr_races[c.race])},hidden:1},{id:"classs",name:LANG.classs,type:"text",compute:function(a,f){if(a.classs){var e=ce("div"),c=ce("div"),b;b=Icon.create("class_"+g_file_classes[a.classs],0);b.onmouseover=function(d){Tooltip.showAtCursor(d,g_chr_classes[a.classs],0,0,"q")};b.onmousemove=Tooltip.cursorUpdate;b.onmouseout=Tooltip.hide;b.style.cssFloat=b.style.syleFloat="left";e.style.margin="0 auto";e.style.textAlign="left";e.style.width="26px";c.className="clear";ae(e,b);ae(f,e);ae(f,c)}else{return -1}},getVisibleText:function(a){if(a.classs){return g_chr_classes[a.classs]}},sortFunc:function(d,c,e){return strcmp(this.getVisibleText(d),this.getVisibleText(c))},hidden:1},{id:"level",name:LANG.level,value:"level",hidden:1},{id:"talents",name:LANG.talents,type:"text",compute:function(e,j){if(!e.level){return}var i=[e.talenttree1,e.talenttree2,e.talenttree3],f=pr_getSpecFromTalents(e.classs,i),c,g,b=ce("a");var h=ce("div");h.style.width="82px";h.style.height="23px";h.style.margin="0 auto";h.style.lineHeight="23px";h.style.backgroundImage="url("+f.icon+")";h.style.backgroundRepeat="no-repeat";h.style.backgroundPosition="left";var b=ce("a");b.className="small q1";b.style.padding="7px 0 7px 28px";b.style.fontWeight="bold";b.rel="np";b.href=this.template.getItemLink(e)+"#talents";b.onmouseover=function(a){Tooltip.showAtCursor(a,f.name,0,0,"q")};b.onmousemove=Tooltip.cursorUpdate;b.onmouseout=Tooltip.hide;ae(b,ct(e.talenttree1+" / "+e.talenttree2+" / "+e.talenttree3));ae(h,b);ae(j,h)},getVisibleText:function(a){if(a.talenttree1||a.talenttree2||a.talenttree3){if(a.talentspec>0){return g_chr_specs[a.classs][a.talentspec-1]}else{return g_chr_specs[0]}}else{return g_chr_specs["-1"]}},sortFunc:function(d,c,e){return strcmp(this.getVisibleText(d),this.getVisibleText(c))},hidden:1},{id:"gearscore",name:LANG.gearscore,value:"gearscore",compute:function(a,c){var b=(a.level?a.level:(a.members?80:0));if(isNaN(a.gearscore)||!b){return}c.className="q"+pr_getGearScoreQuality(b,a.gearscore,(in_array([2,6,7,11],a.classs)!=-1));return(a.gearscore?number_format(a.gearscore):0)},hidden:1},{id:"achievementpoints",name:LANG.points,value:"achievementpoints",compute:function(a,b){if(a.achievementpoints){Listview.funcBox.appendMoney(b,0,null,0,0,0,a.achievementpoints)}},hidden:1},{id:"wins",name:LANG.wins,value:"wins",hidden:1},{id:"losses",name:LANG.losses,compute:function(a,b){return a.games-a.wins},hidden:1},{id:"guildrank",name:LANG.guildrank,value:"guildrank",compute:function(c,d){if(c.guildrank>0){return sprintf(LANG.rankno,c.guildrank)}else{if(c.guildrank==0){var a=ce("b");ae(a,ct(LANG.guildleader));ae(d,a)}}},getVisibleText:function(a){if(a.guildrank>0){return sprintf(LANG.rankno,a.guildrank)}else{if(a.guildrank==0){return LANG.guildleader}}},sortFunc:function(d,c,e){return strcmp((d.guildrank>=0?d.guildrank:11),(c.guildrank>=0?c.guildrank:11))},hidden:1},{id:"rating",name:LANG.rating,value:"rating",compute:function(a,b){if(a.roster&&a.arenateam[a.roster]){return a.arenateam[a.roster].rating}return a.rating},sortFunc:function(d,c,e){if(d.roster&&d.arenateam[d.roster]&&c.roster&&c.arenateam[c.roster]){return strcmp(d.arenateam[d.roster].rating,c.arenateam[c.roster].rating)}return strcmp(d.rating,c.rating)},hidden:1},{id:"location",name:LANG.location,type:"text",compute:function(c,e){var b;if(c.region){if(c.realm){b=ce("a");b.className="q1";b.href="/?profiles="+c.region+"."+c.realm;ae(b,ct(c.realmname));ae(e,b);ae(e,ce("br"))}var d=ce("small");b=ce("a");b.className="q1";b.href="/?profiles="+c.region;ae(b,ct(c.region.toUpperCase()));ae(d,b);if(c.battlegroup){ae(d,ct(LANG.hyphen));b=ce("a");b.className="q1";b.href="/?profiles="+c.region+"."+c.battlegroup;ae(b,ct(c.battlegroupname));ae(d,b)}ae(e,d)}},getVisibleText:function(a){var b="";if(a.region){b+=" "+a.region}if(a.battlegroup){b+=" "+a.battlegroup}if(a.realm){b+=" "+a.realm}return trim(b)},sortFunc:function(d,c,e){if(d.region!=c.region){return strcmp(d.region,c.region)}if(d.battlegroup!=c.battlegroup){return strcmp(d.battlegroup,c.battlegroup)}return strcmp(d.realm,c.realm)}},{id:"guild",name:LANG.guild,value:"guild",type:"text",compute:function(c,d){if(!c.region||!c.battlegroup||!c.realm||!c.guild){return}var b=ce("a");b.className="q1";b.href="/?profiles="+c.region+"."+c.realm+"&filter=cr=9;crs=0;crv="+str_replace(urlencode(c.guild),"%20","+")+"&roster=1";ae(b,ct(c.guild));ae(d,b)}}],getItemLink:function(a){if(a.size){return"/?profiles="+a.region+"."+a.realm+"&filter=cr="+(a.size==2?12:(a.size==3?15:18))+";crs=0;crv="+str_replace(urlencode(a.name),"%20","+")+"&roster="+(a.size==5?4:a.size)}else{if(a.members){return"/?profiles="+a.region+"."+a.realm+"&filter=cr=9;crs=0;crv="+str_replace(urlencode(a.name),"%20","+")+"&roster=1"}else{if(a.region&&a.realm){return"/?profile="+a.region+"."+a.realm+"."+g_cleanCharacterName(a.name)}else{return"/?profile="+a.id}}}}},model:{sort:[],mode:3,nItemsPerPage:40,nItemsPerRow:4,poundable:2,columns:[],compute:function(e,k,f){k.className="screenshot-cell";k.vAlign="bottom";var b=ce("a");b.href="javascript:;";b.onclick=this.template.modelShow.bind(this.template,e.npcId,e.displayId);var c=ce("img");c.src="http://static.wowhead.com/modelviewer/thumbs/npc/"+e.displayId+".png";ae(b,c);ae(k,b);var j=ce("div");j.className="screenshot-cell-user";b=ce("a");b.href="/?npcs=1&filter="+(e.family?"fa="+e.family+";":"")+"minle=1;cr=35;crs=0;crv="+e.skin;ae(b,ct(e.skin));ae(j,b);ae(j,ct(" ("+e.count+")"));ae(k,j);j=ce("div");j.style.position="relative";j.style.height="1em";var h=ce("div");h.className="screenshot-caption";var g=ce("small");ae(g,ct(LANG.level+": "));ae(g,ct(e.minLevel+(e.minLevel==e.maxLevel?"":LANG.hyphen+(e.maxLevel==9999?"??":e.maxLevel))));ae(g,ce("br"));ae(h,g);ae(j,h);ae(k,j);aE(k,"click",this.template.modelShow.bind(this.template,e.npcId,e.displayId,true))},modelShow:function(d,b,f,g){if(f){g=$E(g);if(g.shiftKey||g.ctrlKey){return}var a=0,c=g._target;while(c&&a<3){if(c.nodeName=="A"){return}if(c.nodeName=="IMG"){break}c=c.parentNode}}ModelViewer.show({type:1,typeId:d,displayId:b,noPound:1})}}};Menu.fixUrls(mn_items,"/?items=");Menu.fixUrls(mn_itemSets,"/?itemsets&filter=cl=","#0-2+1");Menu.fixUrls(mn_npcs,"/?npcs=");Menu.fixUrls(mn_objects,"/?objects=");Menu.fixUrls(mn_quests,"/?quests=");Menu.fixUrls(mn_spells,"/?spells=");Menu.fixUrls(mn_zones,"/?zones=");Menu.fixUrls(mn_pets,"/?pets=");Menu.fixUrls(mn_factions,"/?factions=");Menu.fixUrls(mn_achievements,"/?achievements=",null,true);Menu.fixUrls(mn_titles,"/?titles=",null,true);Menu.fixUrls(mn_petCalc,"/?petcalc=");Menu.fixUrls(mn_forums,"/?forums&board=",null,true);var g_dev=false;var g_locale={id:0,name:"enus"};var g_localTime=new Date();var g_user={id:0,name:"",roles:0};var g_npcs={};var g_objects={};var g_items={};var g_itemsets={};var g_quests={};var g_spells={};var g_gatheredzones={};var g_factions={};var g_pets={};var g_achievements={};var g_titles={};var g_users={};var g_types={1:"npc",2:"object",3:"item",4:"itemset",5:"quest",6:"spell",7:"zone",8:"faction",9:"pet",10:"achievement",11:"title",12:"event"};var g_locales={0:"enus",2:"frfr",3:"dede",6:"eses",7:"ruru",25:"ptr"};var g_file_races={10:"bloodelf",11:"draenei",3:"dwarf",7:"gnome",1:"human",4:"nightelf",2:"orc",6:"tauren",8:"troll",5:"scourge"};var g_file_classes={6:"deathknight",11:"druid",3:"hunter",8:"mage",2:"paladin",5:"priest",4:"rogue",7:"shaman",9:"warlock",1:"warrior"};var g_file_genders={0:"male",1:"female"};var g_file_factions={1:"alliance",2:"horde"};var g_file_gems={1:"meta",2:"red",4:"yellow",6:"orange",8:"blue",10:"purple",12:"green",14:"prismatic"};var g_customColors={Miyari:"pink"};g_items.add=function(b,a){if(g_items[b]!=null){cO(g_items[b],a)}else{g_items[b]=a}};g_items.getIcon=function(a){if(g_items[a]!=null&&g_items[a].icon){return g_items[a].icon}else{return"inv_misc_questionmark"}};g_items.createIcon=function(d,b,a,c){return Icon.create(g_items.getIcon(d),b,null,"/?item="+d,a,c)};g_spells.add=function(b,a){if(g_spells[b]!=null){cO(g_spells[b],a)}else{g_spells[b]=a}};g_spells.getIcon=function(a){if(g_spells[a]!=null&&g_spells[a].icon){return g_spells[a].icon}else{return"inv_misc_questionmark"}};g_spells.createIcon=function(d,b,a,c){return Icon.create(g_spells.getIcon(d),b,null,"/?spell="+d,a,c)};g_achievements.getIcon=function(a){if(g_achievements[a]!=null&&g_achievements[a].icon){return g_achievements[a].icon}else{return"inv_misc_questionmark"}};g_achievements.createIcon=function(d,b,a,c){return Icon.create(g_achievements.getIcon(d),b,null,"/?achievement="+d,a,c)};var LiveSearch=new function(){var currentTextbox,lastSearch={},lastDiv,timer,prepared,container,cancelNext,hasData,summary,selection,LIVESEARCH_DELAY=500;function setText(textbox,txt){textbox.value=txt;textbox.selectionStart=textbox.selectionEnd=txt.length}function colorDiv(div,fromOver){if(lastDiv){lastDiv.className=lastDiv.className.replace("live-search-selected","")}lastDiv=div;lastDiv.className+=" live-search-selected";selection=div.i;if(!fromOver){show();setTimeout(setText.bind(0,currentTextbox,g_getTextContent(div.firstChild.firstChild.childNodes[1])),1);cancelNext=1}}function aOver(){colorDiv(this.parentNode.parentNode,1)}function isVisible(){if(!container){return false}return container.style.display!="none"}function adjust(fromResize){if(fromResize==1&&!isVisible()){return}if(currentTextbox==null){return}var c=ac(currentTextbox);container.style.left=(c[0]-2)+"px";container.style.top=(c[1]+currentTextbox.offsetHeight+1)+"px";container.style.width=currentTextbox.offsetWidth+"px"}function prepare(){if(prepared){return}prepared=1;container=ce("div");container.className="live-search";container.style.display="none";ae(ge("layers"),container);aE(window,"resize",adjust.bind(0,1));aE(document,"click",hide)}function show(){if(container&&!isVisible()){adjust();container.style.display=""}}function hide(){if(container){container.style.display="none"}}function highlight(match){return"<b><u>"+match+"</u></b>"}function display(textbox,search,suggz,dataz){prepare();show();lastA=null;hasData=1;selection=null;while(container.firstChild){de(container.firstChild)}if(!Browser.ie6){ae(container,ce("em"));ae(container,ce("var"));ae(container,ce("strong"))}search=search.replace(/[^a-z0-9\-]/gi," ");search=trim(search.replace(/\s+/g," "));var regex=g_createOrRegex(search);for(var i=0,len=suggz.length;i<len;++i){var pos=suggz[i].lastIndexOf("(");if(pos!=-1){suggz[i]=suggz[i].substr(0,pos-1)}var type=dataz[i][0],typeId=dataz[i][1],param1=dataz[i][2],param2=dataz[i][3],a=ce("a"),sp=ce("i"),sp2=ce("span"),div=ce("div"),div2=ce("div");div.i=i;a.onmouseover=aOver;a.href="/?"+g_types[type]+"="+typeId;if(textbox._append){a.rel+=textbox._append}if(type==3&&param2!=null){a.className+=" q"+param2}else{if(type==4&&param1!=null){a.className+=" q"+param1}}if((type==3||type==6||type==9||type==10)&&param1){div.className+=" live-search-icon";div.style.backgroundImage="url(http://static.wowhead.com/images/icons/small/"+param1.toLowerCase()+".jpg)"}else{if(type==5&&param1>=1&&param1<=2){div.className+=" live-search-icon-quest-"+(param1==1?"alliance":"horde")}}ae(sp,ct(LANG.types[type][0]));ae(a,sp);var buffer=suggz[i];buffer=buffer.replace(regex,highlight);sp2.innerHTML=buffer;ae(a,sp2);if(type==6&&param2){ae(a,ct(" ("+param2+")"))}ae(div2,a);ae(div,div2);ae(container,div)}}function receive(xhr,opt){var text=xhr.responseText;if(text.charAt(0)!="["||text.charAt(text.length-1)!="]"){return}var a=eval(text);var search=a[0];if(search==opt.search){if(a.length==8){display(opt.textbox,search,a[1],a[7])}else{hide()}}}function fetch(textbox,search){var url="/?search="+urlencode(search);if(textbox._type){url+="&json&type="+textbox._type}else{url+="&opensearch"}new Ajax(url,{onSuccess:receive,textbox:textbox,search:search})}function preFetch(textbox,search){if(cancelNext){cancelNext=0;return}hasData=0;if(timer>0){clearTimeout(timer);timer=0}timer=setTimeout(fetch.bind(0,textbox,search),LIVESEARCH_DELAY)}function cycle(dir){if(!isVisible()){if(hasData){show()}return}var firstNode=(container.childNodes[0].nodeName=="EM"?container.childNodes[3]:container.firstChild);var bakDiv=dir?firstNode:container.lastChild;if(lastDiv==null){colorDiv(bakDiv)}else{var div=dir?lastDiv.nextSibling:lastDiv.previousSibling;if(div){if(div.nodeName=="STRONG"){div=container.lastChild}colorDiv(div)}else{colorDiv(bakDiv)}}}function onKeyUp(e){e=$E(e);var textbox=e._target;switch(e.keyCode){case 48:case 96:case 107:case 109:if(Browser.gecko&&e.ctrlKey){adjust(textbox);break}break}var search=trim(textbox.value.replace(/\s+/g," "));if(search==lastSearch[textbox.id]){return}lastSearch[textbox.id]=search;if(search.length){preFetch(textbox,search)}else{hide()}}function onKeyDown(e){e=$E(e);var textbox=e._target;switch(e.keyCode){case 27:hide();break;case 38:cycle(0);break;case 40:cycle(1);break}}function onFocus(e){e=$E(e);var textbox=e._target;if(textbox!=document){currentTextbox=textbox}}this.attach=function(textbox){if(textbox.getAttribute("autocomplete")=="off"){return}textbox.setAttribute("autocomplete","off");aE(textbox,"focus",onFocus);aE(textbox,"keyup",onKeyUp);aE(textbox,Browser.opera?"keypress":"keydown",onKeyDown)};this.reset=function(textbox){lastSearch[textbox.id]=null;textbox.value="";hasData=0;hide()};this.hide=function(){hide()}};var Lightbox=new function(){var d,m,n,h={},c={},i,f;function o(){aE(d,"click",e);aE(document,Browser.opera?"keypress":"keydown",g);aE(window,"resize",a);if(Browser.ie6){aE(window,"scroll",j)}}function l(){dE(d,"click",e);dE(document,Browser.opera?"keypress":"keydown",g);dE(window,"resize",a);if(Browser.ie6){dE(window,"scroll",j)}}function b(){if(i){return}i=1;var p=ge("layers");d=ce("div");d.className="lightbox-overlay";m=ce("div");m.className="lightbox-outer";n=ce("div");n.className="lightbox-inner";d.style.display=m.style.display="none";ae(p,d);ae(m,n);ae(p,m)}function g(p){p=$E(p);switch(p.keyCode){case 27:e();break}}function a(p){if(p!=1234){if(c.onResize){c.onResize()}}d.style.height=document.body.offsetHeight+"px";if(Browser.ie6){j()}}function j(){var q=g_getScroll().y,p=g_getWindowSize().h;m.style.top=(q+p/2)+"px"}function e(){l();if(c.onHide){c.onHide()}d.style.display=m.style.display="none";Ads.restoreHidden();g_enableScroll(true)}function k(){d.style.display=m.style.display=h[f].style.display=""}this.setSize=function(p,q){n.style.visibility="hidden";n.style.width=p+"px";n.style.height=q+"px";n.style.left=-parseInt(p/2)+"px";n.style.top=-parseInt(q/2)+"px";n.style.visibility="visible"};this.show=function(u,t,p){c=t||{};Ads.hideAll();b();o();if(f!=u&&h[f]!=null){h[f].style.display="none"}f=u;var r=0,q;if(h[u]==null){r=1;q=ce("div");ae(n,q);h[u]=q}else{q=h[u]}if(c.onShow){c.onShow(q,r,p)}a(1234);k();g_enableScroll(false)};this.reveal=function(){k()};this.hide=function(){e()};this.isVisible=function(){return(d&&d.style.display!="none")}};var ModelViewer=new function(){this.validSlots=[1,3,4,5,6,7,8,9,10,13,14,15,16,17,19,20,21,22,23,25,26];this.slotMap={1:1,3:3,4:4,5:5,6:6,7:7,8:8,9:9,10:10,13:21,14:22,15:22,16:16,17:21,19:19,20:5,21:21,22:22,23:22,25:21,26:21};var d,y,A=[],h,v,n,x,g,p,q,e,m,t,l,o=[{id:10,name:g_chr_races[10],model:"bloodelf"},{id:11,name:g_chr_races[11],model:"draenei"},{id:3,name:g_chr_races[3],model:"dwarf"},{id:7,name:g_chr_races[7],model:"gnome"},{id:1,name:g_chr_races[1],model:"human"},{id:4,name:g_chr_races[4],model:"nightelf"},{id:2,name:g_chr_races[2],model:"orc"},{id:6,name:g_chr_races[6],model:"tauren"},{id:8,name:g_chr_races[8],model:"troll"},{id:5,name:g_chr_races[5],model:"scourge"}],i=[{id:0,name:LANG.male,model:"male"},{id:1,name:LANG.female,model:"female"}];function w(){v.style.display="none";n.style.display="none";x.style.display="none"}function a(){var B,C;if(p.style.display==""){B=(p.selectedIndex>=0?p.options[p.selectedIndex].value:"")}else{B=(q.selectedIndex>=0?q.options[q.selectedIndex].value:"")}C=(e.selectedIndex>=0?e.options[e.selectedIndex].value:0);return{r:B,s:C}}function c(B,C){return(!isNaN(B)&&B>0&&in_array(o,B,function(D){return D.id})!=-1&&!isNaN(C)&&C>=0&&C<=1)}function u(){if(t==2&&!f()){t=0}if(t==2){var E='<object id="3dviewer-plugin" type="application/x-zam-wowmodel" width="600" height="400"><param name="model" value="'+d+'" /><param name="modelType" value="'+y+'" /><param name="contentPath" value="http://static.wowhead.com/modelviewer/" />';if(y==16&&A.length){E+='<param name="equipList" value="'+A.join(",")+'" />'}E+='<param name="bgColor" value="#181818" /></object>';x.innerHTML=E;x.style.display=""}else{if(t==1){var E='<applet id="3dviewer-java" code="org.jdesktop.applet.util.JNLPAppletLauncher" width="600" height="400" archive="http://static.wowhead.com/modelviewer/applet-launcher.jar,http://download.java.net/media/jogl/builds/archive/jsr-231-webstart-current/jogl.jar,http://download.java.net/media/gluegen/webstart/gluegen-rt.jar,http://download.java.net/media/java3d/webstart/release/vecmath/latest/vecmath.jar,http://static.wowhead.com/modelviewer/ModelView510.jar"><param name="jnlp_href" value="http://static.wowhead.com/modelviewer/ModelView.jnlp"><param name="codebase_lookup" value="false"><param name="cache_option" value="no"><param name="subapplet.classname" value="modelview.ModelViewerApplet"><param name="subapplet.displayname" value="Model Viewer Applet"><param name="progressbar" value="true"><param name="jnlpNumExtensions" value="1"><param name="jnlpExtension1" value="http://download.java.net/media/jogl/builds/archive/jsr-231-webstart-current/jogl.jnlp"><param name="contentPath" value="http://static.wowhead.com/modelviewer/"><param name="model" value="'+d+'"><param name="modelType" value="'+y+'">';if(y==16&&A.length){E+='<param name="equipList" value="'+A.join(",")+'">'}E+='<param name="bgColor" value="#181818"></applet>';n.innerHTML=E;n.style.display=""}else{var H={model:d,modelType:y,contentPath:"http://static.wowhead.com/modelviewer/",blur:(OS.mac?"0":"1")};var G={quality:"high",allowscriptaccess:"always",menu:false,bgcolor:"#181818"};var B={};if(y==16&&A.length){H.equipList=A.join(",")}swfobject.embedSWF("http://static.wowhead.com/modelviewer/ModelView.swf","dsjkgbdsg2346","600","400","10.0.0","http://static.wowhead.com/modelviewer/expressInstall.swf",H,G,B);v.style.display=""}}var I=a(),D=I.r,F=I.s;if(!h.noPound){var C="#modelviewer";var I=ge("dsgndslgn464d");if(!I){switch(h.type){case 1:C+=":1:"+h.displayId+":"+(h.humanoid|0);break;case 2:C+=":2:"+h.displayId;break;case 3:C+=":3:"+h.displayId+":"+(h.slot|0);break;case 4:C+=":4:"+A.join(";");break}}if(D&&F){C+=":"+D+"+"+F}else{C+=":"}if(h.extraPound!=null){C+=":"+h.extraPound}location.replace(rtrim(C,":"))}}function b(){var F=a(),C=F.r,D=F.s;if(!C){if(e.style.display=="none"){return}e.style.display="none";d=A[1];switch(h.slot){case 1:y=2;break;case 3:y=4;break;default:y=1}}else{if(e.style.display=="none"){e.style.display=""}var F=function(G){return G.id};var E=in_array(o,C,F);var B=in_array(i,D,F);if(E!=-1&&B!=-1){d=o[E].model+i[B].model;y=16}}w();u()}function j(B){if(B==t){return}g_setSelectedLink(this,"modelviewer-mode");w();if(t==null){t=B;setTimeout(u,50)}else{t=B;sc("modelviewer_mode",7,B,"/",".wowhead.com");u()}}function r(G,B){var I=-1,J=-1,C,F;if(B.race!=null&&B.sex!=null){I=B.race;J=B.sex;g.style.display="none";G=0}else{g.style.display=""}if(I==-1&&J==-1){if(location.hash){var H=location.hash.match(/modelviewer:.*?([0-9]+)\+([0-9]+)/);if(H!=null){if(c(H[1],H[2])){I=H[1];J=H[2];e.style.display=""}}}}if(G){C=p;F=1;p.style.display="";p.selectedIndex=-1;q.style.display="none";if(J==-1){e.style.display="none"}}else{if(I==-1&&J==-1){var M=(g_user&&g_user.settings?g_user.settings.modelrace:1),E=(g_user&&g_user.settings?g_user.settings.modelgender-1:0);if(c(M,E)){I=M;J=E}else{I=1;J=0}}C=q;F=0;p.style.display="none";q.style.display="";e.style.display=""}if(J!=-1){e.selectedIndex=J}if(I!=-1&&J!=-1){var L=function(N){return N.id};var K=in_array(o,I,L);var D=in_array(i,J,L);if(K!=-1&&D!=-1){d=o[K].model+i[D].model;y=16;K+=F;if(Browser.opera){setTimeout(function(){C.selectedIndex=K},1)}else{C.selectedIndex=K}e.selectedIndex=D}}}function f(){var C=navigator.mimeTypes["application/x-zam-wowmodel"];if(C){var B=C.enabledPlugin;if(B){return true}}return false}function k(){if(!h.noPound){if(!h.fromTag&&m&&m.indexOf("modelviewer")==-1){location.replace(m)}else{location.replace("#.")}}if(h.onHide){h.onHide()}}function z(P,J,F){var E,C;if(!F.displayAd||!g_user.ads){Lightbox.setSize(620,452)}else{Lightbox.setSize(749,546)}if(J){P.className="modelviewer";var O=ce("div");v=ce("div");n=ce("div");x=ce("div");var N=ce("div");N.id="dsjkgbdsg2346";ae(v,N);O.className="modelviewer-screen";v.style.display=n.style.display=x.style.display="none";ae(O,v);ae(O,n);ae(O,x);var L=ce("div");L.style.backgroundColor="#181818";L.style.margin="0";ae(L,O);ae(P,L);E=ce("a"),C=ce("a");E.className="modelviewer-help";E.href="/?help=modelviewer";E.target="_blank";ae(E,ce("span"));C.className="modelviewer-close";C.href="javascript:;";C.onclick=Lightbox.hide;ae(C,ce("span"));ae(P,C);ae(P,E);var M=ce("div"),D=ce("span"),E=ce("a"),C=ce("a");M.className="modelviewer-quality";E.href=C.href="javascript:;";ae(E,ct("Flash"));ae(C,ct("Java"));E.onclick=j.bind(E,0);C.onclick=j.bind(C,1);ae(D,E);ae(D,ct(" "+String.fromCharCode(160)));ae(D,C);if(f()){var B=ce("a");B.href="javascript:;";ae(B,ct("Plugin"));B.onclick=j.bind(B,2);ae(D,ct(" "+String.fromCharCode(160)));ae(D,B)}ae(M,ce("div"));ae(M,D);ae(P,M);g=ce("div");g.className="modelviewer-model";var N=function(T,S){return strcmp(T.name,S.name)};o.sort(N);p=ce("select");q=ce("select");e=ce("select");p.onchange=q.onchange=e.onchange=b;ae(p,ce("option"));for(var I=0,K=o.length;I<K;++I){var G=ce("option");G.value=o[I].id;ae(G,ct(o[I].name));ae(p,G)}for(var I=0,K=o.length;I<K;++I){var G=ce("option");G.value=o[I].id;ae(G,ct(o[I].name));ae(q,G)}for(var I=0,K=i.length;I<K;++I){var G=ce("option");G.value=i[I].id;ae(G,ct(i[I].name));ae(e,G)}e.style.display="none";ae(g,ce("div"));ae(g,p);ae(g,q);ae(g,e);ae(P,g);M=ce("div");M.className="clear";ae(P,M);M=ce("div");M.id="modelviewer-msg";M.className="sub";M.style.display="none";M.style.marginTop="-6px";M.style.color="#cccccc";M.style.fontSize="11px";ae(P,M);if(F.displayAd){M.style.paddingBottom="4px";M=ce("div");M.id="modelviewer-ad";M.style.paddingBottom="10px";ae(P,M)}}switch(F.type){case 1:g.style.display="none";if(F.humanoid){y=32}else{y=8}d=F.displayId;break;case 2:g.style.display="none";y=64;d=F.displayId;break;case 3:case 4:if(F.type==3){A=[F.slot,F.displayId]}else{A=F.equipList}if(A.length>2||in_array([4,5,6,7,8,9,10,16,19,20],A[0])!=-1){r(0,F)}else{switch(A[0]){case 1:y=2;break;case 3:y=4;break;default:y=1}d=A[1];r(1,F)}break}var R=ge("modelviewer-ad");if(J){if(gc("modelviewer_mode")=="2"&&f()){B.onclick()}else{if(gc("modelviewer_mode")=="1"){C.onclick()}else{E.onclick()}}}else{if(R){ee(R)}w();setTimeout(u,1)}if(F.displayAd&&R){Ads.fillSpot("leaderboard",R,true)}var H=ge("modelviewer-msg");if(F.message&&H){H.innerHTML=F.message;H.style.display=""}else{if(H){H.style.display="none"}}var Q="/tracker/modelviewer/";if(F.fromTag){Q+="custom/";switch(F.type){case 1:Q+="1:"+F.displayId+":"+(F.humanoid|0);break;case 2:Q+="2:"+F.displayId;break;case 3:Q+="3:"+F.displayId+":"+(F.slot|0);break;case 4:Q+="4:"+A.join(".");break}}else{switch(F.type){case 1:Q+="npc/"+(F.typeId?F.typeId:"display/"+F.displayId);break;case 2:Q+="object/"+F.typeId;break;case 3:Q+="item/"+F.typeId;break;case 4:Q+="itemset/"+F.typeId;break}}g_trackPageview(Q);m=location.hash}this.checkPound=function(){if(location.hash&&location.hash.indexOf("#modelviewer")==0){var F=location.hash.split(":");if(F.length>=3){F.shift();var D=parseInt(F.shift());var C={type:D,displayAd:1};switch(D){case 1:C.displayId=parseInt(F.shift());var B=parseInt(F.shift());if(B==1){C.humanoid=1}break;case 2:C.displayId=parseInt(F.shift());break;case 3:C.displayId=parseInt(F.shift());C.slot=parseInt(F.shift());break;case 4:var E=F.shift();C.equipList=E.split(";");break}if(C.displayId||C.equipList){ModelViewer.show(C)}if(l!=null){if(F.length>0&&F[F.length-1]){l(F[F.length-1])}}}else{if(l!=null&&F.length==2&&F[1]){l(F[1])}else{var G=ge("dsgndslgn464d");if(G){G.onclick()}}}}};this.addExtraPound=function(B){l=B};this.show=function(B){h=B;Lightbox.show("modelviewer",{onShow:z,onHide:k},B)};DomContentLoaded.addEvent(this.checkPound)};var g_screenshots={};var ScreenshotViewer=new function(){var E,m,e,C,H,c,r,u=0,y,b,q,k,A,B,x,h,z,l,o,D;function g(I){var L=E[m];var J=Math.max(50,Math.min(618,g_getWindowSize().h-72-I));if(u!=1||L.id||L.resize){c=Math.min(772/L.width,618/L.height);H=Math.min(772/L.width,J/L.height)}else{c=H=1}if(c>1){c=1}if(H>1){H=1}e=Math.round(H*L.width);C=Math.round(H*L.height);var K=Math.max(480,e);Lightbox.setSize(K+20,C+52+I);if(Browser.ie6){q.style.width=K+"px";if(E.length>1){A.style.height=B.style.height=C+"px"}else{x.style.height=C+"px"}}if(I){k.firstChild.width=e;k.firstChild.height=C}}function d(K){var J=E[K],I="#screenshots:";if(u==0){I+="id="+J.id}else{I+=y+":"+(K+1)}return I}function w(L){if(L&&(H==c)&&g_getWindowSize().h>b.offsetHeight){return}b.style.visibility="hidden";var I=E[m],O=(I.width>772||I.height>618);g(0);var K=(I.url?I.url:"http://static.wowhead.com/uploads/screenshots/"+(O?"resized/":"normal/")+I.id+".jpg");var P='<img src="'+K+'" width="'+e+'" height="'+C+'"';if(Browser.ie6){P+=' galleryimg="no"'}P+=">";k.innerHTML=P;if(!L){if(I.url){h.href=K}else{h.href="http://static.wowhead.com/uploads/screenshots/normal/"+I.id+".jpg"}if(!I.user&&typeof g_pageInfo=="object"){I.user=g_pageInfo.username}var R=(I.date&&I.user),Q=(E.length>1);if(R){var N=new Date(I.date),T=(g_serverTime-N)/1000;var S=z.firstChild.childNodes[1];S.href="/?user="+I.user;S.innerHTML=I.user;var V=z.firstChild.childNodes[3];while(V.firstChild){de(V.firstChild)}Listview.funcBox.coFormatDate(V,T,N);z.firstChild.style.display=""}else{z.firstChild.style.display="none"}var V=z.childNodes[1];if(Q){var U="";if(R){U+=LANG.dash}U+=(m+1)+LANG.lvpage_of+E.length;V.innerHTML=U;V.style.display=""}else{V.style.display="none"}z.style.display=(R||Q?"":"none");if(g_getLocale(true)!=0&&I.caption){I.caption=""}var J=(I.caption!=null&&I.caption.length);var M=(I.subject!=null&&I.subject.length&&I.type&&I.typeId);if(J||M){var P="";if(M){P+=LANG.types[I.type][0]+LANG.colon;P+='<a href="/?'+g_types[I.type]+"="+I.typeId+'">';P+=I.subject;P+="</a>"}if(J){if(M){P+=LANG.dash}P+=I.caption}l.innerHTML=P;l.style.display=""}else{l.style.display="none"}if(E.length>1){A.href=d(v(-1));B.href=d(v(1));A.style.display=B.style.display="";x.style.display="none"}else{A.style.display=B.style.display="none";x.style.display=""}location.replace(d(m))}Lightbox.reveal();if(l.offsetHeight>18){g(l.offsetHeight-18)}b.style.visibility="visible"}function v(I){var J=m;J+=I;if(J<0){J=E.length-1}else{if(J>=E.length){J=0}}return J}function a(){m=v(-1);j();return false}function t(){m=v(1);j();return false}function p(I){I=$E(I);switch(I.keyCode){case 37:a();break;case 39:t();break}}function f(){w(1)}function n(){G();if(E.length>1){dE(document,"keyup",p)}if(r&&u==0){if(r.indexOf(":id=")!=-1){r="#screenshots"}location.replace(r)}else{location.replace("#.")}}function F(I,M,J){if(typeof J.screenshots=="string"){E=g_screenshots[J.screenshots];u=1;y=J.screenshots}else{E=J.screenshots;u=0;y=null}b=I;m=0;if(J.pos&&J.pos>=0&&J.pos<E.length){m=J.pos}if(M){I.className="screenshotviewer";q=ce("div");q.className="screenshotviewer-screen";A=ce("a");B=ce("a");A.className="screenshotviewer-prev";B.className="screenshotviewer-next";A.href="javascript:;";B.href="javascript:;";var O=ce("span");ae(O,ce("b"));ae(A,O);var O=ce("span");ae(O,ce("b"));ae(B,O);A.onclick=a;B.onclick=t;x=ce("a");x.className="screenshotviewer-cover";x.href="javascript:;";x.onclick=Lightbox.hide;var O=ce("span");ae(O,ce("b"));ae(x,O);if(Browser.ie6){ns(A);ns(B);A.onmouseover=B.onmouseover=x.onmouseover=function(){this.firstChild.style.display="block"};A.onmouseout=B.onmouseout=x.onmouseout=function(){this.firstChild.style.display=""}}ae(q,A);ae(q,B);ae(q,x);k=ce("div");ae(q,k);ae(I,q);var N=ce("a");N.className="screenshotviewer-close";N.href="javascript:;";N.onclick=Lightbox.hide;ae(N,ce("span"));ae(I,N);h=ce("a");h.className="screenshotviewer-original";h.href="javascript:;";h.target="_blank";ae(h,ce("span"));ae(I,h);z=ce("div");z.className="screenshotviewer-from";var K=ce("span");ae(K,ct(LANG.lvscreenshot_from));ae(K,ce("a"));ae(K,ct(" "));ae(K,ce("span"));ae(z,K);ae(z,ce("span"));ae(I,z);l=ce("div");l.className="screenshotviewer-caption";ae(I,l);var L=ce("div");L.className="clear";ae(I,L)}r=location.hash;if(E.length>1){aE(document,"keyup",p)}j()}function j(){var J=E[m];if(!J.width||!J.height){if(o){o.onload=null;o.onerror=null}else{b.className="";D=[];while(b.firstChild){D.push(b.firstChild);de(b.firstChild)}}var I=setTimeout(function(){J.width=126;J.height=22;g(0);J.width=null;J.height=null;var L=ce("div");L.style.margin="0 auto";L.style.width="126px";var K=ce("img");K.src="http://static.wowhead.com/images/loading3.gif";K.width=126;K.height=22;ae(L,K);ae(b,L);Lightbox.reveal();b.style.visiblity="visible"},150);o=new Image();o.onload=(function(K,L){clearTimeout(L);K.width=this.width;K.height=this.height;o=null;i();w()}).bind(o,J,I);o.onerror=(function(K){clearTimeout(K);o=null;Lightbox.hide();i()}).bind(o,I);o.src=(J.url?J.url:"http://static.wowhead.com/uploads/screenshots/normal/"+J.id+".jpg")}else{w()}}function G(){if(!o){return}o.onload=null;o.onerror=null;o=null;i()}function i(){if(!D){return}ee(b);b.className="screenshotviewer";for(var I=0;I<D.length;++I){ae(b,D[I])}D=null}this.checkPound=function(){if(location.hash&&location.hash.indexOf("#screenshots")==0){if(!g_listviews.screenshots){var J=location.hash.split(":");if(J.length==3){var K=g_screenshots[J[1]],I=parseInt(J[2]);if(K&&I>=1&&I<=K.length){ScreenshotViewer.show({screenshots:J[1],pos:I-1})}}}}};this.show=function(I){Lightbox.show("screenshotviewer",{onShow:F,onHide:n,onResize:f},I)};DomContentLoaded.addEvent(this.checkPound)};var MapViewer=new function(){var f,t,x,b,u,d,l,i,v,c,m,a,o,k,q;function h(){var y=Math.max(50,Math.min(618,g_getWindowSize().h-72));b=1;x=1;if(b>1){b=1}if(x>1){x=1}f=Math.round(x*772);t=Math.round(x*515);var z=Math.max(480,f);Lightbox.setSize(z+20,t+52);if(Browser.ie6){o.style.width=z+"px";q.style.height=t+"px"}}function e(y){var z="#map";if(c){z+="="+u.getLink()}else{z+=":"+u.zone;if(u.level){z+="."+u.level}}return z}function r(){if(l){l(u)}location.replace(e(true))}function p(y){if(y&&(x==b)&&g_getWindowSize().h>a.offsetHeight){return}a.style.visibility="hidden";h(0);if(!y){if(!m){m=ce("div");m.style.height="325px";m.style.padding="3px";m.style.marginTop="10px"}u.parent.style.borderWidth="0px";u.parent.style.marginTop="0px";u.span.style.cursor="pointer";if(u.span.onclick){d=u.span.onclick}u.span.onclick=Lightbox.hide;u.span.onmouseover=function(){q.style.display="block"};u.span.onmouseout=function(){setTimeout(function(){if(!q.hasMouse){q.style.display="none"}},10)};if(u.onMapUpdate){l=u.onMapUpdate}u.onMapUpdate=r;if(!c){i=u.parent.parentNode;v=u.parent.nextSibling;i.insertBefore(m,u.parent);de(u.parent);ae(mapDiv,u.parent)}else{de(c);ae(mapDiv,c)}location.replace(e(false))}Lightbox.reveal();a.style.visibility="visible"}function g(){p(1)}function n(){if(d){u.span.onclick=d}else{u.span.onclick=null}d=null;if(l){u.onMapUpdate=l}else{u.onMapUpdate=null}l=null;u.span.style.cursor="";u.span.onmouseover=null;u.span.onmouseout=null;if(!c){de(m);de(u.parent);u.parent.style.borderWidth="";u.parent.style.marginTop="";if(v){i.insertBefore(u.parent,v)}else{ae(i,u.parent)}i=v=null}else{de(c);c=null}u.toggleZoom();location.replace("#.")}function w(y,B,z){u=z.mapper;a=y;if(B){y.className="mapviewer";o=ce("div");o.style.width="772px";o.style.height="515px";o.className="mapviewer-screen";q=ce("a");q.className="mapviewer-cover";q.href="javascript:;";q.onclick=Lightbox.hide;q.onmouseover=function(){q.hasMouse=true};q.onmouseout=function(){q.hasMouse=false};var D=ce("span");ae(D,ce("b"));ae(q,D);ae(o,q);mapDiv=ce("div");ae(o,mapDiv);ae(y,o);var C=ce("a");C.className="mapviewer-close";C.href="javascript:;";C.onclick=Lightbox.hide;ae(C,ce("span"));ae(y,C);var A=ce("div");A.className="clear";ae(y,A)}j()}function j(){p()}this.checkPound=function(){if(location.hash&&location.hash.indexOf("#map")==0){var C=location.hash.split("=");if(C.length==2){var A=C[1];if(A){c=ce("div");c.id="fewuiojfdksl";ae(document.body,c);var B=new Mapper({parent:c.id});B.setLink(A,true);B.toggleZoom()}}else{C=location.hash.split(":");var B=ge("sjdhfkljawelis");if(B){B.onclick()}if(C.length==2){var y=C[1].split(".");var z={zone:y[0]};if(y.length==2){z.level=parseInt(y[1])+1}u.update(z)}}}};this.show=function(y){Lightbox.show("mapviewer",{onShow:w,onHide:n,onResize:g},y)};DomContentLoaded.addEvent(this.checkPound)};var Dialog=function(){var d=this,i,m,j={},l,c=false,o=ce("form"),b={};o.onsubmit=function(){p();return false};this.show=function(t,u){if(t){m=t;i=Dialog.templates[m];d.template=i}else{return}if(i.onInit){(i.onInit.bind(d,o,u))()}if(i.onBeforeShow){i.onBeforeShow=i.onBeforeShow.bind(d,o)}if(i.onShow){i.onShow=i.onShow.bind(d,o)}if(u.onSubmit){j.onSubmit=u.onSubmit}if(u.data){c=false;l={};cO(l,u.data)}d.data=l;Lightbox.show("dialog-"+m,{onShow:a,onHide:k})};this.getValue=function(t){return h(t)};this.setValue=function(u,t){f(u,t)};this.getSelectedValue=function(t){return q(t)};this.getCheckedValue=function(t){return r(t)};function a(t,u){Lightbox.setSize(i.width,i.height);t.className="dialog";if(u||!c){e(t)}if(i.onBeforeShow){i.onBeforeShow()}n();if(i.onShow){i.onShow()}}function e(E){ee(E);ee(o);var u=ce("div");u.className="text";ae(E,u);ae(u,o);if(i.title){var N=ce("h1");N.style.textTransform="capitalize";ae(N,ct(i.title));ae(o,N)}var G=ce("table"),C=ce("tbody");ae(G,C);ae(o,G);for(var M=0,O=i.fields.length;M<O;++M){var w=i.fields[M],D,v=ce("tr"),y=ce("th"),A=ce("td");if(l[w.id]==null){l[w.id]=(w.value?w.value:"")}var B;if(w.options){B=[];if(w.optorder){cO(B,w.optorder)}else{for(var L in w.options){B.push(L)}}if(w.sort){B.sort(function(S,t){return w.sort*strcmp(w.options[S],w.options[t])})}}switch(w.type){case"caption":y.colSpan=2;y.style.textAlign="left";y.style.padding=0;if(w.compute){(w.compute.bind(d,null,l[w.id],o,y,v))()}else{if(w.label){ae(y,ct(w.label))}}ae(v,y);ae(C,v);continue;break;case"textarea":var P=D=ce("textarea");P.name=w.id;if(w.disabled){P.disabled=true}P.rows=w.size[0];P.cols=w.size[1];if(w.label){y.colSpan=2;y.style.textAlign="left";y.style.padding=0;A.style.padding=0;ae(y,ct(w.label));ae(v,y);ae(C,v);v=ce("tr")}ae(A,P);break;case"select":var P=D=ce("select");P.name=w.id;if(w.size){P.size=w.size}if(w.disabled){P.disabled=true}if(w.multiple){P.multiple=true}for(var L=0,z=B.length;L<z;++L){var I=ce("option");I.value=B[L];ae(I,ct(w.options[B[L]]));ae(P,I)}ae(A,P);break;case"dynamic":A.colSpan=2;A.style.textAlign="left";A.style.padding=0;if(w.compute){(w.compute.bind(d,null,l[w.id],o,A))()}ae(v,A);ae(C,v);D=A;break;case"checkbox":case"radio":var K=0;D=[];for(var L=0,z=B.length;L<z;++L){var H=ce("span"),P,J,x="sdfler46"+w.id+"-"+B[L];if(L>0&&!w.noInputBr){ae(A,ce("br"))}if(Browser.ie6&&w.type=="radio"){J=ce('<label for="'+x+'" onselectstart="return false" />');P=ce('<input type="'+w.type+'" name="'+w.id+'" />')}else{J=ce("label");J.setAttribute("for",x);J.onmousedown=rf;P=ce("input");P.setAttribute("type",w.type);P.name=w.id}P.value=B[L];P.id=x;if(w.disabled){P.disabled=true}if(w.submitOnDblClick){J.ondblclick=P.ondblclick=function(t){p()}}if(w.compute){(w.compute.bind(d,P,l[w.id],o,A,v))()}ae(J,P);ae(J,ct(w.options[B[L]]));ae(A,J);D.push(P)}break;default:var P=D=ce("input");P.name=w.id;if(w.disabled){P.disabled=true}if(w.submitOnEnter){P.onkeypress=function(t){t=$E(t);if(t.keyCode==13){p()}}}P.setAttribute("type",w.type);ae(A,P);break}if(w.label){if(w.type=="textarea"){A.colSpan=2}else{ae(y,ct(w.label));ae(v,y)}}if(w.type!="checkbox"&&w.type!="radio"){if(w.width){P.style.width=w.width}if(w.compute){(w.compute.bind(d,P,l[w.id],o,A,v))()}}if(w.caption){var H=ce("small");H.className="q0";ae(H,ct(w.caption));ae(A,H)}ae(v,A);ae(C,v);b[w.id]=D}for(var M=i.buttons.length;M>0;--M){var F=i.buttons[M-1],Q=ce("a");Q.onclick=p.bind(Q,F);Q.className="dialog-"+F;Q.href="javascript:;";ae(Q,ce("span"));ae(E,Q)}var R=ce("div");R.className="clear";ae(E,R);c=true}function n(){for(var w=0,t=i.fields.length;w<t;++w){var y=i.fields[w],x=b[y.id];switch(y.type){case"caption":break;case"select":for(var v=0,u=x.options.length;v<u;v++){x.options[v].selected=(x.options[v].value==l[y.id]||in_array(l[y.id],x.options[v].value)!=-1)}break;case"dynamic":if(y.compute){(y.compute.bind(d,null,l[y.id],o,x))()}break;case"checkbox":case"radio":for(var v=0,u=x.length;v<u;v++){x[v].checked=(x[v].value==l[y.id]||in_array(l[y.id],x[v].value)!=-1)}break;default:x.value=l[y.id];break}}}function k(){}function p(u){if(u=="cancel"){return Lightbox.hide()}for(var v=0,t=i.fields.length;v<t;++v){var x=i.fields[v],w;switch(x.type){case"caption":break;case"select":w=q(x.id);break;case"checkbox":case"radio":w=r(x.id);break;default:w=h(x.id);break}if(x.validate){if(!x.validate(w,l)){return}}if(w&&typeof w=="string"){w=trim(w)}l[x.id]=w}g(u)}function g(t){if(j.onSubmit){j.onSubmit(l,t)}Lightbox.hide();return false}function h(t){return b[t].value}function f(u,t){b[u].value=t}function q(x){var w=[],v=b[x];for(var u=0,t=v.options.length;u<t;u++){if(v.options[u].selected){w.push(parseInt(v.options[u].value)==v.options[u].value?parseInt(v.options[u].value):v.options[u].value)}}if(w.length==1){w=w[0]}return w}function r(x){var w=[],v=b[x];for(var u=0,t=v.length;u<t;u++){if(v[u].checked){w.push(parseInt(v[u].value)==v[u].value?parseInt(v[u].value):v[u].value)}}return w}};Dialog.templates={};var Ads={dimensions:{leaderboard:[728,90],skyscraper:[160,600],medrect:[300,250]},spots:{leaderboard:["header-ad"],skyscraper:["sidebar-ad"],medrect:["filter-ad","infobox-ad","blog-sidebar-medrect","talentcalc-sidebar-ad","pl-rightbar-ad","contribute-ad","profiler-inventory-medrect","profiler-reputation-medrect","profiler-achievements-medrect","profiler-quests-medrect","profiler-pets-medrect","profiler-companions-medrect","profiler-mounts-medrect","profiler-recipes-medrect"]},hidden:[],hiding:false,removed:false,install:function(){for(var f in Ads.dimensions){var c=Ads.spots[f],e=false;for(var b=0,a=c.length;b<a;++b){if(f=="medrect"&&location.href.indexOf("?profile")!=-1){e=true}var d=ge(c[b]);if(d){if(e){de(d)}else{e=Ads.fillSpot(f,d)}}}}},fillSpot:function(d,c,b){if(Ads.removed||!g_user.ads){de(c);return false}var a=ce("iframe");a.width=Ads.dimensions[d][0];a.height=Ads.dimensions[d][1];a.frameBorder=0;a.scrolling="no";a.src="http://static.wowhead.com/ads/dynamic/"+d+".html?4";ae(c,a);if(Ads.hiding&&!b){Ads.hide(c)}return true},removeAll:function(){for(var e in Ads.dimensions){var c=Ads.spots[e];for(var b=0,a=c.length;b<a;++b){var d=ge(c[b]);if(d){de(d)}}}Ads.removed=true},reveal:function(b){var a=gE(b,"iframe")[0];if(a){a.style.display=""}},hide:function(b){var a=gE(b,"iframe")[0];if(a){a.style.display="none";Ads.hidden.push(b)}},hideAll:function(){Ads.hiding=true;for(var e in Ads.dimensions){var c=Ads.spots[e];for(var b=0,a=c.length;b<a;++b){var d=ge(c[b]);if(d&&!Ads.isHidden(d)){Ads.hide(d)}}}},isHidden:function(b){var a=gE(b,"iframe")[0];if(a){return a.style.display=="none"}return false},intersect:function(g,e){var b;for(var h in Ads.dimensions){var d=Ads.spots[h];for(var c=0,a=d.length;c<a;++c){var f=ge(d[c]);if(f){if(!Ads.isHidden(f)){coords=ac(f);b=g_createRect(coords.x,coords.y,f.offsetWidth,f.offsetHeight);if(g_intersectRect(g,b)){if(e){Ads.hide(f)}return f}}}}}return false},restoreHidden:function(){Ads.hiding=false;if(Ads.hidden.length){for(var c=0,a=Ads.hidden.length;c<a;++c){var d=Ads.hidden[c],b=gE(d,"iframe")[0];if(b){b.style.display=""}}Ads.hidden=[]}}};DomContentLoaded.addEvent(Ads.install);