//-------------------------------------------------------------------------------------------------- // All material contained within this document and associated downloaded pages // is the property of 4thorder(TM) unless otherwise noted // Copyright © 2005. All rights reserved. // // Author: Michael Falatine || Authors email: 4thorder@4thorder.us // // USAGE: You may use this script for commercial or personal use, however, the copyright is retained- // by 4thorder (TM). // // For other free Scripts visit: http://www.4thorder.us/Scripts/ //--------------------------------------------------------------------------------------------------- //-----------------begin insertAdjacent code----------------------------------------------------- // This portion written by Thor Larholm thor@jscript.dk // Allows for insertAdjacentHTML(), insertAdjacentText() and insertAdjacentElement() // functionality in Netscape / Mozilla /Opera if(typeof HTMLElement!="undefined" && !HTMLElement.prototype.insertAdjacentElement){ HTMLElement.prototype.insertAdjacentElement = function(where,parsedNode) { switch (where){ case 'beforeBegin': this.parentNode.insertBefore(parsedNode,this) break; case 'afterBegin': this.insertBefore(parsedNode,this.firstChild); break; case 'beforeEnd': this.appendChild(parsedNode); break; case 'afterEnd': if (this.nextSibling) this.parentNode.insertBefore(parsedNode,this.nextSibling); else this.parentNode.appendChild(parsedNode); break; } } HTMLElement.prototype.insertAdjacentHTML = function(where,htmlStr) { var r = this.ownerDocument.createRange(); r.setStartBefore(this); var parsedHTML = r.createContextualFragment(htmlStr); this.insertAdjacentElement(where,parsedHTML) } HTMLElement.prototype.insertAdjacentText = function(where,txtStr) { var parsedText = document.createTextNode(txtStr) this.insertAdjacentElement(where,parsedText) } } //----------------------end insertAdjacent code------------------------------------------------------- // :::::::::::::::: // :::: Styles ::: // :::::::::::::::: function setSTYLES() { mainTABLEElement=document.getElementById("mainTable"); TDCol=mainTABLEElement.getElementsByTagName("TD"); for (s=0; s0) { THCol=SUBTABLECol.item(s).getElementsByTagName("TH"); if(ImagePlacement=='before') { var str='Expand ALL '; THCol.item(0).insertAdjacentHTML("afterBegin", str); } else if(ImagePlacement=='after') { var str=' Expand ALL'; THCol.item(0).insertAdjacentHTML("beforeEnd", str); } else {} THCol.item(0).style.cursor="pointer"; } } } // ::::::::::::::::::::::::::: // :::: Global Functions ::: // ::::::::::::::::::::::::::: window.onload=InitializePage; function InitializePage() {hideALL(); setSTYLES(); attachEventhandlers();} // Attach event handlers to all images within container function attachEventhandlers() { mainTABLEElement=document.getElementById("mainTable"); TABLECol=mainTABLEElement.getElementsByTagName("TABLE"); if (TABLECol!=null) {for (l=0; l