function $(C){
	if(arguments.length>1){
		var D=[];
		for(var B=0,A=arguments.length;B<A;++B){
			D.push($(arguments[B]))
		}
		return D
	}
	if(typeof C=="string"){
		C=ge(C)
	}
	return C
}
function $E(A){
	if(!A){
		if(typeof event!="undefined"){
			A=event
		}else{
			return null
		}
	}
	if(A.which){
		A._button=A.which
	}else{
		A._button=A.button;
		if(Browser.ie){
			if(A._button&4){
				A._button=2
			}else{
				if(A._button&2){
					A._button=3
				}
			}
		}else{
			A._button=A.button+1
		}
	}
	A._target=A.target?A.target:A.srcElement;
	A._wheelDelta=A.wheelDelta?A.wheelDelta:-A.detail;
	return A
}
function $A(B){
	var D=[];
	for(var C=0,A=B.length;C<A;++C){
		D.push(B[C])
	}
	return D
}

Function.prototype.bind=function(){
	var A=this,C=$A(arguments),B=C.shift();
	return function(){
		return A.apply(B,C.concat($A(arguments)))
	}
};

function strcmp(B,A){if(B==A){return 0}if(B==null){return -1}if(A==null){return 1}return B<A?-1:1}function trim(A){return A.replace(/(^\s*|\s*$)/g,"")}function rtrim(B,C){var A=B.length;while(--A>0&&B.charAt(A)==C){}B=B.substring(0,A+1);if(B==C){B=""}return B}function sprintf(B){var A;for(A=1,len=arguments.length;A<len;++A){B=B.replace("$"+A,arguments[A])}return B}function sprintfa(B){var A;for(A=1,len=arguments.length;A<len;++A){B=B.replace(new RegExp("\\$"+A,"g"),arguments[A])}return B}function str_replace(C,B,A){while(C.indexOf(B)!=-1){C=C.replace(B,A)}return C}function urlencode(A){A=encodeURIComponent(A);A=str_replace(A,"+","%2B");return A}function urlencode2(A){A=encodeURIComponent(A);A=str_replace(A,"%20","+");return A}function number_format(A){A=""+parseInt(A);if(A.length<=3){return A}return number_format(A.substr(0,A.length-3))+","+A.substr(A.length-3)}function in_array(B,E,F,D){if(B==null){return -1}if(F){return in_arrayf(B,E,F,D)}for(var C=D||0,A=B.length;C<A;++C){if(B[C]==E){return C}}return -1}function in_arrayf(B,E,F,D){for(var C=D||0,A=B.length;C<A;++C){if(F(B[C])==E){return C}}return -1}function array_walk(C,F,B){var E;for(var D=0,A=C.length;D<A;++D){E=F(C[D],B,C,D);if(E!=null){C[D]=E}}}function array_apply(C,F,B){var E;for(var D=0,A=C.length;D<A;++D){F(C[D],B,C,D)}}function ge(A){return document.getElementById(A)}function gE(A,B){return A.getElementsByTagName(B)}function ce(C,B){var A=document.createElement(C);if(B){cOr(A,B)}return A}function de(A){A.parentNode.removeChild(A)}function ae(A,B){return A.appendChild(B)}function aef(A,B){return A.insertBefore(B,A.firstChild)}function ee(A,B){if(!B){B=0}while(A.childNodes[B]){A.removeChild(A.childNodes[B])}}function ct(A){return document.createTextNode(A)}function st(A,B){if(A.firstChild&&A.firstChild.nodeType==3){A.firstChild.nodeValue=B}else{aef(A,ct(B))}}function nw(A){A.style.whiteSpace="nowrap"}function rf(){return false}function rf2(A){A=$E(A);if(A.ctrlKey||A.shiftKey||A.altKey||A.metaKey){return }return false}function tb(){this.blur()}function ac(F,D){var C=0,G=0,E;while(F){C+=F.offsetLeft;G+=F.offsetTop;E=F.parentNode;while(E&&E!=F.offsetParent&&E.offsetParent){if(E.scrollLeft||E.scrollTop){C-=(E.scrollLeft|0);G-=(E.scrollTop|0);break}E=E.parentNode}F=F.offsetParent}if(Lightbox.isVisible()){D=true}if(D&&!Browser.ie6){var B=g_getScroll();C+=B.x;G+=B.y}var A=[C,G];A.x=C;A.y=G;return A}function aE(B,C,A){if(Browser.ie){B.attachEvent("on"+C,A)}else{B.addEventListener(C,A,false)}}function dE(B,C,A){if(Browser.ie){B.detachEvent("on"+C,A)}else{B.removeEventListener(C,A,false)}}function sp(A){if(!A){A=event}if(Browser.ie){A.cancelBubble=true}else{A.stopPropagation()}}function sc(F,G,B,D,E){var C=new Date();var A=F+"="+escape(B)+"; ";C.setDate(C.getDate()+G);A+="expires="+C.toUTCString()+"; ";if(D){A+="path="+D+"; "}if(E){A+="domain="+E+"; "}document.cookie=A;gc.C[F]=B}function dc(A){sc(A,-1);gc.C[A]=null}function gc(F){if(gc.I==null){var E=unescape(document.cookie).split("; ");gc.C={};for(var C=0,A=E.length;C<A;++C){var G=E[C].indexOf("="),B,D;if(G!=-1){B=E[C].substr(0,G);D=E[C].substr(G+1)}else{B=E[C];D=""}gc.C[B]=D}gc.I=1}if(!F){return gc.C}else{return gc.C[F]}}function ns(A){if(Browser.ie){A.onfocus=tb;A.onmousedown=A.onselectstart=A.ondragstart=rf}}function eO(B){for(var A in B){delete B[A]}}function cO(C,A){for(var B in A){C[B]=A[B]}}function cOr(C,A){for(var B in A){if(typeof A[B]=="object"){if(!C[B]){C[B]={}}cOr(C[B],A[B])}else{C[B]=A[B]}}}var Browser={ie:!!(window.attachEvent&&!window.opera),opera:!!window.opera,safari:navigator.userAgent.indexOf("Safari")!=-1,gecko:navigator.userAgent.indexOf("Gecko")!=-1&&navigator.userAgent.indexOf("KHTML")==-1};Browser.ie7=Browser.ie&&navigator.userAgent.indexOf("MSIE 7.0")!=-1;Browser.ie6=Browser.ie&&navigator.userAgent.indexOf("MSIE 6.0")!=-1&&!Browser.ie7;navigator.userAgent.match(/Gecko\/([0-9]+)/);Browser.geckoVersion=parseInt(RegExp.$1)|0;var OS={windows:navigator.appVersion.indexOf("Windows")!=-1,mac:navigator.appVersion.indexOf("Macintosh")!=-1,linux:navigator.appVersion.indexOf("Linux")!=-1};var DomContentLoaded=new function(){var A=[];this.now=function(){array_apply(A,function(B){B()});DomContentLoaded=null};this.addEvent=function(B){A.push(B)}};function g_getWindowSize(){var B=0,A=0;if(typeof window.innerWidth=="number"){B=window.innerWidth;A=window.innerHeight}else{if(document.documentElement&&(document.documentElement.clientWidth||document.documentElement.clientHeight)){B=document.documentElement.clientWidth;A=document.documentElement.clientHeight}else{if(document.body&&(document.body.clientWidth||document.body.clientHeight)){B=document.body.clientWidth;A=document.body.clientHeight}}}return{w:B,h:A}}function g_getScroll(){var A=0,B=0;if(typeof (window.pageYOffset)=="number"){A=window.pageXOffset;B=window.pageYOffset}else{if(document.body&&(document.body.scrollLeft||document.body.scrollTop)){A=document.body.scrollLeft;B=document.body.scrollTop}else{if(document.documentElement&&(document.documentElement.scrollLeft||document.documentElement.scrollTop)){A=document.documentElement.scrollLeft;B=document.documentElement.scrollTop}}}return{x:A,y:B}}function g_getCursorPos(C){var B,D;if(window.innerHeight){B=C.pageX;D=C.pageY}else{var A=g_getScroll();B=C.clientX+A.x;D=C.clientY+A.y}return{x:B,y:D}}function g_scrollTo(C,B){var M,K=g_getWindowSize(),L=g_getScroll(),I=K.w,E=K.h,G=L.x,D=L.y;C=$(C);if(B==null){B=[]}else{if(typeof B=="number"){B=[B]}}M=B.length;if(M==0){B[0]=B[1]=B[2]=B[3]=0}else{if(M==1){B[1]=B[2]=B[3]=B[0]}else{if(M==2){B[2]=B[0];B[3]=B[1]}else{if(M==3){B[3]=B[1]}}}}M=ac(C);var A=M[0]-B[3],H=M[1]-B[0],J=M[0]+C.offsetWidth+B[1],F=M[1]+C.offsetHeight+B[2];if(J-A>I||A<G){G=A}else{if(J-I>G){G=J-I}}if(F-H>E||H<D){D=H}else{if(F-E>D){D=F-E}}scrollTo(G,D)}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_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_toggleDisplay(A){if(A.style.display=="none"){A.style.display="";return true}else{A.style.display="none";return false}}function g_enableScroll(A){if(!A){aE(document,"mousewheel",g_enableScroll.F);aE(window,"DOMMouseScroll",g_enableScroll.F)}else{dE(document,"mousewheel",g_enableScroll.F);dE(window,"DOMMouseScroll",g_enableScroll.F)}}g_enableScroll.F=function(A){if(A.stopPropagation){A.stopPropagation()}if(A.preventDefault){A.preventDefault()}A.returnValue=false;A.cancelBubble=true;return false};function g_getGets(){if(g_getGets.C!=null){return g_getGets.C}var E={};if(location.search){var F=decodeURIComponent(location.search.substr(1)).split("&");for(var C=0,A=F.length;C<A;++C){var G=F[C].indexOf("="),B,D;if(G!=-1){B=F[C].substr(0,G);D=F[C].substr(G+1)}else{B=F[C];D=""}E[B]=D}}g_getGets.C=E;return E}function g_createRect(D,C,B,A){return{l:D,t:C,r:D+B,b:C+A}}function g_intersectRect(B,A){return !(B.l>=A.r||A.l>=B.r||B.t>=A.b||A.t>=B.b)}function g_createRange(C,A){range={};for(var B=C;B<=A;++B){range[B]=B}return range}function g_sortIdArray(B,A){B.sort(function(D,C){return strcmp(A[D],A[C])})}function g_sortJsonArray(E,B,F,D){var A=[];for(var C in E){if(B[C]&&(D==null||D(B[C]))){A.push(C)}}if(F!=null){A.sort(F)}else{g_sortIdArray(A,B)}return A}function g_urlize(B,A){B=str_replace(B,"'","");B=trim(B);if(A){B=str_replace(B," ","-")}else{B=B.replace(/[^a-z0-9]/i,"-")}B=str_replace(B,"--","-");B=str_replace(B,"--","-");B=rtrim(B,"-");B=B.toLowerCase();return B}function g_initHeader(B){var H=ce("dl");for(var G=0,J=mn_path.length;G<J;++G){var E=ce("dt");var L=ce("a");var I=ce("ins");var F=ce("big");var D=ce("span");if(mn_path[G][0]!=B&&mn_path[G][3]){L.menu=mn_path[G][3];L.onmouseover=Menu.show;L.onmouseout=Menu.hide}else{L.onmouseover=Menu._hide}if(mn_path[G][2]){L.href=mn_path[G][2]}else{L.href="javascript:;";ns(L);L.style.cursor="default"}if(B!=null&&mn_path[G][0]==B){L.className="selected"}ae(F,ct(mn_path[G][1].charAt(0)));ae(I,F);ae(I,ct(mn_path[G][1].substr(1)));ae(L,I);ae(L,D);ae(E,L);ae(H,E)}ae(ge("ptewhjkst46"),H);var A=ge("kbl34h6b43");if(B!=null&&B>=0&&B<mn_path.length){switch(B){case 0:Menu.addButtons(A,Menu.explode(mn_database));break;case 1:Menu.addButtons(A,mn_tools);break;case 2:Menu.addButtons(A,Menu.explode(mn_more));break;case 3:Menu.addButtons(A,Menu.explode(mn_forums));break;case 5:pr_initTopBarSearch();break}}else{ae(A,ct(String.fromCharCode(160)))}g_initLanguageChanger();var M=ge("oh2345v5ks");var K=M.previousSibling;var C=M.parentNode;ns(K);K.onclick=function(){this.parentNode.onsubmit()};if(Browser.ie){setTimeout(function(){M.value=""},1)}if(M.value==""){M.className="search-database"}M.onmouseover=function(){if(trim(this.value)!=""){this.className=""}};M.onfocus=function(){this.className=""};M.onblur=function(){if(trim(this.value)==""){this.className="search-database";this.value=""}};C.onsubmit=function(){var N=this.elements[0].value;if(trim(N)==""){return false}this.submit()}}function g_initLanguageChanger(){var A=ge("language-changer");if(!A){return }var C="www",B=location.href,D;D=location.hostname.indexOf(".");if(D!=-1&&D<=5){C=location.hostname.substr(0,D)}D=B.indexOf("#");if(D!=-1){B=B.substr(0,D)}A.menu=[[0,"Deutsch",(g_locale.id!=3?B.replace(C,"de"):null)],[0,"English",(g_locale.id!=0?B.replace(C,"www"):null)],[0,"Espa"+String.fromCharCode(241)+"ol",(g_locale.id!=6?B.replace(C,"es"):null)],[0,"Fran"+String.fromCharCode(231)+"ais",(g_locale.id!=2?B.replace(C,"fr"):null)],[0,String.fromCharCode(1056,1091,1089,1089,1082,1080,1081),(g_locale.id!=7?B.replace(C,"ru"):null)]];A.menu.rightAligned=1;if(g_locale.id!=25){A.menu[{0:1,2:3,3:0,6:2,7:4}[g_locale.id]].checked=1}A.onmouseover=Menu.show;A.onmouseout=Menu.hide}

function g_initPath(K,D){g_initPath.lastIt=null}

function g_formatTimeElapsed(E){function B(L,K,J){if(J&&LANG.timeunitsab[K]==""){J=0}if(J){return L+" "+LANG.timeunitsab[K]}else{return L+" "+(L==1?LANG.timeunitssg[K]:LANG.timeunitspl[K])}}var F=[31557600,2629800,604800,86400,3600,60,1];var H=[1,3,3,-1,5,-1,-1];E=Math.max(E,1);for(var D=3,G=F.length;D<G;++D){if(E>=F[D]){var C=D;var I=Math.floor(E/F[C]);if(H[C]!=-1){var A=H[C];E%=F[C];v2=Math.floor(E/F[A]);if(v2>0){return B(I,C,1)+" "+B(v2,A,1)}}return B(I,C,0)}}return"(n/a)"}function g_formatDateSimple(E,A){function C(J){return(J<10?"0"+J:J)}var H="",G=E.getDate(),D=E.getMonth()+1,F=E.getFullYear();H+=sprintf(LANG.date_simple,C(G),C(D),F);if(A==1){var I=E.getHours()+1,B=E.getMinutes()+1;H+=LANG.date_at+C(I)+":"+C(B)}return H}function g_createGlow(A,G){var D=ce("span");for(var C=-1;C<=1;++C){for(var B=-1;B<=1;++B){var F=ce("div");F.style.position="absolute";F.style.whiteSpace="nowrap";F.style.left=C+"px";F.style.top=B+"px";if(C==0&&B==0){F.style.zIndex=4}else{F.style.color="black";F.style.zIndex=2}ae(F,ct(A));ae(D,F)}}D.style.position="relative";D.className="glow"+(G!=null?" "+G:"");var E=ce("span");E.style.visibility="hidden";ae(E,ct(A));ae(D,E);return D}function g_createProgressBar(C){if(C==null){C={}}if(C.color==null){C.color="rep0"}if(C.width==null){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(H){var F=g_createReputationBar.P;if(!H){H=0}H+=42000;if(H<0){H=0}else{if(H>84999){H=84999}}var B=H,G,C=0;for(var E=0,A=F.length;E<A;++E){if(F[E]>B){break}if(E<A-1){B-=F[E];C=E+1}}G=F[C];var D={text:g_reputation_standings[C],hoverText:B+" / "+G,color:"rep"+C,width:parseInt(B/G*100)};return g_createProgressBar(D)}g_createReputationBar.P=[36000,3000,3000,3000,6000,12000,21000,999];function g_createAchievementBar(C,B){if(!C){C=0}var A={text:C+(B>0?" / "+B:""),color:(B>700?"rep7":"ach"+(B>0?0:1)),width:(B>0?parseInt(C/B*100):100)};return g_createProgressBar(A)}function g_createCaptcha(B){var A=ce("a");A.href="javascript:;";A.className="captcha";A.title=LANG.tooltip_captcha;if(B&1){A.style.marginLeft=A.style.marginRight="auto"}if(Browser.ie6){var C=ce("img");C.src="/?captcha&foo="+Math.random();ae(A,C);A.onclick=function(){de(this.firstChild);var D=ce("img");D.src="/?captcha&foo="+Math.random();ae(A,D);this.blur()}}else{A.style.backgroundImage="url(/?captcha&foo="+Math.random()+")";A.onclick=function(){this.style.backgroundImage="url(/?captcha&foo="+Math.random()+")"}}return A}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_convertRatingToPercent(F,B,E){var D={12:1.5,13:12,14:15,15:5,16:10,17:10,18:8,19:14,20:14,21:14,22:10,23:10,24:0,25:0,26:0,27:0,28:10,29:10,30:10,31:10,32:14,33:0,34:0,35:25,36:10,37:2.5,44:4.69512176513672};if(F<0){F=1}else{if(F>80){F=80}}if((B==14||B==12||B==15)&&F<34){F=34}if(E<0){E=0}var C;if(D[B]==null){C=0}else{var A;if(F>70){A=(82/52)*Math.pow((131/63),((F-70)/10))}else{if(F>60){A=(82/(262-3*F))}else{if(F>10){A=((F-8)/52)}else{A=2/52}}}C=E/D[B]/A}return C}function g_setRatingLevel(F,E,A,C){var D=prompt(sprintf(LANG.prompt_ratinglevel,1,80),E);if(D!=null){D|=0;if(D!=E&&D>=1&&D<=80){E=D;var B=g_convertRatingToPercent(E,A,C);B=(Math.round(B*100)/100);if(A!=12&&A!=37){B+="%"}F.innerHTML=sprintf(LANG.tooltip_combatrating,B,E);F.onclick=g_setRatingLevel.bind(0,F,E,A,C)}}}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_getPatchVersion(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 D.V[A]}if(E>=D.T[A]){B=A+1}else{C=A-1}}A=Math.ceil((C+B)/2);return D.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","???"];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,9999999999999];function g_expandSite(){ge("wrapper").className="nosidebar";Ads.removeAll();var A=ge("topbar-expand");if(A){de(A)}A=ge("sidebar");if(A){de(A)}}function g_insertTag(E,H,A,J){var C=$(E);C.focus();if(C.selectionStart!=null){var K=C.selectionStart,G=C.selectionEnd,I=C.scrollLeft,D=C.scrollTop;var B=C.value.substring(K,G);if(typeof J=="function"){B=J(B)}C.value=C.value.substr(0,K)+H+B+A+C.value.substr(G);C.selectionStart=C.selectionEnd=G+H.length;C.scrollLeft=I;C.scrollTop=D}else{if(document.selection&&document.selection.createRange){var F=document.selection.createRange();if(F.parentElement()!=C){return }var B=F.text;if(typeof J=="function"){B=J(B)}F.text=H+B+A}}if(C.onkeyup){C.onkeyup()}}function g_getLocaleFromDomain(B){var A=g_getLocaleFromDomain.L;return(A[B]?A[B]:0)}g_getLocaleFromDomain.L={fr:2,de:3,es:6,ru:7,wotlk:0,ptr:0};function g_getIdFromTypeName(A){var B=g_getIdFromTypeName.L;return(B[A]?B[A]:-1)}g_getIdFromTypeName.L={npc:1,object:2,item:3,itemset:4,quest:5,spell:6,zone:7,faction:8,pet:9,achievement:10};function g_getIngameLink(A,C,B){prompt(LANG.prompt_ingamelink,'/script DEFAULT_CHAT_FRAME:AddMessage("'+sprintf(LANG.message_ingamelink,"\\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(B,E,D){var A;var C=function(){if(A){clearTimeout(A);A=null}A=setTimeout(E,D)};B.onkeyup=C}function g_createOrRegex(C){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(J,C){function L(Q,O){var P;if(Q==C.page){P=ce("span");P.className="selected"}else{P=ce("a");P.href=(Q>1?C.url+C.sep+Q+C.pound:C.url+C.pound)}ae(P,ct(O!=null?O:Q));return P}if(!C.pound){C.pound=""}if(!C.sep){C.sep="."}if(C.allOrNothing&&C.nPages<=1){return }var H=(C.align&&C.align=="left");var D=ce("div"),K,N=ce("var");D.className="pages";if(H){D.className+=" pages-left"}if(C.nPages>1){K=ce("div");K.className="pages-numbers";var M=Math.max(2,C.page-3);var G=Math.min(C.nPages-1,C.page+3);var A=[];if(C.page!=C.nPages){A.push(L(C.page+1,LANG.lvpage_next+String.fromCharCode(8250)))}A.push(L(C.nPages));if(G<C.nPages-1){var B=ce("span");ae(B,ct("..."));A.push(B)}for(var F=G;F>=M;--F){A.push(L(F))}if(M>2){var B=ce("span");ae(B,ct("..."));A.push(B)}A.push(L(1));if(C.page!=1){A.push(L(C.page-1,String.fromCharCode(8249)+LANG.lvpage_previous))}if(H){A.reverse()}for(var F=0,I=A.length;F<I;++F){ae(K,A[F])}K.firstChild.style.marginRight="0";K.lastChild.style.marginLeft="0"}var N=ce("var");ae(N,ct(sprintf(LANG[C.wording[C.nItems==1?0:1]],C.nItems)));if(C.nPages>1){var B=ce("span");ae(B,ct(String.fromCharCode(8211)));ae(N,B);var E=ce("a");E.className="gotopage";E.href="javascript:;";ns(E);if(Browser.ie){ae(E,ct(" "))}E.onclick=function(){var O=prompt(sprintf(LANG.prompt_gotopage,1,C.nPages),C.page);if(O!=null){O|=0;if(O!=C.page&&O>=1&&O<=C.nPages){document.location.href=(O>1?C.url+C.sep+O+C.pound:C.url+C.pound)}}};E.onmouseover=function(O){Tooltip.showAtCursor(O,LANG.tooltip_gotopage,0,0,"q")};E.onmousemove=Tooltip.cursorUpdate;E.onmouseout=Tooltip.hide;ae(N,E)}if(H){ae(D,N);if(K){ae(D,K)}}else{if(K){ae(D,K)}ae(D,N)}ae(J,D)}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 J=ge("infobox-sticky");var F=g_pageInfo.type;var A=g_pageInfo.typeId;var H=in_array(lv_screenshots,1,function(L){return L.sticky});if(H!=-1){var E=lv_screenshots[H];var I=ce("a");I.href="#screenshots:id="+E.id;I.onclick=function(L){ScreenshotViewer.show({screenshots:lv_screenshots,pos:H});return rf2(L)};var C=ce("img"),B=Math.min(150/E.width,150/E.height);C.src="http://static.wowhead.com/uploads/screenshots/thumb/"+E.id+".jpg";C.className="border";ae(I,C);ae(J,I);var D=ce("div");var K=ce("small");I=ce("a");if(g_user.id>0){I.href="javascript:;";I.onclick=ss_submitAScreenshot}else{I.href="/?account=signin"}ae(I,ct(LANG.infobox_submitone));ae(K,I);ae(K,ct(" "+String.fromCharCode(160)));var G=ce("b");ae(G,ct("|"));ae(K,G);ae(K,ct(String.fromCharCode(160)+" "));I=ce("a");I.href="javascript:;";I.onclick=function(){tabsRelated.focus(-1);return false};ae(I,ct(sprintf(LANG.infobox_showall,lv_screenshots.length)));ae(K,I);ae(D,K);ae(J,D)}else{var I;if(g_user.id>0){I='<a href="javascript:;" onclick="ss_submitAScreenshot(); return false">'}else{I='<a href="/?account=signin">'}J.innerHTML=sprintf(LANG.infobox_noneyet,I+LANG.infobox_submitone+"</a>")}}function su_addToSaved(A){if(!A){return }var B=gc("compare_groups");if(!B||confirm(LANG.confirm_addtosaved)){if(B){A=B+";"+A}sc("compare_groups",20,A,"/",".wowhead.com");document.location.href="/?compare"}else{document.location.href="/?compare="+A}}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)}}};function g_ajaxIshRequest(A){var B=document.getElementsByTagName("head")[0];ae(B,ce("script",{type:"text/javascript",src:A}))}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]);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)},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 E=this.d;var D=E.i;var C=this.i;var A=this.k;var B=this.firstChild.className=="menusub";Menu.truncate(D+B);if(B&&A!=Menu.selection[D]){var F=ac(this);Menu.selection[D+1]=-1;Menu.showDepth(D+1,E.menuArray[C][3],F[0],F[1]-2,this.offsetHeight,this.offsetWidth-3,0)}Menu.clean(D);Menu.selection[D]=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(B,A){var C;if(Menu.divs[B]==null){C=ce("div");C.className="menu";ae(ge("layers"),C);Menu.divs[B]=C}else{C=Menu.divs[B]}C.i=B;C.menuArray=A;return C},showDepth:function(Y,Z,N,L,e,Q,K){var t,l=Menu.getDiv(Y,Z);while(l.firstChild){de(l.firstChild)}var J=ce("table"),M=ce("tbody"),o=ce("tr"),D=ce("td"),f=ce("div"),V=ce("div");var U=999;var A=g_getWindowSize(),T=g_getScroll(),C=A.w,F=A.h,r=T.x,c=T.y;if(e>0&&(Y>0||Z.length>20)){if((25+1)*Z.length>F-25-K){for(var X=2;X<4;++X){if(e/X*Z.length+30<F-K){break}}U=Math.floor(Z.length/X)}}var H=0;var W=0;for(var X=0,I=Z.length;X<I;++X){var g=Z[X];if(g[0]==null){var G=ce("span");G.className="separator";ns(G);ae(G,ct(g[1]));G.d=l;G.onmouseover=Menu.sepOver;ae(V,G)}else{var q=ce("a");q.d=l;q.k=W++;q.i=X;if(g[2]){if(Menu.currentLink&&Menu.currentLink.menuappend){if(g[2].indexOf(Menu.currentLink.menuappend)==-1){q.href=g[2]+Menu.currentLink.menuappend}else{q.href=g[2]}}else{if(typeof g[2]=="function"){q.href="javascript:;";q.onclick=Menu.elemClick.bind(0,g[2]);ns(q)}else{q.href=g[2]}}}else{q.href="javascript:;";q.style.cursor="default";ns(q)}q.onmouseover=Menu.elemOver;var R=ce("span"),n=ce("span");if(g[3]!=null){R.className="menusub"}if(g.checked){n.className="menucheck"}if(g.newWindow){q.target="_blank"}if(g.miniIcon){n.style.background="url(http://static.wowhead.com/images/icons/tiny/"+g.miniIcon.toLowerCase()+".gif) left center no-repeat"}else{if(g.socketColor){n.className+=" socket-"+g_file_gems[g.socketColor]}}ae(n,ct(g[1]));ae(R,n);ae(q,R);ae(V,q)}if(H++==U){f.onmouseover=Menu.divOver;f.onmouseout=Menu.divOut;ae(f,V);if(!Browser.ie6){var S=ce("p");ae(S,ce("em"));ae(S,ce("var"));ae(S,ce("strong"));ae(S,f);ae(D,S)}else{ae(D,f)}ae(o,D);D=ce("td");S=ce("p");f=ce("div");V=ce("div");H=0}}f.onmouseover=Menu.divOver;f.onmouseout=Menu.divOut;ae(f,V);if(!Browser.ie6){if(U!=999){var S=ce("p");ae(S,ce("em"));ae(S,ce("var"));ae(S,ce("strong"));ae(S,f);ae(D,S)}else{ae(l,ce("em"));ae(l,ce("var"));ae(l,ce("strong"));ae(D,f)}}else{ae(D,f)}ae(o,D);ae(M,o);ae(J,M);ae(l,J);l.style.left=l.style.top="-2323px";l.style.display="";var B=J.offsetWidth,E=J.offsetHeight,P=true,O=true;if(!Browser.ie6){B+=5;E+=6}if(N+B>C+r||Z.rightAligned){P=false}if(P){if(N+Q+B>C){N=Math.max(0,N-B)}else{if(Y>0){N+=Q}}}else{N=N+Q-B;if(Browser.ie){N-=3}}if(L+E>F+c||(Y>0&&L+E>document.body.offsetHeight)){L=Math.max(c+5,F+c-E)}l.style.left=N+"px";l.style.top=L+"px";if(Browser.ie6){t=Menu.getIframe(Y);t.style.left=N+"px";t.style.top=L+"px";t.style.width=B+"px";t.style.height=E+"px";t.style.display="";t.style.visibility="visible"}l.style.visibility="visible";if(Browser.opera){l.style.display="none";l.style.display=""}},divOver:function(){clearTimeout(Menu.timer)},divOut:function(){clearTimeout(Menu.timer);Menu.timer=setTimeout(Menu._hide,333)},truncate:function(A){var B;while(Menu.selection.length-1>A){B=Menu.selection.length-1;Menu.divs[B].style.display="none";Menu.divs[B].style.visibility="hidden";if(Browser.ie6){Menu.iframes[B].style.display="none"}Menu.selection.pop()}},clean:function(A){for(var B=A;B<Menu.selection.length;++B){if(Menu.selection[B]!=-1){d=gE(Menu.divs[B],"a")[Menu.selection[B]];if(d.className.indexOf("sub")!=-1){d.className="sub"}else{d.className=""}Menu.selection[B]=-1}}},append:function(A,B){A[2]+=B;if(A[3]!=null){Menu._append(A[3],B)}},_append:function(A,C){var D,F=0;for(var B=0;B<A.length;++B){var E=A[B][2].indexOf("&filter=");if(E!=-1&&C.indexOf("&filter=")==0){C=Menu._fixCollision(A[B][2].substr(E),C)}A[B][2]+=C;if(A[B][3]){Menu._append(A[B][3],C)}}},_splitFilter:function(B){var G=B.substr(8).split(";"),E={};for(var D=0,A=G.length;D<A;++D){var H=G[D].indexOf("="),C,F;if(H!=-1){C=G[D].substr(0,H);F=G[D].substr(H+1)}else{C=G[D];F=""}E[C]=F}return E},_fixCollision:function(C,B){var A=Menu._splitFilter(C),E=Menu._splitFilter(B);B="";for(var D in E){if(!A[D]&&D!="sl"&&D!="cl"){B+=";";B+=D+"="+E[D]}}return B},fixUrls:function(G,B,E,D,F){if(!F){F=0}for(var C=0,A=G.length;C<A;++C){if(G[C][2]==null){G[C][2]=B+G[C][0]+(E?E:"")}if(G[C][3]){if(D==true||(typeof D=="object"&&D[F]==true)){Menu.fixUrls(G[C][3],B,E,D,F+1)}else{Menu.fixUrls(G[C][3],B+G[C][0]+".",E,D,F+1)}}}},addButtons:function(F,E){for(var C=0,A=E.length;C<A;++C){if(E[C][0]==null){continue}var B=ce("a"),D=ce("span");if(E[C][2]){B.href=E[C][2]}else{B.href="javascript:;";B.style.cursor="default";B.style.textDecoration="none";ns(B)}if(E[C][3]!=null){D.className="menuarrowd";B.menu=E[C][3];B.onmouseover=Menu.show;B.onmouseout=Menu.hide}else{B.onmouseover=Menu._hide}ae(D,ct(E[C][1]));ae(B,D);ae(F,B)}},explode:function(F){var B=[],E=null,D;for(var C=0,A=F.length;C<A;++C){if(F[C][0]!=null){if(E!=null){D.push(F[C])}else{B.push(F[C])}}if(E!=null&&(F[C][0]==null||C==A-1)){B.push([0,E[1],,D])}if(F[C][0]==null){E=F[C];D=[]}}return B}};function Tabs(A){cO(this,A);if(this.parent){this.parent=$(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},del:function(A){if(this.tabs[A]){ge("tab-"+this.tabs[A].id).style.display="none";this.selectedTab=-1;this.uls=[];this.tabs.splice(A,1);this.nShows=0;while(this.parent.firstChild){de(this.parent.firstChild)}this.flush()}},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){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(J){if(this.oldMode){var H,M,C,K;H=ce("ul");H.className="old-tabs";for(var G=0;G<this.tabs.length;++G){var D=this.tabs[G];M=ce("li");C=ce("div");K=ce("a");if(this.poundable){K.href="#"+D.id}else{K.href="javascript:;"}ns(K);K.onclick=Tabs.onClick.bind(D,K);ae(K,ct(D.caption));ae(M,C);ae(M,K);ae(H,M)}this.uls[0]=H;ae(this.parent,H);var L=ce("div");L.style.cssFloat=L.style.styleFloat="left";ae(this.parent,L)}else{var L,E,K,I,A;var B=ce("div");B.className="tabs-container";I=ce("div");I.style.visibility="hidden";this.uls[0]=ce("ul");this.uls[0].className="tabs";ae(I,this.uls[0]);ae(B,I);I=ce("div");I.className="tabs-levels";for(var G=1;G<=3;++G){A=ce("div");A.className="tabs-level";this.uls[G]=ce("ul");this.uls[G].className="tabs";this.uls[G].style.top=(-30*(3-G))+"px";ae(A,this.uls[G]);ae(I,A)}ae(B,I);for(var G=0;G<this.tabs.length;++G){var D=this.tabs[G];for(var F=0;F<=3;++F){E=ce("li");K=ce("a");b=ce("b");if(this.poundable){K.href="#"+D.id}else{K.href="javascript:;"}if(F>0){ns(K);K.onclick=Tabs.onClick.bind(D,K)}if(!Browser.ie6){I=ce("div");ae(I,ct(D.caption));ae(K,I)}ae(b,ct(D.caption));ae(K,b);ae(E,K);ae(this.uls[F],E)}}ae(this.parent,B)}if(this.onLoad){L=this.onLoad();if(L!=null){this.poundedTab=J=L}}this.show(J)},setTabName:function(C,B){var A=this.oldMode?0:3;this.tabs[C].caption=B;for(var D=0;D<=A;++D){_=gE(this.uls[D],"a");g_setTextNodes(_[C],B)}},setTabPound:function(C,A){if(!this.poundable){return }var B=this.oldMode?0:3;for(var D=0;D<=B;++D){_=gE(this.uls[D],"a");_[C].href="#"+this.tabs[C].id+":"+A}},getSelectedTab:function(){return this.selectedTab}};Tabs.onClick=function(A,E,D){if(D==null&&this.index==this.owner.selectedTab){return }var C=rf2(E);if(C==null){return }this.owner.show(this.index,D);if(this.owner.poundable){var B=A.href.indexOf("#");B!=-1&&location.replace(A.href.substr(B))}return C};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(E,D){var B;if(D){ge("tab-"+D.id).style.display="none"}B=ge("tab-"+E.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"],sizes178:["s","m","l"],sizes2:[18,36,56],create:function(A,K,F,B,D,J){var G=ce("div"),C=ce("ins"),E=ce("del");if(K==null){K=1}G.className="icon"+Icon.sizes[K];ae(G,C);ae(G,E);Icon.setTexture(G,K,A);if(B){var H=ce("a");H.href=B;ae(G,H)}else{G.ondblclick=Icon.onDblClick}if(D!=null&&((D>1&&D<2147483647)||D.length)){var I=g_createGlow(D,"q1");I.style.right="0";I.style.bottom="0";I.style.position="absolute";ae(G,I)}if(J!=null&&J>0){var I=g_createGlow("("+J+")","q");I.style.left="0";I.style.top="0";I.style.position="absolute";ae(G,I)}return G},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://wowdb.178.com/icons/"+Icon.sizes178[C]+"/"+B.toLowerCase()+".jpg)"}Icon.moveTexture(D,C,0,0)},moveTexture:function(D,C,A,E){var B=D.firstChild.style;if(A||E){B.backgroundPosition=(-A*Icon.sizes2[C])+"px "+(-E*Icon.sizes2[C])+"px"}else{if(B.backgroundPosition){B.backgroundPosition=""}}},getLink:function(A){return gE(A,"a")[0]},onDblClick:function(){if(this.firstChild){var B=this.firstChild.style;

/*
if(B.backgroundImage.length&&B.backgroundImage.indexOf("url(http://static.wowhead.com")==0){
	
	var C=B.backgroundImage.lastIndexOf("/"),A=B.backgroundImage.indexOf(".jpg");
	if(C!=-1&&A!=-1){prompt("",B.backgroundImage.substring(C+1,A))}
	}
*/	
	}}};
	
	var RedButton={create:function(H,C,G){var B=ce("a"),E=ce("em"),A=ce("b"),D=ce("i"),F=ce("span");B.href="javascript:;";B.className="button-red";ae(A,D);ae(E,A);ae(E,F);ae(B,E);RedButton.setText(B,H);RedButton.enable(B,C);RedButton.setFunc(B,G);return B},setText:function(A,B){st(A.firstChild.childNodes[0].firstChild,B);st(A.firstChild.childNodes[1],B)},enable:function(B,A){if(A||A==null){B.className=B.className.replace("button-red-disabled","")}else{if(B.className.indexOf("button-red-disabled")==-1){B.className+=" button-red-disabled"}}},setFunc:function(A,B){A.onclick=(B?B:null)}};var Tooltip={create:function(G){var E=ce("div"),J=ce("table"),C=ce("tbody"),D=ce("tr"),B=ce("tr"),A=ce("td"),I=ce("th"),H=ce("th"),F=ce("th");E.className="tooltip";I.style.backgroundPosition="top right";H.style.backgroundPosition="bottom left";F.style.backgroundPosition="bottom right";if(G){A.innerHTML=G}ae(D,A);ae(D,I);ae(C,D);ae(B,H);ae(B,F);ae(C,B);ae(J,C);Tooltip.icon=ce("p");Tooltip.icon.style.visibility="hidden";ae(Tooltip.icon,ce("div"));ae(E,Tooltip.icon);ae(E,J);return E},fix:function(D,B,E){var C=gE(D,"table")[0],G=gE(C,"td")[0],F=G.childNodes;if(F.length>=2&&F[0].nodeName=="TABLE"&&F[1].nodeName=="TABLE"){F[0].style.whiteSpace="nowrap";var A;if(F[1].offsetWidth>300){A=Math.max(300,F[0].offsetWidth)+20}else{A=Math.max(F[0].offsetWidth,F[1].offsetWidth)+20}if(A>20){D.style.width=A+"px";F[0].style.width=F[1].style.width="100%";if(!B&&D.offsetHeight>document.body.clientHeight){C.className="shrink"}}}if(E){D.style.visibility="visible"}},fixSafe:function(C,B,A){if(Browser.ie){setTimeout(Tooltip.fix.bind(this,C,B,A),1)}else{Tooltip.fix(C,B,A)}},append:function(B,A){var B=$(B);var C=Tooltip.create(A);ae(B,C);Tooltip.fixSafe(C,1,1)},prepare:function(){if(Tooltip.tooltip){return }var B=Tooltip.create();B.style.position="absolute";B.style.left=B.style.top="-2323px";var A=ge("layers");ae(A,B);Tooltip.tooltip=B;Tooltip.tooltipTable=gE(B,"table")[0];Tooltip.tooltipTd=gE(B,"td")[0];if(Browser.ie6){B=ce("iframe");B.src="javascript:0;";B.frameBorder=0;ae(A,B);Tooltip.iframe=B}},set:function(B){var A=Tooltip.tooltip;A.style.width="550px";A.style.left="-2323px";A.style.top="-2323px";Tooltip.tooltipTd.innerHTML=B;A.style.display="";Tooltip.fix(A,0,0)},moveTests:[[null,null],[null,false],[false,null],[false,false]],move:function(J,I,D,L,C,A){if(!Tooltip.tooltipTable){return }var M=Tooltip.tooltip,F=Tooltip.tooltipTable.offsetWidth,B=Tooltip.tooltipTable.offsetHeight,K;M.style.width=F+"px";var H;for(var E=0,G=Tooltip.moveTests.length;E<G;++E){K=Tooltip.moveTests[E];H=Tooltip.moveTest(J,I,D,L,C,A,K[0],K[1]);if(!Ads.intersect(H)){break}}M.style.left=H.l+"px";M.style.top=H.t+"px";M.style.visibility="visible";if(Browser.ie6&&Tooltip.iframe){var K=Tooltip.iframe;K.style.left=H.l+"px";K.style.top=H.t+"px";K.style.width=F+"px";K.style.height=B+"px";K.style.display="";K.style.visibility="visible"}},moveTest:function(E,K,O,L,B,A,M,J){var W=E,N=K,F=Tooltip.tooltip,I=Tooltip.tooltipTable.offsetWidth,Q=Tooltip.tooltipTable.offsetHeight,H=g_getWindowSize(),D=g_getScroll(),G=H.w,P=H.h,C=D.x,V=D.y,U=C,T=V,S=C+G,R=V+P;if(M==null){M=(E+O+I<=S)}if(J==null){J=(K-Q>=T)}if(M){E+=O+B}else{E=Math.max(E-I,U)-B}if(J){K-=Q+A}else{K+=L+A}if(E<U){E=U}else{if(E+I>S){E=S-I}}if(K<T){K=T}else{if(K+Q>R){K=Math.max(V,R-Q)}}if(Tooltip.iconVisible){if(W>=E-48&&W<=E&&N>=K-4&&N<=K+48){K-=48-(N-K)}}return g_createRect(E,K,I,Q)},show:function(F,E,C,B,A){if(Tooltip.disabled){return }if(!C||C<1){C=1}if(!B||B<1){B=1}if(A){E='<span class="'+A+'">'+E+"</span>"}var D=ac(F);Tooltip.prepare();Tooltip.set(E);Tooltip.move(D.x,D.y,F.offsetWidth,F.offsetHeight,C,B)},showAtCursor:function(D,E,C,B,A){if(Tooltip.disabled){return }if(!C||C<10){C=10}if(!B||B<10){B=10}if(A){E='<span class="'+A+'">'+E+"</span>"}D=$E(D);var F=g_getCursorPos(D);Tooltip.prepare();Tooltip.set(E);Tooltip.move(F.x,F.y,0,0,C,B)},showAtXY:function(D,A,E,C,B){if(Tooltip.disabled){return }Tooltip.prepare();Tooltip.set(D);Tooltip.move(A,E,0,0,C,B)},cursorUpdate:function(B,A,D){if(Tooltip.disabled||!Tooltip.tooltip){return }B=$E(B);if(!A||A<10){A=10}if(!D||D<10){D=10}var C=g_getCursorPos(B);Tooltip.move(C.x,C.y,0,0,A,D)},hide:function(){if(Tooltip.tooltip){Tooltip.tooltip.style.display="none";Tooltip.tooltip.visibility="hidden";Tooltip.tooltipTable.className="";if(Browser.ie6){Tooltip.iframe.style.display="none"}Tooltip.setIcon(null)}},setIcon:function(A){Tooltip.prepare();if(A){Tooltip.icon.style.backgroundImage="url(talents/class"+A.toLowerCase()+".jpg)";Tooltip.icon.style.visibility="visible"}else{Tooltip.icon.style.backgroundImage="none";Tooltip.icon.style.visibility="hidden"}Tooltip.iconVisible=A?1:0}};var g_listviews={};function Listview(A){cO(this,A);if(this.id){var K=(this.tabs?"tab-":"lv-")+this.id;if(this.parent){var H=ce("div");H.id=K;ae($(this.parent),H);this.container=H}else{this.container=ge(K)}}else{return }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.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.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.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.customFilter){this.customFilter=this.customFilter.bind(this)}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 M=this.template.nItemsPerRow;this.nItemsPerRow=(M!=null?M:4)}this.nItemsPerRow|=0;if(this.nItemsPerRow<=1){this.nItemsPerRow=1}}else{this.nItemsPerRow=1}this.columns=this.template.columns.slice(0);if(this.extraCols!=null){for(var D=0,G=this.extraCols.length;D<G;++D){var I=null;var C=this.extraCols[D];if(C.after||C.before){var F=in_array(this.columns,(C.after?C.after:C.before),function(N){return N.id});if(F!=-1){I=(C.after?F+1:F-1)}}if(I==null){I=this.columns.length}this.columns.splice(I,0,C)}}this.visibility=[];var L=[],J=[];if(this.visibleCols!=null){array_walk(this.visibleCols,function(N){L[N]=1})}if(this.hiddenCols!=null){array_walk(this.hiddenCols,function(N){J[N]=1})}for(var D=0,G=this.columns.length;D<G;++D){var C=this.columns[D];if(L[C.id]!=null||(!C.hidden&&J[C.id]==null)){this.visibility.push(D)}}if(this.sort==null&&this.template.sort){this.sort=this.template.sort.slice(0)}else{if(this.sort!=null){var B=this.sort;this.sort=[];for(var D=0,G=B.length;D<G;++D){var C=parseInt(B[D]);if(isNaN(C)){var E=0;if(B[D].charAt(0)=="-"){E=1;B[D]=B[D].substring(1)}var F=in_array(this.columns,B[D],function(N){return N.id});if(F!=-1){if(E){this.sort.push(-(F+1))}else{this.sort.push(F+1)}}}else{this.sort.push(C)}}}else{this.sort=[]}}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.updateSortIndex();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.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 G=ce("tr");if(this.mode==Listview.MODE_CHECKBOX){var F=ce("th"),H=ce("div"),B=ce("a");F.style.width="33px";B.href="javascript:;";B.className="listview-cb";ns(B);ae(B,ct(String.fromCharCode(160)));ae(H,B);ae(F,H);ae(G,F)}for(var E=0,A=this.visibility.length;E<A;++E){var D=this.visibility[E],C=this.columns[D],F=ce("th");H=ce("div"),B=ce("a"),outerSpan=ce("span"),innerSpan=ce("span");C.__th=F;B.href="javascript:;";if(this.filtrable&&(C.filtrable==null||C.filtrable)){B.onmouseup=Listview.headerClick.bind(this,C,D);B.onclick=B.oncontextmenu=rf}else{B.onclick=this.sortBy.bind(this,D+1)}B.onmouseover=Listview.headerOver.bind(this,B,C);B.onmouseout=Tooltip.hide;ns(B);if(C.width!=null){F.style.width=C.width}if(C.align!=null){F.style.textAlign=C.align}if(C.span!=null){F.colSpan=C.span}ae(innerSpan,ct(C.name));ae(outerSpan,innerSpan);ae(B,outerSpan);ae(H,B);ae(F,H);ae(G,F)}if(this.hideHeader){this.thead.style.display="none"}ae(this.thead,G)},createBands:function(){var J=ce("div"),H=ce("div"),K=ce("div"),I=ce("div");this.bandTop=J;this.bandBot=H;this.noteTop=K;this.noteBot=I;J.className="listview-band-top";H.className="listview-band-bottom";this.navTop=this.createNav(true);this.navBot=this.createNav(false);K.className=I.className="listview-note";if(this.note){K.innerHTML=this.note}else{if(this.createNote){this.createNote(K,I)}}if(!K.firstChild&&this.mode!=Listview.MODE_CHECKBOX){ae(K,ct(String.fromCharCode(160)))}if(this.mode!=Listview.MODE_CHECKBOX){ae(I,ct(String.fromCharCode(160)))}ae(J,this.navTop);if(this.searchable){var G=this.updateFilters.bind(this,true),C=(this._truncated?"search-within-results2":"search-within-results"),A=ce("span"),B=ce("em"),F=ce("a"),E=ce("input");A.className="listview-quicksearch";ae(A,B);F.href="javascript:;";F.onclick=function(){var L=this.nextSibling;L.value="";L.className=C;G()};F.style.display="none";ae(F,ce("span"));ae(A,F);ns(F);E.setAttribute("type","text");E.className=C;E.style.width=(this._truncated?"19em":"15em");g_onAfterTyping(E,G,this.searchDelay);E.onmouseover=function(){if(trim(this.value)!=""){this.className=""}};E.onfocus=function(){this.className=""};E.onblur=function(){if(trim(this.value)==""){this.className=C;this.value=""}};if(Browser.ie){setTimeout(function(){E.value=""},1)}ae(A,E);this.quickSearchBox=E;this.quickSearchGlass=B;this.quickSearchClear=F;ae(J,A)}ae(J,K);ae(H,this.navBot);ae(H,I);if(this.mode==Listview.MODE_CHECKBOX){if(this.note){K.style.paddingBottom="5px"}this.cbBarTop=this.createCbBar(true);this.cbBarBot=this.createCbBar(false);ae(J,this.cbBarTop);ae(H,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){J.style.display="none"}if(this.hideBands&2){H.style.display="none"}ae(this.container,this.bandTop);if(this.clip){var D=ce("div");D.className="listview-clip";D.style.width=this.clip.w+"px";D.style.height=this.clip.h+"px";this.clipDiv=D;ae(D,this.mainContainer);ae(D,this.noData);ae(this.container,D)}else{ae(this.container,this.mainContainer);ae(this.container,this.noData)}ae(this.container,this.bandBot)},createNav:function(A){var B=ce("div");a1=ce("a"),a2=ce("a"),a3=ce("a"),a4=ce("a"),span=ce("span"),b1=ce("b"),b2=ce("b"),b3=ce("b");B.className="listview-nav";a1.href=a2.href=a3.href=a4.href="javascript:;";ae(a1,ct(String.fromCharCode(171)+LANG.lvpage_first));ae(a2,ct(String.fromCharCode(8249)+LANG.lvpage_previous));ae(a3,ct(LANG.lvpage_next+String.fromCharCode(8250)));ae(a4,ct(LANG.lvpage_last+String.fromCharCode(187)));ns(a1);ns(a2);ns(a3);ns(a4);a1.onclick=this.firstPage.bind(this);a2.onclick=this.previousPage.bind(this);a3.onclick=this.nextPage.bind(this);a4.onclick=this.lastPage.bind(this);ae(b1,ct("a"));ae(b2,ct("a"));ae(b3,ct("a"));ae(span,b1);ae(span,ct(LANG.hyphen));ae(span,b2);ae(span,ct(LANG.lvpage_of));ae(span,b3);ae(B,a1);ae(B,a2);ae(B,span);ae(B,a3);ae(B,a4);if(A){if(this.hideNav&1){B.style.display="none"}}else{if(this.hideNav&2){B.style.display="none"}}return B},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 H=(this.mode==Listview.MODE_DIV?this.mainContainer:this.tbody);ee(H);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 K,B,C;if(!(this.hideBands&1)){this.bandTop.style.display=""}if(!(this.hideBands&2)){this.bandBot.style.display=""}if(this.nItemsPerPage>0){K=this.rowOffset;B=Math.min(K+this.nRowsVisible,K+this.nItemsPerPage);if(this.filtered&&this.rowOffset>0){for(var F=0,G=0;F<this.data.length&&G<this.rowOffset;++F){var L=this.data[F];if(L.__hidden||L.__deleted){++K}else{++G}}B+=(K-this.rowOffset)}}else{K=0;B=this.nRowsVisible}var A=B-K;if(this.mode==Listview.MODE_DIV){for(var E=0;E<A;++E){var F=K+E,L=this.data[F];if(!L){break}if(L.__hidden||L.__deleted){++A;continue}ae(this.mainDiv,this.getDiv(F))}}else{if(this.mode==Listview.MODE_TILED){var D=0,I=ce("tr");for(var E=0;E<A;++E){var F=K+E,L=this.data[F];if(!L){break}if(L.__hidden||L.__deleted){++A;continue}ae(I,this.getCell(F));if(++D==this.nItemsPerRow){ae(this.tbody,I);if(E+1<A){I=ce("tr")}D=0}}if(D!=0){for(;D<4;++D){var J=ce("td");J.className="empty-cell";ae(I,J)}ae(this.tbody,I)}}else{for(var E=0;E<A;++E){var F=K+E,L=this.data[F];if(!L){break}if(L.__hidden||L.__deleted){++A;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.template.onNoData){A=(this.template.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.createDiv(B,A)}return B.__div},createDiv:function(B,A){var C=ce("div");B.__div=C;(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},createRow:function(I){var F=ce("tr");I.__tr=F;if(this.mode==Listview.MODE_CHECKBOX){var B=ce("td");if(!I.__nochk){B.className="listview-cb";B.onclick=Listview.cbCellClick;var C=ce("input");ns(C);C.type="checkbox";C.onclick=Listview.cbClick;if(I.__chk){C.checked=true;if(Browser.ie){C.defaultChecked=true}}I.__cb=C;ae(B,C)}ae(F,B)}for(var D=0,E=this.visibility.length;D<E;++D){var G=this.visibility[D],A=this.columns[G],B=ce("td"),H;if(A.align!=null){B.style.textAlign=A.align}if(A.compute){H=(A.compute.bind(this,I,B,F,G))()}else{if(I[A.value]!=null){H=I[A.value]}else{H=-1}}if(H!=-1&&H!=null){B.insertBefore(ct(H),B.firstChild)}ae(F,B)}if(this.mode==Listview.MODE_CHECKBOX&&I.__chk){F.className="checked"}if(this.template.getItemLink){F.onclick=this.itemClick.bind(this,I)}if(Browser.ie6){F.onmouseover=Listview.itemOver;F.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)},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""},updateFilters:function(A){Tooltip.hide();this.resetRowVisibility();var S,O,F;if(this.searchable){S=trim(this.quickSearchBox.value);if(S){this.quickSearchGlass.style.display="none";this.quickSearchClear.style.display="";S=S.toLowerCase().replace(/\s+/g," ");O=S.split(" ");F=O.length}else{this.quickSearchGlass.style.display="";this.quickSearchClear.style.display="none"}}if(!S&&this.nFilters==0&&this.customFilter==null){if(A){this.updateNav();this.refreshRows()}return }var Q={1:function(Y,Z){return Y>Z},2:function(Y,Z){return Y==Z},3:function(Y,Z){return Y<Z},4:function(Y,Z){return Y>=Z},5:function(Y,Z){return Y<=Z},6:function(Y,a,Z){return a<=Y&&Y<=Z}};var M={1:function(Z,Y,a){return Y>a},2:function(Z,Y,a){return Z<=a&&a<=Y},3:function(Z,Y,a){return Z<a},4:function(Z,Y,a){return Y>=a},5:function(Z,Y,a){return Z<=a},6:function(Z,Y,c,a){return c<=Y&&Z<=a}};var N=0;for(var U=0,V=this.data.length;U<V;++U){var D=this.data[U],J=0;nSearchMatches=0,matches=[];D.__hidden=true;if(this.customFilter&&!this.customFilter(D)){continue}for(var T=0,E=this.visibility.length;T<E;++T){var K=this.visibility[T];var B=this.columns[K];if(B.__filter){var H=B.__filter,G=false;if(B.type==null||B.type=="num"){var P=null;if(B.getValue){P=B.getValue(D)}else{if(B.value){P=parseFloat(D[B.value])}}if(!P){P=0}G=(Q[H.type])(P,H.value,H.value2)}else{if(B.type=="range"){var L=B.getMinValue(D),X=B.getMaxValue(D);G=(M[H.type])(L,X,H.value,H.value2)}else{var I=this.getColText(D,B);if(I){I=I.toString().toLowerCase();if(H.invert){G=I.match(H.regex)!=null}else{var W=0;for(var R=0,C=H.words.length;R<C;++R){if(I.indexOf(H.words[R])!=-1){++W}else{break}}G=(W==H.words.length)}}}}if(H.invert){G=!G}if(G){++J}else{break}}if(S){var I=this.getColText(D,B);if(I){I=I.toString().toLowerCase();for(var R=0,C=O.length;R<C;++R){if(!matches[R]){if(I.indexOf(O[R])!=-1){matches[R]=1;++nSearchMatches}}}}}}if((this.nFilters==0||J==this.nFilters)&&(!S||nSearchMatches==F)){D.__hidden=false;++N}}this.filtered=(N<this.data.length);this.nRowsVisible=N;if(A){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(A,B,C){if(this.sort.toString()!=A.toString()){this.sort=A;this.applySort();if(B){this.refreshRows()}if(C){this.updatePound()}}},readPound:function(){if(!this.poundable||!location.hash.length){return }var B=location.hash.substr(1);if(this.tabs){var G=B.indexOf(":");if(G==-1){return }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){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 D=[this.navTop,this.navBot],J=this.nItemsPerPage,H=this.rowOffset,E=this.nRowsVisible,B=0,F=0,C=0,I=0;if(E>0){if(!(this.hideNav&1)){D[0].style.display=""}if(!(this.hideNav&2)){D[1].style.display=""}}else{D[0].style.display=D[1].style.display="none"}if(J){if(H>0){F=1;if(H>=J+J){B=1}}if(H+J<E){C=1;if(H+J+J<E){I=1}}}for(var A=0;A<2;++A){var G=D[A].childNodes;G[0].style.display=(B?"":"none");G[1].style.display=(F?"":"none");G[3].style.display=(C?"":"none");G[4].style.display=(I?"":"none");G=G[2].childNodes;G[0].firstChild.nodeValue=H+1;G[2].firstChild.nodeValue=J?Math.min(H+J,E):E;G[4].firstChild.nodeValue=E}},getTabName:function(){var A=this.name,B=this.data.length;if(B>0&&!this.hideCount){A+=sprintf(LANG.qty,B)}return A},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},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.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=""}};Listview.sortRows=function(C,B){var G=Listview.sort,H=Listview.columns;for(var F=0,A=G.length;F<A;++F){var E,D=H[Math.abs(G[F])-1];if(D.sortFunc){E=D.sortFunc(C,B,G[F])}else{E=strcmp(C[D.value],B[D.value])}if(E!=0){return E*G[F]}}return 0},Listview.sortIndexedRows=function(B,A){var E=Listview.sort,F=Listview.columns,C=F[Math.abs(E[0])-1],D;if(C.sortFunc){D=C.sortFunc(B,A,E[0])}else{D=strcmp(B[C.value],A[C.value])}if(D!=0){return D*E[0]}return(B.__si-A.__si)},Listview.cbSelect=function(B){for(var D=0,A=this.data.length;D<A;++D){var C=this.data[D];var F=B;if(!C.__nochk&&C.__tr){var E=C.__tr.firstChild.firstChild;if(F==null){F=!E.checked}if(E.checked!=F){E.checked=F;C.__tr.className=(E.checked?"checked":"");if(Browser.ie){E.defaultChecked=F;if(Browser.ie6){(Listview.itemOut.bind(C.__tr))()}}}}else{if(F==null){F=true}}C.__chk=F}};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(B,A,C){if(B){A.checked=!A.checked}C.className=(A.checked?"checked":"");if(Browser.ie){A.defaultChecked=A.checked;if(Browser.ie6){(Listview.itemOver.bind(C))()}}};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(B,D){var H="";if(B.__filter){if(B.__filter.invert){H+="!"}H+=B.__filter.text}if(D==null){var D=prompt(sprintf(LANG.prompt_colfilter1+(B.type=="text"?LANG.prompt_colfilter2:LANG.prompt_colfilter3),B.name),H)}if(D!=null){var A={text:"",type:-1};D=trim(D.replace(/\s+/g," "));if(D){if(D.charAt(0)=="!"||D.charAt(0)=="-"){A.invert=1;D=D.substr(1)}if(B.type=="text"){A.type=0;A.text=D;if(A.invert){A.regex=g_createOrRegex(D)}else{A.words=D.toLowerCase().split(" ")}}else{var I,E;if(D.match(/(>|=|<|>=|<=)\s*([0-9\.]+)/)){I=parseFloat(RegExp.$2);if(!isNaN(I)){switch(RegExp.$1){case">":A.type=1;break;case"=":A.type=2;break;case"<":A.type=3;break;case">=":A.type=4;break;case"<=":A.type=5;break}A.value=I;A.text=RegExp.$1+" "+I}}else{if(D.match(/([0-9\.]+)\s*\-\s*([0-9\.]+)/)){I=parseFloat(RegExp.$1);E=parseFloat(RegExp.$2);if(!isNaN(I)&&!isNaN(E)){if(I>E){var F=I;I=E;E=F}if(I==E){A.type=2;A.value=I;A.text="= "+I}else{A.type=6;A.value=I;A.value2=E;A.text=I+" - "+E}}}else{var C=D.toLowerCase().split(" ");if(C.length==1&&!isNaN(I=parseFloat(C[0]))){A.type=2;A.value=I;A.text="= "+I}else{if(B.type=="text"){A.type=0;A.text=D;if(A.invert){A.regex=g_createOrRegex(D)}else{A.words=C}}}}}}if(A.type==-1){alert(LANG.message_invalidfilter);return }}if(!B.__filter||A.text!=B.__filter.text||A.invert!=B.__filter.invert){var G=B.__th.firstChild.firstChild;if(D&&A.text){if(!B.__filter){G.className="q5";++(this.nFilters)}B.__filter=A}else{if(B.__filter){G.className="";--(this.nFilters)}B.__filter=null}this.updateFilters(1)}}};Listview.headerOver=function(B,C,D){var A="";A+='<b class="q1">'+(C.tooltip?C.tooltip:C.name)+"</b>";if(C.__filter){A+="<br />"+sprintf((C.__filter.invert?LANG.tooltip_colfilter2:LANG.tooltip_colfilter1),C.__filter.text)}A+='<br /><span class="q2">'+LANG.tooltip_lvheader1+"</span>";if(this.filtrable&&(C.filtrable==null||C.filtrable)){A+='<br /><span class="q2">'+(Browser.opera?LANG.tooltip_lvheader3:LANG.tooltip_lvheader2)+"</span>"}Tooltip.show(B,A,0,0,"q")};Listview.extraCols={cost:{id:"cost",name:LANG.cost,getValue:function(A){return(A.cost[3]?A.cost[3][0][1]:0)||A.cost[2]||A.cost[1]||A.cost[0]},compute:function(A,B){Listview.funcBox.appendMoney(B,A.cost[0],null,A.cost[1],A.cost[2],A.cost[3])},sortFunc:function(B,A,C){var E=0,D=0;if(B.cost[3]!=null){array_walk(B.cost[3],function(F,G,I,H){E+=Math.pow(10,H)+F[1]})}if(A.cost[3]!=null){array_walk(A.cost[3],function(F,G,I,H){D+=Math.pow(10,H)+F[1]})}return strcmp(E,D)||strcmp(B.cost[2],A.cost[2])||strcmp(B.cost[1],A.cost[1])||strcmp(B.cost[0],A.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}},percent:{id:"percent",name:"%",width:"10%",value:"percent",compute:function(A,B){if(A.count==-1){return"??"}if(A.percent>=1.95){return A.percent.toFixed(0)}else{return parseFloat(A.percent.toFixed(1))}},getVisibleText:function(A){if(A.count==-1){return"??"}if(A.percent>=1.95){return A.percent.toFixed(0)}else{return parseFloat(A.percent.toFixed(1))}}},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],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(C,B,A){if(C==null){return -1}else{if(B==null){return 1}}var F=Math.max(C.length,B.length);for(var E=0;E<F;++E){if(C[E]==null){return -1}else{if(B[E]==null){return 1}}var D=strcmp(A[C[E]],A[B[E]]);if(D!=0){return D}}return 0},location:function(E,F){if(E.location==null){return -1}for(var D=0,B=E.location.length;D<B;++D){if(D>0){ae(F,ct(LANG.comma))}var A=E.location[D];if(A==-1){ae(F,ct(LANG.ellipsis))}else{var C=ce("a");C.className="q1";C.href="/?zone="+A;ae(C,ct(g_zones[A]));ae(F,C)}}},arrayText:function(B,D){if(B==null){return }var E="";for(var C=0,A=B.length;C<A;++C){if(C>0){E+=" "}if(!D[B[C]]){continue}E+=D[B[C]]}return E},createCenteredIcons:function(G,D,N,L){if(G!=null){var J=ce("div"),A=ce("div");if(N){var I=ce("div");I.style.position="relative";I.style.width="1px";var K=ce("div");K.className="q0";K.style.position="absolute";K.style.right="2px";K.style.lineHeight="26px";K.style.fontSize="11px";K.style.whiteSpace="nowrap";ae(K,ct(N));ae(I,K);ae(J,I)}var C=g_items;if(L==1){C=g_spells}for(var E=0,H=G.length;E<H;++E){var M;if(G[E]==null){M=ce("div");M.style.width=M.style.height="26px"}else{var B,F;if(typeof G[E]=="object"){B=G[E][0];F=G[E][1]}else{B=G[E]}if(B){M=C.createIcon(B,0,F)}else{M=Icon.create("inventoryslot_empty",0,null,"javascript:;")}}M.style.cssFloat=M.style.styleFloat="left";ae(J,M)}J.style.margin="0 auto";J.style.textAlign="left";J.style.width=(26*G.length)+"px";A.className="clear";ae(D,J);ae(D,A);return true}},createSocketedIcons:function(I,C,B,E,K){var L=0,H=ce("div"),A=ce("div");for(var D=0,F=I.length;D<F;++D){var J,G=B[D];if(!B||!G){J=Icon.create(null,0,null,"javascript:;")}else{if(g_items[G]){J=g_items.createIcon(G,0)}else{J=Icon.create(g_gems[G].icon,0,null,"/?item="+G)}}J.className+=" iconsmall-socket-"+g_file_gems[I[D]]+(!B||!G?"-empty":"");J.style.cssFloat=J.style.styleFloat="left";if(E&&E[D]){J.insertBefore(ce("var"),J.childNodes[1]);++L}ae(H,J)}H.style.margin="0 auto";H.style.textAlign="left";H.style.width=(26*I.length)+"px";A.className="clear";ae(C,H);ae(C,A);if(K&&L==I.length){H=ce("div");H.style.paddingTop="4px";ae(H,ct(K));ae(C,H)}},getItemType:function(C,B,A){if(A!=null&&g_item_subsubclasses[C]!=null&&g_item_subsubclasses[C][B]!=null){return{url:"/?items="+C+"."+B+"."+A,text:g_item_subsubclasses[C][B][A]}}if(g_item_subclasses[C]!=null){return{url:"/?items="+C+"."+B,text:g_item_subclasses[C][B]}}else{return{url:"/?items="+C,text:g_item_classes[C]}}},getQuestCategory:function(A){if(A>0){return g_zones[A]}else{return g_quest_sorts[-A]}},getFactionCategory:function(B,A){if(B){return g_faction_categories[B]}else{return g_faction_categories[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(C,D,F){if(!g_user.id||!g_report_reasons[F]){return }var A="";if(F==4){A=prompt(LANG.prompt_details,"")}else{if(!confirm(sprintf((C==0?LANG.confirm_report:LANG.confirm_report2),g_report_reasons[F]))){return }}if(A!=null){var E="/?report&type="+C+"&typeid="+D.id+"&reason="+F;if(A){E+="&reasonmore="+urlencode(A)}new Ajax(E);var B=ce("span");ae(B,ct(LANG.lvcomment_reported));this.parentNode.replaceChild(B,this)}},coReportClick:function(B,A,C){this.menu=[[2,g_report_reasons[2],Listview.funcBox.coReport.bind(this,A,B,2)],[1,g_report_reasons[1],Listview.funcBox.coReport.bind(this,A,B,1)],[3,g_report_reasons[3],Listview.funcBox.coReport.bind(this,A,B,3)],[4,g_report_reasons[4],Listview.funcBox.coReport.bind(this,A,B,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,0)])}(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&64){return" comment-gold"}if(C.roles&188){return" comment-green"}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)}},coRate:function(D,B){if(B==0){var A=5;if(g_user.roles&2){A=25}else{if(g_user.roles&16){A=15}}var C=prompt(sprintf(LANG.prompt_customrating,A,A),0);if(C==null){return }else{C|=0;if(C!=0&&Math.abs(C)<=A){B=C}}if(B==0){return }}else{if(g_user.roles&26){B*=5}}new Ajax("/?comment=rate&id="+D.id+"&rating="+B);D.rating+=B;_=D.divHeader.firstChild;_=_.childNodes[_.childNodes.length-3];_.lastChild.firstChild.nodeValue=(D.rating>0?"+":"")+D.rating;Tooltip.hide();de(_.nextSibling);de(_.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 C=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 A=F;if(Browser.ie6){A=ce("div");A.style.width="99%";ae(A,F)}if(E==-1){G.divPost.insertBefore(A,G.divBody.nextSibling)}else{G.__div.insertBefore(A,G.divBody.nextSibling)}C.focus()},coEditAppend:function(L,C,K){var F=Listview.funcBox.coGetCharLimit(K);if(K==1||K==3||K==4){C.user=g_user.name;C.roles=g_user.roles;C.rating=1}else{if(K==2){C.roles=g_user.roles;C.rating=1}}if(K==-1||K==0){var J=ce("div");J.className="comment-edit-modes";ae(J,ct(LANG.compose_mode));var P=ce("a");P.className="selected";P.onclick=Listview.funcBox.coModeLink.bind(P,1,K,C);P.href="javascript:;";ae(P,ct(LANG.compose_edit));ae(J,P);ae(J,ct("|"));var N=ce("a");N.onclick=Listview.funcBox.coModeLink.bind(N,2,K,C);N.href="javascript:;";ae(N,ct(LANG.compose_preview));ae(J,N);ae(L,J)}var A=ce("div");A.style.display="none";A.className="comment-body"+Listview.funcBox.coGetColor(C,K);ae(L,A);var H=ce("div");H.className="comment-edit-body";var G=ce("div");G.className="toolbar";var I=ce("textarea");I.className="comment-editbox";I.rows=10;I.value=C.body;switch(K){case 1:I.name="commentbody";I.onfocus=g_revealCaptcha;break;case 2:I.name="desc";I.originalValue=C.body;break;case 3:I.name="body";I.onfocus=g_revealCaptcha;break;case 4:I.name="sig";I.originalValue=C.body;I.rows=(Browser.gecko?2:3);I.style.height="auto";break}if(K!=-1&&K!=0){var E=ce("h3"),U=ce("a"),O=ce("div"),T=ce("div");var D=Listview.funcBox.coLivePreview.bind(I,C,K,O);if(C.body){U.className="disclosure-off";O.style.display="none"}else{U.className="disclosure-on"}ae(U,ct(LANG.compose_livepreview));ae(E,U);U.href="javascript:;";U.onclick=function(){D(1);U.className="disclosure-"+(g_toggleDisplay(O)?"on":"off")};ns(U);E.className="first";T.className="pad";ae(A,E);ae(A,O);ae(A,T);g_onAfterTyping(I,D,50);aE(I,"focus",function(){D();A.style.display="";if(K!=4){I.style.height="22em"}})}else{if(K!=4){aE(I,"focus",function(){I.style.height="22em"})}}var S=[{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 W=prompt(LANG.prompt_linkurl,"http://");if(W){g_insertTag(I,"[url="+W+"]","[/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(W){return W.replace(/\n/g,"[/li]\n[li]")}},{id:"ol",title:LANG.markup_ol,pre:"[ol]\n[li]",post:"[/li]\n[/ol]",rep:function(W){return W.replace(/\n/g,"[/li]\n[li]")}},{id:"li",title:LANG.markup_li,pre:"[li]",post:"[/li]"}];for(var Q=0,R=S.length;Q<R;++Q){var B=S[Q];if(K==4&&B.id=="quote"){break}var M=ce("button");var V=ce("img");M.setAttribute("type","button");M.title=B.title;if(B.onclick!=null){M.onclick=B.onclick}else{M.onclick=g_insertTag.bind(0,I,B.pre,B.post,B.rep)}V.src="http://static.wowhead.com/images/pixel.gif";V.className="toolbar-"+B.id;ae(M,V);ae(G,M)}ae(H,G);ae(H,I);ae(H,ce("br"));if(K==4){ae(H,ct(sprintf(LANG.compose_limit2,F,3)))}else{ae(H,ct(sprintf(LANG.compose_limit,F)))}ae(L,H);return I},coLivePreview:function(E,F,A,B){if(B!=1&&A.style.display=="none"){return }var C=this,I=Listview.funcBox.coGetCharLimit(F),G=(C.value.length>I?C.value.substring(0,I):C.value);if(F==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:E.roles});if(D){A.innerHTML=D}else{A.innerHTML='<span class="q6">...</span>'}},coEditButton:function(F,E,C){if(E){var A=gE(F.divEdit,"textarea")[0];if(!Listview.funcBox.coValidate(A,C)){return }if(A.value!=F.body){var D=0;if(F.lastEdit!=null){D=F.lastEdit[1]}++D;F.lastEdit=[g_serverTime,D,g_user.name];Listview.funcBox.coUpdateLastEdit(F);var B=Listview.funcBox.coGetCharLimit(C);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(C==-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){switch(A){case 0:case 1:case 2:return 7500;case 4:return 250;default:return 15000}},coModeLink:function(E,A,D){var J=Listview.funcBox.coGetCharLimit(E);var B=Markup.MODE_COMMENT;array_walk(gE(this.parentNode,"a"),function(K){K.className=""});this.className="selected";var C=gE(this.parentNode.parentNode,"textarea")[0],I=C.parentNode,F=I.previousSibling;if(A==4){B=Markup.MODE_SIGNATURE}switch(E){case 1:I.style.display="";F.style.display="none";I.firstChild.focus();break;case 2:I.style.display="none";var G=(C.value.length>J?C.value.substring(0,J):C.value);if(A==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)}}F.innerHTML=Markup.toHtml(G,{mode:B,roles:D.roles});F.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.replace("listview-aci","");this.setSort([-3,2],true,false)},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 D=new Date(E[0]);var A=(g_serverTime-D)/1000;if(B.childNodes[3].firstChild){de(B.childNodes[3].firstChild)}Listview.funcBox.coFormatDate(B.childNodes[3],A,D);var C="";if(F.rating!=null){C+=LANG.lvcomment_patch1+g_getPatchVersion(D)+LANG.lvcomment_patch2}if(E[1]>1){C+=LANG.dash+sprintf(LANG.lvcomment_nedits,E[1])}B.childNodes[4].nodeValue=C;B.style.display=""}else{B.style.display="none"}},coFormatDate:function(E,A,D,F,G){var C;if(A<2592000){txt=sprintf(LANG.date_ago,g_formatTimeElapsed(A));var B=new Date();B.setTime(D.getTime()+(g_localTime-g_serverTime));E.style.cursor="help";E.title=B.toLocaleString()}else{txt=LANG.date_on+g_formatDateSimple(D,F)}if(G==1){txt=txt.substr(0,1).toUpperCase()+txt.substr(1)}C=ct(txt);ae(E,C)},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})},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(E,A,F,J,L,B,K){var I,H=0;if(A>=10000){H=1;I=ce("span");I.className="moneygold";ae(I,ct(Math.floor(A/10000)));ae(E,I);A%=10000}if(A>=100){if(H){ae(E,ct(" "))}else{H=1}I=ce("span");I.className="moneysilver";ae(I,ct(Math.floor(A/100)));ae(E,I);A%=100}if(A>=1||F!=null){if(H){ae(E,ct(" "))}else{H=1}I=ce("span");I.className="moneycopper";ae(I,ct(A));ae(E,I)}if(J!=null&&J!=0){if(H){ae(E,ct(" "))}else{H=1}I=ce("span");I.className="money"+(J<0?"horde":"alliance")+" tip";I.onmouseover=Listview.funcBox.moneyHonorOver;I.onmousemove=Tooltip.cursorUpdate;I.onmouseout=Tooltip.hide;ae(I,ct(number_format(Math.abs(J))));ae(E,I)}if(L>=1){if(H){ae(E,ct(" "))}else{H=1}I=ce("span");I.className="moneyarena tip";I.onmouseover=Listview.funcBox.moneyArenaOver;I.onmousemove=Tooltip.cursorUpdate;I.onmouseout=Tooltip.hide;ae(I,ct(number_format(L)));ae(E,I)}if(B!=null){for(var C=0;C<B.length;++C){if(H){ae(E,ct(" "))}else{H=1}var G=B[C][0];var D=B[C][1];I=ce("a");I.href="/?item="+G;I.className="moneyitem";I.style.backgroundImage="url(http://static.wowhead.com/images/icons/tiny/"+g_items.getIcon(G).toLowerCase()+".gif)";ae(I,ct(D));ae(E,I)}}if(K!=null){if(H){ae(E,ct(" "))}else{H=1}I=ce("span");I.className="moneyachievement tip";I.onmouseover=Listview.funcBox.moneyAchievementOver;I.onmousemove=Tooltip.cursorUpdate;I.onmouseout=Tooltip.hide;ae(I,ct(number_format(K)));ae(E,I)}},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(C,D,B){switch(C){case 3:if(D.p&&g_sources_pvp[D.p]){return{text:g_sources_pvp[D.p]}}break}switch(B){case 0:case 1:case 2:if(D.z){var A={url:"/?zone="+D.z,text:g_zones[D.z]};if(D.t&&C==5){A.pretext=LANG.lvitem_vendorin}if(D.dd){if(D.dd==1){A.posttext=LANG.lvitem_normal}else{if(D.dd==2){A.posttext=LANG.lvitem_heroic}}}return A}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(C,D){var A=ce("a");A.style.fontFamily="Verdana, sans-serif";A.href=this.template.getItemLink(C);ae(A,ct(C.name));if(C.expansion){var B=ce("span");B.className=(C.expansion==1?"bc-icon":"wotlk-icon");ae(B,A);ae(D,B)}else{ae(D,A)}},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",width:"10%",compute:function(B,C){if(B.side){var A=ce("span");A.className=(B.side==1?"alliance-icon":"horde-icon");ae(A,ct(g_sides[B.side]));ae(C,A)}},getVisibleText:function(A){if(A.side){return g_sides[A.side]}},sortFunc:function(B,A,C){return strcmp(g_sides[B.side],g_sides[A.side])}},{id:"category",name:LANG.category,type:"text",width:"16%",compute:function(C,D){if(C.category2!=null){D.className="small q1";var A=ce("a"),B="/?factions="+C.category2;if(C.category){B+="."+C.category}A.href=B;ae(A,ct(Listview.funcBox.getFactionCategory(C.category,C.category2)));ae(D,A)}},getVisibleText:function(A){return Listview.funcBox.getFactionCategory(A.category,A.category2)},sortFunc:function(B,A,D){var C=Listview.funcBox.getFactionCategory;return strcmp(C(B.category,B.category2),C(A.category,A.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(J,B,G){var C=ce("td");C.style.width="1px";C.style.padding="0";C.style.borderRight="none";var D=null,I=null;if(J.stack!=null){D=Listview.funcBox.createTextRange(J.stack[0],J.stack[1])}if(J.avail!=null){I=J.avail}ae(C,g_items.createIcon(J.id,(this.iconSize==null?1:this.iconSize),D,I));ae(G,C);B.style.borderLeft="none";var H=ce("a");H.className="q"+(7-parseInt(J.name.charAt(0)));H.style.fontFamily="Verdana, sans-serif";H.href=this.template.getItemLink(J);if(J.rel){Icon.getLink(C.firstChild).rel=J.rel;H.rel=J.rel}ae(H,ct(J.name.substring(1)));ae(B,H);if(typeof fi_nExtraCols=="number"&&fi_nExtraCols>=5){if(J.source!=null&&J.source.length==1){var E=ce("div");E.className="small2";var A=(J.sourcemore?J.sourcemore[0]:{});var F=0;if(A.t){F=A.t;var H=ce("a");if(A.q!=null){H.className="q"+A.q}else{H.className="q1"}H.href="/?"+g_types[A.t]+"="+A.ti;if(A.n.length<=30){ae(H,ct(A.n))}else{H.title=A.n;ae(H,ct(trim(A.n.substr(0,27))+"..."))}ae(E,H)}else{ae(E,ct(Listview.funcBox.getUpperSource(J.source[0],A)))}ls=Listview.funcBox.getLowerSource(J.source[0],A,F);if(ls!=null){ae(E,ct(LANG.hyphen));if(ls.pretext){ae(E,ct(ls.pretext))}if(ls.url){var H=ce("a");H.className="q1";H.href=ls.url;ae(H,ct(ls.text));ae(E,H)}else{ae(E,ct(ls.text))}if(ls.posttext){ae(E,ct(ls.posttext))}}ae(B,E)}}},getVisibleText:function(B){var D=B.name.substring(1);if(typeof fi_nExtraCols=="number"&&fi_nExtraCols>=5){if(B.source!=null&&B.source.length==1){var C=(B.sourcemore?B.sourcemore[0]:{});var A=0;if(C.t){A=C.t;D+=" "+C.n}else{D+=" "+Listview.funcBox.getUpperSource(B.source[0],C)}ls=Listview.funcBox.getLowerSource(B.source[0],C,A);if(ls!=null){if(ls.pretext){D+=" "+ls.pretext}D+=" "+ls.text;if(ls.posttext){D+=" "+ls.posttext}}}}return D}},{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:"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(B,A,C){return strcmp(g_item_slots[B.slot],g_item_slots[A.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(B,A,C){return strcmp(g_item_glyphs[B.glyph],g_item_glyphs[A.glyph])},hidden:true},{id:"source",name:LANG.source,type:"text",compute:function(I,C){if(this.iconSize==0){C.className="small"}if(I.source!=null){if(I.source.length==1){nw(C);var B=(I.sourcemore?I.sourcemore[0]:{});var F=0;if(B.t){F=B.t;var G=ce("a");if(B.q!=null){G.className="q"+B.q}else{G.className="q1"}G.href="/?"+g_types[B.t]+"="+B.ti;if(this.iconSize==0||B.n.length<=20){ae(G,ct(B.n))}else{G.title=B.n;ae(G,ct(trim(B.n.substr(0,17))+"..."))}ae(C,G)}else{ae(C,ct(Listview.funcBox.getUpperSource(I.source[0],B)))}ls=Listview.funcBox.getLowerSource(I.source[0],B,F);if(this.iconSize!=0&&ls!=null){var A=ce("div");A.className="small2";if(ls.pretext){ae(A,ct(ls.pretext))}if(ls.url){var G=ce("a");G.className="q1";G.href=ls.url;ae(G,ct(ls.text));ae(A,G)}else{ae(A,ct(ls.text))}if(ls.posttext){ae(A,ct(ls.posttext))}ae(C,A)}}else{var H="";for(var D=0,E=I.source.length;D<E;++D){if(D>0){H+=LANG.comma}H+=g_sources[I.source[D]]}return H}}},getVisibleText:function(B){if(B.source!=null){if(B.source.length==1){var D="";var C=(B.sourcemore?B.sourcemore[0]:{});var A=0;if(C.t){A=C.t;D+=" "+C.n}else{D+=" "+Listview.funcBox.getUpperSource(B.source[0],C)}ls=Listview.funcBox.getLowerSource(B.source[0],C,A);if(ls!=null){if(ls.pretext){D+=" "+ls.pretext}D+=" "+ls.text;if(ls.posttext){D+=" "+ls.posttext}}return D}else{return Listview.funcBox.arrayText(B.source,g_sources)}}},sortFunc:function(D,B){var E=Listview.funcBox.assocArrCmp(D.source,B.source,g_sources);if(E!=0){return E}var C=(D.sourcemore&&D.source.length==1?D.sourcemore[0].n:null),A=(B.sourcemore&&B.source.length==1?B.sourcemore[0].n:null);return strcmp(C,A)}},{id:"type",name:LANG.type,type:"text",compute:function(C,D){D.className="small q1";nw(D);var A=ce("a");var B=Listview.funcBox.getItemType(C.classs,C.subclass,C.subsubclass);A.href=B.url;ae(A,ct(B.text));ae(D,A)},getVisibleText:function(A){return Listview.funcBox.getItemType(A.classs,A.subclass,A.subsubclass).text},sortFunc:function(B,A,D){var C=Listview.funcBox.getItemType;return strcmp(C(B.classs,B.subclass,B.subsubclass).text,C(A.classs,A.subclass,A.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){++B}else{D.__nochk=1}}if(B>0){this.mode=1;this._nComparable=B}},createCbControls:function(D,C){if(!C&&this._nComparable<15){return }var B=ce("input"),A=ce("input");B.type=A.type="button";B.value=LANG.button_compare;A.value=LANG.button_deselect;B.onclick=this.template.compareItems.bind(this);A.onclick=Listview.cbSelect.bind(this,false);ae(D,B);ae(D,A)},compareItems:function(){var B=this.getCheckedRows();if(!B.length){return }var A="";array_walk(B,function(C){A+=C.id+";"});su_addToSaved(rtrim(A,";"))}},itemset:{sort:[1],nItemsPerPage:75,searchable:1,filtrable:1,columns:[{id:"name",name:LANG.name,type:"text",align:"left",value:"name",compute:function(B,D){var A=ce("a");A.className="q"+(7-parseInt(B.name.charAt(0)));A.style.fontFamily="Verdana, sans-serif";A.href=this.template.getItemLink(B);ae(A,ct(B.name.substring(1)));ae(D,A);if(B.note){var C=ce("div");C.className="small";ae(C,ct(g_itemset_notes[B.note]));ae(D,C)}},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(B,A,C){if(C>0){return strcmp(B.minlevel,A.minlevel)||strcmp(B.maxlevel,A.maxlevel)}else{return strcmp(B.maxlevel,A.maxlevel)||strcmp(B.minlevel,A.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(B,A){var D=(B.pieces!=null?B.pieces.length:0);var C=(A.pieces!=null?A.pieces.length:0);return strcmp(D,C)}},{id:"type",name:LANG.type,type:"text",compute:function(A,B){return g_itemset_types[A.type]},sortFunc:function(B,A,C){return strcmp(g_itemset_types[B.type],g_itemset_types[A.type])}},{id:"classes",name:LANG.classes,type:"text",compute:function(C,E){if(C.classes!=null){var D="";for(var B=0,A=C.classes.length;B<A;++B){if(B>0){D+=LANG.comma}D+=g_chr_classes[C.classes[B]]}return D}},sortFunc:function(B,A,C){return Listview.funcBox.assocArrCmp(B.classes,A.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(B,D){var A=ce("a");A.style.fontFamily="Verdana, sans-serif";A.href=this.template.getItemLink(B);ae(A,ct(B.name));ae(D,A);if(B.tag!=null){var C=ce("div");C.className="small";ae(C,ct("<"+B.tag+">"));ae(D,C)}},getVisibleText:function(A){var B=A.name;if(A.tag){B+=" <"+A.tag+">"}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,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(B,A,C){if(C>0){return strcmp(B.minlevel,A.minlevel)||strcmp(B.maxlevel,A.maxlevel)||strcmp(B.classification,A.classification)}else{return strcmp(B.maxlevel,A.maxlevel)||strcmp(B.minlevel,A.minlevel)||strcmp(B.classification,A.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(B,A,C){return Listview.funcBox.assocArrCmp(B.location,A.location,g_zones)}},{id:"react",name:LANG.react,type:"text",width:"10%",value:"react",filtrable:0,compute:function(B,F){if(B.react==null){return -1}var C=[LANG.lvnpc_alliance,LANG.lvnpc_horde];var E=0;for(var A=0;A<2;++A){if(B.react[A]!=null){if(E++>0){ae(F,ct(" "))}var D=ce("span");D.className=(B.react[A]<0?"q10":(B.react[A]>0?"q2":"q"));ae(D,ct(C[A]));ae(F,D)}}}},{id:"skin",name:LANG.skin,type:"text",value:"skin",compute:function(B,C){if(B.skin){var A=ce("a");A.className="q1";A.href="/?npcs&filter=cr=35;crs=0;crv="+B.skin;ae(A,ct(B.skin));ae(C,A)}},hidden:1},{id:"petfamily",name:LANG.petfamily,type:"text",width:"12%",compute:function(B,C){C.className="q1";var A=ce("a");A.href="/?pet="+B.family;ae(A,ct(g_pet_families[B.family]));ae(C,A)},getVisibleText:function(A){return g_pet_families[A.family]},sortFunc:function(B,A,C){return strcmp(g_pet_families[B.family],g_pet_families[A.family])},hidden:1},{id:"type",name:LANG.type,type:"text",width:"12%",compute:function(B,C){C.className="small q1";var A=ce("a");A.href="/?npcs="+B.type;ae(A,ct(g_npc_types[B.type]));ae(C,A)},getVisibleText:function(A){return g_npc_types[A.type]},sortFunc:function(B,A,C){return strcmp(g_npc_types[B.type],g_npc_types[A.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(B,C){var A=ce("a");A.style.fontFamily="Verdana, sans-serif";A.href=this.template.getItemLink(B);ae(A,ct(B.name));ae(C,A)}},{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(B,A,C){return Listview.funcBox.assocArrCmp(B.location,A.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(B,C){C.className="small q1";var A=ce("a");A.href="/?objects="+B.type;ae(A,ct(g_object_types[B.type]));ae(C,A)},getVisibleText:function(A){return g_object_types[A.type]},sortFunc:function(B,A,C){return strcmp(g_object_types[B.type],g_object_types[A.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(B,C){var A=ce("a");A.style.fontFamily="Verdana, sans-serif";A.href=this.template.getItemLink(B);ae(A,ct(B.name));ae(C,A)}},{id:"level",name:LANG.level,width:"7%",value:"level",compute:function(A,C){if(A.type||A.daily){var B=ce("div");B.className="small";nw(B);if(A.type&&A.daily){ae(B,ct(sprintf(LANG.lvquest_daily,g_quest_types[A.type])))}else{if(A.daily){ae(B,ct(LANG.daily))}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}if(A.level){B+=" "+A.level}return B},sortFunc:function(B,A,C){return strcmp(B.level,A.level)||strcmp(B.type,A.type)}},{id:"reqlevel",name:LANG.req,tooltip:LANG.tooltip_reqlevel,width:"7%",value:"reqlevel"},{id:"side",name:LANG.side,type:"text",width:"10%",compute:function(A,C){if(A.side){var B=ce("span");if(A.side==1){B.className="alliance-icon"}else{if(A.side==2){B.className="horde-icon"}}ae(B,ct(g_sides[A.side]));ae(C,B)}else{return -1}},getVisibleText:function(A){if(A.side){return g_sides[A.side]}},sortFunc:function(B,A,C){return strcmp(g_sides[B.side],g_sides[A.side])}},{id:"rewards",name:LANG.rewards,filtrable:0,width:"25%",compute:function(B,F){var A=(B.itemchoices!=null||B.itemrewards!=null);if(A){F.style.padding="0";var E,D;if(B.itemchoices&&B.itemchoices.length>1){E=LANG.lvquest_pickone;if(B.itemrewards&&B.itemrewards.length>0){D=LANG.lvquest_alsoget}}Listview.funcBox.createCenteredIcons(B.itemchoices,F,E);Listview.funcBox.createCenteredIcons(B.itemrewards,F,D)}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(F,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(B,A,C){var E=(B.itemchoices!=null?B.itemchoices.length:0)+(B.itemrewards!=null?B.itemrewards.length:0);var D=(A.itemchoices!=null?A.itemchoices.length:0)+(A.itemrewards!=null?A.itemrewards.length:0);return strcmp(E,D)||strcmp((B.xp|0)+(B.money|0),(A.xp|0)+(A.money|0))}},{id:"reputation",name:LANG.reputation,width:"14%",value:"id",hidden:true},{id:"category",name:LANG.category,type:"text",width:"16%",compute:function(B,C){if(B.category!=0){C.className="small q1";var A=ce("a");A.href="/?quests="+B.category2+"."+B.category;ae(A,ct(Listview.funcBox.getQuestCategory(B.category)));ae(C,A)}},getVisibleText:function(A){return Listview.funcBox.getQuestCategory(A.category)},sortFunc:function(B,A,D){var C=Listview.funcBox.getQuestCategory;return strcmp(C(B.category),C(A.category))}}],getItemLink:function(A){return"/?quest="+A.id}},spell:{sort:[1,2],searchable:1,filtrable:1,columns:[{id:"name",name:LANG.name,type:"text",align:"left",span:2,value:"name",compute:function(D,B,H){var C=ce("td"),K;C.style.width="44px";C.style.padding="0";C.style.borderRight="none";if(D.creates!=null){K=g_items.createIcon(D.creates[0],1,Listview.funcBox.createTextRange(D.creates[1],D.creates[2]))}else{K=g_spells.createIcon(D.id,1)}K.style.cssFloat=K.style.styleFloat="left";ae(C,K);ae(H,C);B.style.borderLeft="none";var A=ce("div");var J=ce("a");var G=D.name.charAt(0);if(G!="@"){J.className="q"+(7-parseInt(G))}J.style.fontFamily="Verdana, sans-serif";J.href=this.template.getItemLink(D);ae(J,ct(D.name.substring(1)));ae(A,J);if(D.rank){var F=ce("div");F.className="small2";ae(F,ct(D.rank));ae(A,F)}if(D.races!=null){A.style.position="relative";var F=ce("div");F.className="small";F.style.fontStyle="italic";F.style.position="absolute";F.style.right=F.style.bottom="3px";var I=D.races.toString();if(I=="1,3,4,7,11"){ae(F,ct(g_sides[1]))}else{if(I=="2,5,6,8,10"){ae(F,ct(g_sides[2]))}else{for(var C=0,E=D.races.length;C<E;++C){if(C>0){ae(F,ct(LANG.comma))}ae(F,ct(g_chr_races[D.races[C]]))}}}ae(A,F)}ae(B,A)},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(B,A,C){return strcmp(g_spell_resistances[B.school],g_spell_resistances[A.school])}},{id:"reagents",name:LANG.reagents,align:"left",width:"9%",getValue:function(A){return(A.reagents?A.reagents.length:0)},compute:function(F,C){var A=(F.reagents!=null);if(A){C.style.padding="0";var H=ce("div");var I=F.reagents;H.style.width=(44*I.length)+"px";for(var D=0,G=I.length;D<G;++D){var B=I[D][0];var E=I[D][1];var J=g_items.createIcon(B,1,E);J.style.cssFloat=J.style.styleFloat="left";ae(H,J)}ae(C,H)}},sortFunc:function(B,A){var D=(B.reagents!=null?B.reagents.length:0);var C=(A.reagents!=null?A.reagents.length:0);if(D>0&&D==C){return strcmp(B.reagents.toString(),A.reagents.toString())}else{return strcmp(D,C)}}},{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(B,A,C){return Listview.funcBox.assocArrCmp(B.source,A.source,g_sources)}},{id:"skill",name:LANG.skill,type:"text",width:"16%",getValue:function(A){return A.learnedat},compute:function(E,C,H,K){if(E.skill!=null){var B=ce("div");B.className="small";for(var D=0,G=E.skill.length;D<G;++D){if(D>0){ae(B,ct(LANG.comma))}if(E.skill[D]==-1){ae(B,ct(LANG.ellipsis))}else{if(in_array([7,-2,-3,-5,-6,-7,11,9],E.cat)!=-1){var I=ce("a");I.className="q1";if(in_array([-5,-6,-7],E.cat)!=-1){I.href="/?spells="+E.cat}else{I.href="/?spells="+E.cat+"."+(E.chrclass?E.chrclass+".":"")+E.skill[D]}ae(I,ct(g_spell_skills[E.skill[D]]));ae(B,I)}else{ae(B,ct(g_spell_skills[E.skill[D]]))}}}if(E.learnedat>0){ae(B,ct(" ("));var F=ce("span");if(E.learnedat==9999){F.className="q0";ae(F,ct("??"))}else{if(E.learnedat>0){ae(F,ct(E.learnedat));F.style.fontWeight="bold"}}ae(B,F);ae(B,ct(")"))}ae(C,B);if(E.colors!=null){this.template.columns[K].type=null;var A=E.colors,J=0;for(var D=0;D<A.length;++D){if(A[D]>0){++J;break}}if(J>0){J=0;B=ce("div");B.className="small";B.style.fontWeight="bold";for(var D=0;D<A.length;++D){if(A[D]>0){if(J++>0){ae(B,ct(" "))}var L=ce("span");L.className="r"+(D+1);ae(L,ct(A[D]));ae(B,L)}}ae(C,B)}}}},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(B,A){var D=strcmp(B.learnedat,A.learnedat);if(D!=0){return D}if(B.colors!=null&&A.colors!=null){for(var C=0;C<4;++C){D=strcmp(B.colors[C],A.colors[C]);if(D!=0){return D}}}return Listview.funcBox.assocArrCmp(B.skill,A.skill,g_spell_skills)}}],getItemLink:function(A){return"/?spell="+A.id}},zone:{sort:[1],nItemsPerPage:-1,searchable:1,filtrable:1,columns:[{id:"name",name:LANG.name,type:"text",align:"left",value:"name",compute:function(B,D){var A=ce("a");A.style.fontFamily="Verdana, sans-serif";A.href=this.template.getItemLink(B);ae(A,ct(B.name));if(B.expansion){var C=ce("span");C.className=(B.expansion==1?"bc-icon":"wotlk-icon");ae(C,A);ae(D,C)}else{ae(D,A)}},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(B,A,C){if(C>0){return strcmp(B.minlevel,A.minlevel)||strcmp(B.maxlevel,A.maxlevel)}else{return strcmp(B.maxlevel,A.maxlevel)||strcmp(B.minlevel,A.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(B,A,C){return strcmp(g_zone_territories[B.territory],g_zone_territories[A.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(B,A,C){return strcmp(g_zone_instancetypes[B.instance],g_zone_instancetypes[A.instance])||strcmp(B.instance,A.instance)||strcmp(B.nplayers,A.nplayers)}},{id:"category",name:LANG.category,type:"text",width:"15%",compute:function(B,C){C.className="small q1";var A=ce("a");A.href="/?zones="+B.category;ae(A,ct(g_zone_categories[B.category]));ae(C,A)},getVisibleText:function(A){return g_zone_categories[A.category]},sortFunc:function(B,A,C){return strcmp(g_zone_categories[B.category],g_zone_categories[A.category])}}],getItemLink:function(A){return"/?zone="+A.id}},comment:{sort:[1],mode:2,nItemsPerPage:40,poundable:2,columns:[{value:"number"},{value:"id"},{value:"rating"}],compute:function(V,h){var o,T=new Date(V.date),B=(g_serverTime-T)/1000,E=(g_user.roles&26)!=0,k=V.rating<0||V.purged||V.deleted,c=E||V.user.toLowerCase()==g_user.name.toLowerCase(),G=c&&V.deleted==0,i=c&&V.replyTo!=V.id,n=((V.roles&190)==0),e=V.purged==0&&V.deleted==0&&g_user.id&&V.user.toLowerCase()!=g_user.name.toLowerCase()&&in_array(V.raters,g_user.id,function(p){return p[0]})==-1,I=V.rating>=0&&(g_user.id==0||e);V.ratable=e;h.className="comment";if(V.indent){h.className+=" comment-indent"}var Y=ce("div");var N=ce("div");var L=ce("div");V.divHeader=Y;V.divBody=N;V.divLinks=L;Y.className=(k?"comment-header-bt":"comment-header");var H=ce("div");H.className="comment-rating";if(k){var Q=ce("a");Q.href="javascript:;";Q.onclick=Listview.funcBox.coToggleVis.bind(Q,V);ae(Q,ct(LANG.lvcomment_show));ae(H,Q);ae(H,ct(" "+String.fromCharCode(160)+" "))}var P=ce("b");ae(P,ct(LANG.lvcomment_rating));var R=ce("span");ae(R,ct((V.rating>0?"+":"")+V.rating));ae(P,R);ae(H,P);ae(H,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,V,1);l.onclick=Listview.funcBox.coRate.bind(l,V,-1);if(E){var D=ce("a");D.href="javascript:;";D.onclick=Listview.funcBox.coRate.bind(D,V,0);D.onmouseover=Listview.funcBox.coCustomRatingOver;D.onmousemove=Tooltip.cursorUpdate;D.onmouseout=Tooltip.hide;ae(D,ct("[~]"));ae(C,D);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(H,C);if(!I){C.style.display="none"}ae(Y,H);ae(Y,ct(LANG.lvcomment_by));var g=ce("a");g.href="/?user="+V.user;ae(g,ct(V.user));ae(Y,g);ae(Y,ct(" "));var A=ce("a");A.className="q0";A.id="comments:id="+V.id;A.href="#"+A.id;Listview.funcBox.coFormatDate(A,B,T);A.style.cursor="pointer";ae(Y,A);ae(Y,ct(LANG.lvcomment_patch1+g_getPatchVersion(T)+LANG.lvcomment_patch2));ae(h,Y);N.className="comment-body"+Listview.funcBox.coGetColor(V);if(V.indent){N.className+=" comment-body-indent"}N.innerHTML=Markup.toHtml(V.body,{mode:Markup.MODE_COMMENT,roles:V.roles});ae(h,N);if((V.roles&26)==0||g_user.roles&26){var f=ce("div");V.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 F=ce("span");ae(f,F);ae(f,ct(" "));Listview.funcBox.coUpdateLastEdit(V);if(k){f.style.display="none"}ae(h,f)}L.className="comment-links";if(c){var j=ce("span");var Z=ce("a");ae(Z,ct(LANG.lvcomment_edit));Z.onclick=Listview.funcBox.coEdit.bind(this,V,0);ns(Z);Z.href="javascript:;";ae(j,Z);ae(j,ct("|"));ae(L,j)}if(G){var M=ce("span");var K=ce("a");ae(K,ct(LANG.lvcomment_delete));K.onclick=Listview.funcBox.coDelete.bind(this,V);ns(K);K.href="javascript:;";ae(M,K);ae(M,ct("|"));ae(L,M)}if(i){var a=ce("span");var X=ce("a");ae(X,ct(LANG.lvcomment_detach));X.onclick=Listview.funcBox.coDetach.bind(this,V);ns(X);X.href="javascript:;";ae(a,X);ae(a,ct("|"));ae(L,a)}if(n){var W=ce("span");var U=ce("a");ae(U,ct(LANG.lvcomment_report));if(g_user.id>0){U.onclick=Listview.funcBox.coReportClick.bind(U,V,0);U.href="javascript:;"}else{U.href="/?account=signin"}ae(W,U);ae(W,ct("|"));ae(L,W)}var S=ce("a");ae(S,ct(LANG.lvcomment_reply));if(g_user.id>0){S.onclick=Listview.funcBox.coReply.bind(this,V);S.href="javascript:;"}else{S.href="/?account=signin"}ae(L,S);if(k){N.style.display="none";L.style.display="none"}ae(h,L)},createNote:function(F){var E=ce("small");var A=ce("a");if(g_user.id>0){A.href="javascript:;";A.onclick=co_addYourComment}else{A.href="/?account=signin"}ae(A,ct(LANG.lvcomment_add));ae(E,A);var D=ce("span");D.style.padding="0 5px";D.style.color="white";ae(D,ct("|"));ae(E,D);ae(E,ct(LANG.lvcomment_sort));var C=ce("a");C.href="javascript:;";ae(C,ct(LANG.lvcomment_sortdate));C.onclick=Listview.funcBox.coSortDate.bind(this,C);ae(E,C);ae(E,ct(LANG.comma));var B=ce("a");B.href="javascript:;";ae(B,ct(LANG.lvcomment_sortrating));B.onclick=Listview.funcBox.coSortHighestRatedFirst.bind(this,B);ae(E,B);C.onclick();ae(F,E)},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(D,C){var A=ce("a");A.style.fontFamily="Verdana, sans-serif";A.href=this.template.getItemLink(D);ae(A,ct(D.subject));ae(C,A);var B=ce("div");B.className="small";ae(B,ct(LANG.types[D.type][0]));ae(C,B)}},{id:"preview",name:LANG.preview,align:"left",width:"50%",value:"preview",compute:function(H,G){var E=ce("div");E.className="crop";if(H.rating>=10){E.className+=" comment-green"}ae(E,ct(Markup.removeTags(H.preview,{mode:(H.rating!=null?Markup.MODE_COMMENT:Markup.MODE_ARTICLE)})));ae(G,E);var A=H.rating!=null;var D=H.user!=null;if(A||D){E=ce("div");E.className="small3";if(D){ae(E,ct(LANG.lvcomment_by));var B=ce("a");B.href="/?user="+H.user;ae(B,ct(H.user));ae(E,B);if(A){ae(E,ct(LANG.hyphen))}}if(A){ae(E,ct(LANG.lvcomment_rating+(H.rating>0?"+":"")+H.rating));var C=ce("span"),F="";C.className="q10";if(H.deleted){F=LANG.lvcomment_deleted}else{if(H.purged){F=LANG.lvcomment_purged}}ae(C,ct(F));ae(E,C)}ae(G,E)}}},{id:"posted",name:LANG.posted,width:"16%",value:"elapsed",compute:function(E,D){var B=new Date(E.date),A=(g_serverTime-B)/1000;var C=ce("span");Listview.funcBox.coFormatDate(C,A,B,0,1);ae(D,C)}}],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(I,E,H){var O,M=new Date(I.date),B=(g_serverTime-M)/1000;E.className="screenshot-cell";E.vAlign="bottom";var N=ce("a");N.href="#screenshots:id="+I.id;N.onclick=rf2;var R=ce("img"),P=Math.min(150/I.width,150/I.height);R.src="http://static.wowhead.com/uploads/screenshots/thumb/"+I.id+".jpg";ae(N,R);ae(E,N);var L=ce("div");L.className="screenshot-cell-user";var J=(I.user!=null&&I.user.length);if(J){N=ce("a");N.href="/?user="+I.user;ae(N,ct(I.user));ae(L,ct(LANG.lvscreenshot_from));ae(L,N);ae(L,ct(" "))}var G=ce("span");if(J){Listview.funcBox.coFormatDate(G,B,M)}else{Listview.funcBox.coFormatDate(G,B,M,0,1)}ae(L,G);ae(E,L);L=ce("div");L.style.position="relative";L.style.height="1em";if(g_locale.id!=0&&I.caption){I.caption=""}var A=(I.caption!=null&&I.caption.length);var F=(I.subject!=null&&I.subject.length);if(A||F){var Q=ce("div");Q.className="screenshot-caption";if(F){var D=ce("small");ae(D,ct(LANG.types[I.type][0]+LANG.colon));var C=ce("a");ae(C,ct(I.subject));C.href="/?"+g_types[I.type]+"="+I.typeId;ae(D,C);ae(Q,D);if(A&&I.caption.length){ae(D,ct(" (...)"))}ae(D,ce("br"))}if(A){aE(E,"mouseover",Listview.funcBox.ssCellOver.bind(Q));aE(E,"mouseout",Listview.funcBox.ssCellOut.bind(Q));var K=ce("span");K.innerHTML=I.caption;ae(Q,K)}ae(L,Q)}aE(E,"click",Listview.funcBox.ssCellClick.bind(this,H));ae(E,L)},createNote:function(C){if(typeof g_pageInfo=="object"&&g_pageInfo.type>0){var B=ce("small");var A=ce("a");if(g_user.id>0){A.href="javascript:;";A.onclick=ss_submitAScreenshot}else{A.href="/?account=signin"}ae(A,ct(LANG.lvscreenshot_submit));ae(B,A);ae(C,B)}},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(A,H,E){var C=ce("td");C.style.width="1px";C.style.padding="0";C.style.borderRight="none";ae(C,Icon.create(A.icon,0));ae(E,C);H.style.borderLeft="none";var G=ce("div");var B=ce("a");B.style.fontFamily="Verdana, sans-serif";B.href=this.template.getItemLink(A);ae(B,ct(A.name));if(A.expansion){var D=ce("span");D.className=(A.expansion==1?"bc-icon":"wotlk-icon");ae(D,B);ae(G,D)}else{ae(G,B)}if(A.exotic){G.style.position="relative";var F=ce("div");F.className="small";F.style.fontStyle="italic";F.style.position="absolute";F.style.right="3px";F.style.bottom="0px";ae(F,ct(LANG.lvpet_exotic));ae(G,F)}ae(H,G)},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(B,A,C){if(C>0){return strcmp(B.minlevel,A.minlevel)||strcmp(B.maxlevel,A.maxlevel)}else{return strcmp(B.maxlevel,A.maxlevel)||strcmp(B.minlevel,A.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 C="";for(var D=0,A=B.spells.length;D<A;++D){if(B.spells[D]){C+=g_spells[B.spells[D]]["name_"+g_locale.name]}}return C}},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(B,A){if(!B.spells||!A.spells){return 0}return strcmp(B.spellCount,A.spellCount)||strcmp(B.spells,A.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(B,A){return strcmp(A.foodCount,B.foodCount)||Listview.funcBox.assocArrCmp(B.diet,A.diet,g_pet_foods)}},{id:"type",name:LANG.type,type:"text",compute:function(A,C){if(A.type!=null){C.className="small q1";var B=ce("a");B.href="/?pets="+A.type;ae(B,ct(g_pet_types[A.type]));ae(C,B)}},getVisibleText:function(A){if(A.type!=null){return g_pet_types[A.type]}},sortFunc:function(B,A,C){return strcmp(g_pet_types[B.type],g_pet_types[A.type])}}],getItemLink:function(A){return"/?pet="+A.id},getStatPct:function(A){var B=ce("span");if(!isNaN(A)&&A>0){B.className="q2";ae(B,ct("+"+A+"%"))}else{if(!isNaN(A)&&A<0){B.className="q10";ae(B,ct(A+"%"))}}return B}},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(B,G,E){var A=null;if(B.who&&B.completed){A="who="+B.who+"&when="+B.completed.getTime()}var D=ce("td");D.style.width="1px";D.style.padding="0";D.style.borderRight="none";ae(D,g_achievements.createIcon(B.id,1));Icon.getLink(D.firstChild).rel=A;ae(E,D);G.style.borderLeft="none";var C=ce("a");C.style.fontFamily="Verdana, sans-serif";C.href=this.template.getItemLink(B);C.rel=A;ae(C,ct(B.name));ae(G,C);if(B.description!=null){var F=ce("div");F.className="small";ae(F,ct(B.description));ae(G,F)}},getVisibleText:function(A){var B=A.name;if(A.description){B+=" "+A.description}return B}},{id:"location",name:LANG.location,type:"text",width:"15%",compute:function(A,C){if(A.zone){var B=ce("a");B.className="q1";B.href="/?zone="+A.zone;ae(B,ct(g_zones[A.zone]));ae(C,B)}},getVisibleText:function(A){return Listview.funcBox.arrayText(A.zone,g_zones)},sortFunc:function(B,A,C){return Listview.funcBox.assocArrCmp(B.zone,A.zone,g_zones)}},{id:"side",name:LANG.side,type:"text",width:"10%",compute:function(A,C){if(A.side){var B=ce("span");if(A.side==1){B.className="alliance-icon"}else{if(A.side==2){B.className="horde-icon"}}ae(B,ct(g_sides[A.side]));ae(C,B)}else{return -1}},getVisibleText:function(A){if(A.side){return g_sides[A.side]}},sortFunc:function(B,A,C){return strcmp(g_sides[B.side],g_sides[A.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:"category",name:LANG.category,type:"text",width:"15%",compute:function(A,C){C.className="small q1";var B=ce("a");B.href="/?achievements="+A.category;ae(B,ct(g_achievement_categories[A.category]));ae(C,B)},getVisibleText:function(A){return g_achievement_categories[A.category]},sortFunc:function(B,A,C){return strcmp(g_achievement_categories[B.category],g_achievement_categories[A.category])},hidden:true}],getItemLink:function(A){return"/?achievement="+A.id}},profile:{sort:[],nItemsPerPage:50,searchable:1,filtrable:1,columns:[{id:"name",name:LANG.name,value:"name",type:"text",align:"left",span:2,compute:function(B,C,F){if(B.level){var D=ce("td");D.style.width="1px";D.style.padding="0";D.style.borderRight="none";ae(D,Icon.create(B.icon?B.icon:"chr_"+g_file_races[B.race]+"_"+g_file_genders[B.gender]+"_"+g_file_classes[B.classs]+"0"+(B.level>59?(Math.floor((B.level-60)/10)+2):1),1));ae(F,D);C.style.borderLeft="none"}else{C.colSpan=2}var A=ce("div");A.style.position="relative";var H=ce("a");H.style.fontFamily="Verdana, sans-serif";H.href=this.template.getItemLink(B);ae(H,ct(B.name));ae(A,H);var E=ce("div");E.className="small";if(B.guild){var H=ce("a");H.className="q1";H.href="/?profiles="+B.region+"."+B.realm+"&filter=cr=9;crs=0;crv="+str_replace(urlencode(B.guild),"%20","+")+"&roster=1";ae(H,ct(B.guild));ae(E,ct("<"));ae(E,H);ae(E,ct(">"))}else{if(B.description){ae(E,ct(B.description))}}var I=ce("span"),G="";I.className="q10";if(B.deleted){G=LANG.lvcomment_deleted}ae(I,ct(G));ae(E,I);ae(A,E);var E=ce("div");E.className="small";E.style.fontStyle="italic";E.style.position="absolute";E.style.right="3px";E.style.bottom="0px";if(!B.publicc&&!B.region&&!B.realm){ae(E,ct("Private"))}ae(A,E);ae(C,A)},getVisibleText:function(A){var B=A.name;if(A.guild){B+=" "+A.guild}return B}},{id:"faction",name:LANG.faction,type:"text",compute:function(B,E){if(!B.size&&!B.members&&!B.level){return }var D=ce("div"),C=ce("div"),A;A=Icon.create("faction_"+g_file_factions[B.faction+1],0);A.onmouseover=function(){Tooltip.show(this,g_sides[B.faction+1],0,0,"q")};A.onmousemove=Tooltip.cursorUpdate;A.onmouseout=Tooltip.hide;A.style.cssFloat=A.style.syleFloat="left";D.style.margin="0 auto";D.style.textAlign="left";D.style.width="26px";C.className="clear";ae(D,A);ae(E,D);ae(E,C)},getVisibleText:function(A){return g_sides[A.faction+1]},sortFunc:function(B,A,C){return strcmp(this.getVisibleText(B),this.getVisibleText(A))}},{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(B,E){if(B.race){var D=ce("div"),C=ce("div"),A;A=Icon.create("race_"+g_file_races[B.race]+"_"+g_file_genders[B.gender],0);A.onmouseover=function(){Tooltip.show(this,g_chr_races[B.race],0,0,"q")};A.onmousemove=Tooltip.cursorUpdate;A.onmouseout=Tooltip.hide;A.style.cssFloat=A.style.syleFloat="left";D.style.margin="0 auto";D.style.textAlign="left";D.style.width="26px";C.className="clear";ae(D,A);ae(E,D);ae(E,C)}},getVisibleText:function(A){return g_file_genders[A.gender]+" "+g_chr_races[A.race]},sortFunc:function(B,A,C){return strcmp(g_chr_races[B.race],g_chr_races[A.race])},hidden:1},{id:"classs",name:LANG.classs,type:"text",compute:function(B,E){if(B.classs){var D=ce("div"),C=ce("div"),A;A=Icon.create("class_"+g_file_classes[B.classs],0);A.onmouseover=function(){Tooltip.show(this,g_chr_classes[B.classs],0,0,"q")};A.onmousemove=Tooltip.cursorUpdate;A.onmouseout=Tooltip.hide;A.style.cssFloat=A.style.syleFloat="left";D.style.margin="0 auto";D.style.textAlign="left";D.style.width="26px";C.className="clear";ae(D,A);ae(E,D);ae(E,C)}else{return -1}},getVisibleText:function(A){if(A.classs){return g_chr_classes[A.classs]}},sortFunc:function(B,A,C){return strcmp(this.getVisibleText(B),this.getVisibleText(A))},hidden:1},{id:"level",name:LANG.level,value:"level",hidden:1},{id:"talents",name:LANG.talents,type:"text",compute:function(D,F){if(!D.level){return }var B,C,A=ce("a");if(D.talenttree1||D.talenttree2||D.talenttree3){if(D.talentspec>0){B="classes/trees/"+g_file_classes[D.classs]+"_"+D.talentspec;C=g_chr_specs[D.classs][D.talentspec-1]}else{B="hybrid";C=g_chr_specs[0]}}else{B="untalented";C=g_chr_specs["-1"]}var E=ce("div");E.style.width="82px";E.style.height="23px";E.style.margin="0 auto";E.style.lineHeight="23px";E.style.backgroundImage="url(http://static.wowhead.com/images/talent/"+B+".gif)";E.style.backgroundRepeat="no-repeat";E.style.backgroundPosition="left";var A=ce("a");A.className="small q1";A.style.padding="7px 0 7px 28px";A.style.fontWeight="bold";A.href=this.template.getItemLink(D)+"#talents";A.tooltip='<span class="q">'+C+"</span>";A.onmouseover=Icon.over;A.onmousemove=Tooltip.cursorUpdate;A.onmouseout=Tooltip.hide;ae(A,ct(D.talenttree1+" / "+D.talenttree2+" / "+D.talenttree3));ae(E,A);ae(F,E)},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(B,A,C){return strcmp(this.getVisibleText(B),this.getVisibleText(A))},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(B,C){if(B.guildrank>0){return sprintf(LANG.rankno,B.guildrank)}else{if(B.guildrank==0){var A=ce("b");ae(A,ct(LANG.guildleader));ae(C,A)}}},sortFunc:function(B,A,C){return strcmp((B.guildrank>=0?B.guildrank:11),(A.guildrank>=0?A.guildrank:11))},hidden:1},{id:"rating",name:LANG.rating,value:"rating",compute:function(A,B){if(A.roster){return A.arenateam[A.roster].rating}return A.rating},sortFunc:function(B,A,C){if(B.roster&&A.roster){return strcmp(B.arenateam[B.roster].rating,A.arenateam[A.roster].rating)}return strcmp(B.rating,A.rating)},hidden:1},{id:"location",name:LANG.location,type:"text",compute:function(C,D){var A;if(C.region){if(C.realm){A=ce("a");A.className="q1";A.href="/?profiles="+C.region+"."+C.realm;ae(A,ct(C.realmname));ae(D,A);ae(D,ce("br"))}var B=ce("small");A=ce("a");A.className="q1";A.href="/?profiles="+C.region;ae(A,ct(C.region.toUpperCase()));ae(B,A);if(C.battlegroup){ae(B,ct(LANG.hyphen));A=ce("a");A.className="q1";A.href="/?profiles="+C.region+"."+C.battlegroup;ae(A,ct(C.battlegroupname));ae(B,A)}ae(D,B)}},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(B,A,C){if(B.region!=A.region){return strcmp(B.region,A.region)}if(B.battlegroup!=A.battlegroup){return strcmp(B.battlegroup,A.battlegroup)}return strcmp(B.realm,A.realm)}},{id:"guild",name:LANG.guild,value:"guild",type:"text",compute:function(B,C){if(!B.region||!B.battlegroup||!B.realm||!B.guild){return }var A=ce("a");A.className="q1";A.href="/?profiles="+B.region+"."+B.realm+"&filter=cr=9;crs=0;crv="+str_replace(urlencode(B.guild),"%20","+")+"&roster=1";ae(A,ct(B.guild));ae(C,A)}}],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+"."+pr_getCharacterName(A.name)}else{return"/?profile="+A.id}}}}},model:{sort:[],mode:3,nItemsPerPage:40,nItemsPerRow:4,poundable:2,columns:[],compute:function(B,H,C){H.className="screenshot-cell";H.vAlign="bottom";var G=ce("div");G.className="pet-model";var A=ce("a");A.className="pet-zoom";A.href="javascript:;";A.onclick=this.template.modelShow.bind(this.template,B.npcId,B.displayId);ae(G,A);var E=ce("div");E.id="pm"+B.displayId;ae(G,E);ae(H,G);G=ce("div");G.className="screenshot-cell-user";A=ce("a");A.href=this.template.getItemLink(B);ae(A,ct(B.skin));ae(G,A);ae(G,ct(" ("+B.count+")"));ae(H,G);G=ce("div");G.style.position="relative";G.style.height="1em";var F=ce("div");F.className="screenshot-caption";var D=ce("small");ae(D,ct(LANG.level+": "));ae(D,ct(B.minLevel+(B.minLevel==B.maxLevel?"":LANG.hyphen+(B.maxLevel==9999?"??":B.maxLevel))));ae(D,ce("br"));ae(F,D);ae(G,F);ae(H,G);setTimeout(this.template.appendFlash.bind(E,B),1)},getItemLink:function(A){return"/?npcs=1&filter="+(A.family?"fa="+A.family+";":"")+"minle=1;cr=35;crs=0;crv="+A.skin},modelShow:function(B,A){ModelViewer.show({type:1,typeId:B,displayId:A,onHide:this.modelHide.bind(this)});this.enableViewers(false)},modelHide:function(){this.enableViewers(true)},enableViewers:function(B){var D=gE(ge("lkljbjkb574"),"object");for(var C=0,A=D.length;C<A;++C){D[C].style.display=(B?"":"none")}},appendFlash:function(A){var C={model:A.displayId,modelType:8,contentPath:"http://static.wowhead.com/modelviewer/",blur:(OS.mac?"0":"1")};var B={quality:"high",allowscriptaccess:"always",menu:false,bgcolor:"#101010"};swfobject.embedSWF("http://static.wowhead.com/modelviewer/ModelView.swf",this.id,"100%","100%","10.0.0","http://static.wowhead.com/modelviewer/expressInstall.swf",C,B)}}};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_petCalc,"/?petcalc=");Menu.fixUrls(mn_forums,"/?forums&board=",null,true);var g_locale={id:0,name:"enus"};var g_localTime=new Date();var g_user={id:0,name:"",roles:0};var g_items={};var g_quests={};var g_spells={};var g_achievements={};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"};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){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.getIcon=function(A){if(g_spells[A]!=null){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){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 $WowheadPower=new function(){var Y,f,M,W,P,W,G,K,I,U=0,j=0,L=1,F=2,N=3,Q=4,H=3,R=5,h=6,O=10,k=15,Z=15,V={3:[g_items,"item"],5:[g_quests,"quest"],6:[g_spells,"spell"],10:[g_achievements,"achievement"]};function e(){aE(document,"mouseover",X)}function A(l){var n=g_getCursorPos(l);K=n.x;I=n.y}function g(z,w){if(z.nodeName!="A"&&z.nodeName!="AREA"){return -2323}if(!z.href.length){return }if(z.rel.indexOf("np")!=-1){return }var u,r,o,n,q={};P=q;var l=function(p,AA,t){if(AA=="buff"||AA=="sock"){q[AA]=true}else{if(AA=="rand"||AA=="ench"||AA=="lvl"||AA=="c"){q[AA]=parseInt(t)}else{if(AA=="gems"||AA=="pcs"){q[AA]=t.split(":")}else{if(AA=="who"||AA=="domain"){q[AA]=t}else{if(AA=="when"){q[AA]=new Date(parseInt(t))}}}}}};r=2;o=3;if(z.href.indexOf("http://")==0){u=1;n=z.href.match(/http:\/\/(www|dev|fr|es|de|ru|wotlk|ptr)?\.?wowhead\.com\/\?(item|quest|spell|achievement)=([0-9]+)/)}else{n=z.href.match(/()\?(item|quest|spell|achievement)=([0-9]+)/)}if(n==null&&z.rel){u=0;r=1;o=2;n=z.rel.match(/(item|quest|spell|achievement).?([0-9]+)/)}if(z.rel){z.rel.replace(/([a-zA-Z]+)=?([a-zA-Z0-9:-]*)/g,l);if(q.gems&&q.gems.length>0){var v;for(v=Math.min(3,q.gems.length-1);v>=0;--v){if(parseInt(q.gems[v])){break}}++v;if(v==0){delete q.gems}else{if(v<q.gems.length){q.gems=q.gems.slice(0,v)}}}}if(n){var y,s="www";if(q.domain){s=q.domain}else{if(u&&n[u]){s=n[u]}else{var x=location.hostname.match(/(www|dev|fr|es|de|ru|wotlk|ptr)\.?wowhead\.com/);if(x!=null){s=x[1]}}}y=g_getLocaleFromDomain(s);if(s=="wotlk"||s=="ptr"){s="www"}W=s;G=z;if(z.href.indexOf("#")!=-1&&document.location.href.indexOf(n[r]+"="+n[o])!=-1){return }U=(z.parentNode.className.indexOf("icon")==0?1:0);if(!z.onmouseout){if(U==0){z.onmousemove=T}z.onmouseout=S}A(w);c(g_getIdFromTypeName(n[r]),n[o],y,q)}}function X(o){o=$E(o);var n=o._target;var l=0;while(n!=null&&l<3&&g(n,o)==-2323){n=n.parentNode;++l}}function T(l){l=$E(l);A(l);Tooltip.move(K,I,0,0,k,Z)}function S(){Y=null;G=null;Tooltip.hide()}function a(l){return(P.buff?"buff_":"tooltip_")+g_locales[l]}function i(o,p,n){var l=V[o][0];if(l[p]==null){l[p]={}}if(l[p].status==null){l[p].status={}}if(l[p].status[n]==null){l[p].status[n]=j}}function c(p,r,n,q){if(!q){q={}}var o=B(r,q);Y=p;f=o;M=n;P=q;i(p,o,n);var l=V[p][0];if(l[o].status[n]==Q||l[o].status[n]==N){D(l[o][a(n)],l[o].icon)}else{if(l[o].status[n]==L){D(LANG.tooltip_loading)}else{E(p,r,n,null,q)}}}function E(u,n,w,t,q){var v=B(n,q);var s=V[u][0];if(s[v].status[w]!=j&&s[v].status[w]!=F){return }s[v].status[w]=L;if(!t){s[v].timer=setTimeout(function(){C.apply(this,[u,v,w])},333)}var o="";for(var r in q){if(r!="rand"&&r!="ench"&&r!="gems"&&r!="sock"){continue}if(typeof q[r]=="object"){o+="&"+r+"="+q[r].join(":")}else{if(r=="sock"){o+="&sock"}else{o+="&"+r+"="+q[r]}}}var l="http://"+W+".wowhead.com/?"+V[u][1]+"="+n+o+"&locale="+w+"&power&lol";g_ajaxIshRequest(l)}function D(p,q){if(G._fixTooltip){p=G._fixTooltip(p,Y,f,G)}if(!p){p=LANG["tooltip_"+g_types[Y]+"notfound"];q="inv_misc_questionmark"}else{if(P.pcs&&P.pcs.length){var r=0;for(var o=0,l=P.pcs.length;o<l;++o){if(m=p.match(new RegExp("<span><!--si([0-9]+:)*"+P.pcs[o]+"(:[0-9]+)*-->"))){p=p.replace(m[0],'<span class="q8"><!--si'+P.pcs[o]+"-->");++r}}if(r>0){p=p.replace("(0/","("+r+"/");p=p.replace(new RegExp("<span>\\(([0-"+r+"])\\)","g"),'<span class="q2">($1)')}}if(P.c){p=p.replace(/<span class="c([0-9]+?)">(.+?)<\/span><br \/>/g,'<span class="c$1" style="display: none">$2</span>');p=p.replace(new RegExp('<span class="c('+P.c+')" style="display: none">(.+?)</span>',"g"),'<span class="c$1">$2</span><br />')}if(P.lvl){p=p.replace(/\(<!--r([0-9]+):([0-9]+):([0-9]+)-->([0-9.%]+)(.+?)([0-9]+)\)/g,function(u,x,w,t,n,z,s){var y=g_convertRatingToPercent(P.lvl,w,t);y=(Math.round(y*100)/100);if(w!=12&&w!=37){y+="%"}return"(<!--r"+P.lvl+":"+w+":"+t+"-->"+y+z+P.lvl+")"})}if(P.who&&P.when){p=p.replace("<table><tr><td><br />",'<table><tr><td><br /><span class="q2">'+sprintf(LANG.tooltip_achievementcomplete,P.who,P.when.getMonth()+1,P.when.getDate(),P.when.getFullYear())+"</span><br /><br />");p=p.replace(/class="q0"/g,'class="r3"')}}if(U==1){Tooltip.setIcon(null);Tooltip.show(G,p)}else{Tooltip.setIcon(q);Tooltip.showAtXY(p,K,I,k,Z)}}function C(o,p,n){if(Y==o&&f==p&&M==n){D(LANG.tooltip_loading);var l=V[o][0];l[p].timer=setTimeout(function(){J.apply(this,[o,p,n])},3850)}}function J(o,p,n){var l=V[o][0];l[p].status[n]=F;if(Y==o&&f==p&&M==n){D(LANG.tooltip_noresponse)}}function B(n,l){return n+(l.rand?"r"+l.rand:"")+(l.ench?"e"+l.ench:"")+(l.gems?"g"+l.gems.join(","):"")+(l.sock?"s":"")}this.register=function(p,q,n,o){var l=V[p][0];if(l[q]==null){i(p,q,n)}else{clearTimeout(l[q].timer)}cO(l[q],o);if(l[q].status[n]==L){if(l[q][a(n)]){l[q].status[n]=Q}else{l[q].status[n]=N}}if(Y==p&&q==f&&M==n){D(l[q][a(n)],l[q].icon)}};this.registerItem=function(o,l,n){this.register(H,o,l,n)};this.registerQuest=function(o,l,n){this.register(R,o,l,n)};this.registerSpell=function(o,l,n){this.register(h,o,l,n)};this.registerAchievement=function(o,l,n){this.register(O,o,l,n)};this.request=function(o,r,l,p){if(!p){p={}}var n=B(r,p);i(o,n,l);var q=location.hostname.match(/(www|dev|fr|es|de|wotlk)\.?wowhead\.com/);if(q!=null){domain=q[1]}else{domain="www"}W=domain;E(o,r,l,1,p)};this.requestItem=function(n,l){this.request(H,n,g_locale.id,l)};this.requestSpell=function(l){this.request(h,l,g_locale.id)};this.getStatus=function(o,p,n){var l=V[o][0];if(l[p]!=null){return l[p].status[n]}else{return j}};this.getItemStatus=function(n,l){this.getStatus(H,n,l)};this.getSpellStatus=function(n,l){this.getStatus(h,n,l)};e()};var LiveSearch=new function(){var currentTextbox,lastSearch={},lastDiv,timer,prepared,container,cancelNext,hasData,summary,selection;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 boldify(match){return"<b>"+match+"</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\-]/i," ");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;if(textbox._summary){a.href="javascript:;";a.onmousedown=Summary.addGroupItem.bind(g_summaries[textbox._summary],textbox._type,typeId);a.onclick=rf;a.rel=g_types[type]+"="+typeId}else{if(textbox._profileslots){a.href="javascript:;";a.onmousedown=$WowheadProfiler.equipItem.bind(null,typeId,textbox._profileslots);a.onclick=rf;a.rel=g_types[type]+"="+typeId}else{a.href="/?"+g_types[type]+"="+typeId}}if(textbox._append){a.rel+=textbox._append}if(type==3&&param2!=null){a.className+=" q"+param2}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")}}if(!textbox._summary&&!textbox._profileslots){ae(sp,ct(LANG.types[type][0]))}ae(a,sp);var buffer=suggz[i];buffer=buffer.replace(regex,boldify);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((opt.textbox._summary||opt.textbox._profileslots)&&a.length==9){for(var i=0,len=a[8].length;i<len;++i){if(opt.textbox._summary&&in_array(g_summaries[opt.textbox._summary].data,a[8][i].id,function(x){return x.id})==-1){g_summaries[opt.textbox._summary].data.push(a[8][i]);g_items.add(a[8][i].id,{icon:a[8][i].icon})}else{if(opt.textbox._profileslots){var _={};_["name_"+g_locale.name]=a[8][i].name.substring(1);cO(_,{quality:parseInt(a[8][i].name.charAt(0)),icon:a[8][i].icon,displayid:a[8][i].displayid,jsonequip:{},itemset:0});cO(_.jsonequip,a[8][i]);$WowheadPower.registerItem(a[8][i].id,g_locale.id,_)}}}a.splice(8,1)}if(a.length==8){display(opt.textbox,search,a[1],a[7])}else{hide()}}}function fetch(textbox,search){var url="/?search="+urlencode(search)+"&opensearch";if(textbox._type){url+="&type="+textbox._type}if(textbox._profileslots){url+="&slots="+textbox._profileslots.join(":")}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),333)}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;case 13:if((textbox._summary||textbox._profileslots)&&hasData&&isVisible()){var div=container.childNodes[(Browser.ie6?0:3)+(selection|0)];div.firstChild.firstChild.onmousedown();hide();if(textbox._summary){g_summaries.compare.toggleOptions()}}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,L,O,H={},B={},M,C;function N(){aE(D,"click",E);aE(document,Browser.opera?"keypress":"keydown",F);aE(window,"resize",A);if(Browser.ie6){aE(window,"scroll",K)}}function I(){dE(D,"click",E);dE(document,Browser.opera?"keypress":"keydown",F);dE(window,"resize",A);if(Browser.ie6){dE(window,"scroll",K)}}function G(){if(M){return }M=1;var P=ge("layers");D=ce("div");D.className="lightbox-overlay";L=ce("div");L.className="lightbox-outer";O=ce("div");O.className="lightbox-inner";D.style.display=L.style.display="none";ae(P,D);ae(L,O);ae(P,L)}function F(P){P=$E(P);switch(P.keyCode){case 27:E();break}}function A(P){if(P!=1234){if(B.onResize){B.onResize()}}D.style.height=document.body.offsetHeight+"px";if(Browser.ie6){K()}}function K(){var Q=g_getScroll().y,P=g_getWindowSize().h;L.style.top=(Q+P/2)+"px"}function E(){I();if(B.onHide){B.onHide()}D.style.display=L.style.display="none";Ads.restoreHidden();g_enableScroll(true)}function J(){D.style.display=L.style.display=H[C].style.display=""}this.setSize=function(P,Q){O.style.visibility="hidden";O.style.width=P+"px";O.style.height=Q+"px";O.style.left=-parseInt(P/2)+"px";O.style.top=-parseInt(Q/2)+"px";O.style.visibility="visible"};this.show=function(T,Q,P){B=Q||{};Ads.hideAll();G();N();if(C!=T&&H[C]!=null){H[C].style.display="none"}C=T;var S=0,R;if(H[T]==null){S=1;R=ce("div");ae(O,R);H[T]=R}else{R=H[T]}if(B.onShow){B.onShow(R,S,P)}A(1234);J();g_enableScroll(false)};this.reveal=function(){J()};this.hide=function(){E()};this.isVisible=function(){return(D&&D.style.display!="none")}};var ModelViewer=new function(){var J,V,X=[],L,S,D,M,C,B,O,E,R,P,Q=[{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"}],N=[{id:1,name:LANG.female,model:"female"},{id:0,name:LANG.male,model:"male"}];function U(){S.style.display="none";D.style.display="none"}function F(){var Y,Z;if(C.style.display==""){Y=(C.selectedIndex>=0?C.options[C.selectedIndex].value:"")}else{Y=(B.selectedIndex>=0?B.options[B.selectedIndex].value:"")}Z=(O.selectedIndex>=0?O.options[O.selectedIndex].value:0);return{r:Y,s:Z}}function H(Y,Z){return(!isNaN(Y)&&Y>0&&in_array(Q,Y,function(a){return a.id})!=-1&&!isNaN(Z)&&Z>=0&&Z<=1)}function W(){if(R){var c='<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="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="'+J+'"><param name="modelType" value="'+V+'">';if(V==16&&X.length){c+='<param name="equipList" value="'+X.join(",")+'">'}c+='<param name="bgColor" value="#181818"></applet>';D.innerHTML=c;D.style.display=""}else{var g={model:J,modelType:V,contentPath:"http://static.wowhead.com/modelviewer/",blur:(OS.mac?"0":"1")};var f={quality:"high",allowscriptaccess:"always",menu:false,bgcolor:"#181818"};var Y={};if(V==16&&X.length){g.equipList=X.join(",")}swfobject.embedSWF("http://static.wowhead.com/modelviewer/ModelView.swf","dsjkgbdsg2346","600","400","10.0.0","http://static.wowhead.com/modelviewer/expressInstall.swf",g,f,Y);S.style.display=""}var h=F(),a=h.r,e=h.s;if(!L.noPound){var Z="#modelviewer";if(a&&e){Z+=":"+a+"+"+e}else{Z+=":"}if(L.extraPound!=null){Z+=":"+L.extraPound}location.replace(rtrim(Z,":"))}}function G(){var e=F(),Z=e.r,a=e.s;if(!Z){if(O.style.display=="none"){return }O.style.display="none";J=X[1];switch(L.slot){case 1:V=2;break;case 3:V=4;break;default:V=1}}else{if(O.style.display=="none"){O.style.display=""}if(B.style.display==""){sc("modelviewer_model_race",7,Z,"/",".wowhead.com");sc("modelviewer_model_sex",7,a,"/",".wowhead.com")}var e=function(f){return f.id};var c=in_array(Q,Z,e);var Y=in_array(N,a,e);if(c!=-1&&Y!=-1){J=Q[c].model+N[Y].model;V=16}}U();W()}function K(Y){if(Y==R){return }g_setSelectedLink(this,"modelviewer-mode");U();if(R==null){R=Y;setTimeout(W,50)}else{R=Y;sc("modelviewer_mode",7,Y,"/",".wowhead.com");W()}}function A(h,Z){var i=-1,j=-1,a,e;if(Z.race!=null&&Z.sex!=null){i=Z.race;j=Z.sex;M.style.display="none";h=0}else{M.style.display=""}if(i==-1&&j==-1){if(location.hash){var g=location.hash.match(/modelviewer:([0-9]+)\+([0-9]+)/);if(g!=null){if(H(g[1],g[2])){i=g[1];j=g[2];O.style.display=""}}}}if(h){a=C;e=1;C.style.display="";C.selectedIndex=-1;B.style.display="none";if(j==-1){O.style.display="none"}}else{if(i==-1&&j==-1){var l=parseInt(gc("modelviewer_model_race")),f=parseInt(gc("modelviewer_model_sex"));if(H(l,f)){i=l;j=f}else{i=10;j=1}}a=B;e=0;C.style.display="none";B.style.display="";O.style.display=""}if(j!=-1){O.selectedIndex=j}if(i!=-1&&j!=-1){var k=function(n){return n.id};var Y=in_array(Q,i,k);var c=in_array(N,j,k);if(Y!=-1&&c!=-1){J=Q[Y].model+N[c].model;V=16;Y+=e;if(Browser.opera){setTimeout(function(){a.selectedIndex=Y},1)}else{a.selectedIndex=Y}O.selectedIndex=c}}}function I(){if(!L.noPound){if(E&&E.indexOf("modelviewer")==-1){location.replace(E)}else{location.replace("#.")}}if(L.onHide){L.onHide()}}function T(l,g,a){var c,Y;Lightbox.setSize(620,452);if(g){l.className="modelviewer";var n=ce("div");S=ce("div");D=ce("div");var k=ce("div");k.id="dsjkgbdsg2346";ae(S,k);n.className="modelviewer-screen";S.style.display=D.style.display="none";ae(n,S);ae(n,D);ae(l,n);c=ce("a"),Y=ce("a");c.className="modelviewer-help";c.href="/?help=modelviewer";c.target="_blank";ae(c,ce("span"));Y.className="modelviewer-close";Y.href="javascript:;";Y.onclick=Lightbox.hide;ae(Y,ce("span"));ae(l,Y);ae(l,c);var j=ce("div"),Z=ce("span"),c=ce("a"),Y=ce("a");j.className="modelviewer-quality";c.href=Y.href="javascript:;";ae(c,ct("Flash"));ae(Y,ct("Java"));c.onclick=K.bind(c,0);Y.onclick=K.bind(Y,1);ae(Z,c);ae(Z,ct(" "+String.fromCharCode(160)));ae(Z,Y);ae(j,ce("div"));ae(j,Z);ae(l,j);M=ce("div");M.className="modelviewer-model";var k=function(o,i){return strcmp(o.name,i.name)};Q.sort(k);N.sort(k);C=ce("select");B=ce("select");O=ce("select");C.onchange=B.onchange=O.onchange=G;ae(C,ce("option"));for(var f=0,h=Q.length;f<h;++f){var e=ce("option");e.value=Q[f].id;ae(e,ct(Q[f].name));ae(C,e)}for(var f=0,h=Q.length;f<h;++f){var e=ce("option");e.value=Q[f].id;ae(e,ct(Q[f].name));ae(B,e)}for(var f=0,h=N.length;f<h;++f){var e=ce("option");e.value=N[f].id;ae(e,ct(N[f].name));ae(O,e)}O.style.display="none";ae(M,ce("div"));ae(M,C);ae(M,B);ae(M,O);ae(l,M);j=ce("div");j.className="clear";ae(l,j)}switch(a.type){case 1:M.style.display="none";if(a.humanoid){V=32}else{V=8}J=a.displayId;break;case 2:M.style.display="none";V=64;J=a.displayId;break;case 3:X=[a.slot,a.displayId];if(in_array([4,5,6,7,8,9,10,16,19,20],a.slot)!=-1){A(0,a)}else{switch(a.slot){case 1:V=2;break;case 3:V=4;break;default:V=1}J=a.displayId;A(1,a)}break;case 4:X=a.equipList;A(0,a)}if(g){if(gc("modelviewer_mode")=="1"){Y.onclick()}else{c.onclick()}}else{U();setTimeout(W,1)}E=location.hash}this.checkPound=function(){if(location.hash&&location.hash.indexOf("#modelviewer")==0){if(P!=null){var Y=location.hash.split(":");if(Y.length==3&&Y[2]){P(Y[2])}}else{var Z=ge("dsgndslgn464d");if(Z){Z.onclick()}}}};this.addExtraPound=function(Y){P=Y};this.show=function(Y){L=Y;Lightbox.show("modelviewer",{onShow:T,onHide:I},Y)};DomContentLoaded.addEvent(this.checkPound)};var g_screenshots={};var ScreenshotViewer=new function(){var T,L,O,X,c,C,D,Q=0,S,P,E,K,V,W,Y,M,U,J;function N(f){var g=T[L];var e=Math.max(50,Math.min(618,g_getWindowSize().h-72-f));if(Q!=1||g.id||g.resize){C=Math.min(772/g.width,618/g.height);c=Math.min(772/g.width,e/g.height)}else{C=c=1}if(C>1){C=1}if(c>1){c=1}O=Math.round(c*g.width);X=Math.round(c*g.height);var h=Math.max(480,O);Lightbox.setSize(h+20,X+52+f);if(Browser.ie6){E.style.width=h+"px";if(T.length>1){V.style.height=W.style.height=X+"px"}else{Y.style.height=X+"px"}}if(f){K.firstChild.width=O;K.firstChild.height=X}}function G(g){var e=T[g],f="#screenshots:";if(Q==0){f+="id="+e.id}else{f+=S+":"+(g+1)}return f}function a(n){if(n&&(c==C)&&g_getWindowSize().h>P.offsetHeight){return }P.style.visibility="hidden";var o=T[L],h=(o.width>772||o.height>618);N(0);var e=(o.url?o.url:"http://static.wowhead.com/uploads/screenshots/"+(h?"resized/":"normal/")+o.id+".jpg");var g='<img src="'+e+'" width="'+O+'" height="'+X+'"';if(Browser.ie6){g+=' galleryimg="no"'}g+=">";K.innerHTML=g;if(!n){if(o.url){M.href=e}else{M.href="http://static.wowhead.com/uploads/screenshots/normal/"+o.id+".jpg"}if(!o.user&&typeof g_pageInfo=="object"){o.user=g_pageInfo.username}var k=(o.date&&o.user),j=(T.length>1);if(k){var i=new Date(o.date),q=(g_serverTime-i)/1000;var p=U.firstChild.childNodes[1];p.href="/?user="+o.user;p.innerHTML=o.user;var t=U.firstChild.childNodes[3];while(t.firstChild){de(t.firstChild)}Listview.funcBox.coFormatDate(t,q,i);U.firstChild.style.display=""}else{U.firstChild.style.display="none"}var t=U.childNodes[1];if(j){var r="";if(k){r+=LANG.dash}r+=(L+1)+LANG.lvpage_of+T.length;t.innerHTML=r;t.style.display=""}else{t.style.display="none"}U.style.display=(k||j?"":"none");if(g_locale.id!=0&&o.caption){o.caption=""}var l=(o.caption!=null&&o.caption.length);var f=(o.subject!=null&&o.subject.length&&o.type&&o.typeId);if(l||f){var g="";if(f){g+=LANG.types[o.type][0]+LANG.colon;g+='<a href="/?'+g_types[o.type]+"="+o.typeId+'">';g+=o.subject;g+="</a>"}if(l){if(f){g+=LANG.dash}g+=o.caption}J.innerHTML=g;J.style.display=""}else{J.style.display="none"}if(T.length>1){V.href=G(Z(-1));W.href=G(Z(1));V.style.display=W.style.display="";Y.style.display="none"}else{V.style.display=W.style.display="none";Y.style.display=""}location.replace(G(L))}Lightbox.reveal();if(J.offsetHeight>18){N(J.offsetHeight-18)}P.style.visibility="visible"}function Z(f){var e=L;e+=f;if(e<0){e=T.length-1}else{if(e>=T.length){e=0}}return e}function B(){L=Z(-1);a();return false}function A(){L=Z(1);a();return false}function F(f){f=$E(f);switch(f.keyCode){case 37:B();break;case 39:A();break}}function I(){a(1)}function H(){if(T.length>1){dE(document,"keyup",F)}if(D&&Q==0){if(D.indexOf(":id=")!=-1){D="#screenshots"}location.replace(D)}else{location.replace("#.")}}function R(e,j,f){if(typeof f.screenshots=="string"){T=g_screenshots[f.screenshots];Q=1;S=f.screenshots}else{T=f.screenshots;Q=0;S=null}P=e;L=0;if(f.pos&&f.pos>=0&&f.pos<T.length){L=f.pos}if(j){e.className="screenshotviewer";E=ce("div");E.className="screenshotviewer-screen";V=ce("a");W=ce("a");V.className="screenshotviewer-prev";W.className="screenshotviewer-next";V.href="javascript:;";W.href="javascript:;";var k=ce("span");ae(k,ce("b"));ae(V,k);var k=ce("span");ae(k,ce("b"));ae(W,k);V.onclick=B;W.onclick=A;Y=ce("a");Y.className="screenshotviewer-cover";Y.href="javascript:;";Y.onclick=Lightbox.hide;var k=ce("span");ae(k,ce("b"));ae(Y,k);if(Browser.ie6){ns(V);ns(W);V.onmouseover=W.onmouseover=Y.onmouseover=function(){this.firstChild.style.display="block"};V.onmouseout=W.onmouseout=Y.onmouseout=function(){this.firstChild.style.display=""}}ae(E,V);ae(E,W);ae(E,Y);K=ce("div");ae(E,K);ae(e,E);var h=ce("a");h.className="screenshotviewer-close";h.href="javascript:;";h.onclick=Lightbox.hide;ae(h,ce("span"));ae(e,h);M=ce("a");M.className="screenshotviewer-original";M.href="javascript:;";M.target="_blank";ae(M,ce("span"));ae(e,M);U=ce("div");U.className="screenshotviewer-from";var g=ce("span");ae(g,ct(LANG.lvscreenshot_from));ae(g,ce("a"));ae(g,ct(" "));ae(g,ce("span"));ae(U,g);ae(U,ce("span"));ae(e,U);J=ce("div");J.className="screenshotviewer-caption";ae(e,J);var i=ce("div");i.className="clear";ae(e,i)}D=location.hash;if(T.length>1){aE(document,"keyup",F)}a()}this.checkPound=function(){if(location.hash&&location.hash.indexOf("#screenshots")==0){if(!g_listviews.screenshots){var f=location.hash.split(":");if(f.length==3){var g=g_screenshots[f[1]],e=parseInt(f[2]);if(g&&e>=1&&e<=g.length){ScreenshotViewer.show({screenshots:f[1],pos:e-1})}}}}};this.show=function(e){Lightbox.show("screenshotviewer",{onShow:R,onHide:H,onResize:I},e)};DomContentLoaded.addEvent(this.checkPound)};var Ads={dimensions:{leaderboard:[728,90],skyscraper:[160,600],medrect:[300,250]},spots:{leaderboard:["header-ad"],skyscraper:["sidebar-ad"],medrect:["infobox-ad","blog-sidebar-medrect","talentcalc-sidebar-ad","pl-rightbar-ad","contribute-ad"]},hidden:[],install:function(){for(var G in Ads.dimensions){var C=Ads.spots[G],F=false;for(var B=0,A=C.length;B<A;++B){var E=ge(C[B]);if(E){if(!F){var D=ce("iframe");D.width=Ads.dimensions[G][0];D.height=Ads.dimensions[G][1];D.frameBorder=0;D.scrolling="no";D.src="";ae(E,D);F=true}else{de(E)}}}}},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)}}}},hide:function(A){if(A.firstChild){A.firstChild.style.display="none";Ads.hidden.push(A)}},hideAll: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&&!Ads.isHidden(D)){Ads.hide(D)}}}},isHidden:function(A){return A.firstChild&&A.firstChild.style.display=="none"},intersect:function(H,C){var G,A;for(var I in Ads.dimensions){var D=Ads.spots[I];for(var B=0,E=D.length;B<E;++B){var F=ge(D[B]);if(F){if(!Ads.isHidden(F)){coords=ac(F);A=g_createRect(coords.x,coords.y,F.offsetWidth,F.offsetHeight);if(g_intersectRect(H,A)){if(C){Ads.hide(F)}return true}}}}}return false},restoreHidden:function(){if(Ads.hidden.length){for(var B=0,A=Ads.hidden.length;B<A;++B){var C=Ads.hidden[B];if(C.firstChild){C.firstChild.style.display=""}}Ads.hidden=[]}}};DomContentLoaded.addEvent(Ads.install);
