if(document.createElement&&document.getElementById&&document.getElementsByTagName){var mons={placeholder:document.createElement('a'),placeholderImg:document.createElement('img'),theList:document.getElementById('masterlist'),monsterLinks:document.getElementById('masterlist').getElementsByTagName('a'),headers:document.getElementsByTagName('h4'),togglers:document.getElementById('navlist').getElementsByTagName('span'),otherHeadName:null,otherListName:null,init:function(){this.util.configEvents();this.placeholder.href='#';this.placeholderImg.src='images/320x240.png';this.placeholderImg.alt='Placeholder for monster pictures';this.placeholderImg.title='';this.placeholderImg.id='mainpic';this.placeholderImg.className='place';this.placeholder.appendChild(this.placeholderImg);this.theList.parentNode.insertBefore(this.placeholder,this.theList);this.util.addEvent(this.placeholder,'click',this.dumpPic,false);this.util.addEvent(this.theList,'click',this.showPic,false);for(var i=0;i<mons.togglers.length;i++){var a=document.createElement('img');a.style.verticalAlign='top';this.togglers[i].appendChild(a);var b=mons.togglers[i].parentNode;var c=b.id;var d=c.substr(0,4)+'list';var e=document.getElementById(d);if(e.className==='NoDisp'){a.src='images/expand.gif';a.alt=a.title='Click here to expand series'}else{a.src='images/collapse.gif';a.alt=a.title='Click here to collapse series'}};for(var i=0;i<mons.headers.length;i++){this.util.addEvent(this.headers[i],'click',this.toggle,false)}},dumpPic:function(a){mons.placeholderImg.src='images/320x240.png';mons.placeholderImg.alt='Placeholder for monster pictures';mons.placeholderImg.title='';mons.util.stopDefault(a)},showPic:function(a){var b=mons.util.findTarget(a,'a',this);if(!b){return}mons.placeholderImg.src=b;mons.placeholderImg.alt=mons.placeholderImg.title=b.firstChild.nodeValue;mons.util.stopDefault(a)},toggle:function(a){mons.util.stopDefault(a);var b=this.id;var c=b.substr(0,4)+'list';var d=document.getElementById(c);if(d.className==='NoDisp'){d.className='';this.firstChild.firstChild.src='images/collapse.gif';this.firstChild.firstChild.alt=this.firstChild.firstChild.title='Click here to collapse series';if(b==='monshead'){mons.otherHeadName='convhead';mons.otherListName='convlist'}else{mons.otherHeadName='monshead';mons.otherListName='monslist'}var e=document.getElementById(mons.otherListName);var f=document.getElementById(mons.otherHeadName);e.className='NoDisp';f.firstChild.firstChild.src='images/expand.gif';f.firstChild.firstChild.alt=f.firstChild.firstChild.title='Click here to expand series'}else{d.className='NoDisp';this.firstChild.firstChild.src='images/expand.gif';this.firstChild.firstChild.alt=this.firstChild.firstChild.title='Click here to expand series'}},util:{configEvents:function(){if(document.addEventListener){this.addEvent=function(a,b,c,d){a.addEventListener(b,c,d)};this.stopDefault=function(a){a.preventDefault()};this.findTarget=function(a,b,c){var d=a.target;while(d&&d!==c){if(d.nodeName.toLowerCase()===b){return d;break}else{d=d.parentNode}};return false}}else if(document.attachEvent){this.addEvent=function(a,b,c){a["e"+b+c]=c;a[b+c]=function(){a["e"+b+c](window.event)};a.attachEvent("on"+b,a[b+c])};this.stopDefault=function(a){a.returnValue=false};this.findTarget=function(a,b,c){var d=a.srcElement;while(d&&d!==c){if(d.nodeName.toLowerCase()===b){return d;break}else{d=d.parentNode}};return false}}}}};mons.init()};