function popup(url, width, height) {

	// obliczenie srodka ekranu
	winTop = (screen.height - height - 100) / 2;
	winLeft = (screen.width - width) / 2;
	// ustawienia domyslne dla nowego okna
	settings = "toolbar=no, location=no, directories=no, " +
	"status=no, menubar=no, scrollbars=yes, " +
	"resizable=yes, width=" + width + ", height=" + height + ", top=" + winTop + ", left=" + winLeft;
	
	// nowe okno
	mywindow = open(url, 'myname', settings);

	mywindow.location.href = url;

	if (mywindow.opener == null) mywindow.opener = self;
}
