function show_img(URL, WIDTH, HEIGHT, title, timeout) {
windowprops = "width=" + (WIDTH+2) + ",height=" + (HEIGHT+2);
text = "<html><head><title>" + title + "</title></head><body bgcolor='white' style='padding: 1px; margin: 0'";
if (timeout != 0) text +=" onLoad=\"setTimeout('window.close()', " + timeout*1000 + ");\"";
text += "><a href=javascript:window.close();><center><img src='" + URL + "' border=0>";
if (timeout != 0) text +="<br><font face='arial, helvetica' size='-1'>Preview closes after " + timeout + " seconds.</font>";
text += "</center></a></body></html>";
preview = window.open("", "preview", windowprops);
//preview = window.open("", "preview");
preview.document.open();
preview.document.write(text);
preview.document.close();
}
