// PRINT SCRIPT
var gAutoPrint = true; // Flag for whether or not to automatically call the print function

function printSpecial()
{
        if (document.getElementById != null)
        {
                var html = '<HTML>\n<HEAD><script LANGUAGE="JavaScript">setTimeout("self.close();", 7000);</script>\n';

                if (document.getElementsByTagName != null)
                {
                        var headTags = document.getElementsByTagName("head");
                        if (headTags.length > 0)
                                html += headTags[0].innerHTML;
                }

                html += '\n</HE' + 'AD>\n<BODY>\n';

                var printReadyElem = document.getElementById("printReady");

                if (printReadyElem != null)
                {
                                html += printReadyElem.innerHTML;
                }
                else
                {
                        alert("Keine Print ID gefunden.");
                        return;
                }

                html += '\n</BO' + 'DY>\n</HT' + 'ML>';

                var printWin = window.open("","printSpecial","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,width=635,height=400,screenX=+w2+,screenY=+h2+,left=+w2+,top=+h2;");
                printWin.document.open();
                printWin.document.write(html);
                printWin.document.close();
                if (gAutoPrint)
                        printWin.print();
        }
        else
        {
                alert("Dieses Script funktioniert nur in Browsern der neueren Generation.");
        }
}
