document.observe('dom:loaded',function(){
	
	//hoehescroller() ;
	minitableclose();
	
});




function minitableclose() {
	
	$$('.miniinfotabcontainer').each(function(element) {
		element.hide();									  
	});								 
									 
									 
	
	$$('.tablecloser').each(function(element) {
				
									 
				Event.observe(element, 'click', function() {
					
					parentelement = element.up(0);
					mytable = parentelement.down('.miniinfotabcontainer');
					
					
					
					if (mytable.visible()) {
						
						//ausblenden
						
						Effect.Fade(mytable, { 
									duration: 1,
									afterFinish: function() {
										   element.removeClassName('opentable');
									 }
									  
									 });
						
						
						
						
						
					} else {
						
						//zeigen
						
						Effect.Appear(mytable, { 
									  duration: 1,
									  afterFinish: function() {
										   element.addClassName('opentable');
									  }
									   
									  });

						
					}
					
					
					
				 });
				
				
	
	});
	
//alert(hscrollertext );
				
				
			
  
};


/*
function hoehescroller() {
	
	$$('.makeScrolldynheight').each(function(element) {
									
		var arr = element.positionedOffset();
	  
	   	var offsettop = arr[1];		
		//alert(offsettop);
									
		
		
		var hscrollertext 	= element.getHeight();
	//alert(hscrollertext);
		
		var newhscrollertext 	= 445 - offsettop -15;
		
		//alert(newhscrollertext);
		
		//if($('infotable')==null) newhscrollertext = 445;
		
		element.setStyle({
		   height: newhscrollertext+'px'
		});
	
	});
	
//alert(hscrollertext );
				
				
			
  
};*/










