  function printFile(file) {
  var html = '<img src="resources/printhead.gif" alt="" />';
  html+= '<br /><img src="image.php?w=1000&h=565&file=' + file + '" alt="" />';
  html+= '<br /><img src="resources/printinfo.gif" alt="" />';
  document.getElementById('printimage').innerHTML = html;
  window.print();
}