/**
 * This prints the switch to toggle the Table of Contents
 */
function showTocToggle(showtxt,hidetxt) {
  if(document.getElementById) {
		show = '<img src="fileadmin/template/toc/arrow_down.gif" alt="zeigen" border="0">';
		hide = '<img src="fileadmin/template/toc/arrow_up.gif" alt="verstecken" border="0">';

    document.writeln('<div class=\'toctoggle\'><a href="javascript:toggleToc()" class="toc">' +
    '<span id="showlink" style="display:none;">' + show + '</span>' +
    '<span id="hidelink">' + hide + '</span>'
    + '</a></div>');
  }
}

/**
 * This toggles the visibility of the Table of Contents
 */
function toggleToc() {
  var toc = document.getElementById('tocinside');
  var showlink=document.getElementById('showlink');
  var hidelink=document.getElementById('hidelink');
  if(toc.style.display == 'none') {
    toc.style.display = tocWas;
    hidelink.style.display='';
    showlink.style.display='none';
  } else {
    tocWas = toc.style.display;
    toc.style.display = 'none';
    hidelink.style.display='none';
    showlink.style.display='';

  }
}

