/* Copyright (c) 2008 Inticco Solutions ISSA SA, www.inticco.com */

function addEvent(obj, type, fn)
{
	if(obj.addEventListener)
	{
		obj.addEventListener(type, fn, false);
	}
	else if (obj.attachEvent)
	{
		obj["e"+type+fn] = fn;
		obj[type+fn] = function(){obj["e"+type+fn](window.event);}
		obj.attachEvent("on"+type, obj[type+fn]);
	}
}

addEvent(window, 'load', function(x,i)
{
	if(!document.getElementById)
	{
		return false;
	}
	for(i in x = document.getElementById('header').getElementsByTagName('ul')[1].childNodes)
	{
		if(x[i] && x[i].tagName && x[i].tagName.toLowerCase() == 'li')
		{
			x[i].onmouseover = function()
			{
				this.className = this.className ? this.className + ' active' : 'active';
			}
			x[i].onmouseout = function()
			{
				this.className = this.className.replace(/ ?active/, '');
			}
		}
	}
});
