function subMenu(id, speed)
{
	if ( !document.getElementById || !document.getElementsByTagName )
		return false;
	this.menu = document.getElementById(id);
	this.submenus = new Array();
	this.smenus = this.menu.getElementsByTagName("li");
	for(var i = 0; i < this.smenus.length; i++)
	{
		if(this.smenus[i].className == "tab")
		{ this.submenus.push(this.smenus[i]); }
	}
	this.timer;
}
subMenu.prototype.init = function() {
	var mi = this;
	for (var a = 0; a < this.submenus.length; a++)
	{
		
			this.submenus[a].getElementsByTagName("a")[0].onmouseover = function()
			{
				if(mi.timer){ clearTimeout(mi.timer) };
				mi.show(this.className, this);
				this.parentNode.className = "tab o";
				
			};
			this.submenus[a].getElementsByTagName("a")[0].onmouseout = function()
			{
				var smenu = document.getElementById(this.className);
				var anchor = this;
				mi.timer = setTimeout(function()
				{
					mi.hide(smenu, anchor);
				}, 400 );
			};
	}
};
subMenu.prototype.hide = function(hmid, tab)
{
	hmid.style.display = 'none';
	tab.parentNode.className = "tab";
};
subMenu.prototype.show = function(smid, tab)
{
	var mi = this;
	var menu = document.getElementById(smid);
	this.hideOther(menu);
	menu.style.display = 'block';
	menu.onmouseover = function()
	{
		if(mi.timer){ clearTimeout(mi.timer); }
	}
	menu.onmouseout = function()
	{
		mi.timer = setTimeout(function(){ mi.hide(menu, tab); }, 700 );
	}
};
subMenu.prototype.hideOther = function(current)
{
	for(var c = 0; c < this.submenus.length; c++)
	{
		if(this.submenus[c] != current)
		{
			var anchor = this.submenus[c].getElementsByTagName('a')[0];
			this.hide(document.getElementById(anchor.className), anchor);
		}
	}
}
subMenu.prototype.hideAll = function()
{
	for(var i = 0; i < this.submenus.length; i++)
	{
		this.hide(document.getElementById(this.submenus[i].getElementsByTagName('a')[0].className));
	}
}