/* 
 * helper.js
 * 
 * Created on 08.06.2011
 * 
 * Copyright (c) 2011 Marco Ladermann
 * 
 * This library is free software; you can redistribute it and/Or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, Or (at your option) any later version.
 * 
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY Or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 * 
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if Not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 * 
 * http://www.gnu.org/licenses/lgpl.html
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

function tabResize()
{
	var i = 1
	var tab = $('#tab-1')
	if (tab.size() > 0) {
		var tabHeight;
		if($.browser.msie && $.browser.version == "6.0")
		{
			// Spezialbehandlung für Grottenbrowser
			var height = $('#footerPanel').offset().top - 120
			$('#menuPanel').height(height)
			tabHeight = height - $('#contentPanel ul').outerHeight() - 20
		}
		else
		{
			tabHeight = $('#contentPanel').height() - $('#contentPanel ul').outerHeight() - (tab.outerHeight() - tab.height())
		}
		
		while ( (tab=$('#tab-'+(i++))).size() == 1) {
			tab.height(tabHeight)
		}
	}
}

