function menu()
{
	this.active = "";
	this.timer;
	
	this.init = menu_init;
	this.mouseover = menu_mouseover;
	this.mouseout = menu_mouseout;
	this.domouseout = menu_domouseout;
	
	this.actionMouseover = menu_actionMouseover;
	this.actionMouseout = menu_actionMouseout;
	
	function menu_init()
	{
		for(var x = 1; x < 5; x++)
		{
			document.getElementById("menu_" + x).onmouseover = this.actionMouseover;
			document.getElementById("menu_" + x).onmouseout = this.actionMouseout;
		}
	}
	function menu_mouseover(id)
	{
		window.clearTimeout(this.timer);
		
		if(this.active != id && this.active)
			this.mouseout(this.active,1);
		
		this.active = id;
		document.getElementById("menu_" + this.active).style.display = "block";
	}
	function menu_mouseout(id,noTimer)
	{
		if(noTimer)
			return this.domouseout(id);
		
		this.timer = window.setTimeout("menu.domouseout("+id+")", 200);
	}
	function menu_domouseout(id)
	{
		document.getElementById("menu_" + id).style.display = "none";
	}
	
	function menu_actionMouseover()
	{
		var id = this.id.split("_");
		
		menu.mouseover(id[1]);
	}
	function menu_actionMouseout()
	{
		var id = this.id.split("_");
		
		menu.mouseout(id[1]);
	}
}

var menu = new menu;
window.onload = function()
{
	menu.init();
	if(typeof(promotion) != "undefined")
		promotion.load();
	
	if(typeof(chat) != "undefined")
		chat.init();
	
	if(typeof(overview) != "undefined")
	{
		overview.init();
		image_onmouseover(document.getElementById("image_0"));
		if(docu_hash = document.location.hash ? document.location.hash.substr(1) : "")
		{
			if(document.getElementById("product_" + docu_hash))
				overview.click(docu_hash);
		}
	}
}