function menu_onload(){
	var verticals=new simpleMenu('menu_vertical','vertical');
	var horizontals=new simpleMenu('menu_horizontal','horizontal');
}

function simpleMenu(navid, orient){
	if(typeof document.getElementById == 'undefined' || /opera[\/ ][56]/i.test(navigator.userAgent)){ return; }
	
	this.iskde = navigator.vendor == 'KDE';

	this.isie = typeof document.all != 'undefined' && typeof window.opera == 'undefined' && !this.iskde;

	this.isoldsaf = navigator.vendor == 'Apple Computer, Inc.' && typeof XMLHttpRequest == 'undefined';

	this.tree = function(){
	  return document.getElementById(navid);
	}
	
	if(this.tree() != null)
	{
		this.items = this.tree().getElementsByTagName('li');
		this.itemsLen = this.items.length;

		var i = 0; 
		do
		{
			this.init(this.items[i], this.isie, this.isoldsaf, this.iskde, navid, orient);
		}
		while (++i < this.itemsLen);
	}
}

simpleMenu.prototype.init = function(trigger, isie, isoldsaf, iskde, navid, ishoriz)
{
	
	trigger.menu = 
	  trigger.getElementsByTagName('ul').length ? 
	  trigger.getElementsByTagName('ul')[0] : null;

	trigger.link = trigger.getElementsByTagName('a')[0];

	
	trigger.issub = trigger.parentNode.id == navid;
	
	trigger.ishoriz = ishoriz == 'horizontal';
	
	
	this.openers ={ 'm' : 'onmouseover', 'k' : (isie ? 'onactivate' : 'onfocus') };

	for(var i in this.openers)
	{
		trigger[this.openers[i]] = function(e)
		{
			
			if(!iskde){ this.link.className += (this.link.className == '' ? '' : ' ') + 'rollover'; }

			if(this.menu != null)
			{
				
				if(this.ishoriz){ this.menu.style.left = ((isie || isoldsaf) && (navigator.userAgent.toLowerCase().indexOf("msie 7")<0)) ? this.offsetLeft + 'px' : 'auto'; }
				
				
				
				
				this.menu.style.top = (this.ishoriz && this.issub) ? 
				  ((isie || (this.ishoriz && isoldsaf))&& (navigator.userAgent.toLowerCase().indexOf("msie 7")<0)) ? 
				    this.link.offsetHeight + 'px' : 'auto' : 
				  ((isie || (this.ishoriz && isoldsaf))&& (navigator.userAgent.toLowerCase().indexOf("msie 7")<0)) ? 
				    this.offsetTop + 'px' : '0';
			}
		};
	}


	this.closers ={ 'm' : 'onmouseout', 'k' : (isie ? 'ondeactivate' : 'onblur') };

	
	for(i in this.closers)
	{
		trigger[this.closers[i]] = function(e)
		{
			
			this.related = (!e) ? window.event.toElement : e.relatedTarget;

			
			if(!this.contains(this.related))
			{
				
				if(!iskde){ this.link.className = this.link.className.replace(/[ ]?rollover/g, ''); }
				
				if(this.menu != null)
				{
					
					this.menu.style[(this.ishoriz ? 'left' : 'top')] = 
					  this.ishoriz ? '-10000px' : '-100em';
				}
			}
		};
	}

	if(!isie)
	{
		trigger.contains = function(node)
		{
			if (node == null){ return false; }
			if (node == this){ return true; }
			else{ return this.contains(node.parentNode); }
		};
	}
	trigger = null;
}