function ImgPreview(px,py,name){
	var popW = px;
	var popH = py;
	var w = 480;
	var h = 340;

	w = window.innerWidth;
	h = window.innerHeight;
	x = window.screenX;
	y = window.screenY;

	if (w == null) w = document.body.clientWidth;
	if (h == null) h = document.body.clientHeight;
	if (x == null) x = window.screenTop;
	if (y == null) y = window.screenLeft;

	var leftPos = ((w-popW)/2)+y;
	var topPos = ((h-popH)/2)+x;

	if (leftPos < 0) leftPos = 0;
	if (topPos < 0) topPos = 0;

	pr = window.open('','preview','width=' + popW + ',height=' + popH + ',top=' + topPos + ',left=' + leftPos + ',status=no,scrollbars=no,toolbar=no,location=no,directories=no,menubar=no,resizable=no');
	pr.document.write('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">\n');
	pr.document.write('<html xmlns="http://www.w3.org/1999/xhtml">\n');
	pr.document.write('<head>\n');
	pr.document.write('	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"></meta>\n');
	pr.document.write('	<title>Delavska Hranilnica :: slika:' + name + '</title>\n');
	pr.document.write('	<meta name="description" content=""></meta>\n');
	pr.document.write('	<meta name="keywords" content=""></meta>\n');
	pr.document.write('	<meta name="author" content="ROER Informatika, Robert Resnik s.p."></meta>\n');
	pr.document.write('	<meta name="coding" content=""></meta>\n');
	pr.document.write('	<meta name="owner" content=""></meta>\n');
	pr.document.write('	<meta name="revisit-after" content="100 Days">\n');
	pr.document.write('	<meta name="robot" content="None">\n');
	//pr.document.write('	<link rel="shortcut icon" href="?Load=favicon.ico">\n');
	pr.document.write('	<style type="text/css">\n');
	pr.document.write('	<!--\n');
	pr.document.write('		* { margin:0; padding:0; }\n');
	pr.document.write('	-->\n');
	pr.document.write('	</style>\n');
	pr.document.write('</head>\n');
	pr.document.write('<body>\n');
	pr.document.write('	<center>\n');
	pr.document.write('		<img width="' + px + '" height="' + py + '" src="' + name + '">\n');
	pr.document.write('	</center>\n');
	pr.document.write('</body>\n');
	pr.document.write('</html>');
	pr.document.close();
	pr.focus();
}