
var topNav = {
	currItem: false,

	over: function (item) {
		var subNav = item.parentNode.getElementsByTagName('UL')[0];
		if(!subNav) return;

		if(topNav.currItem && topNav.currItem != subNav) topNav.currItem.style.display = 'none';

		subNav.style.display = 'block';
		subNav.parentNode.onmouseover = function() { topNav.over(subNav.parentNode.getElementsByTagName('A')[0]); }
		subNav.parentNode.onmouseout = function() { topNav.out(subNav); }
		topNav.currItem = subNav;
	},

	out: function (item) {
		item.style.display = 'none';
		topNav.currItem = false;
	}
};