// JavaScript Document

/* Code from http://www.boutell.com/newfaq/creating/printpart.html */ 
hs.printImage = function (el) 
{ 
   var exp = hs.expanders[hs.getWrapperKey(el)]; 
   link = "about:blank"; 
   var pw = window.open(link, "_new"); 
   pw.document.open(); 
   pw.document.write(exp.getPrintPage()); 
   pw.document.close(); 
   return false; 
}; 

HsExpander.prototype.getPrintPage = function() 
{ 
   // We break the closing script tag in half to prevent 
   // the HTML parser from seeing it as a part of 
   // the *main* page. 

   return "<html>\n" + 
      "<head>\n" + 
      "<title>" + MsgWebsiteTitle + "</title>\n" + 
      "<script>\n" +"function step1() {\n" + 
      "  setTimeout('step2()', 10);\n" + 
      "}\n" + 
      "function step2() {\n" + 
      "  window.print();\n" + 
      "  window.close();\n" + 
      "}\n" + 
      "</scr" + "ipt>\n" +
	  "<style type=\"text/css\"> a {display:hidden; color: white;} </style>\n" +
      "</head>\n" + 
      "<body onLoad='step1()'>\n" + 
      "<img src='" + this.content.src + "'/>\n" + 
      "<div style=\"font-family: sans-serif;\"><br />"+ this.caption.innerHTML + "</div>"+ 
      "</body>\n" + 
      "</html>\n"; 
};

