﻿// Script, das nur den div mit spezifischer ID druckt (Daten&Fakten)
     
      var gAutoPrint = true;

      // druckt den div mit ID printMeZH
      function processPrintZH() {

      if (document.getElementById != null) {
      var html = '<HTML>\n<HEAD>\n';
          if (document.getElementsByTagName != null) {
          var headTags = document.getElementsByTagName("head");
          if (headTags.length > 0) html += headTags[0].innerHTML;
          }
          html += '<style type=\"text/css\"> a.Druckbutton {display:none;} span.lehrgangstitel {visibility:visible;}</style>';
          html += '\n</HE' + 'AD>\n<BODY>\n';
            var printReadyElem = document.getElementById("printMeZH");
            if (printReadyElem != null) html += printReadyElem.innerHTML;
            else {
            alert("Error, no contents.");
            return;
            }

            html += '\n</BO' + 'DY>\n</HT' + 'ML>';
            var printWin = window.open("", "processPrint");
            printWin.document.open();
            printWin.document.write(html);
            printWin.document.close();
            if (gAutoPrint) printWin.print();
            } else alert("Browser not supported.");
    }

    // druckt den div mit ID printMeSG
    function processPrintSG() {

        if (document.getElementById != null) {
            var html = '<HTML>\n<HEAD>\n';
            if (document.getElementsByTagName != null) {
                var headTags = document.getElementsByTagName("head");
                if (headTags.length > 0) html += headTags[0].innerHTML;
            }

            html += '<style type=\"text/css\"> a.Druckbutton {display:none;} span.lehrgangstitel {visibility:visible;}</style>';
            html += '\n</HE' + 'AD>\n<BODY>\n';
            var printReadyElem = document.getElementById("printMeSG");
            if (printReadyElem != null) html += printReadyElem.innerHTML;
            else {
                alert("Error, no contents.");
                return;
            }

            html += '\n</BO' + 'DY>\n</HT' + 'ML>';
            var printWin = window.open("", "processPrint");
            printWin.document.open();
            printWin.document.write(html);
            printWin.document.close();
            if (gAutoPrint) printWin.print();
        } else alert("Browser not supported.");
    }
 

