var flagState = 0;
function openMenu(strOpen) {	
	if(this.flagState == 0)
	    show(strOpen);
	else
	    hide(strOpen);
}
function hide(str) {
x = document.getElementById(str);
x.style.display = 'none'; // hide the element
this.flagState = 0; // now it's off, keeping track of its state
}
function show(str) {
x = document.getElementById(str);
x.style.display = 'block'; // show the element
this.flagState = 1; // now it's on, keeping track of its state
}