// Javascript

// otwiera okienko o danych rozmiarach X i Y
function OpenWindow(url, x, y, pos)
{
	if(typeof(x) == 'undefined')
		x = 900;
	
	if(typeof(y) == 'undefined')
		y = 700;
	
	if(typeof(pos) == 'undefined')
		pos = 1;
	
	if(pos)
	{
		x_offset = (window.screen.width-x)/2;
		y_offset = (window.screen.height-y)/2;
	}
	else
	{
		x_offset = 0;
		y_offset = 0;
	}

	okno = window.open(""+url+"", "Okienko", "toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizeable=0,width="+x+",height="+y+",left="+x_offset+",top="+y_offset+"");
	
}
