function pok_mape()
{
	document.getElementById('mapa2').style.display = 'block';
}
function sch_mape()
{
	document.getElementById('mapa2').style.display = 'none';
}
function OpenPage(strona, wysokosc, szerokosc)
{
	parametry = 'toolbar=no,menubar=no,location=no,personalbar=no,scrollbars=yes,directories=no,status=yes,resizable=yes,width=' + szerokosc + ',height=' + wysokosc;
	window.open(strona, '', parametry)
}
	var PozycjaX = new Array(10);
	var PozycjaY = new Array(10);

	var ScrollingTest = 0;
	var Tempo = 1;
	var szyb_gora = 1;
	var szyb_dol = 1;
	function ScrollingStart(wyzej, elem, kurs, skok)
	{
		if(!PozycjaX[wyzej])PozycjaX[wyzej] = 0;
		if(!PozycjaY[wyzej])PozycjaY[wyzej] = 0;
		ScrollingTest = 1;
		Scrolling(wyzej, elem, kurs, skok);
	}
	function ScrollingStop()
	{
		ScrollingTest = 0;
	}
	function Scrolling(wyzej, elem, kurs, skok)
	{
		var MaxOffsetWidth = document.getElementById(elem).offsetWidth - document.getElementById(wyzej).offsetWidth;
		var MaxOffsetHeight = document.getElementById(elem).offsetHeight - document.getElementById(wyzej).offsetHeight;
		
		var FunctionRekurencja = "Scrolling('" + wyzej + "', '" + elem + "', '" + kurs + "', " + skok + ")";
		switch(kurs)
		{
			case 'up':
				var temp = PozycjaX[wyzej] * (-1);
				if(temp < MaxOffsetHeight)
				{
					PozycjaX[wyzej] = PozycjaX[wyzej] - skok;
					document.getElementById(elem).style.marginTop = PozycjaX[wyzej] + "px";
					if(ScrollingTest == 1)
						setTimeout(FunctionRekurencja, Tempo);
				}
			break;
			
			case 'down':
				if(PozycjaX[wyzej] < 0)
				{
					PozycjaX[wyzej] = PozycjaX[wyzej] + skok;
					document.getElementById(elem).style.marginTop = PozycjaX[wyzej] + "px";
					if(ScrollingTest == 1)
						setTimeout(FunctionRekurencja, Tempo);
				}
			break;
			case 'left':
				if(PozycjaY[wyzej] < 0)
				{
					PozycjaY[wyzej] = PozycjaY[wyzej] + skok;
					document.getElementById(elem).style.marginLeft = PozycjaY[wyzej] + "px";
					if(ScrollingTest == 1)
						setTimeout(FunctionRekurencja, Tempo);
				}
				break;
			
			case 'right':
				var temp = PozycjaY[wyzej] * (-1);
				if(temp < MaxOffsetWidth)
				{
					PozycjaY[wyzej] = PozycjaY[wyzej] - skok;
					document.getElementById(elem).style.marginLeft = PozycjaY[wyzej] + "px";
					if(ScrollingTest == 1)
						setTimeout(FunctionRekurencja, Tempo);
				}
				break;
		}
	}
