"; */ var newstr = document.all.item(printpage).innerHTML; printHtml(newstr); /* var oldstr = document.body.innerHTML; document.body.innerHTML = headstr + newstr + footstr; window.print(); document.body.innerHTML = oldstr; */ return false; } function printHtml(html) { try { var iframe = document.getElementById("printingFrame"); if (!iframe) { iframe = document.createElement('iframe'); iframe.id = "printingFrame"; iframe.name = "printingFrame"; iframe.width = '0'; iframe.height = '0'; document.body.appendChild(iframe); } iframe.contentWindow.document.open(); iframe.contentWindow.document.write('
'); iframe.contentWindow.document.write(''); iframe.contentWindow.document.write('