//Animowana zmiana wysokości bloków - Copyright B. Waśniewski
//DEKLARACJE
		
			var ruch = '';
		
			var showtime1;
			var kierownica;
			var h_1=120;
			
			
			var showtime2;
			var ksiazki;
			var h_2=120;
			
			var showtime3;
			var raty;
			var h_3=120;
			
			var showtime4;
			var dokumenty;
			var h_4=120;
			
			var showtime5;
			var news;
			var h_5=60;
			
			
//FUNKCJA_1
			
			function zmiana_kierownica()
			{
			if (ruch != '1')
			{
				kierownica = document.getElementById("kierownica");
				showtime1=setInterval("animate_1_dn()", 20);
				showtime2=setInterval("animate_2_up()", 20);
				showtime3=setInterval("animate_3_up()", 20);
				showtime4=setInterval("animate_4_up()", 20);
				showtime5=setInterval("animate_5_up()", 20);
				}
			}

			
			
            function animate_1_up()
							
			
					{
		                if(h_1<=120)
						{
		                    clearInterval(showtime1);
							ruch = '0';
							
							return;
						}
						ruch = '1';
						document.getElementById( 'ukryty_kierownica').style.display='none';
						document.getElementById( 'czytaj_kierownica').style.display='inline';
		                h_1-=10;
		                kierownica.style.height = h_1+"px";
		        	}
				
			function animate_1_dn()
							
			
					{
		                if(h_1>=267)
						{
		                    clearInterval(showtime1);
							document.getElementById( 'ukryty_kierownica').style.display='inline';
							document.getElementById( 'czytaj_kierownica').style.display='none';
							ruch = '0';
							return;
						}
						h_1+=10;
		                kierownica.style.height = h_1+"px";
						ruch = '1';
		        	}
					
//FUNKCJA_2

			function zmiana_ksiazki()
			{
			if (ruch != '1')
			{
				ksiazki = document.getElementById("ksiazki");
				showtime2=setInterval("animate_2_dn()", 20);
				showtime1=setInterval("animate_1_up()", 20);
				showtime3=setInterval("animate_3_up()", 20);
				showtime4=setInterval("animate_4_up()", 20);
				showtime5=setInterval("animate_5_up()", 20);
				}
			}

			
			
            function animate_2_up()
							
			
					{
		                if(h_2<=120)
						{
		                    clearInterval(showtime2);
							ruch = '0';
							
							return;
						}
						ruch = '1';
						document.getElementById( 'ukryty_ksiazki').style.display='none';
						document.getElementById( 'czytaj_ksiazki').style.display='inline';
		                h_2-=10;
		                ksiazki.style.height = h_2+"px";
		        	}
				
			function animate_2_dn()
							
			
					{
		                if(h_2>=145)
						{
		                    clearInterval(showtime2);
							document.getElementById( 'ukryty_ksiazki').style.display='inline';
							document.getElementById( 'czytaj_ksiazki').style.display='none';
							ruch = '0';
							return;
						}
						h_2+=10;
		                ksiazki.style.height = h_2+"px";
						ruch = '1';
		        	}
			
//FUNKCJA_3

			function zmiana_raty()
			{
			if (ruch != '1')
			{
				raty = document.getElementById("raty");
				showtime3=setInterval("animate_3_dn()", 20);
				showtime1=setInterval("animate_1_up()", 20);
				showtime2=setInterval("animate_2_up()", 20);
				showtime4=setInterval("animate_4_up()", 20);
				showtime5=setInterval("animate_5_up()", 20);
				}
			}

			
			
            function animate_3_up()
							
			
					{
		                if(h_3<=120)
						{
		                    clearInterval(showtime3);
							ruch = '0';
							
							return;
						}
						ruch = '1';
						document.getElementById( 'ukryty_raty').style.display='none';
						document.getElementById( 'czytaj_raty').style.display='inline';
		                h_3-=10;
		                raty.style.height = h_3+"px";
		        	}
				
			function animate_3_dn()
							
			
					{
		                if(h_3>=165)
						{
		                    clearInterval(showtime3);
							document.getElementById( 'ukryty_raty').style.display='inline';
							document.getElementById( 'czytaj_raty').style.display='none';
							ruch = '0';
							return;
						}
						h_3+=10;
		                raty.style.height = h_3+"px";
						ruch = '1';
		        	}			
			
//FUNKCJA_4

			function zmiana_dokumenty()
			{
			if (ruch != '1')
			{
				dokumenty = document.getElementById("dokumenty");
				showtime4=setInterval("animate_4_dn()", 20);
				showtime1=setInterval("animate_1_up()", 20);
				showtime2=setInterval("animate_2_up()", 20);
				showtime3=setInterval("animate_3_up()", 20);
				showtime5=setInterval("animate_5_up()", 20);
				}
			}

			
			
            function animate_4_up()
							
			
					{
		                if(h_4<=120)
						{
		                    clearInterval(showtime4);
							ruch = '0';
							
							return;
						}
						ruch = '1';
						document.getElementById( 'ukryty_dokumenty').style.display='none';
						document.getElementById( 'czytaj_dokumenty').style.display='inline';
		                h_4-=10;
		                dokumenty.style.height = h_4+"px";
		        	}
				
			function animate_4_dn()
							
			
					{
		                if(h_4>=140)
						{
		                    clearInterval(showtime4);
							document.getElementById( 'ukryty_dokumenty').style.display='inline';
							document.getElementById( 'czytaj_dokumenty').style.display='none';
							ruch = '0';
							return;
						}
						h_4+=10;
		                dokumenty.style.height = h_4+"px";
						ruch = '1';
		        	}
//FUNKCJA_5
			
			function zmiana_news()
			{
			if (ruch != '1')
			{
				news = document.getElementById("news");
				showtime5=setInterval("animate_5_dn()", 20);
				showtime1=setInterval("animate_1_up()", 20);
				showtime2=setInterval("animate_2_up()", 20);
				showtime3=setInterval("animate_3_up()", 20);
				showtime4=setInterval("animate_4_up()", 20);
				}
			}

			
			
            function animate_5_up()
							
			
					{
		                if(h_5<=40)
						{
		                    clearInterval(showtime5);
							ruch = '0';
							
							return;
						}
						ruch = '1';
						document.getElementById( 'ukryty_news').style.display='none';
		                h_5-=10;
		                news.style.height = h_5+"px";
		        	}
				
			function animate_5_dn()
							
			
					{
		                if(h_5>=140)
						{
		                    clearInterval(showtime5);
							document.getElementById( 'ukryty_news').style.display='inline';
							ruch = '0';
							return;
						}
						h_5+=10;
		                news.style.height = h_5+"px";
						ruch = '1';
		        	}
