```function printPage(id) { var html='<html>...
# sitebuilder
j
Copy code
function printPage(id)
{
var html='<html><head><style>body{font-family: Arial, Helvetica, sans-serif;} #items {font-family: Arial, Helvetica, sans-serif; border-collapse: collapse; width: 100%;} #items td, #items th {border: 1px solid #ddd; padding: 8px;} #items th {padding-top: 12px; padding-bottom: 12px; text-align: left; background-color: #4CAF50; color: white;}</style></head><body>'
    html+='<div><table width="100%">'
      html+='<tr>'
        html+='<td width="50%" valign="top"><p><img src="<http://logolinkfromnetsuitedocumentlibrary.com>" border=0></p></td>'
        html+='<td width="50%" valign="top"><h1>Quote</h1></td>'
      html+='</tr>'
      html+='<tr>'
        html+='<td width="50%" valign="top"><p><b>Company Name</b><br>Address 1<br>Address 2<br>City, State, Zip</p> <p><b>Bill To</b><br><table><tr>'+document.getElementById('billingaddress').rows[1].innerHTML+'</tr></table></p></td>'
        html+='<td width="50%" valign="top"><p><b>Date:</b> '+new Date().getMonth()+'/'+new Date().getDate()+'/'+new Date().getFullYear()+'</p><p><b>Sales Rep:</b> Sales Rep</p><p><b>Sales Rep Email:</b> <mailto:sales@company.com|sales@company.com></p></td>'
      html+='</tr>'
    html+='</table></div>'
    html+='<div><table id="items">'+document.getElementById('carttable').innerHTML+'</table></div>';
    html+='<p>This quote is for the purchaser\'s purpose only and is not saved or recorded by Company. The total amount due is based on the current terms of the purchaser\'s account with company (if applicable) and will remain the same at the time of purchase unless the terms are changed and acknowledge by both parties before the time of purchase.</p>'
    html+='</body></html>';

   var printWin = window.open('Company Quote','','left=0,top=0,width=auto,height=auto,toolbar=0,scrollbars=0,status=0');
   printWin.document.write(html);
   printWin.document.close();
   printWin.focus();
   printWin.print();
   printWin.close();
}