// Add a print button at the end of the content.
var pb = document.createElement('a');
var pj = 'javascript:window.print()';
pb.setAttribute('href', pj);
pb.setAttribute('onclick', pj + ';return false');
pb.className = 'print';
document.getElementById('content').appendChild(pb);

