function getElem(name){
    nr=document.getElementById(name);
    
    return(nr);
}

var menus = new Array();

function showMenu(id) {	
	menus[id] = false;
	getElem(id).style.visibility = 'visible';
}

function showMenu1(id, count) {
	hideAllMenu(count);
	menus[id] = false;
	getElem(id).style.visibility = 'visible';
}

function showMenu2(id) {	
	menus[id] = false;
	getElem(id).style.visibility = 'visible';

}

function hide (id) {
	if (menus[id]){
		getElem(id).style.visibility = 'hidden';
	}
}
var tid = -1;
function hideMenu(id) {
	menus[id] = true;
	tid = window.setTimeout ('hide("'+id+'")', 400);	
}
function hideMenu2(id) {
	menus[id] = true;
	tid = window.setTimeout ('hide("'+id+'")', 550);		
}
function hideAllMenu(count){
	var i = 1;	
	for (i; i < count+1; i++ ) {
		menus[i] = true;
		hide('m'+i);
	}
}
function blinkMenu(id) {
	getElem(id).style.background = 'transparent';	
	window.setTimeout('revertColor("'+id+'")', 600);	
}

function revertColor(id){
	getElem(id).style.background = '#76b1d1';
}

function closeMe(howLong){
	t = setTimeout("window.close();", howLong);
}
