function print_contents(print_id, title) { var contents = ""; contents += ""; contents += "" + title + ""; contents += ""; contents += ""; contents += ""; contents += "
"; contents += document.getElementById(print_id).innerHTML; contents += "
"; contents += ""; contents += ""; var width_dim = document.getElementById(print_id).clientWidth + 20; var width = width_dim + 'px'; var height_dim = 600; var height = height_dim + 'px'; var left = (screen.availWidth - width_dim) / 2; var top = (screen.availHeight - height_dim) / 2; var options = 'width=' + width + ',height=' + height + ',left=' + left + ',top=' + top + ',status=no,resizable=no,scrollbars=yes'; var win = window.open('', '', options); win.document.write(contents); if (document.all) { win.document.execCommand('Print'); } else { win.print(); } } function print_contents2(print_id, print_id2, title) { var contents = ""; contents += ""; contents += "" + title + ""; contents += ""; contents += ""; contents += ""; contents += ""; contents += ""; contents += ""; contents += "
"; contents += document.getElementById(print_id).innerHTML; contents += "
"; contents += document.getElementById(print_id2).innerHTML; contents += "
"; contents += ""; contents += ""; var width_dim = document.getElementById(print_id).clientWidth + 20; var width = width_dim + 'px'; var height_dim = 600; var height = height_dim + 'px'; var left = (screen.availWidth - width_dim) / 2; var top = (screen.availHeight - height_dim) / 2; var options = 'width=' + width + ',height=' + height + ',left=' + left + ',top=' + top + ',status=no,resizable=no,scrollbars=yes'; var win = window.open('', '', options); win.document.write(contents); if (document.all) { win.document.execCommand('Print'); } else { win.print(); } }