
var menuCurEl = '';
var menuCurTimeout = '';
var _active = false;

function DIVon(el) {
	if (menuCurEl == el) {
	 	clearTimeout(menuCurTimeout);
	} else if (menuCurEl != '') {
		document.getElementById(menuCurEl).style.visibility='hidden';
	}
	document.getElementById(el).style.visibility='visible';
	menuCurEl = el;
} 
  
function DIVoff(el) {
	menuCurTimeout = setTimeout( function() { if(!_active) document.getElementById(el).style.visibility='hidden';}, 600);
}
	
function activer(el, bool) {
	if(bool) {
		_active = true;
	} else {
		_active = false;
	 	DIVoff(el)
	}
}

