var gAutoPrint = true; function processPrint(){ if (document.getElementById != null){ var html = '\n\n'; if (document.getElementsByTagName != null){ var headTags = document.getElementsByTagName("head"); if (headTags.length > 0) html += headTags[0].innerHTML; } html += '\n\n\n'; var printReadyElem = document.getElementById("body"); if (printReadyElem != null) html += printReadyElem.innerHTML; else{ alert("Error, no contents."); return; } html += '\n\n'; var printWin = window.open("","processPrint"); printWin.document.open(); printWin.document.write(html); printWin.document.close(); if (gAutoPrint) printWin.print(); } else alert("Browser not supported."); } var w; function printImage ( img_id ) { img = document.getElementById( img_id ).src; if (w && !w.closed) w.close(); w = open ('', 'imagePrint', 'menubar=1,locationbar=0,statusbar=0,resizable=1' + ',scrollbars=1,width=800'); var html = ''; html += ''; html += ''; html += '<\/BODY><\/HTML>'; w.document.open(); w.document.write(html); w.document.close(); }