// JavaScript Document

function imgwind(url, w, h) {
	timeout =20; 
	windowprops = "left=50,top=50,width=" + (w+50) + ",height=" + (h+50);
	text = "<html><head><title>Просмотр</title></head><body bgcolor='white'";
		if (timeout != 0) text +=" onLoad=\"setTimeout('window.close()', " + timeout*1000 + ");\"";
		text += "><center><img src='" + url + "'>";
			<!--if (timeout != 0) text +="<br><font face='arial, helvetica' size='-1'>Preview closes after " + timeout + " seconds.</font>";-->
			text += "</center></body></html>";
			preview = window.open("", "preview", windowprops);
			preview.document.open();
			preview.document.write(text);
			preview.document.close();
}
