			var AllCities = new Array();
			var AlleLanden = new Array();
			var woj_zm = new Array();			
			var woj_id = {
						    1 : 'dolnoslaskie', 
						    2 : 'kujawsko_pomorskie', 
						    3 : 'lubelskie', 
						    4 : 'lubuskie', 
						    5 : 'lodzkie', 
						    6 : 'malopolskie', 
						    7 : 'mazowieckie', 
						    8 : 'opolskie', 
						    9 : 'podkarpackie',  
						   10 : 'podlaskie', 
						   11 : 'pomorskie', 
						   12 : 'slaskie', 
						   13 : 'swietokrzyskie', 
						   14 : 'warminsko_mazurskie', 
						   15 : 'wielkopolskie', 
						   16 : 'zachodniopomorskie'
						 };
			
						 


 			function MM_preloadImages() {
				var d=document; 
				if(d.images) {
					if(!d.MM_p) d.MM_p=new Array();
					var i,j=d.MM_p.length,a=MM_preloadImages.arguments; 
					for(i=0; i<a.length; i++)
					if (a[i].indexOf("#")!=0) {
						d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];
					}
				}
			}
			
			
			function setProvince(province){
				document.getElementById(province).selected='selected';
				getCities();		
			}
			
			
			function getDependentProvince(){
				if(woj_zm[document.getElementById('city').options.selectedIndex]) {
					actual_city=woj_zm[document.getElementById('city').options.selectedIndex];
					actual_city_id = document.getElementById('city').value;
					for (i = 0; i < document.getElementById('provinces').length; i++)
					{
						a=document.getElementById('provinces').options[i].value;
						if(a==actual_city){ 
							document.getElementById('provinces').options[i].selected='selected';
							getCities();
						}				
					}
				
					for (i = 0; i < document.getElementById('city').length; i++) {
						if(document.getElementById('city').options[i].value == actual_city_id) document.getElementById('city').options[i].selected='selected';
					}		
				}
			}
			
			
			
			function getCities(){
				AllCities.length = 0;
				//AlleLanden.length = 0;
				woj_zm.length = 0;

				for(var ite=1; ite<=16; ite++)
				{
					AllCities[ite] = new Array();
				}
								
				for(var i=0; i<=AlleLanden.length; i++){
					if(AlleLanden[i]) AllCities[AlleLanden[i][2]].push(Array(AlleLanden[i][0], AlleLanden[i][1]));
				}
				
				var cities_select = document.getElementById('city');
				cities_select.innerHTML='';
				cities_select.options[cities_select.length] = new Option(dowolna, '');
				
				
				if(document.getElementById('provinces').value && document.getElementById('provinces').value >0) {
					for (var citerator = 0; citerator < AllCities[document.getElementById('provinces').value].length; citerator++)
					{					
						if(cities_select.length) {
							cities_select.options[cities_select.length] = new Option(AllCities[document.getElementById('provinces').value][citerator][0], AllCities[document.getElementById('provinces').value][citerator][1]);						
						}
					}
					document.getElementById('city').onchange='';
				} else {
					for (i = 0; i < AlleLanden.length; i++)
					{					
						if(AlleLanden[i][1]) {
							cities_select.options[cities_select.length] = new Option(AlleLanden[i][0], AlleLanden[i][1]);					
							woj_zm[cities_select.length-1] = AlleLanden[i][2];
						}
					}
					document.getElementById('city').onchange=getDependentProvince;
				}
			}
			
			
			
			
			function select_search_province (id) {
				
				for (key in woj_id) {
					if(key == id) setProvince(woj_id[key]);
				}
				
			}
			
			
			function select_search_city (id) {
				
				for (i = 0; i < document.getElementById('city').length; i++) {
					if(document.getElementById('city').options[i].value == id) document.getElementById('city').options[i].selected='selected';
				}	
			}


$(document).ready(function() { 
					<!-- rozwijanie i zwijanie "pokoi" -->

					$(".pokoje_lista:not(.active)").hide();
					$("h2.pokoj_head").click(function(){
						$(this).parent().children(".pokoje_lista").slideToggle("normal");
						$(this).toggleClass("active"); return false;					
					});
					
					$("h2.pokoj_head2").click(function(){
						$(this).parent().children(".pokoje_lista").slideToggle("normal");
						$(this).toggleClass("active"); return false;					
					});
					
					
					

$(".komunikaty").hide();

$(".infor2").hover(
       function () {
               $(".komunikaty").show("normal");
       },
       function () {
               $(".alert2").hover(
                       function () {
                               $(".komunikaty").show("normal");
                       }, 
                       function () {
                               $(".komunikaty").hide("normal");
                       } 
               );
       }
);


$(".cennik_szczeg .terminy").hide();
$(".cennik_szczeg h3").hover(
      function () {
              $(this).parent().children(".terminy").slideDown("normal");
      },
      function () {
              $(".cennik_szczeg").hover(
                      function () {
                              
                      }, 
                      function () {
                              $(".cennik_szczeg .terminy").fadeOut("normal");
                      } 
              );
      }
);  



		
		
					
	
	
 });