var disappeardelay=250;
var enableanchorlink=0;
var hidemenu_onclick=1;
var ie5=document.all;
var ns6=document.getElementById&&!document.all;
var ghost_var = "";
function ajaxHelper(functionName) {
var xmlHttp;
// Firefox, Opera 8.0+, Safari, SeaMonkey
try {
xmlHttp=new XMLHttpRequest();
}
catch (e) {
// Internet Explorer
try {
xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
}
catch (e) {
try {
xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
}
catch (e) {
return false;
}
}
}
xmlHttp.onreadystatechange=function() {
//The request is complete == state 4
if (xmlHttp.readyState==4) {
var response=xmlHttp.responseText;
//Send reponse to _ajax hook of passed function name
eval(functionName + "_ajax" + '(\'' + response + '\')');
}
}
//Get request string from _setup hook of passed function name
var requestString = eval(functionName+"_init" + '()');
if (requestString) {
xmlHttp.open("GET", requestString, true);
xmlHttp.send(null);
}
}
function addP() {
try {
window.external.AddSearchProvider('http://armorylite.com/inc/alsearch.xml');
}
catch(e) {
alert('Search engine integration requires either Firefox 2 or Internet Explorer 7.');
}
}
function addD() {
try {
window.external.AddSearchProvider('http://armorylite.com/inc/direct.xml');
}
catch(e) {
alert('Search engine integration requires either Firefox 2 or Internet Explorer 7.');
}
}
function filtergear(z, r, s) {
xx = document._gear._filter[document._gear._filter.selectedIndex].value;
window.location.href = '/score/' + z + '/' + r + '/' + xx;
}
function filterbrowse(url) {
window.location.href = url + "/" + document._browse._sort[document._browse._sort.selectedIndex].value;
}
which_tab = "";
function togglenotes() {
if (document.getElementById('notes_block').style.visibility == 'visible') {
document.getElementById('notes_block').style.visibility = 'hidden';
document.getElementById('notes_block').style.display = 'none';
document.getElementById(which_tab).className = 'box_on';
document.getElementById('notes_nav').className = 'box_off';
} else {
document.getElementById('notes_block').style.visibility = 'visible';
document.getElementById('notes_block').style.display = '';
which_tab = find_nav();
clear_nav();
document.getElementById('notes_nav').className = 'box_on';
}
}
function forumjump() {
xi = document._forum._jump[document._forum._jump.selectedIndex].value;
window.location.href = '/forums/?f=' + xi;
}
function find_nav() {
var tabs = new Array('main_nav','talents_nav','rep_nav','skills_nav','guild_nav','arena_nav','my_nav');
var found = "";
for (x in tabs) {
if (document.getElementById(tabs[x]).className == 'box_on') {
found = tabs[x];
break;
}
}
return found;
}
function clear_nav() {
var tabs = new Array('main_nav','talents_nav','rep_nav','skills_nav','guild_nav','arena_nav','my_nav');
for (x in tabs) {
document.getElementById(tabs[x]).className = 'box_off';
}
}
function stat_hide() {
document.getElementById('stats_base_main').style.visibility = 'hidden';
document.getElementById('stats_melee_main').style.visibility = 'hidden';
document.getElementById('stats_ranged_main').style.visibility = 'hidden';
document.getElementById('stats_spell_main').style.visibility = 'hidden';
document.getElementById('stats_defense_main').style.visibility = 'hidden';
document.getElementById('stats_arena_main').style.visibility = 'hidden';
document.getElementById('stats_base_main').style.display = 'none';
document.getElementById('stats_melee_main').style.display = 'none';
document.getElementById('stats_ranged_main').style.display = 'none';
document.getElementById('stats_spell_main').style.display = 'none';
document.getElementById('stats_defense_main').style.display = 'none';
document.getElementById('stats_arena_main').style.display = 'none';
document.getElementById('stats_base_head').className = 'stats_head_off';
document.getElementById('stats_melee_head').className = 'stats_head_off'
document.getElementById('stats_ranged_head').className = 'stats_head_off'
document.getElementById('stats_spell_head').className = 'stats_head_off'
document.getElementById('stats_defense_head').className = 'stats_head_off'
document.getElementById('stats_arena_head').className = 'stats_head_off'
}
function stat_show(iid,hid) {
// stat_hide();
// document.getElementById(iid).style.visibility = 'visible';
// document.getElementById(iid).style.display = '';
// document.getElementById(hid).className = 'stats_head_on';
if (document.getElementById(iid).style.visibility == 'visible') {
document.getElementById(iid).style.visibility = 'hidden';
document.getElementById(iid).style.display = 'none';
document.getElementById(hid).className = 'stats_head_off';
} else {
document.getElementById(iid).style.visibility = 'visible';
document.getElementById(iid).style.display = '';
document.getElementById(hid).className = 'stats_head_on';
}
}
function arenateam_swap(iid,hid) {
if (document.getElementById(iid).style.display == '') {
document.getElementById(iid).style.visibility = 'hidden';
document.getElementById(iid).style.display = 'none';
document.getElementById(hid).className = 'arenateam_header_off';
} else {
document.getElementById(iid).style.visibility = 'visible';
document.getElementById(iid).style.display = '';
document.getElementById(hid).className = 'arenateam_header';
}
}
function rep_swap(iid,hid) {
if (document.getElementById(iid).style.display == '') {
document.getElementById(iid).style.visibility = 'hidden';
document.getElementById(iid).style.display = 'none';
document.getElementById(hid).className = 'rep_header_off';
} else {
document.getElementById(iid).style.visibility = 'visible';
document.getElementById(iid).style.display = '';
document.getElementById(hid).className = 'rep_header';
}
}
function skill_swap(iid,hid) {
if (document.getElementById(iid).style.display == '') {
document.getElementById(iid).style.visibility = 'hidden';
document.getElementById(iid).style.display = 'none';
document.getElementById(hid).className = 'skill_header_off';
} else {
document.getElementById(iid).style.visibility = 'visible';
document.getElementById(iid).style.display = '';
document.getElementById(hid).className = 'skill_header';
}
}
function ghost_txt_out (fld, def, id) {
if (fld.value == def) {
fld.value = def;
}
if (fld.value == "") {
if (ghost_var == def) {
fld.value = def;
} else {
fld.value = ghost_var;
ghost_var = "";
}
}
fld.id = id;
}
function ghost_txt_inc (fld, def, id) {
ghost_var = fld.value;
fld.value = "";
fld.id = id;
}
function do_arm_build(pag) {
if (pag == "server") {
xx = document._arm._server[document._arm._server.selectedIndex].value;
cc = xx.split("_");
document._arm._servername.value = cc[0];
document._arm._country.value = cc[1];
document._arm._name.value = "Your Name";
document.getElementById("arm_link").innerHTML = "http://armorylite.com/" + document._arm._country.value + "/" + document._arm._servername.value + "/" + document._arm._name.value + "";
}
if (pag == "user") {
document.getElementById("arm_link").innerHTML = "http://armorylite.com/" + document._arm._country.value + "/" + document._arm._servername.value + "/" + document._arm._name.value + "";
}
}
function getposOffset(what, offsettype) {
var totaloffset=(offsettype=="left")? what.offsetLeft+5 : what.offsetTop-4;
var parentEl=what.offsetParent;
while (parentEl!=null) {
totaloffset=(offsettype=="left")? totaloffset+parentEl.offsetLeft : totaloffset+parentEl.offsetTop;
parentEl=parentEl.offsetParent;
}
return totaloffset;
}
function showhide(obj, e, visible, hidden) {
if (ie5||ns6) {
dropmenuobj.style.left=dropmenuobj.style.top=-500;
}
if (e.type=="click" && obj.visibility==hidden || e.type=="mouseover") {
obj.visibility=visible;
} else if (e.type=="click") {
obj.visibility=hidden;
}
}
function iecompattest() {
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body;
}
function clearbrowseredge(obj, whichedge) {
var edgeoffset=0;
if (whichedge=="rightedge") {
var windowedge=ie5 && !window.opera? iecompattest().scrollLeft+iecompattest().clientWidth-15 : window.pageXOffset+window.innerWidth-15;
dropmenuobj.contentmeasure=dropmenuobj.offsetWidth;
if (windowedge-dropmenuobj.x < dropmenuobj.contentmeasure) {
edgeoffset=dropmenuobj.contentmeasure-obj.offsetWidth;
}
} else {
var topedge=ie5 && !window.opera? iecompattest().scrollTop : window.pageYOffset;
var windowedge=ie5 && !window.opera? iecompattest().scrollTop+iecompattest().clientHeight-15 : window.pageYOffset+window.innerHeight-18;
dropmenuobj.contentmeasure=dropmenuobj.offsetHeight;
if (windowedge-dropmenuobj.y < dropmenuobj.contentmeasure) {
edgeoffset=dropmenuobj.contentmeasure+obj.offsetHeight;
if ((dropmenuobj.y-topedge)