var menuarray = new Array(0,0,0,0,0,0);

function showdrop(menu) {
	document.getElementById('dropmenu'+menu).style.display = '';
	menuarray[menu-1] = 1;
	closedrop();
}

function hidedrop(menu) {
	menuarray[menu-1] = 0;
	setTimeout(closedrop,500);
}

function closedrop() {
	for (x=0; x<menuarray.length; x++) {
		if (menuarray[x] == 0) {
			document.getElementById('dropmenu'+(x+1)).style.display = 'none';
		}
	}
}
