
var hideBoxen = "intentionBox,sitesearchBox,fixedissuesBox,fixedconflictsBox,urltoolsInfoBox,getfileInfoBox,getembeddedInfoBox,update07Box";
var openTitle = "Click to open";
var closeTitle = "Click to close";

function initToggleBoxen() {
	var boxen = getElementsByClassName('toggleBox');
	
	for(var i = 0; i < boxen.length; i++) {

		this.toggleBox = function(elem) {
			var childs = elem.parentNode.childNodes;
			
			for(var i = 0; i < childs.length; i++) {
				
				if(childs[i] != elem && childs[i].tagName && childs[i].tagName != "SCRIPT") {
					
					// toggle
					if(childs[i].style.display == "none") {
						childs[i].style.display = '';
						//elem.className = "tgCloseBox";
						elem.className = "tgCloseBoxParent";
						elem.title = closeTitle;
						elem.firstChild.className = "tgCloseBox";
					}
					else {
						childs[i].style.display = 'none';
						//elem.className = "tgOpenBox";
						elem.className = "tgOpenBoxParent";
						elem.title = openTitle;
						elem.firstChild.className = "tgOpenBox";
					}
				}// end if
			}// end for
		} // this.toggleBox
		
		// Klasse zuweisen
		//boxen[i].className = "tgCloseBox";
		boxen[i].className = "tgCloseBoxParent";
		
		var toggleIcon = document.createElement("span");
		toggleIcon.setAttribute('class', 'tgCloseBox');
		boxen[i].insertBefore(toggleIcon, boxen[i].firstChild);
		
		// beim Laden ausblenden
		if(hideBoxen.indexOf(boxen[i].parentNode.id) >= 0) toggleBox(boxen[i]);
		
		// Klick-Event hinzufügen
		//boxen[i].addEventListener('click', function(e) { toggleBox(this); }, false);
		boxen[i].onclick = function() { toggleBox(this); };
	}
}



























/*
Copyright (c) 2006 Stuart Colville
http://muffinresearch.co.uk/archives/2006/04/29/getelementsbyclassname-deluxe-edition/

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated 
documentation files (the "Software"), to deal in the Software without restriction, including without limitation 
the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, 
and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial 
portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED 
TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF 
CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 
IN THE SOFTWARE.
*/
  
function getElementsByClassName(strClass, strTag, objContElm) {
  var n, m, l, k, j, i;
	strTag = strTag || "*";
  objContElm = objContElm || document;    
  var objColl = (strTag == '*' && document.all) ? document.all : objContElm.getElementsByTagName(strTag);
  var arr = new Array();                              
  var delim = strClass.indexOf('|') != -1  ? '|' : ' ';   
  var arrClass = strClass.split(delim);    
  for (i = 0, j = objColl.length; i < j; i++) {                         
    var arrObjClass = objColl[i].className.split(' ');   
    if (delim == ' ' && arrClass.length > arrObjClass.length) continue;
    var c = 0;
    comparisonLoop:
    for (k = 0, l = arrObjClass.length; k < l; k++) {
      for (m = 0, n = arrClass.length; m < n; m++) {
        if (arrClass[m] == arrObjClass[k]) c++;
        if (( delim == '|' && c == 1) || (delim == ' ' && c == arrClass.length)) {
          arr.push(objColl[i]); 
          break comparisonLoop;
        }
      }
    }
  }
  return arr; 
}
/*
// To cover IE 5 Mac lack of the push method
Array.prototype.push = function(value) {
  this[this.length] = value;                                                              
}*/