
	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 true;
	}

