// this file contains functions for the dynamic menu
// author:    Dominik Scholz, schlotzz@go4u.de
// changed:   2010-07-08


var DYNAMICMENU = {
	
	// private vars
	initedHeight: [],
	
	
	// show menu pane
	over: function(id)
	{
		var tab = document.getElementById('menupane-tab'+id);
		var content = document.getElementById('menupane-content'+id);

		tab.style.display = 'block';
		content.style.display = 'block';
		
		if (!this.initedHeight[id])
		{
			var top = tab.offsetHeight + tab.offsetTop - tab.parentNode.offsetTop;
			content.style.top = top + 'px';
			this.initedHeight[id] = true;
		}
		
		for (var i in this.initedHeight)
		{
			if (i == id) continue;
			this.out(i);
		}
		
	},
	
	
	// hide menu pane
	out: function(id)
	{
		var tab = document.getElementById('menupane-tab'+id);
		var content = document.getElementById('menupane-content'+id);
		
		tab.style.display = 'none';
		content.style.display = 'none';
	}
	
	
	
}
