function $A(a){var b=[];for(var c=0,d=a.length;c<d;++c){b.push(a[c])}return b}Function.prototype.bind=function(){var a=this,b=$A(arguments),c=b.shift();return function(){return a.apply(c,b.concat($A(arguments)))}};function strcmp(a,b){if(a==b){return 0}if(a==null){return-1}if(b==null){return 1}return a<b?-1:1}function trim(a){return a.replace(/(^\s*|\s*$)/g,"")}function rtrim(a,b){var c=a.length;while(--c>0&&a.charAt(c)==b){}a=a.substring(0,c+1);if(a==b){a=""}return a}function sprintf(a){var b;for(b=1,len=arguments.length;b<len;++b){a=a.replace("$"+b,arguments[b])}return a}function str_replace(a,b,c){while(a.indexOf(b)!=-1){a=a.replace(b,c)}return a}function urlencode(a){a=encodeURIComponent(a);a=str_replace(a,"+","%2B");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(a,b,c,d){if(a==null){return-1}if(c){return in_arrayf(a,b,c,d)}for(var e=d||0,g=a.length;e<g;++e){if(a[e]==b){return e}}return-1}function in_arrayf(a,b,c,d){for(var e=d||0,g=a.length;e<g;++e){if(c(a[e])==b){return e}}return-1}function array_walk(a,b,c){var d;for(var e=0,g=a.length;e<g;++e){d=b(a[e],c,a,e);if(d!=null){a[e]=d}}}function array_apply(a,b,c){var d;for(var e=0,g=a.length;e<g;++e){b(a[e],c,a,e)}}function ge(a){return document.getElementById(a)}function gE(a,b){return a.getElementsByTagName(b)}function ce(a,b){var c=document.createElement(a);if(b){cOr(c,b)}return c}function de(a){a.parentNode.removeChild(a)}function ae(a,b){return a.appendChild(b)}function ct(a){return document.createTextNode(a)}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(a){var b=0,c=0;while(a){b+=a.offsetLeft;c+=a.offsetTop;a=a.offsetParent}var d=[b,c];d.x=b;d.y=c;return d}function aE(a,b,c){if(Browser.ie){a.attachEvent("on"+b,c)}else{a.addEventListener(b,c,false)}}function dE(a,b,c){if(Browser.ie){a.detachEvent("on"+b,c)}else{a.removeEventListener(b,c,false)}}function sp(a){if(!a){a=event}if(Browser.ie){a.cancelBubble=true}else{a.stopPropagation()}}function sc(a,b,c,d,e){var g=new Date();var f=a+"="+escape(c)+"; ";g.setDate(g.getDate()+b);f+="expires="+g.toUTCString()+"; ";if(d){f+="path="+d+"; "}if(e){f+="domain="+e+"; "}document.cookie=f;gc.C[a]=c}function dc(a){sc(a,-1);gc.C[a]=null}function gc(a){if(gc.I==null){var b=unescape(document.cookie).split("; ");for(var c=0,d=b.length;c<d;++c){var e=b[c].indexOf("="),g,f;if(e!=-1){g=b[c].substr(0,e);f=b[c].substr(e+1)}else{g=b[c];f=""}gc.C[g]=f}gc.I=1}if(!a){return gc.C}else{return gc.C[a]}}gc.C={};function ns(a){if(Browser.ie){a.onfocus=tb;a.onmousedown=a.onselectstart=a.ondragstart=rf}}function cO(a,b){for(var c in b){a[c]=b[c]}}function cOr(a,b){for(var c in b){if(typeof b[c]=="object"){if(!a[c]){a[c]={}}cOr(a[c],b[c])}else{a[c]=b[c]}}}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 b=[],c;this.now=function(){if(c){return}array_apply(b,function(a){a()});DomContentLoaded=null};this.addEvent=function(a){b.push(a)}};function g_getWindowSize(){var a=0,b=0;if(typeof window.innerWidth=="number"){a=window.innerWidth;b=window.innerHeight}else{if(document.documentElement&&(document.documentElement.clientWidth||document.documentElement.clientHeight)){a=document.documentElement.clientWidth;b=document.documentElement.clientHeight}else{if(document.body&&(document.body.clientWidth||document.body.clientHeight)){a=document.body.clientWidth;b=document.body.clientHeight}}}return{w:a,h:b}}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(a){var b,c;if(window.innerHeight){b=a.pageX;c=a.pageY}else{var d=g_getScroll();b=a.clientX+d.x;c=a.clientY+d.y}return{x:b,y:c}}function g_scrollTo(a,b){var c,d=g_getWindowSize(),e=g_getScroll(),g=d.w,f=d.h,i=e.x,l=e.y;a=$(a);if(b==null){b=[]}else{if(typeof b=="number"){b=[b]}}c=b.length;if(c==0){b[0]=b[1]=b[2]=b[3]=0}else{if(c==1){b[1]=b[2]=b[3]=b[0]}else{if(c==2){b[2]=b[0];b[3]=b[1]}else{if(c==3){b[3]=b[1]}}}}c=ac(a);var h=c[0]-b[3];var j=c[1]-b[0];var k=c[0]+a.offsetWidth+b[1];var n=c[1]+a.offsetHeight+b[2];if(k-h>g||h<i){i=h}else{if(k-g>i){i=k-g}}if(n-j>f||j<l){l=j}else{if(n-f>l){l=n-f}}scrollTo(i,l)}function g_setTextNodes(a,b){if(a.nodeType==3){a.nodeValue=b}else{for(var c=0;c<a.childNodes.length;++c){g_setTextNodes(a.childNodes[c],b)}}}function g_getTextContent(a){var b="";for(var c=0;c<a.childNodes.length;++c){if(a.childNodes[c].nodeValue){b+=a.childNodes[c].nodeValue}else{if(a.childNodes[c].nodeName=="BR"){if(Browser.ie){b+="\r"}else{b+="\n"}}}b+=g_getTextContent(a.childNodes[c])}return b}function g_setSelectedLink(a,b){if(!g_setSelectedLink.groups){g_setSelectedLink.groups={}}var c=g_setSelectedLink.groups;if(c[b]){c[b].className=""}a.className="selected";c[b]=a}function g_toggleDisplay(a){if(a.style.display=="none"){a.style.display="";return true}else{a.style.display="none";return false}}function g_disclose(a,b){b.className="disclosure-"+(g_toggleDisplay(a)?"on":"off");return false}function g_enableScrollEvent(a){if(a.stopPropagation){a.stopPropagation()}if(a.preventDefault){a.preventDefault()}a.returnValue=false;a.cancelBubble=true;return false}function g_enableScroll(a){if(!a){aE(document,"mousewheel",g_enableScrollEvent);aE(window,"DOMMouseScroll",g_enableScrollEvent)}else{dE(document,"mousewheel",g_enableScrollEvent);dE(window,"DOMMouseScroll",g_enableScrollEvent)}}function g_getGets(){var a={};if(location.search){var b=decodeURIComponent(location.search.substr(1)).split("&");for(var c=0,d=b.length;c<d;++c){var e=b[c].indexOf("="),g,f;if(e!=-1){g=b[c].substr(0,e);f=b[c].substr(e+1)}else{g=b[c];f=""}a[g]=f}}return a}function g_initHeader(b){var c=ce("dl");for(var d=0,e=mn_path.length;d<e;++d){var g=ce("dt");var f=ce("a");var i=ce("ins");var l=ce("big");var h=ce("span");if(mn_path[d][0]!=b&&mn_path[d][3]){f.menu=mn_path[d][3];f.onmouseover=Menu.show;f.onmouseout=Menu.hide}else{f.onmouseover=Menu._hide}if(mn_path[d][2]){f.href=mn_path[d][2]}else{f.href="javascript:;";ns(f);f.style.cursor="default"}if(b!=null&&mn_path[d][0]==b){f.className="selected"}ae(l,ct(mn_path[d][1].charAt(0)));ae(i,l);ae(i,ct(mn_path[d][1].substr(1)));ae(f,i);ae(f,h);ae(g,f);ae(c,g)}ae(ge("ptewhjkst46"),c);var j=ge("kbl34h6b43");if(b!=null&&b>=0&&b<mn_path.length){switch(b){case 0:Menu.addButtons(j,Menu.explode(mn_database));break;case 1:Menu.addButtons(j,mn_tools);break;case 2:Menu.addButtons(j,Menu.explode(mn_more));break;case 3:Menu.addButtons(j,Menu.explode(mn_forums));break}}else{ae(j,ct(String.fromCharCode(160)))}g_initLanguageChanger();var k=ge("oh2345v5ks");var n=k.previousSibling;var m=k.parentNode;ns(n);n.onclick=function(){this.parentNode.onsubmit()};if(Browser.ie){setTimeout(function(){k.value=""},1)}if(k.value==""){k.className="search-database"}k.onmouseover=function(){if(trim(this.value)!=""){this.className=""}};k.onfocus=function(){this.className=""};k.onblur=function(){if(trim(this.value)==""){this.className="search-database";this.value=""}};m.onsubmit=function(){var a=this.elements[0].value;if(trim(a)==""){return false}this.submit()}}function g_initLanguageChanger(){var a=ge("language-changer");if(!a){return}var b="www",c=location.href,d;d=location.hostname.indexOf(".");if(d!=-1&&d<=5){b=location.hostname.substr(0,d)}d=c.indexOf("#");if(d!=-1){c=c.substr(0,d)}a.menu=[[0,"Deutsch",(g_locale.id!=3?c.replace(b,"de"):null)],[0,"English",(g_locale.id!=0?c.replace(b,"www"):null)],[0,"Espa"+String.fromCharCode(241)+"ol",(g_locale.id!=6?c.replace(b,"es"):null)],[0,"Fran"+String.fromCharCode(231)+"ais",(g_locale.id!=2?c.replace(b,"fr"):null)],[0,String.fromCharCode(1056,1091,1089,1089,1082,1080,1081),(g_locale.id!=7?c.replace(b,"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(a,b){var c=mn_path,d=null,e=null,g=0,f=ge("main-precontents"),i=ce("div");i.className="path";if(b!=null){var l=ce("div");l.className="path-right";var h=ce("a");h.href="javascript:;";h.id="fi_toggle";ns(h);h.onclick=fi_Toggle;if(b){h.className="disclosure-on";ae(h,ct(LANG.fihide))}else{h.className="disclosure-off";ae(h,ct(LANG.fishow))}ae(l,h);ae(f,l)}for(var j=0;j<a.length;++j){var h,k,n=0;for(var m=0;m<c.length;++m){if(c[m][0]==a[j]){n=1;c=c[m];c.checked=1;break}}if(!n){g=1;break}h=ce("a");k=ce("span");if(c[2]){h.href=c[2]}else{h.href="javascript:;";ns(h);h.style.textDecoration="none";h.style.color="white";h.style.cursor="default"}if(j<a.length-1&&c[3]){k.className="menuarrow"}ae(h,ct(c[4]==null?c[1]:c[4]));if(j==0){h.menu=mn_path}else{h.menu=d[3]}h.onmouseover=Menu.show;h.onmouseout=Menu.hide;ae(k,h);ae(i,k);e=k;d=c;c=c[3];if(!c){g=1;break}}if(g&&e){e.className=""}var l=ce("div");l.className="clear";ae(i,l);ae(f,i);g_initPath.lastIt=d}function g_formatTimeElapsed(d){function e(a,b,c){if(c&&LANG.timeunitsab[b]==""){c=0}if(c){return a+" "+LANG.timeunitsab[b]}else{return a+" "+(a==1?LANG.timeunitssg[b]:LANG.timeunitspl[b])}}var g=[31557600,2629800,604800,86400,3600,60,1];var f=[1,3,3,-1,5,-1,-1];d=Math.max(d,1);for(var i=3,l=g.length;i<l;++i){if(d>=g[i]){var h=i;var j=Math.floor(d/g[h]);if(f[h]!=-1){var k=f[h];d%=g[h];v2=Math.floor(d/g[k]);if(v2>0){return e(j,h,1)+" "+e(v2,k,1)}}return e(j,h,0)}}return"(n/a)"}function g_formatDateSimple(b,c){function d(a){return(a<10?"0"+a:a)}var e="",g=b.getDate(),f=b.getMonth()+1,i=b.getFullYear();e+=sprintf(LANG.date_simple,d(g),d(f),i);if(c==1){var l=b.getHours()+1,h=b.getMinutes()+1;e+=LANG.date_at+d(l)+":"+d(h)}return e}function g_insertTag(a,b,c,d){var e=$(a);e.focus();if(e.selectionStart!=null){var g=e.selectionStart,f=e.selectionEnd,i=e.scrollLeft,l=e.scrollTop;var h=e.value.substring(g,f);if(typeof d=="function"){h=d(h)}e.value=e.value.substr(0,g)+b+h+c+e.value.substr(f);e.selectionStart=e.selectionEnd=f+b.length;e.scrollLeft=i;e.scrollTop=l}else{if(document.selection&&document.selection.createRange){var j=document.selection.createRange();if(j.parentElement()!=e){return}var h=j.text;if(typeof d=="function"){h=d(h)}j.text=b+h+c}}if(e.onkeyup){e.onkeyup()}}function g_getLocaleFromDomain(a){var b=g_getLocaleFromDomain.L;return(b[a]?b[a]:0)}g_getLocaleFromDomain.L={fr:2,de:3,es:6,ru:7,wotlk:0,ptr:25};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,b,c){prompt(LANG.prompt_ingamelink,'/script DEFAULT_CHAT_FRAME:AddMessage("'+sprintf(LANG.message_ingamelink,"\\124c"+a+"\\124H"+b+"\\124h["+c+']\\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_userDescription(){var a=ge("description");var b=(typeof g_pageInfo=="object"&&g_user.name==g_pageInfo.username);var c=(a.childNodes.length==0);if(c){if(b){ae(a,ct(LANG.user_nodescription2))}else{ae(a,ct(LANG.user_nodescription))}}if(b){var d=ce("button"),e=ce("div");e.className="pad";d.onclick=function(){location.href="/?account#public-description"};if(c){ae(d,ct(LANG.user_composeone))}else{ae(d,ct(LANG.user_editdescription))}ae(a,e);ae(a,d)}}function g_onAfterTyping(a,b,c){var d;var e=function(){if(d){clearTimeout(d);d=null}d=setTimeout(b,c)};a.onkeyup=e}function g_createOrRegex(a){var b=a.split(" "),c="";for(var d=0,e=b.length;d<e;++d){if(d>0){c+="|"}c+=b[d]}return new RegExp("("+c+")","gi")}function Ajax(a,b){if(!a){return}var c;try{c=new XMLHttpRequest()}catch(D){try{c=new ActiveXObject("Msxml2.XMLHTTP")}catch(D){try{c=new ActiveXObject("Microsoft.XMLHTTP")}catch(D){if(window.createRequest){c=window.createRequest()}else{alert(LANG.message_ajaxnotsupported);return}}}}this.request=c;cO(this,b);this.method=this.method||(this.params&&"POST")||"GET";c.open(this.method,a,this.async==null?true:this.async);c.onreadystatechange=Ajax.onReadyStateChange.bind(this);if(this.method.toUpperCase()=="POST"){c.setRequestHeader("Content-Type",(this.contentType||"application/x-www-form-urlencoded")+"; charset="+(this.encoding||"UTF-8"))}c.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 g_listviews={};function Listview(b){cO(this,b);if(this.id){var c=(this.tabs?"tab-":"lv-")+this.id;if(this.parent){var d=ce("div");d.id=c;ae($(this.parent),d);this.container=d}else{this.container=ge(c)}}else{return}if(this.template){this.template=Listview.templates[this.template]}else{return}g_listviews[this.id]=this;if(this.poundable==null){if(this.template.poundable!=null){this.poundable=this.template.poundable}else{this.poundable=1}}if(this.searchable==null){if(this.template.searchable!=null){this.searchable=this.template.searchable}else{this.searchable=0}}if(this.filtrable==null){if(this.template.filtrable!=null){this.filtrable=this.template.filtrable}else{this.filtrable=0}}if(this.data.length==1){this.filtrable=null;this.searchable=null}if(this.hideBands==null){this.hideBands=this.template.hideBands}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}this.nFilters=0;this.rowOffset=0;if(this.mode==null){this.mode=this.template.mode}this.mode|=0;if(this.nItemsPerPage==null){var e=this.template.nItemsPerPage;this.nItemsPerPage=(e!=null?e:50)}this.nItemsPerPage|=0;if(this.nItemsPerPage<=0){this.nItemsPerPage=0}this.nRowsVisible=this.data.length;if(this.mode==3){if(this.nItemsPerRow==null){var g=this.template.nItemsPerRow;this.nItemsPerRow=(g!=null?g: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 f=0,i=this.extraCols.length;f<i;++f){var l=null;var h=this.extraCols[f];if(h.after||h.before){var j=in_array(this.columns,(h.after?h.after:h.before),function(a){return a.id});if(j!=-1){l=(h.after?j+1:j-1)}}if(l==null){l=this.columns.length}this.columns.splice(l,0,h)}}this.visibility=[];var k=[],n=[];if(this.visibleCols!=null){array_walk(this.visibleCols,function(a){k[a]=1})}if(this.hiddenCols!=null){array_walk(this.hiddenCols,function(a){n[a]=1})}for(var f=0,i=this.columns.length;f<i;++f){var h=this.columns[f];if(k[h.id]!=null||(!h.hidden&&n[h.id]==null)){this.visibility.push(f)}}if(this.sort==null&&this.template.sort){this.sort=this.template.sort.slice(0)}else{if(this.sort!=null){var m=this.sort;this.sort=[];for(var f=0,i=m.length;f<i;++f){var h=parseInt(m[f]);if(isNaN(h)){var o=0;if(m[f].charAt(0)=="-"){o=1;m[f]=m[f].substring(1)}var j=in_array(this.columns,m[f],function(a){return a.id});if(j!=-1){if(o){this.sort.push(-(j+1))}else{this.sort.push(j+1)}}}else{this.sort.push(h)}}}}if(this.hideCount==null){this.hideCount=this.template.hideCount}this.hideCount|=0;if(this.tabs){this.tabIndex=this.tabs.add(this.getTabName(),{id:this.id,onLoad:this.initialize.bind(this)})}else{this.initialize()}}Listview.headerClick=function(a,b,c){c=$E(c);if(c._button>=2||c.shiftKey||c.ctrlKey){Tooltip.hide();setTimeout(Listview.headerFilter.bind(this,a),1)}else{this.sortBy(b+1)}return false};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(a,b){var c=ce("a");c.style.fontFamily="Verdana, sans-serif";c.href=this.template.getItemLink(a);ae(c,ct(a.name));if(a.expansion){var d=ce("span");d.className=(a.expansion==1?"bc-icon":"wotlk-icon");ae(d,c);ae(b,d)}else{ae(b,c)}},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(a,b){if(a.side){var c=ce("span");c.className=(a.side==1?"alliance-icon":"horde-icon");ae(c,ct(g_sides[a.side]));ae(b,c)}},getVisibleText:function(a){if(a.side){return g_sides[a.side]}},sortFunc:function(a,b,c){return strcmp(g_sides[a.side],g_sides[b.side])}},{id:"category",name:LANG.category,type:"text",width:"16%",compute:function(a,b){if(a.category2!=null){b.className="small q1";var c=ce("a"),d="/?factions="+a.category2;if(a.category){d+="."+a.category}c.href=d;ae(c,ct(Listview.funcBox.getFactionCategory(a.category,a.category2)));ae(b,c)}},getVisibleText:function(a){return Listview.funcBox.getFactionCategory(a.category,a.category2)},sortFunc:function(a,b,c){var d=Listview.funcBox.getFactionCategory;return strcmp(d(a.category,a.category2),d(b.category,b.category2))}}],getItemLink:function(a){return"/?faction="+a.id}},model:{sort:[],mode:3,nItemsPerPage:40,nItemsPerRow:4,poundable:2,columns:[],compute:function(a,b,c){b.className="screenshot-cell";b.vAlign="bottom";var d=ce("div");d.className="pet-model";var e=ce("a");e.className="pet-zoom";e.href="javascript:;";e.onclick=this.template.modelShow.bind(this.template,a.npcId,a.displayId);ae(d,e);var g=ce("div");g.id="pm"+a.displayId;ae(d,g);ae(b,d);d=ce("div");d.className="screenshot-cell-user";e=ce("a");e.href=this.template.getItemLink(a);ae(e,ct(a.skin));ae(d,e);ae(d,ct(" ("+a.count+")"));ae(b,d);d=ce("div");d.style.position="relative";d.style.height="1em";var f=ce("div");f.className="screenshot-caption";var i=ce("small");ae(i,ct(LANG.level+": "));ae(i,ct(a.minLevel+(a.minLevel==a.maxLevel?"":LANG.hyphen+(a.maxLevel==9999?"??":a.maxLevel))));ae(i,ce("br"));ae(f,i);ae(d,f);ae(b,d);setTimeout(this.template.appendFlash.bind(g,a),1)},getItemLink:function(a){return"/?npcs=1&filter="+(a.family?"fa="+a.family+";":"")+"minle=1;cr=35;crs=0;crv="+a.skin},modelShow:function(a,b){ModelViewer.show({type:1,typeId:a,displayId:b,onHide:this.modelHide.bind(this)});this.enableViewers(false)},modelHide:function(){this.enableViewers(true)},enableViewers:function(a){var b=gE(ge("lkljbjkb574"),"object");for(var c=0,d=b.length;c<d;++c){b[c].style.display=(a?"":"none")}},appendFlash:function(a){var b={model:a.displayId,modelType:8,contentPath:"http://static.wowhead.com/modelviewer/",blur:(OS.mac?"0":"1")};var c={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",b,c)}}};var Lightbox=new function(){var f,i,l,h={},j={},k,n,m;function o(){aE(f,"click",r);aE(i,"mousewheel",v);aE(document,Browser.opera?"keypress":"keydown",x);aE(window,"resize",z);if(Browser.ie6){aE(window,"scroll",t)}}function p(){dE(f,"click",r);dE(i,"mousewheel",v);dE(document,Browser.opera?"keypress":"keydown",x);dE(window,"resize",z);if(Browser.ie6){dE(window,"scroll",t)}}function A(){if(k){return}k=1;var a=ge("layers");f=ce("div");f.className="lightbox-overlay";i=ce("div");i.className="lightbox-outer";l=ce("div");l.className="lightbox-inner";f.style.display=i.style.display="none";ae(a,f);ae(i,l);ae(a,i)}function v(a){a=$E(a);a.returnValue=false}function x(a){a=$E(a);switch(a.keyCode){case 27:r();break}}function z(a){if(a!=1234){if(j.onResize){j.onResize()}}f.style.height=document.body.offsetHeight+"px";if(Browser.ie6){t()}}function t(){var a=g_getScroll().y,b=g_getWindowSize().h;i.style.top=(a+b/2)+"px"}function r(){p();if(j.onHide){j.onHide()}m=0;f.style.display=i.style.display="none";array_apply(gE(document,"iframe"),function(a){a.style.display=""});g_enableScroll(true)}function w(){f.style.display=i.style.display=h[n].style.display=""}this.setSize=function(a,b){l.style.visibility="hidden";l.style.width=a+"px";l.style.height=b+"px";l.style.left=-parseInt(a/2)+"px";l.style.top=-parseInt(b/2)+"px";l.style.visibility="visible"};this.show=function(b,c,d){m=1;j=c||{};array_apply(gE(document,"iframe"),function(a){a.style.display="none"});A();o();if(n!=b&&h[n]!=null){h[n].style.display="none"}n=b;var e=0,g;if(h[b]==null){e=1;g=ce("div");ae(l,g);h[b]=g}else{g=h[b]}if(j.onShow){j.onShow(g,e,d)}z(1234);w()};this.reveal=function(){w()};this.hide=function(){r()};this.isVisible=function(){return m}};var ModelViewer=new function(){var o,p,A=[],v,x,z,t,r,w,s,C,G,y,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"}],u=[{id:1,name:LANG.female,model:"female"},{id:0,name:LANG.male,model:"male"}];function E(){x.style.display="none";z.style.display="none"}function B(){var a,b;if(r.style.display==""){a=(r.selectedIndex>=0?r.options[r.selectedIndex].value:"")}else{a=(w.selectedIndex>=0?w.options[w.selectedIndex].value:"")}b=(s.selectedIndex>=0?s.options[s.selectedIndex].value:0);return{r:a,s:b}}function F(b,c){return(!isNaN(b)&&b>0&&in_array(q,b,function(a){return a.id})!=-1&&!isNaN(c)&&c>=0&&c<=1)}function I(){if(G){var a='<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="'+o+'"><param name="modelType" value="'+p+'">';if(p==16&&A.length){a+='<param name="equipList" value="'+A.join(",")+'">'}a+='<param name="bgColor" value="#181818"></applet>';z.innerHTML=a;z.style.display=""}else{var b={model:o,modelType:p,contentPath:"http://static.wowhead.com/modelviewer/",blur:(OS.mac?"0":"1")};var c={quality:"high",allowscriptaccess:"always",menu:false,bgcolor:"#181818"};var d={};if(p==16&&A.length){b.equipList=A.join(",")}swfobject.embedSWF("http://static.wowhead.com/modelviewer/ModelView.swf","dsjkgbdsg2346","600","400","10.0.0","http://static.wowhead.com/modelviewer/expressInstall.swf",b,c,d);x.style.display=""}var e=B(),g=e.r,f=e.s;if(!v.noPound){var i="#modelviewer";if(g&&f){i+=":"+g+"+"+f}else{i+=":"}if(v.extraPound!=null){i+=":"+v.extraPound}location.replace(rtrim(i,":"))}}function K(){var b=B(),c=b.r,d=b.s;if(!c){if(s.style.display=="none"){return}s.style.display="none";o=A[1];switch(v.slot){case 1:p=2;break;case 3:p=4;break;default:p=1}}else{if(s.style.display=="none"){s.style.display=""}if(w.style.display==""){sc("modelviewer_model_race",7,c,"/",".wowhead.com");sc("modelviewer_model_sex",7,d,"/",".wowhead.com")}var b=function(a){return a.id};var e=in_array(q,c,b);var g=in_array(u,d,b);if(e!=-1&&g!=-1){o=q[e].model+u[g].model;p=16}}E();I()}function J(a){g_setSelectedLink(this,"modelviewer-mode");E();if(G==null){G=a;setTimeout(I,50)}else{G=a;sc("modelviewer_mode",7,a,"/",".wowhead.com");I()}}function H(b,c){var d=-1,e=-1,g,f;if(c.race!=null&&c.sex!=null){d=c.race;e=c.sex;t.style.display="none";b=0}else{t.style.display=""}if(d==-1&&e==-1){if(location.hash){var i=location.hash.match(/modelviewer:([0-9]+)\+([0-9]+)/);if(i!=null){if(F(i[1],i[2])){d=i[1];e=i[2];s.style.display=""}}}}if(b){g=r;f=1;r.style.display="";r.selectedIndex=-1;w.style.display="none";if(e==-1){s.style.display="none"}}else{if(d==-1&&e==-1){var l=parseInt(gc("modelviewer_model_race")),h=parseInt(gc("modelviewer_model_sex"));if(F(l,h)){d=l;e=h}else{d=10;e=1}}g=w;f=0;r.style.display="none";w.style.display="";s.style.display=""}if(e!=-1){s.selectedIndex=e}if(d!=-1&&e!=-1){var j=function(a){return a.id};var k=in_array(q,d,j);var n=in_array(u,e,j);if(k!=-1&&n!=-1){o=q[k].model+u[n].model;p=16;k+=f;if(Browser.opera){setTimeout(function(){g.selectedIndex=k},1)}else{g.selectedIndex=k}s.selectedIndex=n}}}function L(){if(!v.noPound){if(C&&C.indexOf("modelviewer")==-1){location.replace(C)}else{location.replace("#.")}}if(v.onHide){v.onHide()}}function M(c,d,e){var g,f;Lightbox.setSize(620,452);if(d){c.className="modelviewer";var i=ce("div");x=ce("div");z=ce("div");var l=ce("div");l.id="dsjkgbdsg2346";ae(x,l);i.className="modelviewer-screen";x.style.display=z.style.display="none";ae(i,x);ae(i,z);ae(c,i);g=ce("a"),f=ce("a");g.className="modelviewer-help";g.href="/?help=modelviewer";g.target="_blank";ae(g,ce("span"));f.className="modelviewer-close";f.href="javascript:;";f.onclick=Lightbox.hide;ae(f,ce("span"));ae(c,f);ae(c,g);var h=ce("div"),j=ce("span"),g=ce("a"),f=ce("a");h.className="modelviewer-quality";g.href=f.href="javascript:;";ae(g,ct("Flash"));ae(f,ct("Java"));g.onclick=J.bind(g,0);f.onclick=J.bind(f,1);ae(j,g);ae(j,ct(" "+String.fromCharCode(160)));ae(j,f);ae(h,ce("div"));ae(h,j);ae(c,h);t=ce("div");t.className="modelviewer-model";var l=function(a,b){return strcmp(a.name,b.name)};q.sort(l);u.sort(l);r=ce("select");w=ce("select");s=ce("select");r.onchange=w.onchange=s.onchange=K;ae(r,ce("option"));for(var k=0,n=q.length;k<n;++k){var m=ce("option");m.value=q[k].id;ae(m,ct(q[k].name));ae(r,m)}for(var k=0,n=q.length;k<n;++k){var m=ce("option");m.value=q[k].id;ae(m,ct(q[k].name));ae(w,m)}for(var k=0,n=u.length;k<n;++k){var m=ce("option");m.value=u[k].id;ae(m,ct(u[k].name));ae(s,m)}s.style.display="none";ae(t,ce("div"));ae(t,r);ae(t,w);ae(t,s);ae(c,t);h=ce("div");h.className="clear";ae(c,h)}switch(e.type){case 1:t.style.display="none";if(e.humanoid){p=32}else{p=8}o=e.displayId;break;case 2:t.style.display="none";p=64;o=e.displayId;break;case 3:A=[e.slot,e.displayId];if(in_array([4,5,6,7,8,9,10,16,19,20],e.slot)!=-1){H(0,e)}else{switch(e.slot){case 1:p=2;break;case 3:p=4;break;default:p=1}o=e.displayId;H(1,e)}break;case 4:A=e.equipList;H(0,e)}if(d){if(gc("modelviewer_mode")=="1"){f.onclick()}else{g.onclick()}}else{E();setTimeout(I,1)}C=location.hash}this.checkPound=function(){if(location.hash&&location.hash.indexOf("#modelviewer")==0){if(y!=null){var a=location.hash.split(":");if(a.length==3&&a[2]){y(a[2])}}else{var b=ge("dsgndslgn464d");if(b){b.onclick()}}}};this.addExtraPound=function(a){y=a};this.show=function(a){v=a;Lightbox.show("modelviewer",{onShow:M,onHide:L},a)};DomContentLoaded.addEvent(this.checkPound)};var g_screenshots={};var ScreenshotViewer=new function(){var o,p,A,v,x,z,t,r=0,w,s,C,G,y,q,u,E,B,F;function I(a){var b=o[p];var c=Math.max(50,Math.min(618,g_getWindowSize().h-72-a));if(r!=1||b.id||b.resize){z=Math.min(772/b.width,618/b.height);x=Math.min(772/b.width,c/b.height)}else{z=x=1}if(z>1){z=1}if(x>1){x=1}A=Math.round(x*b.width);v=Math.round(x*b.height);var d=Math.max(480,A);Lightbox.setSize(d+20,v+52+a);if(Browser.ie6){C.style.width=d+"px";if(o.length>1){y.style.height=q.style.height=v+"px"}else{u.style.height=v+"px"}}if(a){G.firstChild.width=A;G.firstChild.height=v}}function K(a){var b=o[a],c="#screenshots:";if(r==0){c+="id="+b.id}else{c+=w+":"+(a+1)}return c}function J(a){if(a&&(x==z)&&g_getWindowSize().h>s.offsetHeight){return}s.style.visibility="hidden";var b=o[p],c=(b.width>772||b.height>618);I(0);var d=(b.url?b.url:"http://static.wowhead.com/uploads/screenshots/"+(c?"resized/":"normal/")+b.id+".jpg");var e='<img src="'+d+'" width="'+A+'" height="'+v+'"';if(Browser.ie6){e+=' galleryimg="no"'}e+=">";G.innerHTML=e;if(!a){if(b.url){E.href=d}else{E.href="http://static.wowhead.com/uploads/screenshots/normal/"+b.id+".jpg"}if(!b.user&&typeof g_pageInfo=="object"){b.user=g_pageInfo.username}var g=(b.date&&b.user),f=(o.length>1);if(g){var i=new Date(b.date),l=(g_serverTime-i)/1000;var h=B.firstChild.childNodes[1];h.href="/?user="+b.user;h.innerHTML=b.user;var j=B.firstChild.childNodes[3];while(j.firstChild){de(j.firstChild)}Listview.funcBox.coFormatDate(j,l,i);B.firstChild.style.display=""}else{B.firstChild.style.display="none"}var j=B.childNodes[1];if(f){var k="";if(g){k+=LANG.dash}k+=(p+1)+LANG.lvpage_of+o.length;j.innerHTML=k;j.style.display=""}else{j.style.display="none"}B.style.display=(g||f?"":"none");if(g_locale.id!=0&&b.caption){b.caption=""}var n=(b.caption!=null&&b.caption.length);var m=(b.subject!=null&&b.subject.length&&b.type&&b.typeId);if(n||m){var e="";if(m){e+=LANG.types[b.type][0]+LANG.colon;e+='<a href="/?'+g_types[b.type]+"="+b.typeId+'">';e+=b.subject;e+="</a>"}if(n){if(m){e+=LANG.dash}e+=b.caption}F.innerHTML=e;F.style.display=""}else{F.style.display="none"}if(o.length>1){y.href=K(H(-1));q.href=K(H(1));y.style.display=q.style.display="";u.style.display="none"}else{y.style.display=q.style.display="none";u.style.display=""}location.replace(K(p))}Lightbox.reveal();if(F.offsetHeight>18){I(F.offsetHeight-18)}s.style.visibility="visible"}function H(a){var b=p;b+=a;if(b<0){b=o.length-1}else{if(b>=o.length){b=0}}return b}function L(){p=H(-1);J();return false}function M(){p=H(1);J();return false}function N(a){a=$E(a);switch(a.keyCode){case 37:L();break;case 39:M();break}}function O(){J(1)}function P(){if(o.length>1){dE(document,"keyup",N)}if(t&&r==0){if(t.indexOf(":id=")!=-1){t="#screenshots"}location.replace(t)}else{location.replace("#.")}}function Q(a,b,c){if(typeof c.screenshots=="string"){o=g_screenshots[c.screenshots];r=1;w=c.screenshots}else{o=c.screenshots;r=0;w=null}s=a;p=0;if(c.pos&&c.pos>=0&&c.pos<o.length){p=c.pos}if(b){a.className="screenshotviewer";C=ce("div");C.className="screenshotviewer-screen";y=ce("a");q=ce("a");y.className="screenshotviewer-prev";q.className="screenshotviewer-next";y.href="javascript:;";q.href="javascript:;";var d=ce("span");ae(d,ce("b"));ae(y,d);var d=ce("span");ae(d,ce("b"));ae(q,d);y.onclick=L;q.onclick=M;u=ce("a");u.className="screenshotviewer-cover";u.href="javascript:;";u.onclick=Lightbox.hide;var d=ce("span");ae(d,ce("b"));ae(u,d);if(Browser.ie6){ns(y);ns(q);y.onmouseover=q.onmouseover=u.onmouseover=function(){this.firstChild.style.display="block"};y.onmouseout=q.onmouseout=u.onmouseout=function(){this.firstChild.style.display=""}}ae(C,y);ae(C,q);ae(C,u);G=ce("div");ae(C,G);ae(a,C);var e=ce("a");e.className="screenshotviewer-close";e.href="javascript:;";e.onclick=Lightbox.hide;ae(e,ce("span"));ae(a,e);E=ce("a");E.className="screenshotviewer-original";E.href="javascript:;";E.target="_blank";ae(E,ce("span"));ae(a,E);B=ce("div");B.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(B,g);ae(B,ce("span"));ae(a,B);F=ce("div");F.className="screenshotviewer-caption";ae(a,F);var f=ce("div");f.className="clear";ae(a,f)}t=location.hash;if(o.length>1){aE(document,"keyup",N)}J()}DomContentLoaded.addEvent(this.checkPound)};DomContentLoaded.addEvent(function(){});