// --------------------------------------------------------------------------
// 1. argument 0:   Image to indicate open and close (can be empty '' if no image should be used)
// 1. argument 1:   This div will be hidden/displayed (toogle function)
// 2. argument 2-x: All these divs will be hidden
// Note: Historical versions are at the end
// --------------------------------------------------------------------------

function showDiv(args)
{ if   (showDiv.arguments[0] != '')
       { var imgDown = "images/" + showDiv.arguments[0] + "-down.gif";
         var imgUp = "images/" + showDiv.arguments[0] + "-up.gif";
         var arrow = new Image(); /* width, height */
         var img = showDiv.arguments[1] + 'IMG';
       }
  var element = document.getElementById(showDiv.arguments[1]);
  if   (element.style.display == "none") 
       { if (showDiv.arguments[0] != '') arrow.src = imgUp;
         element.style.display = "block"; 
       } 
  else { if (showDiv.arguments[0] != '') arrow.src = imgDown;
         element.style.display = "none"; 
       }
  if (showDiv.arguments[0] != '') document.images[img].src = arrow.src; 

  /* Test: document.write("Funktion bekam " + showDiv.arguments.length + " Argumente"); for (var i = 0; i < showDiv.arguments.length; i++) document.write("<BR>" + showDiv.arguments[i]); */
  for (var i = 2; i < showDiv.arguments.length; i++)
      { document.getElementById(showDiv.arguments[i]).style.display = "none";
        if (showDiv.arguments[0] != '')
           { arrow = new Image();
             img = showDiv.arguments[i] + 'IMG';
             arrow.src = imgDown;
             document.images[img].src = arrow.src;
           }
      }
}


/* --------------------------------------------------------------------------
03.2008: IE, FF, NN and OP alerted "document.getElementById" ("layers" and "all" for older browser versions?) 
         It seems that the checks of the different browsers is not required anymore

         if   (document.getElementById) { document.getElementById(divId).style.display = ""; }
         else { if (document.layers) document.layers[divId].visibility = "show"; else document.all(divId).style.display = ""; }
         if   (document.getElementById) { document.getElementById(divId).style.display = "none"; }
         else { if (document.layers) document.layers[divId].visibility = "hide"; else document.all(divId).style.display = "none"; }
*/
