var states = Array(4) ;

function initStates(){
	states[0] = false ;
	states[1] = false ;
	states[2] = false ;
	states[3] = false ;
}

function changeState(obj, state){
	if(state) document.getElementById(obj).style.visibility = 'visible' ;
		else document.getElementById(obj).style.visibility = 'hidden' ;
}

function movedOn(x){
	states[x] = true ;
	setTimeout("showMenu("+x+")", 250) ;
}

function movedOff(x){
	states[x] = false ;
	setTimeout("showMenu("+x+")", 250) ;
}

function showMenu(x){
	changeState("dropmenu"+(x+1), states[x]) ;
}