// JavaScript Document
function dlugosc_content()
{
 if($('content').clientHeight < 600)
 {
	
	$('content').style.height='600px'
 }

	
}





var j = jQuery.noConflict(); /* żeby nie było konfliktów pomiędzy jQuery a Prototype 
                                ########################################################
                                #                                                      #
								#                 www.takeID.co.uk                     #
								#                 www.takeID.eu                        #
								#                 www.takeID.pl                        #								
								#                                                      #
								########################################################
								; .patrick's comment - New York [takeID] at 17-03-2008 */

   var tab = new Array();
   var baza_menu = 0;	
   var baza_content = 0;
   
	j(document).ready(function(){
		//j("dd:not(:first)").hide();

		baza_menu = document.getElementById('menu').clientHeight
		baza_content = document.getElementById('content').clientHeight
		var b_drzewo = document.getElementById('bdrzewo').innerHTML;
		
		tab.push(b_drzewo);
		//alert(tab[0]);
		
		j(".podmenu").hide();
		
		j(".dt a").click(function(){
		
		//alert(document.getElementById('menu').clientHeight);
		
		var id = this.id;
		var istnieje = 0;
				
			for(i=0; i<tab.length; i++)
			{
			   if(tab[i] == id)
			   {		     
			    
				  delete tab[i];
				  istnieje++;
				  		 
			   }
			}
		    
			if(istnieje>0)
			{ 
			 j(this).parent().next().slideUp("slow");
			}
			else {
			
			j(this).parent().next().slideDown("slow");
			 tab.push(this.id);
			}
			 
				   			
			//j("dd:visible").slideUp("slow");
		  //  j(this).parent().next().slideDown("slow");


			return false;
		});
	});

/*function cont(plus)
{
				// document.getElementById('menu').clientHeight
	var plus =		document.getElementById('menu').clientHeight-baza_menu
	
  var el = document.getElementById('content');
  var ile = baza_content + plus; 
  
  el.style.height=ile+"px";
  
  
  
}*/
