timeout = 3;
function Mugshot(URL, WIDTH, HEIGHT) 
{
 windowprops = "left=50,top=50,width="
 windowprops += (WIDTH+50) + ",height=" + (HEIGHT+50);
 text = "<html><head><title>Mugshot</title></head><body bgcolor='white'";
 if  (timeout  != 0) {
      text  +=" onLoad=\"setTimeout('window.close()',  ";
      text  +=  timeout*1000  +  ");\"";
 }    text  += "><center><img src='" + URL + "'>";
 if  (timeout != 0) {
      text +="<br><font face='arial, helvetica' size='-1'>mugshot closes after ";
      text += timeout + " seconds.</font>";
 }
 text += "</center></body></html>";
 mugshot = window.open("", "mugshot", windowprops);
 mugshot.document.open();
 mugshot.document.write(text);
 mugshot.document.close();
}