var Menu = {
	lastId:null,
	tId:null,
	show: function(id) {
		if (this.lastId !== null && this.lastId != id) {
			this.hide(this.lastId);
		} else {
			this.cHide();
		}
		curr = document.getElementById(id);
		curr.style.display = 'block';
		this.lastId = id;
	},
	qHide: function(id)  {
		this.tId = setTimeout("Menu.hide('"+id+"');", 200);
	},
	cHide: function() {
		if (this.tId)
			clearTimeout(this.tId);
	},
	hide: function(id) {
		curr = document.getElementById(id);
		curr.style.display = 'none';
	},
	init:function() {
		var c = document.getElementById('menu_cont');
		var a = c.getElementsByTagName('div');
		for (var i = 0; i < a.length; i++) {
			if (a[i].className == 'smc') {
				a[i].onmouseover = function() { Menu.cHide(); };
				a[i].onmouseout = function() { Menu.qHide(this.id); };
			} else if (a[i].className != 'c2') {
				if (a[i].className == 'ssmc') {
					a[i].onmouseover = function() { this.className = 'ssmc hi'; };
					a[i].onmouseout = function() { this.className = 'ssmc'; };
				} else {
					a[i].onmouseover = function() { this.className = 'hi'; };
					a[i].onmouseout = function() { this.className = ''; };
				}
			}
		}
	}
};
