ok good news, I know the issue, the bad news... this JS is ugly as sin.
It's all located in this here:
What this code here is doing is adding the pageLoad() function to an onload handler event (which runs after the page is finished loading). the pageLoad function has an object with a crap ton of hard coded element id's in it which is passes to the collapseAll() function. The collapseAll() function then basically loops through that entire listing and attempts to just set the property on each of these elements, regardless on if they exist or not...
What I'd suggest is to just pre-hide all these elements with inline styles (or a class added to each one with display: none set in it) and scrap this entire chunk of code. It looks more professional when everything is showing as intended before the page is done loading anyhow. Rather than waiting for the page to load then hiding everything that you want hidden.
It's all located in this here:
Code Select
function collapseAll(objs) {
var i;
for (i=0;i<objs.length;i++ ) {
objs[i].style.display = 'none';
}
}
function pageLoad() {
collapseAll($('aboutp','legendp','overp','systemp','typesp','becomingp','gemsp','aimsp','deathp','weaponsp','planep','ronadap','itemsp', 'classesp','recp','spoilerchains','spoileryu','spoilersaru','spoilerhibi','spoileremblem','spoilerdonna','spoilernexy','spoilerohbi', 'spoilerresen','spoilercinna','spoilermin','spoilerjone','spoilerisu','spoilerfila','spoilergachan','spoilerchester','spoilermido', 'spoilerwren','spoilerkaben'));
}
addEvent(window,'load',pageLoad);
What this code here is doing is adding the pageLoad() function to an onload handler event (which runs after the page is finished loading). the pageLoad function has an object with a crap ton of hard coded element id's in it which is passes to the collapseAll() function. The collapseAll() function then basically loops through that entire listing and attempts to just set the property on each of these elements, regardless on if they exist or not...
What I'd suggest is to just pre-hide all these elements with inline styles (or a class added to each one with display: none set in it) and scrap this entire chunk of code. It looks more professional when everything is showing as intended before the page is done loading anyhow. Rather than waiting for the page to load then hiding everything that you want hidden.