function popUp(lnk, iId, w, h)
{
	l = (screen.width - w) / 2;
	t = (screen.height - h) / 2;
	
	opts = 'scrollbars = 0, resizable = 1, toolbar = 0, status = 0, menubar = 0, width = '+w+', height='+(parseInt(h) + 20)+', left='+l+', top='+t+'';
	
	window.open(lnk+'&id='+iId,'',opts);
}


function switchSearchStreet(val)
{
	sCity = document.forms['searchForm'].srchCity;
	sStreet = document.forms['searchForm'].srchStreet;

	sStreet.options.length = 0;
	
	for (i=0; i < searchStreets[val].length; i++)
	{
		if (i == 0)
			sStreet.options[0] = new Option('Wybierz miasto', 0);
		
		sStreet.options[i+1] = new Option(searchStreets[val][i], searchStreets[val][i]);
	}
}


function switchSearchCity(val)
{	
	sCity = document.forms['searchForm'].srchCity;
	sStreet = document.forms['searchForm'].srchStreet;

	for ( i = 1; i < searchCities.length; i++ )
	{	
		for ( j = 0; j < searchStreets[i].length; j++ )
		{
			if (searchStreets[i][j] == val)
				sCity.options[i].selected = true;
		}
	}
}
