<!--

	var winId = 0;
	function openWnd(file, x, y, oneInstance, scrollBars) {
		winId++;
		if(y == -1) y = screen.height;
		if(!x) x = 350;
		if(!y) y = 350;
		if(oneInstance) {
			var wid = 'file';
		}
		else {
			var wid = 'file' + winId;
		}
		if(!scrollBars) {
			scrollBars = "auto";
		}
		cleft = (screen.width / 2) - (x / 2);
		ctop = (screen.height / 2) - (y / 2);
		var windowId;
		windowId=window.open(file, wid,'toolbar=0,directories=0,status=0,menubar=0,width=' + x +',height=' + y + ',scrollbars=' + scrollBars + ',resizable=no,left=' + cleft + ',top=' + ctop);
		windowId.focus();
		return false;
	}


function newImageWindow(href, target, width, height, scroll, title) {

	if (!scroll) {

		scroll = 'no';

	}

	width += 19;
	height += 31;

	if (height > 600) {

		width += 17;
		height = 600;
		scroll = 'yes';

	}

	var top = (document.body.clientHeight - height) / 2;
	var left = (document.body.clientWidth - width) / 2;
	top = Math.round(top);

	content = '<title>Просмотр</title><body style="text-align: center; margin: 0; padding: 0; font: 18px Tahoma, Tahoma, Arial; color: #082D45">' + title + '<br><img src="' + href + '" border="0" alt="Закрыть" title="Закрыть" style="cursor: pointer; margin: 7 0 0 0" onclick="window.close()"><br>';
	win =  window.open('about:blank', 'new_windows', 'toolbar=no, width=' + (width - 19) + ', height=' + (height - 2) + ', top=' + top + ', left=' + left + ', scrollbars=' + scroll + ', status=yes, resizable=yes');
	win.document.open();
	win.document.write(content);

}

//-->
