function makepage(src)
{

  return "<html>" +
    "<head>" +
    "<title>Temporary Printing Screen</title>" +
    "<script>" +
    "function step1() {" +
    "  setTimeout('step2()', 10);" +
    "}" +
    "function step2() {" +
    "  window.print();" +
    "  window.close();" +
    "}" +
    "</scr" + "ipt>" +
    "</head>" +
    "<body onLoad='step1()'>" +
    "<center>" +
	"<img src='" + src + "'/>" +
	"</center>" +
    "</body>" +
    "</html>";
}

function printme(src)
{
  link = "about:blank";
  var pw = window.open(link, "_new");
  pw.document.open();
  pw.document.write(makepage(src));
  pw.document.close();
}
