function showInfoForTheCity(CityID) {
	//ukrywanie zakładek
	ShowHideTab("none");

	if (CentrumID) {
		document.getElementById(CentrumID).style.display="none";
	}
	if (!CityID) {
		if ( !document.getElementById('miasto').selectedIndex ) {
			return false;
		}
		CityID = document.getElementById('miasto').options[document.getElementById('miasto').selectedIndex].id;
	}
	//odczytujemy ID miasta

	defList = document.getElementById(pad(CityID) + '_dt');

	node = defList;


	//szukamy UL z miastami
	defList = defList.nextSibling;
	while ( defList.nodeName == '#text' && defList.nodeName != null) {
		defList = defList.nextSibling;
	}

	for(var j=0;j<defList.childNodes.length;j++) {
		if(defList.childNodes[j].nodeName == "UL") {
			citiesList = defList.childNodes[j];
			break;
		}
	}
	defList = node;

	// ilość zakładek do pokazania
	tabListCount = 0;

	//Szukamy LI z danymi miasta
	for (var i=0;i<citiesList.childNodes.length;i++) {
		if (citiesList.childNodes[i].nodeName == "LI") {

			// nadajemy LI znalezionego centrum id
			citiesList.childNodes[i].id = pad(defList.id)+tabListCount;
			tabListCount++;
		}
	}

	//lista z zakładkami
	tabList = document.getElementById("tabs");

	// tworze tablice zakładek mozilwych do pokazania
	tab2Show = new Array();
	for (var k=0;k<tabList.childNodes.length;k++) {
		if (tabList.childNodes[k].nodeName == "LI") {
			tab2Show.push(tabList.childNodes[k]);
		}
	}
	// pokazuję odpowiednie zakładki
	for (var l=0;l<tabListCount;l++){
		tab2Show[l].style.display = "block";
		//	w ramach znalezionego LI przypisanie A normalnego wyglądu i pokazanie
		document.getElementById('tab'+l).className = 'off';
		document.getElementById('tab'+l).style.display="block";
	}
	
	//zmienna globalna	
	CentrumID = pad(defList.id)+'0';


	//pokazujemy pierwsze centrum 
	document.getElementById(CentrumID).style.display="block";

	//zaznaczamy pierwszą zakładke
	document.getElementById('tab0').className = 'on';
			
			// dodajemy eventy do tabów A
			document.getElementById('tab0').onclick = function() {
				selectTab(0);
			}
			document.getElementById('tab1').onclick = function() {
				selectTab(1);
			}
			document.getElementById('tab2').onclick = function() {
				selectTab(2);
			}
			document.getElementById('tab3').onclick = function() {
				selectTab(3);
			}
			document.getElementById('tab4').onclick = function() {
				selectTab(4);
			}
}

/*
	Funkcja podłączająca odpowiednie zdarzenia do zakładek
*/
function selectTab( iIndex ) {
	if (CentrumID) {
		document.getElementById(CentrumID).style.display="none";
		document.getElementById(pad(defList.id)+iIndex).style.display="block";
		CentrumID = pad(defList.id)+iIndex;
		ChangeProperty()
		document.getElementById('tab'+iIndex).className = 'on';
	}
}

/*
	Funkcja do przypisania A w zakładce normalnego wyglądu
*/	
	function ChangeProperty() {
		document.getElementById('tab0').className = 'off';
		document.getElementById('tab1').className = 'off';
		document.getElementById('tab2').className = 'off';
		document.getElementById('tab3').className = 'off';
		document.getElementById('tab4').className = 'off';
	}
/*
	Funkcja do ukrywania/pokazywania wszystkich zakładek
*/	
	function ShowHideTab(MainValue) {
			document.getElementById('tab0').style.display=MainValue;
			document.getElementById('tab1').style.display=MainValue;
			document.getElementById('tab2').style.display=MainValue;
			document.getElementById('tab3').style.display=MainValue;
			document.getElementById('tab4').style.display=MainValue;
	}