var menuLayers = {
  activeMenuID: null,
  activeSubMenuID: null,
  
  show: function(id) {
    var mnu = document.getElementById? document.getElementById(id): null;
    if (!mnu) return;
//    window.defaultStatus = 'id=' + document.activeElement.getAttribute('id');
    if (this.activeMenuID!= null) {
    		this.hideSub();
    		this.hide(this.activeMenuID);
    	}
	this.activeMenuID = id;
    document.getElementById(id).style.visibility = 'visible';
  },
  
  showSub: function(id) {
    var mnu = document.getElementById? document.getElementById(id): null;
    if (!mnu) return;
//    window.defaultStatus = 'id=' + document.activeElement;
    if (this.activeSubMenuID!= null)	this.hide(this.activeSubMenuID);
    	this.activeSubMenuID = id;
    this.show(this.activeMenuID);
    document.getElementById(id).style.visibility = 'visible';
  },
  
  hide: function(id) {
    var mnu = document.getElementById? document.getElementById(id): null;
    if (!mnu) return;
//    if (id != document.activeElement)  
   	document.getElementById(id).style.visibility = 'hidden';
  },

  hideAll: function() {
//	this.hideSub();
	this.hide('submenu1');
	this.hide('submenu2');
	
//	this.activeMenuID=null;
  },
hideSub: function() {

  }
}
