		var flagastartu=0;

		function koniec(){
			flagastartu=0;
		}
		
		function zmienstrone(i, j, dew, naz, cen, cen2, met, met2, mia, dziel, lstr, lq, pq){
			flagastartu=1;
			if (pq!=''){
				pq='&'+pq
			}
			if (lq!=''){
				lq='&'+lq
			}
			if (j==1 || j==4){
				startGETRequest('zmienstrone.php?i='+i+'&j='+j+'&dew='+dew+'&naz='+naz+'&cen='+cen+'&met='+met+'&cen2='+cen2+'&met2='+met2+'&mia='+mia+'&dziel='+dziel+pq+lq, zmianastronyprawo, koniec);
				for (ii=1; ii<=lstr; ii++){
					document.getElementById('right_page_'+ii).style.fontWeight = 'normal';
					document.getElementById('right_page2_'+ii).style.fontWeight = 'normal';
				}
				document.getElementById('right_page_'+i).style.fontWeight = 'bold';
				document.getElementById('right_page2_'+i).style.fontWeight = 'bold'
			}
			else if (j==2 || j==3){
				startGETRequest('zmienstrone.php?i='+i+'&j='+j+'&dew='+dew+'&naz='+naz+'&cen='+cen+'&met='+met+'&cen2='+cen2+'&met2='+met2+'&mia='+mia+'&dziel='+dziel+pq+lq, zmianastronylewo, koniec);
				for (ii=1; ii<=lstr; ii++){
					document.getElementById('left_page_'+ii).style.fontWeight = 'normal';
					document.getElementById('left_page2_'+ii).style.fontWeight = 'normal';
				}
				document.getElementById('left_page_'+i).style.fontWeight = 'bold';
				document.getElementById('left_page2_'+i).style.fontWeight = 'bold';
			}
		}
		
		function zmianastronylewo(tekst, tekst2){
			div = document.getElementById('left_list');
			div.innerHTML=tekst;
		}
		
		function zmianastronyprawo(tekst, tekst2){
			div = document.getElementById('right_list');
			div.innerHTML=tekst;
		}
		
		function zmienwtorny(j, dew, naz, cen, cen2, met, met2, mia, dziel, lq, pq){
			flagastartu=1;
			if (pq!=''){
				pq='&'+pq
			}
			if (lq!=''){
				lq='&'+lq
			}
			startGETRequest('zmienwtorny.php?j='+j+'&dew='+dew+'&naz='+naz+'&cen='+cen+'&met='+met+'&cen2='+cen2+'&met2='+met2+'&mia='+mia+'&dziel='+dziel+pq+lq, zmianawtorny, koniec);
			if (j==1){
				document.getElementById('wtorny_wynajem').style.fontWeight = 'bold';
				document.getElementById('wtorny_sprzedaz').style.fontWeight = 'normal';
			}
			else if (j==2){
				document.getElementById('wtorny_wynajem').style.fontWeight = 'normal';
				document.getElementById('wtorny_sprzedaz').style.fontWeight = 'bold';
			}
		}
		
		function zmianawtorny(tekst, tekst2){
			var podzial = tekst.split(':;---;:');
			document.getElementById('left_list').innerHTML=podzial[0];
			document.getElementById('str_gora_lewo').innerHTML=podzial[1];
			document.getElementById('str_dol_lewo').innerHTML=podzial[2];
		}
